CentOS安裝nginx

安裝依賴:nginx

# yum install -y pcre pcre-devel
# yum install -y zlib zlib-devel
# yum install -y openssl openssl-devel
​# yum install gcc-c++

下載nginx:c++

# wget http://101.96.8.165/nginx.org/download/nginx-1.11.3.tar.gz

安裝:bash

# tar xzf nginx-1.11.3.tar.gz
# cd nginx-1.11.3
# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module
# make
# make install

查看安裝目錄:ui

# whereis nginx

啓動與重啓:spa

# cd /usr/local/nginx/sbin/
# ./nginx
# ./nginx -s stop
# ./nginx -s quit
# ./nginx -s reload

stop:中止進程;quit:退出;reload:從新加載配置文件code

相關文章
相關標籤/搜索