|
home
|
Something not entirely unlike programming...
Proof of my cluelessness with Perl.
Some web Stuff
Yeah, my reading list just got longer. This is all stuff that I've tinkered on briefly, but never got serious about.
XML: http://en.wikipedia.org/wiki/XML
XHTML: http://en.wikipedia.org/wiki/XHTML
Javascript: http://developer.mozilla.org/en/docs/A_re-introduction_to_JavaScript
Ajax: http://www.xul.fr/en-xml-ajax.html
Stuff
I use awk really crudely, like
a three-year-old uses crayons. However, between awk,
cut, and
sort, I
can generally bludgeon a pile stupid notes from a "consultant" into something reasonable.
The first round of stuff from the Redhat book
These are the things you're already supposed to know about Linux and Redhat before you get started,
but some of them were handy to look at. Some of the details about vi were things I didn't know, and
I quit putting off learning how crontab works, which was interesting. I think it's pretty cool
that cron + mpg123 = alarm clock.
- Basic vi stuff
The basics: insert and command mode, write, quit, join lines with a capital
J, searching with "/", deleting with x, deleting with d, yanking with y
and putting with p. About the best vi reference I've found on the internet is over
here. All the
fancy search & replace craziness is left until later. Larry-from-work
actually gave me a nice vi cheat sheet, I'll post it later.
- Filesystem stuff
At this point in the book, the question is "how do you see what's mounted?"
The answer is basic: the mount command. /etc/mtab and df are also pointed
out. For the record, I don't really understand why you need both an mtab and an fstab.
- printing considerations
The good, the bad, the Amish: lp and lpr. Basic unix stuff gets mentioned,
lpq (check the print queue) gets some treatment, and redhat's cups-centric-ness
is touched on. The test question at the end of the chapter involves lpq. I need a
printer, I suppose.
- shell stuff
Add a directory to your path: PATH=$PATH:/addition/to/shell ...yep, that's about it.
Well, one more thing: bash searches several places to figure out what the environment is;
for example, ~/.bashrc, /etc/profile, ~/.bash_profile, and some others iirc. The redhat way of
doing things is to put the profile in ~/.bash_profile. Finally, I've started doing a redhat-ism
on my decidedly non-redhat boxes at home: put a ~/bin directory in the path and use that for
executable scripts... for example, I've got most of of the hosts I ssh to scripted into
three-letter commands now.
- security stuff
Redhat locked umask down, a little. Even if you *try* to set umask to 0000, the
most permissive permissions you're gonna get are 666. 777 is out of the question. And there's some
stuff about what what SUID & SGID are. Also, there's a very basic firewall and selinux setup script:
system-config-securitylevel-tui. It's cool because it only takes *seconds* to run it, and you can
get a simple firewall set up.
- networking basics
1) configure IP address & netmask on an interface: /etc/sysconfig/network-scripts/ifcfg-eth[number]
DEVICE=eth0
BOOTPROTO=[none | dhcp]
HWADDR=[MAC address. Should have a default entry, but you could set the MAC address here.]
NETMASK=[dotted decimal notation]
IPADDR=[address]
ONBOOT=[yes | no]
TYPE=Ethernet
PEERDNS=[yes | no] set to 'no' to turn off dhcp; otherwise /etc/resolv.conf will be gone at next reboot.
2) gateway, hostname configuration: /etc/sysconfig/network
NETWORKING=[yes | no] this option brings up the interface or leaves it down.
NETWORKING_IPV6=[yes | no] do we do IPv6 on this interface?
HOSTNAME=[hostname]
GATEWAY=[IP address]
GATEWAYDEV=[example: eth0] this option selects the device that is connected to the gateway
3) DNS
DNS setup is done in /etc/resolv.conf. Note that the config could be as simple as this:
nameserver [IP address]
Now go read the
manual.
- cron syntax
First, some basics...
There's a file, /var/spool/cron/[user], which is a text file that holds the scheduled jobs for each user. These
files are refered to as "crontabs". The cron program runs in the background, parses each of those files, and then
executes the tasks that each of those files specifies (at the time specified by each entry in each file). If you have
the privileges, you can edit the crontabs directly, but that isn't the way you're supposed to do it. The normal
way of editing scheduled jobs is by running the crontab program, which launches an editor for editing the appropriate
crontab.
Invocation syntax is over here. The syntax for a line looks like
this:
[minute] [hour] [day of month] [month] [day of week] [command]
The man page that describes the syntax for crontab file entries is over
here.
On the other hand, you might be using
this instead.
|
|