-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
53 lines (45 loc) · 1.71 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
#!/bin/bash
# $1 as a secure password for configuration
echo -------------------------------
echo ----- My Panel Installer ------
echo ----- By SrsX @ VPSBoard ------
echo ----- Version: v1.0-beta ------
echo -------------------------------
echo --------------------------------
echo ----- Supported OS: Ubuntu -----
echo ----- Coming soon: CentOs -----
echo ----- Coming soon: Debian -----
echo --------------------------------
echo ---------------------------------
echo ----- Starting Installation -----
echo ---------------------------------
# Create a account to store files - isolated from root
useradd -d /home/mypanel_main -m mypanel_main -p $1
echo Created mypanel_main account with password $1
mkdir /home/mypanel_main/public_html
wget https://github.com/SrsX/MyPanel/archive/master.zip
cp -r master.zip /home/mypanel_main/public_html
cd /home/mypanel_main/public_html
unzip master.zip
rm -rf README.md
cd ~
if [ "$2" == "apache" ]; then
echo Using apache
apt-get install apache2 php5 php5-mysql php-pear php5-dev phpmyadmin
/etc/init.d/apache2 stop # incase running already
/etc/init.d/apache2 start # start apache2
else
echo Using nginx
apt-get install nginx
apt-get install mysql-server mysql-client
apt-get install php5-fpm
apt-get install phpmyadmin
/etc/init.d/nginx stop # incase its running already
/etc/init.d/nginx start # start nginx
echo --- Note: May require manual configuration ---
fi
echo ------------------------------------------------------------
echo ---- Installation has been completed ----
echo ---- Please ensure to lockdown MySQL with a Password ----
echo ---- Please ensure to update the configuration.php file ----
echo ------------------------------------------------------------