2018-03-10 22:53:09 +01:00
|
|
|
#!/bin/bash
|
2018-10-26 09:52:07 -04:00
|
|
|
if [ -a /etc/lsb-release ]; then
|
|
|
|
|
if [ ! -x ./install-ubuntu.sh ]; then
|
|
|
|
|
echo "Download install-ubuntu.sh and make it executable"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
echo "Running Ubuntu install"
|
|
|
|
|
./install-ubuntu.sh
|
|
|
|
|
exit $?
|
|
|
|
|
fi
|
2018-03-14 01:04:42 +01:00
|
|
|
yum autoremove epel-release -y
|
|
|
|
|
rm -f /etc/yum.repos.d/epel.repo
|
|
|
|
|
rm -f /etc/yum.repos.d/epel.repo.rpmsave
|
|
|
|
|
yum install epel-release -y
|
|
|
|
|
#some provider's centos7 template come with incorrect or misconfigured epel.repo
|
2018-04-10 00:44:10 +02:00
|
|
|
if systemctl is-active named | grep -q 'active'; then
|
|
|
|
|
systemctl stop named
|
|
|
|
|
systemctl disable named
|
|
|
|
|
echo "Disabling named to aviod powerdns conflicts..."
|
|
|
|
|
else
|
|
|
|
|
echo "named is not installed or active, to next step..."
|
|
|
|
|
fi
|
|
|
|
|
# above if will check if server has named.service running that occupies port 53 which makes powerdns failed to start
|
2018-03-10 22:53:09 +01:00
|
|
|
yum clean all
|
|
|
|
|
yum update -y
|
|
|
|
|
yum install wget which curl -y
|
|
|
|
|
setenforce 0
|
|
|
|
|
sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config
|
|
|
|
|
wget https://cyberpanel.net/install.tar.gz
|
|
|
|
|
tar xzvf install.tar.gz
|
|
|
|
|
cd install
|
|
|
|
|
chmod +x install.py
|
|
|
|
|
server_ip="$(wget -qO- http://whatismyip.akamai.com/)"
|
2018-03-14 01:04:42 +01:00
|
|
|
python install.py $server_ip
|