- 安装
nginx
:apt install nginx
- 安装
mysql
:apt install mysql-server mysql-client
- 安装
php7.1
:apt-add-repository ppa:ondrej/php apt update apt install php7.1 php7.1-fpm php7.1-cgi php7.1-common php7.1-curl php7.1-mysql php7.1-mcrypt php7.1-mbstring
- 配置
php-fpm
:server { listen 80; listen [::]:80; server_name test.app; #你的域名 root /var/www/nginx/test; index index.html index.php; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; # With php7.0-cgi alone: # fastcgi_pass 127.0.0.1:9000; # With php7.0-fpm: fastcgi_pass unix:/run/php/php7.1-fpm.sock; } }
- 其他:
systemctl restart nginx systemctl restart php7.1-fpm
ubuntu16.04 apt安装lnmp
最新推荐文章于 2023-04-14 15:40:28 发布