Installing Subversion and MySQL
Posted by glenn on Thursday, August 30, 2007
Posted in installation, subversion, mysql, postgres
I first got forced into using source control management (scm) systems when I first began working as part of a team of developers and there was times weâd need to edit the same parts of the system. It wasnât too long until those good habits trickled into the stuff I worked on by myself, and for good reason. Itâs nice to always have an undo option for those time when you go âWhoops!â. Subversion (SVN to some) is the version control tool du jour for many, so lets keep it simple to begin with and start with that. Iâve included installing MySQL and Postgres as well, because well itâs version control and databases finish off what you need to have your app deployed⦠and because they are all pretty straight-forward
Installing Subversion
So first subversion. We will go get the subversion source, the dependencies package (zlib compression support, support for http(s):// repositories, etc), and then configure and install:
wget http://subversion.tigris.org/downloads/subversion-1.4.5.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.5.tar.gz
tar zxf subversion-1.4.5.tar.gz
tax zxf subversion-deps-1.4.5.tar.gz
cd subversion-1.4.5
./autogen.sh
./configure --prefix=/usr/local --with-openssl --with-ssl=openssl
make; sudo make install; make clean;
cd ..
Installing MySQL
Now itâs time for MySQL. Youâll need to ensure youâve got the g/c++ libraries installed for this one:
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.45.tar.gz/from/http://www.mirrorservice.org/sites/ftp.mysql.com/
tar zxf mysql-5.0.45.tar.gz
cd mysql-5.0.45
./configure --prefix=/usr/local
make; sudo make install; make clean;
./scripts/mysql_install_db
sudo cp support-files/mysql.server /etc/init.d/mysql
sudo chmod 755 /etc/init.d/mysql
sudo /sbin/chkconfig --level 345 mysql on
sudo /usr/sbin/adduser mysql -r
sudo chown -R root:mysql /usr/local/mysql
sudo chown -R mysql:mysql /usr/local/mysql/var
sudo cp support-files/my-medium.cnf /etc/my.cnf
cd ..
MySQL has just been installed, the standard tables populated, permissions, users, and configs have been setup and it is set to start itself on start-up/reboot. Now youâll need to issue a secure root password to the new server, so run the following command:
/usr/local/bin/mysqladmin -u root password 'new-password'
Replacing new-password with whatever youâd like your secure password to be. Once that is all done, start up the service manually as the mysql user:
sudo /usr/local/mysql/bin/safe_mysqld --user=mysql &