Home  >  Article  >  Backend Development  >  Tutorial on installing Apache PHP MySQL_PHP on Ubuntu 7.04 system

Tutorial on installing Apache PHP MySQL_PHP on Ubuntu 7.04 system

WBOY
WBOYOriginal
2016-07-15 13:24:16720browse

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.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446784.htmlTechArticle1. Install Apache2+PHP5+MySQL sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd mysql -server php5-mysql phpmyadmin joelhy reminds you that you can use Synaptic to install this step...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn