$ cd /usr/src
$ wget
$ tar xvf nginx-1.12.0.tar.gz
$ cd nginx-1.12.0
$ ./configure --prefix=/usr/local/nginx
安裝ssl模組(支援https)
```shell
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
檢視openssl版本
../openssl-1.1.0e
nginx 編譯報錯:ssl modules require the openssl library需要安裝openssl-devel,github上的說明要用yum工具安裝,反覆安裝不上,提示沒有repos(回購),最後找到了方法。
在ubuntu系統裡這是分開的兩個,需要分開來安裝:
sudo apt-get install openssl
sudo apt-get install libssl-dev
redhat、centos才是openssl-devel!
$ yum -y install pcre-devel openssl openssl-devel
編譯安裝nginx
```shell
$ make
$ make
install
$ /usr/local/nginx/sbin/nginx
常用nginx操作命令
//查詢nginx主程序號
$ ps -ef |
grep nginx
//從容停止nginx:
$kill -quit 主程序號
//快速停止nginx:
kill -term 主程序號
//強制停止nginx:
pkill -9 nginx
自此nginx安裝完畢! linux系統下安裝nginx
首先連線到linux,切換至root使用者,並cd至usr local目錄下,在該目錄下使用如下命令新建nginx資料夾 使用如下命令給資料夾授權 給local賦予讀寫許可權 chmod 777 nginx 給local及其以下子目錄賦予讀寫許可權 進入解壓出來的目錄後,在編譯安裝前需要先使用如下命...
Linux系統下離線安裝Nginx
1 作業系統 centos 7.3 2 nginx 1.12.01 安裝nginx rpm ivh nginx 1.12.0 1.el7.ngx.x86 64.rpm2 啟動nginx usr sbin nginx3 瀏覽器檢視 nginx安裝完畢之後有乙個預設頁面,我們可以訪問ip 80埠開啟ng...
Nginx在Linux系統下安裝
1.yum y install gcc zlib zlib devel pcre devel openssl openssl devel 一鍵安裝四個依賴 2.pcre config version 檢視版本號 建立乙個資料夾 cd usr local mkdir nginx 進入nginx目錄下 ...