Posterous theme by Cory Watilo

Filed under: linux

Compile / Configure Subversion w/SSL Enabled

My company: WebSight Design, uses Subversion for source and version control for all of our web development projects. We also use the amazing hosted Subversion service: Springloops. (If you ever need a Subversion deployment tool, Springloops is it!) Springloops repositories are *only* accessible via HTTPS. In order to gain access to a repository from the command line, I had to re-configure Subversion on our servers to enable access to ssl urls. Seems simple enough and actually it is. However, as with all things Linux, the devil is in the details. I spent hours-upon-hours trying to get it to work. It simply comes down to the sequence of steps you take. What I've done here is list out all of the steps done to get it working to save you from the same pain I went through. So, I am assuming that you are trying to access a Subversion repository via an https url and you are getting the message "ssl not supported" or something similar to this. I know, it sucks and it's pretty frustrating. I promise you however, if you do *exactly* what I spell out below, in the sequence I list... you will be up and working in about 15-20mins. The only other assumption here is that you are using Ubuntu or some other Debian-based Linux distro that supports the APT package manager. It's important to know that Subversion uses a module called Neon to provide ssl connectivity. The key here is to use the version of Neon for your specific release of Subversion. This is key to everything else that follows. Don't just grab the latest versions of Subversion and Neon and assume they will work correctly together. So with that... let's get to work. First, make sure the following packages are installed on your server: GCC sudo apt-get install build-essential Expat sudo apt-get install expat Libxml-dev sudo apt-get install libxml2-dev Next, download latest Subversion files: wget http://subversion.tigris.org/downloads/subversion-1.4.X.tar.bz2 wget http://subversion.tigris.org/downloads/subversion-deps-1.4.X.tar.bz2 NOTE: "X" above is a placeholder for your version no. Untar em' in this order: tar xjvf subversion-1.4.X.tar.bz2 tar xjvf subversion-deps-1.4.X.tar.bz2 Once you have extracted the files, open the file "subversion-1.4.X/INSTALL". Locate the section on Neon. It will state which version you need to download and compile with this version of Subversion. Make sure you are *not* in the Subversion directory you just created. Then go ahead and download Neon: wget http://www.webdav.org/neon/neon-0.2X.0.tar.gz NOTE: The "X" above is placeholder for the version of Neon you need. Next, extract the archive: tar zxvf neon-1.X.X.tar.gz cd neon-1.X.X Now is where the fun begins. You need to compile and install Neon. Do the following from *within* the Neon directory you created: ./configure --with-ssl make sudo make install It's important to note that Neon gets installed to /usr/local by default. You need to note that as you will now need it when compiling and installing Subversion. Change back to the Subversion folder: cd ../subversion-1.4.X Compile and install Subversion: ./configure --enable-ssl --with-neon=/usr/local/ make sudo make install Now, realize that the Subversion compilation and installation process takes a long time to complete. So just be patient. You can ignore any warning messages that scroll by. You only need to be concerned with error messages or if the installation stops for any reason. Once compilation and installation are complete you need to confirm that you are running the version of Subversion you just tried to install: svn --version --quiet If you get *anything* other than the version number you thought you installed, something went horribly wrong. Go back to the very beginning of this and try again. Most time folks get errors it is because that don't have the prerequisite tools and utilities installed. If you see the version you wanted... you're all good!

Getting Ruby-on-Rails Up On Ubuntu / Apache

GCC: sudo apt-get install build-essential Ruby & Friends: sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 *** Create Symbolic Links *** sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/rubysudo ln -s /usr/bin/ri1.8 /usr/local/bin/risudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdocsudo ln -s /usr/bin/irb1.8 /usr/local/bin/irbZlib:wget http://www.zlib.net/zlib-1.2.3.tar.gztar -xvf zlib-1.2.3.tar.gz./configure make sudo make install Install Open SSL: sudo apt-get install openssl libssl-dev Apache 2.2: wget http://apache.rmplc.co.uk/httpd/httpd-2.2.4.tar.gz tar -xvf httpd-2.2.4.tar.gz ./configure --prefix=/usr/local/apache --enable-proxy --enable-proxy-http --enable-proxy-balancer --enable-dav --enable-rewrite --enable-so --enable-http --enable-ssl --enable-expires --enable-headers --enable-mods=deflate_module --with-php --with-mysql --with-susexec --disable-info --without-berkeley-db --enable-dav=shared --enable-dav-lock=shared --with-included-apr make sudo make install MySQL & Postfix Postfix: sudo apt-get install postfix note: select "Internet Site" option when prompted MySQL: sudo apt-get install mysql-server mysql-common mysql-client libmysqlclient15-dev libmysqlclient15off sudo apt-get install libmysql-ruby1.8 /* MySQL Ruby bindings */ sudo apt-get install libmysqlclient15-dev libmysql-ruby1.8sudo gem install mysql note: Select the most recent non-win32 version FastCGI: sudo apt-get install libfcgi libfcgi-dev libfcgi-ruby1.8 sudo gem install fcgi Lighttpd: apt-get install lighttpd RubyGems: wget http://rubyforge.iasi.roedu.net/files/rubygems/rubygems-0.9.0.tgz tar xvzf rubygems* cd rubygems* sudo ruby setup.rb Rails: sudo gem install rails --include-dependencies Mongrel, Subversion and Capistrano Mongrel: sudo gem install daemons gem_plugin mongrel mongrel_cluster --include-dependencies Subversion: sudo apt-get install libxml2-dev wget http://subversion.tigris.org/downloads/subversion-1.4.5.tar.gz tar xfz subversion-1.4.5.tar.gz cd subversion-1.4.5 ./configure --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/usr/local/apache/bin/apu-1-config --with-apxs=/usr/local/apache/bin/apxs --without-berkeley-db --with-ssl Capistrano sudo gem install deprec --include-dependencies Redcloth sudo gem install redcloth