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

  • 相关阅读:
    偶然看到3年前为企业内刊写的文章——像经营自己的事业一样经营工作
    Migration 时需要留意到几个问题
    Law of Seed
    时刻准备着
    一种trace APP Engine的方法
    强烈建议博客园增加Oracle ERP或者叫PeopleSoft模块
    回味四年前的自己——细节的魅力
    一封寫給兒子的信
    职场回顾:面试精华试题大全[转]
    快速放松的11种简单方法
  • 原文地址:https://www.cnblogs.com/nbuntu/p/5580180.html
Copyright © 2011-2022 走看看