In a strange marketing move, Sun Microsystems, Inc. (Public, NASDAQ:SUNW) has changed their ticker symbol to NASDAQ:JAVA. SUNW stood for "Stanford University Network Workstation".
Am I the only person who doesn’t feel this Java hype is right for Sun? They already have a Java Desktop System (that is little more than Gnome) and a Java Enterprise System that really isn’t about Java and so on. Besides, I find Java doesn’t have that great an overall image to begin with..
Also, it seems this was one of the reasons for the recent drop in stock value (the old SUNW is gone and there's a new symbol called "JAVA" that brokers don't know what to think of. Confusing investors is never a good idea...).
Monday, August 27, 2007
Sun changes NASDAQ stock symbol from SUNW to JAVA
Posted by cmihai at 12:29 PM 0 comments
Labels: Sun
Sunday, August 19, 2007
New Solaris Express installer
There's a new GTK / Gnome based installer for Sun Solaris Express Developer Edition (or select Developer from SXCE 70+ grub). It looks pretty good, but seems to miss some critical features in terms of disk partitioning. We'll see how Caiman turns out when they introduce that to Solaris Express..
Posted by cmihai at 10:26 PM 0 comments
Labels: Solaris
Monday, August 06, 2007
Master bootable OpenBSD install media
Mastering your own bootable OpenBSD image:
Note that you can use cdXX.iso and do a network install, or use 2 cdroms (one with cd41.iso and another with the install sets) or even a floppy and install media with the install sets, but it's nicer to master your own DVD or CD image. Of course, it's also nice to help out OpenBSD and donate or purchase the official install media. We'll assume a i386 architecture here.
- Create the directory structure
% mkdir -p OpenBSD/4.1/i386
% cd OpenBSD/4.1/i386 - Download the install images and needed files to the directory we've just created from your local OpenBSD mirror (follow the similar directory structure).
- Download sources and ports if needed (ports.tar.gz, src.tar.gz, etc). Add packages if you're making a DVD.
- Use mkisofs to create the bootable image:cd ../../
% mkisofs -vrTJV "OpenBSD41" -b 4.1/i386/cdrom41.fs -c boot.catalog -o OpenBSD41.iso ~/OpenBSD
- Test the image. You can use qemu:
% qemu -cdrom ~/OpenBSD41.iso -boot d
- Burn the image to a cdrom or DVD using cdio(1), cdrecord or growisofs.
- Install OpenBSD.
Posted by cmihai at 4:46 PM 0 comments
Labels: BSD
Converting VMware images to Virtualbox format using qemu and vditool
There is no tool that can convert VMware images directly to VirtualBox vdi format without having to do a dump/restore over ssh or something similar, but qemu-img can convert .vmdk VMware images to raw format, and those can be converted to VirtualBox .vdi using vditool.
First, make sure you have qemu installed, and have downloaded vditool.
- Convert the VMware image to raw format:
# qemu-img convert -f vmdk VMwareImage.vmdk -O raw RawImage.img
- Convert the RAW image to vdi format.
# vditool DD Image.vdi RawImage.img
Now start up VirtualBox and associate the .vdi image to a new virtual machine. You may need to change the bootloader settings for the OS (disk changes and such).
Posted by cmihai at 12:56 PM 1 comments
Labels: Virtualization
Firewalling HP-UX with IP Filter (ipf)
Configuring IP Filter on a HP-UX 11i installation
Check if IP Filter is installed:
# swlist | grep IPF
B9901AA A.03.05.12 HP IPFilter 3.5alpha5
The IP Filter configuration is stored in:
/etc/opt/ipf/ipf.conf
IP Filter starts on boot by default and processes the rules file /etc/opt/ipf/ipf.conf.
Verify that IP Filter is running:
# ipf -V
ipf: HP IP Filter: v3.5alpha5 (A.03.05.12) (400)
Kernel: HP IP Filter: v3.5alpha5 (A.03.05.12)
Running: yes
Log Flags: 0 = none set
Default: pass all, Logging: available
Active list: 1
To (re)load IPFilter:
# /sbin/init.d/ipfboot start
To check statistics:
# ipfstat
To test a set of ipf rules without putting them in place, you can use the ipftest(1) tool.
The default log file for ipmon is /var/adm/syslog/syslog.log
Here is a commented example rule file set:
/etc/opt/ipf/ipf.conf
#IPFilter configuration file
# block incoming packets with ip options set
block in log quick all with ipopts
# These rules will allow connections initiated from
# this host along with the return connection
pass out quick proto icmp all keep state
pass out quick proto tcp all keep state
pass out quick proto udp all keep state
####################################################
# End allow outgoing rules #
####################################################
# These rules specifically do not log netbios udp or portmapper
# packets because these protocols tends to be very noisy on networks
block in quick proto udp from any to any port = netbios_ns
block in quick proto udp from any to any port = netbios_dgm
block in quick proto udp from any to any port = portmap
#####################################################################
# The following rules explicitly allow certain types of connections#
#####################################################################
# Allow SecureShell incoming connections on alternate port
pass in quick proto tcp from any to any port = 9451 flags S keep state keep frags
# Allow Oracle incoming connections:
# Oracle iSQL*Plus
pass in quick proto tcp from any to any port = 5560 keep state
# Oracle Enterprise Manager (em)
pass in quick proto tcp from any to any port = 1158 keep state
# Oracle database
pass in quick proto tcp from any to any port = 1521 keep state
# Oracle agent
pass in quick proto tcp from any to any port = 1830 keep state
##################################################################
# Oracle 9i Installation
##################################################################
#Oracle http
pass in quick proto tcp from any to any port = 7777 keep state
#Oracle https
pass in quick proto tcp from any to any port = 7778 keep state
pass in quick proto tcp from any to any port = 4443 keep state
pass in quick proto tcp from any to any port = 3566 keep state
##################################################################
#Block any incoming connections which were not explicitly allowed#
##################################################################
block in log all
Remember, if you're doing this remote via ssh, make sure you have iLO access in case you mess up and block ssh by mistake.
You can also use Bastille (download from hp.com) to generate a ruleset.
Read the HP-UX IPFilter Administrator's Guide for more details.
Posted by cmihai at 11:52 AM 0 comments
Labels: HP-UX
Friday, August 03, 2007
Getting detailed system information on Solaris
Getting detailed system information on Solaris; tools.
Getting detailed memory usage information:
# TERM=vt100; export TERM
# /usr/bin/mdb -k
Loading modules: [ unix genunix specfs dtrace uppc pcplusmp scsi_vhci ufs ip hook neti sctp arp usba uhci qlc fctl nca lofs zfs random md cpc fcip crypto fcp logindmux ptm sppp nfs emlxs ]
> ::memstat
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 440220 1719 85%
Anon 37669 147 7%
Exec and libs 9736 38 2%
Page cache 10625 41 2%
Free (cachelist) 14809 57 3%
Free (freelist) 6747 26 1%
Total 519806 2030
Physical 519805 2030
::kmastat
..... output ....
# /usr/bin/vmstat
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr cd cd cd s0 in sy cs us sy id
0 0 0 6031912 132516 0 4 0 0 0 0 1 0 11 11 -4 548 283 349 0 1 99
# /opt/csw/bin/top -o size | head -10(top was installed from blastwave)
last pid: 10375; load avg: 0.02, 0.03, 0.02; up 10+06:56:00 19:27:30
73 processes: 72 sleeping, 1 on cpu
Memory: 2038M phys mem, 91M free mem, 6001M swap, 6001M free swap
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
688 root 1 59 0 278M 18M sleep 3:28 0.00% Xorg
778 noaccess 25 59 0 80M 57M sleep 8:06 0.00% java
531 root 16 59 0 12M 8880K sleep 0:06 0.00% fmd
789 root 1 59 0 11M 7448K sleep 2:04 0.00% dtgreet
Hardware information:
- dmesg(1M) - collect system diagnostic messages to form error log (also contains valuable information)
- arch(1) - display the architecture of the current host
# /usr/bin/arch -k
i86pc
- psrinfo(1M) - displays information about processors
# /usr/sbin/psrinfo -v
Status of virtual processor 0 as of: 08/03/2007 18:50:37
on-line since 07/24/2007 12:31:43.
The i386 processor operates at 3392 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 08/03/2007 18:50:37
on-line since 07/24/2007 12:31:58.
The i386 processor operates at 3392 MHz,
and has an i387 compatible floating point processor.
- isainfo(1) - describe instruction set architectures
# /usr/bin/isainfo -v
64-bit amd64 applications
cx16 mon sse3 pause sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
ahf cx16 mon sse3 pause sse2 sse fxsr mmx cmov sep cx8 tsc fpu
- prtdiag(1M) - display system diagnostic information
# /usr/sbin/prtdiag -v
System Configuration: FUJITSU SIEMENS CELSIUS M / W
BIOS Configuration: FUJITSU SIEMENS // Phoenix Technologies Ltd. 5.00 R1.10.2156.A1 05/08/2006
==== Processor Sockets ====================================
Version Location Tag
-------------------------------- --------------------------
Intel(R) Pentium(R) 4 CPU CPU
==== Memory Device Sockets ================================
Type Status Set Device Locator Bank Locator
------- ------ --- ------------------- --------------------
DDR2 in use 0 Slot-1 Channel A
DDR2 in use 0 Slot-3 Channel A
DDR2 in use 0 Slot-2 Channel B
DDR2 in use 0 Slot-4 Channel B
==== On-Board Devices =====================================
SMsC SuperI/O
Realtek ALC260
Intel 945G
Heimdall
BCM5751
==== Upgradeable Slots ====================================
ID Status Type Description
--- --------- ---------------- ----------------------------
1 available PCI Express PCI-Express x16
3 available PCI Express PCI-Express-1 x1
2 available PCI Express PCI-Express-2 x1
4 available PCI PCI-1
5 in use PCI PCI-2
6 available PCI PCI-3
7 available PCI PCI-4
- prtconf(1M) - print system configuration. Use -v for verbose (expect over 2000 lines).
# /usr/sbin/prtconfDisks
System Configuration: Sun Microsystems i86pc
Memory size: 2039 Megabytes
System Peripherals (Software Nodes):
i86pc
scsi_vhci, instance #0
isa, instance #0
motherboard (driver not attached)
fdc (driver not attached)
lp (driver not attached)
asy, instance #0
pci, instance #0
pci1734,1084 (driver not attached)
display, instance #1
pci8086,27d0, instance #1
pci8086,27d2, instance #5
pci1734,1096, instance #2
pci8086,27d4, instance #2
pci8086,27d6, instance #3
pci1734,1085, instance #4
pci1734,1085, instance #5
pci1734,1085, instance #6
pci1734,1085, instance #7
pci1734,1085, instance #1
pci8086,244e, instance #0
pci10b8,b452 (driver not attached)
pci1734,1085 (driver not attached)
pci-ide, instance #0
ide, instance #0
sd, instance #0
ide (driver not attached)
pci-ide, instance #1
ide, instance #2
cmdk, instance #0
cmdk, instance #1
ide, instance #3
cmdk, instance #3
pci1734,1085 (driver not attached)
pci, instance #0
iscsi, instance #0
pseudo, instance #0
options, instance #0
agpgart, instance #0
xsvc, instance #1
used-resources (driver not attached)
cpus (driver not attached)
cpu, instance #0 (driver not attached)
cpu, instance #1 (driver not attached)
- format(1M) - disk partitioning and maintenance utility
/pci@0,0/pci-ide@1f,2/ide@0/cmdk@0,0
1. c1d1
/pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0
2. c2d1
/pci@0,0/pci-ide@1f,2/ide@1/cmdk@1,0
3. c3t0100003005CC77CE00002A004680C8B4d0
/scsi_vhci/disk@g0100003005cc77ce00002a004680c8b4
4. c3t0100003005CC77CE00002A004680C91Ad0
/scsi_vhci/disk@g0100003005cc77ce00002a004680c91a
5. c3t0100003005CC77CE00002A004680CA6Ad0
/scsi_vhci/disk@g0100003005cc77ce00002a004680ca6a
6. c3t0100003005CC77CE00002A004680CA6Bd0
/scsi_vhci/disk@g0100003005cc77ce00002a004680ca6b
Specify disk (enter its number):
- iostat(1M) - report I/O statistics
# /usr/bin/iostat -En
c1d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: WDC WD2000JD-22 Revision: Serial No: WD-WCAMT10 Size: 200.05GB <200047067136>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c1d1 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: WDC WD5000KS-00 Revision: Serial No: WD-WMANU15 Size: 500.10GB <500101152768>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c2d1 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: WDC WD5000KS-00 Revision: Serial No: WD-WMANU15 Size: 500.10GB <500101152768>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c0t0d0 Soft Errors: 1 Hard Errors: 264 Transport Errors: 0
Vendor: _NEC Product: DVD_RW ND-4550A Revision: 1.85 Serial No:
Size: 0.00GB <0>
Media Error: 0 Device Not Ready: 264 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c3t0100003005CC77CE00002A004680CA6Bd0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: SUN Product: SOLARIS Revision: 1 Serial No:
Size: 1099.51GB <1099511627776>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c3t0100003005CC77CE00002A004680C91Ad0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: SUN Product: SOLARIS Revision: 1 Serial No:
Size: 1099.51GB <1099511627776>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c3t0100003005CC77CE00002A004680CA6Dd0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: SUN Product: SOLARIS Revision: 1 Serial No:
Size: 1099.51GB <1099511627776>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c3t0100003005CC77CE00002A004680CA92d0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: SUN Product: SOLARIS Revision: 1 Serial No:
Size: 1099.51GB <1099511627776>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c3t0100003005CC77CE00002A004680C8B4d0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
USB and Removable Devices:
- cfgadm(1M) - configuration administration
# /usr/sbin/cfgadm -al
Ap_Id Type Receptacle Occupant Condition
usb5/1 unknown empty unconfigured ok
usb5/2 unknown empty unconfigured ok
usb6/1 unknown empty unconfigured ok
usb6/2 unknown empty unconfigured ok
usb7/1 unknown empty unconfigured ok
usb7/2 unknown empty unconfigured ok
usb8/1 unknown empty unconfigured ok
usb8/2 unknown empty unconfigured ok
usb9/1 unknown empty unconfigured ok
usb9/2 unknown empty unconfigured ok
usb9/3 unknown empty unconfigured ok
usb9/4 unknown empty unconfigured ok
usb9/5 unknown empty unconfigured ok
usb9/6 unknown empty unconfigured ok
usb9/7 unknown empty unconfigured ok
usb9/8 unknown empty unconfigured ok
- rmformat(1) - removable rewritable media format utility
# /usr/bin/rmformat
Looking for devices...
1. Logical Node: /dev/rdsk/c0t0d0p0
Physical Node: /pci@0,0/pci-ide@1f,1/ide@0/sd@0,0
Connected Device: _NEC DVD_RW ND-4550A 1.85
Device Type: DVD Reader/Writer
Bus: IDE
Size:
Label:
Access permissions:
System information:
- kstat(1M) - display kernel statistics
# /usr/bin/kstat | head -10
module: agpgart instance: 0
name: agpinfo class: agp
agp_enabled no
agp_mode_set 0
aper_base 0
aper_size 0
aper_used 0
arc_type UNKNOWN
crtime 66.384729768
master_dev_id 0
- sysdef(1M) - output system definition
# /usr/sbin/sysdef
*
* Hostid
*
2ed6b4f4
*
* i86pc Configuration
*
*
* Devices
*
scsi_vhci, instance #0
disk, instance #3
disk, instance #4
disk, instance #5
disk, instance #6
disk, instance #7
disk, instance #8
isa, instance #0
motherboard (driver not attached)
fdc (driver not attached)
lp (driver not attached)
asy, instance #0
pci, instance #0
............................ (1000 more lines to follow).......................
- cat /etc/release - print release information
- uname(1) - print name of current system
# /usr/bin/uname -a
SunOS solfs 5.11 snv_61 i86pc i386 i86pc
- showrev(1M) - show machine, software revision, and patch revision information
# /usr/bin/showrev -p
Patch: 124939-03 Obsoletes: Requires: Incompatibles: Packages: SUNWjdmk-base
Patch: 125275-01 Obsoletes: Requires: Incompatibles: Packages: SUNWjdmk-base
Patch: 120186-10 Obsoletes: Requires: Incompatibles: Packages: SUNWstaroffice-core07, SUNWstaroffice-core08, SUNWstaroffice-writer, SUNWstaroffice-lngutils, SUNWstaroffice-javafilter, SUNWstaroffice-draw, SUNWstaroffice-fonts, SUNWstaroffice-gallery, SUNWstaroffice-math, SUNWstaroffice-xsltfilter, SUNWstaroffice-core01, SUNWstaroffice-ooofonts, SUNWstaroffice-calc, SUNWstaroffice-core02, SUNWstaroffice-core03, SUNWstaroffice-agfafonts, SUNWstaroffice-base, SUNWstaroffice-core04, SUNWstaroffice-core05, SUNWstaroffice-gnome-integration, SUNWstaroffice-graphicfilter, SUNWstaroffice-impress, SUNWstaroffice-core06, SUNWstaroffice-core09
Patch: 118669-11 Obsoletes: Requires: Incompatibles: Packages: SUNWj5dvx, SUNWj5dmx, SUNWj5rtx
Patch: 118668-11 Obsoletes: Requires: Incompatibles: Packages: SUNWj5man, SUNWj5dev, SUNWj5rt, SUNWj5cfg, SUNWj5dmo
Patch: 116299-08 Obsoletes: Requires: Incompatibles: Packages: SUNWxsrt, SUNWxrgrt, SUNWxrpcrt, SUNWjaxp
Patch: 116303-02 Obsoletes: Requires: Incompatibles: Packages: SUNWxrpcrt
Network information:
- dladm(1M) - administer data links
# /usr/sbin/dladm show-dev && /usr/sbin/dladm show-link
bge2 link: up speed: 1000Mb duplex: full
bge2 type: non-vlan mtu: 1500 device: bge2
- ifconfig(1M) - configure network interface parameters
# /usr/sbin/ifconfig -a
lo0: flags=2001000849mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge2: flags=201000843mtu 1500 index 2
inet 192.168.0.66 netmask ffff0000 broadcast 192.168.255.255
ether de:ad:ca:fe:ba:be
Other cool tools:
intrstat(1M), vmstat(1M), mpstat(1M), prstat(1M), "zpool iostat" or
/usr/X11/bin/scanpci to print installed PCI cards.
Posted by cmihai at 7:32 PM 0 comments
Labels: Solaris
Restoring an array on a DEC StorageWorks
On old DEC StorageWorks arrays, you need to access the vt420 console and clear the invalid cache after a forced reboot. To do so, use a vt420 console on the storage array. If you need help, use ? or the HELP command.
SHOW THIS_CONTROLLER
SHOW OTHER_CONTROLLER
CLEAR INVALID_CACHE THIS
CLEAR INVALID_CACHE OTHER
SHOW DISKS
SHOW D101
--> UNIT HAS LOST DATA
CLEAR LOST_DATA D101
Now the array should be in an optimal state, and your OpenVMS system should be able to access it.
Posted by cmihai at 7:19 PM 0 comments
Labels: OpenVMS
OpenVMS DECNET, TCP/IP, NFS
Mounting NFS under OpenVMS:
OpenVMS network mangement is done using the DECNET TCP/IP stack. At the $UCX> prompt, make sure the route is properly set:
$UCX> SET ROUTE 192.168.0.0 /GATEWAY=192.168.0.1
$UCX> mount dnfs16: /host = 192.168.0.100 /path="/store" /auto
To umount the NFS drive:
$UCX> DISMOUNT DNFS16
Posted by cmihai at 7:09 PM 0 comments
Labels: OpenVMS
Cloning a disk in OpenBSD
If you want to upgrade your disk or clone it for whatever reason (move to another machine, etc), you can do this easily with dump(8). Let's assume the old disk is wd0 and the new disk is wd1.
Cloning a disks is little more then doing a full system backup and restoring it to another disk.
Remember, you need to boot single user mode with "boot -s", fsck -p / && mount -uw / (repeat for /usr, etc) to make sure there are no problems with the level 0 dump (as OpenBSD dump does NOT support snapshots). If you have issues, just make sure everything is mounted properly (check with the "mount" command).
- Add the new disk, and check "dmesg".
- Initialize the MBR for the new disk:
# fdisk -i wd1
- Create a disklabel for the new disk:
# disklabel -e wd1
- Format the new disk:
# newfs /dev/wd1a
- Mount the disk:
# mount /dev/wda1 /mnt
- Change to the /mnt directory:
# cd /mnt
- Do a full system dump and restore to the /mnt mountpoint. If you have more filesystems, restore them to their respective mountpoints (/var goes to /mnt/var, etc).
# dump -0f - / | restore -rf -
- Change to the root directory:
# cd /
- Install bootblocks to make the second disk bootable:
# /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot wd1
- Umount the new disk:
# umount /mnt
- Reboot
# reboot
You can now remove the disk.
This dump can also be done over the network using ssh. Just replace the dump | restore commands with:
# /sbin/dump -0f- / | gzip -2 | ssh -c blowfish user@server dd of=/backup/disk.gzYou can now restore this image over the network at your own leisure. This will also serve as a full disk backup.
On a side note, be sure to read the manpage for newfs(8). Look at the -i option to chose the inode density. Depending on the server's role, you may run out of inodes before you run out of disk space. There's 2 ways to avoid this: larger disks / partitions = more inodes or chaning the inode density. This is especially important since you can't change it in the installer. So one way to avoid such problems is to create the data partition (for your web stuff or whatever) after you've installed the system. That, or dump / newfs -i 2048 / restore.
Posted by cmihai at 4:06 PM 4 comments
Labels: BSD
LiveUpgrade SXCE
It's basically an interesting alternative to upgrading from the media (CD, DVD, etc) or using JumpStart.
Make sure you have the latest version on LiveUpgrade packages.
"Once the prerequisite packages are in place, the Live Upgrade packages,
SUNWlur
and SUNWluu
, must also be installed from the version of Solaris to which the target machine is being upgraded"See http://www.sun.com/bigadmin/features/articles/live_upgrade.html
Read the ONNV Flag Days if you're using OpenSolaris:
http://opensolaris.org/os/community/on/flag-days/
For Solaris 8 07/01 and earlier, 7 and 2.6 you need to download LiveUpgrade 2 from:
http://www.sun.com/software/solaris/liveupgrade/
While LU 2 is integrated into Solaris 9 and 8 10/01 and later it's usually best to check that page or upgrade to the latest LU.
Anyway, on with an example on how to perform a LiveUpgrade between 2 SXCE builds:
cmsol% uname -a
SunOS cmsol 5.11 snv_68 i86pc i386 i86pc
- Download a new SXCE DVD image from http://opensolaris.org/os/downloads/
- Unzip the archives:
"for i in *.zip; do unzip $i; done; rm *zip"
- Concatenate the files into a iso:
cmsol% cat sol-nv-b69-x86-dvd-iso-a sol-nv-b69-x86-dvd-iso-b sol-nv-b69-x86-dvd-iso-c > sol-nv-b69-x86-dvd.iso
- Check the md5 sum:
cmsol% digest -a md5 sol-nv-b69-x86-dvd.iso
6a760b97fe664b3670aae1cf091ebaaf
cmsol% grep 6a76 md5sum_x86.list
6a760b97fe664b3670aae1cf091ebaaf sol-nv-b69-x86-dvd.iso - Check how the hard disk is partitioned:
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1d0
/pci@0,0/pci-ide@1f,2/ide@0/cmdk@0,0
Specify disk (enter its number): 0
selecting c1d0
Controller working list found
[disk formatted, defect list found]
Warning: Current Disk has mounted partitions.
/dev/dsk/c1d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c1d0s1 is currently used by swap. Please see swap(1M).
/dev/dsk/c1d0s3 is currently mounted on /altroot. Please see umount(1M).
/dev/dsk/c1d0s7 is currently mounted on /export/home. Please see umount(1M). - We're using the /altroot partition for LiveUpgrade. We are going to umount it first.
# umount /dev/dsk/c1d0s3 && rmdir /altroot
- Edit /etc/vfstab and comment out the line that mounts /altroot
#/dev/dsk/c1d0s3 /dev/rdsk/c1d0s3 /altroot ufs 2 yes -
- Create the boot environment
# lucreate -c "SXCE1" -m /:/dev/dsk/c1d0s3:ufs -n "SXCE2"
Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
Comparing source boot environmentfile systems with the file is not a root device for any boot environment; cannot get BE ID.
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices
Updating system configuration files.
The device
Creating configuration for boot environment.
Source boot environment is.
Creating boot environment.
Checking for GRUB menu on boot environment.
The boot environmentdoes not contain the GRUB menu.
Creating file systems on boot environment.
Creatingfile system for in zoneon .
Mounting file systems for boot environment.
Calculating required sizes of file systems for boot environment. contains a list of <2>
Populating file systems on boot environment. .
Checking selection integrity.
Integrity check OK.
Populating contents of mount point
Copying.
WARNING: The file
potential problems (issues) that were encountered while populating boot
environment. and determine if any must be resolved. In
INFORMATION: You must review the issues listed in
general, you can ignore warnings about files that were skipped because
they did not exist or could not be opened. You cannot ignore errors such
as directories or files that could not be created, or file systems running
out of disk space. You must manually resolve any such problems before you
activate boot environment.
Creating shared file system mount points.
Copying root of zone.
Creating compare databases for boot environment. .
Creating compare database for file system
Updating compare databases on boot environment.
Making boot environmentbootable.
Updating bootenv.rc on ABE.
Population of boot environmentsuccessful.
Creation of boot environmentsuccessful.
# - Mount the DVD .iso image:
# mkdir /mnt/iso
# lofiadm -a /export/home/cmihai/iso/sol-nv-b69-x86-dvd.iso
# mount -F hsfs /dev/lofi/1 /mnt/iso - Initiate the LiveUpgrade process using the mounted iso image:
# luupgrade -u -n SXCE2 -s /mnt/iso/
Copying failsafe kernel from media.
Uncompressing miniroot
Creating miniroot device
miniroot filesystem is
Mounting miniroot at
Validating the contents of the media .
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media containsversion <11>.
Constructing upgrade profile to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE.
Checking for GRUB menu on ABE.
Checking for x86 boot partition on ABE.
Determining packages to install or upgrade for BE.
Performing the operating system upgrade of the BE.
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
Upgrading Solaris: 100% completed
Installation of the packages from this media is complete.
Deleted empty GRUB menu on ABE.
Adding operating system patches to the BE.
The operating system patch installation is complete.
ABE boot partition backing deleted.
Configuring failsafe for system.
Failsafe configuration is complete.
INFORMATION: The file on boot
environmentcontains a log of the upgrade operation.
INFORMATION: The file on boot
environmentcontains a log of cleanup operations required.
INFORMATION: Review the files listed above. Remember that all of the files
are located on boot environment. Before you activate boot
environment, determine if any additional system maintenance is
required or if additional media of the software distribution must be
installed.
The Solaris upgrade of the boot environmentis complete.
Installing failsafe
Failsafe install is complete. - Activate the new boot environment:
luactivate SXCE2
Saving latest GRUB loader.
Generating partition and slice information for ABE
Boot menu exists.
Generating direct boot menu entries for ABE.
Generating direct boot menu entries for PBE.
**********************************************************************
The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.
**********************************************************************
In case of a failure while booting to the target BE, the following process
needs to be followed to fallback to the currently working boot environment:
1. Do *not* change *hard* disk order in the BIOS.
2. Boot from the Solaris Install CD or Network and bring the system to
Single User mode.
3. Mount the Parent boot environment root slice to some directory (like
/mnt). You can use the following command to mount:
mount -Fufs /dev/dsk/c1d0s0 /mnt
4. Runutility with out any arguments from the Parent boot .
environment root slice, as shown below:
/mnt/sbin/luactivate
5. luactivate, activates the previous working boot environment and
indicates the result.
6. Exit Single User mode and reboot the machine.
**********************************************************************
Modifying boot archive service
GRUB menu is on device:
Filesystem type for menu device:.
Activation of boot environmentsuccessful. - Reboot (don't use "reboot").
# init 6
You should now boot into the new environment (SXCE 69 in this case).
cmsol% uname -a
SunOS cmsol 5.11 snv_69 i86pc i386 i86pc
Reading material:
- docs.sun.com LiveUpgrade Guide
- BigAdmin LiveUpgrade
- Boyd Adamson presents Live Upgrade: Using and Abusing LiveUpgrade
Posted by cmihai at 1:21 PM 0 comments
Labels: Enterprise, Open Source, Solaris, Sun
Graphics on Solaris.
Back in the day, Solaris/SPARC used to be a dedicated platform for PLM, CAD/CAM/CAE and such with products like Catia made specific for the UNIX marketplace. Now it's mostly Windows and Mac... but you can still have some fun on Solaris doing 3D modeling, free.
Blender is an OpenSource suite of tools for 3D modeling and creation. Not only that, but it also runs on Solaris.
Posted by cmihai at 12:22 PM 0 comments
Labels: Solaris
Gaming on Solaris
A few games one can play on Solaris:
Grab the Quake 3 packages (for either SPARC or x86) and the data packages (demo) from http://ioquake3.org/ pkgadd -d and enjoy a nice game of Quake 3. You'll need a good framebuffer on SPARC or a NVIDIA card on x86 though. They also have OpenArena and a couple of mods. PS: The beer mug is an Opera widget called "Friday Fun". It fills up as Friday approaches.
Or maybe you'd rather have a nice game of Quake 2:
Or why not, even Quake 1, using the Darkplaces engine:
Posted by cmihai at 12:12 PM 1 comments
Labels: Solaris
Adding a user
Adding a user.
edb-zone# mkdir /export/home
edb-zone# chmod 755 /export/home
edb-zone# mkdir /export/home/cmihai
edb-zone# useradd -s /usr/bin/zsh -d /export/home/cmihai cmihai
edb-zone# chown cmihai /export/home/cmihai
edb-zone# passwd cmihai
New Password:
Re-enter new Password:
passwd: password successfully changed for cmihai
edb-zone#
Posted by cmihai at 11:34 AM 0 comments
Labels: Solaris
Solaris Container with a 1 CPU Resource pool
We're going to create a Resource Pool with only 1 CPU, then create a zone and associate it to the resource pool.
In the global zone:
# psrinfo -v
Status of virtual processor 0 as of: 08/02/2007 16:13:20
on-line since 07/31/2007 12:04:58.
The i386 processor operates at 3392 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 08/02/2007 16:13:20
on-line since 07/31/2007 12:05:09.
The i386 processor operates at 3392 MHz,
and has an i387 compatible floating point processor.
Creating the resouce pool:
We will use the pooladm(1M) and poolcfg(1M) commands to create and configure the resouce pool:
Enable resource pools:
# pooladm -e
Save current configuration:
# pooladm -s
List current configuration:
# pooladm
system default
string system.comment
int system.version 1
boolean system.bind-default true
string system.poold.objectives wt-load
pool pool_default
int pool.sys_id 0
boolean pool.active true
boolean pool.default true
int pool.importance 1
string pool.comment
pset pset_default
pset pset_default
int pset.sys_id -1
boolean pset.default true
uint pset.min 1
uint pset.max 65536
string pset.units population
uint pset.load 72
uint pset.size 2
string pset.comment
cpu
int cpu.sys_id 1
string cpu.comment
string cpu.status on-line
cpu
int cpu.sys_id 0
string cpu.comment
string cpu.status on-line
Create a processor set with 1 CPU:
# poolcfg -c 'create pset edb-pset (uint pset.min=1; uint pset.max=1)'
Create a resource pool:
# poolcfg -c 'create pool edb-pool'
Associate the pool to the processor set:
# poolcfg -c 'associate pool edb-pool (pset edb-pset)'
Enable the configuration:
# pooladm -c
See the results:
# pooladm
system default
string system.comment
int system.version 1
boolean system.bind-default true
string system.poold.objectives wt-load
pool edb-pool
int pool.sys_id 1
boolean pool.active true
boolean pool.default false
int pool.importance 1
string pool.comment
pset edb-pset
pool pool_default
int pool.sys_id 0
boolean pool.active true
boolean pool.default true
int pool.importance 1
string pool.comment
pset pset_default
pset edb-pset
int pset.sys_id 1
boolean pset.default false
uint pset.min 1
uint pset.max 1
string pset.units population
uint pset.load 2
uint pset.size 1
string pset.comment
cpu
int cpu.sys_id 0
string cpu.comment
string cpu.status on-line
pset pset_default
int pset.sys_id -1
boolean pset.default true
uint pset.min 1
uint pset.max 65536
string pset.units population
uint pset.load 71
uint pset.size 1
string pset.comment
cpu
int cpu.sys_id 1
string cpu.comment
string cpu.status on-line
Creating the zone:
# zonecfg -z edb-zone
edb-zone: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:edb-zone> create
zonecfg:edb-zone> set zonepath=/export/home/zones/edb-zone
zonecfg:edb-zone> set autoboot=true
zonecfg:edb-zone> add net
zonecfg:edb-zone:net> set address=192.168.1.5
zonecfg:edb-zone:net> set physical=bge0
zonecfg:edb-zone:net> end
zonecfg:edb-zone> set pool=edb-pool
zonecfg:edb-zone> verify
zonecfg:edb-zone> commit
zonecfg:edb-zone> exit
The important part is associating the pool to edb-pool. (set pool=edb-pool). We can also add inherit-pkg-dir set /opt and so on if desired.
The zonepath should be a ZFS filesystem (zfs set compression=on) to speed things up.
Installing the zone:
# zoneadm -z edb-zone install
Preparing to install zone <edb-zone>.
Creating list of files to copy from the global zone.
Copying <39853> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1233> packages on the zone.
Initialized <1233> packages on zone.
Zone <edb-zone> is initialized.
The file </export/home/zones/edb-zone/root/var/sadm/system/logs/install_log> contains a log of the zone installation.
Boot the zone, login and answer the initial boot configuration questions:
# zoneadm -z edb-zone boot
# zlogin -C edb-zone
-> Answer questions:
Confirm the following information. If it is correct, press F2;
to change any information, press F4.
Name service: DNS
Domain name: domain.local
Server address(es): 192.168.1.2
192.168.1.3
Search domain(s): domain.local
Use ESC-2 if F2 doesn't work.
To logout (you can change the escape sequence if it conflicts with ssh with "zlogin -e")
~.
After that, login, and see if it works:
# psrinfo -v
Status of virtual processor 0 as of: 08/02/2007 16:23:55
on-line since 07/31/2007 12:04:58.
The i386 processor operates at 3392 MHz,
and has an i387 compatible floating point processor.
#
Check if all services are running properly:
# svcs -xv
# svcs -xv ssh
Enable ssh if needed:
# svcadm enable ssh
Don't forget to edit /etc/hosts and add the hostname if you don't add it to DNS:
FQDN issues:
# svcs -xv
svc:/system/webconsole:console (java web console)
State: offline since Thu Aug 02 16:24:48 2007
Reason: Start method is running.
See: http://sun.com/msg/SMF-8000-C4
See: man -M /usr/share/man -s 1M smcwebserver
See: /var/svc/log/system-webconsole:console.log
Impact: This service is not running.
svc:/system/postrun:default (Postponed package postinstall command execution)
State: offline since Thu Aug 02 16:23:38 2007
Reason: Start method is running.
See: http://sun.com/msg/SMF-8000-C4
See: /var/svc/log/system-postrun:default.log
Impact: This service is not running.
#
Fixing them:
# ed /etc/hosts
1027
1,$n
1 # CDDL HEADER START
2 #
3 # The contents of this file are subject to the terms of the
4 # Common Development and Distribution License (the "License").
5 # You may not use this file except in compliance with the License.
6 #
7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8 # or http://www.opensolaris.org/os/licensing.
9 # See the License for the specific language governing permissions
10 # and limitations under the License.
11 #
12 # When distributing Covered Code, include this CDDL HEADER in each
13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14 # If applicable, add the following below this CDDL HEADER, with the
15 # fields enclosed by brackets "[]" replaced with your own identifying
16 # information: Portions Copyright [yyyy] [name of copyright owner]
17 #
18 # CDDL HEADER END
19 #
20 # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
21 # Use is subject to license terms.
22 #
23 # ident "@(#)hosts 1.7 06/08/01 SMI"
24 #
25 # Internet host table
26 #
27 ::1 localhost
28 127.0.0.1 localhost
29 192.168.1.5 edb-zone loghost
29d
a
192.168.1.5 edb-zone edb-zone.domain.local
.
w
1038
q
# ping edb-zone
edb-zone is alive
# ping edb-zone.domain.local
edb-zone.domain.local is alive
# svcs -xv
#
Posted by cmihai at 11:32 AM 0 comments
Labels: Solaris
Installing CoolStack on Solaris and creating the SMF manifests.
Installing the AMP stack from Sun CoolStack 1.1 Solaris and writing the SMF manifests:
To cover all aspects, make sure you read the SMF QuickStart Guide and the SMF Blueprint.
Part I: CSKapache2
Create the Apache start method: /lib/svc/method/http-CSKapache2
#!/sbin/sh
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)http-apache2 1.4 06/03/18 SMI"
#
. /lib/svc/share/smf_include.sh
APACHE_HOME=/opt/coolstack/apache2
CONF_FILE=/opt/coolstack/apache2/conf/httpd.conf
PIDFILE=/var/apache2/run/httpd.pid
[ ! -f ${CONF_FILE} ] && exit $SMF_EXIT_ERR_CONFIG
case "$1" in
start)
/bin/rm -f ${PIDFILE}
/bin/mkdir -p /var/run/apache2
ssl=`svcprop -p httpd/ssl svc:/network/http:apache2`
if [ "$ssl" = false ]; then
cmd="start"
else
cmd="startssl"
fi
;;
refresh)
cmd="graceful"
;;
stop)
cmd="stop"
;;
*)
echo "Usage: $0 {start|stop|refresh}"
exit 1
;;
esac
exec ${APACHE_HOME}/bin/apachectl $cmd 2>&1
Set the execute bit for the start method:
# chmod +x /lib/svc/method/http-CSKapache2
Create the Apache SMF manifest: /var/svc/manifest/network/http-CSKapache2.xml
<?xml version="1.0"?>
<!--
CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
-->
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
Copyright 2006 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
ident "@(#)http-apache2.xml 1.6 06/03/18 SMI"
-->
<service_bundle type='manifest' name='CSKapch2r:apache'>
<service
name='network/http'
type='service'
version='1'>
<!--
Because we may have multiple instances of network/http
provided by different implementations, we keep dependencies
and methods within the instance.
-->
<instance name='CSKapache2' enabled='false'>
<!--
Wait for network interfaces to be initialized.
-->
<dependency name='network'
grouping='require_all'
restart_on='error'
type='service'>
<service_fmri value='svc:/milestone/network:default'/>
</dependency>
<!--
Wait for all local filesystems to be mounted.
-->
<dependency name='filesystem-local'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri
value='svc:/system/filesystem/local:default'/>
</dependency>
<!--
Wait for automounting to be available, as we may be
serving data from home directories or other remote
filesystems.
-->
<dependency name='autofs'
grouping='optional_all'
restart_on='error'
type='service'>
<service_fmri
value='svc:/system/filesystem/autofs:default'/>
</dependency>
<exec_method
type='method'
name='start'
exec='/lib/svc/method/http-CSKapache2 start'
timeout_seconds='60' />
<exec_method
type='method'
name='stop'
exec='/lib/svc/method/http-CSKapache2 stop'
timeout_seconds='60' />
<exec_method
type='method'
name='refresh'
exec='/lib/svc/method/http-CSKapache2 refresh'
timeout_seconds='60' />
<property_group name='httpd' type='application'>
<stability value='Evolving' />
<propval name='ssl' type='boolean' value='false' />
</property_group>
<property_group name='startd' type='framework'>
<!-- sub-process core dumps shouldn't restart
session -->
<propval name='ignore_error' type='astring'
value='core,signal' />
</property_group>
</instance>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>
Apache 2 HTTP server
</loctext>
</common_name>
<documentation>
<manpage title='httpd' section='8'
manpath='/opt/coolstack/apache2/man' />
<doc_link name='apache.org'
uri='http://httpd.apache.org' />
</documentation>
</template>
</service>
</service_bundle>
Now import the SMF service:
Minimize service privileges:
# svccfg -v import /var/svc/manifest/network/http-CSKapache2.xml
Increase semaphores for PHP:
# svcprop -v -p start CSKapache2
Add it to service configuration:
# projadd -c "Apache-PHP" -U webservd httpd.php
# projmod -sK "project.max-sem-ids=(privileged,256,deny)" httpd.php
# svccfg -s http:CSKapache2 setprop start/project = astring: httpd.phpEdit /opt/coolstack/php5/lib/php.ini and enable hardened PHP:
extension="suhosin.so"
Part II: mysql
Install the 64 bit MySQL and follow the notes in the README: /opt/coolstack/mysql/README
- Initialize the database tables:
/opt/coolstack/mysql/bin/mysql_install_db
- Create mysql user and group and change install directory ownership:
# groupadd mysql
# useradd -g mysql mysql
# chown -R mysql:mysql /opt/coolstack/mysql/var
- Add a password for the root user:
# /opt/coolstack/mysql/bin/mysqladmin -u root password 'new-password'
# /opt/coolstack/mysql/bin/mysqladmin -u root -h cmsol password 'new-password'
#!/usr/bin/sh
#
# Method file for MySQL
#
# This uses the MySQL packages from CoolStack 1.1
# CSKmysql
#
# Modify accordingly!
#
# NOTE: Make sure DB_DIR is owned BY the mysql user and group and chmod
# 700.
#
. /lib/svc/share/smf_include.sh
DB_DIR=/site-data0/data
PIDFILE=${DB_DIR}/`/usr/bin/uname -n`.pid
case "$1" in
start)
/opt/coolstack/mysql/bin/mysqld_safe --user=mysql --datadir=${DB_DIR} --pid-file=${PIDFILE} > /dev/null &
;;
stop)
if [ -f ${PIDFILE} ]; then
/usr/bin/pkill mysqld_safe >/dev/null 2>&1
/usr/bin/kill `cat ${PIDFILE}` > /dev/null 2>&1 && echo -n ' mysqld'
fi
;;
'restart')
stop
while pgrep mysqld > /dev/null
do
sleep 1
done
start
;;
*)
echo ""
echo "Usage: `basename $0` { start | stop | restart }"
echo ""
exit 64
;;
esac
Set the execute bit for the start method:
# chmod +x /lib/svc/method/CSKmysql
Create the MySQL SMF manifest: /var/svc/manifest/network/mysql.xml
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
Manifest for MySQL
-->
<service_bundle type='manifest' name='CSKmysql:mysql'>
<service
name='network/mysql'
type='service'
version='1'>
<create_default_instance enabled='false' />
<single_instance />
<!--
Wait for network interfaces to be initialized.
-->
<dependency name='network'
grouping='require_all'
restart_on='error'
type='service'>
<service_fmri value='svc:/milestone/network:default'/>
</dependency>
<!--
Wait for all local filesystems to be mounted.
-->
<dependency name='filesystem-local'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri
value='svc:/system/filesystem/local:default'/>
</dependency>
<exec_method
type='method'
name='start'
exec='/lib/svc/method/CSKmysql start'
timeout_seconds='60'>
</exec_method>
<exec_method
type='method'
name='stop'
exec='/lib/svc/method/CSKmysql stop'
timeout_seconds='60'>
</exec_method>
<exec_method
type='method'
name='restart'
exec='/lib/svc/method/CSKmysql restart'
timeout_seconds='60'>
</exec_method>
</service>
</service_bundle>
Now import the SMF service:
Now we can start the SMF services:# svccfg -v import /var/svc/manifest/network/mysql.xml
# svcs -xv CSKapache2
# svcs -xv CSKmysql
# svcadm -v enable CSKapache2
# svcadm -v enable mysql
Using CoolStack in a Solaris Zone:
Move the xml manifests to /var/svc/manifest/site. The zone needs to inherit the manifests too. Then inport them again (see above).
# zonecfg -z coolstack
coolstack: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:coolstack> create
zonecfg:coolstack> set zonepath=/export/home/zones/coolstack
zonecfg:coolstack> set autoboot=true
zonecfg:coolstack> add net
zonecfg:coolstack:net> set address=192.168.21.221
zonecfg:coolstack:net> set physical=bge0
zonecfg:coolstack:net> end
zonecfg:coolstack> add inherit-pkg-dir
zonecfg:coolstack:inherit-pkg-dir> set dir=/opt
zonecfg:coolstack:inherit-pkg-dir> end
zonecfg:coolstack> add inherit-pkg-dir
zonecfg:coolstack:inherit-pkg-dir> set dir=/var/svc/manifest/site
zonecfg:coolstack:inherit-pkg-dir> end
zonecfg:coolstack> verify
zonecfg:coolstack> commit
zonecfg:coolstack> export -f /export/home/cmihai/coolstack-zone.cfg
zonecfg:coolstack># zoneadm -z coolstack install
# zoneadm -z coolstack boot
# zlogin -C coolstack
# zlogin coolstack
# svccfg -v import /var/svc/manifest/site/http-CSKapache2.xml
svccfg: Taking "previous" snapshot for svc:/network/http:apache2.
svccfg: Taking "previous" snapshot for svc:/network/http:CSKapache2.
svccfg: Upgrading properties of svc:/network/http according to instance "apache2".
svccfg: svc:/network/http: Upgrading property "tm_man_httpd/manpath".
svccfg: Taking "last-import" snapshot for svc:/network/http:CSKapache2.
svccfg: Refreshed svc:/network/http:CSKapache2.
svccfg: Successful import.
# svccfg -v import /var/svc/manifest/site/mysql.xml
svccfg: Taking "previous" snapshot for svc:/network/mysql:default.
svccfg: Upgrading properties of svc:/network/mysql according to instance "default".
svccfg: Taking "last-import" snapshot for svc:/network/mysql:default.
svccfg: Refreshed svc:/network/mysql:default.
svccfg: Successful import.
Posted by cmihai at 11:29 AM 0 comments
Labels: Solaris