Monday, May 3, 2010

Samba can wait, I need CVS more

CVS is more important to me right now than Samba, so Samba can wait.

The first step was to install cvs, then I created a 'dev' group for use by developers and added myself to that group. Here are the commands:

13 sudo apt-get -u install cvs
16 sudo groupadd -r dev
17 sudo usermod -a -G dev devuser

The install properly created an initialized cvs repository where recommended by the Filesystem Hierarchy Standard at /srv/cvs.
I then copied over all the modules in my old cvs repository on my old server with this kind of command for each module:

cd /srv/cvs
sudo scp -r devuser@oldserver:/var/cvsroot/project .

Ths cvs install had made the user:group of the files in the cvs directory root:src. I'm not thrilled about root user, but I'll leave it for now. The src group means nothing to me, so i will change it to dev with:

sudo chown -R :dev /srv/cvs

Next, I have to get pserver working so I can access cvs from my development computer. To do this, xinetd must be installed as follows:

sudo apt-get install xinetd

Then create the file /etc/xinetd.d/cvspserver with the following content:

service cvspserver
{
port = 2401
socket_type = stream
protocol = tcp
user = root
wait = no
type = UNLISTED
server = /usr/bin/cvs
server_args = -f --allow-root /srv/cvs pserver
disable = no
}

Then do the following to restart the pserver:

sudo /etc/init.d/xinetd restart

You can confirm that pserver is running with:

sudo netstat -anp --tcp --udp

and look for the line where xinetd is listening on port 2401.
Make sure all your directories in the cvs directory have the following type of permissions and ownership:

drwxrwsr-x 3 root dev 4096 2010-05-03 23:55 CVSROOT

The group permissions must be readable, writable and have the 's' for set group id, and the group must be dev, otherwise, lock file setting might fail and developers may not be able to access files in the cvs repository.

More info on setting up CVS can be found at http://doc.ubuntu.com/ubuntu/serverguide/C/cvs-server.html

Next? Setting up Apache.

Server Installed

Installed the server! I always hate the disk partitioning part. It never seems intuitive to me what to do. I selected the LAMP, OpenSSH, PostgreSQL, print and Samba servers to be installed. The first order of business after the install was to set a static ip address. This was done by editing the file /etc/network/interfaces and changing the following line from

iface eth0 inet dhcp

to

iface eth0 inet static
address 192.168.1.30
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

After, reboot with a

sudo reboot

Now I can do all my work by ssh. Next, Samba setup.

New servers to setup

Now that the latest LTS (Long term support) Ubuntu has been released, and my needs have changed, I'm re-architecting my computer network. I will have 2 servers: one to run my intranet with networked drives, web server, cvs server, printing services for starters; and the other will be on the internet, and only provide a web server running a web application where sensitive financial data is at risk and security is most important.

The first step is to download the latest iso files and burn them to cd. I'm also being thorough and checking MD5s and the whole thing. All the info is found at BurningIsoHowto.

Next will be the installation of of the intranet server.