當前系統centos7.4,關閉selinux,關閉防火牆(或自行設定)
1、配置好yum源,安裝依賴
yum install wget gcc gcc-c++ pcre pcre-devel openssl openssl-devel zlib zlib-devel
2、建立nginx啟動使用者
useradd -s /bin/false -m www
cd /usr/local/src/wget
tar zxf nginx-1.12.2.tar.gz
cd /usr/local/src/nginx-1.12.2
4、編譯nginx
5、新增環境變數
ln -sv /usr/local/nginx/sbin/nginx /usr/local/sbin/
6、設定systemctl
vi /usr/lib/systemd/system/nginx.service
[unit]description=nginx
after=network.target
[service]
type=forking
pidfile=/usr/local/nginx/logs/nginx.pid
execstart=/usr/local/nginx/sbin/nginx
execreload=/usr/local/nginx/sbin/nginx -s reload
execstop=/usr/local/nginx/sbin/nginx -s stop
privatetmp=true
[install]
wantedby=multi-user.target
7、啟動nginx
systemctl start nginx
8、最後訪問http://ip即可看到nginx歡迎頁
LNMP架構 安裝Nginx 1 12 2
root dl 001 cd usr local src root dl 001 src wget 2017 12 24 22 22 26 2.tar.gz 正在解析主機 nginx.org nginx.org 206.251 255 63,95.211 80.227,2606 7100 1 69 ...
centos7 4安裝nginx 1 12 2步驟
檢視centos版本號 1.安裝gcc gcc c 如新環境,未安裝請先安裝 yum install y gcc gcc c 2.安裝pcre庫 cd usr src wget tar zxvf pcre 8.36.tar.gz cd pcre 8.36 configure make make in...
編譯安裝tensorflow1 12 2
環境 1 os 16.04.1 ubuntu 2 cpu有點年頭了 cat proc cpuinfo grep model name model name amd athlon tm ii x2 250 processor model name amd athlon tm ii x2 250 pro...