Ubuntu branch Linux operating system install LAMP environment, ubuntulamp_PHP tutorial

Source: Internet
Author: User
Install the LAMP environment on the Linux operating system of the Ubuntu branch, and run Ubuntu. Ubuntu branch Linux operating system install LAMP environment, ubuntulampStep1. install Apache in terminal input command sudoapt-getinstallapache2 open the browser, in the address bar input: 127.0 Ubuntu branch Linux operating system install LAMP environment, login tulamp

Step1. install Apache

  Enter the command in terminal

sudo apt-get install apache2

Open your browser and enter 127.0.0.1 in the address bar. if "It works!" appears !", Indicates that the installation is successful.

Step 2 install php5

In terminal, enter:

sudo apt-get install php5 libapache2-mod-php5 php5-mysql

Restart apache2:

sudo /etc/init.d/apache2 restart

Note: to disable the apache service, run the following command:

Sudo/etc/init. d/apache2 stop

To open the apache service, run the following command:

Sudo/etc/init. d/apache2 start

The restart, close, and start commands of mysql are similar to those of apache2.

Test whether php5 is successfully installed:

sudo gedit /var/www/testphp.php

In the open file, enter the following php code:

 

Save and close the file. in the address bar of the browser, enter the following ip address: 127.0.0.1/testphp. php. if any information about php appears, it indicates that php is successfully installed.

Step 3 install mysql

Run the following command in terminal:

sudo apt-get install mysql-server mysql-client

During the installation process, the password setting interface is displayed for the root user in mysql. just follow the prompts.

  

Step 4. install phpmyadmin

Enter the following command in terminal and execute

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

Adjust the permissions of the/var/www directory to facilitate editing website files in the future.

sudo chmod 777 /var/www

Step1. install Apache. in terminal, enter the command sudo apt-get install apache2 to open the browser. in the address bar, enter 127. 0...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.