ubuntu20.04.2上安装nginx+php-fpm

 

1.更新安装源

 

sudo apt-get update 

 

2.安装nginx

 

sudo apt install nginx
$ service nginx status
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2020-11-23 08:57:13 UTC; 2h 13min ago
       Docs: man:nginx(8)
   Main PID: 2611 (nginx)
      Tasks: 2 (limit: 1164)
     Memory: 4.8M
     CGroup: /system.slice/nginx.service
             ├─2611 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
             └─2612 nginx: worker process

 

3.安装php

 

sudo apt install php
  • 这里会默认安装apache2,需要禁用
sudo systemctl 

你可能感兴趣的:(money,#,ubuntu,#,nginx,php,nginx,systemd,ubuntu)