wip webserver sequence
This commit is contained in:
57
seqs/webserver.sh
Executable file
57
seqs/webserver.sh
Executable file
@@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
serverName="nginx"
|
||||||
|
databaseName="mariadb"
|
||||||
|
phpPackages="php7.0-fpm php7.0-json php7.0-mysql php7.0-curl php7.0-intl php7.0-mcrypt php7.0-gd php7.0-zip php7.0-xml php7.0-mbstring php-imagick php-apcu"
|
||||||
|
|
||||||
|
step_1_info() { echo "Installation of $serverName and $databaseName"; }
|
||||||
|
step_1_alias() { ALIAS=install; }
|
||||||
|
step_1() {
|
||||||
|
apt update
|
||||||
|
apt install nginx mariadb-server mariadb-client
|
||||||
|
echo
|
||||||
|
echo "If nginx isn't starting comment the following line in /etc/nginx/sites-available/default"
|
||||||
|
read -p "Press Enter to open"
|
||||||
|
vi /etc/nginx/sites-available/default
|
||||||
|
}
|
||||||
|
|
||||||
|
step_2_info() { echo "Secure mariadb installation"; }
|
||||||
|
step_2() {
|
||||||
|
mysql_secure_installation
|
||||||
|
}
|
||||||
|
|
||||||
|
step_3_info() { echo "Installation of PHP7.0"; }
|
||||||
|
step_3() {
|
||||||
|
apt install $phpPackages
|
||||||
|
}
|
||||||
|
|
||||||
|
phpFpmConfigLocation="/etc/php/7.0/fpm/conf.d/90-custom_pi.ini"
|
||||||
|
phpFpmConfig="\
|
||||||
|
post_max_size=64M
|
||||||
|
max_execution_time=600
|
||||||
|
|
||||||
|
apc.enable_cli=1
|
||||||
|
|
||||||
|
date.timezone = Europe/Berlin
|
||||||
|
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.interned_strings_buffer=8
|
||||||
|
opcache.max_accelerated_files=10000
|
||||||
|
opcache.memory_consumption=128
|
||||||
|
opcache.save_comments=1
|
||||||
|
opcache.revalidate_freq=1"
|
||||||
|
|
||||||
|
phpCliConfigLocation="/etc/php/7.0/cli/conf.d/90-custom_pi.ini"
|
||||||
|
phpCliConfig="\
|
||||||
|
date.timezone = Europe/Berlin"
|
||||||
|
|
||||||
|
step_4_info() { echo "Configuration of PHP"; }
|
||||||
|
step_4() {
|
||||||
|
echo "$phpFpmConfig" > "$phpFpmConfigLocation"
|
||||||
|
echo "$phpCliConfig" > "$phpCliConfigLocation"
|
||||||
|
service php7.0-fpm restart
|
||||||
|
}
|
||||||
|
|
||||||
|
VERSION_SEQREV=2
|
||||||
|
. sequencer.sh
|
Reference in New Issue
Block a user