Advertisement
Guest User

Untitled

a guest
Dec 27th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3.  
  4. Vagrant.configure(2) do |config|
  5. config.vm.box = "hashicorp/precise32"
  6. config.vm.network "private_network", ip: "1.0.0.2"
  7. config.vm.hostname = 'sucessfood'
  8. config.vm.synced_folder "./target", "/var/lib/tomcat7/webapps"
  9.  
  10. config.vm.provision "shell", run: "always", inline: <<-SHELL
  11. apt-get update
  12.  
  13. echo "INSTALLING TOMCAT7"
  14. apt-get install tomcat7 -y
  15. apt-get install tomcat7-admin -y
  16. echo "<tomcat-users><user username='admin' password='admin' roles='admin-gui,manager-gui'/></tomcat-users>" > /etc/tomcat7/tomcat-users.xml
  17. service tomcat7 restart
  18.  
  19. echo "INSTALLING POSTGRES 9.1"
  20. apt-get install postgresql-9.1 -y
  21. echo "listen_addresses = '*'" >> /etc/postgresql/9.1/main/postgresql.conf
  22. echo "host all all 0.0.0.0/0 password" >> /etc/postgresql/9.1/main/pg_hba.conf
  23. echo "ALTER USER postgres PASSWORD 'postgres';" | sudo -u postgres psql template1
  24. #echo "CREATE DATABASE <NAME>;" | sudo -u postgres psql template1
  25. service postgresql restart
  26.  
  27. echo "DONE!"
  28. echo ":)"
  29. SHELL
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement