ArchLinux 安装LNMP

sudo pacman -S nginx php php-fpm php-gd mariadb
# 设置 mysql
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl start mysqld
sudo systemctl enable mysqld
sudo mysql_secure_installation
sudo systemctl enable nginx
sudo systemctl start nginx
sudo systemctl start php-fpm
sudo systemctl enable php-fpm
sudo gedit /etc/nginx/nginx.conf

    location ~ \.php$ {
            root           /usr/share/nginx/html;
            fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
            fastcgi_index  index.php;
            include fastcgi.conf;
        }

你可能感兴趣的:(ArchLinux 安装LNMP)