Home > Backend Development > PHP Tutorial > Ubuntu branch Linux operating system installation LAMP environment, ubuntulamp_PHP tutorial

Ubuntu branch Linux operating system installation LAMP environment, ubuntulamp_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 09:49:23
Original
874 people have browsed it

Ubuntu branch Linux operating system installs LAMP environment, ubuntulamp

Step1. Install Apache

 Enter the command in the terminal

<span>sudo</span> apt-get <span>install</span> apache2
Copy after login

Open the browser and enter: 127.0.0.1 in the address bar. If "It works!" appears, the installation is successful

Step2. Install php5

Enter in terminal:

<span>sudo</span> apt-get <span>install</span> php5 libapache2-mod-php5 php5-mysql
Copy after login

Restart apache2:

<span>sudo</span> /etc/init.d/apache2 restart
Copy after login

注:如果你想关闭 apache 服务,可以执行如下命令:

    sudo /etc/init.d/apache2 stop

    如果想打开 apache 服务,可以执行如下命令:

    sudo /etc/init.d/apache2 start

    mysql 的重启、关闭、启动命令也和 apache2 的相应命令类似

Note: If you want to shut down the apache service, you can execute the following command:

sudo /etc/init.d/apache2 stop

If you want to open the apache service, you can execute the following command:

sudo /etc/init.d/apache2 start
<span>sudo</span> gedit /var/www/testphp.php
Copy after login

The restart, shutdown, and startup commands of mysql are also similar to the corresponding commands of apache2

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

Test whether php5 is installed successfully:

In the opened file, enter the following php code:

Save and close the file, enter the following IP address in the browser address bar: 127.0.0.1/testphp.php. If information about php appears, it means that php is installed successfully

<span>sudo</span> apt-get <span>install</span> mysql-server mysql-client
Copy after login

Step3. Install mysql

Enter the following command in the terminal and execute it:

During the installation process, the interface for setting a password for the root user in mysql will appear. Just follow the prompts

 

<span>sudo</span> apt-get <span>install</span> libapache2-mod-auth-mysql php5-mysql phpmyadmin
Copy after login

Step4. Install phpmyadmin

<span>sudo</span> <span>chmod</span> <span>777</span> /var/www
Copy after login

Enter the following command in the terminal and execute

http://www.bkjia.com/PHPjc/1020127.htmlwww.bkjia.com
true
http: //www.bkjia.com/PHPjc/1020127.html
TechArticleUbuntu branch Linux operating system installs LAMP environment, ubuntulamp Step 1. Install Apache Enter the command sudo apt-get install in the terminal apache2 Open the browser and enter: 127.0...
Related labels:
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