Use VisualSVN to set up the SVN server on the Windows system, and combine it with intranet penetration to achieve public network access

Preface

SVN is the abbreviation of subversion. It is an open source version control system. Through the efficient management of branch management system, multiple people can jointly develop the same project, realize shared resources, and achieve final centralized management. As a general-purpose system, Subversion can be used to manage any type of file, including program source code.

SVN, like CVS, is also a cross-platform software and supports most common operating systems. This tutorial mainly introduces the installation and configuration process of SVN server on Windows platform. And how to combine the cpolar intranet penetration tool to achieve remote access to intranet local services from the public network anytime and anywhere.

1. VisualSVN installation and configuration

First, go to the official website of SVN: https://www.visualsvn.com/downloads/ to download the server installation program:

image-20230926143820244

After downloading the installation program, double-click to enter the installation configuration interface, and click Nextto proceed to the next step:

1695710420599

Check the I accept checkbox and click Nextto proceed to the next step:

1695710606246

The default is currently selected, click Nextto proceed to the next step:

1695710653508

There are four options in this interface. In addition to the port, the other three options can be clicked Browseto modify the path:

Location: The installation location of the software. Be careful not to include Chinese characters, spaces or special characters.

Repositories: Default version warehouse location, choose it yourself.

Server Port: Port number, either 443 or 8443.

Backups: Backup file saving path.

1695711353780

I chose the default path and port here, click Nextto proceed to the next step:

1695711605782

Uncheck, click Nextto proceed to the next step:

1695711680382

Default to the first option, click Nextto proceed to the next step:

1695711743763

Click Installto install:

1695711892115

After the installation progress bar runs out, click Finishto complete the installation.

2. VisualSVN Server management interface configuration

After clicking Finsih, the SVN Server management interface will pop up. Click the button in the navigation above 操作and click in the options.Properties

1695712428391

In the window that opens:

First click on the third item on the left:Network

Then click the Server namelower selection box on the right and enter the server name. I chose to fill it in here localhost. You can also fill in the IP of the local LAN.

Service port default selection: 80

Then uncheck the Use secure connection below and click OK below.

image-20230926151747661

Then click under the SVN service on the left Users, right-click and select New user

1695713019078

Set the username and password in the pop-up window, confirm the password, and click OK

I have chosen the username here adminand the password 123456. You can set it yourself.

1695713289959

Because setting a simple password will display the pop-up window shown below, prompting that the password does not meet the length or complexity requirements, this tutorial is only for demonstration, so here I choose to click to continue setting this password option.

1695713511696

After creating the new user, we click under the SVN service on the left Repositories, right-click and select New Repository(Project), and click Nextto proceed to the next step:

1695713876785

Fill in the project name, I filled it in here 共享文件, you can customize it, click Nextto go to the next step:

1695713970790

The default selection is enough, click Nextto proceed to the next step:

1695714105340

The default selection is enough, click Nextto proceed to the next step:

1695714147950

Check the option by default and click to Createstart creating:

1695714217070

Click Finishto complete project creation

1695714315998

At this point, enter the user name and password localhostyou just configured in the SVN service in the pop-up window , and click Login.admin123456

1695715162300

After logging in, you can see the project just created in SVN on the local area network:共享文件

1695715327999

3. Install cpolar intranet penetration

At this time, VisualSVN Server has been successfully logged in and running, but it can only be accessed locally. If we plan to access the VisualSVN service on the intranet at any time in the public network environment, we need to install the cpolar intranet penetration tool to achieve this.

3.1 Register an account

Enter cpolar official website: https://www.cpolar.com/

Click on the upper right corner 免费注册, use your email to register a cpolar account for free and log in

20221117173301

3.2 Download cpolar client

After successfully logging in, click to download cpolar locally and install it (you can install it by default all the way). In this tutorial, you choose to download the Windows version.

20221117173307

3.3 Log in to the cpolar web ui management interface

Access 127.0.0.1:9200 on the browser and use the registered cpolar email account to log in to the cpolar web ui management interface (default is local port 9200)

20221117173316

3.4 Create a public network address

隧道管理After successfully logging in and entering the main interface, we click - on the left dashboard 隧道列表, and then click 创建隧道.

1695718676197

  • Tunnel name: The name can be customized and cannot be repeated with the existing tunnel name. I filled it in here.svn

  • Protocol: Selecthttp

  • Local address:80

  • Domain name type: Free package selection随机域名

  • area:China Top

Click创建

1695719361633

At this time, click 状态on 在线隧道列表the left, you can see the svn tunnel you just created. Two public network addresses are generated. There are two access methods, namely http and https. Copy an address at will and open it in a public network computer browser. That’s it, as shown in the figure below, it means that the public network has successfully accessed the VisualSVN Server of the local intranet.

image-20230926171550179

4. Fixed public network address access

It should be noted that this tutorial uses a random temporary address on the public network generated by free cpolar. This address will change within 24 hours. For users who need to use VisualSVN Server in an external network environment for a long time, configure a fixed address. It's very necessary.

Therefore, we can configure a second-level subdomain name for it. This address is a fixed address and will not change randomly [ps: cpolar.cn has been filed]

Note that you need to upgrade the cpolar package to a basic package or above, and the bandwidth corresponding to each package is different. [cpolar.cn has been registered]

Log in to the cpolar official website, click Reserve on the left, select to reserve the second-level subdomain name, set a second-level subdomain name, click, and copy the 保留reserved second-level subdomain name after the reservation is successful.

1695721287104

Take this tutorial as an example, select the region China VIP, fill in the second-level domain name mysvn, fill in the description svntest, and click 保留.

1695721584218

After the reservation is successful, copy the reserved second-level subdomain name address, log in to the cpolar web UI management interface, click - on the left dashboard 隧道管理, 隧道列表find the tunnel to be configured: mysvn, and click on the right编辑

1695722097556

Modify the tunnel information and configure the successfully reserved second-level subdomain name into the tunnel.

  • Domain name type: Select二级子域名
  • Sub Domain: Fill in the successfully reserved second-level subdomain namemysvn
  • Region: SelectChina VIP

Click更新

1695722164012

After the update is completed, open it 在线隧道列表. At this time, you can see that the public network address has changed, and the address name has also become a reserved and fixed second-level subdomain name.

1695722230101

Finally, we use a fixed public network address for connection access, copy the second-level subdomain name: http://mysvn.vip.cpolar.cn and open it in the browser of another public network computer. There is no error or connection exception. Enter the user name. After passing the password, you can see that the connection is successful. In this way, a fixed address access is set up. You can use this domain name to access the intranet VisualSVN Server from the public network anytime and anywhere.

image-20230926175819144

Reprinted from cpolar pole cloud article: Building VisualSVN service on Windows system combined with intranet penetration to achieve public network access

Guess you like

Origin blog.csdn.net/ljq_up/article/details/133988911