php5.5 installation tutorial
php5.5 installation method: first download the PHP source code package; then add the epel source and create a www user; then compile through commands such as "cd /usr/local/src/php-5.5.15/" Install; finally modify the corresponding configuration file.
Recommended: "PHP Video Tutorial"
php5.5 Compilation and Installation
System environment: centos6.5
PHP package: 5.5.15
1 |
|
Download PHP source code package
1 2 3 4 5 6 |
|
Add epel source
1 2 3 |
|
Create www user
1 2 |
|
Compile and install
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
Your Web Server
uses Apache. Please add something like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
Compile and install
1 2 |
|
Reinstall:
1 2 3 4 5 |
|
Configure PHP
Configuration file
1 |
|
php-fpm service
1 2 3 |
|
Start php-fpm
1 2 3 4 |
|
Change to:
1 |
|
Enable PHP environment variables to take effect: # . ~/.bash_profile
Check the PHP version: php -v
Settings Auto-start at boot
1 |
|
rc.local may also appear in the directory of /etc/init.d
Add yum source
CentOS 6.x source
1 2 |
|
Install PHP
1 2 3 4 |
|
Install the 5.6 version as remi-php56, and install the 5.5 version as remi-php55
How to configure php-fpm as a service in Linux
1. Configure php-fpm.conf
1 |
|
php-fpm.pid directory must point to: /usr/local/php/var/run/php-fpm.pid
2. Copy the php-fpm script to the /etc/init.d directory
1 |
|
3. Set permissions and start php-fpm:
1 2 3 |
|
Finally, give php-fpm to start as a service, Stop and restart:
1 2 3 |
|
View version information
php -v
php install bcmath module
1 yum -y install php-bcmath
find / -name bcmath.so
2 Find the php configuration file
1 |
|
Add the code: extension=bcmath.so
3Run php-m if it appears
1 |
|
It means that the bcmath module has been loaded multiple times, and step 2 is not necessary.
Encountered failure to install the repository file:
Install a higher version of php: use the yum source, enable remi-php56, and an error is reported when installing the extension:
1 yum -y install php-gd --skip-broken
2Yum source problem, the selected yum source and system version are not compatible
1 2 3 |
|
Or change the yum source
1 |
|
The above is the detailed content of php5.5 installation tutorial. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
