zoukankan      html  css  js  c++  java
  • Ubuntu12.04 Installation and Subversion(svn)

    Ubuntu Installation Guide

    Abstract

     

    This document contains installation instructions for the Ubuntu 12.04 system (codename “‘Precise Pangolin’”), for the AMD64 (“amd64”) architecture.

    Table of Contents

     

    1. 1.      System Requirements
    2. 2.      Installation Howto
    3. 3.      Installion ssh service (Optional)
    4. 4.      Firewall configuration

    Subversion

    Install

     

    $ sudo apt-get install subversion apache2 libapache2-svn

    CREATE SUBVERSION REPOS

     

    $ mkdir -p /home/mikezhou/svn/repos/

    $ svnadmin create /home/mikezhou/svn/repos/project01

    Import file

     

    $ svn import directory file:///home/mikezhou/svn/repos/project01/ -m "commit tmp"

    Access mode

     

    模式

    访问方式

    file://

    直接访问库 (在本地磁盘)

    http://

    通过 WebDAV 协议访问带有 Subversion 的 Apache2 web 服务器。

    https://

    与 http:// 相同,但有 SSL 加密

    svn://

    通过自身协议访问 svnserve 服务

    svn+ssh://

    与 svn:// 一样,但使用 SSH 遂道

    (file://)

    $ svn co file:///path/to/repos/project

    or

    $ svn co file://localhost/path/to/repos/project
     

    (http://)

     

    Operation:

    $ sudo chown www-data:www-data -R /home/mikezhou/svn/

    $ sudo chmod 770 -R /home/mikezhou/svn/

    Create passwd:

    $ sudo htpasswd -c /etc/apache2/passwd user_name

    // “-c”=Create a new file.

    General add user:

    $ sudo htpasswd /etc/apache2/passwd user_name

    Access control:

    $ sudo vim /etc/apache2/dav_svn.authz

    #groups

    [groups]

    admin=mikezhou

    [project01:/]

    @admin=rw

    *=

    Configure dav_svn.conf:

     

    $ sudo vim /etc/apache2/mods-enabled/dav_svn.load

    Add line:

    LoadModule authz_svn_module /usr/lib/apache2/modules/mod_authz_svn.so

     

    $ sudo vim /etc/apache2/mods-enabled/dav_svn.conf

    <Location /svn/>

            DAV svn

            SVNParentPath /home/mikezhou/svn/repos

            SVNListParentPath on

            AuthType Basic

            AuthName "Subversion Repository"

            AuthUserFile /etc/apache2/passwd

            AuthzSVNAccessFile /etc/apache2/dav_svn.authz

            Require valid-user

    </Location>

    $ sudo apache2ctl restart
    Warning:
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

    handling method:

    sudo vim /etc/apache2/httpd.conf

    ServerName 127.0.0.1    #add this line
    $ sudo apache2ctl restart
     

    Now use http access:

    $ sudo ufw allow 80

    $ svn co http://192.168.145.131/svn/

    Installion ssh service (Optional):

             $ sudo apt-get install openssh-server

    check sshd service startup?

             $ ps –e | grep sshd

             If not startup can use commond:

    $ sudo /etc/init.d/ssh start

    Custom port:

    Edit /etc/ssh/sshd_config ‘port 22’ then restart sshd

    Firewall configuration

             $ sudo apt-get install ufw

             $ sudo ufw enable

             $ sudo ufw default deny

             $ sudo ufw allow 22/tcp

             $ sudo ufw status

  • 相关阅读:
    【亲身测试成功】windows7 32位操作系统 环境下安装 windows7 64位操作系统
    Deprecated: Function ereg_replace() is deprecated in ……【解决方法】
    20100526(开始上班咯···)
    20100608
    String与string的区别
    Jquery CheckBox全选方法
    与技术无关
    jquery之对象访问(是不是API里出错了呢?)
    工作四个月之后的小感
    关于数据库中的AK(Alternate Key)
  • 原文地址:https://www.cnblogs.com/nbuntu/p/5580180.html
Copyright © 2011-2022 走看看