centos6.7 mutlipath install script

#!/bin/bash

if [ `id -g` != 0 ] ;then

echo -e "\033[31m Please use root user\033[0m"
exit 1
fi
rpm -qa |grep multipath >/var/log/mapper.log 2>&1
if [ $? = 0 ];then
echo -e "\033[31mERROR : Please check multipath is already installed \033[0m "
exit 7
fi

rpm -ivh --test device-mapper-multipath-0.4.9-87.el6.x86_64.rpm device-mapper-multipath-libs-0.4.9-87.el6.x86_64.rpm >>/var/log/mapper.log 2>&1
if [ $? = 0 ];then

rpm -ivh device-mapper-multipath-0.4.9-87.el6.x86_64.rpm device-mapper-multipath-libs-0.4.9-87.el6.x86_64.rpm >>/var/log/mapper.log 2>&1
else
echo -e "\033[31m ERROR : Test install is not successful , Please view the mapper log /var/log/mapper.log \033[0m"
exit 8
fi
if [ $? = 0 ];then
chkconfig multipathd on &&
service multipathd start >>/var/log/mapper.log 2>&1 &&
cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/multipath.conf >>/var/log/mapper.log 2>&1
multipath -F >>/var/log/mapper.log 2>&1 && multipath -v2 >>/var/log/mapper.log 2>&1 && multipath -ll >>/var/log/mapper.log 2>&1
else
echo -e "\n \033[31m ERROR : Install Error,Please Check!! or view the mapper.log /var/log/mapper.log \033[0m \n"
exit 9
fi

时间: 2024-10-13 04:07:58

centos6.7 mutlipath install script的相关文章

webpacke install vue application 报错 Failed at the [email protected] install script

刚刚在网上下了个开源的项目: https://github.com/ing670/webappkiller 执行npm install 报错:npm ERR! Failed at the [email protected] install script 'node install.js'. 直接在项目根目录执行:npm install phantomjs-prebuilt -save 安装缺少的类库. 再次安装成功!

Cloudinsight Agent install script

#!/bin/bash # Cloudinsight Agent install script. set -e logfile="ci-agent-install.log" gist_request=/tmp/agent-gist-request.tmp gist_response=/tmp/agent-gist-response.tmp if [ $(command -v curl) ]; then cl_cmd="curl -f" else cl_cmd=&qu

Open-Falcon install script(Open-Falcon监控一键安装脚本)

#!/bin/bash #This is Open-Falcon install script #Data is 2018/1/10 #Editer Zhanxing  #本脚本使用Red 7和CentOS 7系统安装Open-Falcon install_preparation() { yum install -y wget vim yum install -y git  pip epel-release golang  redis  python get-pip.py pip install

Centos6.6 kvm install

一.安装kvm 1.先在blos中,开启vt-d功能 2.检查vmx看,是否开启vt-d [[email protected] ~]# egrep --color '(vmx|svm)' /proc/cpuinfoflags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp l

Zabbix agentd install Script

#!/bin/bashecho "nameserver 8.8.8.8\nnameserver 8.8.4.4" >/etc/resolv.conf/sbin/iptables -Fchkconfig iptables offsed -i '/^SELINUX=/s/enforcing/disabled/' /etc/sysconfig/selinuxsed -i '/^SELINUX=/s/enforcing/disabled/' /etc/selinux/configsete

php7 install script

./configure --prefix=/home/admin/local/php7 --with-gd=/home/admin/local/libgd-2.1.1/ --with-jpeg-dir=/home/admin/local/jpeg/ --w ith-png-dir=/home/admin/local/libpng/ --with-freetype-dir=/home/admin/local/freetype/ --with-pdo-mysql=/home/admin/local/

zabbix 2.4 install script under the OS of Ubuntu

#!/bin/bashecho "-----------------------start install zabbix----------------------"wget http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_2.4-1+trusty_all.debdpkg -i zabbix-release_2.4-1+trusty_all.debapt-get upd

centos6 yum 安装 install c++4.8 gcc4.8

cd /etc/yum.repos.d wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc devtoolset-1.1-gcc-c++ This will install it most likely into /opt/centos/devtoolset-1.1/root/usr/b

mysql install script under the OS of Ubuntu

#!/bin/bash echo "-----------------------start install mysql----------------------" apt-get install make cmake libncurses5-dev bison g++ mkdir -p /data/mysql/dbdata if [ `grep "mysql" /etc/passwd | wc -l` -eq 0 ];then echo "adding