virtualmin domain subversion svn hook post-commit public_html

1.

services--Subversion Repositories--creat a svn name as sitesvn

2.

添加 服务器端 只读 svn update 用户

Edit Users -- Add a website FTP access user --

Username -- This email address is being protected from spambots. You need JavaScript enabled to view it.

Password -- 123456

Other user permissions

Subversion login enabled?

Read-only access to repositories

Allowed repos

sitesvn


添加 远程可写 用户

Edit Users -- Add a website FTP access user --

Username -- This email address is being protected from spambots. You need JavaScript enabled to view it.

Password -- 123456

Other user permissions

Subversion login enabled?

Read/write access to repositories

Allowed repos

sitesvn


3

enable ssl for site

Edit Virtual Server -- Enabled features -- SSL website enabled?


4

use ssh

su as root

清空 文件夹

cd /home/yourdomain/public_html

rm -rf *


cd /home/mydomain/svn/sitesvn/hooks

cp post-commit.tmpl post-commit

vi post-commit


#!/bin/sh
svn update /home/yourdomain/public_html --username=server --password=123456 --non-interactive >> /home/yourdomain/logs/subversion_log


cd /home/yourdomain/logs


touch subversion_log


切换用户为 mydomain 运行 svn checkout

su domainuser


svn co https://yourdomain/svn/sitesvn/ /home/yourdomain/public_html --username=server --password=123456

p

yes

yes


不是必须 容易出错

chown apache:yourdomain /home/yourdomain/svn/sitesvn/hooks/post-commit
chown apache:yourdomain /home/yourdomain/logs/subversion_log
chown -R apache:yourdomain /home/yourdomain/public_html/.svn

 

chmod 770 /home/yourdomain/svn/sitesvn/hooks/post-commit
chmod 770 /home/yourdomain/logs/subversion_log
chmod 770 /home/yourdomain/public_html/.svn


Last modified onSunday, 14 October 2012 04:07

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0019412344{main}( ).../index.php:0
20.08684262360Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08684262360Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.430411453280Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.431411477656Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.432511532984Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.432911560384require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.444111960016K2ControllerItem->execute( ).../k2.php:64
90.444111960016K2ControllerItem->display( ).../BaseController.php:710
100.458012610720K2ControllerItem->display( ).../item.php:78
110.458012610720K2ControllerItem->display( ).../controller.php:19
120.464412981760Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.466413002128K2ViewItem->display( ).../ViewController.php:102
140.551215870960K2ViewItem->display( ).../view.html.php:742
150.551215870960K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.554716043896include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
  • Published in Webmin
  • Read 2038 times

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0019412344{main}( ).../index.php:0
20.08684262360Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08684262360Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.430411453280Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.431411477656Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.432511532984Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.432911560384require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.444111960016K2ControllerItem->execute( ).../k2.php:64
90.444111960016K2ControllerItem->display( ).../BaseController.php:710
100.458012610720K2ControllerItem->display( ).../item.php:78
110.458012610720K2ControllerItem->display( ).../controller.php:19
120.464412981760Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.466413002128K2ViewItem->display( ).../ViewController.php:102
140.551215870960K2ViewItem->display( ).../view.html.php:742
150.551215870960K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.554716043896include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top