Posts Tagged ‘Samba’

Migration Project: Part III – Building My VMs

Monday, October 15th, 2007

Now that I’ve got my physical machine up and running, I can get started with my virtuals. I’m going to go into some detail on the Linux one and not so much on the Windows one.

The Linux VM (referred to from here out as Ka) is going to be running my fully configured postfix server (acting as a relay for other machines on my lan), my wiki, my email (I use mutt) and the config files that go along with it, my IRC client and my IM client. This is where I want to keep my always on services. My Windows VM is named Peeves. It’ll be managing my online address book and my FTP server, not much else.

  • You may be wondering why my Samba server is running on the physical machine and not this one. It comes down to this; if I store all my media on the VM it becomes much harder to move it to a new machine and get it running if something ugly happens to the physical server. So, if something goes awry, I’ll be without my media for a while but I won’t be without mail and communications.

I performed the same installation/configuration I covered on the physical host with some changes when it came to installing my packages.

apt-get install ssh vim build-essential linux-headers-2.6-686 bzip2 p7zip-full less lsof lshw psmisc w3m lynx nload telnet host dnsutils ftp lftp vnstat file screen irssi unrar cksfv rsync smbfs samba postfix wakeonlan apache2 php5 libapache2-mod-php5 rcs libcgi-session-perl libdigest-sha1-perl libarchive-tar-perl libsasl2-modules mailx mutt procmail fetchmail urlview abook libgpgme11-dev libgpgme11 automake libgnutls-dev libgnutls13 autoconf libncurses5 libncurses5-dev gettext cogito liblzo1 liblzo-dev libcurl3-openssl-dev

  • Some of the applications (samba and postfix for example) will require that you provide some setup information. You’ll want to configure them for yourself.
  • If you don’t know what these packages are, you can do an apt-cache show <package> on Debian or Ubuntu.
  • It’s not obvious why I need all of these packages, many of them are required by Twiki and other applications I plan on compiling/running.

I also installed VMWare tools, I want the host to be able to start and stop the VMs in an orderly fashion and the tools allow that.

Now that everything is installed, I download and install Twiki (this will be the subject of another post). I use it for everything I need to document. That includes records of upgrades/changes to the house, complete and incomplete projects, info on TV shows we watch, side work I’ve done, fishing stuff (knots, laws, etc), gardening tips and schedules, and just about everything else I ever write down. Now that I have a wiki, I can’t imagine NOT having one… End rant on wiki, moving on.

Next I download and compile centerim. They have a list of dependencies and fixes for gotchas on the site. It was simple to do. It was between this and Pidgin, when it comes to console IM, I just prefer the look and feel of centerim.

Now I take a few minutes to configure Samba, I’m only sharing home directories. This makes it easy for me to save attachments from my email and have them quickly available to GUI desktops and Windows machines.

The next step was to configure postfix. I’ll be honest. I’m NOT a pro at ALL. I’ve been able to get postfix to act as a relay server for my LAN (and only my LAN) and to use SSL to authenticate with my ISP’s SMTP server for mail relay. I hand outgoing mail off to my ISP’s server to help prevent mail from me being marked as spam by pretty much every mail server in the world. It works and now that I have it that way, I’m just not touching it. I have a book on postfix that I hope to read (eventually). Maybe I’ll be a little more confident following the read and I can elaborate on this.

With that complete, I move on to building the Windows VM and shutting down my older hardware. This is the best part. I’ve shut down the two machines in the basement (albus & voldemort) and moved cerberus (formerly nix) to the dungeon. I can now keep darktower in standby as it’s no longer acting as a server and all of my documents and pictures live on the Samba server. Come the end of this month I’m going to (attempt to) use the Gparted Live CD to re-partition darktower and install Gutsy Gibbon, converting the machine to a dual boot.

My next step is to develop a backup routine and some scripts to automate it. I’ll be keeping my data on a remote Debian machine that I manage and I’ll be using SSH to transfer my data to it.

Migration Project: Part II – Building the Physical Host

Tuesday, October 9th, 2007

Before getting into the virtual machines, I should probably address the physical machine that’s going to run them. For hardware info, check out this page under the heading Nix/Cerberus. I’m going to be installing Debian Etch (stable) as the OS, and I’ll be doing it in the most minimal way. Read on…

During the installation of Debian, you’re asked several questions, for the most part you need to answer them for yourself. The important question, the one that gets you a basic install, is package selection. By default the installer wants to include “Desktop Environment” and “Standard System”, I chose to omit both. This leaves you with just enough to get the machine running (which IMO is a very good thing).

After the installer does all it needs to do, it’ll reboot the machine and leave you at the login prompt. If you’ve never sat in front of a GUI-less machine, then you’re in for a treat. Unplug your mouse, chuck it in the bin and get used to virtual terminals, screen sessions and tired fingers 😀

First things first, I need to get this machine going and I don’t have enough software to do all I need. I log in as root and make a few changes.

Remove the Debian CDROM as a source from /etc/apt/sources.list and Add contrib and non-free to the same file; it should look like:

deb etch main contrib non-free
deb-src etch main contrib non-free
deb etch/updates main contrib non-free
deb-src etch/updates main contrib non-free

Then update the Apt cache (apt-get update) and install my applications…

apt-get install ssh vim build-essential linux-headers-2.6-686 bzip2 p7zip-full less lsof lshw psmisc w3m lynx nload telnet host dnsutils ntp ftp lftp vnstat file screen unrar cksfv rsync hellanzb samba smbfs wakeonlan postfix mailx

  • Some of the applications (samba and postfix for example) will require that you provide some setup information. You’ll want to configure them for yourself.
  • I actually installed hellanzb from Debian testing as it’s a more current version of the app.
  • If you don’t know what these packages are, you can do an apt-cache show <package name> on Debian or Ubuntu.

This machine is not only going to host some virtual machines, but it’s going to act as a samba server, a shell server and the machine I use for various Usenet tasks and some other goodies. Given that, and the fact that I like to know what’s going on, I’ll be keeping an eye on my bandwidth usage. To do that, I’ll be using vnstat. Since it’s installed already, I need to create a database for my Ethernet adapter.

vnstat -u -i eth0

After that and some time, I can issue the vnstat [-<flag>] command to get some really handy network traffic statistics.

Because there are so many ways to configure a shell server and a samba server, I’m not going to get into the editing of the conf files. Basically, authentication with the shell server will be done via public/private keys only and I’ll be running it on an alternate port. Samba will be configured as a stand alone server and I will be required to enter a valid user/pass to view the shares.

Once all of those applications are installed and configured, one needs only to download the latest version of VMware Server and install that. I responded with all of the default answers while installing VMWare and was up and running in almost no time.

After a few other tweaks, preventing users from entering /root and other user’s homes, adjusting umask for my account and installing ClamAV from the Debian Volatile repos (to scan samba shares), I’m up and running.

There you have it, the quick setup for the physical server that’s taking over @ the flat. Next I’ll start working up the VMs.

Migration Project: Part I – Hardware (physical and virtual)

Sunday, September 23rd, 2007

Last time I wrote, I gave the overview of a project I’ve begun at the house. Here’s the hardware I’m working with and the roles the machines will be performing (or not, as the case may be).

These first 2 guys are the older noisy machines that I need to replace. They have loud fans and louder hard disks. I don’t notice the noise so much since I moved them to the basement, but I *know* they’re down there making noise…


A Pentium III (Coppermine) 1GHz running on a SuperMicro P3TSSA motherboard. This baby is maxed out with 512MB PC133 SDRAM. This was a great machine 7+ years ago. I had a lot of fun on it. I built it to learn/play with Windows 2000, it had a whopping 256MB of RAM back then and was moderate to high tech when I built it. This isn’t the original mobo, it had an Intel branded board that went kaput some time after I installed XP on it. I’ve loved this machine for MANY years and while it won’t be running 24/7 anymore, it’ll still be there for me to play with. It’s currently running Debian 4.0 and hasn’t had a real role other than for testing for a while. Most recently, it’s been host to a VM or two that I’ve been playing with.


A Pentium III (Coppermine) 1GHz running on a Dell GX150 motherboard. This one is maxed with 512 MB as well and used to be my work desktop many years ago. We were able to pick up our machines before they were refreshed for a modest price so I opted to. I don’t have any really fond memories with this machine. It’s always been on and I’ve never once had a problem with it. Not a bad little box. Currently it’s running Debian 4.0 (upgraded from Debian 3.1) and its primary role is a backup server (I’m using an offsite backup server after this whole project is complete) and shell server. it’s the single door into my home network.

This next machine is the physical box replacing both Albus and Voldemort.


Credit: Cerberus was given his name by none other than Sarah Conti. Rock on with your mythology Miss Conti!

A Pentium 4, 3.00GHz (Hyperthreading) running on an Intel D945GTP motherboard. It’s currently rocking 2GB of DDR2/667MHz memory. This is a great machine for running a standard desktop. I built it in March 2006 to be my Ubuntu desktop, and I’ve never had a problem with it. Currently it’s name is Nix but will soon become Cerberus. It will be running Debian 4.0, VMware server and will be providing shell access (replacing albus) and will act as a Samba server for my music and whatever else I need to share.

…and without further delay, the virtual machines!


Ka is a Debian 4.0 Virtual Machine. His role is to be an always on machine for my wiki, email, IRC & IM clients. He’s already alive and well and I’ve moved those services over to him. For the moment he’s hosted on Voldemort and will be moved to Cerberus once he lives.


Peeves is Windows Server 2003 Enterprise. Yep, I need to be able to virtualize Windows because I have a few apps that I need/want to have on at all times. This includes my FTP server, Handy Address Book server and WhereIsIt which is a cataloging program that just rocks. I decided to go with Windows 2k3 because I had a license for it and didn’t have one for another copy of XP. It’s currently being hosted by Darktower (you’ll meet him below)

Finally, the desktop machine/VM to get me through this whole mess.


Nix2 is just an Ubuntu VM so that I can continue to use my Linux apps while converting Nix to Cerberus. Nix2 will be hosted on Darktower. This is a physical machine similar in make-up to Nix (only diff is that it’s a full ATX board, not a Micro and it’s in a taller case). Darktower runs XP at the moment but will eventually be a dual boot with Ubuntu and XP or Vista. I plan on keeping all data off of this machine, it will be nothing but a client as all of my data will be accessible via the servers. It’s final name will remain Darktower. Once I’ve got my data off of Nix2 and onto the new Darktower, Nix2 will get the boot and all will be good in the world.

So to summarize, both Albus and Voldemort die (seems fitting), Cerberus, Ka and Peeves rule the roost and Darktower just hangs out getting poked and prodded when needed. Since I won’t need it to be on at all times anymore (for IRC and what not) it’ll be spending the majority of it’s time in sleep mode.It’ll be nice to eliminate the 2 older machines and keep a third sleeping most of the time. That will leave only 2 always on machines in the house, that’s Cerberus and HTPC (which is a Windows machine running some home theater software).

Once complete, I’ll not only have infrastructure that’s really easy to backup/re-create but I’ll have stopped wasting so much energy.

Next, I’ll start going over what’s involved in setting up the VMs, things from Debian installation options to installed applications.