Update 'Apache-Installer.sh'
This commit is contained in:
@@ -23,7 +23,6 @@ chmod -R 755 /var/www
|
||||
apt install -y apache2 mysql-server-5.7 libapache2-mod-proxy-html
|
||||
# mysql_secure_installation automated
|
||||
mysqladmin -u root password "$password"
|
||||
mysql -u root -p"$password" -e "UPDATE mysql.user SET Password=PASSWORD('$password') WHERE User='root'"
|
||||
mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')"
|
||||
mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User=''"
|
||||
mysql -u root -p"$password" -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'"
|
||||
@@ -112,8 +111,7 @@ newaliases
|
||||
# Netdata #
|
||||
##-------------##
|
||||
|
||||
if [ $netdata = 1 ]
|
||||
then
|
||||
if [ $netdata = 1 ]; then
|
||||
apt install -y netdata
|
||||
sed -i 's/SEND_EMAIL="YES"/SEND_EMAIL="NO"/g' /etc/netdata/health_alarm_notify.conf
|
||||
ufw allow 19999/tcp
|
||||
@@ -126,8 +124,7 @@ fi
|
||||
# Memcached #
|
||||
##---------------##
|
||||
|
||||
if [ $memcached = 1 ]
|
||||
then
|
||||
if [ $memcached = 1 ]; then
|
||||
apt install -y memcached
|
||||
# systemctl stop memcached
|
||||
# systemctl disable memcached
|
||||
@@ -137,8 +134,7 @@ fi
|
||||
# Redis #
|
||||
##-----------##
|
||||
|
||||
if [ $redis = 1 ]
|
||||
then
|
||||
if [ $redis = 1 ]; then
|
||||
apt install -y redis-server
|
||||
sed -i 's/supervised no/supervised systemd/g' /etc/redis/redis.conf
|
||||
sed -i 's/# bind 127.0.0.1 ::1/bind 127.0.0.1 ::1/g' /etc/redis/redis.conf
|
||||
@@ -158,8 +154,7 @@ certbot --apache -n -d "$domain" -d "www.$domain" -m "$email" --hsts --redirect
|
||||
# Wordpress #
|
||||
##---------------##
|
||||
|
||||
if [ $wordpress = 1 ]
|
||||
then
|
||||
if [ $wordpress = 1 ]; then
|
||||
db_name="wp_1"
|
||||
db_user="wp_1"
|
||||
db_pass=$(date +%s|sha256sum|base64|head -c 32)
|
||||
|
||||
Reference in New Issue
Block a user