How to install and configure Linux PHP 5.5
Linux php5.5 installation and configuration method: first download and install php5.5; then modify the configuration information; finally start through the command "/usr/local/php-5.5.0/sbin/php-fpm" php-fpm".
Recommended: "PHP Video Tutorial"
Installation and configuration of php5.5 under Linux
Install php5.5 under Linux environment (specifically centos 6.6)
First, we need to download and install php5.5
cd /usr/local/src/ wget http://www.php.net/get/php-5.5.0.tar.bz2/from/jp1.php.net/mirror
If the above PHP does not exist Yes, you can go directly to the official download.
Make sure you have installed gd, png, curl, xml and other lib development libraries before installation. If you are not sure, execute the following command:
yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y
The following parameters are supported, ftp, picture function, pdo, etc. are supported. Because the mysqlnd that comes with PHP is used, there is no need to install additional mysql lib library. If you If it is a 64-bit system, add –with-libdir=lib64 after the parameter. If not, you can skip it.
tar -xjf php-5.5.0.tar.bz2 cd php-5.5.0 ./configure --prefix=/usr/local/php-5.5.0 --with-config-file-path=/usr/local/php-5.5.0/etc --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-dom --enable-xml --enable-fpm make make install
Note: If PHP does not need curl and ftp support, you can remove the above –with-curl –enable-ftp. If you are a professional Linux practitioner, you can choose by looking at the help Your installation parameters, if you are not, I suggest you copy and paste my configuration parameters directly. This will save you some detours.
PHP has been installed, let’s start configuring PHP
cp php.ini-production /usr/local/php-5.5.0/etc/php.ini cp /usr/local/php-5.5.0/etc/php-fpm.conf.default /usr/local/php-5.5.0/etc/php-fpm.conf
In fact, we just use a configuration it provides us by default. Of course, you can also modify the configuration information according to your own needs, and then start php-fpm
/usr/local/php-5.5.0/sbin/php-fpm
Execute the above command, if no error is reported, it is normal In this case, it means that the startup is normal. If you are not sure, you can also judge whether PHP is started through the port
netstat -lnt | grep 9000 tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN
or:
ps -ef | grep php-fpm root 3321 1 0 14:33 ? 00:00:00 php-fpm: master process (/usr/local/php-5.5.0/etc/php-fpm.conf) nobody 3322 3321 0 14:33 ? 00:00:00 php-fpm: pool www nobody 3323 3321 0 14:33 ? 00:00:00 php-fpm: pool www root 3325 3059 0 14:33 pts/0 00:00:00 grep php-fpm
If a result similar to this appears, it means that our PHP is installed.
The above is the detailed content of How to install and configure Linux PHP 5.5. 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)

Hot Topics

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.
