⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user_guide.html

📁 TTYLINUX迷你代码 TTYLINUX迷你代码
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</ul><p>The above is for dialup using a modem. If you want to use ISDN dialup,you need to know the following:<p><ul><li>the phone number of your ISP, i.e. <tt>1-800-12345678</tt></li><li>your user name at the ISP, i.e. <tt>joeuser</tt></li><li>your password at the ISP, i.e. <tt>joepass</tt></li><li>the phone number you want to use for dialing out</li><li>whether you want to use automatic or manual dialing</li></ul><p>Edit the file <tt>mnt/etc/isp.conf</tt> and change the settings there toyour liking. Note that ttylinux only knows about providers thatlaunch a PPP session immediately after dialup (which should be truefor almost all providers these days), so if some specialprocedure is needed to log you in, your Internet connection will notwork with ttylinux. The ttylinux approach will work with almost allproviders in Germany, but I don't know about other countries.<p>For ttylinux to use ISDN, you need to have <tt>USE_ISDN=yes</tt>in <tt>/etc/isp.conf</tt>, the default is not to use ISDN. Obviously, youalso need a kernel with ISDN support and hardware support for your ISDNhardware. If you need kernel modules to run your ISDN hardware, youwill also need to add those and a suitable <tt>/etc/modules.conf</tt> to the ttylinux filesystem.<p>Once you are finished making changes, unmount the filesystem and  run<tt>gzip</tt> to compress it again:<p><pre>  umount mnt  gzip -9 rootfs</pre><p>You are now ready for the real installation.<p>Note that this section has only covered the minimum customizationneeded to run ttylinux. There is more to tune, have a look at thesystem guide (section <a href="#sysguide">3</a>) below for information. If you aimat the approach of running ttylinux from ramdisk, you mustconfigure everything for your needs before you continue the installation,so it may be a wise idea to read the system guide section before youcountinue. If you install to a hard disk, you can always configurethings later.<p><h2><a name="SECTION00036000000000000000"><span class="arabic">2</span>.<span class="arabic">6</span> Installation by hand</a></h2><p>I am assuming that you use <tt>LILO</tt> (short for Linux Loader) as yourboot loader. You can also use others like <tt>loadlin</tt>, but you willobviously need some <tt>LILO</tt> experience to convert the <tt>LILO</tt>example given here to some other boot manager. I am also assumingthat you want to add ttylinux to an existing LILO setup that isalready used to boot other (Linux) systems on your machine.<p>If you want to use the <tt>syslinux</tt> boot loader to load ttylinuxfrom a <tt>FAT</tt> filesystem, please see the appendix on creating abootable CD-ROM (appendix <a href="#makecdrom">A</a>) for an example.<p>Put the <tt>rootfs.gz</tt> image and the Linux kernel you want to use to runttylinux into the directory that holds your other boot files, mostlikely this will be <tt>/boot</tt>. Let us assume your kernel image file iscalled <tt>bzImage-ttylinux</tt>. You now need to add the following sectionto <tt>/etc/lilo.conf</tt>:<p><pre>  image=/boot/bzImage-ttylinux      label=ttylinux      initrd=/boot/rootfs.gz      root=/dev/ram0      read-only</pre><p>Now rerun the <tt>LILO</tt> installer by typing <tt>/sbin/lilo</tt>.On your next boot, you can enter <tt>ttylinux</tt> on the <tt>LILO</tt> bootprompt to boot ttylinux. That is all, you are now ready to try ttylinux.<p>If you want to install onto hard disk, you need to have a partitionof at least 4 megabytes size available. Assuming this partition is<tt>/dev/hda8</tt>, do the following, using the file <tt>ttylinux-hd.tar.gz</tt>obtained above (in section <a href="#customize">2.5</a>):<p><pre>    mke2fs /dev/hda8  mount -t ext2 /dev/hda8 mnt  cd mnt  tar xvzf ../ttylinux-hd.tar.gz  cd ..</pre><p>Now do the customization as outlined above. You will also need tochange the root device configured in <tt>mnt/etc/fstab</tt>. Once you aredone, you just need to unmount the partition:<p><pre>       umount mnt</pre><p>Now you can setup <tt>LILO</tt> as explained above, only change the line forthe root filesystem to <tt>root=/dev/hda8</tt> and remove the <tt>initrd</tt>line. Ready to go.<p><h1><a name="SECTION00040000000000000000"></a><a name="sysguide"></a><br><span class="arabic">3</span> System guide</h1><p>This section gives a short overview over the system, its configuration,and some of the installed programs.<p><h2><a name="SECTION00041000000000000000"><span class="arabic">3</span>.<span class="arabic">1</span> Basic Features</a></h2><p>On bootup, ttylinux provides 6 text consoles for login. The defaultsetup has two user accounts: <tt>root</tt> (the administrator account)with password <tt>root</tt> and <tt>guest</tt> with password <tt>guest</tt>.<p>The <tt>syslogd</tt> and <tt>klog</tt> daemons are running and log kerneland system messages to the file <tt>/var/log/messages</tt>.<p>If you need a text editor, <tt>e3</tt> is installed. Simply invoke it bytyping <tt>e3</tt> <tt>/path/to/filename</tt>. A help screen is available bypressing <tt>Alt-H</tt>. <tt>e3</tt> understands a lot of the old WordStarcommands, so it feels a bit like WordStar, an old Borland IDE, or thecommon Linux editor <tt>joe</tt>. For those accustomed to differenteditors, <tt>e3vi</tt> will startup <tt>e3</tt> in <tt>vi</tt> emulationmode (<tt>e3em</tt> for <tt>emacs</tt> emulation mode, <tt>e3pi</tt> for<tt>pico</tt> emulation mode).<p>For manipulation of users, groups and passwords, the tools <tt>passwd</tt>,<tt>adduser</tt>, <tt>addgroup</tt>, <tt>deluser</tt>, and <tt>delgroup</tt> arepresent.<p>If you have not changed the timezone and keyboard settings as outlinedin the customization section (<a href="#customize">2.5</a>, above), ttylinux will useits default settings. The default timezone is UTC, the default keyboardmapping is for a US keyboard.<p>The <tt>inetd</tt> super-server and the <tt>dropbear</tt> SSH server arerunning by default. A telnet server will be forked by <tt>inetd</tt> whena telnet connection comes in.<p>ttylinux includes a basic packet filtering firewall which isenabled by default on the dialup interface. Note that the telnetserver is not visible from the external side of the dialupinterface in the default firewall configuration.<p><h2><a name="SECTION00042000000000000000"><span class="arabic">3</span>.<span class="arabic">2</span> Bootup and Shutdown</a></h2><p>On system bootup, the init process runs the script<tt>/etc/rc.d/rc.sysinit</tt> to get the system up. The script will do theusual business of checking  and remounting the root filesystem and willstart up basic networking.<p>After that is done, <tt>rc.sysinit</tt> will run all executables from thedirectory <tt>/etc/rc.d/rc.start</tt>. It does not matter whether these arescripts or compiled programs. All executables will be passed theparameter <tt>start</tt>. For example, if there is a script called<tt></tt>runme, <tt>rc.sysinit</tt> will execute <tt>runme</tt> <tt>start</tt>.<p>The default initscripts that come with ttylinux are stored in thedirectory <tt>/etc/rc.d/init.d</tt>. Those that need to be run at bootup aresymlinked into the <tt>rc.start</tt> directory. If you want to write your owninitscripts, place them in the <tt>init.d</tt> directory and place a symlinkin the <tt>rc.start</tt> and perhaps also in the <tt>rc.stop</tt> directory.<p>If you don't want to write your own script, you can also add commandsto the file <tt>/etc/rc.d/rc.local</tt> - this script will be run at the veryend of the boot process, after all others scripts have run.<p>On shutdown, the script <tt>/etc/rc.d/rc.reboot</tt> gets run. This will runall the programs from the <tt>/etc/rc.d/rc.stop</tt> directory, and each programwill be passed a <tt>stop</tt> parameter. Our example script called <tt>runme</tt>would be executed as <tt>runme</tt> <tt>stop</tt>.<p>Both scripts from <tt>rc.start</tt> and <tt>rc.stop</tt> will be run in ASCIIorder. If you need them to run in a specific order, you could forexample use names like <tt>01.first</tt> and <tt>02.second</tt>. This is how the scripts  that come with ttylinux are named. Everything in <tt>rc.start</tt>and <tt>rc.stop</tt>  should be a symlink, so you can simply remove thatlink if you want to disable a specific script.<p>Initscripts can also be called manually in case you want to start  orstop something while the system is running. To make this  easier, ahelper script called <tt>service</tt> is provided. For example:<p><pre>       service inetd stop</pre><p>will stop the <tt>inetd</tt> server daemon. All scripts (except <tt>pppconf</tt>,which understands few options) know about the options <tt>start</tt>,<tt>stop</tt>, and <tt>restart</tt> that do the obvious things. Some scripts alsoknow about <tt>status</tt> and <tt>reload</tt> for displaying status informationand for reloading service configuration files.<p>All scripts will print a list of supported options if they are calledwith no option present.<p><h2><a name="SECTION00043000000000000000"><span class="arabic">3</span>.<span class="arabic">3</span> Using PPP dialup</a></h2><p>What to put into <tt>/etc/isp.conf</tt> to configure the dailup informationis outlined above in the customization section (<a href="#customize">2.5</a>, above).What you will find here is an overview of how to actually use the PPPsubsystem for Internet dialup.<p>Assuming <tt>/etc/isp.conf</tt> was setup correctly before boot, you only need one command to start up the Internet connection:<p><pre>       ppp-up</pre><p>If you use ISDN with autodialing enabled (<tt>ISDN_MODE=auto</tt>set in <tt>/etc/isp.conf</tt>), you do not need to run <tt>ppp-up</tt>. Justrun a program that sends packets to an Internet host.<p><tt>ppp-up</tt> triggers the PPP daemon, which will dial the provider and tryto login. <tt>ppp-up</tt> can be run by any user in the <tt>ppp</tt> group. In thedefault ttylinux configuration, the <tt>ppp</tt> group has no members, so only<tt>root</tt> can start and stop the internet connection. You can watch<tt>/var/log/messages</tt> (using <tt>tail</tt> <tt>-f</tt>) to see when theconnection is up and running. After that, the Internet connection is readyfor use. For example, the SSH server will be reachable from the outsideworld.<p>You can browse the web by using the <tt>retawq</tt> web browser. Use the<tt>g</tt> key to enter a URL, then navigate around using the cursor andreturn keys. You can leave the browser by pressing <tt>Shift-Q</tt>.<p>If you use ISDN, you can enable and disable channel bundling bycalling the <tt>bundle</tt> and <tt>unbundle</tt> scripts while the connectionis up. The default for new connections is to always use a single channel,even if channel bundling was enabled before. To check whether channelbundling is currently enabled, use the command:<p><pre>   service isdn status</pre><p>If you decide that you want to cut the Internet link, just issue:<p><pre>  ppp-down</pre><p>This will take the connection down. Once again, this can be done by<tt>root</tt> or a user from the <tt>ppp</tt> group, in this case only theuser who started the connection.<p>If you change any of the settings in <tt>/etc/isp.conf</tt>, you need toupdate the PPP configuration files by running the followingcommand:<p><pre>  ppprestart</pre><p>Note that if you want to switch from using a modem to using ISDNor vice versa, you need to take down the Internet connection beforerunning <tt>ppprestart</tt>.<p>After that, you can again use <tt>ppp-up</tt> and <tt>ppp-down</tt>. Notethat running <tt>ppprestart</tt> only works for <tt>root</tt>, not ordinaryusers. In previous ttylinux versions (2.5 and older), rebooting alsoupdated the PPP configuration files. This is no longer the case toallow manual modifications of the files. They will only be created onboot if they don't exist.<p>Users in the <tt>ppp</tt> group will be able to read the file<tt>/etc/isp.conf</tt> which contains your dialup password. This may or maynot be a good idea, depending on how much you trust your users. Ifyou only wish to use ISDN, you can remove the group read  permissionwith<p><pre>   chmod g-r /etc/isp.conf</pre><p><h2><a name="SECTION00044000000000000000"><span class="arabic">3</span>.<span class="arabic">4</span> Using the dropbear SSH package</a></h2><p>SSH, or secure shell, is a protocol that allows remote loginsto a machine. It uses encrypted connections and can use publickey authentication instead of plain passwords. The advantageover the older telnet protocol is that nothing in an SSHsession goes over the network unencrypted.<p><tt>dropbear</tt> is a small SSH v2 server and client package. Theserver will be started on system bootup by default. It allowspassword and public key authentication. Public key authenticationcan use DSS and RSA keys and works with keys generated by thepopular OpenSSH package. Putting your public key from OpenSSHinto the file <tt>.ssh/authorized_keys</tt> should be enough to letyou login from the machine where you keep the correspondingprivate key. Please note that the permissions on the<tt>.ssh</tt> directory must not include group or other writepermission, otherwise <tt>dropbear</tt> will refuse public keyauthentication.<p>The SSH client program is called <tt>dbclient</tt>. It is differentfrom the server in that it cannot use keys in OpenSSH format.You can use the <tt>dropbearconvert</tt> program to convert anOpenSSH format key for use by <tt>dbclient</tt> or you can use<tt>dropbearkey</tt> to create a new key.<p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -