Linux 安装Nginx并支持SSL

参考

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  测试配置文件是否正常

 

posted @ 2018-12-24 14:19  BINGJJFLY  阅读(7181)  评论(0编辑  收藏  举报