Ubuntu-安裝Apache2 + PHP5 + MySQL + phpMyAdmin

安裝MySQL-Server

$ sudo apt-get install mysql-server

安裝Apache HTTP Server

$ sudo apt-get install apache2

安裝PHP for Apache HTTP Server

$ sudo apt-get install php5

安裝MySQL for Apache HTTP Server

$ sudo apt-get install libapache2-mod-auth-mysql
$ sudo apt-get install php5-mysql

安裝phpMyAdmin

$ sudo apt-get install phpmyadmin

裝完後必須先新增一個mysql的帳號

$ mysqladmin -u root password [密碼]

修改phpmyadmin路徑

$ sudo vim /etc/apache2/conf.d/phpmyadmin.conf

將Alias /phpmyadmin /usr/share/phpmyadmin
修改成 Alias /phpmyadmin /var/www/phpmyadmin

修改成

完畢後套件會自動在/var/www下建立連結,網址列輸入http://127.0.0.1/phpmyadmin即可進入

資料庫預設目錄:/var/lib/mysql
網頁預設目錄:/var/www
Apache設定檔:/etc/apache2/apache2

參考:  http://www.wretch.cc/blog/apin925/25029503

One thought on “Ubuntu-安裝Apache2 + PHP5 + MySQL + phpMyAdmin

  1. Pingback: ubuntu install php, mysql, phpmyadmin « Chunwen's Blog

發表迴響

Copy Protected by Chetan's WP-Copyprotect.