您好,登錄后才能下訂單哦!
Master ? ? ? ?192.168.1.101
logserver ? ? 192.168.1.102
存儲(chǔ)節(jié)點(diǎn) ? ?192.168.1.103
存儲(chǔ)節(jié)點(diǎn) ? ?192.168.1.104
測(cè)試客戶機(jī) ?192.168.1.10
hostnamectl set-hostname
su
----搭建Master server-------
#關(guān)閉防火墻
systemctl stop firewalld.service
yum -y install zlib-devel gcc gcc-c++
#獲取壓縮包
wget http://123.56.134.27/pub/package/mfs/mfs-1.6.27-5.tar.gz
useradd mfs -s /sbin/nologin
tar zxvf mfs-1.6.27-5.tar.gz
cd mfs-1.6.27/
./configure \
--prefix=/usr/local/mfs \
--with-default-user=mfs \
--with-default-group=mfs \
--disable-mfschunkserver \
--disable-mfsmount
#上面的為關(guān)閉節(jié)點(diǎn)服務(wù)功能跟客戶端功能
make -j8 && make install
cd /usr/local/mfs/etc/mfs/
cp mfsmaster.cfg.dist mfsmaster.cfg ? ? ? ? ? ? ? ? #主配置文件
cp mfsexports.cfg.dist mfsexports.cfg ? ? ? ? ? ? ? #權(quán)限設(shè)置的配置文件 ?
cp mfsmetalogger.cfg.dist mfsmetalogger.cfg ? ?#日志的配置文件 ? ? ?
cd /usr/local/mfs/var/mfs/
cp metadata.mfs.empty metadata.mfs ? ? ? ? ? ? ?#源數(shù)據(jù)文件,需要開(kāi)放
/usr/local/mfs/sbin/mfsmaster start ? ? ? ? #啟動(dòng)mfs服務(wù)
ps -ef |grep mfs
/usr/local/mfs/sbin/mfsmaster start -s ? ? ?#關(guān)閉mfs服務(wù)
------------搭建MetaLogger server---------
JnxmbCLT66C- Dcc
默認(rèn)為24小時(shí),即每隔一-天從元數(shù)據(jù)服務(wù)器MASTER下載-一個(gè)metadata.
當(dāng)元數(shù)據(jù)服務(wù)器關(guān)閉或者出故障時(shí),matedata.mfs.back文件將消失,
那么要恢復(fù)整個(gè)mfs, 則需從metalogger 服務(wù)器取得該文件。
請(qǐng)?zhí)貏e注意這個(gè)文件,它與日志文件一. 起,
才能夠恢復(fù)整個(gè)被損壞的分布式文件系統(tǒng)。
useradd mfs -s /sbin/nologin
yum -y install zlib-devel gcc gcc-c++
#獲取壓縮包
wget http://123.56.134.27/pub/package/mfs/mfs-1.6.27-5.tar.gz
tar zxvf mfs-1.6.27-5.tar.gz
cd mfs-1.6.27/
./configure \
--prefix=/usr/local/mfs \
--with-default-user=mfs \
--with-default-group=mfs \
--disable-mfschunkserver \
--disable-mfsmount
make -j8 && make install
cd /usr/local/mfs/etc/mfs/
cp mfsmetalogger.cfg.dist mfsmetalogger.cfg
cd /usr/local/mfs/etc/mfs/
vim mfsmetalogger.cfg
15 MASTER_HOST = 192.168.1.101
/usr/local/mfs/sbin/mfsmetalogger start
ps -ef |grep mfs
---------搭建存儲(chǔ)節(jié)點(diǎn)chunkserver---------注意:兩臺(tái)機(jī)子同樣的操作
systemctl stop firewalld.service
setenforce 0
yum -y install zlib-devel gcc gcc-c++
useradd mfs -s /sbin/nologin
wget http://123.56.134.27/pub/package/mfs/mfs-1.6.27-5.tar.gz
tar zxvf mfs-1.6.27-5.tar.gz
cd mfs-1.6.27/
./configure \
--prefix=/usr/local/mfs \
--with-default-user=mfs \
--with-default-group=mfs \
--disable-mfsmaster \
--disable-mfsmount
make -j16 && make install
cd /usr/local/mfs/etc/mfs/
cp mfschunkserver.cfg.dist mfschunkserver.cfg
cp mfshdd.cfg.dist mfshdd.cfg
vim mfschunkserver.cfg
12 MASTER_HOST = 192.168.1.101
vim mfshdd.cfg
? 6 /data
mkdir /data
chown -R mfs:mfs /data/
/usr/local/mfs/sbin/mfschunkserver start
-------------客戶端配置------------
systemctl stop firewalld.service
setenforce 0
yum -y install zlib-devel gcc gcc-c++
wget http://123.56.134.27/pub/package/mfs/fuse-2.9.2.tar.gz
tar zxvf fuse-2.9.2.tar.gz
cd fuse-2.9.2/
./configure
make && make install
vim /etc/profile
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PAG_CONFIG_PATH
source /etc/profile
##安裝mfs客戶端
useradd mfs -s /sbin/nologin
wget http://123.56.134.27/pub/package/mfs/mfs-1.6.27-5.tar.gz
tar zxvf mfs-1.6.27-5.tar.gz
cd mfs-1.6.27/
./configure \
--prefix=/usr/local/mfs \
--with-default-user=mfs \
--with-default-group=mfs \
--disable-mfsmaster \
--disable-mfschunkserver \
--enable-mfsmount
make -j4 && make install
mkdir /mnt/mfs
modprobe fuse
/usr/local/mfs/bin/mfsmount /mnt/mfs -H 192.168.1.101
df -hT
umont /mnt/mfs
####優(yōu)化客戶端###
vim /etc/profile
export PATH=/usr/local/mfs/bin:$PATH
source /etc/profile
mfsgetgoal -r /mnt/mfs/ ? ? ? ? 復(fù)制一份副本
/mnt/mfs/:
directories with goal ?1 : ? ? ? ? ?1
---------MASTER-server---啟動(dòng)監(jiān)控程序--
在master上面部署
/usr/local/mfs/sbin/mfscgiserv
http://192.168.1.101:9425/ ?查看節(jié)點(diǎn)的監(jiān)控
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。