Install the lamp favorites using the new IDE manager in ubuntu9.04
I. Installation
1. Install the lamp component in Ubuntu
System-> System Management-> New Software Package Manager, open new software package, edit-> MARK software package by Task Group-> select lamp server.
2. Install phpMyAdmin
System-> System Management-> New Software Package Manager, open the new software package search phpMyAdmin, and mark the installation.
Or sudo apt-Get install phpMyAdmin to establish a hard connection between phpMyAdmin and apache2. For example, run the following command to access the/home/dreamcatcher/WWW directory of my www: sudo ln-S/usr/share/PHPmyAdmin/home/dreamcatcher/WWW can be opened in the browser address bar http: // localhost/phpMyAdmin.
3. Enable mod_rewrite module
Sudo a2enmod rewrite
4. apachesupports .htm. html. php
Sudo gedit/etc/apache2/apache2.conf
Add
Addtype application/X-httpd-PHP. php. htm. html
Solve the Problem of Garbled text in Firefox, or this file, and add
Adddefacharcharset UTF-8
Here the UTF-8 can also be replaced by gb2312 according to the actual situation.
5. Restart Apache
Sudo/etc/init. d/apache2 restart
6. Start MYSQL: mysql-u root-P. Enter the password as prompted.
If:
* Restarting Web Server apache2
Apache2: cocould not reliably determine the server's fully qualified domain name, using 127.0.1.1 for servername
Apache2: cocould not reliably determine the server's fully qualified domain name, using 127.0.1.1 for servername
Continue sudo gedit/etc/apache2/apache2.conf
Add servername 127.0.0.1 to the end of the file.
7. Remember the following commands and locations to help you do a lot of work.
Sudo/etc/init. d/apache2 restart (restart Apache)
Sudo gedit/etc/PhP5/apache2/PHP. ini (configure PHP. INI)
Sudo gedit/etc/apache2/apache2.conf (configure apache2.conf)
/Var/www/cgi-bin/(CGI program)
Ii. Configure apache2.conf
Sudo gedit/etc/apache2/apache2.conf
If your computer does not have a graphical interface installed, you should use Vim to edit it. The command is:
Sudo Vim/etc/apache2/apache2.conf
Remove the comment "#" before addhandler CGI-script. cgi.
Then add such a segment in any place:
<Virtualhost localhost> jaeitug
DocumentRoot/var/www/jaeitug
<Directory/> jaeitug
Options followsymlinksjaeitug
AllowOverride alljaeitug
</Directory> jaeitug
<Directory/var/www/cgi/> jaeitug
Options execcgijaeitug
</Directory> jaeitug
</Virtualhost> jaeitug
Restart the server with the following command:
Sudo/etc/init. d/apache2 restart
Note: PhP programs can be stored under/var/www/. cgi programs can be stored under/var/www/cgi. If you need to modify the folder location, you still need to modify the configuration of the/etc/apache2/apache2.conf file. After modification, remember to restart the apahce service.
Remember the following commands:
Sudo/etc/init. d/apache2 restart (restart Apache)
Sudo gedit/etc/PhP5/apache2/PHP. ini (configure PHP. INI) jaeitug
Sudo gedit/etc/apache2/apache2.conf (configure apache2.conf) jaeitug
/Var/www/(home directory location)
The above server configuration can be tested to run WordPress, habari, and movable type normally.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/strongstone/archive/2009/08/06/4420298.aspx