Skip to content

Vagrant

Emre Sokullu edited this page Jan 11, 2018 · 4 revisions
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
Clone this wiki locally