Today, just a quick note on setting up an OpenSolaris 10 system local zone.
Firstly, you need to ensure there's a suitable ZFS file system created for the zone, then you define and install the zone itself. The basic steps are quite simple, here's a basic example as a starter:
Note: Global zone means the default zone, the basic machine assuming no zones have been created yet. Local zone is a created zone within the global zone, as described here.
As root on the global zone:
Take a look at available pools:
global# rpool list
On my system, with one disk fully used, I have rpool already, but no other pools.
Creating a new ZFS filesystem under rpool as follows:
global# zfs create /rpool/zones
Now create a new zone configuration, here is a really basic minimal zone config with networking, taken from the zone FAQ.
global# zonecfg -z my-zone
global# zonecfg:my-zone> create
global# zonecfg:my-zone> set zonepath=/zones/zone_roots/my-zone
global# zonecfg:my-zone> add net
global# zonecfg:my-zone:net> set address=10.1.1.1
global# zonecfg:my-zone:net> set physical=hm0
global# zonecfg:my-zone:net> end
global# zonecfg:my-zone> commit
global# zonecfg:my-zone> exit
Install the zone (if this fails, check permissions, shown as *1 below)
global# zoneadm -z my-zone install
Boot the installation!
global# zoneadm -z my-zone boot
Login to the new zone:
global# zlogin -C my-zone
*1 change permissions on the dataset if necessary
global# chown root /rpool/zones/my-zone
global# chmod 700 /rpool/zones/my-zone
A more complete zone configuration, for reference:
create -b
set zonepath=/zones/dev1
set autoboot=true
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add inherit-pkg-dir
set dir=/opt/apache22
end
add inherit-pkg-dir
set dir=/opt/csw
end
add inherit-pkg-dir
set dir=/opt/mysql5
end
add inherit-pkg-dir
set dir=/opt/pgsql829
end
add inherit-pkg-dir
set dir=/opt/php5
end
add fs
set dir=/opt/SUNWspro
set special=/opt/SUNWspro
set type=lofs
add options ro
end
add net
set address=10.80.117.152
set physical=bge0
end
Resources:
ZFS: http://www.linuxdynasty.org/zfs-howto-howto-create-a-zfs-file-system.html
Zones: http://opensolaris.org/os/community/zones/faq/#sa_create
.
Showing posts with label Open Solaris. Show all posts
Showing posts with label Open Solaris. Show all posts
Thursday, 8 January 2009
Friday, 20 June 2008
OpenSolaris 2008.05 & update to >= b90
With the demise of SXDE I thought I'd prepare for life with OpenSolaris...
Currently on build 90, 2008.05 represents build 86.
Installation of OpenSolaris 2008.05 from the Live CD (1 CD) is a breeze, simply boot from the CD (this took some time under VMWare!), have a play then click the install link on the desktop - great!
OS2008.05 uses ZFS and IPS - so this is a good starting point and upgradable using a package management system rather like we've all come to expect from the Linux world :)
Once installed, you can use pkg image-update to udate to the latest build of OpenSolaris, here are some quick notes:
set a timeout to avoid disapointment during the udate process!
#export PKG_CLIENT_TIMEOUT=2000
#pkg refresh
#pfexec pkg image-update
# important - do this before reboot! (or your reboot won't [boot])
http://mail.opensolaris.org/pipermail/indiana-discuss/attachments/20080606/94969481/attachment-0003.txt
Which boils down to:
A guide for OpenSolaris installation under vmware:
http://blogs.sun.com/souvik/entry/getting_started_with_opensolaris_2008
Another good thread: http://opensolaris.org/jive/thread.jspa?threadID=62982&tstart=0
--
Install Java JDK and Netbeans:
http://blogs.sun.com/souvik/entry/getting_started_with_opensolaris_2008
#zcat jdk-6u6-solaris-i586.tar.Z | tar -xf -
#pfexec pkgadd -d . SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo
NB: after installing the 32bit version the 64bit extensions can be installed but don't do this if you want to use applets or web start.
Install FireFox 3:
http://opensolaris.org/jive/thread.jspa?messageID=250311&tstart=0
Installing mysql etc:
#pfexec pkg install SUNWapch22 SUNWmysql5 SUNWapch22m-php5 SUNWphp524-mysql
http://blogs.sun.com/natarajan/entry/how_to_install_apache_php
--
Check platform 32/64 bit:
#isainfo -b
Currently on build 90, 2008.05 represents build 86.
Installation of OpenSolaris 2008.05 from the Live CD (1 CD) is a breeze, simply boot from the CD (this took some time under VMWare!), have a play then click the install link on the desktop - great!
OS2008.05 uses ZFS and IPS - so this is a good starting point and upgradable using a package management system rather like we've all come to expect from the Linux world :)
Once installed, you can use pkg image-update to udate to the latest build of OpenSolaris, here are some quick notes:
set a timeout to avoid disapointment during the udate process!
#export PKG_CLIENT_TIMEOUT=2000
#pkg refresh
#pfexec pkg image-update
# important - do this before reboot! (or your reboot won't [boot])
http://mail.opensolaris.org/pipermail/indiana-discuss/attachments/20080606/94969481/attachment-0003.txt
Which boils down to:
#beadm listCheck the active on reboot name, e.g. opensolaris-1
#pfexec mount -F zfs rpool/ROOT/opensolaris-1 /mnt
#pfexec /mnt/boot/solaris/bin/update_grub -R /mnt
A guide for OpenSolaris installation under vmware:
http://blogs.sun.com/souvik/entry/getting_started_with_opensolaris_2008
Another good thread: http://opensolaris.org/jive/thread.jspa?threadID=62982&tstart=0
--
Install Java JDK and Netbeans:
http://blogs.sun.com/souvik/entry/getting_started_with_opensolaris_2008
#zcat jdk-6u6-solaris-i586.tar.Z | tar -xf -
#pfexec pkgadd -d . SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo
NB: after installing the 32bit version the 64bit extensions can be installed but don't do this if you want to use applets or web start.
Install FireFox 3:
http://opensolaris.org/jive/thread.jspa?messageID=250311&tstart=0
Installing mysql etc:
#pfexec pkg install SUNWapch22 SUNWmysql5 SUNWapch22m-php5 SUNWphp524-mysql
http://blogs.sun.com/natarajan/entry/how_to_install_apache_php
--
Check platform 32/64 bit:
#isainfo -b
Thursday, 1 May 2008
Blastwave for easy Apache http 2.2 and mod_jk, on Solaris SXDE 10
Goal: Install mod_jk for Apache http 2.2.x with minimal effort!
Such that Apache http can be tested as a front for Glassfish 2ur2 (rather than the usual Tomcat) using the same mod_jk connector...
A handy binary of mod_jk for Solaris and the right version of Apache http didn't seem readily available.
Here are some quick notes on Solaris, Blastwave, Apache httpd and mod_jk
Decided to try out the Blastwave software repository for CSW, site is here http://www.blastwave.org/
Rough steps as follows:
Follow http://www.blastwave.org/howto.html
which is essentially:
pkgadd -d http://www.blastwave.org/pkg_get.pkg
/opt/csw/bin/pkg-get -i wget
/opt/csw/bin/pkg-get -i apache2
/opt/csw/bin/pkg-get -i ap2_mod_jk
and optionally:
cp -p /var/pkg-get/admin-fullauto /var/pkg-get/admin
check the exact version installed:
/opt/csw/apache2/sbin/httpd -v
stop existing service installed as part of SXDE:
svcadm disable apache22
svcs apache22
check lib dsos:
/opt/csw/apache2/libexec
start the server manually:
/opt/csw/apache2/sbin/apachectl start
/opt/csw/apache2/sbin/apachectl stop
Todo:
Configure Apache http and mod_jk
Configure Glassfish with libs etc
Test web applications including failure conditions
Set Blastwave installed version as a service
Such that Apache http can be tested as a front for Glassfish 2ur2 (rather than the usual Tomcat) using the same mod_jk connector...
A handy binary of mod_jk for Solaris and the right version of Apache http didn't seem readily available.
Here are some quick notes on Solaris, Blastwave, Apache httpd and mod_jk
Decided to try out the Blastwave software repository for CSW, site is here http://www.blastwave.org/
Rough steps as follows:
Follow http://www.blastwave.org/howto.html
which is essentially:
pkgadd -d http://www.blastwave.org/pkg_get.pkg
/opt/csw/bin/pkg-get -i wget
/opt/csw/bin/pkg-get -i apache2
/opt/csw/bin/pkg-get -i ap2_mod_jk
and optionally:
cp -p /var/pkg-get/admin-fullauto /var/pkg-get/admin
check the exact version installed:
/opt/csw/apache2/sbin/httpd -v
stop existing service installed as part of SXDE:
svcadm disable apache22
svcs apache22
check lib dsos:
/opt/csw/apache2/libexec
start the server manually:
/opt/csw/apache2/sbin/apachectl start
/opt/csw/apache2/sbin/apachectl stop
Todo:
Configure Apache http and mod_jk
Configure Glassfish with libs etc
Test web applications including failure conditions
Set Blastwave installed version as a service
Labels:
Apache HTTPD 2.2.x,
Blastwave,
mod_jk,
Open Solaris,
OpenSolaris
Tuesday, 15 April 2008
Xephyr on Solaris
Searching for a better Xnest on Solaris, looking for Xephyr as a package or source to build, it turns out Xephyr is already included in SXDE.
location: /usr/X11/bin
simple usage example:
Xephyr :1 -screen 1200x800 -query localhost
This what's new in SXDE 10 guide is quite handy http://dlc.sun.com/pdf/817-0547/817-0547.pdf
Early signs of Xephyr -> ssh -> Xming on Windows seem reasonable.
ProGuard - new 4.2 version:
Evaluated the latest ProGuard 4.2 for our Java ME mobile client and it failed reporting a stack length had gone negative! Have reverted back to 4.1 for now, which seems to be working well. Will report the bug to the team.
Java ME, some J9 options worth remembering:
-Xint -> disable AOT and JIT, interpreted mode only
-noverify -> disable class verification checks (faster loaded on pre-verified code)
-Xnolinenumbers -> turn off line number debug info
location: /usr/X11/bin
simple usage example:
Xephyr :1 -screen 1200x800 -query localhost
This what's new in SXDE 10 guide is quite handy http://dlc.sun.com/pdf/817-0547/817-0547.pdf
Early signs of Xephyr -> ssh -> Xming on Windows seem reasonable.
ProGuard - new 4.2 version:
Evaluated the latest ProGuard 4.2 for our Java ME mobile client and it failed reporting a stack length had gone negative! Have reverted back to 4.1 for now, which seems to be working well. Will report the bug to the team.
Java ME, some J9 options worth remembering:
-Xint -> disable AOT and JIT, interpreted mode only
-noverify -> disable class verification checks (faster loaded on pre-verified code)
-Xnolinenumbers -> turn off line number debug info
Saturday, 12 April 2008
Configuring Solaris networking
Found this useful link that explains how to configure networking on Solaris both using the newer NWAM and standard networking methods:
https://www.opensolaris.org/jive/message.jspa?messageID=197639
The important bits! - some simple examples:
Set Default gateway:
#echo "10.0.0.1"> /etc/defaultrouter
NWAM settings:
Set a static IP
#echo "nge0 static 10.0.0.3/8"> /etc/nwam/llp
Enable NWAM
#svcadm disable svc:/network/physical:default
#svcadm enable svc:/network/physical:nwam
Configure DNS
#svcadm disable svc:/network/dns/client:default
# echo "nameserver 10.0.0.1">> /etc/resolv.conf
# cp /etc/nsswitch.dns /etc/nsswitch.conf
# svcadm enable svc:/network/dns/client:default
https://www.opensolaris.org/jive/message.jspa?messageID=197639
The important bits! - some simple examples:
Set Default gateway:
#echo "10.0.0.1"> /etc/defaultrouter
NWAM settings:
Set a static IP
#echo "nge0 static 10.0.0.3/8"> /etc/nwam/llp
Enable NWAM
#svcadm disable svc:/network/physical:default
#svcadm enable svc:/network/physical:nwam
Configure DNS
#svcadm disable svc:/network/dns/client:default
# echo "nameserver 10.0.0.1">> /etc/resolv.conf
# cp /etc/nsswitch.dns /etc/nsswitch.conf
# svcadm enable svc:/network/dns/client:default
Subscribe to:
Posts (Atom)