Since I have to setup my Raspberry Pi over and over again, I found it useful to have just “one command” to set the Apache Webserver, MySQL Database and PHP5 up. And here it is:
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install apache2 mysql-client mysql-server php5 libapache2-mod-php5 phpmyadmin -y && sudo /etc/init.d/apache2 restart && sudo apt-get 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 -y && sudo /etc/init.d/apache2 restart
This will update the package database, upgrade existing packages and install Apache2, MySQL Server, PHP5, PHPmyadmin and a whole bunch of extra-mods, which you probably won’t need.
You will only have to:
- enter passwords for setting up administrative user on MySQL Server
- whether you want to configure it to use apache2 and/or ligHTTPd
- enter password of administrative user of MySQL Database for setting up PHPmyadmin
You can cut the “-y”‘s out if you are not sure if you really want to upgrade/install.
Since its an empty install of Debian Wheezy in my case, I don’t care.