标签:tab 出现 pac 支持 rewrite 创建 -- pen 自己
nginx使用的三个方面源代码安装。
检查系统是否有安装pcre(让nginx支持http的rewrite模块),pcre-devel openssl------》基础依赖包
openssl-devel 使用https时用到
安装过程
cd /tuwei/tools/
wget http://nginx.org/download/nginx-1.6.3.tar.gz------》下载nginx
tar xf nginx-1.6.3.tar.gz
cd nginx-1.6.3
useradd nginx -s /sbin/nologin -M ----------->创建nginx服务用户
./configure --user=nginx --group=nginx --prefix=/application/nginx-1.6.3/ \
--with-http_stub_status_module --with-http_ssl_module
make&&make install
安装完后创建软连接,方便后续使用
ln -s /application/nginx-1.6.3/ /application/nginx
启动nginx服务前检查语法,养成好习惯。
/application/nginx/sbin/nginx -t
出现如下信息
[root@node04 html]# /application/nginx/sbin/nginx -t
nginx: the configuration file /application/nginx-1.6.3//conf/nginx.conf syntax is ok
nginx: configuration file /application/nginx-1.6.3//conf/nginx.conf test is successful
如果提示相关相关模块不存在,将模块路径放到模块配置文件中
cat /etc/ld.so.conf
执行ldconfig 使配置修改生效
启动nginx服务
/application/nginx/sbin/nginx
检查服务是否启动
cat nginx.pid
相当于重启nginx服务创建简单站点
自己创建index.html
放到/application/nginx/html目录然后进行访问,nginx默认站点文件为index.html。
标签:tab 出现 pac 支持 rewrite 创建 -- pen 自己
原文地址:http://blog.51cto.com/tuwei/2060747