[lubuntu]試用lubuntu 24.04


sudo passwd root
apt update
apt install net-tools
apt install nmap
apt install ssh
apt install apache2 php-mysql libapache2-mod-php mysql-server php8.3 (php預設8.3.6)


mysql mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;


apt install filezilla

取消mysql嚴格模式
vi /etc/mysql/my.cnf
新增


[mysqld]
sql_mode=""

#解決 MySQL Authentication plugin ‘caching_sha2_password’ cannot be loaded 錯誤
default_authentication_plugin=mysql_native_password

 
service mysql restart
systemctl enable mysql



#phpmyadmin
下載4.9.11版(搭配php5.6)
https://www.phpmyadmin.net/downloads/


2.安裝php5.6
add-apt-repository ppa:ondrej/php
apt install -y php5.6
apt install php5.6-gd php5.6-mysql php5.6-imap php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php5.6-zip php5.6-mbstring php5.6-soap php5.6-opcache php5.6-common php5.6-json php5.6-readline php5.6-xml


從 php5.6 切換到 php8.3 :
     Apache:
         sudo a2dismod php5.6 ; sudo a2enmod php8.3 ; sudo service apache2 restart
     CLI:
         update-alternatives –set php /usr/bin/php8.3
         
從 php8.3 切換到 php5.6:
         sudo a2dismod php8.3 ; sudo a2enmod php5.6 ; sudo service apache2 restart
     CLI:
          sudo update-alternatives –set php /usr/bin/php5.6


修改php.ini
/etc/php/5.6/apache2/php.ini
short_open_tag = On

瀏覽器
snap refresh firefox
snap install chromium


 

 

 

 

 

本篇發表於 程式設計。將永久鏈結加入書籤。