Adsense
Popular Posts
- Code update from PHP 7.4 to PHP 8.1 - PhpSpreadsheet
- MySQL workbench -"Could not decrypt password cache"
- Code update from PHP 7.4 to PHP 8.1 - Worksheet/Iterator.php
- Rendering HTML tags inside textarea
- axios handle blob type data
- Unix Utils and wget in Windows
- increase mysql query speed
- Setup vi syntax for PHP
- Get WAMP running on EC2
- EXCEL return to the next line in the same cell
Monday, February 19, 2018
update php version in Linux/Unix with Apache
1)Type the following command on RHEL / Red Hat / CentOS / Fedora Linux based system to find out php version:
yum info php
My server return
Name : php
Arch : x86_64
Version : 5.3.3
Release : 40.el6_6
Size : 3.5 M
Repo : installed
From repo : rhel-x86_64-server-6
2) In my /etc/sysconfig/ha/conf/httpd.conf
LoadModule php5_module modules/libphp5.so
I plan to change it to PHP7
LoadModule php7_module modules/libphp7.so
For safety and test, I'll use manually install PHP7 instead using yum
3) To start and stop or restart Apache
sudo service httpd stop
sudo service httpd restart
4) In /etc/php.ini
I installed ibm_db2.so for PHP5
extension=/usr/lib64/php/modules/ibm_db2.so
Need to check ibm_db2.so OK for PHP7, save a copy of php.ini
Reference:
https://www.ibm.com/developerworks/community/blogs/96960515-2ea1-4391-8170-b0515d08e4da/entry/Install_PHP_ibm_db2_Driver?lang=en
5)get php 7 from http://www.php.net
gunzip < php-7.1.6.tar.gz | tar xvf -
Finally produce libphp7.so and modify httpd.conf and reatart Apache
6) I may need to re-install phpmyadmin
Reference:
https://code.tutsplus.com/tutorials/upgrading-your-linux-server-to-php-7--cms-27583
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment