Skip to content

Instantly share code, notes, and snippets.

@Mulkave
Created July 29, 2013 09:41
Show Gist options
  • Save Mulkave/6103264 to your computer and use it in GitHub Desktop.
Save Mulkave/6103264 to your computer and use it in GitHub Desktop.
Script to install drupal on Amazon AWS EC2 instances (AMI)
# update
sudo yum -y update
# install nginx -- the web server to be used with this installation
# for virtual host configuration visit https://gist.github.com/Mulkave/6103129
sudo yum install nginx
# install php and mysql
sudo yum -y install mysql mysql-server php54 php54-cli php54-gd php54-intl php54-mbstring php54-mcrypt php54-mysql php54-pdo php-pear php54-xml php54-xmlrpc
# Upgrade pear
sudo pear upgrade
# Make pear recognize drush
sudo pear channel-discover pear.dush.org
sudo pear install drush/drush
# Install Drupal with drush
sudo drush dl
sudo mv drupal-7.x/* ./
sudo rm -r drupal-7.x
# ---------------------------------------------------------------------
# IMPORTANT! The following instructions have to be performed manually
# ---------------------------------------------------------------------
# Start MySQL
sudo service mysqld start
# Change root user password
sudo mysqladmin -u root password 'new-password-of-your-own'
# Connect
mysql -u root -p
password: [ENTER PASSWORD HERE]
# perform a security enhancement thingy
mysql> DROP DATABASE test;
mysql> DELETE FROM mysql.user WHERE user='';
mysql> FLUSH PRIVILEGES;
Ctrl-C
@gabrielferreira
Copy link

Please change to sudo pear channel-discover pear.drush.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment