Plan 9 from Bell Labs’s /usr/web/sources/contrib/nemo/octopus/INSTALL

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


*** OCTOPUS INSTALLATION***

0. - INSTALL INFERNO

The recommended version now is the google code version.
Install a subversion client. In debian and MacOSX you need
svn-client so
	apt-get install svn-client
Search for 
	inferno-os google code
in google.
Go to source and get it:
	svn checkout http://inferno-os.googlecode.com/svn/trunk/ /inferno
Now you need the fonts from a regular inferno installation, which is just
copying the /fonts directory.
 
1.-  INSTALLING THE PC ON A SHARED PLAN 9 / INFERNO 
SYSTEM.  

From now on, local machine is isis. 
Note that inferno's root is shared with other users, therefore you have
to bind your personal files before running inferno.

Choose a directory to place your personal configuration files.
My directory is $home/octopus.
Make the directory and copy these ndb files from the shared 
installation and customize them:

	mkdir  $home/octopus/
	cp /usr/inferno/lib/ndb/octopus   $home/octopus/ndb.octopus
	cp /usr/inferno/lib/ndb/local   $home/octopus/ndb.local

Create a new directory called keydb. This directory contains
the files needed to run the authentication server for our octopus.
Create a file named 'keys'. The file will store the users accounts. 
(see chapter 2).

	mkdir $home/octopus/keydb
	mkdir $home/octopus/keys
	mkdir $home/keyring
	cp /dev/null   $home/octopus/keydb/keys
	chmod 600   $home/octopus/keydb/keys

Create a script to bind your files and run Inferno.
This is my script, $home/bin/rc/inferno:

----
#!/bin/rc

bind -b /usr/inferno/Plan9/386/bin /bin	
bind -b /usr/ /usr/inferno/usr/
bind -c $home/octopus/keydb /usr/inferno/keydb
bind -c $home/octopus/keys /usr/inferno/mnt/keys
bind -c $home/octopus/ndb.local /usr/inferno/lib/ndb/local
bind -c $home/octopus/ndb.octopus /usr/inferno/lib/ndb/octopus
emu -g1850x1150 /dis/wm/wm.dis /dis/wm/logon.dis -u $user
----

Run an inferno using the script above, so your configuration files come from
your $home/octopus instead of the shared inferno.

2.-  INSTALLING THE PC

Run Inferno (don't forget to run wm/logon -u username).

2.1- CONFIGURING THE NETWORK

Configure a /lib/ndb/local file following the inferno documentation.
If you are using the script provided above, /lib/ndb/local inside
inferno is actually $home/octopus/ndb.local outside and
/lib/ndb/local/octopus corresponds to $home/octopus/ndb.octopus.


Copy a /lib/ndb/octopus file or copy/paste this text:

	tcp=op	port=16699
	tcp=rop	port=17000
	sys=pc ip=IP_OF_THE_PC #i.e. 212.128.4.125

Where ip is the ip of the machine which is going
to act as your PC.

Include /lib/ndb/octopus in the ndb/local, 
	database=
		....
		file=/lib/ndb/octopus

Change the inferno site info in the file /lib/ndb/local. 
You have to set your PC name in the following attributes: 
SIGNER, FILESERVER, registry and gridsched.
You also have to add an entry to define your PC and 
its ip address.

----
infernosite=
	dnsdomain=YOUR_DNS_DOMAIN 	# lsub.org
	dns=IP_RESOVER			# resolver i.e. 193.147.71.86
	SIGNER=PC_NAME			# isis.lsub.org
	FILESERVER=PC_NAME		# isis.lsub.org
	smtp=SMTP_SRVR_NAME		# aquamar.pantuflo.es
	dom=YOUR_DOMAIN 		# lsub.org
	registry=PC_NAME			# isis.lsub.org
	gridsched=PC_NAME		# isis.lsub.org

sys=pc ip=IP_OF_THE_PC # 212.128.4.125
----

2.2- CONFIGURING AN AUTH AND FILE SERVER

Create a signer key file in $home/octopus/keydb.
This file is used to generate certificates for clients. 
The command createsignerkey creates this file. Its
first argument is the name of the Certification Authority (CA).
In this case, the name of the PC.
	
	cd /keydb
	auth/createsignerkey PC_NAME	# isis.lsub.org

We need to store the keydb password in a file to not type it everytime 
we boot the PC. Note that this password is used to encrypt/decrypt 
the keys file, not to be authenticated in the server. It's similar to the
auth server's password in a Plan 9's CPU/auth server. 

	cd /keydb
	echo 'mysuperpasswd' > nvr
	chmod 600 nvr

Run the auth server:
	ndb/cs
	svc/auth -n /keydb/nvr

You have to create an account for your user.
	
	auth/changelogin USERNAME	#paurea

This command asks you to set a password. This password will be used to 
authenticate your user in the auth server. Do not confuse this
password with the auth-server's password set above. 

Make sure the account has been created:

	ls /mnt/keys/username

You should see some files there, such as secrect, status etc.

Next, get the certificate for the PC. The PC is the CA (certification 
authority), but it is also the file server. Hence, it needs a 
certificate to exectute the inferno's auth protocol. This protocol
is based on Diffie-Hellman (for more info read the "Inferno Security" 
paper by D. Presotto, (pdf at ieee explore).
	
	getauthinfo default

Now run this command so that the PC can serve files.

	svc/net


2.3- OPTIONAL: TEST THE AUTH/FILE SERVER

Try to mount this Inferno FROM OTHER INFERNO
In the client, get a certificate

	getauthinfo default
	
	>use signer: PC_NAME	#isis.lsub.org
	>remote username: USERNAME	#paurea
	>password: ....	
	>save in file: yes

and mount the PC
	ndb/cs
	mount PC_NAME /n/remote

If you can get the ticket and mount the Inferno, the auth server
is OK. If not, check out the ndb database (configure it as in 
previous stages).

2.4- SETUP OCTOPUS IN THE PC (AUTH/FILE SERVER)
*ignore this at lsub or if /dis/o contains the binaries already*

Copy the octopus binaries in the local inferno fs.
You can get them from  whale.lsub.org.
Lets assume you have whale.lsub.org  mounted on /n/whale:


	cd /n/whale/dis
	puttar o > /tmp/o.tar
	cd /dis
	gettar -v < /tmp/o.tar


Re-start Inferno. 

Start the PC:

	o/pcrc


3.- INSTALLING A NEW TERMINAL.


Install inferno and configure the network:
Copy /lib/nbd/local from your PC to /lib/ndb/local. 
Copy  /lib/ndb/octopus  too. 

Run 
	wm/logon -u USERNAME

for example use this script to run inferno on Mac Os X:


-----
#!/bin/sh
#do not forget to update the PATH to use the Inferno binaries.

inferno -g 1280x750 wm/wm wm/logon -u $USER
-----

Create a $home in the inferno. 

	mkdir /usr/USERNAME
	mkdir /usr/esoriano/lib
	mkdir /usr/esoriano/tmp
	mkdir /usr/esoriano/keyring
	chmod 700 /usr/esoriano/keyring

Start the connection server:

	ndb/cs

Get a ticket to be authenticated on the PC:

	getauthinfo default

	>use signer: PC_NAME
	>remote username: USERNAME
	>password: ....	
	>save in file: yes

You have your ticket stored in /usr/USERNAME/keyring/default

Mount the PC:

	mount PC_NAME /n/remote

Copy the octopus port binaries to the local inferno:

	cd /n/remote/dis
	puttar o > /tmp/o.tar
	cd /dis
	gettar -v < /tmp/o.tar
 
You need to create some directories: one to mount the pc, one to 
mount devices, and one to store the cache:

	mkdir /n/pc 
	mkdir /n/pc/devs
	mkdir /tmp/cache

and the mount points for the terminal's devs:
 
	mkdir  /term
	mkdir  /term/print
	mkdir  /term/view
	mkdir  /term/voice
	mkdir  /term/what
	mkdir  /term/who
	mkdir  /term/fs
	mkdir /devs

Edit the terminal's script and change the default PC name to your own.

	sed 's/alboran.lsub.org/PC_NAME/g'  \
		<  /n/remote/dis/o/termrc > /dis/o/termrc

 
Re-start Inferno.

Run the terminal's script:

	o/termrc


Now,  you (should) have an octopus terminal ready to be used.

Enjoy.




Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.