Install an iSNS server on OpenIndiana

In order to test target-isns, an iSNS client that I am developing, I looked for an iSNS server running on Linux. Unfortunately, the two iSNS server implementations for Linux that I found (linuxisns and open-isns) are not maintained anymore.

It seems that people managing iSNS servers these days are using Windows or Solaris. That's why I decided to install OpenIndiana, an operating system derived from OpenSolaris, to try Solaris' iSNS server.

Install OpenIndiana

OpenIndiana is a distribution of Illumos, the open source fork of Sun's OpenSolaris. Installing the server version of OpenIndiana is quick and easy: the installation completes in less than fifteen minutes. Then it is time to execute a first command:

$ uname -a
SunOS openindiana 5.11 oi_151a8 i86pc i386 i86pc Solaris

As you can see, this is not Linux ☺. When I was a student ten years ago, I used to work on an Ultra 5 workstation and at the time I felt frustrated by Solaris' command line utilities which were less convenient than the GNU utilities. Fortunately, OpenIndiana enables the Bash interpreter and the GNU utilities by default.

$ echo $SHELL
/bin/bash
$ echo $PATH
/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin

Moreover, OpenIndiana allows remote login with SSH and the user specified during installation is a sudoer.

Install the iSNS server

That's where things start to differ from Linux: packages are managed by the pkg command, not apt or yum. To search for a package, you can use the pkg search command:

$ pkg search isns
INDEX       ACTION VALUE                                PACKAGE
pkg.summary set    Solaris iSNS Server                  pkg:/service/storage/isns@0.5.11-0.151.1.8
basename    file   usr/sbin/isns                        pkg:/service/storage/isns@0.5.11-0.151.1.8
pkg.fmri    set    openindiana.org/service/storage/isns pkg:/service/storage/isns@0.5.11-0.151.1.8

Then, the pkg install command is executed to install the iSNS package.

$ sudo pkg install isns
           Packages to install:  1
       Create boot environment: No
Create backup boot environment: No
            Services to change:  1

Enable the iSNS service

After installing the iSNS server, you will see that it is not running. This is because the iSNS service must be enabled.

The services of OpenIndiana are managed with the svc family of commands. For instance, svcs displays the list of services that are running.

$ svcs
STATE          STIME    FMRI
legacy_run     18:09:16 lrc:/etc/rc2_d/S20sysetup
legacy_run     18:09:16 lrc:/etc/rc2_d/S47pppd
[...]
online         18:10:13 svc:/system/console-login:default
online         18:39:07 svc:/system/manifest-import:default

If you want to display all services, including the services that are not running, you have to pass the -a option to svcs:

$ svcs -a | grep isns
disabled       18:39:05 svc:/network/isns_server:default

As you can see, the iSNS service is not running. Let's enable it with the svcadm command:

$ sudo svcadm enable svc:/network/isns_server
$ svcs svc:/network/isns_server
STATE          STIME    FMRI
online         18:59:37 svc:/network/isns_server:default

That's it! Our iSNS server is now up and running:

$ ps aux | grep isns
root      2127  0.0  0.2 4712 2352 ?        S 18:59:37  0:00 /usr/sbin/isns