Linux-rhel6.4部署nginx
2017-06-26 16:39
519 查看
检查安装
12345[root@kurolz ~]# rpm -qa pcre*pcre-devel-7.8-6.el6.x86_64pcre-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.html1234[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包安装:
1234567[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
18ce1
-6.el6.x86_64.rpm warning: pcre-devel-7.8-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEYPreparing... ########################################### [100%] 1:pcre-devel ########################################### [100%]
重新安装成功:
123456789101112131415[root@kurolz nginx-1.10.3]# ./configure checking for OS + Linux 2.6.32-358.el6.x86_64 x86_64checking 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
主页测试:
12[root@kurolz ~]# cd /usr/local/nginx/html[root@kurolz html]# cat index.html1234567891011121314151617181920212223Welcome to nginx! body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; }Welcome to nginx!If you see this page, the nginx web server is successfully installed andworking. Further configuration is required.For online documentation and support please refer tonginx.org.Commercial support is available atnginx.com.Thank you for using nginx.
出错,没有开启服务:
12[root@kurolz html]# curl http://localhostcurl: (7) couldn't connect to host
开启服务测试成功:1234567891011121314151617181920212223[root@kurolz ~]# cd /usr/local/nginx/sbin[root@kurolz sbin]# curl http://localhostWelcome to nginx! body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; }Welcome to nginx!If you see this page, the nginx web server is successfully installed andworking. Further configuration is required.For online documentation and support please refer tonginx.org.Commercial support is available atnginx.com.Thank you for using nginx.
12345[root@kurolz ~]# rpm -qa pcre*pcre-devel-7.8-6.el6.x86_64pcre-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.html1234[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包安装:
1234567[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
18ce1
-6.el6.x86_64.rpm warning: pcre-devel-7.8-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEYPreparing... ########################################### [100%] 1:pcre-devel ########################################### [100%]
重新安装成功:
123456789101112131415[root@kurolz nginx-1.10.3]# ./configure checking for OS + Linux 2.6.32-358.el6.x86_64 x86_64checking 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
主页测试:
12[root@kurolz ~]# cd /usr/local/nginx/html[root@kurolz html]# cat index.html1234567891011121314151617181920212223Welcome to nginx! body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; }Welcome to nginx!If you see this page, the nginx web server is successfully installed andworking. Further configuration is required.For online documentation and support please refer tonginx.org.Commercial support is available atnginx.com.Thank you for using nginx.
出错,没有开启服务:
12[root@kurolz html]# curl http://localhostcurl: (7) couldn't connect to host
开启服务测试成功:1234567891011121314151617181920212223[root@kurolz ~]# cd /usr/local/nginx/sbin[root@kurolz sbin]# curl http://localhostWelcome to nginx! body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; }Welcome to nginx!If you see this page, the nginx web server is successfully installed andworking. Further configuration is required.For online documentation and support please refer tonginx.org.Commercial support is available atnginx.com.Thank you for using nginx.
相关文章推荐
- Linux-rhel6.4部署nginx
- Linux-RHEL6.4部署zabbix监控
- 使用RHEL6.4部署PXE+kickstart,实现自动安装linux系统
- Linux-rhel6.4 编译安装PHP,Nginx与php连接
- Linux-RHEL6.4部署zabbix监控
- Linux-rhel6.4 编译安装PHP,Nginx与php连接
- Linux下安装Nginx-CentOS6.4版本
- 用RHEL6.4(64bit)Nginx+Keepalived实现Nginx进程的主从、双主高可用
- RHEL4环境部署Linux+Apache+MySQL+PostgreSQL+PHP环境(未完善)
- linux下nginx+uwsgi部署python应用
- Install LEMP (Linux, Nginx, MySQL 5.5.29, PHP 5.4.11) on RHEL/CentOS 5-6 & Fedora 18-12
- linux安装nginx(rhel-rpm)
- RHEL 5服务篇—Linux下部署DHCP及中继
- 【Linux】Nginx安装、部署--CentOS5.4
- linux下利用nginx部署python网站
- 用mkisofs命令制作redhat enterprise linux (RHEL6.4) ISO启动镜像
- RHEL6.4+ORACLE11G R2部署
- RHEL4环境部署Linux+Apache+MySQL+PostgreSQL+PHP环境
- Linux+Apache+Nginx+MySQL+PHP 前后端 部署 生产环境
- linux下nginx+uwsgi部署python应用