Wednesday, March 30, 2011

Apache + PHP + MySQL on Ubuntu 10.10 (LAMP)

Under root privileges
sudo su
MySQL
aptitude install mysql-server mysql-client
Apache
aptitude install apache2
PHP
aptitude install php5 libapache2-mod-php5

/etc/init.d/apache2 restart
Test PHP
vi /var/www/info.php
<?php
phpinfo();
?>
http://localhost/info.php

aptitude search php5
PHP library
aptitude install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
/etc/init.d/apache2 restart
PHPMyAdmin
aptitude install phpmyadmin
Note
  • Apache's default document root is /var/www on Ubuntu, and the configuration file is /etc/apache2/apache2.conf. Additional configurations are stored in subdirectories of the /etc/apache2 directory such as /etc/apache2/mods-enabled (for Apache modules), /etc/apache2/sites-enabled (for virtual hosts), and /etc/apache2/conf.d

No comments:

Post a Comment