Syslog server on Lenny

So, I installed VMWare Server on my Windows Server 2003 box the other day. Downloaded a Debian Lenny image and got it running. Never dealt with VMWare Server so it's pretty neat to configure virtual machines from a convenient web interface. The web interface was having issues at first, of which I tracked down to IIS. The web UI runs on port 8333 and IIS runs on port 80 of course. Disabled IIS and the web UI was up and running.


After that it was all down hill. Set the network adapter on the VM to bridged. Got the virtual machine running and started installing packages and such. At first, it couldn't resolve names so I had to correct /etc/resolv.conf and point it to my DNS servers. 

Anyway, I decided I'd set up a syslog server. Lenny now uses rsyslog but I went back with sysklog. Edit your /etc/default/syslogd, and change SYSLOGD="" to SYSLOGD="-r" for remote logging. Still on the syslog server, I edited /etc/syslog.conf and added *.* /logs/file.log to make sure everything was working.

On the clients, or nodes, I edited /etc/syslog.conf and added *.* @ (or whatever your IP is). After reboots of sysklogd on the servers and the nodes, it's finally working. Going to get lighttpd working with the logs, perhaps set up a little PHP script to read the logs.

I do really like this VMWare Server, it lets me utilize this server more. I might get it running on my other servers on that note. Plus, it's free. Can't argue with that ;)

As usual, comments are welcome.


How to: Simple load balancer setup for web servers

I finally put together a load balancing setup together this weekend, and I'm surprised it was this easy.

What you'll need is three servers, two web servers and one server for the load balancer. It's not recommended that you only use one load balancer since it's a single point of failure (SPOF) but I only had one extra server on hand. For this tutorial, I used Debian Lenny.


First thing's first, download and install pound on your load balancer. 


apt-get install pound


Once you've done that, head over to /etc/pound and edit your pound.cfg file accordingly. Here's an example for the web servers:


#first web server
Port 80

#second web server
Port 80


 Also be sure to set your ListenHTTP address and port.

Now edit your /etc/default/pound file and change startup=0 to startup=1

Start pound up with /etc/init.d/pound start If everything is configured properly, check out (or whatever IP and port you put in your pound.cfg)
Half the time, the requests should go to Server A while the other half goes to Server B (you can configure this). For anything else, check out the man page here or type man pound

Luckily, my file server is running NFS and SAMBA, so I can have the same content on each web server. I couldn't completely get NFS working on Windows Server 2008 (which is on one of the web servers, ugh) so I mapped a SAMBA shared as a network drive and that seemed to work. 

 That's the end of this short tutorial, but keep in mind there's more things you can do with pound. You can set up chroot jails, HTTPS balancing and way more. Any comments or ideas are appreciated.


How I got Debian Lenny working on my Eee.

Updated March 16 2009

Well, I thought I would post a tutorial on how I got Lenny working on my Eee, incase people are having problems. This will loosely be based on the Debian EeePC wiki and also this blog post, so this content is not 100% from me, only what worked. Just for a note, my EeePC is a 701 4GB (with camera)


Firstly, download the EeePC installer image here: You will need a USB flash drive, but I'm sure a SD card will work.

Now to copy the image onto your media choice: dd if=debian-eeepc.img of=/dev/#YOUR DEVICE# sync Now that that's done, plug your flash drive into your Eee, turn it on and hold the Escape key on bootup. Choose your flash drive and it will continue to boot. (Prior to this, I pluged in an ethernet cable; wireless is a choice but was unreliable for me).
The next few steps are self explanitory, such as filling in your country, username, password, etc. When it came to partitioning, I took out the swap parition and will add a swap file instead (read below). (Also, where it gets to the point where it asks you what packages to install, choose Standard system and Laptop then continue) After it has finished installing, remove your flash drive and boot into Lenny. Login with your username and pass.


Now, when I first booted Lenny, wireless was not working for me. Things that I did: Turned on wireless, Function + F2 Run lsmod and saw if ath_pci was there If not, I ran modprobe ath_pci Still didn't work for me so I tried: rmmod ath_pci then modprobe ath_pci. You should now have wireless working and be able to connect to other networks.

What else? How to get the webcam working: modprobe uvcvideo Then install: apt-get install luvcview Make a launcher/link to point to this command: luvcview -f yuv. For this to work, make sure 'camera' was enabled in your BIOS.


Tired of how ugly the bootscreen is? Install Splashy! apt-get install splashy Now to configure GRUB. Edit /boot/grub/menu.lst file and add hiddenmenu

In the file, you can also change the timeout. You will then come across a commented line: # defoptions=quiet Add this line: # defoptions=quiet splash vga=785 (788 for 800x600, 785 for 640x480) Update GRUB: update-grub and thats it, you now have a graphical loader.


So, lets make the swap file: dd if=/dev/zero of=/swap bs=1024k count=256

That will make a 256MB swap file, fine if you have 512MB RAM. Then: mkswap /swap Now add this to your /etc/fstab:

/swap swap swap defaults 0 0

Then sysctl -w vm.swappiness=1 Alter the last line of /etc/sysctl.conf: vm.swappiness=1

Activate it: swapon /swap


Install µswsusp aptitude install uswsusp To put your Eee in suspend or test it, run: s2disk. I haven't got it to suspend when I close the lid (yet), so you can make a launcher/link for now.

Desktop Enviroment

Since I love Xfce, I chose to install it: apt-get install xfce4.

Update: I tried LXDE and in my opinion it's faster than XFCE.

To install LXDE, use this: aptitude update aptitude install lxde Log out and change your session to log in to Xfce or whatever your desktop preference is. Since I was running low on space, I uninstalled, Evolution, and a number of other programs using Synaptic package manager. And thats it I hope that works for anyone out there, I would of loved this tutorial before I installed Debian. Any comments or ideas are appreciated :)

Free Eee size wallpapers too:

Bookmark and Share

URL to this post:

Thanks to: