Linux-rhel6.4部署nginx
admin
2023-03-23 08:00:48
0

检查安装

[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.

上一篇:web反馈错误代码

下一篇:高可用PXC

相关内容

热门资讯

【第一资讯】“丫丫诗词可以开挂... 您好:丫丫诗词这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这款游戏...
玩家最新攻略“相约福建麻将有没... 您好:相约福建麻将这款游戏可以开挂,确实是有挂的,需要了解加客服微信【4282891】很多玩家在这款...
玩家分享攻略“荊州晃晃麻将怎么... 您好:荊州晃晃麻将这款游戏可以开挂,确实是有挂的,需要了解加客服微信【4282891】很多玩家在这款...
石破茂再批高市:安倍、菅义伟、... 据日本“PRESIDENT Online”网站12月25日报道,高市早苗所谓“台湾有事”相关言论引发...
【第一财经】“乐酷炸/金/花到... 【第一财经】“乐酷炸/金/花到底是不是挂?”(原来真的有挂)您好,乐酷炸/金/花这个游戏其实有挂的,...
玩家攻略科普“超稳牛牛是不是有... 有 亲,根据资深记者爆料超稳牛牛是可以开挂的,确实有挂(咨询软件无需打开...
今日重大消息“天天微友怎么开挂... 家人们!今天小编来为大家解答天天微友透视挂怎么安装这个问题咨询软件客服徽9752949的挂在哪里买很...
重磅消息“新大圣牛牛是不是有挂... 重磅消息“新大圣牛牛是不是有挂?”(外卦神器下载)您好,新大圣牛牛这个游戏其实有挂的,确实是有挂的,...
【第一消息】“约约麻将真的有挂... 【第一消息】“约约麻将真的有挂吗?”(太坑了果然有挂)您好,约约麻将这个游戏其实有挂的,确实是有挂的...
今日重磅消息“欢乐龙城3到底是... 家人们!今天小编来为大家解答欢乐龙城3透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪里买...