CVS Repository Setup on Solaris 8



Using version control software (VCS) is addicting, even when you first start using a simple system revision control system like CVS and you do it the right way, you'll never want to go back to developing without a VCS. Installing CVS over SSH on a Solaris 8 SPARC presented me a few small hurdles, and in this article I'll try to guide you through the installation steps I followed. As you will soon see, installing SSH takes up a large part of this guide, as setting up CVS wasn't too much of a problem.

Some of the information in this article is a matter of taste or preference, so feel free to use your own directories and installation paths.


I did not start the installation from scratch, instead, the command line version of the cvs tool was already installed from a package downloaded from the Sun Freeware site. A working gcc compiler was available, and also two versions of OpenSSL, also installed from Sun Freeware packages. And there was a bothersome zlib development package installed.

Oh, and I've got wget installed from source, which comes in handy when downloading files from the internet.

Installing OpenSSH

Getting the sources

First of all, I was going to compile libopenssl version 0.9.8 from source after which I'd configure and install OpenSSH 4.2p1. Downloading the sources using wget is as easy as typing these commands in the console:


Unpack and untar these tarballs using these commands:

gunzip openssl-0.9.8.tar.gz
tar xvf openssl-0.9.8.tar
gunzip openssh-4.2p1.tar.gz
tar xvf openssh-4.2p1.tar

You could get an error about a lone zero block, but just ignore that one for now.

Compiling OpenSSL

I was going to install both packages to the directory /opt/ssh which might not make sense in your setup, so please replace all instances of the aforementioned directory to something useful in your situation. Configuring and compiling OpenSSL or libopenssl was kind of simple:

cd openssl-0.9.8
./configure --prefix=/opt/ssh
make install

A few minutes later, I was ready to compile OpenSSH.

Compiling OpenSSH

This part proved to be most troublesome, but using Google I managed to get over the tricky part. Configuring OpenSSH should be done disabling the checks for zlib and including the extra ld library. Disabling the zlib check doesn't cause a problem here because access to SSH will be restricted to a few local hosts, but make sure to check whether or not you can use an insecure zlib in your network setup.

Well, to make a long story short: configuring and compiling OpenSSH was a matter of:

cd openssh-4.2p1
./configure --without-zlib-version-check --with-ssl-dir=/opt/ssh --prefix=/opt/ssh --with-libs=-ldl
make install

Host keys are automatically created and the sshd configuration file is now stored in /opt/ssh/etc/sshd_config.

The trick here is in the --with-libs=-ldl, because if you omit it, you will get a linking error about missing references to dlsym, dlopen, dlclose and dlerror while linking the 'ssh' binary.

Configuring OpenSSH

I made a small adjustment in the OpenSSH configuration file, disabling PrivilegeSeparation. You can use your favourite text editor like vi or emacs to make this change. Skim over the rest of the options to enable or disable anything you want.

Starting OpenSSH

If you aren't root yet, run the 'su' command and start the SSH daemon:


Make sure you provide the full path to the executable.

CVS Repository Setup

I was going to provide a CVS repository to all users in the Unix group 'staff'. The base directory for the repository was going to be /cvs. Creating the directory and granting access rights is done using these commands (as root):

mkdir /cvs
chown -R nobody:staff /cvs
chmod -R 0770 /cvs
chmod -R g+s /cvs

The recursive option for the chmod and chown commands isn't really necessary, but it's my habit of using -R when it does no harm. The 'g+s' bit is in there because you can't set a group sticky bit using a numeric parameter, so you'll have to do it in a symbolic way on Solaris.

After the directory is set up, it's a simple matter of initializing the repository using:

cvs -d /cvs init

And you're set.

This article was added on the 29th of September 2005.

Back to top