Forked from waxpancake/ThinkUp on EC2 Ubuntu User-Data Script
Created
January 6, 2011 15:47
-
-
Save delfuego/768042 to your computer and use it in GitHub Desktop.
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
#!/bin/bash -ex | |
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
# install ThinkUp on EC2 Ubuntu instance: | |
# | |
# @spara 12/23/10 | |
# @waxpancake 1/3/11 | |
# install required packages | |
sudo apt-get update | |
sudo apt-get -y install apache2 php5-mysql libapache2-mod-php5 | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -q -y mysql-server | |
sudo apt-get -y install unzip | |
sudo apt-get -y install curl libcurl3 libcurl3-dev php5-curl php5-mcrypt php5-gd --fix-missing | |
sudo apt-get -y install sendmail | |
# enable SSL in apache | |
sudo ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/001-default-ssl | |
sudo ln -s /etc/apache2/mods-available/ssl.load /etc/apache2/mods-enabled/ssl.load | |
sudo ln -s /etc/apache2/mods-available/ssl.conf /etc/apache2/mods-enabled/ssl.conf | |
# restart apache to init php packages | |
sudo service apache2 restart | |
# not necessary but nice to have | |
#sudo apt-get -y install phpmyadmin | |
wget https://github.com/downloads/ginatrapani/ThinkUp/thinkup-0.7.zip --no-check-certificate | |
sudo unzip -d /var/www/ thinkup-0.7.zip | |
# config thinkup installer | |
sudo ln -s /usr/sbin/sendmail /usr/bin/sendmail | |
sudo chown -R www-data /var/www/thinkup/_lib/view/compiled_view/ | |
sudo touch /var/www/thinkup/config.inc.php | |
sudo chown www-data /var/www/thinkup/config.inc.php | |
# create database | |
mysqladmin -u root password NEWPASSWORDHERE | |
mysqladmin -h localhost -u root -pNEWPASSWORDHERE create thinkup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment