2015年2月8日 星期日

在 Raspberry Pi 安裝 Apache

pi@raspberrypi ~ $ sudo apt-get install apache2 php5 libapache2-mod-php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libonig2 libqdbm14 lsof php5-cli php5-common ssl-cert
Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom php-pear openssl-blacklist
The following NEW packages will be installed:
  apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libonig2 libqdbm14 lsof php5 php5-cli
  php5-common ssl-cert
0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded.
Need to get 7493 kB of archives.
After this operation, 22.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
為了學習更多 Raspberry Pi 及 Python 的東西,我想出了一個項目。這個項目需要用上 Apache。而 NOOBS 預設沒有帶 Apache,需要另外安裝。在終端輸入「sudo apt-get install apache2 php5 libapache2-mod-php5」。等候安裝完成輸入「sudo reboot」重啟一次。最後還要把網頁的根目錄設定權限「sudo chown -R pi /var/www」。大功告成!

沒有留言: