标签:停止 ack 配置 http 编辑 通过 htm line oca
1 sudo apt-get install build-essential
2 sudo apt-get install libtool
3 sudo apt-get update
4 sudo apt-get install libpcre3 libpcre3-dev
5 sudo apt-get install zlib1g-dev
6 sudo apt-get install openssl
#下载最新版本:
wget http://nginx.org/download/nginx-1.13.1.tar.gz
#解压:
tar -zxvf nginx-1.13.1.tar.gz
#进入解压目录:
cd nginx-1.13.1
#配置:
./configure --prefix=/usr/local/nginx
#编辑nginx:
make
注意:这里可能会报错,提示“pcre.h No such file or directory”,具体详见:http://stackoverflow.com/questions/22555561/error-building-fatal-error-pcre-h-no-such-file-or-directory
需要安装 libpcre3-dev,命令为:sudo apt-get install libpcre3-dev
#安装nginx:
sudo make install
#启动nginx:
sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
注意:-c 指定配置文件的路径,不加的话,nginx会自动加载默认路径的配置文件,可以通过 -h查看帮助命令。
#查看nginx进程:
ps -ef|grep nginx
/usr/local/nginx/sbin/nginx
./sbin/nginx
./sbin/nginx -s stop
./sbin/nginx -s quit
./sbin/nginx -s reload
./sbin/nginx -c /usr/local/nginx/conf/nginx.conf
标签:停止 ack 配置 http 编辑 通过 htm line oca
原文地址:http://www.cnblogs.com/xqnq2007/p/7073526.html