Home >Backend Development >PHP Tutorial >Tutorial on installing Apache PHP MySQL_PHP on Ubuntu 7.04 system
1. Install Apache2+PHP5+MySQL
sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd mysql-server php5-mysql phpmyadmin
joelhy reminder You can use Synaptic to install this step with the same effect.
Open Synaptic, Edit –> Use task grouping to mark packages –> Check LAMP Server
Then install phpmyadmin separately
sudo apt-get install phpmyadmin
2. Enable mod_rewrite module
sudo a2enmod rewrite
3. Configure apache2.conf
sudo gedit /etc/apache2/apache2.conf
Remove the comment "#" before AddHandler cgi-script .cgi.
Then add this paragraph anywhere:
DocumentRoot "/var/www/"
Options FollowSymLinks
AllowOverride None
Restart the server
sudo /etc/init.d/apache2 restart
Done.
Note: PHP programs can be placed under /var/www/, and CGI programs can be placed under /var/www/cgi-bin/.
Isn’t it too simple? Excluding the download time, the configuration can be completed in less than a minute. Do I still need the APM package on Ubuntu? Just remember the following commands and locations.
sudo /etc/init.d/apache2 restart (restart apache)
sudo gedit /etc/php5/apache2/php.ini (configure php.ini)
sudo gedit /etc/apache2/apache2.conf (configuring apache2.conf)
/var/www/ (home directory location)
The above server configuration has been tested and can run WordPress and Habari normally. , Movable Type.