Created
July 3, 2013 20:18
-
-
Save rhamdeew/5922423 to your computer and use it in GitHub Desktop.
Мой набор костыльных самопальных скриптов для старта виртуальной машины (VirtualBox Headless) с CentOS 6.4 + VestaCP для веб-разработки
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#запускать из под root | |
iptables -A FORWARD -o eth0 -i vboxnet0 -s 192.168.56.0/24 -m conntrack --ctstate NEW -j ACCEPT | |
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
iptables -A POSTROUTING -t nat -j MASQUERADE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#vesta - это название директории для монтирования, пользователь admin у меня авторизуется по ключу | |
sshfs admin@192.168.56.101:/home/admin/web ~/vesta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Запускает виртуалку, нужно подождать где-то секунд 30 | |
/usr/lib/virtualbox/VBoxNetAdpCtl vboxnet0 add | |
vboxmanage modifyvm "CentOS 6" --nic1 hostonly --nictype1 82540EM --hostonlyadapter1 vboxnet0 | |
vboxmanage startvm "CentOS 6" -type headless |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment