网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Linux-rhel6.4部署nginx

检查安装

创新互联是一家专注于网站设计、成都网站设计与策划设计,浑江网站建设哪家好?创新互联做网站,专注于网站建设10年,网设计领域的专业建站公司;建站业务涵盖:浑江等地区。浑江做网站价格咨询:18980820575

[root@kurolz ~]# rpm -qa pcre*
pcre-devel-7.8-6.el6.x86_64
pcre-7.8-6.el6.x86_64
[root@kurolz ~]# rpm -qa openssl*
openssl-1.0.0-27.el6.x86_64

安装nginx

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

[root@kurolz ~]# tar -zxvf nginx-1.10.3.tar.gz
[root@kurolz ~]# cd ngunx-1.10.3
[root@kurolz ~]# ./configure
./configure:  error: the HTTP rewrite module requires the PCRE library.

报错,原因:没有安装pcre-devel

解决,挂载系统盘,找到rpm包安装:

[root@kurolz Packages]# ls pcre*
pcre-7.8-6.el6.i686.rpm  pcre-7.8-6.el6.x86_64.rpm  pcre-devel-7.8-6.el6.i686.rpm  pcre-devel-7.8-6.el6.x86_64.rpm
[root@kurolz Packages]# rpm -ivh pcre-devel-7.8-6.el6.x86_64.rpm 
warning: pcre-devel-7.8-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                ########################################### [100%]
   1:pcre-devel             ########################################### [100%]

重新安装成功:

[root@kurolz nginx-1.10.3]# ./configure 
checking for OS
 + Linux 2.6.32-358.el6.x86_64 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) 
checking for gcc -pipe switch ... found
......
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"
[root@kurolz nginx-1.10.3]# make
[root@kurolz nginx-1.10.3]# make install

主页测试:

[root@kurolz ~]# cd /usr/local/nginx/html
[root@kurolz html]# cat index.html



Welcome to nginx!



Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

出错,没有开启服务:

[root@kurolz html]# curl http://localhost
curl: (7) couldn't connect to host

开启服务测试成功:

[root@kurolz ~]# cd /usr/local/nginx/sbin
[root@kurolz sbin]# curl http://localhost



Welcome to nginx!



Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.


网站标题:Linux-rhel6.4部署nginx
网站网址:http://bjjierui.cn/article/jhpjis.html

其他资讯