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

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è)
日韩欧美黄色三级视频| 欧美日韩精品人妻一区| 国产精品偷伦一区二区| 免费高清视频一区二区在线观看 | 日本中文字幕一区在线观看| 欧美三级在线完整版免费| 亚洲精品免费福利视频| 欧美日韩国产精品综合| 亚洲天堂精品日韩电影| 日本三本道成人免费毛片| 亚洲av男人天堂一区| 日韩精品 视频二区| 色综合色综合色综合色| 中文精品字幕人妻熟女小妇| 抱着操才爽的免费视频观看| 国产亚洲精品一区久久| 日韩一区二区三区不卡| 亚洲国际精品女人乱码| 中文字幕一区二区三区精彩视频| 亚洲黄色录像特级生活片| 日韩在线一区中文字幕| 人人人妻人人澡人人爽e| 国产精品国产三级国产专区| 日本韩国精品视频在线| 视频二区国产欧美日韩| 日韩中文字幕视频一区| 麻豆国产97在线精品一区| 日韩精品人妻一区二区网站| 久久综合午夜福利视频| 天堂中文在线免费观看av| 日本亚洲欧美男人的天堂| 国产三级网站在线观看播放| 91在线免费观看国产精品| 国产精品熟女在线视频| 日韩毛片免费看美日韩毛片| 丁香六月色婷婷亚洲激情| 欧美偷拍一区二区三区| 久国产精品一区国产精品| 青青操国产在线自偷自拍| 亚欧熟女乱色一二三区日韩| 日韩精品亚洲一级在线观看|