$sudo apt-get update                                    //update
 
$sudo apt-get install tasksel                           //install tasksel
 
$sudo tasksel                                           //check the condition of insallation
 
$sudo tasksel inctall lamp-server                       //install lamp
 
$sudo apt-get install phpmyadmin                        //install the mysql management tool
 
$sudo php5enmod mcrypt                                  //solve the lack of mcrypt
 
$sudo ln -s /usr/share/phpmyadmin/ /var/www/html        //establish soft link
 
$sudo service apache2 restart                           //restart apache service
 
Reference:
 
Appendix:
change the port 
1. /etc/apache2/ports.conf
$sudo vim /etc/apache2/ports.conf 

  (NameVirtualHost *:80)

  ###there is no this part in the same file of my ununtu

  Listen 8001

  ###the default port is 80
 
2. /etc/apache2/sites-enabled/000-default.conf
$sudo vim /etc/apache2/sites-available/000-default.conf
  <VirtualHost *:8001>
  ###change to the new port, the default one is 80
 
3. $echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf
    $sudo a2enconf fqdn
 
4. $ sudo service apache2 restart
 
Reference:
[1] http://blog.csdn.net/yeqishi/article/details/6867033
[2] http://askubuntu.com/questions/256013/could-not-reliably-determine-the-servers-fully-qualified-domain-name
05-11 16:01
查看更多