Ubuntu服务器设置
目录
Ubuntu清除旧内核
sudo apt purge linux-image-****** sudo apt autoremove
dpkg --get-selections | grep deinstall | sed 's/deinstall/\lpurge/' | sudo dpkg --set-selections; sudo dpkg -Pa
Apache
安装apache2
sudo apt install apache2
Openssl
Certbot
sudo apt update sudo apt install python3 python3-venv libaugeas0 sudo python3 -m venv /opt/certbot/ sudo /opt/certbot/bin/pip install --upgrade pip sudo /opt/certbot/bin/pip install certbot certbot-apache sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot sudo certbot --apache
[Monthly] Upgrade certbot
It's important to occasionally update Certbot to keep it up-to-date.
To do this, run the following command on the command line on the machine.
sudo /opt/certbot/bin/pip install --upgrade certbot certbot-apache
允许certbot服务通过防火墙
sudo ufw allow 'Apache Full'
sudo ufw reload
mysql
sudo apt install mysql-server
PHPmyadmin
sudo apt install phpmyadmin
PHP
sudo apt install php8.1