July 2006 Archives

Steps to install Mysql 5.0 on OpenBSD 3.9:

1. wget ftp://ftp.openbsd.org/pub/OpenBSD/3.9/packages/i386/mysql-server-5.0.18.tgz
2. wget ftp://ftp.openbsd.org/pub/OpenBSD/3.9/packages/i386/p5-DBD-mysql-3.0002.tgz
3. wget ftp://ftp.openbsd.org/pub/OpenBSD/3.9/packages/i386/p5-DBI-1.45p1.tgz
4. wget ftp://ftp.openbsd.org/pub/OpenBSD/3.9/packages/i386/p5-PlRPC-0.2018.tgz
5. wget ftp://ftp.openbsd.org/pub/OpenBSD/3.9/packages/i386/p5-Net-Daemon-0.38.tgz
6. pkg_add -v mysql-server-5.0.18.tgz
7. /usr/local/bin/mysqld_safe &
8. /usr/local/bin/mysqladmin -u root password password'
9. mysql -u root -p
10. Run this script:

#!/usr/bin/perl'

# Use what needs to be used.
use strict;
use DBI;

# Create the @drivers array.
my @drivers = DBI->available_drivers();

# Print each driver.
foreach (@drivers) {
print $_ . "\n";
}

This should yield:
bash-3.1# perl testDBI.pl
DBM
ExampleP
File
Proxy
Sponge
mysql ---->this is what we are looking for

done.

Mass commenting in VIM

| | TrackBacks (0)

CTRL-v (enter visual block mode)
select the lines you want to comment
press I
enter //
press ESC

Installing JDK on OpenBSD is a little different than other platforms. Since proprietary packages cannot be included with OpenBSD, you'll have to use the Ports tree to install the JDK. There is currently no option to install a standalone Java Runtime Environment without the development kit.

To install JDK, you are going to have to download (manually that is) the JDK binaries, source code, and BSD patch sets from a few web sites, then compile from source via the ports tree. It takes forever and then some but its the only way I know and these instructions are based on a few other web sites. Additionally, this process requires a ton of space so make sure your /usr and /tmp are big enough to handle the space. To find out which files you need, you can first go into : /usr/ports/devel/jdk/1.5 and type make, it will bomb out but its nice enough to tell you what you need and from what web sites. My install is based on openbsd 3.9 as of 07/08/06. Here were the files I needed:

1. j2sdk-1_3_1_16-linux-i586.bin from http://java.sun.com/j2se/1.3/download.html
2. j2sdk-1_4_2-linux-i586.bin from http://java.sun.com/products/archive/j2se/1.4.2/
3. j2sdk-1_4_2-src-scsl.zip, j2sdk-1_4_2-bin-scsl.zip, j2sdk-1_5_0-bin-scsl.zip, and j2sdk-1_5_0-src-scsl.zip from http://wwws.sun.com/software/communitysource/j2se/java2/download.html
4. bsd-jdk14-patches-7.tar.gz and bsd-jdk15-patches-2.tar.bz2 from http://www.eyesbeyond.com/freebsddom/java/jdk14.html
5. I also needed xalan-j_2_7_0-bin.tar.gz and jdk-1_5_0-solaris-i586.tar.Z
xalan can be found at: http://www.apache.org/dist/xml/xalan-j

Additionally, you will need to add JAVA to your path:

export JAVA_HOME=/usr/local/jdk-1.5.0/

References:
1. http://www.thejemreport.com/mambo/content/view/246/1
2. http://www.weblog.nohair.net/archives/000698.html
3. http://intricatesoftware.com:81/OpenBSD/java/jdk14.html
4. http://bsdgangster.org/modules.php?name=Content&file=viewarticle&id=11

Note: To install eclipse on OpenBSD 3.9, you can now go to: /usr/ports/devel/eclipse and type make install - all should work fine as it did for me. Subversion should compile ok too.

I found a xorg.conf file that works with my Dell 800, running OpenBSD 3.9 it can be found at this site.

I am sure most people know how to do this but I thought I would document my steps in case I ever have to do this again. As everyone knows, you can install openbsd in other ways but having a bootable cdrom makes thing quite easy, I can't even remember when I used a floppy last?

Anyhey, This example was done for the OpenBSD 3.9. Architecture i386.

1. To start you will need to have the mkisofs binary on your system.
2. Next we need to make a few directories which will be the file system hierarchy. The top directory will be called "OpenBSD". The next directory down will be the version number of the OpenBSD release (3.9). The next directory down from that will be the architecture type (i386). In the architecture directory is where the install files will be going. Here is a quick example of making the hierarchy in the /tmp directory. Please switch to the root account to perform any steps if necessary.

/tmp> mkdir -p OpenBSD/3.9/i386
/tmp> cd OpenBSD/3.9/i386
3. Now stay in the "i386" directory. This is where we are going to put our install binaries. Find a mirror and download the following binaries (below) from the i386 architecture directory like ftp://ftp3.usa.openbsd.org/pub/OpenBSD/3.9/i386. The following commands will download the entire remote directory to the current local directory if you have the program ncftp or wget installed.

/tmp/OpenBSD/3.9/i386>

wget --passive-ftp ftp://ftp3.usa.openbsd.org/pub/OpenBSD/3.9/i386/*

[ ] CKSUM 02-Mar-2006 04:10 562
[ ] INSTALL.i386 02-Mar-2006 04:10 92K
[ ] INSTALL.linux 02-Mar-2006 04:10 22K
[ ] MD5 02-Mar-2006 04:10 1.0K
[ ] base39.tgz 02-Mar-2006 04:10 39M
[ ] bsd 02-Mar-2006 04:10 5.2M
[ ] bsd.mp 02-Mar-2006 04:10 5.2M
[ ] bsd.rd 02-Mar-2006 04:10 4.5M
[ ] cd39.iso 02-Mar-2006 04:10 4.6M
[ ] cdboot 02-Mar-2006 04:10 41K
[ ] cdbr 02-Mar-2006 04:10 2.0K
[ ] cdemu39.iso 02-Mar-2006 04:10 2.9M
[ ] cdrom39.fs 02-Mar-2006 04:10 2.8M
[ ] comp39.tgz 02-Mar-2006 04:10 72M
[ ] etc39.tgz 02-Mar-2006 04:10 1.1M
[ ] floppy39.fs 02-Mar-2006 04:10 1.4M
[ ] floppyB39.fs 02-Mar-2006 04:10 1.4M
[ ] floppyC39.fs 02-Mar-2006 04:10 1.4M
[ ] game39.tgz 02-Mar-2006 04:10 2.5M
[TXT] index.txt 20-Jan-2006 05:06 269
[ ] man39.tgz 02-Mar-2006 04:10 7.1M
[ ] misc39.tgz 02-Mar-2006 04:10 2.2M
[ ] pxeboot 02-Mar-2006 04:10 50K
[ ] xbase39.tgz 10-Mar-2006 13:04 10M
[ ] xetc39.tgz 10-Mar-2006 13:04 88K
[ ] xfont39.tgz 10-Mar-2006 13:04 32M
[ ] xserv39.tgz 10-Mar-2006 13:04 19M
[ ] xshare39.tgz 10-Mar-2006 13:04 2.0M

4. Now we will make the ISO image. We will go back up to the "OpenBSD" directory and execute the "mkisofs" command with some options. We will be using the cdrom38.fs to be our boot image for the CD. If this image has boot problems on your computer then you can try the floppy39.fs as your boot image. Please see the mkisofs man page for what the options are for. Please note that if /tmp/OpenBSD/OpenBSD39.iso exists and you run mkisofs again it will simply append the new image to the old image. Thus making the new image twice as large with illegal directories. Ok execute the following commands:

/tmp/OpenBSD/3.9/i386> cd ../../
/tmp/OpenBSD>mkisofs -vrTJV "OpenBSD39" -b 3.9/i386/cdrom39.fs -c boot.catalog -o OpenBSD38.iso /tmp/OpenBSD/
5. Now you should have a ISO image named "OpenBSD39.iso" in the /tmp/OpenBSD directory. You can now burn it using something like xcdroast...

Other resources: http://www.pantz.org/os/openbsd/makingaopenbsdcd.html

About this Archive

This page is an archive of entries from July 2006 listed from newest to oldest.

May 2006 is the previous archive.

August 2006 is the next archive.

Find recent content on the main index or look in the archives to find all content.