mysql Version in Opensolaris

Bei einem update von Opensolaris wurde automatisch die mysql Installation von 5.0 auf 5.1 aktualisiert.

Der mysql Service sah wie folgt aus:

# svcs mysql
STATE          STIME    FMRI
online         20:32:08 svc:/application/database/mysql:version_51

Um weiterhin mysql 5.0 zu verwenden, sind die folgenden Schritte notwendig:

Überprüfen des data Links im Verzeichnis /var/mysql

# ls -l /var/mysql/
total 5
drwxr-xr-x 3 mysql mysql 3 2009-12-07 20:37 5.0
drwxr-xr-x 3 mysql mysql 3 2009-12-07 20:37 5.1
lrwxrwxrwx 1 root  root  3 2009-12-12 20:32 data -> 5.0

Neuer Import des mysql Manifestes

# svccfg import /var/svc/manifest/application/database/mysql.xml
# svcs mysql
STATE          STIME    FMRI
online         20:32:08 svc:/application/database/mysql:version_51
disabled       20:32:52 svc:/application/database/mysql:version_50

Abschalten der mysql 5.1 Instanz und einschalten der mysql 5.0 Instanz

# svcadm disable mysql:version_51
# svcadm enable  mysql:version_50

Opensolaris auf CUPS umstellen

Installation der benötigten Pakete:

pfexec pkg install SUNWcups
pfexec pkg install SUNWcups-manager
pfexec pkg install SUNWghostscript

CUPS als Print Service aktivieren

print-service -s cups

In der /etc/pam.conf die folgende Zeile hinzufügen

cups account required pam_unix_account.so.1

Drucker mittels system-config-printer oder über http://localhost:901 konfigurieren

Updaten von OpenSolaris auf das Devel Repository

Zu Sicherheit erzeigen wir ein neues BE:

beadm create opensolaris-6

Dieses wir nach /mnt gemountent:

beadm mount /opensolaris-6 /mnt

Das Devel Repository hinzufügen:

pkg -R /mnt set-authority -O http://pkg.opensolaris.org/dev opensolaris.org

Updaten der pkg Datenbank:

pkg -R /mnt refresh

Aktuelle IPS-Software installieren:

pkg -R /mnt install SUNWipkg
pkg -R /mnt install entire

Das neune BE updaten:

pkg -R /mnt image-update

Neues BE Aktivieren:

beadm activate opensolaris-6

Zur Sicherheit noch den Grub updaten:

mnt/boot/solaris/bin/update_grub -R /mnt

Neues BE umounten und rebooten:

beadm unmount opensolaris-6
reboot

Zones unter opensolaris

Zone mit dem Namen test anlegen:

root@dione:~$ zonecfg -z test
test: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:test> create
zonecfg:test> set zonepath=/zones/test
zonecfg:test> set autoboot=true
zonecfg:test> add net
zonecfg:test:net> set address=192.168.0.12
zonecfg:test:net> set physical=rge0
zonecfg:test:net> end
zonecfg:test> add dataset
zonecfg:test:dataset> set name=data/zones/test/DATA
zonecfg:test:dataset> end
zonecfg:test> verify
zonecfg:test> commit
zonecfg:test> exit

Konfigurierte Zone anzeigen:

root@dione:~$ zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   - test             configured /zones/test                    ipkg     shared

Zoneverzeichnis und Dataset anlegen:

root@dione:~$ zfs create data/zones/test
root@dione:~$ zfs create -o mountpoint=legacy data/zones/test/DATA
root@dione:~$ chmod 700 /zones/test

Zone installieren:

root@dione:~$ zoneadm -z test install
  Authority: Using http://pkg.opensolaris.org/release/.
      Image: Preparing at /zones/test1/root ... done.
      Cache: Using /var/pkg/download.
 Installing: (output follows)

Zone booten:

root@dione:~$ zoneadm -z test boot & zlogin -C test