-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |