Install CVS in Ubuntu

Source: Internet
Author: User

[Personal Experience: basically, follow the steps below. Of course, some of them have been modified and should not be copied]

[Transferred from: http://www.emptykid.com/blog/archives/93]

Install CVS server

$ Sudo apt-Get install CVS

$ Sudo apt-Get install CVSD

During the installation of CVSD, you will be asked to enter the repository location, that is, the repository name. Here, the default myrepos is used as an example. Enter myrepos to confirm

 

Configuration

Create a repository directory

 

$ CD/var/lib/CVSD

$ Sudo mkdir myrepos

Initialize a repository

 

$ Sudo CVS-D/var/lib/CVSD/myrepos init

Set the user authentication method for CVS

 

$ Sudo gedit/var/lib/CVSD/myrepos/cvsroot/config

Add the following content:

 

Systemauth = No

Pamauth = No

Lockdir =/tmp/myrepos

Here,/tmp/myrepso is not the absolute address of the system/tmp, but relative to/var/lib/CVSD/path. Next, create this directory.

 

$ Sudo mkdir/var/lib/CVSD/tmp/myrepos

Add User

 

$ Sudo CVSD-passwd/var/lib/CVSD/myrepos cvsuser

This cvsuser is just a user name and can be set to others. You need to configure CVSD. conf for this name during logon.

 

$ Sudo VI/etc/CVSD. conf

Check the location

 

Rootjail/var/lib/CVSD

Repos/myrepos

Listen * 2401

Set Directory Permissions

 

$ Sudo chown CVSD: CVSD/var/lib/CVSD-R

Restart

 

$ Sudo/etc/init. d/CVSD restart

# Sudo netstat-L | grep cvspserver. If the output is similar to TCP 0 0 *: cvspserver *: * Listen, the instance is successfully started.

 

First use

Login

$ CVS-D: pserver: cvsuser@127.0.0.1:/myrepos Login

We recommend that you set CVSD here. the listen * 2401 in conf is directly changed to listen 127.0.0.1 2401, and the user name must be the one you just created. Many websites use CVSD for logon, I tried always fail to log on. [This is the original article of the author. I tried to refused the connection at the time. I read another article and changed * In listen * 2401 in conf: 0.0.0.0, try again, OK]

 

Configure and use this CVS server in eclipse or other CVS clients.

Connection Type: pserver

HOST: Your IP

Port: 8080

Repository path:/myrepos

User: cvsuser

Set cvsroot

$ VI. bashrc

Add export cvsroot =/var/lib/CVSD

$ Source. bashrc

Import Module

 

$ CVS import-M "Import MSG" project_name vendor_tag release_tag

Porject_name is the name of your module, and the following two are the developer tag and the release tag. You can enter either of them and then you can checkout it after the import is successful.

 

$ CVS Co project_name

 

 

The following describes the main operations used in this development process.

[Transferred from: http://liuskysun.blog.163.com/blog/static/99812978201102442025741 /]

For a new project, you must first set eclipse to connect to the CVS server. The first connection will be synchronized with the server (synchronize ).

 

First, right-click a project in the eclipse resource view or Java view and select team and share project. A Prompt window is displayed, select whether to use a known CVS database location or create a database location. For the first connection to the CVS server, you must first define the server parameters and paths, user names, and passwords required for the connection. These parameters will be saved. If you need to reconnect, you can directly use the known CVS database settings.

Here we choose to create a new database location to go to the next input screen.

 

Here, you can enter localhost for the host name (not in Windows NT 4), because our CVS server is on the local machine.

 

Enter/MyreposSet the project data to be stored in the root path of the database.

 

Enter the user name and password.

 

Select pserver as the connection type. The port is the default and does not need to be changed. Of course, if you have modified the port used by the CVS server, it must be consistent here.

Click Finish to complete the settings. If you click Next, you can continue to define whether to use a name different from the project name as the module name in CVS. By default, the same name is used.

 

Now we have completed the connection between the project and the CVS server, and the project has been synchronized with the CVS server.

 

However, this does not mean that CVS has started to record version information. Because a project may have a considerable number of resource files that are not suitable for storing in the database to record version information, such as temporary files generated by the editor, compiled and generated. class file, or some binary files generated during the compilation process. Therefore, eclipse does not automatically store all files in the database. You need to manually specify the files to be stored in the database, that is, add version control to add version control. For a single file, you can right-click the file in the resource view or Java view at any time, select team, and add
To version control. To store the entire project or specify multiple files at the same time, use the synchronization view.

 

Note that after the project is connected to the CVS server and synchronized, A synchronize window is displayed at the tasks and console locations in the right-hand corner of eclipse. the status bar below also displays the status information of this synchronization. Double-click the title bar of the synchronize window to maximize it. We can see that the upper part of the window lists all the resources and files that have not been specified to join the database. Here we can select multiple files at the same time, or even select the entire project, right-click, select team, add to version control, and add multiple files or the entire project to the database, start to record the version information.

 

We can see that the synchronization view is marked in outgoing mode. The synchronize view has the incoming and outgoing modes, which correspond to the commit and update operations, indicating whether the current modification is from the local server or from the server. Of course, the view can also display changes in the incoming and outgoing directions. When there is a change, the comparison window in the lower half shows the differences and changes between different versions. Further, you can use the merge operation on the toolbar to eliminate conflicts caused by different modifications to the same file.

 

After that, when modifying a file or project, you need to confirm the modification and store the latest status in the database, you need to perform the commit operation. Similarly, we can right-click a file in the resource view or Java view, select team or commit, or in the synchronization (synchronize) view. Note that a comment is prompted every time you submit a submission. This is very important as a description and prompt for each status.

 

When we need to compare or replace different versions of a file or project, we can right-click a file in the resource view or Java view, select Team, compare with or team, and replace. During the comparison, a comparison editor is opened, which indicates the differences between different versions, similar to local history.

 

To learn about the content of the CVS database, you can use the CVS Repository browsing ing perspective view ). You can click the open perspective button in the upper left corner of eclipse to add this view to the view browsing bar on the left. As mentioned above, head represents the mainstream content in the CVS database. Expand versions to see previous versions. In addition, there is a database history in the lower right corner to indicate the relevant information for each modification.

 

To export a version, you must use the check out operation. Right-click a version and choose check out as project. This will export the version to a project with the same name, so that the existing status can be overwritten, or select the check out dialog box to export it as another project.

[Personal Experience: basically, follow the steps below. Of course, some of them have been modified and should not be copied]

[Transferred from: http://www.emptykid.com/blog/archives/93]

Install CVS server

$ Sudo apt-Get install CVS

$ Sudo apt-Get install CVSD

During the installation of CVSD, you will be asked to enter the repository location, that is, the repository name. Here, the default myrepos is used as an example. Enter myrepos to confirm

 

Configuration

Create a repository directory

 

$ CD/var/lib/CVSD

$ Sudo mkdir myrepos

Initialize a repository

 

$ Sudo CVS-D/var/lib/CVSD/myrepos init

Set the user authentication method for CVS

 

$ Sudo gedit/var/lib/CVSD/myrepos/cvsroot/config

Add the following content:

 

Systemauth = No

Pamauth = No

Lockdir =/tmp/myrepos

Here,/tmp/myrepso is not the absolute address of the system/tmp, but relative to/var/lib/CVSD/path. Next, create this directory.

 

$ Sudo mkdir/var/lib/CVSD/tmp/myrepos

Add User

 

$ Sudo CVSD-passwd/var/lib/CVSD/myrepos cvsuser

This cvsuser is just a user name and can be set to others. You need to configure CVSD. conf for this name during logon.

 

$ Sudo VI/etc/CVSD. conf

Check the location

 

Rootjail/var/lib/CVSD

Repos/myrepos

Listen * 2401

Set Directory Permissions

 

$ Sudo chown CVSD: CVSD/var/lib/CVSD-R

Restart

 

$ Sudo/etc/init. d/CVSD restart

# Sudo netstat-L | grep cvspserver. If the output is similar to TCP 0 0 *: cvspserver *: * Listen, the instance is successfully started.

 

First use

Login

$ CVS-D: pserver: cvsuser@127.0.0.1:/myrepos Login

We recommend that you set CVSD here. the listen * 2401 in conf is directly changed to listen 127.0.0.1 2401, and the user name must be the one you just created. Many websites use CVSD for logon, I tried always fail to log on. [This is the original article of the author. I tried to refused the connection at the time. I read another article and changed * In listen * 2401 in conf: 0.0.0.0, try again, OK]

 

Configure and use this CVS server in eclipse or other CVS clients.

Connection Type: pserver

HOST: Your IP

Port: 8080

Repository path:/myrepos

User: cvsuser

Set cvsroot

$ VI. bashrc

Add export cvsroot =/var/lib/CVSD

$ Source. bashrc

Import Module

 

$ CVS import-M "Import MSG" project_name vendor_tag release_tag

Porject_name is the name of your module, and the following two are the developer tag and the release tag. You can enter either of them and then you can checkout it after the import is successful.

 

$ CVS Co project_name

 

 

The following describes the main operations used in this development process.

[Transferred from: http://liuskysun.blog.163.com/blog/static/99812978201102442025741 /]

For a new project, you must first set eclipse to connect to the CVS server. The first connection will be synchronized with the server (synchronize ).

 

First, right-click a project in the eclipse resource view or Java view and select team and share project. A Prompt window is displayed, select whether to use a known CVS database location or create a database location. For the first connection to the CVS server, you must first define the server parameters and paths, user names, and passwords required for the connection. These parameters will be saved. If you need to reconnect, you can directly use the known CVS database settings.

Here we choose to create a new database location to go to the next input screen.

 

Here, you can enter localhost for the host name (not in Windows NT 4), because our CVS server is on the local machine.

 

Enter/MyreposSet the project data to be stored in the root path of the database.

 

Enter the user name and password.

 

Select pserver as the connection type. The port is the default and does not need to be changed. Of course, if you have modified the port used by the CVS server, it must be consistent here.

Click Finish to complete the settings. If you click Next, you can continue to define whether to use a name different from the project name as the module name in CVS. By default, the same name is used.

 

Now we have completed the connection between the project and the CVS server, and the project has been synchronized with the CVS server.

 

However, this does not mean that CVS has started to record version information. Because a project may have a considerable number of resource files that are not suitable for storing in the database to record version information, such as temporary files generated by the editor, compiled and generated. class file, or some binary files generated during the compilation process. Therefore, eclipse does not automatically store all files in the database. You need to manually specify the files to be stored in the database, that is, add version control to add version control. For a single file, you can right-click the file in the resource view or Java view at any time, select team, and add
To version control. To store the entire project or specify multiple files at the same time, use the synchronization view.

 

Note that after the project is connected to the CVS server and synchronized, A synchronize window is displayed at the tasks and console locations in the right-hand corner of eclipse. the status bar below also displays the status information of this synchronization. Double-click the title bar of the synchronize window to maximize it. We can see that the upper part of the window lists all the resources and files that have not been specified to join the database. Here we can select multiple files at the same time, or even select the entire project, right-click, select team, add to version control, and add multiple files or the entire project to the database, start to record the version information.

 

We can see that the synchronization view is marked in outgoing mode. The synchronize view has the incoming and outgoing modes, which correspond to the commit and update operations, indicating whether the current modification is from the local server or from the server. Of course, the view can also display changes in the incoming and outgoing directions. When there is a change, the comparison window in the lower half shows the differences and changes between different versions. Further, you can use the merge operation on the toolbar to eliminate conflicts caused by different modifications to the same file.

 

After that, when modifying a file or project, you need to confirm the modification and store the latest status in the database, you need to perform the commit operation. Similarly, we can right-click a file in the resource view or Java view, select team or commit, or in the synchronization (synchronize) view. Note that a comment is prompted every time you submit a submission. This is very important as a description and prompt for each status.

 

When we need to compare or replace different versions of a file or project, we can right-click a file in the resource view or Java view, select Team, compare with or team, and replace. During the comparison, a comparison editor is opened, which indicates the differences between different versions, similar to local history.

 

To learn about the content of the CVS database, you can use the CVS Repository browsing ing perspective view ). You can click the open perspective button in the upper left corner of eclipse to add this view to the view browsing bar on the left. As mentioned above, head represents the mainstream content in the CVS database. Expand versions to see previous versions. In addition, there is a database history in the lower right corner to indicate the relevant information for each modification.

 

To export a version, you must use the check out operation. Right-click a version and choose check out as project. This will export the version to a project with the same name, so that the existing status can be overwritten, or select the check out dialog box to export it as another project.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.