Home >Backend Development >PHP Tutorial >Building a php environment under Linux

Building a php environment under Linux

WBOY
WBOYOriginal
2016-07-29 09:13:21804browse

The simplest and crudest way: yum install php

will automatically download dependency packages, including apache, in the default directory /var/www/html;

If you need to install mysql, you need to use yum -y install httpd php mysql mysql-server php-mysql

Start command: service httpd start

If there is a firewall, you need to configure the port: vi /etc/sysconfig/iptables

Reference: http://blog.csdn.net/phpboy005/article/details/4352436

Customized configuration:

apr and apr-util Download address http://apr.apache.org/download.cgi
pcre Download address http://www.pcre.org/
libxml2 Download address http://www. linuxfromscratch.org/blfs/view/svn/general/libxml2.html
php Download address http://php.net/get/php-5.5.30.tar.gz/from/a/mirror
apache Download address http: //httpd.apache.org/download.cgi

There are many installation procedures, but I will not introduce them in detail. Reference: http://www.2cto.com/kf/201505/401216.html

Note: Please do not download pcre Download pcre2; if the download response time is long, you can use Thunder to copy the url to download; An error is reported when installing libxml2, which should be a problem with the operating system.

The above introduces the establishment of a PHP environment under Linux, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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 admin@php.cn
Previous article:HTTP Content-typeNext article:HTTP Content-type