Skip to content

Instantly share code, notes, and snippets.

@waifung0207
Last active August 29, 2015 14:27
Show Gist options
  • Save waifung0207/1058a0cf368d508053f6 to your computer and use it in GitHub Desktop.
Save waifung0207/1058a0cf368d508053f6 to your computer and use it in GitHub Desktop.
Ubuntu 14.04 LAMP Setup
#!/bin/bash
# upgrade existing packages
sudo apt-get update && sudo apt-get -y upgrade
# set timezone
sudo dpkg-reconfigure tzdata
# install Apache server
sudo apt-get install -y apache2
# install MySQL server (need to type root password)
sudo apt-get install -y mysql-server php5-mysql
sudo mysql_install_db && sudo mysql_secure_installation
# install PHP
sudo apt-get install -y php5 libapache2-mod-php5 php5-mcrypt php5-gd php5-cli
sudo service apache2 restart
# other useful packages
sudo apt-get install -y vim git-core
# add phpinfo page
sudo echo "<?php phpinfo();" >> /var/www/html/info.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment