centos6系列LNMP環境的安裝
阿新 • • 發佈:2018-03-09
nologin sudo OS use nginx的安裝 login fault grep com
1.先解決Nginx的依賴關系:
yum install -y pcre-devel openssl-devel
2.安裝wget:sudo yum -y install wget
3.下載nginx的安裝包:wget http://nginx.org/download/nginx-1.10.3.tar.gz
4.解壓nginx文件包:tar xf nginx-1.10.3.tar.gz
5.創建一個管理賬號(zheng):useradd -M -s /sbin/nologin zheng
6.編譯安裝nginx(三步驟):
./configure \
--prefix=/usr/local/nginx \
--user=zheng\
--group=zheng \
--with-http_ssl_module \
--with-http_stub_status_module
make make install
7.創建一條軟鏈接:ln -s /root/nginx-1.10.3 /usr/local/nginx
8.精簡化nginx.conf主配置文件內容,縮寫Nginx配置文件:egrep -v "#|^$" nginx.conf.default >nginx.conf
9.啟動Nginx: /usr/local/nginx/sbin/nginx
10.查看進程,看看Nginx是否啟動了: ps aux |grep nginx
centos6系列LNMP環境的安裝