Monthly Archives: March 2010

Making and installing Python on a 1and1 shared host

In my last post I built and installed Subversion. In this post, I’ll build and install the current 2.x version of Python, which will be needed for Trac, later.

Similar to how we built and installed Subversion, where are the commands to install Python. As before, you will need to get the HTTP address for the current version of Python (from http://www.python.org/download/) and modify the procedure for your home directory path, which you can get by running the pwd command.

For line six, in the following list of commands, get the prefix path by entering cd ~/opt and then running the pwd command.

cd ~/dev
wget http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tgz
tar -xzvf Python-2.6.4.tgz
cd Python-2.6.4
mkdir ~/opt
./configure --prefix=$HOME/opt
make
make install

Modify your ~/.bash_profile file so you can run Subverison commands without typing the full path. If you’ve already modified your PATH to look in ~/opt/bin, then you should skip this.

echo 'export PATH=$HOME/opt/bin:$PATH' >> ~/.bash_profile

Note that I stuck the new Python at the beginning of the path so it overrides the random old Python that 1and1 has installed.

Use the source command to reset your environment from your newly modified ~/.bash_profile file.

source ~/.bash_profile

Test the result

python

Look at the version printed and exit with control-d.

End of procedure.

Making and installing Subversion on a 1and1 shared host

For historical reasons, I have a 1and1 shared host account with a few sites hosted there.

For more projects, I use Slicehost, which I’ve had great experiences with. Ideally, I’d like to move these 1and1 hosted sites to a Slice, but, my experience with 1and1 has been pretty flawless and two of the sites generate enough income that I am loathe to mess with them. (Other than changing Copyright dates, the code has not been changed in a couple of years. Not broke.)

So…I have this shared hosting. I like to avoid unnecessary expenses, so paying for a Slicehost without a clear money-making purpose is to be avoided. The problem is I’d like a Trac and Subversion setup for my personal stuff. I’ve got a few hosts that I use for various projects, but none are mine alone, so it would be wrong to host my personal stuff one one of them. Thus, I would like to set up Trac and Subversion on 1and1. Tricky. I do not have sudo rights there and can’t configure Apache, for instance.

Here, we will make and install Subversion. Later, I’ll install Python and Trac. Then, integrate them together.

First, download source for Subversion. I went to http://subversion.apache.org/source-code.html, found the source release area link and got the tarball HTTP links for the two tarballs I needed. We’ll create a directory called dev in our home directory and build Subversion there.

You’ll need to do the same so you get the current, stable version of Subversion (1.6.9 when I did this).

mkdir ~/dev
cd ~/dev
wget http://subversion.tigris.org/downloads/subversion-1.6.9.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.9.tar.gz

Esplode da tarballs into a working source tree. The following commands correctly melt the two tarballs into an appropriately named directory.

tar -xzvf subversion-1.6.9.tar.gz
tar -xzvf subversion-deps-1.6.9.tar.gz

Build Subversion and install it to a logical place, (~/opt/).

cd subversion-1.6.9
mkdir ~/opt
./configure --prefix=$HOME/opt
make
make install

Modify your ~/.bash_profile file so you can run Subverison commands without typing the full path.

echo 'export PATH=$HOME/opt/bin:$PATH' >> ~/.bash_profile

Use the source command to reset your environment from your newly modified ~/.bash_profile file.

source ~/.bash_profile

Test the result.

svn --version

End of procedure.

Remote support on parent’s computer

The parent’s computer is a special case. Kids have their friends and a lifetime of computer use. Friends have their network of friends and IT contacts. But parents…they just have you for IT needs.

Added on March 11th: A friend suggested the free version of LogMeIn.

Also, every time I examine dad’s computer something random has been installed, an Internet Explorer off-brand toolbar here, a weird card game there…or whatever. Also, my dad does not have a system to keep track of passwords, so fixing an e-mail account includes some investigative work.

None of this is a problem per se, but it takes time and when I’m visiting them, I’d prefer to talk and hang out and not plow through a bun of IT baloney.

KeePassX – keeping track of passwords

I use KeePassX to store authentication. I use long, weird passwords that I have no hope of remembering, so it saves my butt every single day. I keep my KeePassX database file in Dropbox, so I always have the current iteration of it handy.

When I learn one of dad’s passwords, it now goes straight into KeePassX! I now have a group called Dad – perfect.

TightVNC – remote control

TightVNC is free and works great. VNC is a standard and works across platforms, so I can use a client on my Mac or Ubuntu box, controlling my Dad’s Windows 7 machine. Easy breezy.

It was a snap to download and install on dad’s computer as a service.

Problem 1: an IP address

The problem is not installing or using VNC. It is getting access to the computer. As is common, dad’s computer is on a cable modem and has an IP address that is subject to change. So, I cannot just use the I address, because it will change when ever he reboots his cable modem.

The solution to this is to use a dynamic DNS system. This provides a URL like “dadscomputer.dyndns.tv” which points to his current address. To get this set up I used the Free Dynamic DNS service at www.dyndns.com to get a URL for his computer. I then set up a program to update that whenever th IP address changes. I installed their DynDNS Updater for Windows.

The above results in a usable URL to access dad’s computer and the IP address is automatically updated to the dynamic DNS service when the address changes.

Problem 2: getting through the router

One of the valuable services a typical consumer router provides is protection from nasties. Thus, we cannot access the computer beyond the router. The answer to this is port forwarding. Some help with port forwarding can be found at http://portforward.com/. Some Googling found some instructions for my dad’s specific router. I needed to forward port 5900 to my dad’s computer. Some more details about this can be found at:

http://zzzuppermen.blogspot.com/2009/01/howto-tightvnc-through-router-with-ddns.html

Problem 3: getting through the firewall

I just sort of hacked my way through allowing port 5900 through the Windows 7 firewall. Just now, I Googled it and found a pretty good guide at:

http://maximumpcguides.com/windows-7/open-a-port-in-windows-7s-firewall/

You need to allow port 5900 with TCP through. TightVNC will now guard that port instead of the Firewall.

Testing

You can use the service at http://www.gotomyvnc.com/ to test your port forwarding and potential VNC connection. It gives some feedback on what works and what doesn’t.

Then, use a VNC client to connect to your new VNC server.