In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
I. introduction of code management platform
Version control, recording changes in the contents of several documents for future review of specific version revisions
A brief history of version management tools, CVS → SVN → Git
CVS: compatibility is not very good.
SVN: too slow. Full name: Subversion, an open source version control system, began in 2000.
Launched by linus, founder of Git:Linux, and released in 2005, the original goal was to better manage Linux kernel code.
Git differs from SVN in that Git does not rely on the server to work, that is, Git is distributed.
For a comparison between Git and SVN, refer to http://blog.lishiming.net/?p=305
The main difference between SVN and Git is distribution.
SVN advantages:
1. Storage
SVN server not only has the advantages of data storage that CVS has, data is generally not lost, but also has its own characteristics. Through relational database and binary storage, SVN solves the problem of not being able to read and write the same file at the same time, and adds its own unique "zero or one" principle.
two。 Speed
Compared with the initial CVS, SVN has a great improvement in speed. Because the SVN server only supports a small amount of information and resource transmission, compared with other systems, it supports offline mode, so it avoids the emergence of network congestion.
3. Security.
SVN is a more technologically secure product that combines system and control. On the one hand, the security function of the whole system can be effectively distributed in the branch system, so as to ensure the normal operation of the branch system, so that each branch system can complement each other, and finally the overall security of the system can be guaranteed. Through the principle of balance to achieve the ultimate goal of security.
Advantages and disadvantages of Git:
Advantages:
Suitable for distributed development, emphasizing individuals.
The pressure on public servers and the amount of data will not be too large.
Fast and flexible.
Conflicts can be easily resolved between any two developers.
Work offline.
Disadvantages:
There is little information (at least in Chinese).
The learning cycle is relatively long.
It's not in line with conventional thinking.
Code confidentiality is poor, once developers have cloned the entire library, they can fully disclose all code and version information.
GitHub is an online web page code hosting platform based on Git, and you can choose to pay for it.
Gitlab can be thought of as an open source GitHub, and there is no direct connection between the two.
In a word, git is a management tool, and github is an online git-based platform (or service). Like github, gitlab is also a git-based code management platform that provides web interface.
Second, install SVN
# yum install-y subversion
Create a version library
# mkdir-p / data/svnroot/myproject / / this directory path is customizable
# svnadmin create / data/svnroot/myproject / / initialize some files in this directory
# cd! $/ conf # authz is the permission configuration file, passwd is the password file, and svnserve.conf is the configuration file of the SVN repository.
The new content of # vim authz / / configuration file is as follows: [groups] admins = aming,user1 / / add to the user group below [/] @ admins = rw / / @ followed by the group name * = r / / everyone except the admins group has read-only permission. [myproject:/] user1 = rw# myproject refers to the project name, which is suitable for cases where / data/svnroot/ has multiple projects, which is just one of them. # A colon refers to a project name. There is only one project here, under which you can create a subdirectory dir1,dir2. Can be written in the form of [/ dir1], [/ dir2]. # just two different forms of expression. One is [/ dir1], the other is [myproject:/], one meaning. Because there's only one project here.
Aliases: alias
Groups: user group
[/]: refers to the directory / data/svnroot/myproject.
The directories in the warehouse or the directories in the project, and the read and write permissions for users and groups configured for these projects:
[/ foo/bar]
[repository:/baz/fuz]
Add [users] aming = amalgamation! (* $123 # # users on the left and password on the right) under # vim passwd / / [users]. User1 = user1_ ^ ^ 123user2 = user2-***123# vim svnserve.conf [general] # # add these five lines below anon-access = none # # anonymous user, no permission auth-access = write # # authorized user, have write permission password-db = passwd # # user password storage location authz-db = authz # # permission control file location, here only write a string, indicating that the string is a file name The location is in the current directory, relative to the path to svnserve.conf. Realm = / data/svnroot/myproject # # indicates which project is effective, the absolute path. # svnserve-d-r / data/svnroot/ starts SVN,-d:deamon in the form of background startup;-r: specify the path where the SVN is located; you can also follow the project name. # ps aux | grep svnroot 1621 0.00.0 162200? Ss 19:53 0:00 svnserve-d-r / data/svnroot/root 1623 0.0 112676 984 pts/0 S + 19:53 0:00 grep-- color=auto svn# netstat-lntp | grep svntcp 00 0.0.0.0 grep 3690 0.0.0.0 data/svnroot/root * LISTEN 1621/svnserve# iptables-nvL / / check for firewall rules If so, the follow-up operation will not be very smooth.
Third, use SVN (Linux) on the client
# yum install-y subversion / / installed on another machine, and after installation, you can use the svn command. # mkdir svntest# cd! $# svn checkout svn://192.168.93.130/myproject-- username=aming / / checkout, check out the code. If you go to a machine and have never connected to a svn server, after performing this step, it can save the user name and password of a svnserve that you have connected to. The above command can get the myproject project on the remote server locally. Authentication field: password of / data/svnroot/myproject "aming": Aminghammer! (* $123 / / the password here is the password set in the configuration file-pay attention! Your password, for authentication domain: / data/svnroot/myproject can only be saved in clear text on disk! If possible, consider configuring your system so that Subversion can save encrypted passwords. Refer to the documentation for more information. You can avoid this warning again by setting the option "store-plaintext-passwords" to "yes" or "no" in "/ root/.subversion/servers". -save the unencrypted password (yes/no)? yes/ / store the password under / root/.subversion/servers and take out version 0. [root@MRX svntest] # lsmyproject# cd project Total amount of ls-la 0drwxr-xr-x 3 root root 18 August 29 18:43. Drwxr-xr-x 3 root root 23 August 29 18:43.. drwxr-xr-x 4 root root 75 August 29 18:43 .SVN [root@MRX myproject] # cp / etc/fstab. # svn add. / fstab / / add to the version control center Make a mark A fstab# svn commit-m "add file" / / upload the file to the server for the changes you want to get to the server. Add first, then upload. # svn commit-m "add fstab" is adding fstab to transfer file data. The submitted version is 1. # svn delete filename / / deleting # svn commit-m "delete filename" locally / / deleting [root@MRX myproject] # svn delete fstab D fstab [root@MRX myproject] # svn commit-m "delete fstab" on the server is deleting version 2 after fstab submission. # svn update / / updates all the files in the current directory to the latest version and synchronizes the local files with the server. # svn log / / check the password file under the change log / root/.subversion/auth/svn.simple. If a user doesn't want to store it, he can delete it.
4. Use SVN (windows) on the client
The official website https://tortoisesvn.net/index.zh.html
Download TortoiseSVN and install
Concise tutorial http://www.jianshu.com/p/6b3b7b915332
After downloading, randomly select a folder, such as create a new myproject, right-click the folder to see SVN Checkout and TortoiseSVN.
When you use it for the first time, you also need to SVN checkout first. After clicking, a window will pop up. Define the service address and project address in the top URL of repository and click OK: svn://192.168.93.130/myproject.
Define the user name and password after clicking OK:
Aming, Aminghammer! (* $123
Click OK again.
Test:
Create an txt document in Windows's myproject directory and write a little bit about it. Then right-click the document, and the same operation on Linux, TortoiseSVN → add, then right-click SVN commit, enter add 123.txt in the blank box above, and then click OK on it.
Then synchronize the svn update on the server or another client, and you can see the 123.txt.
Write a document on Linux, do the same thing, and then right-click SVN update on Windows, you can also see this 111.txt.
# svn add 111.txtA 111.txt [root@MRX myproject] # svn commit-m "add 111.txt" is adding 111.txt to transfer file data. The submitted version is 4.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.