一、nginx源码安装
时间:2019-05-14 21:22:11
收藏:0
阅读:105
1、安装依赖包
yum install -y pcre-devel zlib-devel openssl-devel wget gcc tree vim
2、下载源码包
wget http://nginx.org/download/nginx-1.12.2.tar.gz
3、安装
[root@localhost ~]# cd nginx/
[root@localhost nginx]#./configure --prefix=/usr/local/nginx
[root@localhost nginx]#make && make install
4、配置在用户目录下配置.bash_profile文件,或者配置全局的/etc/profile文件
export PATH=$PATH:/usr/local/nginx/sbin
5、使得配置的文件生效
[root@localhost ~]# source ./.bash_profile
6、启动nginx与停止
[root@localhost ~]# nginx
[root@localhost ~]# nginx -s stop
原文:https://www.cnblogs.com/cplinux/p/10864489.html
评论(0)