Installation svn
yum -y install subversion
Create a directory liuyuanshan
mkdir -p /var/svn/liuyuanshan
Creating yzmedu warehouse
svnadmin create /var/svn/liuyuanshan
Configuration changes
Under already created repository directory
cd /var/svn/liuyuanshan/conf
conf directory, a total of three storage of important configuration files, as follows:
authz: responsible for account management privileges, control whether the account read and write permissions
passwd: responsible for account and password of the user list management
svnserve.conf: svn server configuration file
- Edit authz file (note: [/] is a must)
vi authz
[/]
liuyuanshan=rw
[/]: Represents the root directory, i.e., / var / the svn / liuyuanshan
liuyuanshan = RW: indicates that the user has read and write rights to liuyuanshan root
-
Edit passwd file
as shown above, the user name: liuyuanshan, authentication password: 123 -
Svnserve.conf edit files (Note: The preceding configuration can not have spaces, must be the top grid write)
anon-Access = none: express prohibition of anonymous user access.
auth-access = write: indicates authorized users have read and write permissions.
password-db = passswd: Specifies the user name password file, namely passwd file.
authz-db = authz: assign a rights profile that authz file.
realm = / var / svn / liuyuanshan : Specifies the authentication domain, i.e., / var / svn / liuyuanshan directory.
Start SVN repository / var / svn / liuyuanshan
Enable liuyuasnhan warehouse and view enabled
svnserve -dr /var/svn/liuyuanshan
ps -ef | grep 'svnserve'
SVN Process Viewer and open ports
Remember this time in the open Tencent Ali clouds or cloud SVN default port 3690
pstree |grep svn
netstat -tunpl |grep svn
SVN detection
Game Hook, setting m m warehouse to submit updates to the site root hook script
- The detection liuyuanshan warehouse version in wechat web directory
cd /usr/local/nginx/html/bbs/wechat
svn co svn://111.231.66.101 ./
The successful detection
The liuyuanshan warehouse sync files to the web directory
cd /var/svn/liuyuanshan/hooks
cp post-commit.tmpl post-commit
chmod a+x post-commit
Copy the script, and give read-write permissions to perform
editing post-commit script file
vi post-commit
export LANG=en_US.UTF-8
svn up --non-interactive --username liuyuanshan --password 123 '/usr/local/nginx/html/bbs/wechat'