linux ceentos 安装nginx1.7.3
时间: 2023-12-30 15:23:18 浏览: 77
以下是在CentOS 7.5.1804上安装Nginx 1.7.3的步骤:
1. 更新系统软件包:
```shell
sudo yum update
```
2. 安装EPEL存储库:
```shell
sudo yum install epel-release
```
3. 安装Nginx:
```shell
sudo yum install nginx
```
4. 启动Nginx服务:
```shell
sudo systemctl start nginx
```
5. 验证Nginx是否成功安装:
```shell
sudo systemctl status nginx
```
如果Nginx成功安装并正在运行,您将看到类似以下内容的输出:
```
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2021-09-20 10:00:00 UTC; 1min ago
Docs: http://nginx.org/en/docs/
Process: 12345 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
Main PID: 12345 (nginx)
CGroup: /system.slice/nginx.service
├─12345 nginx: master process /usr/sbin/nginx
└─67890 nginx: worker process
```
阅读全文