1.首先安装依赖包(依赖包有点多,我们采用yum的方式来安装)

yum -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel

2.将nginx-1.7.6.tar.gz上传到/usr/local/下

tar -zxvf nginx-1.7.6.tar.gz

3.重命名包名称,讲nginx-1.7.6改为nginx

mv nginx-1.7.6 nginx
3.编译
cd nginx
./configure
make
make install
配置文件 /usr/local/nginx/conf
user root;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 12048;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
client_header_buffer_size 4k;
large_client_header_buffers 4 16k;
#client_max_body_size 10m;
#client_body_buffer_size 500k;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
upstream localhost {
server 132.228.119.47:8080;
server 132.228.119.48:8080;
server 132.228.119.45:8080;
}
server {
listen 9001;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_connect_timeout 3;
proxy_send_timeout 30;
proxy_read_timeout 30;
proxy_pass http://localhost;
}
}
}

centos7下安装apache服务器httpd的yum方式安装

转自Clement-Xu的csdn博客   Apache在Linux系统中,其实叫&qu ...

转-centos7下安装apache服务器httpd的yum方式安装

转自Clement-Xu的csdn博客   Apache在Linux系统中,其实叫“ht ...

linux tar包追加问题【转】

只能已归档的文件才能追加文件. 如果tar.gz文件是如此生成:#tar -zcvf test.tar.gz  a.txt即tar.gz是压缩(-z)和归档(-c)文件,则无法给它追加文件:若果tar ...

LNMP(Linux+Nginx+MySQL+PHP) yum方式安装Redis

一.环境信息 CentOS Linux release 8.1.1911 (Core) Redis server v=5.0.3 二.yum方式安装 1.添加EPEL仓库 sudo yum insta ...

关于linux下mysql 5.7.x数据库的yum的安装方法

环境介绍>>>>>>>>>>>>>>>>>> 操作系统:Centos 7.1 mysql数据 ...

CentOS7下yum方式安装mysql5.6

在Centos7中用MariaDB代替了mysql数据库.所以在新安装MySQL前必须做好对系统的清理工作. 一.清理CentOS7下的MariaDB. [root@localhost ~]#rpm ...

YUM方式安装LAMP

本文介绍两种方法yum安装LAMP, 方法1: 通过httpd的php模块方式安装LAMP 方法2: 通过php-fpm方式安装LAMP 安装环境:CentOS Linux release 7.5.1 ...

CentOS7安装Jenkins,使用war方式直接运行或用yum方式安装运行

jenkins最简单的安装方式呢,就是直接去官网下载jenkins的war包,把war丢到tomcat里运行,直接就能打开了. Jenkins官网:https://jenkins.io/downloa ...

CentOS7 yum方式 安装mysql 5.7.28步骤

CentOS7系统yum方式安装MySQL5.7 最新的yum源可以去http://dev.mysql.com/downloads/repo/yum下载 1.获取mysql官方yum reposito ...