All My Brain Where stuff from my brain lands

November 10, 2009

Upgrading Gentoo 2007.0 to 10.0

Filed under: System Administration — Tags: , , , , — Dennis @ 8:04 am

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:

emerge -av portage

These are the packages that would be merged, in order:

Calculating dependencies |
!!! All ebuilds that could satisfy ">=dev-lang/python-2.5" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/python-2.5.4-r3 (masked by: required EAPI -1, supported EAPI 0)
- dev-lang/python-2.6.2-r1 (masked by: required EAPI -2, supported EAPI 0)
- dev-lang/python-2.6.2-r2 (masked by: required EAPI -2, supported EAPI 0)
- dev-lang/python-2.6.4 (masked by: required EAPI -2, supported EAPI 0)
- dev-lang/python-3.1.1-r1 (masked by: required EAPI -2, supported EAPI 0)
- dev-lang/python-2.6.3 (masked by: required EAPI -2, supported EAPI 0)

For more information, see MASKED PACKAGES section in the emerge man page or 
refer to the Gentoo Handbook.
(dependency required by "sys-apps/portage-2.1.6.13" [ebuild])

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.

 cd /usr
 rm -rf portage # or mv portage xxx
 wget http://gentoo.mirrors.tds.net/gentoo/releases/snapshots/2008.0/portage-2008.0.tar.bz2
 tar -xjpf portage-2008.0.tar.bz2
 cd /etc/
 rm make.profile
 ln -s /usr/portage/profiles/default/linux/x86/2008.0 make.profile
 emerge -av portage

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.

November 4, 2009

Cleaning up extracted package contents

Filed under: System Administration — Tags: , , — Dennis @ 1:06 pm

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.

 > cd downloads
 > tar -xzf latestdownload.tar.gz
 > # yuck, stupid package contents in my downloads directory.

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:

 > tar -tzf latestdownload.tar.gz | xargs rm -rf

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

May 1, 2009

Adding more disk space with LVM2

Filed under: System Administration — Tags: , , — Dennis @ 9:08 am

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.

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

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

February 13, 2009

Quick SSH Tip

Filed under: System Administration — Tags: , , — Dennis @ 3:11 pm

I’d wager many of you know this already. Having done this a couple times the last two days though, I thought I’d add it for those that don’t. Maybe it’s useful to someone.

Problem: You want to log into a remote server with SSH and you don’t want to type a password. You know about key pairs and authorized_keys and are ready to copy your public key. You might be tempted to do it like this:

  1. SCP your identity to the remote machine (have to type your password again).
  2. ssh to the remote server (have to type your password again)
  3. append the public id to the authorized keys file
  4. delete the copied file
  5. Exit
  6. try the keyless login

Here is where you can save a few steps. You can append the file with ssh instead of copying the file over with scp. This saves you a login and typing your password once.

cat id_dsa.pub | ssh remote_server "cat >> [path to user home]/.ssh/authorized_keys[2]"

There. Type your password once for the copy and then test the passwordless login.

January 15, 2009

Microsoft exchange hosting with Sharepoint

Filed under: System Administration — Tags: , , , — Dennis @ 7:08 am

I’m a Linux advocate myself. My servers run Linux. I use Linux primarily for my work. At home, I either use Linux or my iMac. While I can get all the services I’m happy with, I have to realize that some people like services that are harder to find and host with Linux. I’ve come across my second situation recently where someone wanted a hosted exchange server. Some might advocate attempting a non-Microsoft work alike for this but I find there comes a point when it’s more work than it’s worth. This is especially true when you can set up a service like Sharepoint hosting for as little as $8.95 per month.

SherWeb provides a complete package with their Microsoft Sharepoint hosting. In addition to email, you can set up calendars, contact lists, tasks, alerts, rss feeds and a few other things. The rss feeds, for instance, can be connected to any of the Sharepoint features. You can create an rss feed for a contact list or calendar, and then allow certain users access to that rss feed. There is also a way to work on office documents with the document workspace hosted and shared. Another exciting feature for many business users, is the option to connect to, modify, and and new content with a mobile device.

All of these features are sharable with an unlimited number of users. You can add unlimited users to your system no matter which data plan you choose. Furthermore, all the features of Sharepoint are included with every data plan. The more expensive plans simply allow you more disk space. You can relatively cheaply try out all the benefits and then spend more as you grow.

January 5, 2009

Upgrading to WordPress 2.7

Filed under: System Administration — Tags: , — Dennis @ 8:06 am

I just updated all my blogs to WordPress 2.7. I like the new admin interface. The upgrade was pleasantly easy and quick.

« Newer PostsOlder Posts »

Powered by WordPress

css.php
%d bloggers like this: