pencat

从明天起,关心粮食和蔬菜。我有一所房子,面朝大海,春暖花开

svn 1.50 编译安装

下载subversion-1.5.0.tar和subversion-deps-1.5.0.tar
# tar xvf subversion-1.5.0.tar 
# tar xvf subversion-deps-1.5.0.tar //会解到一个subversion-1.5.0目录下
# cd subversion-1.5.0
# ./configure -prefix=/usr/local/svn
# make
# make install
# mkdir /home/svndata //建立项目的存储库
# vi svn_service
#!/bin/sh

#
# chkconfig: - 91 35
# description: Starts and stops the Subversion service
# subversion options

OPTIONS="-d -r /home/svndata"

prog=_subversion
RETVAL=0
_subversion=/usr/bin/svnserve

# Source function library.

. /etc/rc.d/init.d/functions

# Source networking configuration.

. /etc/sysconfig/network

start() {
        KIND="SubVersion"
    echo -n $"Starting $KIND services: "
    daemon $_subversion $OPTIONS
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/subversion || \
     RETVAL=1
    return $RETVAL
}   

stop() {
        KIND="SubVersion"
    echo -n $"Shutting down $KIND services: "
    killproc $_subversion
    RETVAL=$?
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/subversion
    echo ""
    return $RETVAL
}   

restart() {
    stop
    start
}   

case "$1" in
  start)
      start
    ;;
  stop)
      stop
    ;;
  restart|reload)
      restart
    ;;
  status)
        status $dc_server
    RETVAL=$?
    ;;
  condrestart)
      [ -f /var/lock/subsys/subversion ] && restart || :
    ;;
  *)
    echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
    exit 1
esac

exit $?

# chmod 755 svn_service
# cp svn_service /etc/rc.d/init.d/svn
# chkconfig --add svn
# chkconfig --level 345 svn on
# netstat -an|grep 3690  //查看svn的端口是否已经开启,没记错的话应该就是3690端口
可以使用绿毛龟(svn客户端)来查看项目情况,使用svn://ip:port/test来查看项目源码

 

配置
#cd /home/svndata/test/conf
#vi authz
 [groups]对组进行配置
 # harry_and_sally = harry,sally

 # [/foo/bar]按目录进行用户读写配置
 # harry = rw
 # * =

 [repository:/test]对svn库的路径进行配置
 # @harry_and_sally = rw
 # * = r
 radio=rw
 pencat=rw
 koala=rw
 soul=rw
#vi passwd
 [users]
 # harry = harryssecret
 # sally = sallyssecret
 radio=123456
 都是明文的
#vi svnserv.conf
password-db = passwd将这行的注释去掉,就会要求用户验证

svn换端口
#./svnserve --help 可以看到命令,里面有个参数--listen-port
不过我没有使用过


因为ssl关系出现认证失败的解决办法
1、停掉ssl
2、# authz-db = authz这行的#保留

#去掉#[general]前面的#号
[general]
#匿名访问的权限,可以是read,write,none,默认为read
anon-access = none
#认证用户的权限,可以是read,write,none,默认为write
auth-access = write
#密码数据库的路径,去掉前面的#
password-db = passwd

Centos5.2下mysql5 编译安装

# tar zxvf mysql-5.1.30.tar.gz
# cd mysql-5.1.30
# ./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-collation=utf8_general_ci

./configure --prefix=/usr/local/mysql --enable-thread-safe --enable-assembler --enable-shared --with-charset=utf8 --with-collation=utf8_general_ci --with-mysqld-ldflags=-all-static --without-debug

# make && make install
# .......漫长的等待
# cp /usr/src/mysql-5.1.30/support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 755 /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
# cp support-files/my-medium.cnf /etc/my.cnf
# vi /etc/my.cnf
  - skip-federated
  + #skip-federated
# ./scripts/mysql_install_db
# cd /usr/local
# groupadd mysql_g
# adduser mysql -G mysql_g
# vi /etc/passwd
  - mysql:x:500:501::/home/mysql:/bin/bash
  + mysql:x:500:501::/home/mysql:/sbin/nologin
# chmod 750 mysql -R
# chgrp_g mysql mysql -R
# chown mysql mysql/var -R
# ln -s /usr/local/mysql/bin/mysql /sbin/mysql
# ln -s /usr/local/mysql/bin/mysqladmin /sbin/mysqladmin
# ln -s /usr/local/mysql/bin/mysql_config /sbin/mysql_config
# service mysqld start

分页:[«]1[»]

Powered By Z-Blog 1.8 Devo Build 80201

Copyright © 1998-2007 bigcomic.com All rights reserved.