pre-compiled binaries in your PATH

Wednesday, April 16th, 2008

I prefer to install mySQL using the pre-compiled binaries. Depending on the environment, these usually go in either /opt or /usr/local. When you choose this type of install, chances are you are going to need to ensure that you somehow configure your system so that the mysql binaries end up in your PATH.

If you are using RedHat or CentOS, a good way to do this is to add a custom file inside of the /etc/profile.d/ directory. I create one called “mysql.sh”:

if ! echo ${PATH} | /bin/grep -q /opt/mysql/bin ; then
        PATH=/opt/mysql/bin:${PATH}
fi

This script simply checks you PATH for mysql and adds it if it’s not already there.

If you are using Ubuntu, you can edit /etc/environment:

PATH="/usr/local/bin:/usr/bin:/bin:/opt/mysql/bin"
LANG="en_US.UTF-8"

You can see that I’ve just added “:/opt/mysql/bin” to the end of the PATH line.

There are lots of other ways to do this, and I’m sure some distributions not covered here do it differently. If you know of a different or better way, I look forward to your comments.

Digital Photos Organized

Monday, January 1st, 2007

Until yesterday, my collection of digital photos was a complete mess. We had pictures archived away in multiple tar files on multiple computers, and duplicates everywhere. It was hard to find a picture, and unless you really knew exactly what you were looking for and where it was, it was impossible. Yesterday, I googled for a good solution and I came upon This informative post about photo organization in linux. It was the perfect solution. (more…)