- 48 Views
- 23/08/2024
How to install gluster-server on centos 7
GlusterFS
Add new hard disk and format with preferred file system
first, add new hard drive with the same capacity
on both servers, update /etc/hosts:
192.168.1.4 mail2
add new disk on mail1:
type 'n', and hit enter for next question, (don't forget to write) hit 'w'
/sbin/mkfs.ext4 /dev/sdb1
mkdir /glusterfs1
Update /etc/fstab:
remount all:
add new disk on mail2:
type 'n', and hit enter for next question, (don't forget to write) hit 'w'
/sbin/mkfs.ext4 /dev/sdb1
mkdir /glusterfs2
Update /etc/fstab:
remount all
Install and Configure GulsterFS
on both servers (mail1 & mail2):
yum -y install centos-release-gluster38.noarch
yum -y install glusterfs glusterfs-fuse glusterfs-server
activate the service
systemctl start glusterd.service
disabling firewall
systemctl disable firewalld.service
on mail1:
on mail2:
you can check status with command below:
ONLY on mail1:
gluster volume start mailrep-volume
check it
create folder for vmail and mount glusterfs to vmail folder
on mail1:
mount.glusterfs mail1:/mailrep-volume /var/vmail/
Update /etc/fstab
remount all
check it
on mail2:
mount.glusterfs mail2:/mailrep-volume /var/vmail/
Update /etc/fstab:
remount all
check it
you can test it by creating some files on one of your mail servers
make sure it syncs, by checking files on both servers
Note:
if output No package centos-release-gluster38.noarch available.
Please run command bellow:
sudo yum install glusterfs-server
Or
sudo yum install glusterfs-server
Thanks for visit my website