环境:CentOS 6.5

1. 安装依赖环境

[root@localhost ~]# yum install pcre-devel zlib-devel openssl-devel -y

 

2. 安装nginx 

[root@localhost ~]# cd /usr/local/src

[root@localhost src]# wget http://nginx.org/download/nginx-1.10.3.tar.gz

[root@localhost src]# tar xf nginx-1.10.3.tar.gz

[root@localhost src]# cd nginx-1.10.3

[root@localhost nginx-1.10.3]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module

[root@localhost nginx-1.10.3]# make && make install

注:http_stub_status_module主要是用于收集nginx的运行状态数据。

注:如果你的系统没有make命令,请使用yum install make -y安装即可。

 

3.启动

[root@localhost ~]# /usr/local/nginx/sbin/nginx

 

4.验证

http://10.20.30.40/

相关文章:

  • 2022-01-04
  • 2021-07-06
  • 2022-01-18
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2022-01-13
  • 2021-09-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2021-11-03
相关资源
相似解决方案