Debian installation Lamp

Source: Internet
Author: User

1. Installing Apache2

#apt-get Install Apache2.2-common apache2

#apache2ctl Start//Launch Apache

#apache2ctl Stop//off APAHCE

#apache2ctl Restart//restart Apache

Browser: 127.0.0.1 open (it work)

2. Install MySQL

#apt-get Install Mysql-server

Test Mysql:#mysql-u Root-p

The 
  prompts you to set a password for the root user during installation, and if it is not set, it can be completed after installation:  

#/usr/bin/mysqladmin-u root password ' Secret '

test MySQL,
#mysql-u root-p
// The following is a procedure for testing and building a table in MySQL
mysql> CREATE DATABASE mydomain; Query OK, 1 row Affected (0.00 sec) mysql> use mydomain;database changedmysql> CREATE TABLE Pet (name VARCHAR), ow ner varchar, species varchar, sex CHAR (1), Birth date, death date); Query OK, 0 rows affected (0.01 sec) mysql> INSERT into pet VALUES (' puffball ', ' Diane ', ' hamster ', ' f ', ' 1999-03-30 ', NULL) ; Query OK, 1 row Affected (0.00 sec) mysql> INSERT into pet VALUES (' Libby ', ' Diane ', ' dog ', ' f ', ' 2001-04-15 ', NULL); Query OK, 1 row Affected (0.00 sec) mysql> SELECT * from pet;+----------+-------+---------+------+------------+------- +| Name     | owner | species | Sex  | birth      | death |+----------+-------+---------+------+------------+-------+| Puffball | Diane | Hamster | F    | 1999-03-30 | NULL  | | Libby    | Diane | Dog     | f    | 2001-04-15 | NULL  |+----------+-------+---------+------+------------+-------+2 rows in Set (0.00 sec) Mysql> Quitbye

3. Installing PHP5

Apt-get Install LIBAPACHE2-MOD-PHP5

4. Install HP5 MySQL Extensions

#apt-get Install PHP5-MYSQL5.

Next, install a Web tool that manages MySQL phpMyAdmin

  #apt-get Install phpMyAdmin

During the installation process, you will be prompted which Web server to use as its server, select Apache2. and set the phpMyAdmin administrator name Admin and password. After installation, you will be prompted to restart Apache2.

Test, IE input in host OS: http://192.168.203.131/phpmyadmin/

The results show that the need to display the MySQL extension can not be loaded, the reason is not installed php5-mysql, ah, obviously already installed. No way, after reinstalling, refresh the webpage, everything OK.

Log in with your MySQL account to manage MySQL.

Test that the entire Web server is working properly, ftp the student's game directory to the guest OS (Debian), and copy it to the/var/www directory.
Then visit: http://192.168.203.131/game/

Reference: http://blog.csdn.net/bennyfun79/article/details/4074899

Http://www.cnblogs.com/KoalaDream/p/4634075.html

Debian installation Lamp

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.