#!/bin/sh echo -e ' _ | |___ _ __ _ __ | / -_) ' \| '_ \ |_\___|_|_|_| .__/ |_| ' echo -e "LEMP server (Nginx Mysql Php-fpm)" . bin/checkroot.sh # get the current position _cwd="$(pwd)" # check for assets forlder _assets="$_cwd/assets" if [ ! -d "$_assets" ]; then _assets="$_cwd/../assets" if [ ! -d "$_assets" ]; then echo "!! can't find assets directory !!" exit fi fi sleep 2 echo -e ' _ _ __ _ _ ___ __ _| | | . \ || (_- /etc/nginx/sites-available/phpmyadmin.conf # ln -s /etc/nginx/sites-available/phpmyadmin.conf /etc/nginx/sites-enabled/phpmyadmin.conf # # # echo -e "securing phpMyAdmin" # # sed -i "s/DirectoryIndex index.php/DirectoryIndex index.php\nAllowOverride all/" # # cp "$_assets"/phpmyadmin_htaccess > /usr/share/phpmyadmin/.htaccess # # echo -n "define a user name for phpmyadmin : " # # read un # # htpasswd -c /etc/phpmyadmin/.htpasswd $un # # service apache2 restart # echo -e "phpMyAdmin installed" # echo -e "You can access it at yourip/phpmyadmin" echo -e ' _ _ _ _ ___ __| (_)___ | `_/ -_) _` | (_-< |_| \___\__,_|_/__/ ' echo -e "Installing Redis" sleep 3 apk add redis php7-pecl-redis # TODO set maxmemory=2gb # TODO set maxmemory-policy=volatile-lru # TODO comment all save line rc-update add redis service redis start service php-fpm7 restart echo -e "Redis installed" echo -e ' __ ___ _ __ _ __ ___ ___ ___ _ _ / _/ _ \ ` \| `_ \/ _ (_-