Skip to content

Instantly share code, notes, and snippets.

@kristjanmik
Created October 8, 2013 11:25
Show Gist options
  • Save kristjanmik/6883266 to your computer and use it in GitHub Desktop.
Save kristjanmik/6883266 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Starting the install process"
sleep 2
sudo apt-get update
echo "Installing Apache2"
sleep 2
sudo apt-get install -y apache2
read -p "Please enter a default password for the mysql database: " prompt
echo "mysql-server mysql-server/root_password password $prompt" >> mysql.config
echo "mysql-server mysql-server/root_password_again password $prompt" >> mysql.config
echo "mysql-server mysql-server/start_on_boot boolean true" >> mysql.config
cat mysql.config | sudo debconf-set-selections
sudo apt-get install -y mysql-server
echo "Installing PHP"
sleep 2
sudo apt-get install -y php5 libapache2-mod-php5 php5-mcrypt php5-mysql
sudo service apache2 restart
mysqladmin -u root -p"$prompt" create myblog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment