Linux

How to install Debian 13 on a MacbookAir 9,1 (intel)

For T2 chip (touchpad, keyboard):

https://wiki.t2linux.org/guides/preinstall and follow steps, in details:

apt install   firmware-brcm80211   bluez-firmware  firmware-sof-signed   alsa-utils   pipewire   pipewire-pulse   wireplumber

apt-get install autoconf bc bison build-essential cpio curl debhelper dkms dwarves fakeroot flex gawk git kernel-wedge libcap-dev libelf-dev libiberty-dev libncurses-dev libpci-dev libssl-dev libudev-dev openssl python3 rsync wget xz-utils zstd

mkdir build && cd build

git clone --depth=1 https://github.com/t2linux/linux-t2-patches patches

pkgver=$(curl -sL https://github.com/t2linux/T2-Ubuntu-Kernel/releases/latest/ | grep "<title>Release" | awk -F " " '{print $2}' | cut -d "v" -f 2 | cut -d "-" -f 1)

_srcname=linux-${pkgver}

wget https://www.kernel.org/pub/linux/kernel/v${pkgver//.*}.x/linux-${pkgver}.tar.xz

tar xf $_srcname.tar.xz

cd $_srcname

for patch in ../patches/*.patch; do     patch -Np1 < $patch; done

cp /boot/config-$(uname -r) ./.config

make olddefconfig
   54  scripts/config --module CONFIG_BT_HCIBCM4377
   55  scripts/config --module CONFIG_HID_APPLETB_BL
   56  scripts/config --module CONFIG_HID_APPLETB_KBD
   57  scripts/config --module CONFIG_DRM_APPLETBDRM
   58  scripts/config --module CONFIG_APPLE_BCE
   59  scripts/config --module CONFIG_APFS_FS
   60  scripts/config --module CONFIG_BT_HCIBCM4377
make -j$(nproc)

export MAKEFLAGS=-j$(nproc)

nano /usr/src/broadcom-sta-6.30.223.271/dkms.conf  ---(AUTOINSTALL=NO)
make modules_install
make install

For wifi:

https://github.com/AdityaGarg8/Apple-Firmware/releases/download/debian/apple-firmware_14.7.6-1_all.deb

How to install Zabbix 6.0 on Debian 12

1.apt-get install mariadb-server
2.Setup rights for user root or zabbix or similar
3.mysql
4.create DB zabbix with collate utf8_bin
5.create user zabbix with correct rights on zabbix DB
6.apt-get install zabbix-server-mysql zabbix-frontend-php php-mysql
7./etc/init.d/mysql restart
8.a2enconf zabbix-frontend-php
9.nano /etc/php/7.3/apache2/php.ini
10.setup date.timezone in php.ini (Europe/Rome)
11.systemctl reload apache2
12.systemctl restart apache2
13.nano /etc/mysql/mariadb.conf.d/50-server.cnf
14.innodb_log_file_size = 500M
15.innodb_log_buffer_size = 800M
16.innodb_strict_mode = 0
17.cd /usr/share/zabbix-server-mysql/
18.gunzip *.gz
19.mysql -uzabbix -p zabbix < schema.sql
20.mysql -uzabbix -p zabbix < images.sql
21.mysql -uzabbix -p zabbix < double.sql
22.mysql -uzabbix -p zabbix < data.sql
23.systemctl reload apache2
24.systemctl restart apache2 25.http://zabbix
26.apt-get install zabbix-agent
27.nano /etc/zabbix/zabbix_server.conf (DBPassword)
28.systemctl enable zabbix-server
29.reboot

    How to connect to Sql Server 2017 from php on debian 10

    apt-get update

    apt-get install unixodbc unixodbc-dev php-odbc php-cli

    wget https://packages.microsoft.com/debian/10/prod/pool/main/m/msodbcsql17/msodbcsql17_17.4.1.1-1_amd64.deb

    https://docs.microsoft.com/it-it/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver15

    odbcinst -i -d -f /opt/microsoft/msodbcsql17/etc/odbcinst.ini

    nano /etc/odbc.ini

    [MySQLServerDB]
    Description = Database SqlServerDB
    Driver = ODBC Driver 17 for SQL Server
    Server = server[,port]

    How to use PHPSpreadSheet with composer on Debian 10

    from root:
    apt-get install composer php-cli

    from user:
    composer require phpoffice/phpspreadsheet

    Into myfile.php (example):

    require_once('vendor/autoload.php');
    use PhpOffice\PhpSpreadsheet\Spreadsheet;
    use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
    // Creates New Spreadsheet
    $spreadsheet = new Spreadsheet();
    // Retrieve the current active worksheet
    $sheet = $spreadsheet->getActiveSheet();
    // Set the value of cell A1
    $sheet->setCellValue('A1', 'Paolo');
    // Sets the value of cell B1
    $sheet->setCellValue('B1', 'Pizzolongo');
    // Write an .xlsx file
    $writer = new Xlsx($spreadsheet);
    // Save .xlsx file to the current directory
    $writer->save('paolo.xlsx');