Linux下快速搭建PHP环境(linux 搭建 php)

recently, due to the outbreak of novel coronavirus, more and more people need to work from home. Fortunately, with the help of linux system and php, people can easily build a development environment at home. Therefore, for those who want to build a php development environment quickly under Linux, here are some tips.

成都创新互联成立与2013年,先为镶黄等服务建站,镶黄等地企业,进行企业商务咨询服务。为镶黄企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

Step 1: install Apache on Linux

You can first use the command “sudo apt-get install apache2” to install Apache service. In addition, you can also your web server directory/var/www/html in the web browser, if it is displayed as a normal web page, it means Apache has been installed successfully.

Step 2: Install PHP

Then use the command “sudo apt-get install php7 libapache2-mod-php7 php7-mcrypt” to install the PHP service which is supported by Apache. After installation is complete, do not forget to run “sudo /etc/init.d/apache2 restart” to restart Apache service.

Step 3: Install MySQL

If you need to use MySQL, you can use the command “sudo apt-get install mysql-server mysql-client ” to install the MySQL service. After installation is complete, run “mysql -u root -p” to start mysql login mode and then enter “show databases;” to check if MySQL has been installed successfully.

Step 4: Install PhpMyAdmin

After installation of mysql is complete, use “sudo apt-get install phpmyadmin apache2-utils” to install phpMyAdmin which can be used to manage MySQL databases and users through a web browser. After installation, you need to configure some config files in the etc/phpmyadmin folder.

Apart from the steps above, you still need to configure some specific PHP settings in the config files. It is recommended that you follow the relevant tutorials on web regularly and update the related environment as soon as possible to ensure the security and stability of your work environment.

In a nutshell, building a php development environment under Linux is not that difficult. After following the steps above, you can quickly build the php development environment under Linux and successfully run the php programs.

成都网站设计制作选创新互联,专业网站建设公司。
成都创新互联10余年专注成都高端网站建设定制开发服务,为客户提供专业的成都网站制作,成都网页设计,成都网站设计服务;成都创新互联服务内容包含成都网站建设,小程序开发,营销网站建设,网站改版,服务器托管租用等互联网服务。

新闻名称:Linux下快速搭建PHP环境(linux 搭建 php)
文章分享:http://www.shufengxianlan.com/qtweb/news47/234697.html

网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联