一键安装Nginx
#!/bin/bash
#
#
##########################
.?/etc/init.d/functions
###?1.安裝Nginx所需的pcre庫?###
yum?-y?install?pcre?pcre-devel
###?2.安裝所需依賴包?###
yum?-y?install?gcc?openssl?openssl-devel
###?3.創建www用戶?###
useradd?www?-s?/sbin/nologin?-M
###?4.編譯安裝?###
cd?/tmp/tools
tar?xvf?nginx-1.6.3.tar.gzcd?nginx-1.6.3./configure?--user=www?--group=www?--with-http_ssl_module?--with-http_stub_status_module?--prefix=/application/nginx-1.6.3/
make?&&?make?install
###?5.創建軟連接?###
ln?-s?/application/nginx-1.6.3/?/application/nginx
###?6.啟用Nginx?###
/application/nginx/sbin/nginx?-t/application/nginx/sbin/nginx
netstat?-antulp?|?grep?80
###?7.結果驗證?###curl?
http://10.0.0.8:80
轉載于:https://blog.51cto.com/ruanguowei/1948766
總結

- 上一篇: 也许这就是一种技术成就梦想的理解吧
- 下一篇: 提高系统性能——对SQL语句优化的思考