Instantly share code, notes, and snippets.

Embed
What would you like to do?
steps to set up AMI in same manner as was done for post
1) install drupal & apache
wget http://ftp.drupal.org/files/projects/drupal-7.12.tar.gz
tar zxvf drupal-7.12.tar.gz
sudo apt-get install apache2 php5-mysql php5-gd libapache2-mod-php5 php-apc php5-cli
sudo mkdir /var/www/drupal
sudo mv drupal-7.12/* drupal-7.12/.htaccess /var/www/drupal
sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php
sudo chown www-data:www-data /var/www/drupal/sites/default/settings.php
sudo mkdir /var/www/drupal/sites/default/files
sudo chown www-data:www-data /var/www/drupal/sites/default/files/
sudo service apache2 restart
2) install MySQL 5.6 binary
wget http://downloads.mysql.com/snapshots/pb/mysql-5.6-labs-april-2012/mysql-5.6.6-labs-april-2011-linux2.6-x86_64.tar.gz
tar zxvf mysql-5.6.6-labs-april-2012-linux2.6-x86_64.tar.gz
sudo rm -rf /etc/mysql /etc/my.cnf
sudo apt-get install libaio1
sudo groupadd mysql
sudo useradd -r -g mysql mysql
sudo mv mysql-5.6.6-labs-april-2012-linux2.6-x86_64 /usr/local/
sudo ln -s /usr/local/mysql-5.6.6-labs-april-2012-linux2.6-x86_64/ /usr/local/mysql
cd /usr/local/mysql
sudo chown -R mysql .
sudo chgrp -R mysql .
sudo ./scripts/mysql_install_db --user=mysql
sudo chown -R root .
sudo chown -R mysql data
sudo cp support-files/my-medium.cnf /etc/my.cnf
sudo cp support-files/mysql.server /etc/init.d/mysql.server
export PATH=$PATH:/usr/local/mysql/bin
3) create MySQL user for drupal
mysqladmin -u root create drupal
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'drupaluser'@'localhost' IDENTIFIED BY 'drupalpass'
FLUSH PRIVILEGES;
4) install drupal through browser
5) install devel and views module through drupal interface in browser
6) install drush for data generation
wget http://ftp.drupal.org/files/projects/drush-7.x-5.1.tar.gz
tar zxvf drush-7.x-5.1.tar.gz
sudo ln -s drush/drush /usr/bin/drush
7) generate data with drush
drush generate-users 50000
drush generate-terms tags 1000
drush generate-vocabs 5000
drush generate-menus 5000
drush generate-content 100000 100
The contents of the my.cnf file for the MySQL instance is:
[client]
port = 3306
socket = /tmp/mysqld.sock
[mysqld]
port = 3306
socket = /tmp/mysqld.sock
skip-external-locking
table_open_cache = 2048
innodb_data_home_dir = /usr/local/mysql/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/data
innodb_buffer_pool_size = 6G
innodb_log_buffer_size = 512M
innodb_flush_log_at_trx_commit = 1
innodb_flush_method = O_DIRECT
innodb_file_per_table
slow_query_log=1
long_query_time=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment