In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Today, I would like to share with you the relevant knowledge points about how to use svn under centos6.5. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look.
Installation: yum install subversion-y. You can use rpm-ql subversion to view the installation directory of svn. By default, it is under / usr/bin directory.
Create a version library:
Mkdir / path/to/reposvnadmin create / path/to/repo
After the creation, there will be conf db format hooks locks readme.txt files (folders) in the directory.
Conf is the problem that the configuration file information is related to the login account, and hooks is the response event in which the hook file performs some client-side corresponding actions on the server side.
Configure user / development group information
Modify conf/passwd and append the string plaintext of username = passwd directly, where username is the user name that exists in linux.
Modify conf/svnserve.conf to comment out which exercises will take effect
Anon-access,auth-access,passwd-db,realm
Modify anon-access = none at the same time
In this way, the client can have the permission to read the log file, and it is convenient to view different versions of the submission log information.
Modify realm = / path/to/repo to specify the svn version library directory.
A simple configuration for personal development is completed here, using svnserve-d-r / path/to/repo
You can start the svn process and then use the client to connect to svn://ip:port/repo, where the default port is 3690
If you want to open multiple svn versions to another directory, you only need to repeat the above steps until you specify a different port number at startup
For example, use port 3691 to start a new svn version library: svnserve-d-- listen-port 3691-r / path/to/repo
So url is svn://ip:3691/repo when the client connects
Development group configuration
Multiple user develop code in the same group, and each user generates a version library of svn and points to the same code directory, which is tedious and does not conform to the specification.
At this point, the member group configuration of svn is used:
To modify the conf/authz file, edit:
# add development user group groupname1 [groups] groupname1= username1 [, username2,username3...] # add development group read and write permissions to the code directory [/ path/to/repo] @ groupname1= rw
The user of username1,username2 here needs to be a user that exists in linux, and the corresponding svn password has been specified in conf/passwd.
Here is the configuration of a group member, which has been tested to be ok.
Post-commit hook configuration
It can be roughly understood that the svn client transmits the modification information to the server in a certain format and saves it in a fixed format file.
When svn up, the information in these files will be validated into the code directory.
Sometimes we need to see the code update information in real time on the server, which uses the post-commit hook:
Trigger the server to / path/to/repo to execute svn up to update the file when the client commit
At the same time, the size of the log file is reduced to prevent the log loss after the server crashes.
Go to the svn version library configuration information directory
Cd hooks,cp post-commit.tmpl post-commit
Edit post-commit: comment out the last line, add
Export.utf-8/usr/bin/svn update-force / path/to/repo
At this point, the hook hook is configured. Restart the svn process, and you can see that the files are updated synchronously after the client commit.
These are all the contents of the article "how to use svn under centos6.5". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.