Skip to content

Instantly share code, notes, and snippets.

@bfagundez
Last active August 29, 2015 14:24
Show Gist options
  • Save bfagundez/39d9953d6a5d13b8fb68 to your computer and use it in GitHub Desktop.
Save bfagundez/39d9953d6a5d13b8fb68 to your computer and use it in GitHub Desktop.
bootstrap tom
#!/usr/bin/env bash
# add Ruby 2.2 PPA from brightbox (https://www.brightbox.com/blog/2015/01/05/ruby-2-2-0-packages-for-ubuntu/)
apt-add-repository ppa:brightbox/ruby-ng
apt-get update
apt-get install -y ruby2.2 ruby2.2-dev
apt-get install -y automake bison build-essential git-core libffi-dev libreadline6-dev libgdbm3 libgdbm-dev libncurses5-dev libssl-dev libtool libyaml-dev vim zlib1g-dev ntp
sudo apt-get install cmake cmake-gui libboost1.55-dev unzip
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.5-m15.tar.gz
tar xfz mysql-5.7.5-m15.tar.gz
cd mysql-5.7.5-m15
mkdir bld
cd bld
cmake .. -DMAX_INDEXES=255
cd ..
make
make install
cd /usr/local/mysql
groupadd mysql
useradd -r -g mysql mysql
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql
chown -R root .
chown -R mysql data
cp /usr/local/mysql/share/english/errmsg.sys /usr/share/mysql/.
chown mysql /var/run/mysqld
chgrp mysql /var/run/mysqld
bin/mysqld_safe -user=mysql&
bin/mysqladmin -u root password auto4fun
/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
apt-get remove apparmor -y
mysql -uroot -pauto4fun -e "create database auto_data_development"
cd /home/vagrant/auto-data
gem install bundler -v 1.9.6
sudo -H -u vagrant bundle install
sudo -H -u vagrant rake db:migrate
sudo -H -u vagrant rake db:seed
sudo -H -u vagrant rake db:import
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment