Archive for the ‘Modding’ Category

a headless Debian Lenny VirtualBox install

After extreme disappointment with VMware Server 2, I thought I might try setting up a headless VirtualBox install with a hopefully faster web interface. I need to be able to run Windows Server 2008 instances on occasion to troubleshoot and test my scripts on IIS7. I also am looking for a more regularly updated virtualization software to take over my aging VMware server 1.10 installs.

Much of the following is based off of “VBoxHeadless – Running Virtual Machines With VirtualBox 3.1.x On A Headless Debian Lenny Server“, “instructions [Debian Backports]“,  and the VirtualBox.org website’s information about Debian VBox setups. FYI: this install was done on a fresh Lenny netinstall (logged in as root … duh!), and the apt-get install command grabed about 200MB worth of compressed packages that unarchive into about 500MB worth of disk space used.

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | apt-key add -
wget -q http://backports.org/debian/archive.key -O- | apt-key add -
echo -e "\ndeb http://download.virtualbox.org/virtualbox/debian lenny non-free\ndeb http://www.backports.org/debian lenny-backports main contrib non-free" >> /etc/apt/sources.list
apt-get update
apt-get install virtualbox-3.2 dkms
groupadd vboxers
useradd -d /home/vboxers -m -g vboxers -s /bin/bash vboxers
passwd vboxers
adduser vboxers vboxusers
apt-get install libapache2-mod-php5
a2dissite default
mkdir -p /srv/vbox
chmod -R 777 /srv
echo -e "<VirtualHost *:80>\nDocumentRoot /srv/vbox\n</VirtualHost>" > /etc/apache2/sites-enabled/vbox
/etc/init.d/apache2 restart
apt-get install screen

Open up the local start up file “vi /etc/rc.local” and insert “su vboxers -c "screen -dmS vboxwebsrv vboxwebsrv"” before the “exit 0″. Download the phpvirtualbox code [http://phpvirtualbox.googlecode.com/files/phpvirtualbox-0.5.zip], unzip and modify the config.php file to match the vboxers user we set up earlier. Finally upload the contents of the archive to the vbox directory over SFTP or something. Reboot the machine (for good measure), and you should be able to go to http://host/ to access the web interface. Beware this a completely unprotected setup!

rtorrent 11 on Debian 5

For those of you looking for DHT support with the default rtorrent package that it is in the Debian 5 apt repos you are out of luck. Currently the only way to get DHT support for rtorrent is to use the 0.8.5-2 release for Debian “Squeeze” (testing).

So to get rtorrent working with DHT, go about the installation like you would usually:
apt-get update
apt-get upgrade
apt-get -y install rtorrent
apt-get remove rtorrent libtorrent10
(should leave dependencies installed)
wget http://http.us.debian.org/debian/pool/main/r/rtorrent/rtorrent_0.8.6-1_i386.deb (for i386) (UPDATED 08/17/2010)
wget http://http.us.debian.org/debian/pool/main/libt/libtorrent/libtorrent11_0.12.6-2_i386.deb (for i386) (UPDATED 08/17/2010)
wget http://http.us.debian.org/debian/pool/main/o/openssl/libssl0.9.8_0.9.8o-1_i386.deb (for i386) (ADDED 08/17/2010)
dpkg -i libtorrent11_*.deb
dpkg -i rtorrent_*.deb
dpkg -i libssl*.deb

Your version of rtorrent, should now have DHT and PEX support.

For automatically starting rtorrent, you can download an init script from the libtorrent project, that works real great.
wget http://libtorrent.rakshasa.no/raw-attachment/wiki/RTorrentCommonTasks/rtorrentInit.sh
mv rtorrentInit.sh /etc/init.d/rtorrent
chmod +x /etc/init.d/rtorrent

vi /etc/init.d/rtorrent (change the user in the config file to a different user account, your own? that has a .rtorrent.rc in it’s home directory –> /home/[user]/.rtorrent.rc)
vi /etc/rc.local < — stick in the line “/etc/init.d/rtorrent start” before the “exit 0″

Make a .rtorrent.rc startup file, so that /etc/init.d/rtorrent works properly
wget http://vraidsys.com/tutorials/rtorrent.rc
mv rtorrent.rc /home/[user]/.rtorrent.rc
vi /home/[user]/.rtorrent.rc (change user to the user you want this to run as)
mkdir -p /home/[user]/torrents/session
chown [user] /home/[user]/.rtorrent.rc <-- run this if doing everything from the root user
chmod -R 777 /home/[user]/torrents <-- I do this so that I can access my torrents from several user accounts. see comments section. [Edit 1/1/2010]

Now restart the machine: shutdown -r now

When you log back in, torrents should be automatically downloaded to the /home/[user]/torrents/ directory, when you stick .torrent files in the /home/[user]/torrents/ directory. You can also access the screen thread by screen -r rtorrent in a terminal session.

HyperVM and double virtualization?

Yesterday I finished up some server setup research for this upcoming Virtual Private Server (VPS) hosting project of mine. Hopefully within the month I will start leasing VPS’s. To do this, I needed a pretty stable and inexpensive control panel that will let users manage/re-image their VPS. None of the FOSS web managers had these two necessary capabilities that I need. So I went with HyperVM, a OpenVZ/Xen VPS web manager that I’ve seen in use by one of my hosting providers, Jadase. The only reason I stick with them is because I got grandfathered into the VPS 2 plan for $10/month. You can’t beat that! Well I will sure be able to beat out their VPS prices, I’ll be charging $13.50/month for the eqivalent of their VPS 2 plan.

Back to HyperVM. It is increadible easy to install on a CentOS 5.2 machine! Follow the HyperVM install instructions found here, once you have the physical box you want this to run on set up with a barebones CentOS 5.2 install. The install downloads about 1.1 GB of data, which is mainly the VPS templates for OpenVZ and Xen. HyperVM comes with a 5 VPS license built in (for testing), and licensing is really cheap and easy (compared to VMware ESX and Server 2003 Volume Licensing). HyperVM is USD $0.50/month per VPS.

I’ve tried rolling VMware server and workstation on OpenVZ nodes in the past, but I figured I’d give it a go again just for kicks. Still I was unable to get the proper kernel-headers to work with gcc to compile VMware server/workstation. The RPMs run just fine installing the components, but then compiling and installing the various compents (especially vmon) during the vmware-config.pl seems to fail time-and-time again. I just can’t get gcc to work with the custom OpenVZ kernel. I suppose it was never meant to be … two level of virtualization.

Your Ad Here

Return top