参考

https://blog.csdn.net/bjnihao/article/details/52370089

下载依赖

yum -y install gcc gcc-c++ autoconf automake libtool make cmake
yum -y install zlib zlib-devel openssl openssl-devel pcre-devel

安装编译

  Nginx下载地址:http://nginx.org/en/download.html

cd /home/softwares
wget http://nginx.org/download/nginx-1.15.7.tar.gz
tar -zxvf nginx-1.15.7.tar.gz -C /home/
cd /home/nginx-1.15.7/
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-pcre
make
make install

常规操作

[root@localhost ~]# /usr/local/nginx/sbin/nginx   启动
[root@localhost ~]# /usr/local/nginx/sbin/nginx -s stop  停止
[root@localhost ~]# /usr/local/nginx/sbin/nginx -s reload  重新载入
[root@localhost ~]# /usr/local/nginx/sbin/nginx -v  查看版本
[root@localhost ~]# /usr/local/nginx/sbin/nginx -t  测试配置文件是否正常

 

相关文章:

  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-02-06
  • 2021-11-21
  • 2021-10-23
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2021-08-17
  • 2022-12-23
  • 2023-03-17
  • 2021-07-20
  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
相关资源
相似解决方案