Installing CVS in Debian
#apt-get install cvs
This will install the CVS binaries which you can now use to create the repository for storing your code.
When you do this you'll be asked a couple of questions - if you wish to create a repository or start a server. Answer with the defaults, which will be to not launch a server, if you answer yes here you'll be running an insecure server
In the following example We create a repository which is owned by the user and group cvs and is located at /home/cvs:
#useradd cvs
#groupadd cvs
#mkdir /home/cvs
#cvs -d /home/cvs init
#chown -R cvs:cvs /home/cvs
#chmod -R 770 /home/cvs
#chmod 770 /home/cvs/CVSROOT
Now any local account that needs to write to the repository should be added to the cvs group and will then be able to add and modify projects.
If they have remote access to the server which the repository is contained upon then they will be able to checkout copies as follows
#export CVS_RSH=ssh
#cvs -d :ext:username@repository.host.name:/home/cvs login
#cvs -d :ext:username@repository.host.name:/home/cvs co moduleName
They will be prompted for their login password and will be able to do a full checkout of the code.
Of course you add a module to CVS in the first place!
Assuming that you have a project held in a directory on the local machine which you wish to import simply run
#cd ~/project
#cvs -d /home/cvs import -m "Initial Import" project myname release
Once this is done you can move to a different directory and try to check it out:
#cvs -d /home/cvs checkout project
Setup CVS to allow anonymous read-only access to your repository
For this setup you need to answer the following question at the time of installation
Finally you'll be offered the chance to run the "CVS Peserver", to this question say yes.
Once you have the CVS server up and running you need to add a new system account with no shell for the anonymous user using the following command
#useradd -s /bin/false anonymous
The next step is to configure the anonymous user to be a valid user with no password for CVS logins. This involves adding a line to a file passwd beneath your CVSROOT directory.
Our CVS repository is located in /home/cvs, so for me the command is
#echo "anonymous:" >> /home/cvs/CVSROOT/passwd
Then to make sure this is only used for read-only access add the anonymous user to the file readers in the same directory
#echo "anonymous" >> /home/cvs/CVSROOT/readers
This should be sufficient to allow the anonymous user to login and checkout code without being able to modify anything.
The syntax for the client would be:
$ cvs -d :pserver:anonymous@hostname:/home/cvs login
Logging in to :pserver:anonymous@hostname:2401/home/cvs
CVS password: [Enter here = blank password]
$ cvs -d :pserver:anonymous@hostname:/home/cvs co module
The anonymous client will now be able to keep up to date with the codebase and not be able to modify anything upon the server. Attempting to commit a local change will result in the following error message:
#cvs [server aborted]: "commit" requires write access to the repository
#cvs commit: saving log message in /tmp/cvsXXX
Webinterface,Frontend or GUI tools for CVS
viewcvs
view CVS Repositories via HTTP
The ViewCVS software was inspired by cvsweb (by Henner Zeller). ViewCVS can browse directories, commit-logs, and specific revisions of files. It can display diffs between versions and show selections of files based on tags or branches.
This version support also subversion repository.
If you want to install this in your debian machine just run the following command
#apt-get install viewcvs
cvsweb
a CGI interface to your CVS repository
cvsweb is a WWW CGI script that provides remote access to your CVS repository. It allows browsing of the full tree, with configurable access controls. It will display the revision history of a file, as well as produce diffs between revisions and allow downloading any revision of the whole file.
If you want to install this in your debian machine just run the following command
#apt-get install cvsweb
#apt-get install cvs
This will install the CVS binaries which you can now use to create the repository for storing your code.
When you do this you'll be asked a couple of questions - if you wish to create a repository or start a server. Answer with the defaults, which will be to not launch a server, if you answer yes here you'll be running an insecure server
In the following example We create a repository which is owned by the user and group cvs and is located at /home/cvs:
#useradd cvs
#groupadd cvs
#mkdir /home/cvs
#cvs -d /home/cvs init
#chown -R cvs:cvs /home/cvs
#chmod -R 770 /home/cvs
#chmod 770 /home/cvs/CVSROOT
Now any local account that needs to write to the repository should be added to the cvs group and will then be able to add and modify projects.
If they have remote access to the server which the repository is contained upon then they will be able to checkout copies as follows
#export CVS_RSH=ssh
#cvs -d :ext:username@repository.host
#cvs -d :ext:username@repository.host
They will be prompted for their login password and will be able to do a full checkout of the code.
Of course you add a module to CVS in the first place!
Assuming that you have a project held in a directory on the local machine which you wish to import simply run
#cd ~/project
#cvs -d /home/cvs import -m "Initial Import" project myname release
Once this is done you can move to a different directory and try to check it out:
#cvs -d /home/cvs checkout project
For this setup you need to answer the following question at the time of installation
Finally you'll be offered the chance to run the "CVS Peserver", to this question say yes.
Once you have the CVS server up and running you need to add a new system account with no shell for the anonymous user using the following command
#useradd -s /bin/false anonymous
The next step is to configure the anonymous user to be a valid user with no password for CVS logins. This involves adding a line to a file passwd beneath your CVSROOT directory.
Our CVS repository is located in /home/cvs, so for me the command is
#echo "anonymous:" >> /home/cvs/CVSROOT/passwd
Then to make sure this is only used for read-only access add the anonymous user to the file readers in the same directory
#echo "anonymous" >> /home/cvs/CVSROOT/readers
This should be sufficient to allow the anonymous user to login and checkout code without being able to modify anything.
The syntax for the client would be:
$ cvs -d :pserver:anonymous@hostname:/home/cvs login
Logging in to :pserver:anonymous@hostname:2401/home/cvs
CVS password: [Enter here = blank password]
$ cvs -d :pserver:anonymous@hostname:/home/cvs co module
The anonymous client will now be able to keep up to date with the codebase and not be able to modify anything upon the server. Attempting to commit a local change will result in the following error message:
#cvs [server aborted]: "commit" requires write access to the repository
#cvs commit: saving log message in /tmp/cvsXXX
Webinterface,Frontend or GUI tools for CVS
viewcvs
view CVS Repositories via HTTP
The ViewCVS software was inspired by cvsweb (by Henner Zeller). ViewCVS can browse directories, commit-logs, and specific revisions of files. It can display diffs between versions and show selections of files based on tags or branches.
This version support also subversion repository.
If you want to install this in your debian machine just run the following command
#apt-get install viewcvs
cvsweb
a CGI interface to your CVS repository
cvsweb is a WWW CGI script that provides remote access to your CVS repository. It allows browsing of the full tree, with configurable access controls. It will display the revision history of a file, as well as produce diffs between revisions and allow downloading any revision of the whole file.
If you want to install this in your debian machine just run the following command
#apt-get install cvsweb
'Computing > Programming' 카테고리의 다른 글
| 이클립스 설치... (0) | 2009/03/09 |
|---|---|
| 제 9 회 한국 자바 개발자 컨퍼런스 안내 (0) | 2008/02/11 |
| TIOBE Programming Community Index for July 2007 (0) | 2007/07/09 |
| Using CVS on Debian GNU/Linux (0) | 2007/03/15 |
| 이클립스(Eclipse)에서 유용한 단축키 일람 (0) | 2007/02/08 |
| 'Referenced files contains errors j2ee_web_services_client_1_1.xsd' Error fix (0) | 2007/02/07 |
댓글을 달아 주세요