Last active
August 28, 2018 22:18
-
-
Save 19wolf/ad8df74e20b0f9629657ea14e424fd7c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Lizard Chunkserver | |
# install wget | |
apt install wget -y; | |
# get packages and untar them | |
cd /tmp; | |
wget https://lizardfs.com/wp-content/uploads/2018/07/lizardfs-bundle-Debian-9.4.tar &&\ | |
tar xf lizardfs-bundle-Debian-9.4.tar; | |
cd lizardfs-bundle-Debian-9.4; | |
# install common, master, and webserver | |
dpkg -i lizardfs-common_3.13.0_amd64.deb lizardfs-chunkserver_3.13.0_amd64.deb; | |
apt install -fy; | |
dpkg -i lizardfs-common_3.13.0_amd64.deb lizardfs-chunkserver_3.13.0_amd64.deb; | |
# create config files | |
cd /etc/mfs; | |
cp mfshdd.cfg.dist mfshdd.cfg | |
cp mfschunkserver.cfg.dist mfschunkserver.cfg | |
# edit config, assumes /data is the data drive. Set this to wherever your drives are, one drive per line. | |
echo "/data/" >> mfshdd.cfg | |
# Data directory must be owned by 'mfs' | |
mkdir /data | |
chown -R mfs:mfs /data | |
chown -R mfs:mfs /var/lib/mfs # lock file location as specified in mfschunkserver.cfg | |
# enable and start chunkserver | |
systemctl enable lizardfs-chunkserver; | |
systemctl start lizardfs-chunkserver; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Lizard Master | |
# install wget | |
apt install wget -y; | |
# get packages and untar them | |
cd /tmp; | |
wget https://lizardfs.com/wp-content/uploads/2018/07/lizardfs-bundle-Debian-9.4.tar &&\ | |
tar xf lizardfs-bundle-Debian-9.4.tar; | |
cd lizardfs-bundle-Debian-9.4; | |
# install common, master, and webserver | |
dpkg -i lizardfs-common_3.13.0_amd64.deb lizardfs-master_3.13.0_amd64.deb lizardfs-cgiserv_3.13.0_amd64.deb; | |
apt install -fy; | |
dpkg -i lizardfs-common_3.13.0_amd64.deb lizardfs-master_3.13.0_amd64.deb lizardfs-cgiserv_3.13.0_amd64.deb; | |
# create config files | |
cd /etc/mfs; | |
cp mfsmaster.cfg.dist mfsmaster.cfg; | |
cp mfstopology.cfg.dist mfstopology.cfg; | |
cp mfsgoals.cfg.dist mfsgoals.cfg; | |
cp mfsexports.cfg.dist mfsexports.cfg; | |
# Mark this as the 'master', change this to 'shadow' for shadow servers | |
sed 's/# PERSONALITY = master/PERSONALITY = master/' mfsmaster.cfg; | |
# make other edits to any of these files if desired, not necessary | |
cp /var/lib/mfs/metadata.mfs.empty /var/lib/mfs/metadata.mfs; | |
# hostname must be "mfsmaster" unless you do other config in the other servers | |
hostname mfsmaster; | |
echo "mfsmaster" > /etc/hostname; | |
# enable and start master and webserver | |
systemctl enable lizardfs-master; | |
systemctl enable lizardfs-cgiserv; | |
systemctl start lizardfs-master; | |
systemctl start lizardfs-cgiserv; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment