From a1727a3994ee52a970887a373977ddcd08db140f Mon Sep 17 00:00:00 2001 From: Almazick Date: Sat, 17 Feb 2018 05:07:15 -0600 Subject: [PATCH 01/39] Update setup.sh Changed to PHP7 --- setup.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/setup.sh b/setup.sh index f75eb4f..9d15126 100644 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,6 @@ ############################################################################################### # TuxLite - Complete LNMP/LAMP setup script for Debian/Ubuntu # -# Nginx/Apache + PHP5-FPM + MySQL # +# Nginx/Apache + PHP7.0-FPM + MySQL # # Stack is optimized/tuned for a 256MB server # # Email your questions to s@tuxlite.com # ############################################################################################### @@ -107,7 +107,7 @@ EOF ## Third party mirrors ## - # Need to add Dotdeb repo for installing PHP5-FPM when using Debian 6.0 (squeeze) + # Need to add Dotdeb repo for installing PHP7-FPM when using Debian 6.0 (squeeze) if [ $DISTRO = "Debian" ] && [ $RELEASE = "squeeze" ]; then echo -e "\033[35;1mEnabling DotDeb repo for Debian 6.0 Squeeze. \033[0m" cat > /etc/apt/sources.list.d/dotdeb.list < /etc/nginx/nginx.conf # Change nginx user from "www-data" to "nginx". Not really necessary - # because "www-data" user is created when installing PHP5-FPM + # because "www-data" user is created when installing PHP-FPM if [ $USE_NGINX_ORG_REPO = "yes" ]; then sed -i 's/^user\s*www-data/user nginx/' /etc/nginx/nginx.conf fi @@ -368,8 +370,8 @@ function optimize_stack { sed -i 's/^[^#]/#&/' /etc/cron.d/awstats fi - service php5-fpm stop - php_fpm_conf="/etc/php5/fpm/pool.d/www.conf" + service php7.0-fpm stop + php_fpm_conf="/etc/php/7.0/fpm/pool.d/www.conf" # Limit FPM processes sed -i 's/^pm.max_children.*/pm.max_children = '${FPM_MAX_CHILDREN}'/' $php_fpm_conf sed -i 's/^pm.start_servers.*/pm.start_servers = '${FPM_START_SERVERS}'/' $php_fpm_conf @@ -377,9 +379,9 @@ function optimize_stack { sed -i 's/^pm.max_spare_servers.*/pm.max_spare_servers = '${FPM_MAX_SPARE_SERVERS}'/' $php_fpm_conf sed -i 's/\;pm.max_requests.*/pm.max_requests = '${FPM_MAX_REQUESTS}'/' $php_fpm_conf # Change to socket connection for better performance - sed -i 's/^listen =.*/listen = \/var\/run\/php5-fpm-www-data.sock/' $php_fpm_conf + sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-www-data.sock/' $php_fpm_conf - php_ini_dir="/etc/php5/fpm/php.ini" + php_ini_dir="/etc/php/7.0/fpm/php.ini" # Tweak php.ini based on input in options.conf sed -i 's/^max_execution_time.*/max_execution_time = '${PHP_MAX_EXECUTION_TIME}'/' $php_ini_dir sed -i 's/^memory_limit.*/memory_limit = '${PHP_MEMORY_LIMIT}'/' $php_ini_dir @@ -434,9 +436,9 @@ function optimize_stack { restart_webserver sleep 2 - service php5-fpm start + service php7.0-fpm start sleep 2 - service php5-fpm restart + service php7.0-fpm restart echo -e "\033[35;1m Optimize complete! \033[0m" } # End function optimize @@ -666,7 +668,7 @@ install) install_extras install_postfix restart_webserver - service php5-fpm restart + service php7.0-fpm restart echo -e "\033[35;1m Webserver + PHP-FPM + MySQL install complete! \033[0m" ;; optimize) From 288b1bfb9a30f8304f402888f35dae6872fb6020 Mon Sep 17 00:00:00 2001 From: Almazick Date: Sat, 17 Feb 2018 05:13:49 -0600 Subject: [PATCH 02/39] Update domain.sh Changed to PHP7 --- domain.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/domain.sh b/domain.sh index 3a527f2..5300590 100644 --- a/domain.sh +++ b/domain.sh @@ -83,26 +83,26 @@ function reload_webserver { function php_fpm_add_user { # Copy over FPM template for this Linux user if it doesn't exist - if [ ! -e /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf ]; then - cp /etc/php5/fpm/pool.d/{www.conf,$DOMAIN_OWNER.conf} + if [ ! -e /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf ]; then + cp /etc/php/7.0/fpm/pool.d/{www.conf,$DOMAIN_OWNER.conf} # Change pool user, group and socket to the domain owner - sed -i 's/^\[www\]$/\['${DOMAIN_OWNER}'\]/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^listen =.*/listen = \/var\/run\/php5-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^user = www-data$/user = '${DOMAIN_OWNER}'/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^group = www-data$/group = '${DOMAIN_OWNER}'/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.mode =.*/listen.mode = 0660/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^\[www\]$/\['${DOMAIN_OWNER}'\]/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^user = www-data$/user = '${DOMAIN_OWNER}'/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^group = www-data$/group = '${DOMAIN_OWNER}'/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.mode =.*/listen.mode = 0660/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf if [ $USE_NGINX_ORG_REPO = "yes" ]; then - sed -i 's/^;listen.owner =.*/listen.owner = nginx/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.group =.*/listen.group = nginx/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.owner =.*/listen.owner = nginx/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.group =.*/listen.group = nginx/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf else - sed -i 's/^;listen.owner =.*/listen.owner = www-data/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.group =.*/listen.group = www-data/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.owner =.*/listen.owner = www-data/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.group =.*/listen.group = www-data/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf fi fi - service php5-fpm restart + service php7.0-fpm restart } # End function php_fpm_add_user @@ -168,7 +168,7 @@ server { # Pass PHP scripts to PHP-FPM location ~ \.php$ { try_files \$uri =403; - fastcgi_pass unix:/var/run/php5-fpm-$DOMAIN_OWNER.sock; + fastcgi_pass unix:/var/run/php-fpm-$DOMAIN_OWNER.sock; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; @@ -218,7 +218,7 @@ server { location ~ \.php$ { try_files \$uri =403; - fastcgi_pass unix:/var/run/php5-fpm-$DOMAIN_OWNER.sock; + fastcgi_pass unix:/var/run/php-fpm-$DOMAIN_OWNER.sock; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; @@ -260,8 +260,8 @@ EOF ErrorLog $DOMAIN_PATH/logs/error.log CustomLog $DOMAIN_PATH/logs/access.log combined - FastCGIExternalServer $DOMAIN_PATH/php5-fpm -pass-header Authorization -idle-timeout 120 -socket /var/run/php5-fpm-$DOMAIN_OWNER.sock - Alias /php5-fcgi $DOMAIN_PATH + FastCGIExternalServer $DOMAIN_PATH/php-fpm -pass-header Authorization -idle-timeout 120 -socket /var/run/php-fpm-$DOMAIN_OWNER.sock + Alias /php-fcgi $DOMAIN_PATH @@ -278,7 +278,7 @@ EOF # With PHP5-FPM, you need to create another PHP5-FPM pool for SSL connections # Adding the same fastcgiexternalserver line here will result in an error - Alias /php5-fcgi $DOMAIN_PATH + Alias /php-fcgi $DOMAIN_PATH SSLEngine on SSLCertificateFile /etc/ssl/localcerts/webserver.pem From 5a362786a379457114886a93aa86210115787325 Mon Sep 17 00:00:00 2001 From: Almazick Date: Sat, 17 Feb 2018 05:36:44 -0600 Subject: [PATCH 03/39] Update options.conf updated to PHP7 --- options.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options.conf b/options.conf index 1a622a1..24ded75 100644 --- a/options.conf +++ b/options.conf @@ -59,8 +59,8 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS -PHP_BASE="php5-fpm php5-common php-apc php5-mysqlnd php5-dev" -PHP_EXTRAS="php5-memcache php5-curl php5-mcrypt php5-xsl php5-gd php5-imagick php5-snmp php5-xmlrpc" +PHP_BASE="php-fpm php-common php-apcu php7.0-mysql php-dev" +PHP_EXTRAS="php-memcache php-curl php-mcrypt php7.0-xsl php-gd php-imagick php-snmp php-xmlrpc" # Settings for php.ini PHP_MEMORY_LIMIT=96M From e6821aa30edc08778f173b1a5b2dd814da653089 Mon Sep 17 00:00:00 2001 From: Almazick Date: Sat, 17 Feb 2018 05:51:16 -0600 Subject: [PATCH 04/39] Update setup.sh Updated installation of fcgid --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 9d15126..d2b48ff 100644 --- a/setup.sh +++ b/setup.sh @@ -239,7 +239,7 @@ ssl_prefer_server_ciphers on; EOF else - aptitude -y install libapache2-mod-fastcgi apache2-mpm-event + aptitude -y install libapache2-mod-fcgid apache2-mpm-event a2dismod php4 a2dismod php5 From f9efc2605da4c44960cc1add0d54c9518e5fab60 Mon Sep 17 00:00:00 2001 From: Almazick Date: Sat, 17 Feb 2018 15:00:09 -0600 Subject: [PATCH 05/39] Update domain.sh --- domain.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain.sh b/domain.sh index 5300590..b27d07a 100644 --- a/domain.sh +++ b/domain.sh @@ -88,7 +88,7 @@ function php_fpm_add_user { # Change pool user, group and socket to the domain owner sed -i 's/^\[www\]$/\['${DOMAIN_OWNER}'\]/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php5/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf sed -i 's/^user = www-data$/user = '${DOMAIN_OWNER}'/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf sed -i 's/^group = www-data$/group = '${DOMAIN_OWNER}'/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf sed -i 's/^;listen.mode =.*/listen.mode = 0660/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf From cf3ce92c6fcf86654757b29e14c8c5098bd63f7f Mon Sep 17 00:00:00 2001 From: Almazick Date: Sat, 17 Feb 2018 15:02:18 -0600 Subject: [PATCH 06/39] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 601cd7a..761a888 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +Modified to work with DEBIAN 9 Stretch + ### TuxLite Readme TuxLite is a free collection of shell scripts for rapid deployment of @@ -34,7 +36,7 @@ kindly refer to these links:- # Install git and clone TuxLite aptitude install git - git clone https://github.com/Mins/TuxLite.git + git clone https://github.com/Almazick/TuxLite cd TuxLite # Edit options to enter server IP, MySQL password etc. From cc441787abe24cdbe62fb48cf398ec55b7818408 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 07:19:58 -0600 Subject: [PATCH 07/39] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 761a888..b9a9ebb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Modified to work with DEBIAN 9 Stretch +Modified to work with DEBIAN 11 ### TuxLite Readme From c85bab720583d783e3ebb8376d7594f66dae8ac5 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 07:33:11 -0600 Subject: [PATCH 08/39] update update --- README.md | 2 +- install.sh | 7 +++---- setup.sh | 58 +++++++++++++++++++++++++++--------------------------- 3 files changed, 33 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index b9a9ebb..9aab72a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Modified to work with DEBIAN 11 +Modified to work with DEBIAN 11 bullseye ### TuxLite Readme diff --git a/install.sh b/install.sh index 926cbe4..07de021 100644 --- a/install.sh +++ b/install.sh @@ -2,14 +2,13 @@ # First uninstall any unnecessary packages and ensure that aptitude is installed. apt-get update -apt-get -y install aptitude -aptitude -y install nano -aptitude -y install lsb-release +apt-get -y install nano +apt-get -y install lsb-release service apache2 stop service sendmail stop service bind9 stop service nscd stop -aptitude -y purge nscd bind9 sendmail apache2 apache2.2-common +apt-get -y purge nscd bind9 sendmail apache2 apache2.2-common echo "" echo "Configuring /etc/apt/sources.list." diff --git a/setup.sh b/setup.sh index d2b48ff..644783d 100644 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,6 @@ ############################################################################################### # TuxLite - Complete LNMP/LAMP setup script for Debian/Ubuntu # -# Nginx/Apache + PHP7.0-FPM + MySQL # +# Nginx/Apache + php7.4-fpm + MySQL # # Stack is optimized/tuned for a 256MB server # # Email your questions to s@tuxlite.com # ############################################################################################### @@ -12,7 +12,7 @@ DISTRO=`lsb_release -i -s` # Distribution's release. Squeeze, wheezy, precise etc RELEASE=`lsb_release -c -s` if [ $DISTRO = "" ]; then - echo -e "\033[35;1mPlease run 'aptitude -y install lsb-release' before using this script.\033[0m" + echo -e "\033[35;1mPlease run 'apt-get -y install lsb-release' before using this script.\033[0m" exit 1 fi @@ -21,7 +21,7 @@ fi function basic_server_setup { - aptitude update && aptitude -y safe-upgrade + apt-get update && apt-get -y safe-upgrade # Reconfigure sshd - change port and disable root login sed -i 's/^Port [0-9]*/Port '${SSHD_PORT}'/' /etc/ssh/sshd_config @@ -107,7 +107,7 @@ EOF ## Third party mirrors ## - # Need to add Dotdeb repo for installing PHP7-FPM when using Debian 6.0 (squeeze) + # Need to add Dotdeb repo for installing PHP7-FPM when using Debian 11 if [ $DISTRO = "Debian" ] && [ $RELEASE = "squeeze" ]; then echo -e "\033[35;1mEnabling DotDeb repo for Debian 6.0 Squeeze. \033[0m" cat > /etc/apt/sources.list.d/dotdeb.list < Date: Tue, 17 Jan 2023 07:36:35 -0600 Subject: [PATCH 09/39] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9aab72a..3b35322 100644 --- a/README.md +++ b/README.md @@ -26,16 +26,14 @@ The following are installed:- For more detailed explanation on the installation, usage and script features, kindly refer to these links:- -[Installation](http://tuxlite.com/installation/) [Script features](http://tuxlite.com/script-details/) -[Download](http://tuxlite.com/download/) ### Quick Install (Git) # Install git and clone TuxLite - aptitude install git + apt install git git clone https://github.com/Almazick/TuxLite cd TuxLite @@ -63,7 +61,7 @@ kindly refer to these links:- ### Requirements -- Supports Debian 6, 7 and 8, Ubuntu 12.04, 12.10, 13.04, 13.10 and 14.04. +- Supports Debian 11, Ubuntu 12.04, 12.10, 13.04, 13.10 and 14.04. - A server with at least 80MB RAM. 256MB and above recommended. - Basic Linux knowledge. You will need know how to connect to your server remotely. From 1f2670883e2ce258cd1b03471ba8b5d9a5827932 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 07:41:47 -0600 Subject: [PATCH 10/39] Update options.conf --- options.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options.conf b/options.conf index 24ded75..af81feb 100644 --- a/options.conf +++ b/options.conf @@ -59,8 +59,8 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS -PHP_BASE="php-fpm php-common php-apcu php7.0-mysql php-dev" -PHP_EXTRAS="php-memcache php-curl php-mcrypt php7.0-xsl php-gd php-imagick php-snmp php-xmlrpc" +PHP_BASE="php-fpm php-common php-apcu php7.4-mysql php-dev" +PHP_EXTRAS="php-memcache php-curl php-mcrypt php7.4-xsl php-gd php-imagick php-snmp php-xmlrpc" # Settings for php.ini PHP_MEMORY_LIMIT=96M From ff0206c79710ed493fd3b164a6c59da2751a6c9f Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 07:52:20 -0600 Subject: [PATCH 11/39] Update setup.sh --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 644783d..8c27721 100644 --- a/setup.sh +++ b/setup.sh @@ -241,9 +241,9 @@ EOF else apt-get -y install libapache2-mod-fcgid apache2-mpm-event - a2dismod php4 + a2dismod php7 a2dismod php5 - a2dismod php7 + a2dismod php7.4 a2dismod php a2dismod fcgid a2enmod actions From 207d50919b0e9b00a105eaeb60a3050ad6111c72 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 08:08:01 -0600 Subject: [PATCH 12/39] Update setup.sh --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 8c27721..6e6c936 100644 --- a/setup.sh +++ b/setup.sh @@ -296,7 +296,7 @@ function install_mysql { elif [ $DBSERVER = 3 ]; then apt-get -y install percona-server-server-5.6 percona-server-client-5.6 else - apt-get -y install mysql-server mysql-client + apt-get -y install default-mysql-server default-mysql-client fi echo -e "\033[35;1m Securing MySQL... \033[0m" From 56d348239b11be72bee5db97788f963cfe67ac30 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 08:11:02 -0600 Subject: [PATCH 13/39] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 07de021..3f8f350 100644 --- a/install.sh +++ b/install.sh @@ -8,7 +8,7 @@ service apache2 stop service sendmail stop service bind9 stop service nscd stop -apt-get -y purge nscd bind9 sendmail apache2 apache2.2-common +apt-get -y purge nscd bind9 apache2 apache2.2-common echo "" echo "Configuring /etc/apt/sources.list." From 4a6618d03ebd2dddb43f77981074f216a16d3c6f Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 08:30:14 -0600 Subject: [PATCH 14/39] update --- options.conf | 4 ++-- setup.sh | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/options.conf b/options.conf index af81feb..23efedf 100644 --- a/options.conf +++ b/options.conf @@ -24,8 +24,8 @@ DBSERVER=1 # MariaDB 5.5 options # Generate preferred repo from https://downloads.mariadb.org/mariadb/repositories/ # Specify repository's hostname if using another mirror. Required for APT pinning -MARIADB_REPO='http://ftp.osuosl.org/pub/mariadb/repo/5.5/' -MARIADB_REPO_HOSTNAME='ftp.osuosl.org' +#MARIADB_REPO='http://ftp.osuosl.org/pub/mariadb/repo/5.5/' +#MARIADB_REPO_HOSTNAME='ftp.osuosl.org' # Enable official nginx.org repository. Options = yes|no # Faster nginx updates, fewer compiled in modules diff --git a/setup.sh b/setup.sh index 6e6c936..6f18d3a 100644 --- a/setup.sh +++ b/setup.sh @@ -147,26 +147,26 @@ EOF # If user wants to install MariaDB instead of MySQL if [ $DBSERVER = 2 ]; then - echo -e "\033[35;1mEnabling MariaDB.org repo for $DISTRO $RELEASE. \033[0m" - cat > /etc/apt/sources.list.d/MariaDB.list < /etc/apt/sources.list.d/MariaDB.list < /etc/apt/preferences.d/MariaDB < /etc/apt/preferences.d/MariaDB < Date: Tue, 17 Jan 2023 08:34:27 -0600 Subject: [PATCH 15/39] Update setup.sh --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 6f18d3a..d7d4cc8 100644 --- a/setup.sh +++ b/setup.sh @@ -146,7 +146,7 @@ EOF # If user wants to install MariaDB instead of MySQL - if [ $DBSERVER = 2 ]; then + # if [ $DBSERVER = 2 ]; then # echo -e "\033[35;1mEnabling MariaDB.org repo for $DISTRO $RELEASE. \033[0m" # cat > /etc/apt/sources.list.d/MariaDB.list < Date: Tue, 17 Jan 2023 08:40:47 -0600 Subject: [PATCH 16/39] Update README.md --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 3b35322..400eb35 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,6 @@ For more detailed explanation on the installation, usage and script features, kindly refer to these links:- -[Script features](http://tuxlite.com/script-details/) - - ### Quick Install (Git) # Install git and clone TuxLite From 3cae18a2442b484fe910dbea915857b44826f912 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 08:48:19 -0600 Subject: [PATCH 17/39] Update setup.sh --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index d7d4cc8..5871bb0 100644 --- a/setup.sh +++ b/setup.sh @@ -502,7 +502,7 @@ function install_dbgui { rm -rf /usr/local/share/adminer/* wget http://www.adminer.org/latest.php if [ $? = 0 ]; then - mv latest.php index.php + mv adminer*.php index.php echo -e "\033[35;1m Adminer installed. \033[0m" else echo -e "\033[35;1mInstall/upgrade failed. Perhaps http://adminer.org is down. Try again later.\033[0m" From fa0d5a877c49bea7c3da84e15fae072374429cc7 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 09:08:03 -0600 Subject: [PATCH 18/39] update --- options.conf | 2 +- setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/options.conf b/options.conf index 23efedf..274fb21 100644 --- a/options.conf +++ b/options.conf @@ -35,7 +35,7 @@ USE_NGINX_ORG_REPO=no MYSQL_ROOT_PASSWORD=abcd1234 # phpMyAdmin = 1, Adminer = 2 -DB_GUI=1 +DB_GUI=2 # Set amount of RAM for Varnish cache VARNISH_CACHE_SIZE=50M diff --git a/setup.sh b/setup.sh index 5871bb0..d7d4cc8 100644 --- a/setup.sh +++ b/setup.sh @@ -502,7 +502,7 @@ function install_dbgui { rm -rf /usr/local/share/adminer/* wget http://www.adminer.org/latest.php if [ $? = 0 ]; then - mv adminer*.php index.php + mv latest.php index.php echo -e "\033[35;1m Adminer installed. \033[0m" else echo -e "\033[35;1mInstall/upgrade failed. Perhaps http://adminer.org is down. Try again later.\033[0m" From 00a9cdf0fb9f68b08689f2a9200249d27c5fb3bd Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 09:34:07 -0600 Subject: [PATCH 19/39] Update domain.sh --- domain.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/domain.sh b/domain.sh index b27d07a..26a43f3 100644 --- a/domain.sh +++ b/domain.sh @@ -83,26 +83,26 @@ function reload_webserver { function php_fpm_add_user { # Copy over FPM template for this Linux user if it doesn't exist - if [ ! -e /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf ]; then - cp /etc/php/7.0/fpm/pool.d/{www.conf,$DOMAIN_OWNER.conf} + if [ ! -e /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf ]; then + cp /etc/php/7.4/fpm/pool.d/{www.conf,$DOMAIN_OWNER.conf} # Change pool user, group and socket to the domain owner - sed -i 's/^\[www\]$/\['${DOMAIN_OWNER}'\]/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^user = www-data$/user = '${DOMAIN_OWNER}'/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^group = www-data$/group = '${DOMAIN_OWNER}'/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.mode =.*/listen.mode = 0660/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^\[www\]$/\['${DOMAIN_OWNER}'\]/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^user = www-data$/user = '${DOMAIN_OWNER}'/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^group = www-data$/group = '${DOMAIN_OWNER}'/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.mode =.*/listen.mode = 0660/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf if [ $USE_NGINX_ORG_REPO = "yes" ]; then - sed -i 's/^;listen.owner =.*/listen.owner = nginx/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.group =.*/listen.group = nginx/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.owner =.*/listen.owner = nginx/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.group =.*/listen.group = nginx/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf else - sed -i 's/^;listen.owner =.*/listen.owner = www-data/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.group =.*/listen.group = www-data/' /etc/php/7.0/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.owner =.*/listen.owner = www-data/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.group =.*/listen.group = www-data/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf fi fi - service php7.0-fpm restart + service php7.4-fpm restart } # End function php_fpm_add_user From dd7827d50d5db4e7bbe3882d585498b8929312bf Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 09:46:37 -0600 Subject: [PATCH 20/39] Update options.conf --- options.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.conf b/options.conf index 274fb21..2a8f06f 100644 --- a/options.conf +++ b/options.conf @@ -60,7 +60,7 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS PHP_BASE="php-fpm php-common php-apcu php7.4-mysql php-dev" -PHP_EXTRAS="php-memcache php-curl php-mcrypt php7.4-xsl php-gd php-imagick php-snmp php-xmlrpc" +PHP_EXTRAS="php-memcache php-curl php7.4-xsl php-gd php-imagick php-snmp php-xmlrpc" #php-mcrypt # Settings for php.ini PHP_MEMORY_LIMIT=96M From 06c4839838e582e36abc8d393090503a68ece2ca Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 09:47:29 -0600 Subject: [PATCH 21/39] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 400eb35..46e880c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Modified to work with DEBIAN 11 bullseye +Modified to work with DEBIAN 11 bullseye and PHP 7.4 ### TuxLite Readme From 1dc2f811e97ac30efc00d273f37fd8e7b4441dde Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 10:05:14 -0600 Subject: [PATCH 22/39] Update domain.sh --- domain.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/domain.sh b/domain.sh index 26a43f3..94a31e8 100644 --- a/domain.sh +++ b/domain.sh @@ -110,7 +110,8 @@ function php_fpm_add_user { function add_domain { # Create public_html and log directories for domain - mkdir -p $DOMAIN_PATH/{logs,public_html} + rm /etc/nginx/sites-enabled/default + mkdir -p $DOMAIN_PATH/{logs,public_html} touch $DOMAIN_PATH/logs/{access.log,error.log} cat > $DOMAIN_PATH/public_html/index.html < Date: Tue, 17 Jan 2023 10:18:35 -0600 Subject: [PATCH 23/39] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 46e880c..36e7fc8 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,15 @@ kindly refer to these links:- # Enable/disable public viewing of Adminer/phpMyAdmin ./domain.sh dbgui on ./domain.sh dbgui off + + #Setup MariaDB password. Type line by line + mysql -uroot + ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPassword'; + flush privileges; + exit; + + then try to login as + mysql -uroot -pMyNewPassword ### Requirements From 375ab1ee460d0ddbc6e334f57821b00f7ed6d829 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 11:05:55 -0600 Subject: [PATCH 24/39] Update varnish.sh --- varnish.sh | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/varnish.sh b/varnish.sh index b301565..f624c3b 100644 --- a/varnish.sh +++ b/varnish.sh @@ -7,7 +7,7 @@ DISTRO=`lsb_release -i -s` # Distribution's release. Squeeze, wheezy, precise etc RELEASE=`lsb_release -c -s` if [ $DISTRO = "" ]; then - echo -e "\033[35;1mPlease run 'aptitude -y install lsb-release' before using this script.\033[0m" + echo -e "\033[35;1mPlease run 'apt-get -y install lsb-release' before using this script.\033[0m" exit 1 fi @@ -15,28 +15,28 @@ function setup_varnish { # Use official varnish-cache.org repo for Debian stable and Ubuntu LTS. # Otherwise, install from distro's repo - if [ $DISTRO = "Debian" ]; then - if [ $RELEASE = "squeeze" ] || [ $RELEASE = "wheezy" ]; then - aptitude update && aptitude -y install curl - curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add - - echo "deb http://repo.varnish-cache.org/debian/ ${RELEASE} varnish-${VARNISH_VER}" > /etc/apt/sources.list.d/varnish.list - fi - fi - - if [ $DISTRO = "Ubuntu" ]; then - if [ $RELEASE = "lucid" ] || [ $RELEASE = "precise" ]; then - aptitude update && aptitude -y install curl - curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add - - echo "deb http://repo.varnish-cache.org/ubuntu/ ${RELEASE} varnish-${VARNISH_VER}" > /etc/apt/sources.list.d/varnish.list - fi - fi - - aptitude update - aptitude -y install varnish + # if [ $DISTRO = "Debian" ]; then + # if [ $RELEASE = "squeeze" ] || [ $RELEASE = "wheezy" ]; then + # apt-get update && apt-get -y install curl + # curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add - + # echo "deb http://repo.varnish-cache.org/debian/ ${RELEASE} varnish-${VARNISH_VER}" > /etc/apt/sources.list.d/varnish.list +# fi +# fi + + # if [ $DISTRO = "Ubuntu" ]; then +# if [ $RELEASE = "lucid" ] || [ $RELEASE = "precise" ]; then +# apt-get update && apt-get -y install curl +# curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add - +# echo "deb http://repo.varnish-cache.org/ubuntu/ ${RELEASE} varnish-${VARNISH_VER}" > /etc/apt/sources.list.d/varnish.list + # fi + # fi + + apt-get update + apt-get -y install varnish # If using Apache, install mod_rpaf to get remote IP of forwarded requests if [ $WEBSERVER -eq 2 ]; then - aptitude -y install libapache2-mod-rpaf + apt-get -y install libapache2-mod-rpaf fi # Create a backup copy of the original config file. Don't do anything if file exists From db0f8703df25e6639ad2b26233ffacc24c6d7ad4 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 11:07:26 -0600 Subject: [PATCH 25/39] Update options.conf --- options.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.conf b/options.conf index 2a8f06f..5823bea 100644 --- a/options.conf +++ b/options.conf @@ -19,7 +19,7 @@ CONFIGURE_APT=no WEBSERVER=1 # Oracle MySQL = 1, MariaDB = 2, Percona = 3 -DBSERVER=1 +DBSERVER=2 # MariaDB 5.5 options # Generate preferred repo from https://downloads.mariadb.org/mariadb/repositories/ From 9eaadc9dbf192d21c0c23a3099a95077005fc588 Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 11:23:39 -0600 Subject: [PATCH 26/39] Update varnish.sh --- varnish.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/varnish.sh b/varnish.sh index f624c3b..3a35b8b 100644 --- a/varnish.sh +++ b/varnish.sh @@ -15,21 +15,21 @@ function setup_varnish { # Use official varnish-cache.org repo for Debian stable and Ubuntu LTS. # Otherwise, install from distro's repo - # if [ $DISTRO = "Debian" ]; then - # if [ $RELEASE = "squeeze" ] || [ $RELEASE = "wheezy" ]; then - # apt-get update && apt-get -y install curl - # curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add - - # echo "deb http://repo.varnish-cache.org/debian/ ${RELEASE} varnish-${VARNISH_VER}" > /etc/apt/sources.list.d/varnish.list -# fi -# fi - - # if [ $DISTRO = "Ubuntu" ]; then -# if [ $RELEASE = "lucid" ] || [ $RELEASE = "precise" ]; then -# apt-get update && apt-get -y install curl -# curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add - -# echo "deb http://repo.varnish-cache.org/ubuntu/ ${RELEASE} varnish-${VARNISH_VER}" > /etc/apt/sources.list.d/varnish.list - # fi - # fi + if [ $DISTRO = "Debian" ]; then + if [ $RELEASE = "squeeze" ] || [ $RELEASE = "wheezy" ]; then + apt-get update && apt-get -y install curl + curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add - + echo "deb http://repo.varnish-cache.org/debian/ ${RELEASE} varnish-${VARNISH_VER}" > /etc/apt/sources.list.d/varnish.list + fi + fi + + if [ $DISTRO = "Ubuntu" ]; then + if [ $RELEASE = "lucid" ] || [ $RELEASE = "precise" ]; then + apt-get update && apt-get -y install curl + curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add - + echo "deb http://repo.varnish-cache.org/ubuntu/ ${RELEASE} varnish-${VARNISH_VER}" > /etc/apt/sources.list.d/varnish.list + fi + fi apt-get update apt-get -y install varnish @@ -170,4 +170,4 @@ off) varnish_off echo -e "\033[35;1m Varnish disabled. \033[0m" ;; -esac +esac \ No newline at end of file From 17506082f104f3b278cfc7e3190207e7ba5f7e1c Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 15:39:33 -0600 Subject: [PATCH 27/39] update --- README.md | 195 ++++++++++++++++++++++++++------------------------- domain.sh | 24 +++---- install.sh | 5 ++ options.conf | 14 ++-- setup.sh | 16 ++--- 5 files changed, 129 insertions(+), 125 deletions(-) diff --git a/README.md b/README.md index 36e7fc8..62e52bc 100644 --- a/README.md +++ b/README.md @@ -1,95 +1,100 @@ -Modified to work with DEBIAN 11 bullseye and PHP 7.4 - -### TuxLite Readme - -TuxLite is a free collection of shell scripts for rapid deployment of -LAMP and LNMP stacks (Linux, Apache/Nginx, MySQL and PHP) for Debian and -Ubuntu. - -Have you considered upgrading from shared hosting to a VPS or dedicated -server but held off by the costly control panel licenses, or the fear of -managing a Linux server? Now you can leave those worries behind! - -TuxLite scripts automate configuration of servers for web hosting, -so your websites can be online within minutes! Ideal for those who -prefer hosting sites on their own server without resorting to expensive -and bloated control panels. - -The following are installed:- - -- Apache2 with mpm\_event or Nginx -- MySQL, MariaDB or Percona -- PHP-FPM + commonly used PHP modules -- Postfix mail server (securely configured to be outgoing only) -- Varnish cache (optional) - -For more detailed explanation on the installation, usage and script features, -kindly refer to these links:- - - -### Quick Install (Git) - - # Install git and clone TuxLite - apt install git - git clone https://github.com/Almazick/TuxLite - cd TuxLite - - # Edit options to enter server IP, MySQL password etc. - nano options.conf - - # Make all scripts executable. - chmod 700 *.sh - chmod 700 options.conf - - # Install LAMP or LNMP stack. - ./install.sh - - # Add a new Linux user and add domains to the user. - adduser johndoe - ./domain.sh add johndoe yourdomain.com - ./domain.sh add johndoe subdomain.yourdomain.com - - # Install Adminer or phpMyAdmin - ./setup.sh dbgui - - # Enable/disable public viewing of Adminer/phpMyAdmin - ./domain.sh dbgui on - ./domain.sh dbgui off - - #Setup MariaDB password. Type line by line - mysql -uroot - ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPassword'; - flush privileges; - exit; - - then try to login as - mysql -uroot -pMyNewPassword - -### Requirements - -- Supports Debian 11, Ubuntu 12.04, 12.10, 13.04, 13.10 and 14.04. -- A server with at least 80MB RAM. 256MB and above recommended. -- Basic Linux knowledge. You will need know how to connect to your - server remotely. -- Basic text editor knowledge. For beginners, learning GNU nano is - recommended. - -If this is your first time with a Linux server, I suggest spending a day -reading the "getting started" tutorials in Linode Library. - -### Why use TuxLite? - -- TuxLite LAMP stack configures Apache with mpm\_event and PHP with - fastcgi (PHP-FPM). This gives much higher performance and lower memory - consumption than the regular LAMP tutorials/guides using mod\_php. -- Uses official distribution packages. You are not at the mercy of the - script maintainer to keep your servers updated. All installed - software are tuned, optimized and secured. -- Minimal resource usage. Fresh install requires only 50-60MB RAM. -- Free from unnecessary or custom changes to your server. Everything - is configured according to Debian/Ubuntu standards. -- Automatic virtualhost configuration with log rotation, AWStats - traffic statistics and phpMyAdmin for managing MySQL. -- Varnish cache script included to turbo charge your websites. -- Free and open source! Coded in a human readable manner and - modular, making custom modifications extremely easy. +Modified to work with DEBIAN 11 bullseye and PHP 8.2 + +### TuxLite Readme + +TuxLite is a free collection of shell scripts for rapid deployment of +LAMP and LNMP stacks (Linux, Apache/Nginx, MySQL and PHP) for Debian and +Ubuntu. + +Have you considered upgrading from shared hosting to a VPS or dedicated +server but held off by the costly control panel licenses, or the fear of +managing a Linux server? Now you can leave those worries behind! + +TuxLite scripts automate configuration of servers for web hosting, +so your websites can be online within minutes! Ideal for those who +prefer hosting sites on their own server without resorting to expensive +and bloated control panels. + +The following are installed:- + +- Apache2 with mpm\_event or Nginx +- MySQL, MariaDB or Percona +- PHP-FPM + commonly used PHP modules +- Postfix mail server (securely configured to be outgoing only) +- Varnish cache (optional) + +For more detailed explanation on the installation, usage and script features, +kindly refer to these links:- + + +### Quick Install (Git) + + # Install git and clone TuxLite + apt install git + git clone https://github.com/Almazick/TuxLite + cd TuxLite + + # Edit options to enter server IP, MySQL password etc. + nano options.conf + + # Make all scripts executable. + chmod 700 *.sh + chmod 700 options.conf + + # Install LAMP or LNMP stack. + ./install.sh + + # Add a new Linux user and add domains to the user. + adduser johndoe + ./domain.sh add johndoe yourdomain.com + ./domain.sh add johndoe subdomain.yourdomain.com + + # Install Adminer or phpMyAdmin + ./setup.sh dbgui + + # Enable/disable public viewing of Adminer/phpMyAdmin + ./domain.sh dbgui on + ./domain.sh dbgui off + + #Setup MariaDB password. Type line by line + GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'MyNewPassword' WITH GRANT OPTION; + FLUSH PRIVILEGES; + + or + + mysql -uroot + ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPassword'; + flush privileges; + exit; + + then try to login as + mysql -uroot -pMyNewPassword + +### Requirements + +- Supports Debian 11, Ubuntu 12.04, 12.10, 13.04, 13.10 and 14.04. +- A server with at least 80MB RAM. 256MB and above recommended. +- Basic Linux knowledge. You will need know how to connect to your + server remotely. +- Basic text editor knowledge. For beginners, learning GNU nano is + recommended. + +If this is your first time with a Linux server, I suggest spending a day +reading the "getting started" tutorials in Linode Library. + +### Why use TuxLite? + +- TuxLite LAMP stack configures Apache with mpm\_event and PHP with + fastcgi (PHP-FPM). This gives much higher performance and lower memory + consumption than the regular LAMP tutorials/guides using mod\_php. +- Uses official distribution packages. You are not at the mercy of the + script maintainer to keep your servers updated. All installed + software are tuned, optimized and secured. +- Minimal resource usage. Fresh install requires only 50-60MB RAM. +- Free from unnecessary or custom changes to your server. Everything + is configured according to Debian/Ubuntu standards. +- Automatic virtualhost configuration with log rotation, AWStats + traffic statistics and phpMyAdmin for managing MySQL. +- Varnish cache script included to turbo charge your websites. +- Free and open source! Coded in a human readable manner and + modular, making custom modifications extremely easy. diff --git a/domain.sh b/domain.sh index 94a31e8..c5337d3 100644 --- a/domain.sh +++ b/domain.sh @@ -83,26 +83,26 @@ function reload_webserver { function php_fpm_add_user { # Copy over FPM template for this Linux user if it doesn't exist - if [ ! -e /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf ]; then - cp /etc/php/7.4/fpm/pool.d/{www.conf,$DOMAIN_OWNER.conf} + if [ ! -e /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf ]; then + cp /etc/php/8.2/fpm/pool.d/{www.conf,$DOMAIN_OWNER.conf} # Change pool user, group and socket to the domain owner - sed -i 's/^\[www\]$/\['${DOMAIN_OWNER}'\]/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^user = www-data$/user = '${DOMAIN_OWNER}'/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^group = www-data$/group = '${DOMAIN_OWNER}'/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.mode =.*/listen.mode = 0660/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^\[www\]$/\['${DOMAIN_OWNER}'\]/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^user = www-data$/user = '${DOMAIN_OWNER}'/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^group = www-data$/group = '${DOMAIN_OWNER}'/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.mode =.*/listen.mode = 0660/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf if [ $USE_NGINX_ORG_REPO = "yes" ]; then - sed -i 's/^;listen.owner =.*/listen.owner = nginx/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.group =.*/listen.group = nginx/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.owner =.*/listen.owner = nginx/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.group =.*/listen.group = nginx/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf else - sed -i 's/^;listen.owner =.*/listen.owner = www-data/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.group =.*/listen.group = www-data/' /etc/php/7.4/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.owner =.*/listen.owner = www-data/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.group =.*/listen.group = www-data/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf fi fi - service php7.4-fpm restart + service php8.2-fpm restart } # End function php_fpm_add_user diff --git a/install.sh b/install.sh index 3f8f350..bfe4283 100644 --- a/install.sh +++ b/install.sh @@ -10,6 +10,11 @@ service bind9 stop service nscd stop apt-get -y purge nscd bind9 apache2 apache2.2-common +#Install PHP8.2 +apt-get -y install lsb-release ca-certificates apt-transport-https software-properties-common gnupg2 +echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list +wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add - + echo "" echo "Configuring /etc/apt/sources.list." sleep 5 diff --git a/options.conf b/options.conf index 5823bea..2734426 100644 --- a/options.conf +++ b/options.conf @@ -6,7 +6,7 @@ SERVER_IP="0.0.0.0" SSHD_PORT=22 # Set an admin email account to be used for various system notifications and alerts -ADMIN_EMAIL="admin@yourdomain.com" +ADMIN_EMAIL="admin@gmail.com" # Choose whether you want to maintain 'root login' or not. Options = yes|no ROOT_LOGIN=no @@ -21,18 +21,12 @@ WEBSERVER=1 # Oracle MySQL = 1, MariaDB = 2, Percona = 3 DBSERVER=2 -# MariaDB 5.5 options -# Generate preferred repo from https://downloads.mariadb.org/mariadb/repositories/ -# Specify repository's hostname if using another mirror. Required for APT pinning -#MARIADB_REPO='http://ftp.osuosl.org/pub/mariadb/repo/5.5/' -#MARIADB_REPO_HOSTNAME='ftp.osuosl.org' - # Enable official nginx.org repository. Options = yes|no # Faster nginx updates, fewer compiled in modules USE_NGINX_ORG_REPO=no # Root password for MySQL, MariaDB or Percona -MYSQL_ROOT_PASSWORD=abcd1234 +MYSQL_ROOT_PASSWORD=MyNewPassword # phpMyAdmin = 1, Adminer = 2 DB_GUI=2 @@ -59,8 +53,8 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS -PHP_BASE="php-fpm php-common php-apcu php7.4-mysql php-dev" -PHP_EXTRAS="php-memcache php-curl php7.4-xsl php-gd php-imagick php-snmp php-xmlrpc" #php-mcrypt +PHP_BASE="php-fpm php-common php-apcu php8.2-mysql php-dev" +PHP_EXTRAS="php-memcache php-curl php8.2-xsl php-gd php-imagick php-snmp php-xmlrpc php-zip" #php-mcrypt # Settings for php.ini PHP_MEMORY_LIMIT=96M diff --git a/setup.sh b/setup.sh index d7d4cc8..23d0ceb 100644 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,6 @@ ############################################################################################### # TuxLite - Complete LNMP/LAMP setup script for Debian/Ubuntu # -# Nginx/Apache + php7.4-fpm + MySQL # +# Nginx/Apache + php8.2-fpm + MySQL # # Stack is optimized/tuned for a 256MB server # # Email your questions to s@tuxlite.com # ############################################################################################### @@ -243,7 +243,7 @@ EOF a2dismod php7 a2dismod php5 - a2dismod php7.4 + a2dismod php8.2 a2dismod php a2dismod fcgid a2enmod actions @@ -370,8 +370,8 @@ function optimize_stack { sed -i 's/^[^#]/#&/' /etc/cron.d/awstats fi - service php7.4-fpm stop - php_fpm_conf="/etc/php/7.4/fpm/pool.d/www.conf" + service php8.2-fpm stop + php_fpm_conf="/etc/php/8.2/fpm/pool.d/www.conf" # Limit FPM processes sed -i 's/^pm.max_children.*/pm.max_children = '${FPM_MAX_CHILDREN}'/' $php_fpm_conf sed -i 's/^pm.start_servers.*/pm.start_servers = '${FPM_START_SERVERS}'/' $php_fpm_conf @@ -381,7 +381,7 @@ function optimize_stack { # Change to socket connection for better performance sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-www-data.sock/' $php_fpm_conf - php_ini_dir="/etc/php/7.4/fpm/php.ini" + php_ini_dir="/etc/php/8.2/fpm/php.ini" # Tweak php.ini based on input in options.conf sed -i 's/^max_execution_time.*/max_execution_time = '${PHP_MAX_EXECUTION_TIME}'/' $php_ini_dir sed -i 's/^memory_limit.*/memory_limit = '${PHP_MEMORY_LIMIT}'/' $php_ini_dir @@ -436,9 +436,9 @@ function optimize_stack { restart_webserver sleep 2 - service php7.4-fpm start + service php8.2-fpm start sleep 2 - service php7.4-fpm restart + service php8.2-fpm restart echo -e "\033[35;1m Optimize complete! \033[0m" } # End function optimize @@ -668,7 +668,7 @@ install) install_extras # install_postfix restart_webserver - service php7.4-fpm restart + service php8.2-fpm restart echo -e "\033[35;1m Webserver + PHP-FPM + MySQL install complete! \033[0m" ;; optimize) From 57d4e90f578c9f00efa5ad8956046b333dec24ac Mon Sep 17 00:00:00 2001 From: Almazick Date: Tue, 17 Jan 2023 15:44:30 -0600 Subject: [PATCH 28/39] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62e52bc..43b33fe 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The following are installed:- - Apache2 with mpm\_event or Nginx - MySQL, MariaDB or Percona - PHP-FPM + commonly used PHP modules -- Postfix mail server (securely configured to be outgoing only) +removed Postfix mail server (securely configured to be outgoing only) - Varnish cache (optional) For more detailed explanation on the installation, usage and script features, From ea56660b0e5c5e137d3895f19d44bdbd6ce6b1b5 Mon Sep 17 00:00:00 2001 From: Almazick Date: Wed, 18 Jan 2023 02:26:40 -0600 Subject: [PATCH 29/39] update --- README.md | 2 +- domain.sh | 24 ++++++++++++------------ install.sh | 2 +- options.conf | 4 ++-- setup.sh | 16 ++++++++-------- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 43b33fe..1ff00bf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Modified to work with DEBIAN 11 bullseye and PHP 8.2 +Modified to work with DEBIAN 11 bullseye and PHP 8.1 ### TuxLite Readme diff --git a/domain.sh b/domain.sh index c5337d3..3cafd89 100644 --- a/domain.sh +++ b/domain.sh @@ -83,26 +83,26 @@ function reload_webserver { function php_fpm_add_user { # Copy over FPM template for this Linux user if it doesn't exist - if [ ! -e /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf ]; then - cp /etc/php/8.2/fpm/pool.d/{www.conf,$DOMAIN_OWNER.conf} + if [ ! -e /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf ]; then + cp /etc/php/8.1/fpm/pool.d/{www.conf,$DOMAIN_OWNER.conf} # Change pool user, group and socket to the domain owner - sed -i 's/^\[www\]$/\['${DOMAIN_OWNER}'\]/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^user = www-data$/user = '${DOMAIN_OWNER}'/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^group = www-data$/group = '${DOMAIN_OWNER}'/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.mode =.*/listen.mode = 0660/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^\[www\]$/\['${DOMAIN_OWNER}'\]/' /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-'${DOMAIN_OWNER}'.sock/' /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^user = www-data$/user = '${DOMAIN_OWNER}'/' /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^group = www-data$/group = '${DOMAIN_OWNER}'/' /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.mode =.*/listen.mode = 0660/' /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf if [ $USE_NGINX_ORG_REPO = "yes" ]; then - sed -i 's/^;listen.owner =.*/listen.owner = nginx/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.group =.*/listen.group = nginx/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.owner =.*/listen.owner = nginx/' /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.group =.*/listen.group = nginx/' /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf else - sed -i 's/^;listen.owner =.*/listen.owner = www-data/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf - sed -i 's/^;listen.group =.*/listen.group = www-data/' /etc/php/8.2/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.owner =.*/listen.owner = www-data/' /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf + sed -i 's/^;listen.group =.*/listen.group = www-data/' /etc/php/8.1/fpm/pool.d/$DOMAIN_OWNER.conf fi fi - service php8.2-fpm restart + service php8.1-fpm restart } # End function php_fpm_add_user diff --git a/install.sh b/install.sh index bfe4283..cc6b31a 100644 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ service bind9 stop service nscd stop apt-get -y purge nscd bind9 apache2 apache2.2-common -#Install PHP8.2 +#Install PHP8.1 apt-get -y install lsb-release ca-certificates apt-transport-https software-properties-common gnupg2 echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add - diff --git a/options.conf b/options.conf index 2734426..dc32f16 100644 --- a/options.conf +++ b/options.conf @@ -53,8 +53,8 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS -PHP_BASE="php-fpm php-common php-apcu php8.2-mysql php-dev" -PHP_EXTRAS="php-memcache php-curl php8.2-xsl php-gd php-imagick php-snmp php-xmlrpc php-zip" #php-mcrypt +PHP_BASE="php-fpm php-common php-apcu php8.1-mysql php-dev" +PHP_EXTRAS="php-memcache php-curl php8.1-xsl php-gd php-imagick php-snmp php-xmlrpc php-zip php-mbstring" #php-mcrypt # Settings for php.ini PHP_MEMORY_LIMIT=96M diff --git a/setup.sh b/setup.sh index 23d0ceb..e481cf2 100644 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,6 @@ ############################################################################################### # TuxLite - Complete LNMP/LAMP setup script for Debian/Ubuntu # -# Nginx/Apache + php8.2-fpm + MySQL # +# Nginx/Apache + php8.1-fpm + MySQL # # Stack is optimized/tuned for a 256MB server # # Email your questions to s@tuxlite.com # ############################################################################################### @@ -243,7 +243,7 @@ EOF a2dismod php7 a2dismod php5 - a2dismod php8.2 + a2dismod php8.1 a2dismod php a2dismod fcgid a2enmod actions @@ -370,8 +370,8 @@ function optimize_stack { sed -i 's/^[^#]/#&/' /etc/cron.d/awstats fi - service php8.2-fpm stop - php_fpm_conf="/etc/php/8.2/fpm/pool.d/www.conf" + service php8.1-fpm stop + php_fpm_conf="/etc/php/8.1/fpm/pool.d/www.conf" # Limit FPM processes sed -i 's/^pm.max_children.*/pm.max_children = '${FPM_MAX_CHILDREN}'/' $php_fpm_conf sed -i 's/^pm.start_servers.*/pm.start_servers = '${FPM_START_SERVERS}'/' $php_fpm_conf @@ -381,7 +381,7 @@ function optimize_stack { # Change to socket connection for better performance sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-www-data.sock/' $php_fpm_conf - php_ini_dir="/etc/php/8.2/fpm/php.ini" + php_ini_dir="/etc/php/8.1/fpm/php.ini" # Tweak php.ini based on input in options.conf sed -i 's/^max_execution_time.*/max_execution_time = '${PHP_MAX_EXECUTION_TIME}'/' $php_ini_dir sed -i 's/^memory_limit.*/memory_limit = '${PHP_MEMORY_LIMIT}'/' $php_ini_dir @@ -436,9 +436,9 @@ function optimize_stack { restart_webserver sleep 2 - service php8.2-fpm start + service php8.1-fpm start sleep 2 - service php8.2-fpm restart + service php8.1-fpm restart echo -e "\033[35;1m Optimize complete! \033[0m" } # End function optimize @@ -668,7 +668,7 @@ install) install_extras # install_postfix restart_webserver - service php8.2-fpm restart + service php8.1-fpm restart echo -e "\033[35;1m Webserver + PHP-FPM + MySQL install complete! \033[0m" ;; optimize) From 32d60894b0a059283f94b56dba5ca292b92a6140 Mon Sep 17 00:00:00 2001 From: Almazick Date: Wed, 18 Jan 2023 02:48:18 -0600 Subject: [PATCH 30/39] update --- options.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options.conf b/options.conf index dc32f16..f9d0016 100644 --- a/options.conf +++ b/options.conf @@ -53,8 +53,8 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS -PHP_BASE="php-fpm php-common php-apcu php8.1-mysql php-dev" -PHP_EXTRAS="php-memcache php-curl php8.1-xsl php-gd php-imagick php-snmp php-xmlrpc php-zip php-mbstring" #php-mcrypt +PHP_BASE="php8.1-fpm php-common php-apcu php8.1-mysql php-dev" +PHP_EXTRAS="php-memcache php-curl php8.1-xsl php-gd php-imagick php-snmp php-xmlrpc php-zip php-mbstring" #php-mcrypt php-fpm # Settings for php.ini PHP_MEMORY_LIMIT=96M From e363a973c3469eef91690874af75658dbad39526 Mon Sep 17 00:00:00 2001 From: Almazick Date: Wed, 18 Jan 2023 02:54:48 -0600 Subject: [PATCH 31/39] Update options.conf --- options.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options.conf b/options.conf index f9d0016..257597a 100644 --- a/options.conf +++ b/options.conf @@ -53,8 +53,8 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS -PHP_BASE="php8.1-fpm php-common php-apcu php8.1-mysql php-dev" -PHP_EXTRAS="php-memcache php-curl php8.1-xsl php-gd php-imagick php-snmp php-xmlrpc php-zip php-mbstring" #php-mcrypt php-fpm +PHP_BASE="php8.1-fpm php8.1-common php8.1-apcu php8.1-mysql php8.1-dev" +PHP_EXTRAS="php8.1-memcache php8.1-curl php8.1-xsl php8.1-gd php8.1-imagick php8.1-snmp php8.1-xmlrpc php8.1-zip php8.1-mbstring" #php-mcrypt php-fpm # Settings for php.ini PHP_MEMORY_LIMIT=96M From 4dcec15c41b6c5cf2f5631d309b4188f0c23be1f Mon Sep 17 00:00:00 2001 From: Almazick Date: Wed, 18 Jan 2023 02:59:07 -0600 Subject: [PATCH 32/39] Update options.conf --- options.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.conf b/options.conf index 257597a..95c1de8 100644 --- a/options.conf +++ b/options.conf @@ -54,7 +54,7 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS PHP_BASE="php8.1-fpm php8.1-common php8.1-apcu php8.1-mysql php8.1-dev" -PHP_EXTRAS="php8.1-memcache php8.1-curl php8.1-xsl php8.1-gd php8.1-imagick php8.1-snmp php8.1-xmlrpc php8.1-zip php8.1-mbstring" #php-mcrypt php-fpm +PHP_EXTRAS="php8.1-memcache php8.1-curl php8.1-xsl php8.1-gd php8.1-imagick php8.1-snmp php8.1-xmlrpc php8.1-zip php8.1-mbstring php8.1-mcrypt" #php-fpm # Settings for php.ini PHP_MEMORY_LIMIT=96M From 0c6e38b3e9efb91c07bb89b5a29d2dc837adb589 Mon Sep 17 00:00:00 2001 From: Almazick Date: Wed, 18 Jan 2023 03:29:10 -0600 Subject: [PATCH 33/39] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1ff00bf..aa7899a 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ kindly refer to these links:- ./domain.sh dbgui off #Setup MariaDB password. Type line by line + mysql -uroot GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'MyNewPassword' WITH GRANT OPTION; FLUSH PRIVILEGES; From f2220bd8dda09a1116211ec550ebb0a4bc4a1e4a Mon Sep 17 00:00:00 2001 From: Almazick Date: Wed, 18 Jan 2023 18:57:49 -0600 Subject: [PATCH 34/39] Update options.conf --- options.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/options.conf b/options.conf index 95c1de8..71b7e81 100644 --- a/options.conf +++ b/options.conf @@ -54,8 +54,7 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS PHP_BASE="php8.1-fpm php8.1-common php8.1-apcu php8.1-mysql php8.1-dev" -PHP_EXTRAS="php8.1-memcache php8.1-curl php8.1-xsl php8.1-gd php8.1-imagick php8.1-snmp php8.1-xmlrpc php8.1-zip php8.1-mbstring php8.1-mcrypt" #php-fpm - +PHP_EXTRAS="php8.1-bcmath php8.1-intl php8.1-soap php8.1-xml php8.1-cli php8.1-memcache php8.1-curl php8.1-xsl php8.1-gd php8.1-imagick php8.1-snmp php8.1-xmlrpc php8.1-zip php8.1-mbstring php8.1-mcrypt" # Settings for php.ini PHP_MEMORY_LIMIT=96M PHP_MAX_EXECUTION_TIME=120 From c231a9013cc70ac69a65a378b77eb52e4b169c25 Mon Sep 17 00:00:00 2001 From: Almazick Date: Wed, 18 Jan 2023 19:05:25 -0600 Subject: [PATCH 35/39] Update options.conf --- options.conf | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/options.conf b/options.conf index 71b7e81..6446633 100644 --- a/options.conf +++ b/options.conf @@ -55,12 +55,19 @@ MISC_PACKAGES="" # You may safely remove all the modules in PHP_EXTRAS PHP_BASE="php8.1-fpm php8.1-common php8.1-apcu php8.1-mysql php8.1-dev" PHP_EXTRAS="php8.1-bcmath php8.1-intl php8.1-soap php8.1-xml php8.1-cli php8.1-memcache php8.1-curl php8.1-xsl php8.1-gd php8.1-imagick php8.1-snmp php8.1-xmlrpc php8.1-zip php8.1-mbstring php8.1-mcrypt" + # Settings for php.ini -PHP_MEMORY_LIMIT=96M -PHP_MAX_EXECUTION_TIME=120 +PHP_MEMORY_LIMIT=128M +PHP_MAX_EXECUTION_TIME=18000 PHP_MAX_INPUT_TIME=300 PHP_POST_MAX_SIZE=25M -PHP_UPLOAD_MAX_FILESIZE=25M +PHP_UPLOAD_MAX_FILESIZE=128M + +# sample +# sed -i "s/memory_limit = .*/memory_limit = 768M/" /etc/php/8.1/fpm/php.ini +# sed -i "s/upload_max_filesize = .*/upload_max_filesize = 128M/" /etc/php/8.1/fpm/php.ini +# sed -i "s/zlib.output_compression = .*/zlib.output_compression = on/" /etc/php/8.1/fpm/php.ini +# sed -i "s/max_execution_time = .*/max_execution_time = 18000/" /etc/php/8.1/fpm/php.ini # Settings for PHP5-FPM's pool FPM_MAX_CHILDREN=5 From 0ac98214f3bc3ae430b3004dd43d88721c603298 Mon Sep 17 00:00:00 2001 From: Almazick Date: Wed, 18 Jan 2023 20:17:49 -0600 Subject: [PATCH 36/39] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index aa7899a..5e15d5b 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,9 @@ kindly refer to these links:- ./domain.sh dbgui off #Setup MariaDB password. Type line by line + #To secure the MariaDB installation, run the next command to improve security of your MySQL server installation. + # $ mysql_secure_installation + # or mysql -uroot GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'MyNewPassword' WITH GRANT OPTION; FLUSH PRIVILEGES; From 3bda02058024f95061ce1e948a513a91b9220b68 Mon Sep 17 00:00:00 2001 From: Almazick Date: Sat, 21 Jan 2023 18:32:38 -0600 Subject: [PATCH 37/39] update --- options.conf | 4 ++-- setup.sh | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/options.conf b/options.conf index 6446633..f02a765 100644 --- a/options.conf +++ b/options.conf @@ -54,14 +54,14 @@ MISC_PACKAGES="" # Configure PHP. Recommended to leave PHP_BASE unchanged # You may safely remove all the modules in PHP_EXTRAS PHP_BASE="php8.1-fpm php8.1-common php8.1-apcu php8.1-mysql php8.1-dev" -PHP_EXTRAS="php8.1-bcmath php8.1-intl php8.1-soap php8.1-xml php8.1-cli php8.1-memcache php8.1-curl php8.1-xsl php8.1-gd php8.1-imagick php8.1-snmp php8.1-xmlrpc php8.1-zip php8.1-mbstring php8.1-mcrypt" +PHP_EXTRAS="php8.1-bcmath php8.1-intl php8.1-soap php8.1-xml php8.1-cli php8.1-memcache php8.1-curl php8.1-xsl php8.1-gd php8.1-imagick php8.1-snmp php8.1-xmlrpc php8.1-zip php8.1-mbstring" # Settings for php.ini PHP_MEMORY_LIMIT=128M PHP_MAX_EXECUTION_TIME=18000 PHP_MAX_INPUT_TIME=300 PHP_POST_MAX_SIZE=25M -PHP_UPLOAD_MAX_FILESIZE=128M +PHP_UPLOAD_MAX_FILESIZE=512M # sample # sed -i "s/memory_limit = .*/memory_limit = 768M/" /etc/php/8.1/fpm/php.ini diff --git a/setup.sh b/setup.sh index e481cf2..ba7d242 100644 --- a/setup.sh +++ b/setup.sh @@ -265,6 +265,7 @@ function install_php { # Install PHP packages and extensions specified in options.conf apt-get -y install $PHP_BASE apt-get -y install $PHP_EXTRAS + apt-get -y install php8.1-mcrypt } # End function install_php @@ -388,6 +389,8 @@ function optimize_stack { sed -i 's/^max_input_time.*/max_input_time = '${PHP_MAX_INPUT_TIME}'/' $php_ini_dir sed -i 's/^post_max_size.*/post_max_size = '${PHP_POST_MAX_SIZE}'/' $php_ini_dir sed -i 's/^upload_max_filesize.*/upload_max_filesize = '${PHP_UPLOAD_MAX_FILESIZE}'/' $php_ini_dir + sed -i 's/^post_max_size.*/post_max_size = '${PHP_UPLOAD_MAX_FILESIZE}'/' $php_ini_dir + #sed -i 's/^client_max_body_size.*/client_max_body_size = '${PHP_UPLOAD_MAX_FILESIZE}'/' /etc/nginx/nginx.conf sed -i 's/^expose_php.*/expose_php = Off/' $php_ini_dir sed -i 's/^disable_functions.*/disable_functions = exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source/' $php_ini_dir From 5017a426ad995de8765cdd0c5c9cd66bcba32bff Mon Sep 17 00:00:00 2001 From: Almazick Date: Sat, 21 Jan 2023 20:20:08 -0600 Subject: [PATCH 38/39] Update options.conf --- options.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.conf b/options.conf index f02a765..2e4c4e6 100644 --- a/options.conf +++ b/options.conf @@ -60,7 +60,7 @@ PHP_EXTRAS="php8.1-bcmath php8.1-intl php8.1-soap php8.1-xml php8.1-cli php8.1-m PHP_MEMORY_LIMIT=128M PHP_MAX_EXECUTION_TIME=18000 PHP_MAX_INPUT_TIME=300 -PHP_POST_MAX_SIZE=25M +PHP_POST_MAX_SIZE=512M PHP_UPLOAD_MAX_FILESIZE=512M # sample From 21c576df2292e872fb42101dd32383aa22257767 Mon Sep 17 00:00:00 2001 From: Almazick Date: Sun, 22 Jan 2023 09:11:56 -0600 Subject: [PATCH 39/39] update --- options.conf | 3 +++ setup.sh | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/options.conf b/options.conf index 2e4c4e6..f9cc45f 100644 --- a/options.conf +++ b/options.conf @@ -56,6 +56,9 @@ MISC_PACKAGES="" PHP_BASE="php8.1-fpm php8.1-common php8.1-apcu php8.1-mysql php8.1-dev" PHP_EXTRAS="php8.1-bcmath php8.1-intl php8.1-soap php8.1-xml php8.1-cli php8.1-memcache php8.1-curl php8.1-xsl php8.1-gd php8.1-imagick php8.1-snmp php8.1-xmlrpc php8.1-zip php8.1-mbstring" +# Settings for nginx.conf +NGINX_CLIENT_MAX_BODY_SIZE='128m;' + # Settings for php.ini PHP_MEMORY_LIMIT=128M PHP_MAX_EXECUTION_TIME=18000 diff --git a/setup.sh b/setup.sh index ba7d242..70f6551 100644 --- a/setup.sh +++ b/setup.sh @@ -382,6 +382,9 @@ function optimize_stack { # Change to socket connection for better performance sed -i 's/^listen =.*/listen = \/var\/run\/php-fpm-www-data.sock/' $php_fpm_conf + # Tweak nginx.conf based on input in options.conf + sed -i "s|;*client_max_body_size .*|client_max_body_size ${NGINX_CLIENT_MAX_BODY_SIZE}|i" /etc/nginx/nginx.conf + php_ini_dir="/etc/php/8.1/fpm/php.ini" # Tweak php.ini based on input in options.conf sed -i 's/^max_execution_time.*/max_execution_time = '${PHP_MAX_EXECUTION_TIME}'/' $php_ini_dir @@ -389,8 +392,7 @@ function optimize_stack { sed -i 's/^max_input_time.*/max_input_time = '${PHP_MAX_INPUT_TIME}'/' $php_ini_dir sed -i 's/^post_max_size.*/post_max_size = '${PHP_POST_MAX_SIZE}'/' $php_ini_dir sed -i 's/^upload_max_filesize.*/upload_max_filesize = '${PHP_UPLOAD_MAX_FILESIZE}'/' $php_ini_dir - sed -i 's/^post_max_size.*/post_max_size = '${PHP_UPLOAD_MAX_FILESIZE}'/' $php_ini_dir - #sed -i 's/^client_max_body_size.*/client_max_body_size = '${PHP_UPLOAD_MAX_FILESIZE}'/' /etc/nginx/nginx.conf + sed -i 's/^post_max_size.*/post_max_size = '${PHP_UPLOAD_MAX_FILESIZE}'/' $php_ini_dir sed -i 's/^expose_php.*/expose_php = Off/' $php_ini_dir sed -i 's/^disable_functions.*/disable_functions = exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source/' $php_ini_dir