Pages

Saturday 14 September 2013

auto.sh sedis.sh

auto.sh



#!/bin/bash

yum update -y
yum install ntp wget gcc make flex -y
chkconfig ntpd on
chkconfig iptables off
chkconfig ip6tables off
cd ~
./sedis.sh
echo -e "10.0.0.10 node1" >> /etc/hosts
echo -e "10.0.0.20 node2" >> /etc/hosts
echo "Installing drbd and kmod-drbd84"
rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
yum -y install drbd kmod-drbd84
wget http://oss.linbit.com/drbd/8.4/drbd-8.4.3.tar.gz
tar -xzf drbd-8.4.3.tar.gz
cd drbd-8.4.3
./configure
make
make install
modprobe drbd
echo "rebooting..."
reboot
 


sedis.sh

 #!/bin/bash

FILE=/etc/sysconfig/selinux

echo "disabling SELinux"
echo "making backup to /tmp/"
cp $FILE /tmp

cat << EOF > $FILE
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
EOF

echo "done!"

echo "Please notice that this will not become effective until the server is rebooted"

2 comments:

  1. շնորհակալությու էջը ստեղծողին, այն բավականին շատ օգնեց ինձ !!

    ReplyDelete
  2. barev dzez es tan@ porcum em networking sovorel,kardacel em
    CompTIA Network+ study guide bayc uzum em aveli xoracnel inch grqer xorurd ktaq?

    ReplyDelete