Created
July 4, 2013 16:46
-
-
Save muratayusuke/5929054 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# set up ubuntu | |
# http://blog.codeboutique.com/post/creating-debian-squeeze-box-for-vagrant | |
sudo su | |
apt-get update | |
apt-get upgrade | |
apt-get install build-essential module-assistant | |
m-a prepare | |
# install guest addition | |
# http://d.hatena.ne.jp/hirokiky/20110822/1314033552 | |
mount /dev/dvd /mnt | |
apt-get install xserver-xorg xserver-xorg-core | |
sh /mnt/VBoxLinuxAdditions.run | |
visudo | |
# add "vagrant ALL=(ALL) NOPASSWD: ALL" after "root ALL=(ALL) ALL " | |
/etc/init.d/sudo restart | |
adduser vagrant | |
mkdir /home/vagrant/.ssh | |
chmod 700 /home/vagrant/.ssh | |
cd /home/vagrant/.ssh | |
curl 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' > authorized_keys | |
chown -R vagrant:vagrant /home/vagrant/.ssh | |
rm -rf /usr/share/doc | |
rm -rf /usr/src/vboxguest* | |
rm -rf /usr/src/virtualbox-ose-guest* | |
rm -rf /usr/src/linux-headers* | |
find /var/cache -type f -exec rm -rf {} \; | |
rm -rf /usr/share/locale/{af,am,ar,as,ast,az,bal,be,bg,bn,bn_IN,br,bs,byn,ca,cr,cs,csb,cy,da,de,de_AT,dz,el,en_AU,en_CA,eo,es,et,et_EE,eu,fa,fi,fo,fr,fur,ga,gez,gl,gu,haw,he,hi,hr,hu,hy,id,is,it,ka,kk,km,kn,ko,kok,ku,ky,lg,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,nb,ne,nl,nn,no,nso,oc,or,pa,pl,ps,pt,pt_BR,qu,ro,ru,rw,si,sk,sl,so,sq,sr,sr*latin,sv,sw,ta,te,th,ti,tig,tk,tl,tr,tt,ur,urd,ve,vi,wa,wal,wo,xh,zh,zh_HK,zh_CN,zh_TW,zu} | |
dd if=/dev/zero of=/EMPTY bs=1M | |
rm /EMPTY | |
shutdown -h now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment