How to install php5.5: First compile and download it to the install directory, and install the dependencies of the PHP software; then install the libiconv software, and download and decompress the PHP software; then create a soft link to the PHP software program. And configure the php parsing file; finally start the [php-fpm] program.
[Related learning recommendations: php programming (video)]
php5.5 Installation method:
1. Compile and download to the /install/ directory
# Upload to the /install/ directory
-rw-r--r-- 1 root root 17773092 Apr 1 10:19 php-5.5.32.tar.gz
2. Install PHP software dependencies
Command: (check) yum install -y zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel
Command: (check) rpm -qa zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel gd -devel libcurl-devel libxslt-devel
3, libiconv software installation---Character set conversion library (you can not install it by default)
Command: (switch ) cd /install/
command: (download) wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
command: (unzip )tar zxf libiconv-1.14.tar.gz
Command: (switch) cd /install/libiconv-1.14
Command: (continue) /install/libiconv-1.14/configure --prefix =/opt/libiconv
Command: (Translate) make
Command: (Compile and install) make install
Command: (Switch) cd /install/
Command: (Download)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
Command: (Download) yum install libmcrypt-devel mhash mcrypt -y
Command: (Check) rpm -qa libmcrypt-devel mhash mcrypt
4. Download and decompress PHP software
Command: (switch) cd /opt/
Command: (decompress) tar xf php-5.5.32 .tar.gz
Command: (switch) cd /opt/php-5.5.32
Command: (configure)
./configure \ --prefix=/opt/php-5.5.32 \ --with-mysql=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-iconv-dir=/opt/libiconv \ --with-freetype-dir \ --with-jpeg-dir \ --with-png-dir \ --with-zlib \ --with-libxml-dir=/usr \ --enable-xml \ --disable-rpath \ --enable-bcmath \ --enable-shmop \ --enable-sysvsem \ --enable-inline-optimization \ --with-curl \ --enable-mbregex \ --enable-fpm \ --enable-mbstring \ --with-mcrypt \ --with-gd \ --enable-gd-native-ttf \ --with-openssl \ --with-mhash \ --enable-pcntl \ --enable-sockets \ --with-xmlrpc \ --enable-soap \ --enable-short-tags \ --enable-static \ --with-xsl \ --with-fpm-user=nginx \ --with-fpm-group=nginx \ --enable-ftp \ --enable-opcache=no ./configure --prefix=/opt/php-5.5.32 --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir=/opt/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=nginx --with-fpm-group=nginx --enable-ftp --enable-opcache=no
======= ================================================== ====================
Note: Note: When deploying LNMP architecture, if the mysql service and web service are not on the same host, the php configuration parameters Need to be adjusted
--with-mysql=/application/mysql/ => --with-mysql=mysqlnd
PHP extension parameters: (If there is no problem with the configuration, you can omit the following configuration parameters, The following parameters are related to PHP optimization)
--with-curlwrappers \ --enable-zip \ --enable-zend-multibyte \
5, fear of making mistakes (error prevention) (the following information does not need to be configured)
Command: (Create soft connection) ln -s /application/mysql/lib/libmysqlclient.so.18 /usr/lib64/
Command: (Create file) touch ext/phar/phar.phar
Command: (Proceed Translate php) make
command: (compile and install php) make install
6, PHP software program to create a soft link
command: (create Soft link) ln -s /opt/php-5.5.32/ /opt/php
7, configure php parsing file/configure php-fpm configuration file
Command: (switch) cd /opt/php-5.5.32
Command: (view) ll php.ini*
-rw-r--r--. 1 1001 1001 69236 2016-02-02 21:33 php.ini-development -rw-r--r--. 1 1001 1001 69266 2016-02-02 21:33 php.ini-production
(php.ini-developments is a configuration file for developer debugging , php.ini-production is a common configuration file for production)
Command: (copy) cp php.ini-production /opt/php/lib/php.ini
php.ini- Comparison of the difference between production and php.ini-development files
Extension: File comparison command diff zdiff vimdiff File comparison on windows
Command: (switch) cd /application/php/etc/
Command: (switch) cp php-fpm.conf.default php-fpm.conf
(The following content depends on the situation)
# When compiling and installing PHP, if the configuration is not Correctly specify the PHP process user information, you can modify the PHP file to adjust
sed -i 's#user = www#user = nginx#g;s#group = www#group = nginx#g' /application/ php-5.5.32/etc/php-fpm.conf
8, start php-fpm program
Command: (start)/application/php/sbin/ php-fpm
Command: (Check the port) lsof -i :9000
Command: (Check the program) ps -ef| grep php-fpm
Related recommendations:Programming video course
The above is the detailed content of How to install php5.5. For more information, please follow other related articles on the PHP Chinese website!

The article compares ACID and BASE database models, detailing their characteristics and appropriate use cases. ACID prioritizes data integrity and consistency, suitable for financial and e-commerce applications, while BASE focuses on availability and

The article discusses securing PHP file uploads to prevent vulnerabilities like code injection. It focuses on file type validation, secure storage, and error handling to enhance application security.

Article discusses best practices for PHP input validation to enhance security, focusing on techniques like using built-in functions, whitelist approach, and server-side validation.

The article discusses strategies for implementing API rate limiting in PHP, including algorithms like Token Bucket and Leaky Bucket, and using libraries like symfony/rate-limiter. It also covers monitoring, dynamically adjusting rate limits, and hand

The article discusses the benefits of using password_hash and password_verify in PHP for securing passwords. The main argument is that these functions enhance password protection through automatic salt generation, strong hashing algorithms, and secur

The article discusses OWASP Top 10 vulnerabilities in PHP and mitigation strategies. Key issues include injection, broken authentication, and XSS, with recommended tools for monitoring and securing PHP applications.

The article discusses strategies to prevent XSS attacks in PHP, focusing on input sanitization, output encoding, and using security-enhancing libraries and frameworks.

The article discusses the use of interfaces and abstract classes in PHP, focusing on when to use each. Interfaces define a contract without implementation, suitable for unrelated classes and multiple inheritance. Abstract classes provide common funct


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

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver CS6
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.