[Installation + configuration] Mac server svn

Second, the server

A search for mac svn is all about this! ! ! too much

The Mac system already comes with svn, we no longer need to install the svn server, and we can start our svn server with a few simple configuration steps.

1. Open the terminal and use the following command to confirm that svnserve has indeed been installed on our Mac OS system.

The above is the built-in mac hundreds of years ago (bushi)

Now. .

reinstall it

reference:

Treasure Tutorial! ! !

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

1. Download

image-20211119224309630

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 installation of Command Line Tools for Xcode is complete

image-20211120111834625

Now you can finally start installing svn

The current time is 1120

image-20211120112051679

da big impression event! !

image-20211120113022944

Finally something new

Subversion finally saw him downloading!

1130

ten minutes dare not think

See how many dependencies are 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!

image-20211120124419484

Reference article: Download svn

**2、**Configuration

Here you can be healthy [4, note] - Where is the simple configuration method

1), create svn directory

mkdir /Users/username/svn

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

image-20211120124959523

image-20211120124926189

2) Configure svn user permissions

The main thing is to 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)

[External link picture transfer failed, the source site may have an anti-theft link mechanism, it is recommended to save the picture and upload it directly (img-NUkLRkja-1639574316732)(/Users/liuxinny/Library/Application%2520Support/typora-user-images/image- 20211120125237060.png)]

image-20211120125423304

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

3) Configure passwd file, write user and password

image-20211120125838439

image-20211120125853091

Created two users,
the user user1 password is 1111,
the user user2 password is 2222

image-20211120130000665

4) Configure the authz file

image-20211120130032585

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

image-20211120130303595

### 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

image-20211120130357649

[groups]

user = user1,user2

Add uesr = user1, user2 under [groups] to indicate that two users have been created.
The left side of the equal sign is the group name, and the right side is the user name

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

@super = rw

@user = rw These two sentences mark the corresponding permissions for the users user group

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

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

@user = rw
indicates read and write permissions to the lib folder user group

5) Start the SVN server

svnserve -d -r /Users/username/svn
style runs as shown below

image-20211120130741186

We can also check in the activity monitor to see if it is successful or not. The picture below is what it looks like when it runs, and it looks okay. Come on guys, success is not far away. (Referring to a few articles, I guess it’s almost the same, anyway, I’m tossing myself)

image-20211120130845596

That's it first, set up the svn server environment.
Quote other ones first, and then optimize and organize them when you have time.

3. Some commands

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

Where -d means the daemon process, -r means to execute in the background
/home/data/svn/ is the installation directory of svn

  • Close SVN

This is handled by linux killing the process

ps -ef|grep svnserve

ps aux | grep svn  
sudo kill -9 44923 

image-20211215193258065

4. Simple new warehouse + configuration

1) Create a new svnadmin create

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

First cd to the root warehouse: mine is in "svnRepository"

image-20211215202610839

Then enter the command:

“svnadmin create svn_test_second”

Perform create where svn_test_second is the name of the warehouse

svnadmin create

image-20211215195404637

Then generate the following file

image-20211215195613905

2) Configure svnserve.conf

image-20211215195931722

open first

image-20211215200128390

Be careful not to leave spaces! ! [Otherwise, go haha]

image-20211215200220518

3) configure passwd

After configuring the passwd file is mainly to create a new user

image-20211215200416027

4) configure authz

image-20211215201044319

5) Start the server

After that you can start the server

Turn on:

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

svnserve -d -r 

Complete command line: [Delete the failed process in the middle]

(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下午 ??         0:00.00 svnserve -d -r svn_test_second
  501 68467 29262   0  8:14下午 ttys001    0:00.00 grep svnserve
(base) liuxinny@Xinny-MBP svnRepository % 

Note that if there are concurrently running warehouses under the root warehouse, it will cause failure

image-20211215201827885

Encountered failures:

Failed command line processing:

(base) liuxinny@Xinny-MBP svnRepository % svnserve -d -r svn_test_second 
svnserve: E000048: 不能绑定服务器套接字: Address already in use
(base) liuxinny@Xinny-MBP svnRepository % ps -ef|grep svnserve           
  501 50845     1   0  7:37下午 ??         0:00.01 svnserve -d -r /Users/liuxinny/svnRepository
  501 67741 29262   0  8:12下午 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下午 ttys001    0:00.00 grep svnserve

After that you can turn it back on

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: 不能绑定服务器套接字: Address already in use
(base) liuxinny@Xinny-MBP svnRepository % ps -ef|grep svnserve           
  501 50845     1   0  7:37下午 ??         0:00.01 svnserve -d -r /Users/liuxinny/svnRepository
  501 67741 29262   0  8:12下午 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下午 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下午 ??         0:00.00 svnserve -d -r svn_test_second
  501 68467 29262   0  8:14下午 ttys001    0:00.00 grep svnserve
(base) liuxinny@Xinny-MBP svnRepository % 

Link client
[installation + configuration] Mac — Cornerstone (there is another problem causing woo woo):
https://blog.csdn.net/CeciliaXinn/article/details/121962003

Guess you like

Origin blog.csdn.net/CeciliaXinn/article/details/121962100