This repository was archived by the owner on Sep 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
57 lines (46 loc) · 1.6 KB
/
install.sh
File metadata and controls
57 lines (46 loc) · 1.6 KB
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
#!/bin/bash
##
# This script was not tested. Do not use in production!
##
adduser --quiet --system --no-create-home --group serveradmin
mkdir -p /opt/serveradmin/storage/logs /opt/serveradmin/public
apt update -y
apt full-upgrade -y
apt install -y software-properties-common python-software-properties
# UFW
apt install -y ufw
# MariaDB
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu xenial main'
apt update -y
apt install -y mariadb-server
# CONF
# Bind9
apt install -y bind9 bind9utils
# CONF
# Postfix, Dovecot
apt install -y postfix postfix-mysql dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-mysql
# CONF
chmod o-rwx /etc/postfix/mysql-virtual-*
mkdir -p /var/mail/vhosts/
groupadd -g 5000 vmail
useradd -g vmail -u 5000 vmail -d /var/mail
chown -R vmail:vmail /var/mail
# Nginx, PHP 7.1
add-apt-repository -y ppa:ondrej/php
add-apt-repository -y ppa:nginx/stable
apt update -y
apt --purge remove 'apache2*'
apt install -y nginx php7.1 php7.1-cli php7.1-fpm php7.1-curl php7.1-xml php7.1-zip php7.1-gd php7.1-mysql php7.1-mbstring
rm /etc/nginx/sites-available/*
rm /etc/nginx/sites-enabled/*
rm /etc/php/7.1/fpm/pool.d/*
# CONF
ln -s /etc/nginx/sites-available/serveradmin.conf /etc/nginx/sites-enabled/serveradmin.conf
# ServerAdmin
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
cd /opt/serveradmin
chown -R serveradmin:serveradmin .
sudo -u serveradmin composer install
sudo -u serveradmin php artisan migrate