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 *.* @192.168.0.113 (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:
 
 

   
Service

#first web server
BackEnd
Address 192.168.0.114
Port 80
End

#second web server
BackEnd
Address 192.168.0.116
Port 80
End

 End
End   

 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 http://1.2.3.4:8080 (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.

 

Dual booting Debian

Getting Debian set up to dual boot with XP is extemely easy. I installed it to a second harddrive, installed GRUB to the MBR of the first drive and auto detected XP! The only thing now that's pissing me off is trying to get the NVIDIA drivers to work, so I can have triple monitors under Debian. Gah! I've tried everythimg but it's not working.

I built a Twitter PHP bot (sorta) the other day. It updates itself if one of the servers are down. I'll release the source or something.

Anyway, I'm off to go watch TV or something....mmmm TV...........

Log server/firewall

Flippy, my webserver which died back in December/November-ish has been sitting my desk, lifeless. So, I decided to turn it into a log server and firewall (running Debian, of course). I'll post some pics and specs later on. I was looking into getting a switch (over a hub, which I have now). I think it would greatly improve my network performance (A D-Link DES-1024D 24 port 10/100). Anyway, I haven't made any money with AdSense or PayPal donations, so that sorta sucks....

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)

Installation

Firstly, download the EeePC installer image here: http://eeepc.debian.net/debian/images/debian-eeepc.img 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.

Wireless

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.

Splashy

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.

Swap

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

Suspend

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 OpenOffice.org, 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: http://geekness.eu/node/50


Bookmark and Share

URL to this post: http://geekness.eu/debianeee

Thanks to: http://wiki.lxde.org/en/Debian http://demenzia.net/2008/02/22/using-suspend-to-disk-with-eeexubuntu-on-a-eeepc

http://wiki.debian.org/DebianEeePC/HowTo/Install

http://google.com

Debian on my Eee

I installed Debian on my 701 4GB Eee the other day. Runs perfectly, I couldn't ask for more. The only thing I need to fix is wifi. I either use the MadWifi or the Atheros drivers. Doesn't sounds too hard, I had it working before...apparently. Not sure if sound works or not, I don't use it that much so I disabled it in the BIOS to save power. Something is wrong with my server.... I tried to access it via SSH & HTTP and nothing. Turn on the monitor; kernel panic. Whatever, I rebooted. CRC error. Rebooted; works fine but Apache doesn't start. Anyways, its Sunday time to relax and download some distros I'll post back later...

Debian Web Server

Well, I turned one of my [8] computers into a file/web/FTP/SSH/etc.. server. I got a no-ip.org free DNS so far, and its working great. And of course, its running Debian, the greatest distro of all time. Instead of wasting time installing PHP, Apache, etc.. separately, I just used LAMPP (XAMPP), which isn't very secure, or so I've read. I also got another HDD mounted as /opt so all the files are mounted on their. Oh, thats right..the spec of the server: Intel Pentium III @ 450mhz 512Mb RAM 10GB HDD as / 40GB HDD as /opt Anywho, I'm not going to release the IP/URL of the server just yet, as I need to secure some stuff... More later...