In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the method of installing php-fpm under linux, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
The method of installing php-fpm under linux: 1, download the compressed package and decompress it; 2, enter the decompressed directory and execute the [. / configure] command to configure the installation environment; 3, edit the configuration file and turn on the corresponding function; 4, execute the [/ usr/local/bin/php-fpm] command to run.
Specific methods:
1. Install the compilation environment
Considering that the components of the included source are not available, you can install the epel third-party source first.
Yum-y install epel-releaseyum-y install gcc automake autoconf libtool make gcc-c++ glibc libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel libmcrypt mcrypt mhash php-mcrypt
2. Download the php version package
The version package of this installation environment is php5.6
Wget http://cn2.php.net/distributions/php-5.6.24.tar.gztar zvxf php-5.6.24.tar.gzcd php-5.6.24
3. Compilation
In the process of compiling php, if you want php to support the corresponding functions, you need to install the corresponding components before compiling.
. / configure-- prefix=/usr/local/php-- enable-fpm-- with-mcrypt-- enable-mbstring-- disable-pdo-- with-curl-- disable-debug-- disable-rpath-- enable-inline-optimization-- with-bz2-- with-zlib-- enable-sockets-- enable-sysvsem-- enable-sysvshm-- enable-pcntl-- enable-mbregex-with-mhash-- enable-zip-- with-pcre-regex-- with-mysql-- with-mysqli make & make install
4. Configuration file
Copy the configuration file, modify some of the code, and turn on the functions in php as needed
Cp php.ini-development / usr/local/php/php.inicp / usr/local/php/etc/php-fpm.conf.default / usr/local/php/etc/php-fpm.confcp sapi/fpm/php-fpm / usr/local/bin
Modify the php-fpm.conf configuration file to run with www users and www user groups
Vim / usr/local/php/etc/php-fpm.conf# is modified to the following; Unix user/group of processes; Note: The user is mandatory. If the group is not set, the default user's group; will be used.user = wwwgroup = www
Modify the php.ini to enable the required php functions according to the requirements
Vim / usr/local/php/php.ini##display_errors = Ondisplay_startup_errors = Onerror_prepend_string = "
"error_append_string ="
"fastcgi.impersonate = 1date.timezone = asia/Shanghaiextension=php_mysql.dllextension=php_gd2.dllextension=php_mbstring.dll
5. Run
/ usr/local/bin/php-fpm# to see if netstat-anop is running | grep php
The following interface indicates normal operation:
Thank you for reading this article carefully. I hope it will be helpful for everyone to share the method of installing php-fpm under linux. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.