Solaris - install continues with software. Advice?
by Derek Sivers
Wonderful. Like Debian apt-get, it installs everything and its dependencies from binaries. Incredibly fast.
But... it puts things in unexpected places. FreeBSD has spoiled me with EVERYTHING going in /usr/local/
Most things installed with pkg-get seem to install into /opt/csw/bin/
All of MySQL's many subdirectories went into /opt/csw/mysql5/. All of PostgreSQL's went into /opt/csw/postgresql/
*Do I really have to add ALL of those directories into my PATH?* (System-wide for all users, too, I guess?) What's the typical way you Solaris fans manage these?
When installing MySQL I got this message:
Configuring service in SMF.
MySQL 5 is using Service Management Facility. The FMRI is svc:/network/cswmysql5:default
I guess my.cnf is kept at /opt/csw/mysql5/my.cnf. Data directory is /opt/csw/mysql5/var.
You can start the MySQL daemon with:
cd /opt/csw/mysql5 ; /opt/csw/mysql5/bin/mysqld_safe &
So far this Solaris PDF called "System Administration Guide: Basic Administration" has been incredibly helpful. But man, this Service Management Facility stuff is kinda complicated.
installing software - the pkgsrc alternative
Since you have a BSD background, you may want to take a look at using pkgsrc http://www.pkgsrc.org (the NetBSD equivalent of FreeBSD's ports tree ) on Solaris instead of using pre-built packages.
I thought the SMF stuff was bogus when I started using it too, but it grows on you. Having a framework to use to create start, stop and such has turned out to be a bit of a help. It's nice to be able to do svcadm disable blat, or svcadm restart apache rather than say mv /etc/rc3.d/S90blat /etc/rc3.d/s90blat.
The /usr/local and /opt stuff is kind of a philosophucal difference in Unix. I'll keep small common stuff in /usr/local, but I prefer major apps go in /opt.
Rather than add the various bin directories under /opt/csw to the PATH, I just symlink from /opt/local/bin, which is in everyone's path.