Archive for the ‘Solaris’ Category

Can’t install a pkg anymore on Solaris 11

Saturday, August 18th, 2012

If you get this:

root@reno:~# pkg install header-math
pkg: 0/1 catalogs successfully updated:

Unable to contact valid package repository
Encountered the following error(s):
Unable to contact any configured publishers.
This is likely a network configuration problem.
Framework error: code: 7 reason: Failed to connect to 137.254.56.21: Network is unreachable
URL: ‘http://pkg.oracle.com/solaris/release’. (happened 4 times)

Then go to Building a Solaris 11 repository without network connection which will remind you what to do!

[Solaris 11 Express] math.h: No such file or directory

Tuesday, June 28th, 2011

[Solaris 11 Express] math.h: No such file or directory

Installing git on Solaris Express 11

Tuesday, June 28th, 2011

root@gargoyle:~# pkg info -r git
Name: developer/versioning/git
Summary: git – Fast Version Control System
Description: GIT – Fast Version Control System (v1.5.6.5)
Category: Development/Source Code Management
State: Not installed
Publisher: solaris
Version: 1.5.6.5
Build Release: 5.11
Branch: 0.151.0.1
Packaging Date: Fri Nov 05 05:38:48 2010
Size: 36.29 MB
FMRI: pkg://solaris/developer/versioning/git@1.5.6.5,5.11-0.151.0.1:20101105T053848Z
root@gargoyle:~# pkg install developer/versioning/git
Packages to install: 1
Create boot environment: No
DOWNLOAD PKGS FILES XFER (MB)
Completed 1/1 257/257 10.7/10.7

PHASE ACTIONS
Install Phase 384/384

PHASE ITEMS
Package State Update Phase 1/1
Image State Update Phase 2/2

Installation of Studio Compiler in Solaris 11 Express

Tuesday, June 28th, 2011

Very nice instructions: Installation of Studio Compiler in Solaris 11 Express

Allowing root ssh logins to Solaris machines

Saturday, January 22nd, 2011

I’ve been away from Solaris for 5 months, but I need some VMs for NFSv4 testing, which means beating my head against modernization such as RBAC, pfexec, and NWAM.

I prefer to treat my lab Unix machines as inter-changable boxes and do all of my configuration up front. I want to be able to do an SSH root login, especially if the system goes out of the way to make that hard.

There are currently 3 things you have to do to violate this security truism on either OpenSolaris or Solaris 11:

1) Modify PermitRootLogin to yes in /etc/ssh/sshd_config.

2) Comment out the “CONSOLE=/dev/console” line in /etc/default/login.

3) Remove “;type=role” from the root entry in /etc/user_attr.

Really nasty Solaris 11 install

Saturday, January 22nd, 2011

I just installed two VMs with the Solaris 11 express (snv_151a) and when I turned off nwam, one worked and the second did not:

svcadm disable svc:/network/physical:nwam
svcadm enable svc:/network/physical:default

The network would come up, both ifconfig and netstat -rn showed reasonable values, but the machine would only ping iff nwam were turned on.

It turned out to be ipfiltering:


root@snarf:~# ping 172.16.1.2
ping: sendto Network is unreachable
root@snarf:~# ipfstat -io
block out log all
pass out quick on lo0 all
pass out quick proto udp from any to any port = bootps
block in log all
pass in quick on lo0 all
pass in quick proto udp from any to any port = bootpc
root@snarf:~# svcadm disable svc:/network/ipfilter
root@snarf:~# ping 172.16.1.2
172.16.1.2 is alive
root@snarf:~# ipfstat -io
empty list for ipfilter(out)
empty list for ipfilter(in)

It was not enabled on the first machine, but was on the second. I have no clue what I did differently in the first install.

Creating a small zpool for testing

Wednesday, November 3rd, 2010
tdh@ultralord:/$ sudo su -
Sun Microsystems Inc.   SunOS 5.11      snv_133 February 2010
You have new mail.
root@ultralord:~# cd /
root@ultralord:/# mkdir ztmp
root@ultralord:/# cd ztmp
root@ultralord:/ztmp# mkfile 100m vdev1
root@ultralord:/ztmp# mkfile 100m vdev2
root@ultralord:/ztmp# zpool create zoo /ztmp/vdev1 /ztmp/vdev2
root@ultralord:/ztmp# zfs list
NAME                     USED  AVAIL  REFER  MOUNTPOINT
rpool                   4.84G  10.8G  77.5K  /rpool
rpool/ROOT              3.72G  10.8G    21K  legacy
rpool/ROOT/opensolaris  3.72G  10.8G  3.60G  /
rpool/dump               511M  10.8G   511M  -
rpool/export            89.9M  10.8G    23K  /export
rpool/export/home       89.8M  10.8G    23K  /export/home
rpool/export/home/tdh   89.8M  10.8G  89.8M  /export/home/tdh
rpool/swap               544M  11.2G   144M  -
zoo                     73.5K   159M    21K  /zoo
You have mail in /var/mail/root
root@ultralord:/ztmp# zfs set sharenfs=rw=10.10.10.20 zoo
root@ultralord:/ztmp# zfs create -o sharenfs=rw=10.10.10.20 zoo/fs1
root@ultralord:/ztmp# zfs create -o sharenfs=rw=10.10.10.200 zoo/fs2
root@ultralord:/ztmp# share
-@zoo           /zoo   sec=sys,rw=10.10.10.20   ""
-@zoo/fs1       /zoo/fs1   sec=sys,rw=10.10.10.20   ""
-@zoo/fs2       /zoo/fs2   sec=sys,rw=10.10.10.200   ""
root@ultralord:/ztmp# touch /zoo/file
root@ultralord:/ztmp# ls -la /zoo
total 7
drwxr-xr-x  4 root root  5 2010-11-03 16:51 .
drwxr-xr-x 29 root root 31 2010-11-03 16:50 ..
-rw-r--r--  1 root root  0 2010-11-03 16:51 file
drwxr-xr-x  2 root root  2 2010-11-03 16:51 fs1
drwxr-xr-x  2 root root  2 2010-11-03 16:51 fs2
root@ultralord:/ztmp#