Last active
August 29, 2015 14:13
-
-
Save rogerbush8/db4266946b4a02e967ed to your computer and use it in GitHub Desktop.
Clean interactive install on Debian Wheezy of Apache2 with PHP and MySQL support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shell commands to interactively install Apache2 with PHP and MySQL support on Debian Wheezy | |
# This is not an automatic script (but could be easily converted). Assumes you have root. | |
# @see https://gist.github.com/rogerbush8/945baf7a3f1a9ae99ab1 - rogerbush8/install-debian-wheezy-mariadb-10 | |
# which could be performed as a prerequisite for simple client/server install. | |
# Update | |
apt-get update | |
apt-get upgrade --show-upgraded | |
# Install apache2 | |
apt-get install apache2 apache2-doc apache2-utils | |
# Install php5 and php5 mysql | |
apt-get install libapache2-mod-php5 php5 php-pear php5-xcache | |
apt-get install php5-mysql | |
# Now some smoketests - see if apache2 has been started: | |
ps auxwww | grep apache2 | |
# Test if apache2 serves static files | |
curl http://localhost | |
# The easiest way to see if php is working and examine the libraries | |
# loaded, is to create a simple script in /var/www: | |
cat > /var/www/info.php | |
<?php | |
phpinfo(); | |
[CTRL-D] | |
curl http://localhost/info.php | |
# Testing the MySQL connection will take much more setup. We can | |
# at least test whether PHP has loaded the correct client side | |
# libraries, by pointing our browser to http://<newhost>/info.php | |
# and looking through the HTML info page for pdo_mysql. N.B. | |
# mine says "Client API version 10.0.15-MariaDB". | |
# N.B. the webserver will need additional configuration and | |
# setup based on the PHP applications we intend to run. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment