forked from usmannasir/cyberpanel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·66 lines (64 loc) · 2.1 KB
/
install.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
install-ubuntu()
{
#!/bin/bash
#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
#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
apt-get clean all
apt-get update -y
apt-get install 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
apt-get install python -y
apt-get install git -y
if [ ! -d cyberpanel ]; then
git clone https://github.com/rperper/cyberpanel.git
fi
cd cyberpanel
cd install
chmod +x install.py
server_ip="$(wget -qO- http://whatismyip.akamai.com/)"
python install.py $server_ip
exit $?
}
if [ -a /etc/lsb-release ]; then
install-ubuntu
exit $?
fi
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
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
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/)"
python install.py $server_ip