Configuration of the SV server in the MAC environment this document directory
• Create a code warehouse to store the code uploaded by the client
• Configure user permissions for SVN
• Three, using the SVN client function in a Windows environment, we typically use TORTOISESVN to build an SVN environment. In a Mac environment, because the Mac comes with SVN's server-side and client features, we can use SVN without any third-party software, but we need to do a simple configuration.
Let's start by looking at how to build an SVN server-side environment in a MAC environment.
First, create the code warehouse, used to store the code uploaded by the client I now create an SVN directory under the/users/liyuechun/desktop/, you can create multiple warehouse directories in the SVN directory, open the terminal, create a mycode warehouse
Library, enter the command:
Svnadmin create/users/liyuechun/desktop/svn/code The above command executes successfully, you will find that there is a
/users/liyuechun/desktop/svn/code, the directory structure is as follows:
Second, configure SVN permissions
Main changes three files in the Svn/code/conf directory 1. Open svnserve.conf, the # and spaces in front of the following configuration items
All removed
# anon-access = read# auth-access = Write
# password-db = passwd
# authz-db = Authz
Anon-access = Read on behalf of anonymous access, if you change to anon-access = None means anonymous access is forbidden, the account password is required to access
2. Open passwd and add the account and password under [users] [users]
Lyc=lyc123mars=mars123
The account number is LYC, the password is lyc1233. Open Authz, configure user groups and permissions
We can assign the users in the passwd to different user groups, later, you can set different permissions for different groups of users, there is no need to set permissions for each user individually.
Add a group name and user name under [groups], separated by commas (,) between multiple users [groups]
Topgroup=lyc,mars
Note that MJ and JJ belong to the Topgroup group, and then the permissions are configured.
Use [/] to represent all repositories in the SVN server [/]
@topgroup =RW
The above configuration instructions Topgroup all the users in this group have read and write (rw) permissions for all repositories, and the group name is preceded by the @
If it is a user name, do not add @, such as MJ This user has read and write permissions [/]
Lyc=rw
For other fine-grained permission controls, you can refer to other content in the Authz file
4. Start the SVN server before configuring so much, the most important thing is to see if the server can be started normally, if not to start, do more work in the front is futile.
Enter the following command at the terminal:
Svnserve-d-R/USERS/LIYUECHUN/DESKTOP/SVN or enter:
Svnserve-d-r/users/liyuechun/desktop/svn/code without any hint, it means the boot was successful.
5. Close the SVN server to find the activity indicator from inside the application, enter SVN in the upper right corner,
Such as
Double click on the running SVN server, a box will pop up and click Exit.
MAC, configure SVN