debian 12 工作環境安裝

Debian 12
xbuntu的軟體支援只有3年
debian 12 安全支援到2026年,長期支援到2028年
MX Linux 23 支援和debian一樣,但是我這次安裝 MX Linux 23使用發生異常,更新之後,也還是一樣,異常無法排除。
HP老筆電安裝後,觸空版異常,在虛擬機中操作也是異常
所以,還是想把debain 12 當成工作環境


debian 12 常用工具安裝 xfce fcitx / libreoffice / firefox install
sudo apt-get install -y curl wget iftop htop bpytop net-tools unzip font-manager fcitx fcitx-tools fcitx-ui* fcitx-config-* fcitx-module* fcitx-frontend-* fcitx-m17n fcitx-table-array30 fcitx-chewing telegram-desktop putty remmina vlc vlc-data gedit gparted libreoffice-l10n-zh-tw libreoffice-help-zh-tw filezilla gvfs-backends smbclient
debian 12 php php8.2fpm nginx mariadb 開發環境
sudo apt-get install -y php8.2-fpm php8.2-common php8.2-mysql php8.2-xml php8.2-xmlrpc php8.2-curl php8.2-gd php8.2-imagick php8.2-cli php8.2-dev php8.2-imap php8.2-mbstring php8.2-opcache php8.2-soap php8.2-zip php8.2-intl nginx mariadb-server mariadb-client mariadb-common
mariadb-secure-installation
1.mariadb-secure-installation
2.vi /etc/nginx/site-available/local

server {
listen 80 default_server;
listen [::]:80 default_server;

root /var/www/html;

# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;

server_name _;
access_log /var/www/log/access_default.log;
error_log /var/www/log/error_default.log;

location / {
#try_files $uri $uri/ /index.php?$args;
try_files $uri $uri/ /index.php$is_args$args;
}

if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?q=$1 last;
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;

# With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;

}

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}

location ~ /\.ht{
deny all;
}

}

(這個有針對wordpress rewrite 優化,一般php環境也可以用,弄好了之後,phpMyAdmin就可以使用了)
systemctl restart php8.2
systemctl reload nginx
3.phpMyAdmin
https://www.phpmyadmin.net/downloads/
cd /var/www/html
sudo wget https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.zip
sudo unzip phpMyAdmin-5.2.1-all-languages.zip
sudo mv phpMyAdmin-5.2.1 phpMyAdmin

DBGate 
Visual Studio Code

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *