惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
博客园 - 司徒正美
D
Docker
B
Blog
V
Visual Studio Blog
Blog — PlanetScale
Blog — PlanetScale
U
Unit 42
S
SegmentFault 最新的问题
小众软件
小众软件
J
Java Code Geeks
美团技术团队
腾讯CDC
MyScale Blog
MyScale Blog
爱范儿
爱范儿
H
Help Net Security
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】

博客园 - 天天天蓝

JDK 国内源 jenkins spring cloud springboot spring 文章索引 java文章索引 小程序 AWAIT ASYNC ES6转ES5解决 centos vsftpd linux 修改配色 mac 常用技巧 ryzen nvidia hackintosh mysql count 主键之坑 git命令 MYSQL 注释 yaf twig配置 1.YAF 的安装 yaf nginx 设置 ubuntu 16 阿里云 vsftpd win10下 homestead 安装
centos nginx
天天天蓝 · 2019-01-21 · via 博客园 - 天天天蓝

1.下载  http://nginx.org/en/download.html

2.解压   tar -zxvf xxxx.tar.gz

3.安装依赖

yum install gcc-c++

yum install pcre-devel

yum install zlib-devel

4.安装

./configure --prefix=/opt/nginx  --with-http_ssl_module

or

 sudo ./configure --prefix=/opt/nginx  --with-openssl=/usr/bin/openssl

sudo make

sudo make install

5.服务

sudo vim /usr/lib/systemd/system/nginx.service
[Unit]
Description=The nginx HTTP and reverse proxy server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/opt/nginx/logs/nginx.pid
ExecStartPre=/usr/bin/rm -f /opt/nginx/logs/nginx.pid
ExecStartPre=/opt/nginx/sbin/nginx -t
ExecStart=/opt/nginx/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=process
PrivateTmp=true

[Install]
WantedBy=multi-user.target