Wednesday, October 26, 2011

freebsd mysql installation

Simple installation of mysql-server on freebsd:

# sudo su
# cd /usr/ports/databases
# make install clean
# mysql_install_db
# cd /var/db
# chown -R mysql:mysql mysql
# mysqld_safe &
# mysqladmin -u root password "YOUR_PASSWORD"
# echo "mysql_enable='YES'" >> /etc/rc.conf
# /usr/local/etc/rc.d/mysqld start



Friday, October 14, 2011

sqlite3 gem freebsd issue


Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.

        /home/zul/.rvm/rubies/ruby-1.8.7-p352/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... no
sqlite3 is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite3-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***


Can be solved by: 

# gem install sqlite3 -- --with-sqlite3-dir=/usr/local