1. Home > programming >

Installation of Apache/PHP/MySQL on Ubuntu practice_MySQL

UbuntuApache

System environment: Ubuntu 10.04.4 LTS, x86_64 GNU/Linux

1. Install Apache2

1) sudo apt-get install apache2

2) Enter the password, and do some operations according to the prompts

3) test:

4) Modify the default Document Root

* sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/webserver

* sudo gedit /etc/apache2/sites-available/webserver

* change the Document Root to point to the location you want. For ex:

DocumentRoot /home//server/

/ server/>

5) Activate the new configuration

sudo a2dissite default && a2ensite webserver

6) Restart Apache HTTP Server

sudo / etc/init.d/apache2 reload

2. Install PHP5

1) Install PHP5 and Apache PHP5 module

sudo apt-get install php5 libapache2-mod -php5

2) Restart Apache2

sudo /etc/init.d/apache2 reload

3) Test PHP5 is working, write a phpinfo.php< /p>

sudo gedit /home//server/phpinfo.php

Enter content:

Access: you can see Go to some basic php information

3. Install MySQL

1) sudo apt-get install mysql-server mysql-client

2) Install the php5-mysql package and let PHP support MySQL

sudo apt-get install php5-mysql

3) Install phpMyAdmin: MySQL manager

sudo apt-get install phpmyadmin

Some options:

Web server to configure automatically: Apache2

Configure database for phpmyadmin with dbconfig-common: No

4) You can create some soft links to the directory of /home//server (that is, the root directory of Apache2 settings), for example:

cd /home//server/

sudo ln –s /usr/share/phpmyadmin

5) Visit address:

Content recommendation: free high-definition PNG material download

This article is published by www.internetweblist.com and does not represent the position of www.internetweblist.com/:http://www.internetweblist.com/programming/82336.html

Contact Us

Online consultation:click here to give a message