Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Linux notes: install apache and php-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Recently there was a testing machine that planned to install a server environment for local testing. The thought is that after the download is back, the installation instructions can be installed, but it is not as easy as you think. After the ftp software is installed, you have never known how to upload and configure it. mysql has been installed, there is no way to start it. I don't know what the problem is.
Fortunately, apache has been installed, and php can be OK today. Note:
Alibaba Cloud's system is Red Hat Linux release 9 (Shrike)
First, download the file. It is easy to download it from the official website:
I downloaded httpd-2.2.6.tar.gz and php-5.2.0.tar.gz
The .tar.gz file is a gunzip compressed file packed with tar. In this case, extract tar-zxvf *** .tar.gz.
Decompress the package to the current folder.
./Configure-> make install
Generally, this step completes the installation of a software, but some parameters need to be adjusted in detail.
Install apache first:
$./Configure -- prefix =/usr/local/apache2
$ Make install
Apache2 is installed in the/usr/local/apache2 directory and started. If an error occurs during this process, you need to adjust it.
After successful installation, you can configure the apache documentation path
A Quan's machine was randomly configured and found that the first step was wrong.
After reading the prompt, it seems that compilation is not possible.
So it seems that the compilation environment has not been installed, and the environment is too sweaty. You can find it in the deletion and adding program:
Add development tools and kernel development software packages.
Apache2 is still smooth, making it difficult to install php.
The configure step prompts me to require a later version of libxml2-2.6 or above
We recommend that you find the missing file on this website:
When I installed libxml, I was prompted that I needed a autoconf-2.60, so I went
Fortunately, they can all be found, or I won't play anymore, haha
Install autoconf and libxml to compile php.
After compilation is completed, INSTALL in the php document.
Who knows that an error occurred while loading the php5 module during startup:
An error occurred while referencing undefined symbol: _ zend_list_delete.
An error occurred while performing operations. It's really depressing. cainiao is like this, but you can still ask for help on the Internet:
When you reference many friends to install apache and make it support php, you may encounter the undefined symbol: _ zend_list_delete error.
After apache and php are installed, the apache configuration file httpd. conf contains statements for starting the php module.
LoadModule php5_module modules/libphp5.so
Libphp5.so cannot find the library related to the zend_list function during runtime. I checked some solutions from a foreign website. My own method is: Add -- libdir =/usr/lib to configure when installing php, for example:
Try it and find that there is still an error. This article says there are other methods. I have read it. It may be because it was not cleared during compilation:
Reference there may be some problem with the path to libc and other libs on your system.
Per default php5 s configure script uses/usr/local/lib.
You might want to add some -- libdir =/usr/lib to your./configure
./Configure -- with-apxs2 =/usr/local/apache2/bin/apxs -- with-pear -- with-mcrypt -- with-mysql -- libdir =/usr/lib
To be sure it uses the new path do some
Run these two commands to clean up:
Then re-compile, so PHP5 is OK.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.