2011年5月19日 星期四

Install Apache+PHP+MySQL+phpMyAdmin on Ubuntu

1. Install Apache:
sudo apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils
2. Install PHP:
sudo apt-get install php5 libapache2-mod-php5 php5-common php5-gd php5-mysql php5-imap php5-cli php5-cgi php-pear php-auth
3. Install MySQL:
sudo apt-get install mysql-server mysql-client
這裡需要輸入mysql的root密碼

4. Install PhpMyAdmin:
sudo apt-get install phpmyadmin
這裡會做一些phpmyadmin的設定

5. Now your server is ready. Before you test please make sure to restart the server:
sudo service mysql restart
sudo service apache2 restart

6.資料庫預設目錄:/var/lib/mysql
網頁預設目錄:/var/www
Apache設定檔:/etc/apache2/apache2.conf
PHP設定檔:/etc/php5/apache2/php.ini
phpmyadmin預設安裝目錄:/usr/share/phpmyadmin

沒有留言: