How to set up a linux server PHP environment

angryTom
Release: 2020-02-05 14:19:25
Original
4337 people have browsed it

How to set up a linux server PHP environment

How to build a linux server PHP environment

1. Use yum to install php

How to set up a linux server PHP environment

#2. Restart the Apache server.

Note: You can use yum –y install httpd to install the apache server.

systemctl restart httpd
Copy after login

3. Install the php extension. After the installation is complete, you also need to restart the Apache server.

yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel
Copy after login

4. Create in the /var/www/html directory l.php file and add the following code to save it.

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

5. Visit the l.php file in the site directory with your browser to see the effect.

How to set up a linux server PHP environment

Recommended related tutorials:

How to build a PHP server environment in CentOS

How to set up a PHP server environment in CentOS 7?

The above is the detailed content of How to set up a linux server PHP environment. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!