Install javastuserver on the VM to configure LAMP

Source: Internet
Author: User
1. Download javastuserverhttp: // response. 3. Update Ubuntuapt-getupdate4. Install gccapt-getinstallgcc5. Install ssh, Which is started by default after installation,

1. Download the Ubuntu server http://www.ubuntu.org.cn/download/

2. Set the root account

By default, the root password is not set after the installation is complete.

$ Sudo passwd root

.

3. Update Ubuntu

Apt-get update

4. Install gcc

Apt-get install gcc

5. Install ssh, Which is started by default after installation, so that you can access Ubuntu through SecureCRT. [Linux community www.Linuxidc.com] is also my main purpose.

(After gcc is installed, go to the chichunyan/home directory and ask for cd.... Go to root @ ubuntu #)

Apt-get install openssh-server openssh-client

Stop ssh:/etc/init. d/ssh stop

Start ssh:/etc/init. d/ssh start

Restart ssh:/etc/init. d/ssh restart

6. Install LAMP

Because Ubuntu Server comes with an administrator tool, you can use

$ Sudo tasksel

Select LAMP for installation.

Of course, you can also manually install apache, php, and mysql

1) install apache2

Sudo apt-get install apache2

After the installation is complete, enter http: // yourserverip in the browser. If "it works!" appears on the webpage !", Indicates that the installation is successful.

2) install php5

Sudo apt-get install php5 libapache2-mod-php5

Restart apache:

Sudo/etc/init. d/apache2 restart

Edit a php file in the/var/www/directory to test whether the php installation is successful.

Sudo vim/var/www/index. php

Add the php statement to the index. php file:

<? Php phpinfo ();?>

Check http: // yourserverip/index. php. If the installation is successful, the php configuration information appears.

3) install Mysql

Sudo apt-get install mysql-server

By default, mysql can only be accessed at 127.0.0.1. Modify the mysql Configuration:

Sudo vim/etc/mysql/my. cnf

Comment out "bind-address = 127.0.0.1.

Restart mysql

Sudo/etc/init. d/mysql restart

4) install mysql for apache http server

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

Edit the configuration file:

Sudo vim/etc/php5/apache2/php. ini

Find "; extension = mysql. so" and remove the comment ";". If not, add this sentence in the appropriate position.

Restart apache:

Sudo/etc/init. d/apache2 restart

LAMP installation and configuration are successful.

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.