FreeBSD install-message file

If you, like me, install gnome2 or any other package in FreeBSD which will pull in a lot of dependencies, you’ll notice that some packages list important messages when installing… When I install gnome2 on my new workstation, I see those messages fly by and don’t get to read the whole message because the pkg_add command is working a lot faster than I can read … pkg_info -D [pkgname] will list the install-message file for [pkgname], and you could list the install-message file for all of your installed packages with for instance: (BASH syntax)

# pkg_info | awk '{ print $1 }' | xargs pkg_info -D

Redmine 1.4. upgrade on FreeBSD 8.1 release

I stumbled over a broken Redmine 1.3 install on a server this morning. The installation is broken in 1.3 related to rubytree something something … I’m kind of a noob in FreeBSD,  and even more of a noob  in regard to Ruby on rails applications… today was my first look at anything related to that stuff. I’m uppgrading to Redmine 1.4 since according to maillinglists it should fix the rubytree problem, so I’m following http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade?version=53 .


rake generate_session_store
an error occured while installing sqlite3 (1.3.6), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling.
# (fuck)
uname -a
FreeBSD pdev.mid.dmz 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #5: Tue Dec 14 11:14:21 CET 2010     root@--.amd64  amd64
ls -l /usr/local/include/sqlite3.h 
-rw-r--r--  1 root  wheel  295268 Feb 14  2011 /usr/local/include/sqlite3.h
setenv CONFIGURE_ARGS "with-sqlite3-include=/usr/local/include" # (tcsh/csh)

../gems/bin/bundle install --without development test
Fetching gem metadata from http://rubygems.org/.......
Using rake ( 
Using activesupport (2.3.14) 
Using rack (1.1.3) 
Using actionpack (2.3.14) 
Using actionmailer (2.3.14) 
Using activerecord (2.3.14) 
Using activeresource (2.3.14) 
Using coderay (1.0.7) 
Using fastercsv (1.5.5) 
Using i18n (0.4.2) 
Using mysql (2.8.1) 
Using net-ldap (0.3.1) 
Using pg (0.14.0) 
Using rails (2.3.14) 
Using rmagick (2.13.1) 
Using ruby-openid (2.1.8) 
Installing sqlite3 (1.3.6) with native extensions 
Installing tzinfo (0.3.33) 
Using bundler (1.1.5) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Got it to work in the end, and got a small insight in Rugy on Rails, and gem install stuff .
Gem install help
Note: during Redmine upgrade rake told me I had to do a bundle install –without development test, and I ran into ‘command not found’ which was because the ‘bundle’ command was a Ruby gem, and those gem’s wasn’t in my path, I had to locate the ‘bundle’ gem, and call it with an absolute path (or fix my PATH variable) .

Btw: they say that “UNIX Is User Friendly. It’s Just Selective About Who Its Friends Are.”, I have a feeling Unix hasn’t selected me yet …

FreeBSD VS. Debian Linux

I’m switching job these days, and they use FreeBSD at my new workplace . I’ll update this post with various stuff I have to dig up(stuff related to cli, package management and so on).

Debian                               FreeBSD
dpkg -l                               pkg_info
dpkg -L [pkg]                    pkg_info -xL [pkg]
deluser / userdel             rmuser

lspci                                  pciconf -lv

cat /proc/cpuinfo           sysctl -a | egrep -i ‘hw.machine|hw.model|hw.ncpu’

Being a Linux sysadmin in a Solaris world

At work we are getting more and more Solaris box’es. Zones in Solaris are great for delivering secure webhotell and email services for large amounts of customers.
But, coming from Linux, Solaris can be a bit frustrating at first. Though Sun has released a OpenSolaris version, development there aren’t even close to what I’m used to in Linux.
I find it a bit interesting looking at Solaris ’cause it shows the power of a open source community, while one can get a bit spoiled in a mono Linux environment I easily take for granted all the great tools available at a Linux box.

Anyway here’s some useful stuff I’ve found out which makes it, for me, a lot easier to get friends with Solaris.
First of all, stuff like using pageup/pagedown keys in manual pages or even with ‘less’ is not common in a default Solaris 5.10 installation.
Since we’re more than one sysadmin at our Solaris box’es, I’ve setup my own environment and alias for commands.
I put a file called jjprofile at every box, and then I have to source the file ($ . ./jjprofile) every time I’ve logged on. A more elegant approach would of course to put this stuff in .bashrc or what ever the file being sourced when logging on.

#when using packages from http://www.blastwave.org/index.fam 
#preferably hit those binaries before Solaris' binaries in the PATH
export PATH="/opt/csw/bin:$PATH"
#less is more (Solaris defaults to more)
export PAGER="less -iMsq"
#include man pages from blastwave packages
export MANPATH="${MANPATH:=/usr/share/man}:/usr/local/man:/opt/csw/man"
#using terminfo from blastwave let 
#you use pageup/down and arrow keys and so on in man pages, less and vim
export TERMINFO="/opt/csw/share/terminfo"

# some aliases, I want to use the 
# gnu binaries which I'm used to
alias vi='/usr/bin/env TERM=xterm-color vim'
alias ls='gls --color=auto'
alias ll='gls -l --color=auto'
alias du='gdu'
alias find='gfind'
alias tar='gtar'
alias grep='ggrep'

Regarding references to blastwave, more info at blastwave.org.