Website Service Management System WDCP Series Tutorial 14

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

After we have installed the website service Management system WDCP, in the use process may appear this or that kind of question, below gives everybody to arrange the time to come out, facilitates everybody to study. Also do not know the words, you can go to the Wdlinux forum to find relevant tutorials.

How to modify the interface or template of a WDCP system

WDCP from the 2 version, all templating, that is, you can modify the template to achieve modify the interface or page, but be sure to note the following two points:

1 must be applied according to the structure and label of the original template

2 must keep WDCP version and related connection

Template directory files in the templates directory, the complete directory is

/www/wdlinux/wdcp/templates

Modify method

1 Create a new directory in/WWW/WDLINUX/WDCP, such as Templates_me

Full directory is

/www/wdlinux/wdcp/templates_me

A newly designed page or template is placed in the directory to

But it has to be called by the structure and label of the original template.

2 Modify the upload, login background system settings, set the template directory for the above set of directories, as shown below

Save, refresh

Important

New page or template, you must retain the relevant version of Wdlinux and connection information, otherwise the consequences of the ego

If you need to remove, you can contact the authorization can be removed

2. Install SVN on the basis of WDCP one-click installation package and implement Nginx Web synchronization update

I. Installation

1. See if CVS are installed

Rpm-qa | grep subversion

2. Installation

Yum Install Subversion

3. Test Installation Success

/usr/bin/svnserve--version

If you are prompted with the following, you have successfully installed

--------------------------------------

Svnserve, Version 1.6.11 (r934486)

Compiled in Apr 11 2013,17:28:04

Copyright (C) 2000-2009 collabnet.

Subversion is open source software, see the http://subversion.tigris.org/site.

This product contains software developed by CollabNet (http://www.Collab.Net/).

The following version of the Library backend (FS) module is available:

* Fs_base: module can only operate BDB version library.

* FS_FS: module works with the text file (FSFS) version Library.

Cyrus SASL certification is available.

--------------------------------------------------------------

II. Configuration

1, create a new directory: Repos can be used to store svn all files

Mkdir-p/opt/svndata/repos

Note that the directory (project name) path here can be changed in the following format:

Mkdir-p directory path (such as: Mkdir-p/www/svn/project)

2, create a new version of the warehouse (using the Svnadmin Create directory warehouse path with the new directory to be consistent)

Svnadmin Create/opt/svndata/repos

3, modify the SVN version of the library profile

Vi/opt/svndata/repos/conf/svnserve.conf

Modified in the following format, where the realm value is the project name, in this case repos.

[General]

Anon-access = None

auth-access = Write

Password-db =/opt/svndata/project/conf/passwd

Authz-db =/opt/svndata/project/conf/authz

Realm = Repos

Note: Changes to user profiles take effect immediately and do not need to reboot SVN.

4, add Users

vi/opt/svndata/repos/conf/passwd

Adding an SVN user is very simple, just add a "Username=password" entry to the/opt/svn/project/conf/passwd file.

To test, I added the following:

[Users]

# Harry = Harryssecret

# sally = Sallyssecret

PM = PM_PW

Server_group = SERVER_PW

Client_group = CLIENT_PW

Test_group = TEST_PW

5. Modify User Access Policy

Vi/opt/svndata/repos/conf/authz

To record the user's access policy, the following are references:

[Groups]

project_p = PM

project_s = Server_group

Project_c = Client_group

project_t = Test_group

[project:/]

@project_p = RW

* =

[Project:/server]

@project_p = RW

@project_s = RW

* =

[Project:/client]

@project_p = RW

@project_c = RW

* =

[Project:/doc]

@project_p = RW

@project_s = RW

@project_c = RW

@project_t = RW

* =

The above information indicates that only PM has the right to read and write the root directory, Server_group can access the server directory, Client_group can access the client directory, everyone can access the doc directory.

Of course, the above is more complex permissions control, if only testing, can be simpler. Set up a user group, put all users into a user group, as follows:

[Groups]

admin = Pm,server_group,client_group,test_group

[/]

@admin = RW

On the control of the rights, this article does not describe the details, we can go to consult Niang.

5. Start SVN service

svnserve-d--listen-port 3690-r/opt/svndata/repos (run as Root)

If more than one project is being developed at the same time, you can open multiple SVN services via different ports, and remember to add the port number when using the TORTOISESVN operation.

6. Test SVN server

Go to Site root directory

Cd/www/web/repos/public_html

SVN co svn://127.0.0.1:3690/www/web/repos/public_html--username pm--password PM_PW

The following authentication prompts appear

-----------------------------------------------------------------------

Note! Your password, for the authentication domain:

< svn://127.0.0.1:3690 > Repos

Can only be saved in plaintext on disk! If possible, consider configuring your system to allow subversion

You can save the encrypted password. See the documentation for more information.

You can set the option "Store-plaintext-passwords" to "yes" or "no" in "/root/.subversion/servers".

To prevent this warning from appearing again.

-----------------------------------------------------------------------

Save unencrypted password (yes)?

Enter the "Yes" carriage because the version warehouse has not added any files, so take out the version 0, as follows:

Remove version 0.

Third, configure Post-commit, implement automatic synchronization svn version library files to the Web directory

To allow the Web server to synchronize directly after the modified code has been submitted to the SVN server. You need to configure SVN hooks to enter the hooks directory,

Cd/opt/svndata/repos/hooks

ls

You can see that there is a Post-commit.tmpl file, which is a template file that copies a copy in this directory, named Post-commit, and sets its user group to WWW and set it to executable:

CP Post-commit.tmpl Post-commit

Chown www:www Post-commit

chmod +x Post-commit

This will have access to the WWW directory.

The original code is all commented out. You can execute the shell command, which is invoked every time a commit completes.

The contents of the file refer to the following:

VI Post-commit

#!/bin/sh

Export LANG=ZH_CN. UTF-8

Repos= "$"

rev= "$"

Svn_path=/usr/bin/svn

Web_path=/web/web/repos/public_html

Log_path=/tmp/svn_update.log

#/usr/bin/svn Update--username user--password password $WEB _path--no-auth-cache

echo "nnn######### #开始提交" "Date" +%y-%m-%d%h:%m:%s "' ################## ' >> $LOG _path

Echo ' WhoAmI ', $REPOS, $REV >> $LOG _path

$SVN _path update--username user--password password $WEB _path--no-auth-cache >> $LOG _path

Chown-r www:www $WEB _path

Description:

1, #!/bin/sh description is to execute the shell command/* Set environment variables, if not set may appear update error

2, Export LANG=ZH_CN. UTF-8 is to resolve the SVN post commit Chinese garbled.

If you are GBK encoding may be prompted: Error output could not is translated from the native locale to UTF-8

This is a client-and server-encoded issue, by default Utf-8, which you can try to set up export LANG=ZH_CN. GBK or export Lang=en_us. UTF-8

#执行更新操作

3, SVN update–username your version of the library's username –password username password svn://Your IP address: port/web/web/repos/public_html

4. Chown-r www:www $WEB _path Change the folder owner to fit the WEB server

The original code is all commented out. You can execute the shell command, which is invoked every time a commit completes.

3. How to install SVN on the basis of WDCP one-click installation package and implement Nginx Web synchronization update installation

1. See if CVS are installed

Rpm-qa | grep subversion

2. Installation

Yum Install Subversion

3. Test Installation Success

/usr/bin/svnserve--version

If you are prompted with the following, you have successfully installed

--------------------------------------

Svnserve, Version 1.6.11 (r934486)

Compiled in APR 11 2013,17:28:04

Copyright (C) 2000-2009 collabnet.

Subversion is open source software, see the http://subversion.tigris.org/site.

This product contains software developed by CollabNet (http://www.Collab.Net/).

The following version of the Library backend (FS) module is available:

* Fs_base: module can only operate BDB version library.

* FS_FS: module works with the text file (FSFS) version Library.

Cyrus SASL certification is available.

--------------------------------------------------------------

II. Configuration

1, create a new directory: Repos can be used to store svn all files

Mkdir-p/opt/svndata/repos

Note that the directory (project name) path here can be changed in the following format:

Mkdir-p directory path (such as: Mkdir-p/www/svn/project)

2, create a new version of the warehouse (using the Svnadmin Create directory warehouse path with the new directory to be consistent)

Svnadmin Create/opt/svndata/repos

3, modify the SVN version of the library profile

Vi/opt/svndata/repos/conf/svnserve.conf

Modified in the following format, where the realm value is the project name, in this case repos.

[General]

Anon-access = None

auth-access = Write

Password-db =/opt/svndata/project/conf/passwd

Authz-db =/opt/svndata/project/conf/authz

Realm = Repos

Note: Changes to user profiles take effect immediately and do not need to reboot SVN.

4, add Users

vi/opt/svndata/repos/conf/passwd

Adding an SVN user is very simple, just add a "Username=password" entry to the/opt/svn/project/conf/passwd file.

To test, I added the following:

[Users]

# Harry = Harryssecret

# sally = Sallyssecret

PM = PM_PW

Server_group = SERVER_PW

Client_group = CLIENT_PW

Test_group = TEST_PW

5. Modify User Access Policy

Vi/opt/svndata/repos/conf/authz

To record the user's access policy, the following are references:

[Groups]

project_p = PM

project_s = Server_group

Project_c = Client_group

project_t = Test_group

[project:/]

@project_p = RW

* =

[Project:/server]

@project_p = RW

@project_s = RW

* =

[Project:/client]

@project_p = RW

@project_c = RW

* =

[Project:/doc]

@project_p = RW

@project_s = RW

@project_c = RW

@project_t = RW

* =

The above information indicates that only PM has the right to read and write the root directory, Server_group can access the server directory, Client_group can access the client directory, everyone can access the doc directory.

Of course, the above is more complex permissions control, if only testing, can be simpler. Set up a user group, put all users into a user group, as follows:

[Groups]

admin = Pm,server_group,client_group,test_group

[/]

@admin = RW

On the control of the rights, this article does not describe the details, we can go to consult Niang.

5. Start SVN service

svnserve-d--listen-port 3690-r/opt/svndata/repos (run as Root)

If more than one project is being developed at the same time, you can open multiple SVN services via different ports, and remember to add the port number when using the TORTOISESVN operation.

6. Test SVN server

Go to Site root directory

Cd/www/web/repos/public_html

SVN co svn://127.0.0.1:3690/www/web/repos/public_html--username pm--password PM_PW

The following authentication prompts appear

-----------------------------------------------------------------------

Note! Your password, for the authentication domain:

Repos

Can only be saved in plaintext on disk! If possible, consider configuring your system to allow Subversion

You can save the encrypted password. See the documentation for more information.

You can set the option "Store-plaintext-passwords" to "yes" or "no" in "/root/.subversion/servers".

To prevent this warning from appearing again.

-----------------------------------------------------------------------

Save unencrypted password (yes)?

Enter the "Yes" carriage because the version warehouse has not added any files, so take out the version 0, as follows:

Remove version 0.

Third, configure Post-commit, implement automatic synchronization svn version library files to the Web directory

To allow the Web server to synchronize directly after the modified code has been submitted to the SVN server. You need to configure SVN hooks to enter the hooks directory,

Cd/opt/svndata/repos/hooks

ls

You can see that there is a Post-commit.tmpl file, which is a template file that copies a copy in this directory, named Post-commit, and sets its user group to WWW and set it to executable:

CP Post-commit.tmpl Post-commit

Chown www:www Post-commit

chmod +x Post-commit

This will have access to the WWW directory.

The original code is all commented out. You can execute the shell command, which is invoked every time a commit completes.

The contents of the file refer to the following:

VI Post-commit

#!/bin/sh

Export LANG=ZH_CN. UTF-8

Repos= "$"

rev= "$"

Svn_path=/usr/bin/svn

Web_path=/web/web/repos/public_html

Log_path=/tmp/svn_update.log

#/usr/bin/svn Update--username user--password password $WEB _path--no-auth-cache

echo "nnn######### #开始提交" "Date" +%y-%m-%d%h:%m:%s "' ################## ' >> $LOG _path

Echo ' WhoAmI ', $REPOS, $REV >> $LOG _path

$SVN _path update--username user--password password $WEB _path--no-auth-cache >> $LOG _path

Chown-r www:www $WEB _path

Description:

1, #!/bin/sh description is to execute the shell command/* Set environment variables, if not set may appear update error

2, Export LANG=ZH_CN. UTF-8 is to resolve the SVN post commit Chinese garbled.

If you are GBK encoding may be prompted: Error output could not is translated from the native locale to UTF-8

This is a client-and server-encoded issue, by default Utf-8, which you can try to set up export LANG=ZH_CN. GBK or export Lang=en_us. UTF-8

#执行更新操作

3, SVN update–username your version of the library's username –password username password svn://Your IP address: port/web/web/repos/public_html

4. Chown-r www:www $WEB _path Change the folder owner to fit the WEB server

The original code is all commented out. You can execute the shell command, which is invoked every time a commit completes.

This digest from Wdlinux forum http://www.wdlinux.cn/bbs/, welcome everyone's Reprint

Related reading:

Website Service Management System WDCP series of Tutorials (i)

Website Service Management System WDCP series of Tutorials (ii)

Website Service Management System WDCP series of Tutorials (iii)

Web Service Management System WDCP series of Tutorials (iv)

Web Service Management System WDCP Series tutorial Five

Web Service Management System WDCP series six

Website Service Management System WDCP series of Tutorials (vii)

Website Service Management System WDCP series of Tutorials (10)

Website Service Management System WDCP series of Tutorials (12)

Website Service Management System WDCP series of Tutorials (13)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.