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.
Test the result
Look at the version printed and exit with control-d.
End of procedure.