欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

Keepaliev+Nginx+http

建站服務(wù)器

[root@shiyan~]#systemctldisablefirewalld
[root@shiyan~]#systemctlstopfirewalld
[root@shiyan~]#iptables–F

[root@shiyan~]#vim/etc/selinux/config
SELINUX=disabled
#保存重啟系統(tǒng)生效

[root@shiyan~]#yuminstallkeepalivedhttpdnginx#(Nginx需要單獨(dú)配置EPEL源)

[root@shiyan~]#yuminstallhttpd

[root@shiyan3~]#mkdir-p/app/apache/html/
[root@shiyan3~]#chown-Rapache.apache/app/apache/html/
[root@shiyan3~]#echoApacheServer1>/app/apache/html/index.html
[root@shiyan3~]#vim/etc/httpd/conf/httpd.conf
#此處是更改httpd.conf中的內(nèi)容,并非添加內(nèi)容
DocumentRoot/app/apache/html
#更改為自定義的路徑

#
#Relaxaccesstocontentwithin/var/www.
#
<Directory/app/apache>#更改為自定義的路徑
AllowOverrideNone
#Allowopenaccess:
Requireallgranted
</Directory>

#Furtherrelaxaccesstothedefaultdocumentroot:
<Directory/app/apache/html>#更改為自定義的路徑.
[root@shiyan3~]#systemctlrestarthttpd

#測試網(wǎng)站是否正常運(yùn)行
[root@yum~]#curlhttp://172.18.17.33
ApacheServer1#測試成功

[root@shiyan4~]#mkdir-p/app/apache/html/
[root@shiyan4~]#chown-Rapache.apache/app/apache/html/
[root@shiyan4~]#echoApacheServer2>/app/apache/html/index.html
[root@shiyan4~]#vim/etc/httpd/conf/httpd.conf
#此處是更改httpd.conf中的內(nèi)容,并非添加內(nèi)容
DocumentRoot/app/apache/html
#更改為自定義的路徑

#
#Relaxaccesstocontentwithin/var/www.
#
<Directory/app/apache>#更改為自定義的路徑
AllowOverrideNone
#Allowopenaccess:
Requireallgranted
</Directory>

#Furtherrelaxaccesstothedefaultdocumentroot:
<Directory/app/apache/html>#更改為自定義的路徑.
[root@shiyan4~]#systemctlrestarthttpd
#測試網(wǎng)站是否正常運(yùn)行
[root@yum~]#curlhttp://172.18.17.34
ApacheServer2#測試成功

配置Sorry-Server
[root@shiyan1~]#mkdir-p/app/apache/html/
[root@shiyan1~]#chown-Rapache.apache/app/apache/html/
[root@shiyan1~]#echo<h2>SorryServer1</h2>>/app/apache/html/index.html
[root@shiyan1~]#vim/etc/httpd/conf/httpd.conf
#此處是更改httpd.conf中的內(nèi)容,并非添加內(nèi)容
Listen8080
DocumentRoot/app/apache/html
#更改為自定義的路徑

#
#Relaxaccesstocontentwithin/var/www.
#
<Directory/app/apache>#更改為自定義的路徑
AllowOverrideNone
#Allowopenaccess:
Requireallgranted
</Directory>

#Furtherrelaxaccesstothedefaultdocumentroot:
<Directory/app/apache/html>#更改為自定義的路徑.
[root@shiyan1~]#systemctlrestarthttp
#測試網(wǎng)站是否正常運(yùn)行
[root@yum~]#curlhttp://172.18.17.31:8080
<h2>SorryServer1</h2>#測試成功
配置Keepalived
[root@shiyan1~]#cp/etc/keepalived/keepalived.conf{,.bak}#備份文件
[root@shiyan1~]#vim/etc/keepalived/keepalived.conf
global_defs{
notification_email{
root#定義收郵件的用戶
}
notification_email_fromAlexandre.Cassen@firewall.loc
smtp_server172.18.17.31#定義郵件地址
smtp_connect_timeout30
router_idnode1#定義節(jié)點(diǎn)名稱
}

vrrp_instanceVI_1{
stateMASTER#定義節(jié)點(diǎn)為主節(jié)點(diǎn)模式
interfaceens33#定義使用ens33為VIP網(wǎng)卡
virtual_router_id51#定義節(jié)點(diǎn)編號
priority150#定義優(yōu)先級
advert_int1
authentication{
auth_typePASS
auth_pass1111
}
virtual_ipaddress{
172.18.17.30#定義VIP
}
}
~配置Nginx服務(wù)
[root@shiyan1~]#vim/etc/nginx/nginx.conf
#添加nginx集群
upstreamwebsrvs{
server172.18.17.33:80;
server172.18.17.34:80;
server127.0.0.1:8080backup;
}
#server部分的內(nèi)容需要全部注釋掉

[root@shiyan1~]#vim/etc/nginx/conf.d/default.conf
server{
listen80;
location/{
roothtml;
proxy_passhttp://websrvs;
indexindex.htmlindex.htm;
}
}
[root@shiyan1~]#systemctlrestartnginx
[root@shiyan1~]#systemctlrestartkeepalived
[root@shiyan1~]#systemctlrestarthttpd

創(chuàng)新互聯(lián)公司專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于網(wǎng)站建設(shè)、成都做網(wǎng)站、岐山網(wǎng)絡(luò)推廣、微信小程序定制開發(fā)、岐山網(wǎng)絡(luò)營銷、岐山企業(yè)策劃、岐山品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們大的嘉獎;創(chuàng)新互聯(lián)公司為所有大學(xué)生創(chuàng)業(yè)者提供岐山建站搭建服務(wù),24小時服務(wù)熱線:18982081108,官方網(wǎng)址:aaarwkj.com
配置Sorry-Server
[root@shiyan2~]#mkdir-p/app/apache/html/
[root@shiyan2~]#chown-Rapache.apache/app/apache/html/
[root@shiyan2~]#echo<h2>SorryServer2</h2>>/app/apache/html/index.html
[root@shiyan2~]#vim/etc/httpd/conf/httpd.conf
#此處是更改httpd.conf中的內(nèi)容,并非添加內(nèi)容
Listen8080
DocumentRoot/app/apache/html
#更改為自定義的路徑

#
#Relaxaccesstocontentwithin/var/www.
#
<Directory/app/apache>#更改為自定義的路徑
AllowOverrideNone
#Allowopenaccess:
Requireallgranted
</Directory>

#Furtherrelaxaccesstothedefaultdocumentroot:
<Directory/app/apache/html>#更改為自定義的路徑.
[root@shiyan2~]#systemctlrestarthttp
#測試網(wǎng)站是否正常運(yùn)行
[root@yum~]#curlhttp://172.18.17.31:8080
<h2>SorryServer2</h2>#測試成功
配置Keepalived
[root@shiyan2~]#cp/etc/keepalived/keepalived.conf{,.bak}#備份文件
[root@shiyan2~]#vim/etc/keepalived/keepalived.conf
global_defs{
notification_email{
root#定義收郵件的用戶
}
notification_email_fromAlexandre.Cassen@firewall.loc
smtp_server172.18.17.31#定義郵件地址
smtp_connect_timeout30
router_idnode1#定義節(jié)點(diǎn)名稱
}

vrrp_instanceVI_1{
stateMASTER#定義節(jié)點(diǎn)為主節(jié)點(diǎn)模式
interfaceens33#定義使用ens33為VIP網(wǎng)卡
virtual_router_id51#定義節(jié)點(diǎn)編號
priority150#定義優(yōu)先級
advert_int1
authentication{
auth_typePASS
auth_pass1111
}
virtual_ipaddress{
172.18.17.30#定義VIP
}
}
~配置Nginx服務(wù)
[root@shiyan2~]#vim/etc/nginx/nginx.conf
#添加nginx集群
upstreamwebsrvs{
server172.18.17.33:80;
server172.18.17.34:80;
server127.0.0.1:8080backup;
}
#server部分的內(nèi)容需要全部注釋掉

[root@shiyan2~]#vim/etc/nginx/conf.d/default.conf
server{
listen80;
location/{
roothtml;
proxy_passhttp://websrvs;
indexindex.htmlindex.htm;
}
}
[root@shiyan2~]#systemctlrestartkeepalived
[root@shiyan2~]#systemctlrestartnginx
[root@shiyan2~]#systemctlrestarthttpd

#默認(rèn)使用rr算法依次輪詢訪問后端httpd服務(wù)器
[root@yum~]#curlhttp://172.18.17.30
ApacheServer1
[root@yum~]#curlhttp://172.18.17.30
ApacheServer2

#關(guān)閉后端http1服務(wù),這樣只能訪問httpd2的服務(wù)
[root@yum~]#curlhttp://172.18.17.30
ApacheServer2
[root@yum~]#curlhttp://172.18.17.30
ApacheServer2

#關(guān)閉兩臺后端主機(jī)的httpd服務(wù),這樣因為沒有后端服務(wù)器所以Master的sorry-server提供服務(wù)
[root@yum~]#curlhttp://172.18.17.30
<h2>SorryServer1</h2>
#關(guān)閉Master測試
[root@yum~]#curlhttp://172.18.17.30
<h2>SorryServer2</h2>

標(biāo)題名稱:Keepaliev+Nginx+http
標(biāo)題URL:http://aaarwkj.com/article6/chshog.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站網(wǎng)站營銷、網(wǎng)頁設(shè)計公司、定制開發(fā)微信小程序、網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)
亚洲欧美国产成人在线| 国产传媒在线视频观看| 18禁黄网站免费观看在线 | 久久久久久国产综合精品| 日本欧美一区中文字幕| 美女少妇性高潮的视频| 亚洲日本国产一区二区| 人妻少妇被猛烈进入中文字幕91| 日本午夜视频在线观看| 午夜福利在线视频观看| 日韩av网址在线免费观看| 亚洲精品久久麻豆蜜桃| 91精品国产91久久综合桃花| 亚洲一区日本一区二区| 日本欧美一区二区二区视频免费| 国产一区二区不卡自拍| 亚洲视频精品一区二区三区| 国产一区二区三区精品久| 亚洲欧美一级二级三级| 国产高清av免费在线播放| 91在线播放国产视频| 色婷婷一区二区三区影片| 欧美夫妻香蕉视频网站| 久久免费看少妇高潮av| 亚洲欧美综合另类久久| 欧美日韩视频在线第一页| 久久香蕉香蕉公开视频| 亚洲一区欧美日韩91| 国产精品夜色一区二区三区不卡 | 亚洲欧洲日韩另类在线| 91久久福利国产成人精品| 日韩二区三区在线视频| 中文字幕av日韩在线| 欧美一区二区三区免费精品| 亚洲欧洲日本一区精品| 亚洲欧美综合日韩综合久久久| 日韩精品一区二区91| 97超频在线观看免费| 免费看国产一级黄色大片| 人妻口爆视频一区二区三区| 免费国产成人在线视频|