You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

388 lines
15 KiB

<style type="text/css">
@import url('');
.quote { font-size: x-small; font-family: sans-serif;}
<h1>Plan 9 on SDF VPS</h1>
<!-- Glenda The BUNNY! right-aligned. Use is permitted. -->
<div style="float:right;margin-right:1em;">
<img src=""/>
<p>Some parts of this tutorial are copy&amp;paste from Plan 9 wiki because they
fit the flow of the writing as they are, so no claim from SDF's users is made
over the authorship of such parts, which are clearly labeled as taken from Plan
9's wiki.</p>
<li><a href="#install">Install</a></li>
<li><a href="#basics">Basics</a></li>
<li><a href="#know">Things To Know When You Get to Plan 9's shell</a></li>
<li><a href="#networking">Networking</a></li>
<li><a href="#drawterm">Drawterm on Plan 9</a></li>
<li><a href="#applications">A Few Applications</a></li>
<li><a href="#adduser">Adding a User</a></li>
<li><a href="#timezone">Configure Timezone</a></li>
<!--<li><a href="#ssh">Setting up SSH</a></li>
<li><a href="#pkg-mgt">Package Management</a></li>-->
<li><a href="#links">Links (tutorials, videos, etc.)</a></li>
<h2 id="help">Get involved</h2>
<p>Plan 9 has active comunities which mostly interact by email. You are
encouraged to join the <a href="">9fans
mailing list</a> where discussion about Plan 9 and related technologies
<p>SDF also host a mailling list mainly for sdfers running Plan 9 in one SDF's
VPS slice.</p>
<h2 id="bootcamp">SDF Plan9 Boot Camp</h2>
<p>SDF periodically runs a Plan9 Boot Camp which is open to anyone with an SDF user account. This Plan9 Boot Camps are announced on the bboard and are typically a Summer or Fall annual occurence and run for about 3 months.</p>
<p>Activities of the SDF Plan9 Boot Camp include:</p>
<li>Installation or pre-generated Plan9 instance under Xen
<li>Self Guided Discoveries in: ed, network configuration
<li>Self Guided Discoveries in: drawterm (from your computer), rio and stats
<li>Self Guided Discoveries in: acme, sam, abaco, mothra and man
<li>Self Guided Discoveries in: mapdemo, catclock, juggle and tetris
<li>Self Guided Discoveries in: 9front and contrib via ftpfs
<li>Self Guided Discoveries in: 9fans mailing list and faces
<p>During the SDF Plan9 Boot Camp you are encouraged to make screenshots and vidoes of your Self Guided Discoveries and share your experiences on plan9-l to inspire others to do the same.</p>
<h2 id="install">Install</h2>
<p>After you have been allocated a VPS slice, connect by <code>ssh <i>&lt;SDF member ID&gt;</i>@<i>&lt;VPS slice&gt;</i></code> (for example, <code>ssh</code>; you may omit your SDF member ID and the "@" if you are connecting from your SDF shell account). Your password is the same as your SDF member log-in.</p>
<p>At the VPS console and type <code>x</code>.</p>
<p>If asked install from the ISO type <code>no</code>. At some point there
was an option to install from Plan9 iso image; at the time of updating the
tutorial it does not ask for that option anymore.</p>
Do you wish to continue? (yes/no) yes
Would you like to install Plan9 yourself from the ISO? (yes/no)
% Copying a fresh plan9 image [PLEASE WAIT]
<p>After the install ends type <code>z</code> and then <code>r</code> to
restart the instance.</p>
<h2 id="basics">Basics</h2>
<p>The Plan9 SDF VPS is the only VPS which is provided freely to SDF MetaARPA members. This slice includes cluster access to the SDF Plan9 Community 9p server as well as limited access to the Bell Labs server. It is highly recommend that you get involved in the <a href="">9fans mailing list</a> and request commit access. With your help, Plan9 at SDF can continue to grow. To request your free Plan 9 VPS, type '<i>plan9</i>' at the shell.
<p>When your Plan 9 system boots, it will ask you where root is from (via the network, or a local disk). Just hit <code>[ENTER]</code> to select local (the default):</p>
<pre><samp>root is from (tcp, local)[local!#S/sd00/fossil]:</samp></pre>
<p>Next, you will be prompted to log in. Log in as the default user, <code>glenda</code>:</p>
user[none]: glenda
init: starting /bin/rc
#m/mousectl: rc: can't open: unknown device in # filename
init: rc exit status: rc 24: error
init: starting /bin/rc
<p>You will now be sitting at an <code>rc</code> prompt, Plan 9's shell.</p>
<h2 id="know">Things To Know When You Get to Plan 9's shell</h2>
<li> <b>ctl-h</b> is backspace, kind of. <b>ctl-u</b> erases the
current line. As with backspace, screen output may not be what you
<li>To exit Plan 9 and be able to return <b>without</b> rebooting your server, Press <b>ctl-]</b> to close the
console, then press 'q' to disconnect. You can return again by <b>ssh</b>ing to your allocated VPS server again
(see <a href="#install">above</a>) and getting back to the VPS console, and pressing 'c' to connect.
<li>The only line editor installed by default in the Plan 9 Image. is <b><i>ed</i></b>. For initially setting
your DNS below or other tasks before you get DrawTerm running, <a href=
"" >read this tutorial</a> for this excrutiating experience (but
then you can install DrawTerm).
<h2 id="networking">Networking</h2>
<h3>Configuring Your IP Address</h3>
<p>In your control panel at <code></code>, note YOUR_IP
(e.g. 205.166.94.x) on the top line.</p>
<p>Start your server, and log in via the console. (default=glenda)</p>
<p>At the <code>rc</code> prompt (%), enter:</p>
<pre><code>ip/ipconfig -g ether /net/ether0 YOUR_IP</code></pre>
<p>This configuration lasts until you reboot Plan 9. To make this permanent it is recommended to add this line to your /rc/bin/termrc.local file.
<p>To exit Plan 9 and be able to return <b>without</b> rebooting your server, see <a href="#know">above</a>.</p>
<h3>DNS Resolution</h3>
<p>You can get DNS resolution by editing <code>/lib/ndb/local</code>
and changing:</p>
<pre><code>ip= sys=localhost dom=localhost</code></pre>
<p><pre><code>ip=YOUR_IP sys=plan9 dom=plan9 dns=</code></pre></p>
<p>Once you've done that, from <code>rc</code> type</p>
ndb/dns -r</code></pre>
<p>This configuration lasts until you reboot Plan 9. To make this permanent it is recommended to add those two lines to your /rc/bin/termrc.local file.</p>
<p>To exit Plan 9 and be able to return <b>without</b> rebooting your server, see <a href="#know">above</a>.</p>
<h2 id="drawterm">Drawterm</h2>
<p>Drawterm is essentially a BLIT terminal emulator which allows you to
connect to your Plan9 system and load the <i>rio</i> windowing system.
Rio is a direct successor of UNIX 'layers' and Plan 9 '8&#189;'.</p>
<p>At the <code>rc</code> prompt (%) in your Plan 9 VPS, enter these
two lines.</p>
<pre><code>echo 'key proto=p9sk1 dom=plan9 user=glenda !password=PASSWORD' >/mnt/factotum/ctl
aux/listen1 -t tcp!*!ncpu /bin/cpu -R &
<p>Replace PASSWORD with the password you want. This password lasts until
you reboot Plan 9. </p>
<p>To exit Plan 9 and be able to return <b>without</b> rebooting your server, see <a href="#know">above</a>.</p>
<h3>Getting Started with Drawterm</h3>
<img src=""/><br/>
<p>Follow the <a href="">instructions</a>
to download and build Drawterm for your operating system. YOUR_IP must match
the IP address described in <a href="#networking">Networking</a>.<br/></p>
<pre><code>./drawterm -a YOUR_IP -c YOUR_IP -u glenda</code></pre>
<p>After typing your password, press the right button of your mouse.
A menu should appear. Then, release the button over the <code>New</code>
Now, press the right button again near the upper-left corner of drawterm, and
drag the mouse to the lower right before releasing the button, drawing
a rectangle.<br/>
You should now have a terminal window. The first
thing you should probably do is to type <code>cat</code> (or read
it from <a href="">here</a>)</p>
<h2 id="applications">Plan 9 Applications</h2>
<h3>Browsing the Web</h3>
<p>You can use <a href="" rel="external">Abaco</a> to
browse the web. (Abaco is available in a default Plan 9 system.)</p>
<p>You'll need to have your IP configured and DNS working in order to browse
the web. After that, you'll have to run <code>webfs</code> and
<strong>then</strong> <code>abaco</code>. (You may want to add
<code>webfs</code> in your <code>$home/lib/profile</code> just before
plumber and rio; also, if you don't have a <code>$home/lib/webcookies</code>
file, touch it.)</p>
<p><img src="" width="600px" /></p>
<p>When abaco starts, you can go to a webpage by clicking <code>"New"</code>
with the middle button of the mouse, typing the address in the row below the
one with <code>"Del Snarf Get &hellip;"</code> (see the previous figure:
it's the one where the current address is), and pressing "Enter" on your
keyboard. You can follow links by clicking on them, as is usual, with the
left button (the shape of the cursor won't change, though).</p>
<h2 id="adduser">Adding a User</h2>
<p>You may wish to add a user to your system once you get the hang of things.
There is really no need to create a new user when you are first starting out.
To create a new user, you will have to connect to the file server console by
<pre><code>con -l /srv/fscons</code></pre>
<p>Now, at the file server prompt, create a new user. Replace USER with what
you want your new user to be named:</p>
<pre><code>uname USER USER</code></pre>
<p>You will need to add that user to the <code>sys</code> group if you want
it to be able to change system configuration files. Again, change USER to
what your new user name is:</p>
<pre><code>uname sys +USER</code></pre>
<p>Exit the file server console by typing: <code>ctrl+\</code>. You will now
be at a <code>&gt;&gt;&gt;</code> prompt; type <code>q</code> to quit.</p>
<h2 id="timezone">Configure Time zone</h2>
<p class="quote"><b>Taken from <a
9 Wiki Installation Instructions</a></b></p>
<p>You might want to configure your system's timezone. Figure out in which
timezone you are, and then, assuming e.g. you are in the CET zone log in as
user adm, then:</p>
<pre><code>cp /adm/timezone/CET /adm/timezone/local</code></pre>
<p>Last, but not the least, you may also want to edit/change the
<code>TIMESYNCARGS</code> in your <code>/rc/bin/termrc</code> or
<code>/rc/bin/cpurc</code>; for example, to use an NTP service, set it to:</p>
and reboot.
<h2 id="working">Working in Plan 9</h2>
<p style="font-size:x-small;">TODO check if title works</p>
<p>Now that you are connected to your Plan 9 console with your new user you
should run:</p>
<p>And setup a password for the user in factotum so you can login from
<p class="quote"><b>Taken from <a
9 Wiki Installation Instructions</a></b></p>
<p>When you drawterm to a Plan 9 cpu server, your local files will be available
at /mnt/term. This means you can freely copy files between Plan 9 and your
other os without the use of any additional protocols. In other words, when
working with drawterm, your environment is actually a composite of your local
os and the Plan 9 system - technically it is a three node grid, because the
Drawterm program acts as an ultra-minimal independent Plan 9 terminal system,
connecting your host os to the Plan 9 cpu server.</p>
<h2 id="commands">Useful Plan9 Commands</h2>
<p>While there are many similarities between UNIX and Plan9, there are specific
commands which may be unfamiliar to UNIX users. However, some of these commands
have their roots in early UNIX systems as well as BTL Research UNIX.
<li><i><b>fshalt -h</b></i> - This will gracefully shutdown Plan 9</li>
<li><i><b>ed</b></i> - This archaic line editor is the only one installed by default in the Plan 9 Image. For
initially setting your DNS above or other tasks before you get DrawTerm running, <a href=
"" >read this tutorial</a> for this excrutiating experience (but
then you can install DrawTerm).</li>
<h2 id="links">Links</h2>
<li><a href="">Plan 9 on SDF VPS</a>
<li><a href="">Building Drawterm on NetBSD-5.x/i386</a>
<li><a href="" rel="external">A
Plan 9 Newbie's Guide [PDF]</a>
<li><a href="" rel="external">Plan
9 basics</a>
<li><a href=""
rel="external">RIT Plan 9 introduction</a>
<li><a href=""
rel="external">Plan9 commands for UNIX users</a>
<li><a href=""
rel="external">Manual pages</a>
rel="external">Rc -- A Shell for Plan 9 and UNIX Systems [PDF]</a>
<li><a href=""
rel="external">Narrated Plan 9</a>
<li><a href=""
rel="external">Plan9 Acme Intro - Part 1</a>
<li><a href=""
rel="external">Plan9 Acme Intro - Part 2</a>
<li><a href=""
rel="external">Plan9 Acme Intro - Part 3</a>
<li><a href=""
rel="external">Acme Mail Demo</a>
<li><a href=""
rel="external">Acme Editor Demo</a>
<li><a href=""
rel="external">Introduction to Operating Systems Abstractions Using
Plan 9 from Bell Labs [PDF]</a>
$Id: VPS_Plan9.html,v 1.41 2020/06/16 00:17:20 smj Exp $