Quickly Setting Up PLIP and NFS
You have to be root to edit the files. On both computers, in /etc/rc.d/rc.modules, comment out the line enabling printer support. (To comment out a statement in the file, just put the # character at the beginning of the line.) For example:
Check that PLIP support is also commented out.
#/sbin/modprobe plipI will load/unload the modules as needed from script files. Choose names for the two computers; I will call the desktop computer “zeus”, and the notebook “hermes”. (Hermes was the god of travel and business in Ancient Greece, and Zeus was his “boss”, being the god of the sky and master of all gods.) On both zeus and hermes, edit the file /etc/hosts and add the following two lines:
192.168.93.1 zeus 192.168.93.2 hermesThe addresses 192.168.93.xxx are safe to use; they will not conflict with existing addresses unless you already have a local network using these addresses. These IP addresses follow the convention for IP addressing: they are used only for local networks. (See NET-2-HOWTO and RFC1597 for more information.) You could skip this step and use the numeric addresses, but it is easier to remember zeus and hermes.
On zeus, create the following script, /usr/sbin/plip-on.sh:
#!/bin/sh /sbin/modprobe -r lp /sbin/modprobe plip /sbin/ifconfig plip1 zeus pointopoint hermes up /sbin/route add hermes dev plip1
The modprobe commands unload module lp (printer module) and load the plip module. (Actually, PLIP works on my system with lp loaded, but the available documentation says it won't work; feel free to experiment.) ifconfig is then run to set up the network interface plip1. route tells the computer how to find its way to the network; here, host hermes is located through the network interface plip1. Next, create the following script, /usr/sbin/plip-off.sh:
#!/bin/sh /sbin/route del hermes /sbin/ifconfig plip1 down /sbin/modprobe -r plip /sbin/modprobe lpSimilarly, on hermes, write the following script, /usr/sbin/plip-on.sh:
#!/bin/sh /sbin/modprobe -r lp /sbin/modprobe plip /sbin/ifconfig plip1 hermes pointopoint zeus up /sbin/route add zeus dev plip1 /sbin/route add default gw zeus dev plip1The main difference between the plip-on.sh file on zeus is that I have swapped zeus and hermes throughout. I have also added a default route, that is, when a connection (other than to zeus) is requested to the network, I use plip1 by default. I need this default to connect hermes to the Internet through zeus using masquerading as discussed at the end of this article; for PLIP and NFS, it is not needed. Now write the following script, /usr/sbin/plip-off.sh:
#!/bin/sh /sbin/route del default /sbin/route del zeus /sbin/ifconfig plip1 down /sbin/modprobe -r plip /sbin/modprobe lpRemember to change permissions (chmod +x plip-*.sh) on both computers to make the scripts executable. Now, you can plug in your cable and issue this command (as root):
# /usr/sbin/plip-onon both zeus and hermes. (It does not matter on which you issue it first.) You should now have full connectivity between zeus and hermes. From hermes type:
hermes:~> telnet zeusand log in to zeus. Congratulations. You have just set up your own private local network.
Working as root to run the scripts is not only annoying, it is also potentially dangerous. You could easily damage your Linux system by mistakenly removing files thus losing precious hours of sometimes difficult and tedious customization. That's why you should use the technique described in “Safely Running Programs as Root” by Phil Hughes, Linux Journal May 1997, and create executables named plip-on and plip-off with suid root to allow any user to start and stop the connection. All the executables do is run the scripts assuming root identity regardless of which user runs them. Example source code is available at ftp://sunsite.unc.edu/pub/Linux/docs/linux-journal/listings/issue37 in the file 2114.tgz.
I now have a full network connection between zeus and hermes, so all the network software will work (TELNET, FTP, rlogin, etc.). Try to exchange files between the two computers using ftp. (The FTP server is turned on by default in Slackware; check the /etc/inetd.conf file and the man pages for inetd(8), ftpd(8).) Quicker even than ftp, you can use rcp (remote copy; see the man pages rcp(1), rlogin(1), rsh(1)). The transfer rate that I get on my systems is about 25KB per second using FTP.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide