Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build PHP Development Environment under Linux

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Xiaobian to share with you how to build PHP development environment under Linux, I believe most people still do not know how, so share this article for your reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!

PHP is a powerful server-side scripting language for creating dynamic interactive sites. PHP is free and widely used. PHP, meanwhile, is another productivity option for competitors like Microsoft ASP.

1. Install apache[root@VM_0_5_centos /]# yum -y install httpd The following figure shows that the installation is successful! 2. Install php[root@VM_0_5_centos /]# yum -y install php The following figure shows installation success 3. Install php-fpm[root@VM_0_5_centos /]# yum -y install php-fpm The following figure shows installation success 4. Install php-mysql[root@VM_0_5_centos /]# yum -y install php-mysql The following figure shows installation success 5. Install apache extension [root@VM_0_5_centos /]# yum -y install httpd-manual mod_ssl mod_install perl mod_auth_mysql appears The following figure indicates that the installation is successful 6. Install php extensions [root@VM_0_5_centos /]# yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc appears The following figure indicates that the installation is successful 1. Start apache[root@VM_0_5_centos /]# service httpd start

Enter "http://localhost/" in the browser address bar to test whether it is available. The effect is as follows

The following figure shows that the apache server is available. Note that if nginx or other servers occupy port 80, they cannot start successfully.

2. testing php

Enter the apache web root directory: /var/www/html Remember this path address, FTP or SSH upload the project to this address, of course, you can reconfigure or host your own file.

Here is a test to see if php is available.

[root@VM_0_5_centos html]# vi test.php

Insert the following:

Save: wq Enter

Enter "http://localhost/test.php" in the browser address bar to test if it is available. The effect is as follows

The following figure shows that php service is available. If it cannot be displayed, note whether php extension and apache are installed successfully.

img

We're done! The requested URL/var/www/html/was not found on this server.

The above is "How to build PHP development environment under Linux" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report