Home  >  Article  >  Backend Development  >  How to install php with suse in detail

How to install php with suse in detail

藏色散人
藏色散人Original
2021-09-13 09:59:372065browse

Suse method to install php: 1. Install Libxml through "make install"; 2. Install "php-5.5.14.tar.gz"; 3. Copy the configuration file; 4. Modify Apache2 and configure httpd .conf to support PHP; 5. Restart Apache.

How to install php with suse in detail

The operating environment of this article: linux5.9.8 system, PHP5.5.14 version, DELL G3 computer

suseHow to install php in detail?

suse linux install php and enable apache to support php

1. Install Libxml libxml2-2.7.6.zip

# unzip libxml2-2.7.6.zip
# ./configure --prefix=/usr/local/services/libxml2 --with-zlib=/usr/local/services/zlib/  
# make  
# make install

2. Install php-5.5.14.tar.gz

# tar -zxvf php-5.5.14.tar.gz  
#  ./configure --prefix=/usr/local/services/php/ --with-mysql --with-apxs2=/usr/local/services/apache2/bin/apxs --with-libxml-dir=/usr/local/services/libxml2

Note: There is no parameter after --with-mysql, because mysql is installed using the rpm package

3. Copy the configuration file

# cp php.ini-production /usr/local/services/php/lib/php.ini

and modify short_open_tag = On

4. Modify the Apache2 configuration httpd.conf to support PHP

Insert the following content in AddType application/x-gzip .gz .tgz

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

5. Create a test file with the extension PHP

<?php  
phpinfo();  
?>

6. Restart Apache

#/usr/local/services/apache2/bin/apachectl restart

Recommended learning: "PHP Video Tutorial"

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

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