The unbuntu installation of apache2 Ubuntu provides us with the su apt-get install command, through which you can easily install some software, which is placed on the servers where Ubuntu is placed in various places, if the software you want to install is common, you can download it. sudo apt-get install apache2: configure the website directory. The apache directory under Ubuntu is stored in a very different way from that under windows, its configuration file is stored in the etc/apache2/folder, and the previous configuration file is divided into etc/apache2/conf. d/charset this is the website encoding configuration, the content is very little, open it to see it, I will be the last line of # AddDefaultCharset UTF-8 before # Remove, use UTF-8 encoding, of course you can also change the UTF-8 into another code. etc/apache2/sites-available/default this is the website directory configuration. If you want to change the website directory, modify this. The default website directory is/var/www (the owner is root, so it is inconvenient to modify.) Like a LINUX source, you must have certain permissions to modify the above configuration file. You can do this: 1: su input root Password 2: gedit etc/apache2/conf. d/charset or temporarily obtain permission 1: sudo gedit etc/apache2/conf. d/charset restart apache. sudo service apache2 restart can also be sudo/etc/init. d/apache2 restart BTW: init. d below is the startup registration of system service programs (such as xinet, samba, vsftp, xserver, apche, mysql) for each init. files in the x Directory indicate whether or not services are running at the running level. The files are usually scripts used to start and end services, you can use any editor to open mysql. By the way, the method for enabling mysql is the same as that of apche: sudo/etc/init. d/mysql start I do not know when I have successfully installed mysql, because of my/etc/nit. d/The directory contains the mysal file, so I enter mysql on the terminal and the ERROR 1044 (42000) is displayed ): access denied for user'' @ 'localhost' to database' H' I think it's right to enter mysql -- user = root-p due to permission issues, then you can run the MySql command on the final disconnection, for example, mysql> show databases;