最近在玩容器,而且在做一些linux架構優化,一常常重灌ubuntu,就把會用到的指令記錄下來,加快處理的時間。
1.先更新
sudo apt-get update
2.安裝nginx / mysql-server / php7.4-fpm
sudo apt install nginx php7.4-fpm php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl mysql-server -y
3.設定mysql
sudo mysql_secure_installation
4.常用套件安裝
sudo apt-get install unzip curl wget iftop htop openssh-server cifs-utils
5.nginx 修改
vi /etc/nginx/site-available
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 _;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
# With php-cgi (or other tcp sockets):
#fastcgi_pass 127.0.0.1:9000;
}
}
隨機文章
- AdGuardHome 在OPNsense中安裝後,開機後無法自動啟動的解法 (2023-11-23)
- 免費防毒軟軟Avira小紅傘掃不到的毒 (2010-03-06)
- Windows XP SP3 正式發佈 (2008-05-11)
- 看到火流星 (2010-05-03)
- VMWare workstation 14 Guest XP too slow to work. (2018-03-11)