没有不值得去解决的问题,也没有不值得去学习的技术!

How to Upgrade PHP 5.3.3 to PHP 5.4.42 on CentOS 6.5 64-bit Using Yum

Install the PHP 5.4 programs again by running the command

1. First, follow the instructions at this URL: https://www.shuijingwanwq.com/2014/12/26/439/

2. The current PHP version is PHP 5.3.3.

The current PHP version is PHP 5.3.3
The current PHP version is PHP 5.3.3

3. Edit /etc/yum.repos.d/remi.repo and set enabled=1 under [remi]. The [remi] repository represents PHP 5.4, and it also includes 5.5 and 5.6. Here we use 5.4.

Edit /etc/yum.repos.d/remi.repo and set enabled=1 under [remi]. The [remi] repository represents PHP 5.4, and it also includes 5.5 and 5.6. Here we use 5.4.
Edit /etc/yum.repos.d/remi.repo and set enabled=1 under [remi]. The [remi] repository represents PHP 5.4, and it also includes 5.5 and 5.6. Here we use 5.4.

4. Run the yum repolist command to check whether the remi repository was added successfully.

Run the yum repolist command to check whether the remi repository was added successfully
Run the yum repolist command to check whether the remi repository was added successfully

5. Uninstall the programs related to PHP 5.3.3.

Uninstall the programs related to PHP 5.3.3
Uninstall the programs related to PHP 5.3.3

6. Install the PHP 5.4 programs by running the command:

yum install php php-mysqlnd php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-cli php-common php-devel php-mbstring php-mcrypt php-soap php-bcmath

Install the PHP 5.4 programs by running the command
Install the PHP 5.4 programs by running the command

7. The command failed because php-mcrypt was still being installed from the EPEL repository, whose latest version is 5.3.3. It needs to be installed from the remi repository to get version 5.4.

The command failed because php-mcrypt was still being installed from the EPEL repository, whose latest version is 5.3.3. It needs to be installed from the remi repository to get version 5.4.
The command failed because php-mcrypt was still being installed from the EPEL repository, whose latest version is 5.3.3. It needs to be installed from the remi repository to get version 5.4.

8. Edit the /etc/yum.repos.d/epel.repo file and change priority=11 to #priority=1.

Edit the /etc/yum.repos.d/epel.repo file and change priority=11 to #priority=1
Edit the /etc/yum.repos.d/epel.repo file and change priority=11 to #priority=1

9. Install the PHP 5.4 programs again by running the command:

yum install php php-mysqlnd php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-cli php-common php-devel php-mbstring php-mcrypt php-soap php-bcmath

Install the PHP 5.4 programs again by running the command
Install the PHP 5.4 programs again by running the command

10. The installation succeeded, and the current version is 5.4.42.

The installation succeeded, and the current version is 5.4.42
The installation succeeded, and the current version is 5.4.42

11. Checked the phpinfo information, and it is running normally.

Checked the phpinfo information, and it is running normally
Checked the phpinfo information, and it is running normally

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系