-
-
Notifications
You must be signed in to change notification settings - Fork 3
Vagrant
Emre Sokullu edited this page Jan 11, 2018
·
4 revisions
-
https://scotch.io/tutorials/how-to-create-a-vagrant-base-box-from-an-existing-one
-
https://gist.github.com/esokullu/ea80dcb8188afa9b9c9ae2d5de09fd92
vagrant init hashicorp/precise64
vagrant up
vagrant ssh
# customization
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vim
sudo apt-get install apache2
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
sudo mysql_install_db
sudo /usr/bin/mysql_secure_installation
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
sudo apt-get install php5-cgi php5-cli php5-curl php5-common php5-gd php5-mysql
sudo service apache2 restart
# customization ends
# cleanup
# make sure redis and neo4j are clean
sudo apt-get clean
rm ~/.rediscli_history
rm ~/.neo4j/.neo4j_history
rm ~/.php_history
sudo dd if=/dev/zero of=/EMPTY bs=1M
sudo rm -f /EMPTY
cat /dev/null > ~/.bash_history && history -c && exit
# cleanup ends
vagrant package --output mynew.box
vagrant box add mynewbox mynew.box
vagrant destroy
rm Vagrantfile
vagrant init mynewbox