nginx於resin整合(nginx安裝)

2021-08-31 02:45:27 字數 1329 閱讀 8774

1.ngiux的安裝。

然後解壓root:$tar zxvf nginx-0.8.53.tar.gz

2)解壓完成以後,

通過./configure --with-http_stub_status_module 進行配置檔案設定。

對於我的linux環境,提示我還要安裝pcre的包和openssl的包

aptitude search pcre

然後找到libpcre3-dev

apt-get install libpcre3-dev

再次安裝,提示我還要我安裝openssl環境。

aptitude search ssl

找到libssl-dev

然後安裝:apt-get install libssl-dev

安裝完成以後:

./configure --with-http_stub_status_module 再次進行配置檔案設定.(我的該設定,只是配置了nginx的狀態監視器)

這樣就設定完成。

3)然後通過make進行編譯。

root:$cd /usr/local/tuping/tools/server/nginx-0.8.53

root:$make

4)編譯完成,進行安裝

root:$make install

安裝完成。因為我沒有設定安裝路徑,那麼nginx預設就在/usr/local/nginx進行安裝。

ngiux的啟動

root:$cd /usr/local/nginx/sbin

檢視./nginx -h

然後看到通過:

root:$./nginx 啟動服務

root:$./nginx -s stop 停止服務

你可以通過ps -ef |grep nginx

檢視是否有nginx的執行緒資訊。

同時也可以通過在目錄:/usr/local/nginx/logs/error.log

檢視伺服器的啟動資訊。

在nginx的安裝目錄,可以通過:

root:$./nginx -t -c /usr/local/nginx/conf/nginx.conf

檢視nginx配置檔案是否正確。

如果正確顯示如下資訊:

the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok

configuration file /usr/local/nginx/conf/nginx.conf test is successful

附件中是nginx伺服器在linux下的安裝包,和nginx的學習文件。

nginx安裝指南

Ubuntu安裝Nginx和正確解除安裝Nginx

敲入下列命令即可 sudo apt get update sudo apt get install nginxsudo apt get remove nginx nginx common 解除安裝刪除除了配置檔案以外的所有檔案。sudo apt get purge nginx nginx commo...

Ubuntu安裝Nginx和正確解除安裝Nginx

敲入下列命令即可 sudo apt get update sudo apt get install nginxsudo apt get remove nginx nginx common 解除安裝刪除除了配置檔案以外的所有檔案。sudo apt get purge nginx nginx commo...

Ubuntu安裝Nginx和正確解除安裝Nginx

1.ubuntu下安裝nginx比較簡單 敲入下列命令即可 sudo apt get update sudo apt get install nginx 安裝後會自動生成三個檔案 如下 2.ubuntu下解除安裝,稍不注意就會入坑 sudo apt get remove nginx nginx co...