NginxWeb服务器安装
1、 安装编译工具和库文件
[root@bigdata-51cdh opt]# yum -y install
make zlib zlib-devel gcc-c++ libtool openssl openssl-devel

2、 安装PCRE
(1) 下载 PCRE 安装包,下载地址:http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
(2) 解压。[root@bigdata-51cdh opt]# tar
-zxf software/pcre-8.35.tar.gz -C modules/

(3) 进入pcre目录 [root@bigdata-51cdh opt]# cd
modules/pcre-8.35/
(4) 编译安装
[root@bigdata-51cdh
pcre-8.35]# ./configure

[root@bigdata-51cdh
pcre-8.35]# make && make install

(5) 查看版本,确认安装成功

[root@bigdata-51cdh
pcre-8.35]# pcre-config --version
8.35
3、 安装Nginx
(1) 下载Nginx ,地址为: http://nginx.org/download/nginx-1.6.2.tar.gz
(2) 解压Nginx
[root@bigdata-51cdh
opt]# tar -zxf software/nginx-1.6.2.tar.gz -C modules/

(3) 配置
[root@bigdata-51cdh
nginx-1.6.2]# ./configure --prefix=/opt/modules/www
--with-http_stub_status_module --with-http_ssl_module
--with-pcre=/opt/modules/pcre-8.35

(4) make

(5) make install

(6) 查看nginx 版本,确认安装成功
[root@bigdata-51cdh
nginx-1.6.2]# /opt/modules/www/sbin/nginx -v

4、 Nginx配置
(1)
添加用户,用户名为www

(2)
配置nginx.conf文件
[root@bigdata-51cdh nginx-1.6.2]# vim
/opt/modules/www/conf/nginx.conf
|
user www www; worker_processes 1; error_log pid worker_rlimit_nofile events { use epoll; worker_connections 65535; } http { include default_type log_format '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $http_x_forwarded_for'; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 8m; sendfile on; tcp_nopush keepalive_timeout 60; tcp_nodelay fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; gzip on; gzip_min_length 1k; gzip_buffers gzip_http_version 1.0; gzip_comp_level 2; gzip_types gzip_vary on; server { listen 80; server_name localhost; index index.html index.htm index.php; root /opt/modules/www/html; location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ico)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 15d; } access_log off; } } |
(3)
检查配置是否正确
[root@bigdata-51cdh www]#
/opt/modules/www/sbin/nginx -t

5、 启动Nginx
[root@bigdata-51cdh www]# /opt/modules/www/sbin/nginx
[root@bigdata-51cdh www]# ps -ef|grep nginx

6、 访问Nginx站点

附件列表
NginxWeb服务器安装的更多相关文章
- samba服务器安装,共享nginx目录
Samba是一个能让Linux系统应用Microsoft网络通讯协议的软件,类似于win的网上邻居,让windows和linux实现文件共享 1.安装smaba服务 yum install samba ...
- apache服务器安装以及使用passenger插件部署rails应用
小例子可以部署在rails自带的WEBrick上,逐渐往后走还得上Apache. 安装apache服务器 命令是sudo apt-get install apache2 安装passenger插件 安 ...
- FreeRadius服务器安装以及error while loading shared libraries问题
服务器安装过程: 1. Down from www.freeradius.org 我下载的版本是freeradius-server-2.1.8.tar.gz 2. tar zx ...
- Windows服务器安装配置PHP7.0环境图文教程
摘自http://www.111cn.net/phper/linux-php/109865.htm Windows服务器安装配置PHP7.0环境图文教程 www.111cn.net 更新:2016-0 ...
- Linux下Redis服务器安装配置
说明:操作系统:CentOS1.安装编译工具yum install wget make gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel ...
- Zabbix3.0+CentOS7.0+MariaDB5.5监视服务器安装
本次安装采用: Centos7.0 Zabbix3.0 MariaDB5.5 ------------------- 2012/12/2更新 最新的Centos7.1或者Redhat7.1版本在最后 ...
- CentOS下Redis服务器安装配置
说明: 操作系统:CentOS 1.安装编译工具 yum install wget make gcc gcc-c++ zlib-devel openssl openssl-devel pcre-de ...
- Windows Server 2008 DNS服务器安装与配置
Windows Server 2008 DNS服务器安装与配置本文关键字:Windows Server 2008 DNS.IIS 服务器安装与配置,DNS服务器本文来源:http://www.ip-t ...
- linux下Nginx服务器安装教程
序:Nginx服务器安装总结而已,不是教程. 安装的过程中出现了一些问题,原因我的云主机是纯净版,所以很多依赖包都没有.其中安装过程中就发现perl库缺少和openssl库缺少,因此我手动安装的这两款 ...
随机推荐
- Modify Branding of FreeCAD
Modify Branding of FreeCAD eryar@163.com This article describes the Branding of FreeCAD. Branding me ...
- JavaScript之职责链模式
一.概述 职责链模式(Chain of responsibility),就是使多个对象都有机会处理请求,从而避免请求的发送者和接受者之间的耦合关系.将这个对象连成一条链,并沿着这条链传递该请求,直到有 ...
- android键盘
在应用的开发过程中有不少的情况下会用到自定义键盘,例如支付宝的支付密码的输入,以及类似的场景.android系统给开发者们提供了系统键盘,KeyboardView,其实并不复杂,只是有些开发者不知道罢 ...
- 张高兴的 UWP 开发笔记:横向 ListView
ListView 默认的排列方向是纵向 ( Orientation="Vertical" ) ,但如果我们需要横向显示的 ListView 怎么办? Blend for Visua ...
- SpringMVC+Shiro权限管理【转】
1.权限的简单描述 2.实例表结构及内容及POJO 3.Shiro-pom.xml 4.Shiro-web.xml 5.Shiro-MyShiro-权限认证,登录认证层 6.Shiro-applica ...
- RMS去除在线认证
在微软 OS 平台创建打开 RMS 文档如何避免时延 相信我们在企业内部的环境中已经部署了微软最新的OS平台,Windows 7和Windows 2008 R2,在这些OS平台上使用IRM功能时,您有 ...
- Atitit.attilax软件研发与项目管理之道
Atitit.attilax软件研发与项目管理之道 1. 前言4 2. 鸣谢4 3. Genesis 创世记4 4. 软件发展史4 5. 箴言4 6. 使徒行传 4 7. attilax书 4 8. ...
- TFS2013 设置签出独占锁
转载自: http://www.cnblogs.com/zhang888/p/4280251.html
- DB2重启数据库实例
DB2重启数据库实例时,有时停止实例会失败,此时需要先确认没有应用链接数据库,然后再关闭数据库实例,并重新启动. 1.查看是否有活动的链接 命令:db2 list applications for d ...
- sqlserver批量修改首字母为大写
'hello world' ----> 'Hello world' update tableName set columnName=CHAR(ASCII(SUBSTRING(columnN ...