Archive for the 'System Administration' Category

Slow site lately

Over the last few weeks I noticed this site becoming steadily slower. Turns out I had an unusual amount of requests for /xmlrpc.php.. which in turn caused the server to use up all it's http processes answering bogus rpc queries for ping backs and whatnot that the nice script kiddies all over the world are trying to exploit I guess.

So... took care of that. Hopefully things are back to normal. I'll have to go back and re-evaluate if I actually want any of that functionality I guess.

Changing server ip addresses

OK, so I changed my virtual server ip address in response to my host being allocated a new block of IPs. Anyhow, things seem to have gone ok. I changed DNS timeouts to short, waited, updated everything etc etc... Of course, it seems that there are always some DNS servers here and there that don't quite play by the rules. That and I don't directly control my secondary name server. Hopefully nobody experiences too much down time.

Why and How to use OpenDNS.com

I've been recommending to friends and family that they use OpenDNS.com to help safeguard their homes from adult content. A few things have changed since I originally started using their service and I thought I'd write up a little article to help everyone understand.

Lets start with the "why". I'm not going to focus on the reason to have some filtering technology. Instead, I want to help educate on the different types of filters and why I prefer OpenDNS. Basically, there are two types of technology being used to filter content. One methodology is to install software on a computer that monitors the computers network activity and redirects filtered content to a blocked page. The second approach is to not intrude upon the computer's installed programs, but to handle the filtering at a network level. OpenDNS.com falls into the second category. I prefer it because I don't have to manage every computer in our home and I don't have to have software that potentially slows my computer down.

Continue reading 'Why and How to use OpenDNS.com'

Upgrading Gentoo 2007.0 to 10.0

So I left all these servers running gentoo a couple years ago. Now, after all this time (and uptime!), I want to install something.

Error:

  1.  
  2. emerge -av portage
  3.  
  4. These are the packages that would be merged, in order:
  5.  
  6. Calculating dependencies |
  7. !!! All ebuilds that could satisfy ">=dev-lang/python-2.5" have been masked.
  8. !!! One of the following masked packages is required to complete your request:
  9. - dev-lang/python-2.5.4-r3 (masked by: required EAPI -1, supported EAPI 0)
  10. - dev-lang/python-2.6.2-r1 (masked by: required EAPI -2, supported EAPI 0)
  11. - dev-lang/python-2.6.2-r2 (masked by: required EAPI -2, supported EAPI 0)
  12. - dev-lang/python-2.6.4 (masked by: required EAPI -2, supported EAPI 0)
  13. - dev-lang/python-3.1.1-r1 (masked by: required EAPI -2, supported EAPI 0)
  14. - dev-lang/python-2.6.3 (masked by: required EAPI -2, supported EAPI 0)
  15.  
  16. For more information, see MASKED PACKAGES section in the emerge man page or
  17. refer to the Gentoo Handbook.
  18. (dependency required by "sys-apps/portage-2.1.6.13" [ebuild])
  19.  

Hm. Yeah, I'm way out of date.

Solution: I found other sites that talked about forcing a python/portage install but I that sounded a little harsh. Instead, I found a snapshot of portage-2008.0 and replaced my /usr/portage with the contents of that.

  1.  
  2. cd /usr
  3. rm -rf portage # or mv portage xxx
  4. wget http://gentoo.mirrors.tds.net/gentoo/releases/snapshots/2008.0/portage-2008.0.tar.bz2
  5. tar -xjpf portage-2008.0.tar.bz2
  6. cd /etc/
  7. rm make.profile
  8. ln -s /usr/portage/profiles/default/linux/x86/2008.0 make.profile
  9. emerge -av portage
  10.  

That took me to portage-2.1.4.4.

From there, I can now go back to current 10.0 portage and emerge -av portage to get up to the current portage state.

Yeah, I really didn't want to do a re-install.

Cleaning up extracted package contents

I hate it when I download a source archive, uncompress it, and find that instead of creating a package directory, with the contents of the archive, the archive was created with a bunch of files at the root directory. Suppose I have a downloads directory with lots of archives. After I uncompress this new archive, I now have a bunch of archive files and a bunch of project specific files all in the same directory. Yuck.

  1.  
  2. > cd downloads
  3. > tar -xzf latestdownload.tar.gz
  4. > # yuck, stupid package contents in my downloads directory.
  5.  

Yeah, Yeah, I know I could have listed the package contents (tar -tzf ..) and found that I needed to create a directory first but I'm lazy. So the mess is there. Now to clean it up:

  1.  
  2. > tar -tzf latestdownload.tar.gz | xargs rm -rf
  3.  

There. Files gone. You can do the same thing with unzip -t for zip archives.

Adding more disk space with LVM2

I've always known that virtualizing things can make management of all types of resources easier. Recently, I had the most pleasant experience adding disk space to a virtual machine. Of course, if you use LVM, this can happen just as easily with real physical disks, but for me, I was able to do this without restarting my machine.

Issue: I'm out of disk space on my root partition.
Solution: The root partition is created on a logical volume with LVM2. Just add another disk, extend the volume group, and then extend the logical volume.

  1.  
  2. # Added new physical partition /dev/sda3
  3. # create a physical volume out of it
  4. > pvcreate /dev/sda3
  5. # Now, add it to the volume group that my logical volume is on
  6. > vgextend VolGroup00 /dev/sda3
  7. # Now that the volume group has more disk space, the logical volume can grow
  8. > lvextend -L+11G /dev/VolGroup00/LogVol00
  9. # Ok, last of all, I want to filesystem to recognize that more space is available
  10. > fsadm resize /dev/VolGroup00/LogVol00
  11. # sweet, I have more space now
  12. > df -h
  13.  

All that was done without having to take the system off line. Linux makes life easy sometimes doesn't it!



css.php