Checklist for a new box
In the past two weeks, I have set up FreeBSD three times, on two different boxes, but three different
disks. One drive I have put aside for future use. In the short term, I have a workstation to create
and a gateway to set up. I have just obtained a DSL connection, and a gateway/firewall is required
for that. For a while, I will have both DSL and cable. Hopefully some interesting reading will come
from that play time….
On a side note, I’ve been anticipating this moment for a few weeks. And it has arrived.
This article is the 500th to be added to the database.
Now before you anal rententives rush off to count,
not all articles are still on the website. Some have been removed as they are no longer relevant. Actually,
the article count is 492, but, nonetheless, this article has id 500
My list of things for a new box
These are the things I add to almost every new box I create:
- bash
-
my favorite shell (
shells/bash2
) - cvsup
- cvsup is used to upgrade your ports and/or your source tree.
- dnetc
-
I put dnetc on all boxes to use up the spare CPU cycles.
(misc/dnetc
) - joe
-
I was put onto joe when I became disillusioned with ee. I only use vi if I have to.
What I like about joe is the ability to have multiple files open and copy/paste/move from
one file to another. (editors/joe
andchinese/joe
). - logcheck
-
logcheck is a nice little tool for looking for odd things
in your logs. It goes on every one of my boxes. (security/logcheck
; yes, I am the maintainer
for this port). - screen
-
screen is a great tool! If you access remote boxes and want
to leave things running, then this is the tool for you! (misc/screen
) - sudo
-
sudo allows a permitted user to execute a command as the
superuser or another user, as specified in the sudoers file. (security/sudo
) - xtail
-
xtail is like tail,
but it works on multiple files at the same time. Very useful, especially when you do something like this:xtail /var/log /www/log
It can be useful to see the log message from all around the system when trying to diagnose a problem.
(misc/xtail
)
See also System tools – toys I have found.
Other things
I also modify this entry in /etc/mail/aliases
and then run
newaliases
:
# root: me@my.domain
to be like this
root: dan@example.org
That change will ensure that any and all mail for root will be automagically forwarded to you
at that address. This is especially useful if the box is remote and you don’t normally log
onto it. Similary, if you normally get your mail from that box, you can just as easily omit
the @example.org
and have root’s mail redirected to your personal account.
And one port to install them all!
See also the meta port article which shows you how to install all
of this with one port.
I find vim invaluble for daily machine use.
zsh is my favorite shell, as it is the kitchen sink shell, unfortunatly it’s almost never installed by default on any machine. I just love my customized command completion, it significanty cuts down on excess keystrokes.
When X is installed Windowmaker is essental for a featureful yet reasonably lightweight window manager.
portupgrade is a necessity if you plan on installing more than a handful of ports and keep them up to date.
Finally, if you are installing a desktop machine, I recommend installing apsfilter, even if you don’t really want a fancy printing system. Apsfilter depends on just about every graphics and X port, so it’s a great port to fire off overnight and will get a lot of the common dependancies out of the way. If you don’t really want the printing system, you can pkg_delete apsfilter once it’s installed.
I can’t use vim as it comes by default (at least on Linux systems). The syntax colouring is unreadable, the indents
are a pain in the butt too. Try copying and pasting a shell
script from a window into a vim terminal, and swear as you
spend minutes getting the original indentation back – I
now use
cat > foo
[paste stuff here]
vi foo
just in case vi is really vim onm a given system.
I’ll stick to vanilla vi thanks very much.
I’ve heard good things about zsh. It’s a really small
executable, no?
portupgrade is superb too.
I don’t use apsfilter. I prefer magicfilter and a2ps.
lynx is a must for dial up connections.
lsof is another favourite (sysutils/lsof).
> Try copying and pasting a shell
> script from a window into a vim terminal, and swear as you
> spend minutes getting the original indentation back
When I make that mistake, I just hit "u" to undo the mess, ":set noai" turn turn auto-indent off, then "." to repaste. And it repastes as though it were key strokes, so none of those annoying 120 column indents get put back in.
And it’s just as easy to put "set noai" in ~/.vimrc (no quotes as that’s the comment character).
I must admit, though, the auto-indent doesn’t behave very nicely. And the japanese/vim* is a bit older and doesn’t appear to support syntax coloring. (At least, not on a kterm.)
is it OK to say that I love ksh93 ?
and the zsh comes with Solaris now btw, I was pleasantly surprised.
Yuri
Almost the first thing I install is lsof, which I do not believe is installed with freebsd by default. lsof shows all the information you could ever want to know about running processes, including open files (hence the "of" in "lsof"), bound network sockets, library dependencies, attached terminals, etc. Very useful tool.
…commander and lynx are indispensable as first tools on a new box, in my opinion.
mc, let us not forget, has ftp built in and is the very first thing I grabbed (from ports). Secondly lynx itself to enable a preliminary www browser for docs etc. Then I grab ‘Crack’ or ‘john the ripper’ to test for weak passwords, cos I’m, by nature, incurably paranoid.