国产免费牲交视频无遮挡_偷偷鲁视频成人免费视频_中文无码 日韩精品_曰韩无码人妻中文字幕

其他新聞

其他新聞

discuz免費建站h(免費網(wǎng)頁建站)

時間:2023-11-09 信途科技其他新聞

NFS(Network File System)是一個網(wǎng)絡文件系統(tǒng),是Linux系統(tǒng)直接支持文件共享的一直文件系統(tǒng),它允許網(wǎng)絡中的計算機之間通過TCP/IP網(wǎng)絡共享資源。在NFS的應用中,本地NFS的客戶端應用可以透明地讀寫位于遠端NFS服務器上的文件,就像訪問本地文件一樣。一般NFS為單擊部署,而NFS服務器主要用于存放企業(yè)重要數(shù)據(jù),此時為了能保證數(shù)據(jù)的安全可靠,需要對NFS服務器實現(xiàn)同步+keepalived高可用滿足企業(yè)業(yè)務需求,如下為NFS+keepalived高可用架構(gòu)實現(xiàn)步驟:

系統(tǒng)環(huán)境:Centos6.9

架構(gòu):

LAP+Discuz+MYSQL+NFS+Keepalived

LAP:192.168.8.2

LAP1:192.168.8.3

MYSQL:192.168.8.5

NFS+Keepalived(主):192.168.8.9

NFS+Keepalived(備):192.168.8.10

實戰(zhàn)操作如下:

LAP端跟LAP1端,執(zhí)行以下命令

[root@localhost ~]# yum -y install httpd httpd-devel php php-mysql php-devel nfs-utils

MYSQL端,執(zhí)行以下命令

[root@localhost ~]# yum -y install mysql mysql-devel mysql-server

NFS(主)端和NFS(備)端,執(zhí)行以下命令

[root@localhost ~]# yum -y install gcc gcc-c++ wget nfs* unzip

NFS(MASTER)端

1)下載Discuz論壇包

[root@localhost ~]# wget -c http://download.comsenz.com/DiscuzX/3.4/Discuz_X3.4_SC_UTF8.zip

2)解壓論壇包

[root@localhost ~]# unzip Discuz_X3.4_SC_UTF8.zip

3)創(chuàng)建共享目錄,拷貝論壇代碼到共享目錄

[root@localhost ~]# mkdir -p /data/xintu

[root@localhost ~]# cd upload/

[root@localhost upload]# cp -a * /data/xintu

1

4)創(chuàng)建NFS配置文件,啟動NFS服務

[root@localhost upload]# echo "/data/xintu *(rw,sync,no_root_squash)" >/etc/exports

[root@localhost upload]# cat /etc/exports

[root@localhost upload]# service rpcbind start

[root@localhost upload]# service nfs start

2

MYSQL端

1)啟動MYSQL服務

[root@localhost ~]# service mysqld start

2)進入MYSQL命令行終端

[root@localhost ~]# mysql

3)創(chuàng)建Discuz庫并授權(quán)

mysql> create database discuz charset=utf8;

mysql> grant all on discuz.* to bbs@'192.168.8.2' identified by '123456';

mysql> grant all on discuz.* to bbs@'192.168.8.3' identified by '123456';

mysql> flush privileges;

3

LAP端

1)查看NFS服務器掛載情況

[root@localhost ~]# showmount -e 192.168.8.9

2)掛載NFS服務器共享目錄到Apache發(fā)布目錄(/var/xintu/html)

[root@localhost ~]# mount -t nfs 192.168.8.9:/data/xintu /var/xintu/html

[root@localhost ~]# df -h

4

3)啟動Apache服務

[root@localhost ~]# service httpd start

4)打開瀏覽器訪問本機IP,配置Discuz論壇

5

5)點擊我同意,出現(xiàn)如下圖

6

6)授權(quán)

[root@localhost ~]# cd /var/xintu/html/

[root@localhost html]# chmod o+w config/ data/ uc_* -R

7

7)點擊下一步

8

8)輸入數(shù)據(jù)庫服務器地址、數(shù)據(jù)庫名、數(shù)據(jù)庫用戶名、數(shù)據(jù)庫密碼,點擊下一步

9

10

11

論壇搭建成功~~~~

LAP1端

只需使用mount命令即可

1)掛載NFS服務器共享目錄到Apache發(fā)布目錄(/var/xintu/html)

[root@localhost ~]# mount -t nfs 192.168.8.9:/data/xintu /var/xintu/html

[root@localhost ~]# df –h

2)啟動Apache服務

[root@localhost ~]# service httpd start

12

3)打開瀏覽器訪問本機IP,如下圖

13

NFS+Keepalived(主)部署

1)安裝keepalived所需要的依賴包

yum -y install openssl openssl-devel popt-devel kernel-devel gcc gcc-c++ libnl libnl-devel libnfnetlink-devel popt wget

2)下載keepalived軟件包

wget -c http://xintu.keepalived.org/software/keepalived-1.2.15.tar.gz

3)解壓

tar zxf keepalived-1.2.15.tar.gz

cd keepalived-1.2.15

4)預編譯keepalived

./configure --prefix=/usr/local/keepalived --with-kernel-dir=/usr/src/kernels/2.6.32-696.16.1.el6.x86_64

5)編譯、安裝keepalived

make && make install

6)創(chuàng)建軟連接,拷貝相應的文件

ln -s /usr/local/keepalived/sbin/keepalived /usr/sbin

cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig

cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d

chkconfig --add keepalived

chkconfig keepalived on

mkdir /etc/keepalived

cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/

7)編輯keepalived(主)配置文件

編輯vim /etc/keepalived/keepalived.conf,配置內(nèi)容如下

! Configuration File for keepalived global_defs { notification_email { 123@qq.com } notification_email_from 123@qq.com smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id LVS_DEVEL } vrrp_script chk_nfs { script "/data/shell/check_nfs.sh" interval 2 weight 2 } vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 51 mcast_src_ip 192.168.8.9 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 1111 } virtual_ipaddress { 192.168.8.99 } track_script { chk_nfs } }

保存退出,啟動keepalived服務

[root@localhost ~]# service keepalived start

14

NFS+Keepalived(備)部署

1)創(chuàng)建共享目錄

[root@localhost ~]# mkdir -p /data/xintu

2)拷貝NFS服務器(主)論壇代碼

[root@localhost ~]# scp -r root@192.168.8.9:/data/xintu/* /data/xintu

3)創(chuàng)建NFS配置文件

[root@localhost ~]# echo "/data/xintu *(rw,sync,no_root_squash)" >/etc/exports

4)安裝keepalived所需要的依賴包

yum -y install openssl openssl-devel popt-devel kernel-devel gcc gcc-c++ libnl libnl-devel libnfnetlink-devel popt wget

5)下載keepalived軟件包

wget -c http://xintu.keepalived.org/software/keepalived-1.2.15.tar.gz

6)解壓

tar zxf keepalived-1.2.15.tar.gz

cd keepalived-1.2.15

7)預編譯keepalived

./configure --prefix=/usr/local/keepalived --with-kernel-dir=/usr/src/kernels/2.6.32-696.16.1.el6.x86_64

8)編譯、安裝keepalived

make && make install

9)創(chuàng)建軟連接,拷貝相應的文件

ln -s /usr/local/keepalived/sbin/keepalived /usr/sbin

cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig

cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d

chkconfig --add keepalived

chkconfig keepalived on

mkdir /etc/keepalived

cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/

10)編輯keepalived(主)配置文件

編輯vim /etc/keepalived/keepalived.conf,配置內(nèi)容如下

! Configuration File for keepalived global_defs { notification_email { 123@qq.com } notification_email_from 123@qq.com smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id LVS_DEVEL } vrrp_script chk_nfs { script "/data/shell/check_nfs.sh" interval 2 weight 2 } vrrp_instance VI_1 { state BACKUP interface eth0 virtual_router_id 51 mcast_src_ip 192.168.8.10 priority 99 advert_int 1 authentication { auth_type PASS auth_pass 1111 } virtual_ipaddress { 192.168.8.99 } track_script { chk_nfs } }

保存退出~~~

11)啟動keepalived服務、NFS服務

[root@localhost ~]# service keepalived start

[root@localhost ~]# service rpcbind start

[root@localhost ~]# service nfs start

12)LAP端跟LAP1端分別重新掛載NFS共享目錄(VIP),執(zhí)行以下命令

[root@localhost ~]# umount /var/xintu/html

[root@localhost ~]# mount -t nfs 192.168.8.99:/data/xintu /var/xintu/html

15

13)分別訪問LAP和LAP1

16

17

14)分別在NFS主和備機器上編寫主備切換腳本,實現(xiàn)當主(備)的NFS服務宕機自動切換到備(主)機器上

[root@localhost ~]# mkdir -p /data/shell

[root@localhost ~]# vim /data/shell/check_nfs.sh,腳本內(nèi)容如下

#!/bin/bash#auto check nfs processNUM=`ps -ef |grep nfs|grep -v grep|grep -v check|wc -l`if[[ $NUM -eq 0 ]];then/etc/init.d/keepalived stopfi

[root@localhost ~]# chmod o+x /data/shell/check_nfs.sh

15)實驗測試

正常運行,VIP在NFS主機器上,當NFS服務器宕機之后自動漂移到備機器上,如下圖

18

19

16)但是打開論壇是出現(xiàn)403,如下圖

20

17)需要umount /var/xintu/html,再執(zhí)行mount -t nfs 192.168.8.99:/data/xintu /var/xintu/html,chmod o+w data/ config/ uc_* -R即可

21

到此結(jié)束,謝謝支持

掃描二維碼推送至手機訪問。

版權(quán)聲明:本文由信途科技轉(zhuǎn)載于網(wǎng)絡,如有侵權(quán)聯(lián)系站長刪除。

轉(zhuǎn)載請注明出處http://macbookprostickers.com/xintu/11221.html

相關(guān)文章

關(guān)于綿陽網(wǎng)站制作的信息

本篇文章信途科技給大家談談綿陽網(wǎng)站制作,以及對應的知識點,希望對各位有所幫助,不要忘了收藏本站。 本文導讀目錄: 1、綿陽市昌瑞科技有限公司怎么樣? 2、綿陽覽眾網(wǎng)絡技術(shù)有限公司怎么樣? 3、...

合肥關(guān)鍵詞排名首頁(合肥關(guān)鍵詞自動排名)

就在今天,合肥的二手房掛牌量正式突破9萬套大關(guān)。根據(jù)貝殼的二手房數(shù)據(jù)顯示,目前該平臺在售的二手房房源達到了90056套。合肥二手房掛牌量突破9萬大關(guān)9萬套大概是什么樣的概念,以合肥行情較好的去年上半年...

南通網(wǎng)站建設(shè)公司,南通網(wǎng)絡是什么

南通網(wǎng)絡是什么由南通日報社主辦的南通網(wǎng),是與南通日報和江海晚報鼎足而立的傳媒服務與經(jīng)營平臺,是立足南通、面向長三角的區(qū)域性綜合門戶網(wǎng)站。 南通網(wǎng)以資訊為主導,以服務為支撐,以活動為平臺,致力打造南通最...

外貿(mào)自建站還是b2b(外貿(mào)自建站的推廣方式)

在做外貿(mào)推廣當中,很多人糾結(jié)是用外貿(mào)自建站,還是B2B平臺站好,關(guān)于這個問題,我們可以分析它們的優(yōu)劣點! shopyy外貿(mào)建站平臺指出,一般來說,外貿(mào)自建站,即我們所謂的外貿(mào)獨立站;B2B平臺站,就...

濟南關(guān)鍵詞排名首頁(關(guān)鍵詞排名優(yōu)化)

把整治“靠路吃路”問題放在更加突出的位置,堅持以零容忍態(tài)度懲治腐敗,保持鐵路反腐敗的高壓態(tài)勢。文 | 海上客近階段,“打虎”不停。3月25日,中央紀委國家監(jiān)委網(wǎng)站發(fā)布消息,盛光祖涉嫌嚴重違紀違法,目前...

關(guān)鍵詞排名不穩(wěn)定的因素有哪些呢(天津關(guān)鍵詞排名不穩(wěn)定價格)

關(guān)鍵詞的索引、優(yōu)化時間的長短、網(wǎng)站的內(nèi)部布局、外鏈的建設(shè)等都會影響到SEO關(guān)鍵詞的排名,所以在優(yōu)化過程中要更加關(guān)注這些方面。中小網(wǎng)站要想優(yōu)化排名,必須對癥下藥,因此網(wǎng)站診斷和準確的關(guān)鍵詞選擇非常重要。...

現(xiàn)在,非常期待與您的又一次邂逅

我們努力讓每一次邂逅總能超越期待

  • 效果付費
    效果付費

    先出效果再付費

  • 極速交付
    極速交付

    響應速度快,有效節(jié)省客戶時間

  • 1對1服務
    1對1服務

    專屬客服對接咨詢

  • 持續(xù)更新
    持續(xù)更新

    不斷升級維護,更好服務用戶