gluster 安裝配置基本指南
**1、 rpm安裝
複製gluster中的core 和 fuse模組,並進行安裝。
rpm –ivh glusterfs-core-3.1.3-1.x86_64.rpm
rpm –ivh glusterfs-fuse-3.1.3-1.x86_64.rpm
2、 fuse測試並檢查
lsmod | grep fuse
假如沒有, 使用命令
modprobe fuse
lsmod | grep fuse
使用 ls /dev/fuse,應該有 /dev/fuse 這個目錄
首先,我們假定我們的gluster伺服器安裝在192.168.1.2上
mkdir /home/dir1 //輸出路徑
chmod 1777 /home/dir1
//修改許可權
1. cd /etc/glusterfs
在目錄下有兩個檔案:
glusterfsd.vol.sample
伺服器端配置檔案模版
glusterfs.vol.sample
客戶端配置檔案模版
2. cp glusterfsd.vol.sample glusterfsd.vol
拷貝出乙個伺服器端配置檔案出來,修改配置用。
2.1 編輯glusterfsd.vol
主要是修改 directory, transport.socket.bind-address 兩項。
也可以設定下 auth.addr.brick.allow, 埠等
volume brick
type storage/posix # posix fs translator
option transport.socket.bind-address 192.168.1.2
option directory /home/dir1 # export this directory
end-volume
volume server
type protocol/server
option transport-type tcp
option transport.socket.listen-port 24016
subvolumes brick
option auth.addr.brick.allow * # allow access to "brick" volume
end-volume
glusterfsd -f /etc/glusterfs/glusterfsd.vol -l /var/log/glusterfs/glusterfsd.log
3.1 檢查服務是否啟動成功
ps ax | grep gluster
檢視程序
檢驗埠, 如果已經設定了埠, 例如
netstat -ln | grep 24016
顯示如下則說明 24016 埠處在監聽狀態
tcp 0 0 192.168.1.2:24016 0.0.0.0:* listen
檢視 log
vi /var/log/glusterfs/glusterfsd.log
沒有error資訊就ok
使用下面的命令進行配置cp glusterfs.vol.sample glusterfs.vol
配置檔案的編輯相對來講比較複雜,這要涉及到gluster伺服器的拓撲結構,我們以下面的拓撲結構來進行說明:
在上面拓撲圖中,其中001_1和001_2是複製方式,002_1和002_2是複製方式,而這兩組是分布式儲存的,這樣相當於集群中的raid0+raid1方式,很好的資料的安全性和高效性。對於這種情況,client001的配置為
# 伺服器列表
volume server001_1
type protocol/client
option transport-type tcp
option remote-host 192.168.1.11
# ip address of the remote brick
option remote-subvolume brick
# name of the remote volume
end-volume
volume server 001_2
type protocol/client
option transport-type tcp
option remote-host 192.168.1.12
# ip address of the remote brick
option remote-subvolume brick
# name of the remote volume
end-volume
volume server 002_1
type protocol/client
option transport-type tcp
option remote-host 192.168.1.21
# ip address of the remote brick
option remote-subvolume brick
# name of the remote volume
end-volume
volume server 002_2
type protocol/client
option transport-type tcp
option remote-host 192.168.1.22
# ip address of the remote brick
option remote-subvolume brick
# name of the remote volume
end-volume
#伺服器之間的關係
volume images001
type cluster/distribute
subvolumes server001_1 server001_2
end-volume
volume images002
type cluster/replicate
subvolumes server002_1 server002_2
end-volume
volume images
type cluster/distribute
subvolumes images001 images002
end-volume
glusterfs -f /etc/glusterfs/glusterfs.vol -l /var/log/glusterfs/glusterfs.log /mnt/
其中 /mnt 是掛載目錄, 可指定其他目錄
檢視碟符資訊:df –h;包含如下資訊表示正常,/etc/glusterfs/glusterfs.vol
檢視程序ps ax | grep glusterfs,如果有表示正確
檢視 log,vi /var/log/glusterfs/glusterfs.log;如果沒有 error 資訊,表示連線正確。
進入/mnt目錄,這是就可以在該目錄下進行檔案級別的操作, 然後可以檢視 伺服器端的 /home/dir1目錄下是否有相應變化。
解除安裝時候 umount /mnt 命令,umount 之後 ps ax | grep gluster 會發現 glusterfs 程序結束。
Nexus安裝配置指南
nexus 提供兩種安裝包,一種是包含 jetty 容器的 bundle 包,另一種是不包含容器的 war 包。解壓至任意目錄。解壓後進入 nexus 2.1.2 bundle nexus 2.1.2 bin jsw 根據作業系統型別選擇資料夾。當前安裝的系統是windows x86 64,選的是w...
zookeeper 安裝配置指南
1 在namenode機器下,配置zookeeper,先解壓安裝包,使用命令 2.進入zookeeper的配置目錄,首先把zoo sample.cfg重新命名一下,可以重新複製一遍,使用命令 3.gedit zoo.cfg 新增如下內容 4.把zookeeper分別遠端拷貝datanode1,dat...
mosquitto mqtt 安裝 配置指南
1.安裝外部依賴 1.1 yum 安裝依賴 yum install openssl devel yum install c ares devel yum install libuuid devel yum install gcc 2.安裝mosquitto例項 wget 2.2 解壓 tar zxv...