From 53b03a407412d7cb16df940caa3024c72cc4cf28 Mon Sep 17 00:00:00 2001 From: Yujin Boby Date: Mon, 2 Oct 2017 12:02:22 +0530 Subject: [PATCH] updated. --- cpanel-server-setup.txt | 3 --- tools/php-module-compare | 41 ++++++++++++++++++++++++++++++++++++++++ ubuntu/php-7.2.txt | 13 +++++++++++++ ubuntu/readme.txt | 5 +++++ ubuntu/ubuntu-php-5.6.sh | 12 ++++++++++++ 5 files changed, 71 insertions(+), 3 deletions(-) create mode 100755 tools/php-module-compare create mode 100644 ubuntu/php-7.2.txt create mode 100644 ubuntu/readme.txt create mode 100644 ubuntu/ubuntu-php-5.6.sh diff --git a/cpanel-server-setup.txt b/cpanel-server-setup.txt index 7dc486b..31e1008 100644 --- a/cpanel-server-setup.txt +++ b/cpanel-server-setup.txt @@ -19,8 +19,6 @@ cp /root/server-setup/data/cpanel3-skel/index.html /root/cpanel3-skel/public_ht ./cloudlinux-cagefs.sh -Home > Server Configuration > Server Time = UTC - Home > Server Configuration > Statistics Software Configuration = disable Analog and Webalizer @@ -59,4 +57,3 @@ services cat /var/cpanel/backups/config - diff --git a/tools/php-module-compare b/tools/php-module-compare new file mode 100755 index 0000000..223b421 --- /dev/null +++ b/tools/php-module-compare @@ -0,0 +1,41 @@ +#!/usr/bin/python +# Author: Yujin Boby +# Blog: http://blog.hostonnet.com + +import os +import sys + +if not os.path.isfile("new.txt") \ + or not os.path.isfile("old.txt") : + print("Create 2 files, old.txt and new.txt with list of php modules in old ane new server to compare") + sys.exit(1) + +php_modules_old = [] +php_modules_new = [] + +for line in open("old.txt"): + line = line.strip() + php_modules_old.append(line) + +for line in open("new.txt"): + line = line.strip() + php_modules_new.append(line) + + +php_modules_old.sort() + +php_modules_missing = [] + +for php_module in php_modules_old: + if php_module not in php_modules_new: + php_modules_missing.append(php_module) + + +if len(php_modules_missing) > 0: + print("Modules missing = " + str(len(php_modules_missing))) + print("\n") + for module_missing in php_modules_missing: + print(module_missing) + print("\n") +else: + print("Good job, all modules present in new server.") \ No newline at end of file diff --git a/ubuntu/php-7.2.txt b/ubuntu/php-7.2.txt new file mode 100644 index 0000000..ff0edee --- /dev/null +++ b/ubuntu/php-7.2.txt @@ -0,0 +1,13 @@ +apt install php7.2-bcmath php7.2-bz2 php7.2-cgi php7.2-cli php7.2-common php7.2-curl php7.2-dba php7.2-dev php7.2-enchant php7.2-fpm php7.2-gd php7.2-gmp php7.2-imap php7.2-intl php7.2-json php7.2-mbstring php7.2-mysql php7.2-opcache php7.2-pgsql php7.2-pspell php7.2-readline php7.2-soap php7.2-sqlite3 php7.2-sybase php7.2-tidy php7.2-xml php7.2-xmlrpc php7.2-zip php7.2-xsl php7.2 + + +libapache2-mod-php5.6 + +apt install libapache2-mod-php7.2 + + +enable PHP 7.2 + +a2enmod php7.2 +a2dismod php5.6 +service apache2 restart diff --git a/ubuntu/readme.txt b/ubuntu/readme.txt new file mode 100644 index 0000000..415c07e --- /dev/null +++ b/ubuntu/readme.txt @@ -0,0 +1,5 @@ +wget https://raw.githubusercontent.com/HostOnNet/server-setup/master/ubuntu/1-basic-tools.sh +sh ./1-basic-tools.sh + +wget https://raw.githubusercontent.com/HostOnNet/server-setup/master/ubuntu/2-apache-php-mysql.sh +sh ./2-apache-php-mysql.sh diff --git a/ubuntu/ubuntu-php-5.6.sh b/ubuntu/ubuntu-php-5.6.sh new file mode 100644 index 0000000..7201ea3 --- /dev/null +++ b/ubuntu/ubuntu-php-5.6.sh @@ -0,0 +1,12 @@ +add-apt-repository ppa:ondrej/php +apt update +apt -y upgrade +apt install -y php5.6 php5.6-mysql php5.6-gd php5.6-mbstring php5.6-mcrypt php5.6-zip php5.6-curl php5.6-xml + +apt install -y php5.6-fpm + +apt install libapache2-mod-php5.6 +a2enmod rewrite + +/etc/php/5.6/apache2/php.ini +service apache2 restart