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

How to install php with suse in detail

藏色散人
Release: 2023-03-12 13:54:01
Original
2094 people have browsed it

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
Copy after login

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
Copy after login

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
Copy after login

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]-->
Copy after login

5. Create a test file with the extension PHP

<?php  
phpinfo();  
?>
Copy after login

6. Restart Apache

#/usr/local/services/apache2/bin/apachectl restart
Copy after login

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!

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 admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template