Debian deb source method to Upgrade PHP software package, Debian deb
Since I learned Linxu, I have always insisted on installing software packages by compiling methods. It seems that all the packages in the circle tend to be compiled. However, the searched compilation methods are a bunch of copy-and-paste commands, which are compiled by everyone, but almost no one has written what the various compilation commands represent and whether they are suitable for their own systems!
After attending the work, I felt that the PHP version provided by the system is installed quite well by default. It is simple and clear and does not need to waste effort on dependency packages. currently, almost all of the company's online PHP architectures are installed with apt-get, and services are running normally, especially in terms of hardware performance. As long as they are properly configured, they remain in a good running state, this is much more time-saving than the compilation method.
Due to the PHP language defects, You need to upgrade the PHP version frequently. This time, I will write out the upgrade process for reference.
System Version: Description: Debian GNU/Linux 7.11 (wheezy)
PHP version: 5.4.45-0 + deb7u1
The goal is clear: Upgrade PHP to 5.6
First find an origin site http://packages.dotdeb.org containing PHP5.6 code
Because my system distribution version is wheezy, the source station contains the same PHP5.6 source code as my debian system version, so you can directly edit/etc/apt/source. list file, add two lines of commands (here I will not write the meaning of the command, you can search online)
# Deb http://packages.dotdeb.org wheezy-php56 all
# Deb-src http://packages.dotdeb.org wheezy-php56 all
Because the site is a third-party source, it must be added to the system trust before use.
# Wget http://www.dotdeb.org/dotdeb.gpg
# Cat dotdeb. gpg | apt-key add-
Finally, you need to stop the PHP program you are running and uninstall the PHP Software Package (Note: Back up the PHP configuration file before uninstalling)
# Apt-get update
# Apt-get dist-upgrade php5 (Force install the latest PHP)
PHP version after upgrade: 5.6.27-1 ~ Dotdeb more than 7.1