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库缺少,因此我手动安装的这两款 ...
随机推荐
- 获取微软原版“Windows 10 推送器(GWX)” 卸载工具
背景: 随着Windows 10 免费更新的结束,针对之前提供推送通知的工具(以下简称GWX)来说使命已经结束,假设您还未将Windows 8.1 和Windows 7 更新到Windows 10 的 ...
- WebApi基于Token和签名的验证
最近一段时间在学习WebApi,涉及到验证部分的一些知识觉得自己并不是太懂,所以来博客园看了几篇博文,发现一篇讲的特别好的,读了几遍茅塞顿开(都闪开,我要装逼了),刚开始读有些地方不理解,所以想了很久 ...
- 内存映射文件MemoryMappedFile使用
参考资料: http://blog.csdn.net/bitfan/article/details/4438458 所谓内存映射文件,其实就是在内存中开辟出一块存放数据的专用区域,这区域往往与硬盘上特 ...
- mongodb
修改所有的记录: > db.t_express_apply.update({},{$set:{"isStatus" : 0}},{multi:true})WriteResul ...
- spring无法读取properties文件数据
只讲述异常点,关于怎么配置文件,这里不做说明. 1. controller中无法读取config.properties文件 controller中注入的@Value配置是从servlet-cont ...
- [Android]使用Dagger 2来构建UserScope(翻译)
以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/6237731.html 使用Dagger 2来构建UserSco ...
- Linux监控工具介绍系列——OSWatcher Black Box
OSWatcher Balck Box简介 OSWatcher Black Box (oswbb)是Oracle开发.提供的一个小巧,但是实用.强大的系统工具,它可以用来抓取操作系统的性能指标,用 ...
- TCP的数据传输小结
TCP的交互数据流 交互式输入 通常每一个交互按键都会产生一个数据分组,也就是说,每次从客户传到服务器的是一个字节的按键(而不是每次一行) 经受时延的确认 通常TCP在接受到数据时并不立即发送ACK: ...
- 《Note --- Unreal --- MemPro (CONTINUE... ...)》
Mem pro 是一个主要集成内存泄露检测的工具,其具有自身的源码和GUI,在GUI中利用"Launch" button进行加载自己待检测的application,目前支持的平台为 ...
- Xamarin.Android下获取与解析JSON
一.新建项目 1.新建一个Android项目,并命名为为NetJsonList 2.右击引用,选择添加引用,引用System.Json.dll 二.同步请求 既然是跨平台,我们自然不能按照java下的 ...