Source: Debian 12 / Ubuntu 22.04 使用源安装 LAMP 教程
本文將介紹使用官方來源和第三方來源在Debian 12 和Ubuntu 22.04 安裝最新版Apache 2 + PHP + MySQL 的教學課程,並且可以自行選擇PHP 版本。
Continue reading »Source: Debian 12 / Ubuntu 22.04 使用源安装 LAMP 教程
本文將介紹使用官方來源和第三方來源在Debian 12 和Ubuntu 22.04 安裝最新版Apache 2 + PHP + MySQL 的教學課程,並且可以自行選擇PHP 版本。
Continue reading »Source: Debian 12 編譯打包 PHP 7.4
Debian 12 已經移除 PHP 7.4 套件,只留 PHP 8.2 套件。 不幸的是,有些 PHP 程式還沒有升級到 PHP 8.2。 為了這些舊程式,我編譯打包了 php7.4-compat 套件。
Continue reading »sudo apt install mysql-server mysql-client
sudo perl -pi.bak -e 's/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/' /etc/mysql/mysql.conf.d/mysqld.cnf
sudo systemctl restart mysql
sudo mysql
CREATE DATABASE DB_NAME;
CREATE USER 'USER_NAME'@'%' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
GRANT ALL PRIVILEGES ON DB_NAME.* TO 'USER_NAME'@'%';
exit
## Setup
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge.list'
sudo rm microsoft.gpg
## Install
sudo apt update
sudo apt install microsoft-edge-stable
Source: How to enable or disable services?
sudo systemctl start SERVICE
: Use it to start a service. Does not persist after rebootsudo systemctl stop SERVICE
: Use it to stop a service. Does not persist after rebootsudo systemctl restart SERVICE
: Use it to restart a servicesudo systemctl reload SERVICE
: If the service supports it, it will reload the config files related to it without interrupting any process that is using the service.systemctl status SERVICE
: Shows the status of a service. Tells whether a service is currently running.sudo systemctl enable SERVICE
: Turns the service on, on the next reboot or on the next start event. It persists after reboot.sudo systemctl disable SERVICE
: Turns the service off on the next reboot or on the next stop event. It persists after reboot.systemctl is-enabled SERVICE
: Check if a service is currently configured to start or not on the next reboot.systemctl is-active SERVICE
: Check if a service is currently active.systemctl show SERVICE
: Show all the information about the service.sudo systemctl mask SERVICE
: Completely disable a service by linking it to /dev/null
; you cannot start the service manually or enable the service.sudo systemctl unmask SERVICE
: Removes the link to /dev/null
and restores the ability to enable and or manually start the service.Source:
restart "AudioSrv" service
net stop "AudioSrv" net start "AudioSrv"
pulseaudio -k
or
systemctl --user restart pulseaudio