Sunday, September 27, 2009

CVS installed and running

I got CVS installed and running, created a repository and a module for etc, added some apache configuration files, made a configuration change and committed the change to CVS.

Here are all the commands I executed to accomplish this:

69 sudo apt-get -u install cvs
70 sudo netstat -anp --tcp --udp
74 sudo mkdir /root/cvsroot
77 sudo chmod 700 /root/cvsroot
79 sudo cvs -d /root/cvsroot init
87 sudo mkdir /root/cvsroot/etc
88 sudo cvs -d /root/cvsroot checkout etc
92 sudo cp -R etc/CVS /etc/CVS
98 sudo cvs add apache2
99 cd apache2/
107 sudo cvs -d /root/cvsroot add -kb apache2.conf
108 sudo cvs -d /root/cvsroot add -kb envvars
109 sudo cvs -d /root/cvsroot add -kb httpd.conf
110 sudo cvs -d /root/cvsroot add -kb ports.conf
112 sudo cvs -d /root/cvsroot add sites-available/
115 sudo cvs -d /root/cvsroot add -kb sites-available/default
116 sudo cvs -d /root/cvsroot add -kb sites-available/default-ssl
117 sudo cvs -d /root/cvsroot commit -m "initial apache revision"
119 sudo vi sites-available/default
121 sudo /etc/init.d/apache2 force-reload
166 cd sites-available/
167 sudo cvs -d /root/cvsroot commit -m "remove access to doc and cgi directories"


It looks like installing CVS also installs pserver, whcih I do not want running. The netstat at line 70 showed that no port was opened by pserver.

I created the cvs repository in /root because I wanted to make sure it was not visible. Doing the chmod at line 77 is not likely needed. Lower directories in cvsroot that are world read cannot be seen without sudo.

CVS is problematic in that it doesn't allow for easy adding of an existing directory structure to a repository without disturbing the original directory structure. I got around this be creating the etc module in CVS, then checking out the empty module in my home directory, and then moving the ~/etc/CVS directory to /etc ( lines 87, 88 and 92 respectively ). With this, files in etc can be added to the repository without affecting them at all.

The next thing I did was add the apache configuration files to the repository. Do not add the /etc/apache2/conf.d directory or files to the repository. This is because apache will try to load the files in the CVS subdirectory as configuration files. This would fail and cause apache not to start up.

I changed the sites-available/default file to not make the cgi and doc directories available through apache. I don't need these, so I don't want them. The file now looks as follows:


ServerAdmin webmaster@localhost

DocumentRoot /var/www

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all


ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined



Sorry, the tags above don't show up properly. I will try to fix this later.

The next task for me is to use cvs to get my php web app from my intranet server, get ssl working and get my site up and running.

No comments:

Post a Comment