Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of installing php in Linux

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article analyzes "what is the method of installing php in Linux". The content is detailed and easy to understand, and friends who are interested in "what is the method of installing php in Linux" can follow the editor's train of thought to read it in depth. I hope it will be helpful to everyone after reading. Let's follow the editor to learn more about "what is the method of installing php in Linux".

The method of installing php in Linux: 1, download and decompress "php-7.0.30.tar.gz"; 2, download and install dependency; 3, through ". / configure-- prefix=/usr/local/php..." Compile and install php;4 and configure PHP-related files.

This article operating environment: linux5.9.8 system, php-7.0.30 version, DELL G3 computer

Install php under Linux

1. Download

Wget http://cn2.php.net/distributions/php-7.0.30.tar.gz decompresses tar-zxvf php-7.0.30.tar.gz

2. Download and install dependencies

Yum-y install gcc openssl openssl-devel curl curl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel pcre pcre-devel libxslt libxslt-devel bzip2 bzip2-devel

3. Compile and install php

. / configure-- prefix=/usr/local/php-- with-config-file-path=/usr/local/php/etc-- with-pdo-mysql-- with-mysqli-- with-gd-- with-zlib-- with-mcrypt-- enable-fpmmake & & make install installation, don't forget that make test has the following error configure: error: mcrypt.h not found. Please reinstall libmcrypt. Fixed yum install-y epel-releaseyum install-y libmcrypt-devel recompilation

4. Configure PHP related files

1) configure php.ini, this is the php configuration file: cp / etc/we/php-7.1.11/php.ini-development / usr/local/php/lib/php.ini2) configure php-fpm.conf, this is the php-fpm configuration file: cp / usr/local/php/etc/php-fpm.conf.default / usr/local/php/etc/php-fpm.conf3) configure www.conf Configure the user's file: cp etc/php-fpm.d/www.conf.default etc/php-fpm.d/www.conf4) copy the php-fpm startup file to the init.d folder for easy startup php: cp / usr/local/php/sbin/php-fpm / etc/init.d/php-fpm

5. Start php to determine whether the installation is successful.

Execute the command / etc/init.d/php-fpm to see if it starts: ps-ef | grep php's method of installing php on Linux is shared here. I hope the above content can improve everyone. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report