国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

ubuntu 編譯安裝nginx及安裝nginx_upstream_check_module模塊

這篇具有很好參考價(jià)值的文章主要介紹了ubuntu 編譯安裝nginx及安裝nginx_upstream_check_module模塊。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

如果有幫助到你,麻煩點(diǎn)個(gè)贊唄~

一、下載安裝包

# 下載nginx_upstream_check_module模塊
wget https://codeload.github.com/yaoweibin/nginx_upstream_check_module/zip/master

# 解壓
unzip  master

# 下載nginx 1.21.6
wget https://github.com/nginx/nginx/archive/refs/tags/release-1.21.6.tar.gz 

# 解壓
tar xf release-1.21.6.tar.gz  

ubuntu 編譯安裝nginx及安裝nginx_upstream_check_module模塊,運(yùn)維軟件技術(shù),ubuntu,nginx,源碼編譯安裝

二、安裝依賴(lài)包

apt-get update
apt-get install gcc libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl libssl-dev  libtool build-essential -y 
sudo apt-get install libxslt-dev libgd-dev libgeoip-dev -y 

三、編譯安裝

# 移動(dòng)到安裝包目錄下
cd /opt/nginx-release-1.21.6/

# 自定義要安裝的插件和module
./auto/configure --prefix=/usr/local/nginx --add-module=/opt/nginx_upstream_check_module-master/  --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-lUTckl/nginx-1.18.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-compat --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module

# 開(kāi)始編譯
make

# 安裝
make install

# 將編譯后的nginx 拷貝到
cp /usr/local/nginx/sbin/nginx /usr/sbin/.

四、配置systemd守護(hù)

# 創(chuàng)建nginx守護(hù)進(jìn)程文件
vim /usr/lib/systemd/system/nginx.service

# 文件內(nèi)容如下
[Unit]
Description=nginx - high performance web server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop

[Install]
WantedBy=multi-user.target
# 啟動(dòng)nginx服務(wù)
systemctl  start nginx.service

# 查看nginx狀態(tài)
systemctl  status  nginx.service

# 設(shè)置nginx開(kāi)機(jī)自啟
systemctl  enable  nginx.service

# 停止nginx服務(wù)
systemctl  stop  nginx.service

腳本解釋?zhuān)?/p>

Unit: 服務(wù)的啟動(dòng)順序和依賴(lài)關(guān)系
Description:對(duì)該服務(wù)的描述;
After:在b.target服務(wù)組啟動(dòng)后,再啟動(dòng)本服務(wù);
Service:服務(wù)具體執(zhí)行的方式
ExecStart,ExecStop,ExecReload等:?jiǎn)?dòng)命令組,分別是服務(wù)啟動(dòng)時(shí),停止時(shí),重啟時(shí),啟動(dòng)前,啟動(dòng)后,停止后執(zhí)行的命令;
Type:服務(wù)啟動(dòng)類(lèi)型。默認(rèn)simple表示ExecStart為主進(jìn)程,notify類(lèi)似于simple,啟動(dòng)結(jié)束后會(huì)發(fā)出通知信號(hào)。另外還有forking,oneshot,dbus,idle等類(lèi)型;
Install: 把服務(wù)放在哪個(gè)服務(wù)組
WantedBy:服務(wù)所在的服務(wù)組。

?五、檢查安裝結(jié)果

# 查看nginx版本
nginx -v

# 查看nginx安裝的模塊
nginx -V

# 查看nginx端口
netstat  -nltp 

ubuntu 編譯安裝nginx及安裝nginx_upstream_check_module模塊,運(yùn)維軟件技術(shù),ubuntu,nginx,源碼編譯安裝文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-651851.html

到了這里,關(guān)于ubuntu 編譯安裝nginx及安裝nginx_upstream_check_module模塊的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶(hù)投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Nginx系列--upstream模塊的使用

    原文網(wǎng)址:Nginx系列--upstream模塊的使用_IT利刃出鞘的博客-CSDN博客 說(shuō)明 ? ? ? ? 本文介紹nginx的upstream模塊的使用。 ? ? ? ? nginx的upstream模塊是用于負(fù)載均衡的。 upstream模塊介紹 ????????Nginx的負(fù)載均衡功能依賴(lài)于ngx_http_upsteam_module模塊,所支持的代理方式包括proxy_pass,

    2024年02月06日
    瀏覽(27)
  • Nginx報(bào)錯(cuò)信息*upstream prematurely closed connection while reading responseheader from upstream’

    Nginx 報(bào)錯(cuò)信息 upstream prematurely closed connection while reading response header from upstream 通常意味著后端服務(wù)(在這種情況下是監(jiān)聽(tīng)在 8089 端口的服務(wù))在 Nginx 期望讀取響應(yīng)頭的時(shí)候關(guān)閉了連接。這可能是由于幾種原因造成的,包括后端服務(wù)崩潰、超時(shí)設(shè)置不當(dāng)或資源限制。 要解決這

    2024年02月04日
    瀏覽(24)
  • 解決Nginx錯(cuò)誤:Upstream prematurely closed connection while reading response header from upstream

    【nginx error log】 /var/log/nginx/error.log: 級(jí)別:error 類(lèi)型: [other] 次數(shù): 1 錯(cuò)誤信息(只取第一條): upstream prematurely closed connection while reading response header from upstream, client: 50.30.156.24 server: xx requests: \\\"GET x HTTP/1.1\\\" upstream: \\\"x 在使用Nginx作為反向代理服務(wù)器時(shí),可能會(huì)遇到這樣的錯(cuò)誤:“ups

    2024年02月03日
    瀏覽(30)
  • tengine/nginx https請(qǐng)求 轉(zhuǎn)發(fā) http upstream

    當(dāng)前的互聯(lián)網(wǎng)應(yīng)用基本都要支持https協(xié)議,而當(dāng)瀏覽器頭通過(guò)https協(xié)議將請(qǐng)求發(fā)到到負(fù)責(zé)負(fù)載的nginx后,會(huì)由當(dāng)前nginx再以http協(xié)議向后端upstream進(jìn)行請(qǐng)求,之所以這么做是因?yàn)閔ttps協(xié)議的安全性也帶來(lái)的額外的性能消耗。而源端基本都是在一個(gè)內(nèi)網(wǎng)里面的,對(duì)于通訊協(xié)議的安全性

    2024年01月23日
    瀏覽(29)
  • nginx加權(quán)輪詢(xún),upstream,Keepalive,負(fù)載均衡實(shí)現(xiàn)案例

    1. nginx 加權(quán)輪詢(xún), weight是權(quán)重配置。

    2024年02月08日
    瀏覽(21)
  • nginx中多個(gè)server塊共用upstream會(huì)相互影響嗎

    nginx中經(jīng)常有這樣的場(chǎng)景,多個(gè)server塊共用一個(gè)域名。 如:upstream有2個(gè)以上的域名,nginx配置兩個(gè)server塊,共用一個(gè)upstream配置。 那么,如果其中一個(gè)域名發(fā)生\\\"no live upstreams while connecting to upstream\\\"錯(cuò)誤,會(huì)不會(huì)影響另一個(gè)域名呢? 會(huì)。導(dǎo)致另一個(gè)域名會(huì)返回5xx,并且也報(bào)錯(cuò)

    2024年01月16日
    瀏覽(22)
  • NGINX [upstream timed out (110: Connection timed out) while reading response header from upstream]錯(cuò)誤

    NGINX [upstream timed out (110: Connection timed out) while reading response header from upstream]錯(cuò)誤

    最近負(fù)責(zé)的項(xiàng)目生產(chǎn)環(huán)境久不久會(huì)報(bào)響應(yīng)異常的錯(cuò)誤,查看相應(yīng)的NGINX有持續(xù)幾分鐘的連接超時(shí)的日志,如下: 查看相應(yīng)的access日志,相應(yīng)時(shí)間的請(qǐng)求沒(méi)有響應(yīng)碼,再看沒(méi)有響應(yīng)前的請(qǐng)求日志,發(fā)現(xiàn)有幾筆持續(xù)請(qǐng)求超過(guò)設(shè)定時(shí)長(zhǎng)5S的響應(yīng)時(shí)間的請(qǐng)求。查看應(yīng)用服務(wù)器的TCP請(qǐng)求

    2024年02月15日
    瀏覽(20)
  • Nginx報(bào)錯(cuò)host not found in upstream解決辦法

    項(xiàng)目說(shuō)明 前后臺(tái)分離項(xiàng)目,后臺(tái)所屬空間沒(méi)有存儲(chǔ)圖片,放置前臺(tái)空間存儲(chǔ),后臺(tái)需要查看圖片,借助proxy_pass。對(duì)應(yīng)配置如下 test.conf test.htaccess 當(dāng)初配置完成的時(shí)候,啟動(dòng)nginx并沒(méi)有問(wèn)題,但是重啟系統(tǒng)之后,nginx卻是啟動(dòng)不起來(lái),報(bào)錯(cuò)為 如果依照?qǐng)?bào)錯(cuò)去找答案,肯定會(huì)是

    2024年02月13日
    瀏覽(30)
  • nginx upstream server主動(dòng)健康監(jiān)測(cè)模塊添加https檢測(cè)功能【上】

    ??前面的《nginx upstream server主動(dòng)健康檢測(cè)模塊ngx_http_upstream_check_module 使用和源碼分析》系列已經(jīng)分析了ngx_http_upstream_check_module的實(shí)現(xiàn)原理,并且在借助這個(gè)模塊的框架實(shí)現(xiàn)了一個(gè)udp健康檢測(cè)的新功能。 ??但是ngx_http_upstream_check_module還缺乏基于https監(jiān)測(cè)上游服務(wù)器健康狀況

    2024年02月20日
    瀏覽(25)
  • nginx upstream server主動(dòng)健康檢測(cè)模塊添加https檢測(cè)功能[完整版]

    nginx upstream server主動(dòng)健康檢測(cè)模塊添加https檢測(cè)功能[完整版]

    ??前面的《nginx upstream server主動(dòng)健康檢測(cè)模塊ngx_http_upstream_check_module 使用和源碼分析》系列已經(jīng)分析了ngx_http_upstream_check_module的實(shí)現(xiàn)原理,并且在借助這個(gè)模塊的框架實(shí)現(xiàn)了一個(gè)udp健康檢測(cè)的新功能。 ??但是ngx_http_upstream_check_module還缺乏基于https監(jiān)測(cè)上游服務(wù)器健康狀況

    2024年02月19日
    瀏覽(24)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包