Linux-rhel6.4部署nginx-创新互联

检查安装

创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于成都做网站、成都网站设计、成都外贸网站建设、嵩县网络推广、重庆小程序开发、嵩县网络营销、嵩县企业策划、嵩县品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们大的嘉奖;创新互联公司为所有大学生创业者提供嵩县建站搭建服务,24小时服务热线:028-86922220,官方网址:www.cdcxhl.com[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.

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网页名称:Linux-rhel6.4部署nginx-创新互联
新闻来源:http://pwwzsj.com/article/degscj.html