pifty
/
tutes-dump
Archived
1
1
Fork 1
This repository has been archived on 2020-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
tutes-dump/site-tutorials/VPS_Plan9.html

388 lines
15 KiB
HTML

<style type="text/css">
@import url('http://sdf.org/tutorials/tutorials.css');
.quote { font-size: x-small; font-family: sans-serif;}
</style>
<h1>Plan 9 on SDF VPS</h1>
<!-- Glenda The BUNNY! right-aligned. Use is permitted. -->
<div style="float:right;margin-right:1em;">
<img src="http://sdf.org/tutorials/images/plan9logo.jpg"/>
</div>
<h3>Note!</h3>
<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>
<h2>Contents</h2>
<ul>
<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>
</ul>
<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="http://mail.9fans.net/listinfo/9fans">9fans
mailing list</a> where discussion about Plan 9 and related technologies
happen.</p>
<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>.sdf.org</code> (for example, <code>ssh papa@vps2.sdf.org</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>
<pre><samp>
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]
[COMPLETE]
(continue)</samp></pre>
<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="http://mail.9fans.net/listinfo/9fans">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>
<pre><samp>
user[none]: glenda
time...
fossil(#S/sd00/fossil)...version...time...
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
%</samp></pre>
<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>
<ul>
<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
expect.
<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=
"https://www.howtoforge.com/linux-ed-command/" >read this tutorial</a> for this excrutiating experience (but
then you can install DrawTerm).
</ul>
<h2 id="networking">Networking</h2>
<h3>Configuring Your IP Address</h3>
<p>In your control panel at <code>vps3.sdf.org</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 205.166.94.1 ether /net/ether0 YOUR_IP 255.255.255.0</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=127.0.0.1 sys=localhost dom=localhost</code></pre>
<p>to</p>
<p><pre><code>ip=YOUR_IP sys=plan9 dom=plan9 dns=205.166.94.20</code></pre></p>
<p>Once you've done that, from <code>rc</code> type</p>
<pre><code>ndb/cs
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 &
</code></pre>
<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="http://sdf.org/tutorials/images/drawterm.png"/><br/>
<p>Follow the <a href="https://web.archive.org/web/20120121090252/http://jgw.tx0.org/howto/building_drawterm.html">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>
option.<br/>
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 readme.rio</code> (or read
it from <a href="http://sdf.org/tutorials/misc/readme.rio">here</a>)</p>
<h2 id="applications">Plan 9 Applications</h2>
<h3>Browsing the Web</h3>
<p>You can use <a href="http://lab-fgb.com/abaco/" 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="http://sdf.org/tutorials/images/abaco.png" 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
typing:</p>
<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
href="http://plan9.bell-labs.com/wiki/plan9/Installation_instructions/index.html">Plan
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>
<pre><code>TIMESYNCARGS=(-n 0-north-america.pool.ntp.org)</code></pre>
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>
<pre><code>/sys/lib/newuser</code></pre>
<p>And setup a password for the user in factotum so you can login from
Drawterm.</p>
<p class="quote"><b>Taken from <a
href="http://plan9.bell-labs.com/wiki/plan9/Installation_instructions/index.html">Plan
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.
<ul>
<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=
"https://www.howtoforge.com/linux-ed-command/" >read this tutorial</a> for this excrutiating experience (but
then you can install DrawTerm).</li>
</ul>
<h2 id="links">Links</h2>
<h3>Tutorials</h3>
<ul>
<li><a href="http://sdf.org/?tutorials/VPS_Plan9">Plan 9 on SDF VPS</a>
</li>
<li><a href="https://web.archive.org/web/20120121090252/http://jgw.tx0.org/howto/building_drawterm.html">Building Drawterm on NetBSD-5.x/i386</a>
</li>
<li><a href="http://www.quanstro.net/newbie-guide.pdf" rel="external">A
Plan 9 Newbie's Guide [PDF]</a>
</li>
<li><a href="https://web.archive.org/web/20170105023205/http://www.9gridchan.org/plan_9_basics" rel="external">Plan
9 basics</a>
</li>
<li><a href="http://doc.cat-v.org/plan_9/misc/rit-intro"
rel="external">RIT Plan 9 introduction</a>
</li>
<li><a href="https://web.archive.org/web/20170601065710/http://plan9.bell-labs.com/wiki/plan9/UNIX_to_Plan_9_command_translation/index.html"
rel="external">Plan9 commands for UNIX users</a>
</li>
</ul>
<h3>Utilities</h3>
<ul>
<li><a href="https://web.archive.org/web/20080616071532/http://cm.bell-labs.com/sys/man/"
rel="external">Manual pages</a>
</li>
<li><a
href="http://citeseer.ist.psu.edu/viewdoc/download?doi=10.1.1.41.3287&rep=rep1&type=pdf"
rel="external">Rc -- A Shell for Plan 9 and UNIX Systems [PDF]</a>
</li>
</ul>
<h3>Videos</h3>
<ul>
<li><a href="http://www.youtube.com/watch?v=SoGLU1l7LwY"
rel="external">Narrated Plan 9</a>
</li>
<li><a href="http://www.youtube.com/watch?v=dopu3ZtdCsg"
rel="external">Plan9 Acme Intro - Part 1</a>
</li>
<li><a href="http://www.youtube.com/watch?v=2vjD_B__SbQ"
rel="external">Plan9 Acme Intro - Part 2</a>
</li>
<li><a href="http://www.youtube.com/watch?v=cR96WQ6OR00"
rel="external">Plan9 Acme Intro - Part 3</a>
</li>
<li><a href="http://www.youtube.com/watch?v=byoznMe8ab4"
rel="external">Acme Mail Demo</a>
</li>
<li><a href="http://www.youtube.com/watch?v=Pydckb9ZU8Y"
rel="external">Acme Editor Demo</a>
</li>
</ul>
<h3>Books</h3>
<ul>
<li><a href="http://lsub.org/who/nemo/9.intro.pdf"
rel="external">Introduction to Operating Systems Abstractions Using
Plan 9 from Bell Labs [PDF]</a>
</li>
</ul>
<hr/>
$Id: VPS_Plan9.html,v 1.41 2020/06/16 00:17:20 smj Exp $