HTML Form Images
Images used to indicate HTML form widgets:
Checked Radio Button
Checked Tick Box
Unchecked Tick Box
Images used to indicate HTML form widgets:
Checked Radio Button
Checked Tick Box
Unchecked Tick Box
Introduction:
This code goes into a user's .bash_profile file. This file is normally hidden from a directory listing (any filename starting with a '.' is normally hidden), but can be seen by typing the command; 'ls -al', or just 'll'.
This creates the shell function; 'chora'. The advantage of a function over a local script is that it runs in the current shell and, therefore, doesn't have to be called like this; '. ./chora'.
There are 2 types of parameter for this function:
'?' - This reports the current SID and lists all available SIDs.
SID - Calling 'chora SID' swithes the user's environment to the new SID if it exists.
When the user logs in, this reports availability.
Aim:
Give users a quick and simple way of switching between SIDs.
Requirements:
Obviously, this only operates in an Oracle environment.
Procedure:
... |
This post contains links to other posts that make up a library of Linux / UNIX shell scripts and techniques:
Introduction:
In this post, we will install the Oracle 10g Database Suite.
Aim:
An installed base-engine.
Requirements:
A configured Linux server.
Procedure:
# Oracle definitions & locations. export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/10.2.0.1/db01 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export ORACLE_TERM=vt100 export ORACLE_SID=`grep Y$ /etc/oratab | cut -d: -f1 | head -1` umask 022 |
Introduction:
Sendmail is the Linux service that sends and receives email. I will be setting up Oracle to use this to report database and workflow events.
What this configuration won't do is receive email - actually, it might but I won't be testing that. I don't need this for Oracle and that involves buying a domain name - something I just don't need.
Aim:
Set up Sendmail to be able to send email to anywhere.
Requirements:
A configured Linux home network that is up.
Procedure:
# service sendmail restart Shutting down sendmail: [ OK ] Shutting down sm-client: [ OK ] Starting sendmail: [ OK ] Starting sm-client: [ OK ] # |
Introduction:
PuTTY is just about the best Telnet/SSH Client and, what's more it's free. This allows you open a shell prompt to the Linux server from your PC.
And why would you want to do this?
The complete setup I am aiming at is one that looks very much like what I use at work. The Linux / UNIX servers are tucked away in the server room and everyone gets a networked PC. The first thing I do when starting a new contract is to install my favorite toolset. Right at the top of that list, if it is not already installed, is PuTTY.
If you find a better client, please tell me.
Aim:
Install and configure PuTTY.
Requirements:
A home network up and running.
Procedure:
Introduction:
When we configured Linux, we set up Samba to share 2 directories; a public one and Steve's home directory.
Aim:
Register both of these directories on the PC.
Requirements:
Introduction:
DNS (Domain Name System) is the stuff that turn URLs into IP Adresses and vice versa.
Aim:
We are going to set this up so that an addresses local to the network are resolved locally, and any that are for the internet are passed on.
Requirements:
You will need the following:
# service named restart Stopping named: [FAILED] Starting named: [ OK ] # named-checkconf -z zone steveroach.org/IN: loaded serial 1290 zone 0.168.192.in-addr.arpa/IN: loaded serial 1291 zone localhost/IN: loaded serial 1290 zone 0.0.127.in-addr.arpa/IN: loaded serial 1290 zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 1290 zone 255.in-addr.arpa/IN: loaded serial 1290 zone 0.in-addr.arpa/IN: loaded serial 42 zone bind/CH: loaded serial 1290 # service named status number of zones: 8 debug level: 0 xfers running: 0 xfers deferred: 0 soa queries in progress: 0 query logging is ON recursive clients: 0/1000 tcp clients: 0/100 server is up and running # |
Introduction:
I must confess, I had all sorts of problems with network connectivity once I came to test my NIC configuration, and this was partly my own fault. As a software engineer, I always assume that any problems I have are in software - especially right after a complex software installation or change. So, when I couldn't ping my PC from the server and vice versa, I went on a long fruitless search through my configuration. It took a post here to put me right (oh, and BTW, you should favorite that link right now).
This, then, is a diagnostic and fix for one possible problem that will not let you ping from your LInux box to your Windoze box and vice versa.
Aim:
Diagnose and fix a network problem where ping does not work.
Requirements:
You have got to this stage of your installation and the ping test has failed.
Procedure:
Diagnose:
# ifconfig eth0 Link encap:Ethernet HWaddr 00:0D:88:32:06:4A inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::20d:88ff:fe32:64a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:27 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:2240 (2.1 KiB) Interrupt:10 Base address:0xe800 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1382 errors:0 dropped:0 overruns:0 frame:0 TX packets:1382 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1800890 (1.7 MiB) TX bytes:1800890 (1.7 MiB) # |
Introduction:
Now we have a fully configured and connected Linux served home network. Let's make sure it all works...
Aim:
Test the network.
Requirements:
You have Linux installed and configured, the network is physically connected and you have rebooted both the server and PC.
Procedure:
Server Tests:
This post contains links to other posts containing a number of useful bits and pieces to make blogging life a bit easier.
Introduction:
Here, we will configure ADSL by setting up the second NIC to communicate with the ADSL modem.
Aim:
Set up the server to be the external communications hub for the network.
Requirements:
None.
Procedure:
127.0.0.1 localhost.localdomain localhost
192.168.0.2 lisa.steveroach.org lisa
Bringing up interface eth0: [ OK ] Determining IP information for eth0... done [ OK ] |
To paraphrase the eloquent Jean-Daniel Dodin;
"I am not responsible of any damage on any computer as a result of anyone reading this blog. If you do any damage, _it is YOUR fault, NOT MINE_! Be careful when doing this stuff, and don't make any mistakes, because it can be fatal! Backup all your important data and check that everything you do is correct! What is described here worked on my computer, but it may or may not work on your computer. Although it should work for everyone, I can't guarantee anything. This is the last warning you get: BACKUP IMPORTANT DATA! Or, to put it short: Use at your own risk!"
So there.
Not only that, all of the stuff is here under the LGPL which pretty much means that you can do whatever you like with it - for free - but, if you use this stuff, you must also release it with the same licence (or license, if you're a septic). Yeah, I know it's not easy to enforce stuff like that and, well, no GPL has ever been tested in court anyway, but can we all just try to do the right thing and play nice together. You just know that stuff like this REALLY pisses the Beast of Redmond and M$ off, right, and that is NEVER a bad thing.
So enjoy!
Introduction:
This is a problem I hit during Fedora Core 4 installation. I already had a version of Linux installed on this machine (Redhat 7.2) so the hard drive was already partitioned. During FC4 installation, I decided to completely re-parition the disk, nuking everything that was already on it. However, when I came to run the new installation, something (I know not what), accessed one of the existing partitions. Or maybe something didn't. Whatever, the install THOUGHT something did and fatally spat the dummy. This, unfortunately is a show-stopper as far as the installation is concerned.
Aim:
To fix this, we first delete the existing partitions. This makes the machine look, to all intents and purposes, like a first-time install.
Requirements:
You will need disk 1 of 4 of the FC4 install disks. If you don't know what I'm talking about, go here.
Procedure:
This procedure is in response to the following popup messages during FC4 install:
"Error informing the kernel about modifications to partition /dev/hda2 - Device or resource busy. This means that Linux won't know about any changes you made to /dev/hda2 until you reboot - so you shouldn't mount it or use it in any way before rebooting."
followed by:
"The kernel was unable to re-read the partition table on /dev/hda (Device or resource busy). This means that Linux won't know anything nothing (sic) about the modifications you made until you reboot. You should reboot your computer before doing anything with /dev/hda."
Then follows an "Exception Occurred" popup with some debug information.
To fix this, do this:
This post contains a number of links to posts that can get you out of trouble.
Linux:
Introduction:
This covers intallation of 'iptables'; Linux's built-in firewall. iptables is a little more than a firewall, it also routes packets from the internet to the local network.
Aim:
Protect the network from intrusion.
Requirements:
None.
Procedure:
# service iptables save Saving firewall rules to /etc/sysconfig/iptables: [ OK ] # service iptables start Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: mangle nat filter [ OK ] Unloading iptables modules: [ OK ] Applying iptables firewall rules: [ OK ] # |
Introduction:
In this procedure, we will configure the PC to access the server and, though it, the internet.
Aim:
Physically insert the server into the local network and connect it to the ADSL modem.
Requirements:
Introduction:
Samba allows non-Windoze computers to run Windoze-like print and file services. This lets you set up network printers - not that we'll be doing that here - and share files and directories across your network.
Aim:
We are going to set up two areas on the Linux server that can be accessed by the PC. One, /home/public, is freely acessible. The other, /home/steve, is my user's Linux home and is accessible from the PC but only by using Steve's Linux password.
Requirements:
You will need:
# service smb restart Shutting down SMB services: [FAILED] Shutting down NMB services: [FAILED] Starting SMB services: [ OK ] Starting NMB services: [ OK ] # |
Introduction:
IP Forwarding allows your internal network to communicate with the internet.
Aim:
Have IP Forwarding to start during boot-up.
Requirements:
None.
Procedure:
This post contains links to other posts containing a number of useful techniques, procedures and scripts that are useful to the system administrator.
Software:
Introduction:
For some reason, your shell script craps out. Let's debug it...
Aim:
To identify and fix problems with shell script execution.
1. bad interpreter
- 000000 # ! / b i n / b a s h \r \n
- ^
- |
- then your problem is right here -+
- 000000 # ! / b i n / b a s h \n
Introduction:
Say there's a script that you run fairly often and it's a pain to keep having to open up a Terminal and type it. This can be run by a launcher icon on the Desktop - well, under the right circumstances.
Those circumstances meaning, how you interact with it. If your script contains, for example, "ls -l", it will launch, list the directory and close - all before you get to see what's going on. This is only really useful for scripts that do something in background (e.g. writes something to a file), or are interactive (e.g. contain statements that ask for input).
Aim:
Create a Desktop icon that, when double-clicked, will run a shell script.
Requirements:
This post contains links to other posts containing a number of techniques, procedures and scripts that are useful to Linux users.
sudo Entry | Description |
ALL ALL=/bin/mount, /bin/umount | ALL users can run on ALL servers the commands /bin/mount and /bin/umount |
This post contains links to other posts containing a number of useful techniques, procedures and scripts that are useful to the system administrator.
Software:
Introduction:
This procedure goes through configuring and testing an internal netwirk card.
Aim:
A configured Ethernet card that connects the server to the local (internal) network. This also names the server and establishes the domain name for your network.
Requirement:
Base Fedora Core 4 is installed.
You will need to invent three things:
[root@localhost ~]# ping 192.168.0.2 PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data. 64 bytes from 192.168.0.2: icpm_seq=0 ttl=64 time=0.050 ms 64 bytes from 192.168.0.2: icpm_seq=1 ttl=64 time=0.042 ms 64 bytes from 192.168.0.2: icpm_seq=2 ttl=64 time=0.042 ms 64 bytes from 192.168.0.2: icpm_seq=3 ttl=64 time=0.043 ms 64 bytes from 192.168.0.2: icpm_seq=4 ttl=64 time=0.043 ms --- 192.168.0.2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.042/0.044/0.045/0.003 ms, pipe 2 [root@localhost ~]# |
[root@localhost ~]# ping lisa PING lisa.steveroach.org (192.168.0.2) 56(84) bytes of data. 64 bytes from lisa.steveroach.org (192.168.0.2): icmp_seq=0 ttl=64 time=0.051 ms 64 bytes from lisa.steveroach.org (192.168.0.2): icmp_seq=1 ttl=64 time=0.044 ms 64 bytes from lisa.steveroach.org (192.168.0.2): icmp_seq=2 ttl=64 time=0.044 ms 64 bytes from lisa.steveroach.org (192.168.0.2): icmp_seq=3 ttl=64 time=0.044 ms 64 bytes from lisa.steveroach.org (192.168.0.2): icmp_seq=4 ttl=64 time=0.043 ms --- lisa.steveroach.org ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.043/0.045/0.051/0.005 ms, pipe 2 [root@localhost ~]# |
Introduction:
This is to set up the desktop the way I like it.
Aim:
I'm after easy access to any tools I use regulary and a visual indication of what account I'm in.
Requirements:
At least base Fedora Core 4 installed.
Procedure:
When logged into the desktop of whatever account you want to set up.
My server has is getting on a bit now but it still does the job fairly well. This information is well worth having to hand for a few reasons:
Introduction:
Not so much a library entry, rather something that sysdamins may want to use and promote to their users.
You need a lot of passwords these days. You have the unsavoury choice of using the same one (or anyway a handfull) for all accounts, or making up a new one every time and keeping them all somewhere secure - even though we are always told to NEVER write it down, etc.
Aim:
This is a standard approach to passwords that generates good secure passwords, yet you can remember what they are.
Requirements:
Being annoyed by the advice of security experts on one hand, and the (in)ability to remember a few dozen passwords on the other.
Procedure: