[install + configure] Mac server svn

Posted by phpcodec on Wed, 15 Dec 2021 21:10:45 +0100

2, Server

A search mac svn is all this!!! excessive

The Mac system has its own svn. We don't need to install the svn server anymore. We can start our svn server in a few simple steps.

1. Open terminal and use the following command to make sure that svnserve is installed on our Mac OS system.

The above is from the mac hundreds of years ago

Now?

Reinstall it

reference resources:

Treasure tutorial!!!

https://blog.csdn.net/u011516972/article/details/106520583/

1. Download

Your CLT does not support macOS 11.2.
It is either outdated or was modified.
Please update your CLT or delete it if no updates are available.

Your CLT does not support macOS 11.2. It is either outdated or was modified.

! Finally, the Command Line Tools for Xcode installation is complete

Now you can finally start installing svn

It's 1120

da big moving event!!

Something new has finally emerged

subversion finally saw him downloading!

1130

I dare not think for ten minutes

See how many dependencies have been downloaded

==> Downloading https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/5bdbf3b3fdadaf72744884b98b74a2ff887bd63a20b246f811a222a146ad7b64--pkg-config-0.29.2.tar.gz
==> Downloading https://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/c6e5196e3cea2a139cb849d508032f117c6351da5fe84323dc13ad2a0600264a--gdbm-1.18.1.tar.gz
==> Downloading https://www.openssl.org/source/openssl-1.1.1h.tar.gz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/074582038ae735e83b4ab0ea44ac5b654fa5502b7aadbcb01237403ac0878ceb--openssl-1.1.1h.tar.gz
==> Downloading https://ftp.gnu.org/gnu/readline/readline-8.0-patches/readline80
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/47beb8acfca2f2c1f4c481f864e786627a8ba6e0dbdd0fc87a9d2bee461681c7--readline80-001
==> Downloading https://ftp.gnu.org/gnu/readline/readline-8.0-patches/readline80
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/c00dd25d193a8318f8c1387f51f4e497634b1392278fc65dbf14bb388199baef--readline80-002
==> Downloading https://ftp.gnu.org/gnu/readline/readline-8.0-patches/readline80
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/1c985b03f188d6b79dae2b15fbe1aa25b76a01503c2d9ccaf78900e9fdd395d9--readline80-003
==> Downloading https://ftp.gnu.org/gnu/readline/readline-8.0-patches/readline80
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/d362e6fd90dbb0314fa033ad3424721460f0b8b067309f035368b13d4a123399--readline80-004
==> Downloading https://ftp.gnu.org/gnu/readline/readline-8.0.tar.gz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/2dd06cc6b778b6977a66d7986a2c0e71e557ff460a093af91f0f77a60d4e6d14--readline-8.0.tar.gz
==> Downloading https://www.sqlite.org/2020/sqlite-autoconf-3330000.tar.gz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/5e52b8b0330f34548b7eecfdac41259cbbf426fc52aba671aed35c19feebc11d--sqlite-autoconf-3330000.tar.gz
==> Downloading https://downloads.sourceforge.net/project/lzmautils/xz-5.2.5.tar
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/a13e2dce533a3dcb05b2f1b86fc45eac1f6ebf737b54ef7d3089994649d28aa8--xz-5.2.5.tar.gz
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/33a9d
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/573dcefa80443b028c1a54ab98b23a130bbef9e8a696e6682d2ff29dbcfdcb18--arm64-3.9.patch
==> Downloading https://files.pythonhosted.org/packages/a7/e0/30642b9c2df516506d
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/6c4cd84935cccfee61e433509bdda7951ea6b77ae5db203b1e708eea72d93603--setuptools-50.3.2.zip
==> Downloading https://files.pythonhosted.org/packages/0b/f5/be8e741434a4bf4ce5
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/8420c2f6f4c2831dfbd1b0e1caa05c0c044729c31b52f8884a785a56038ad0e7--pip-20.2.4.tar.gz
==> Downloading https://files.pythonhosted.org/packages/83/72/611c121b6bd15479cb
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/1aa1a9563d6af09f2712c180679dfd512aac6c710fc3fb573175e88eaa7c6de3--wheel-0.35.1.tar.gz
==> Downloading https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/d37370983bfa2dfe731256050c2097e61210550756783e4623a6eb9a8812b210--Python-3.9.0.tar.xz
==> Downloading https://files.pythonhosted.org/packages/06/8c/eb8a0ae49eba5be054
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/b4e86049c816dde47c7a914a6db0f94a5688cb385de88d3bb08edd041e561aa6--virtualenv-20.1.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/d46628d315f103ea527907020cf5f6c94365bbb549783f75a794526482afb672--appdirs-1.4.4.tar.gz
==> Downloading https://files.pythonhosted.org/packages/2f/83/1eba07997b8ba58d92
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/b25916e85753e80fccf86f2f1ba088b86d1a82c93cd36bdb72613c81cb830c55--distlib-0.3.1.zip
==> Downloading https://files.pythonhosted.org/packages/14/ec/6ee2168387ce015463
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/6132211d03cc3113b135a5b72510e3b6ea1df5bf527eb89d71c3f45085c252a7--filelock-3.0.12.tar.gz
==> Downloading https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f4
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/e99698a932bde9f5fb8ca552923ae339984f284e1c7764df95c12175f573c0d7--six-1.15.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/ae/a4/2eb8d05b0ac9e168e8
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/548ea9bb28f574e57c3b3c43c37fe5737235f2e9ff662a362713261fc7e67add--SCons-4.0.1.tar.gz
==> Downloading https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.bz2
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/26d6d64b1dd138a02838ae49167401caeec92d83115d0822fbee5fbe50139599--pcre-8.44.tar.bz2
==> Downloading https://downloads.sourceforge.net/project/swig/swig/swig-4.0.2/s
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/89a36233d09f4573b4852efcc11df24c023ab61977b369cd2a59a964df95e132--swig-4.0.2.tar.gz
==> Downloading https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/ff08930ce8165de0173c4a8704a407636908779978246b3116202642460aca15--autoconf-2.69.tar.gz
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/7e224
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/3021c1f03876b2598be79d79d0441ba47897b8630aaa0a178b39954049954715--r1871981-macos11.patch
==> Downloading https://www.apache.org/dyn/closer.lua?path=apr/apr-1.7.0.tar.bz2
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/7b3e7c99ad0ba155cf2a60bfeeef56370fd87270338a0ebd2037179525a857f5--apr-1.7.0.tar.bz2
==> Downloading https://www.apache.org/dyn/closer.lua?path=apr/apr-util-1.6.1.ta
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/4bb8e327136518d3e4e4fc8a1d18676f1ef6e9d79f30a7ea9ec9da3e93175907--apr-util-1.6.1.tar.bz2
==> Downloading https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.xz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/fbd8967fd8256b2e1856b74e8ff0f3d8371cb652c5768e47649613a69d4dc841--gettext-0.21.tar.xz
==> Downloading https://github.com/lz4/lz4/archive/v1.9.2.tar.gz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/b710308bcaa3667085fea6d812de16b56b5d96e0c5e4be0154d0434f5f465c93--lz4-1.9.2.tar.gz
==> Downloading https://github.com/JuliaStrings/utf8proc/archive/v2.5.0.tar.gz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/bf5771d72dd85249a3d851637471b1f1c4e9205eefaf0ecad31a79ef3964d5b1--v2.5.0.tar.gz
==> Downloading https://github.com/encukou/py3c/archive/v1.1.tar.gz
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/341faafd274c164961d080ffbaab85a010d9385563dc574212244e60297de7b8--v1.1.tar.gz
==> Downloading https://www.apache.org/dyn/closer.lua?path=serf/serf-1.3.9.tar.b
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/cfe7b56061b1bb57199b8b7a8782c47f1e318dbf2f6e108ce67c20f926be1df9--serf-1.3.9.tar.bz2
==> Downloading https://www.apache.org/dyn/closer.lua?path=subversion/subversion
Already downloaded: /Users/liuxinny/Library/Caches/Homebrew/downloads/98919580e649683a6ab6b81605c07393193a824df346bbb13e800952fef9f260--subversion-1.14.0.tar.bz2

Family

I finally installed it!

Reference article: Download svn

**2. * * configuration

Here you can Kangkang [4. Note] - where is the concise configuration method

1) , create svn directory

mkdir /Users / username / svn

Set the previously created folder as the code base of SVN and create svn repository
svnadmin create /Users / username / svn/repository

2) Configure user permissions for svn

Mainly modify the three files in the / svn/mycode/conf directory
Open svnserve Conf, remove the # and spaces in front of the following four configuration items (the spaces must be removed, otherwise it will fail)

[the external chain image transfer fails. The source station may have an anti-theft chain mechanism. It is recommended to save the image and upload it directly (img-nuklrkja-1639574316732) (/ users / liuxinny / library / application% 2520support / typera user images / image-20211120125237060. PNG)]

Modify the arrow above and remove it#
Where anon access = read means that anonymous access is read-only,
If it is changed to anon access = none, it means anonymous access is prohibited, and the account password is required to access
If you modify it, remember to modify the first arrow of anon access.

3) Configure passwd file, write user and password

Created two users,
User user1 password is 1111,
User user2 password is 2222

4) Configure authz file

Open authz and assign the users added in passwd to different user groups to facilitate the management of permissions.

### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
###  - a single user,
###  - a group of users defined in a special [groups] section,
###  - an alias defined in a special [aliases] section,
###  - all authenticated users, using the '$authenticated' token,
###  - only anonymous users, using the '$anonymous' token,
###  - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').

[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average

[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r

After modification

[groups]

user = user1,user2

Under [groups], add Uesr = user1 and user2 to indicate that two users have been created
To the left of the equal sign is the group name and to the right is the user name

Group permission configuration
Use [/] to represent all resource pools in the svn server
[/]

@super = rw

@user = rw these two sentences indicate the corresponding permissions of the users user group

Indicates the authorized directory path. Here is the root directory. If there is a directory called svnCode under the root directory, we should write it as [svnCode: /] if we want to edit the permissions of this directory

@uesr means to authorize a user group. If you want to authorize a user, you don't need to write the previous@
r means readable and w means writable.

@user = rw
Indicates that the user group of the lib folder has read and write permissions

5) Start SVN server

svnserve -d -r /Users / username / svn
The style operation is shown in the following figure

We can also check whether it is successful in the activity monitor. The following figure shows how it works and looks ok. Come on, boy, it's not far from success. (after referring to several articles, I guess it's almost the same. It's my own toss anyway)

First, set up the svn server environment.
Let's quote others, and then optimize them when you are free.

3. Some commands

  • Start SVN: sudo svnserve -d -r /home/data/svn/

Where - d represents the daemon and - r represents the execution in the background
/home/data/svn / is the installation directory of svn

  • Close SVN

linux kills the process here

ps -ef|grep svnserve

ps aux | grep svn  
sudo kill -9 44923 

4. Simple new warehouse + configuration

1) New svnadmin create

To create a new warehouse, you need to use the command line

cd to the root repository first: mine is in "svnRepository"

Then enter the command:

"svnadmin create svn_test_second"

create where svn_test_second is the warehouse name

svnadmin create

Then generate the following file

2) Configure svnserve conf

Open first

Be careful not to leave spaces!! [otherwise, ha ha, go to Ba]

3) Configure passwd

After that, the configuration of passwd file is mainly to create a new user

4) Configure authz

5) Start the server

Then you can start the server

On:

"(base) liuxinny@Xinny-MBP svnRepository % svnserve -d -r svn_test_second "

svnserve -d -r 

Complete command line: [delete intermediate failed processes]

(base) liuxinny@Xinny-MBP svnRepository % svnadmin create svn_test_second
(base) liuxinny@Xinny-MBP svnRepository % ls
boot-03		repository	svn_test_second	tip.md
(base) liuxinny@Xinny-MBP svnRepository % svnserve -d -r svn_test_second
(base) liuxinny@Xinny-MBP svnRepository % ps -ef|grep svnserve          
  501 68432     1   0  8:14 afternoon ??         0:00.00 svnserve -d -r svn_test_second
  501 68467 29262   0  8:14 afternoon ttys001    0:00.00 grep svnserve
(base) liuxinny@Xinny-MBP svnRepository % 

Note that if there is a warehouse running at the same time under the root warehouse, it will lead to failure

Failures encountered:

Failed command line processing:

(base) liuxinny@Xinny-MBP svnRepository % svnserve -d -r svn_test_second 
svnserve: E000048: Cannot bind server socket: Address already in use
(base) liuxinny@Xinny-MBP svnRepository % ps -ef|grep svnserve           
  501 50845     1   0  7:37 afternoon ??         0:00.01 svnserve -d -r /Users/liuxinny/svnRepository
  501 67741 29262   0  8:12 afternoon ttys001    0:00.00 grep svnserve
(base) liuxinny@Xinny-MBP svnRepository % kill -9 50845
(base) liuxinny@Xinny-MBP svnRepository % ps -ef|grep svnserve
  501 68315 29262   0  8:14 afternoon ttys001    0:00.00 grep svnserve

After that, it can be reopened

Here is the complete [failure + processing + success]

(base) liuxinny@Xinny-MBP svnRepository % svnadmin create svn_test_second
(base) liuxinny@Xinny-MBP svnRepository % ls
boot-03		repository	svn_test_second	tip.md
(base) liuxinny@Xinny-MBP svnRepository % svnserve -d -r svn_test_second 
svnserve: E000048: Cannot bind server socket: Address already in use
(base) liuxinny@Xinny-MBP svnRepository % ps -ef|grep svnserve           
  501 50845     1   0  7:37 afternoon ??         0:00.01 svnserve -d -r /Users/liuxinny/svnRepository
  501 67741 29262   0  8:12 afternoon ttys001    0:00.00 grep svnserve
(base) liuxinny@Xinny-MBP svnRepository % kill -9 50845
(base) liuxinny@Xinny-MBP svnRepository % ps -ef|grep svnserve
  501 68315 29262   0  8:14 afternoon ttys001    0:00.00 grep svnserve
(base) liuxinny@Xinny-MBP svnRepository % svnserve -d -r svn_test_second
(base) liuxinny@Xinny-MBP svnRepository % ps -ef|grep svnserve          
  501 68432     1   0  8:14 afternoon ??         0:00.00 svnserve -d -r svn_test_second
  501 68467 29262   0  8:14 afternoon ttys001    0:00.00 grep svnserve
(base) liuxinny@Xinny-MBP svnRepository % 

Link client
[install + configure] Mac Cornerstone
https://blog.csdn.net/CeciliaXinn/article/details/121962003

Topics: svn software testing server macOS