|
|
Index: Home | What Is Izumi | Linux Tips | OpenBSD Tips | FreeBSD TipsThis page contain several tips for using OpenBSD. I use this mostly as reminders of commands that I found useful. There's generally nothing here one couldn't learn by searching on the net or reading the man pages, which is generally how I got the commands in the first place.
$Id: Open Bsd Tips.izu,v 1.11 2006-12-25 02:58:50 ralf Exp $
OpenBSD Live CD links:
I'll give a try to both existing live cds based on 3.8, although there's no guarantee it would work at all on my target machine (Vaio PCG-R505)
The story continues here. Yep, I go back and forth between the two.
Installing OpenBSD 3.9 for i386 is relatively easy. It's probably the most unsexy install I've seen quite in a while, say maybe comparable to installing Slackware in the late nineties. In any case you have two important sources of information to install:
For an overview, refer to the HTML-based FAQ links above. The text version is way too dry, hard to read and coma-prone to be of any interest. The FAQ has the info you want, in the order you'll need and is much easier to read and simply grep through.
This describes an install on a VMWare Server box.
First, downloads: only the cd39.iso was useful.
See the OpenBSD 3.9 download page.
There are many mirrors. The faster for me was http://mirror.sg.depaul.edu/pub/OpenBSD
(USA, Chicago, IL).
The rest of the files are only useful for a local install but the installer can
grab them automatically from the net and obviously the speed at which you'll get them
will be the same. So don't waste your time, just get the cd39.iso. To install
on a real box, you'll want to burn it on a CD and boot on it.
Setup a new VMWare host with "other" OS setting, 256 MB RAM, 8 GB drive and set
the CD to boot on cd39.iso. 8 GB is very conservative and way too much. My install
used 395 MB after the first boot, with all base packages, no X and no extras. However
since I was not preallocating disk space in the VMWare partition, extra space can't
hurt and the system has lots of free space to expand.
So anyway, quick overview of the install steps:
Install.wd0. I used all of it and it was empty.fdisk prepares both the MBR and the partitions. Here what happens (I'm simplifying) is that fdisk prepares the disk partition and then inside disklabel is used to make sub-partitions (also called slices in Solaris or logical partitions in the DOS world.) The bottom line is that OpenBSD, like FreeBSD, doesn't use the usual disk partitioning scheme (i.e, the usual 4 physical partitions on IDE drives) and simply works its own way with its logical partitions (disklabel) inside a real physical partition (fdisk). fdisk for me, I didn't have to touch it.disklabel part, which makes the logical partitions, was less obvious and at first I had no clue what to do. Reading the section on disk setup in the FAQ is here very useful, simply scroll down to where it mentions disk labels. Summary:/.swap (the type is proposed automatically.)/tmp./var./usr./home./var to be larger for a chrooted web server (the chroot is done in /var/www and can't escape it so all the web content would have to be in there.)# disklabel -p m wd0 # size offset fstype [fsize bsize cpg] a: 299.9M 256.1M 4.2BSD 2048 16384 320 # Cyl 555 - 1204 b: 256.1M 0.0M swap # Cyl 0*- 554 c: 8192.0M 0.0M unused 0 0 # Cyl 0 - 17753* d: 299.9M 556.0M 4.2BSD 2048 16384 320 # Cyl 1205 - 1854 e: 299.9M 855.9M 4.2BSD 2048 16384 320 # Cyl 1855 - 2504 f: 3499.9M 1155.9M 4.2BSD 2048 16384 320 # Cyl 2505 - 10089 g: 3533.6M 4655.8M 4.2BSD 2048 16384 320 # Cyl 10090 - 17747
# df -h Filesystem Size Used Avail Capacity Mounted on /dev/wd0a 293M 27.1M 251M 10%
/dev/wd0g 3.4G 12.0K 3.2G 0% /home /dev/wd0d 293M 2.0K 278M 0% /tmp /dev/wd0f 3.4G 362M 2.8G 11% /usr /dev/wd0e 293M 4.2M 274M 2% /var
dhcp on the ethernet interface.http and used the default selected on file sets, which is everything except X11.sshd and ntpd and that I would not expect to run X. The question about having a default console on com0 is about using a serial port, so the answer is no. Then select the time zone, here US/Pacific.First remarks after install:
ssh root@... is allowed.$ vim... => vim: not foundgcc --version => gcc (GCC) 3.3.5ksh. I already miss my bash :-)adduser. It's interactive, the first time it asks for lots of info about creating some kind of profile. I just used the defaults; then it asked about the user I wanted to create.No root logging in SSH (duh):
# vi /etc/ssh/sshd_config s/PermitRootLogin => change to "no". Write and quit.
Allow your user to sudo around:
# vi /etc/sudoersEither have
wheel or your username be able to do ALL on ALL. Setting
the wheel group as sudoers and then simply adding selected users to wheel
seems more manageable.
Things to explore:
Packages:
~/.profile add:export PKG_PATH=http://mirror.sg.depaul.edu/pub/OpenBSD/3.9/packages/i386/:http://mirror.sese.asu.edu/pub/OpenBSD/3.9/packages/i386Then, simply look in the full list above or in one of the mirrors for the package name and use it without the .tgz extension:
# pkg_add -v vim-6.4.6p1-no_x11 # pkg_add -v screen-4.0.2 # pkg_add -v bash-3.1.1p0 # pkg_add -v rsync-2.6.6p0
And voila, a system a tiny bitty more friendly with bash, vim, rsync and screen!
Blog Archives:
Most recent posts
|
|

This work is licensed by Raphaël Moll under a Creative Commons License.
|
|
| Color Theme: | Gray | Blue | Black | Sand | Khaki | Egg | None |
|
|
|
|