forked from vxtools/beetle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_linux.sh
executable file
·52 lines (42 loc) · 1.24 KB
/
install_linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
source .config
function printh {
echo -e "$(date) : $@"
}
[[ ! -d /opt/beetle ]] && { echo "beetle was not installed on /opt directory. please reinstall on /opt and retry..." ; exit 255 ;}
# Configure the repo
#
printh "Copying the custom yum repository....."
cp -pr $REPOSRC $REPODIR
# Install the required packages
#
printh "Installing the required utilities....."
$YUM sysfsutils lsscsi sysstat java libaio-devel zlib-devel ipmitool sg3_utils net-tools wget pciutils > $YLOG
# Install and Configure multipath
#
printh "Checking for multipath install...."
mstatus=$(rpm -qa |grep multipath|wc -l)
if [[ $mstatus -eq 0 ]]
then
printh "Install and configure multipath....."
$YUM device-mapper-multipath >> $YLOG
cp -r $MPSRC $MPDIR
systemctl enable multipathd
systemctl start multipathd
else
printh "multipath software exists, ${RD}PLEASE APPEND${NC} following lines to /etc/multipath.conf ..."
cat $MPSRC
fi
# Installation of FIO
#
printh "Installing FIO....."
$YUM fio >> $YLOG
# Configure the required udev rules.
#
printh "Copying Schedule rules file....."
cp -pr $UDEVSRC $UDEVDIR
udevadm control --reload ; udevadm trigger
# Cleanup
#
printh "INSTALLATION COMPLETED, logfile : $YLOG ...... CLEANING UP ...."
rm $REPODIR/$(basename $REPOSRC)