How to install php environment on centos

藏色散人
Release: 2020-10-30 09:27:16
Original
4466 people have browsed it

How to install the php environment in centos: first add the epel source and remi source; then install PHP through yum; then check the PHP version through "php -v"; finally start php-fpm.

How to install php environment on centos

Recommended: "centos tutorial"

Preface

To install the PHP development environment in CentOs environment, you need to first install some source files, and then use the yum command to install it directly. There is already a PHP source in the Fedora 20 source. You can directly use the following command Just install it:

  # yum install php-fpm php-common php-devel php-mysqlnd php-mbstring php-mcrypt
Copy after login

The following will introduce my process of installing the php environment under centos:

1. First add the epel source:

# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

2. Then add the remi source:

# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

3. Install PHP

# yum --enablerepo=remi,remi- php55 install php-fpm php-common php-devel php-mysqlnd php-mbstring php-mcrypt

4. View PHP version
# php -v

##5. Start php- fpm
# service php-fpm start

##6. Set up php -fpm starts automatically at boot:

# chkconfig --add php-fpm
# chkconfig php-fpm on

(End) by still、

The above is the detailed content of How to install php environment on centos. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!