DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

John has posted 18 posts at DZone. View Full User Profile

Install Openssl From Source + Ruby - Debian

08.13.2008
| 11263 views |
  • submit to reddit
        
//build essentials + extras (last line not needed)
sudo aptitude install ssh gcc sudo build-essential make git-core subversion -y
sudo aptitude install bash man-db cron wget lynx bind9 -y
sudo aptitude install mysql-server mysql-client libmysqlclient15-dev libmysql-ruby sqlite3 imagemagick -y


//When doing ./configure --with-openssl=/dir where /dir is some valid directory that contains lib/libssl.so file
find / -name libssl.so
//returns
/usr/lib/libssl.so

//so replace with...
./configure --prefix=/usr/local --with-openssl-dir=/usr/lib

..more...
http://forums.enterprisedb.com/posts/list/41.page

find / -name libssl.so*
/usr/lib/libssl.so.0.9.8

..so
/usr/lib as ln -s libssl.so.0.9.8 libssl.so


----ignore---- debian don't like you doing the below

//beforehand, kill off any existing openssl copy
sudo aptitude remove openssl
rm -rf /usr/bin/openssl
which openssl

//now compile & install a new copy of openssl from source
cd /usr/src
wget http://www.openssl.org/source/openssl-0.9.8h.tar.gz
tar xzf openssl-0.9.8h.tar.gz
cd openssl-0.9.8h
./config --prefix=/usr
sudo make
sudo make test
sudo make install

----ignore---- debian don't like you doing the above

//now ruby 1.8.6 from source + openssl support
cd /usr/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p114.tar.gz
tar xfz ruby-1.8.6-p114.tar.gz
cd ruby-1.8.6-p114
./configure --prefix=/usr/local --with-openssl-dir=/usr/lib
sudo make 
sudo make install



//now gems from source
cd /usr/src
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
tar xfz rubygems-1.2.0.tgz
cd rubygems-1.2.0
sudo ruby setup.rb

//update with
sudo gem install rubygems-update
sudo update_rubygems


...more here

http://blog.mondragon.cc/articles/2007/02/03/compiling-ruby-1-8-5-w-openssl-on-debian-etch-testing-and-freebsd-in-home