removido
(usa Nenhuma)
Enviado em 15/03/2013 - 19:32h
Iaê velhinho! Só tive tempo hoje.
Vamos lá...
* Sistema testado
# cat /etc/issue && uname -mrs
CentOS release 6.4 (Final)
Kernel \r on an \m
Linux 2.6.32-358.2.1.el6.x86_64 x86_64
* Instalação
# yum install httpd mod_dav_svn subversion
# mkdir -p /usr/local/svn
# groupadd subversion
# svnadmin create /usr/local/svn/projeto1
# chown -R apache:subversion /usr/local/svn
# chmod -R 775 /usr/local/svn
Adicionar no final do arquivo:
# vi /etc/httpd/conf.d/subversion.conf
<Location /svn>
DAV svn
SVNParentPath /usr/local/svn/
SVNListParentPath on
AuthType Basic
AuthName "Acessando repositorio Subversion"
AuthUserFile /etc/httpd/passwd
#<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
#</LimitExcept>
</Location>
# htpasswd -cm /etc/httpd/passwd amarildo
# gpasswd -a amarildo subversion
Adding user amarildo to group subversion
# /etc/init.d/httpd restart
* Teste
http://ip_servidorSVN/svn
http://imageshack.us/photo/my-images/32/svn01.png/
http://imageshack.us/photo/my-images/819/svn02.png/
http://imageshack.us/photo/my-images/189/svn03.png/
* Teste de importação
# cd /var/www/html
# mkdir teste
# cd teste
# vi teste.php
<?php
phpinfo();
?>
# export SVN_EDITOR='vim'
# svn import /var/www/html/teste file:///usr/local/svn/projeto1 -m "Teste de importação numero 1"
Adicionando /var/www/html/teste/teste.php
Commit da revisão 1.
http://imageshack.us/photo/my-images/716/svn04.png/
http://imageshack.us/photo/my-images/543/svn05.png/
* Baixar arquivos do repositório
# cd /home/amarildo/
# ls
Área de Trabalho Documentos Downloads Imagens Modelos Música Público Vídeos
# svn co
http://192.168.0.15/svn/projeto1
Área de autenticação: <http://192.168.0.15:80> Acessando repositorio Subversion
Senha para 'amarildo': *******
-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm:
<http://192.168.0.15:80> Acessando repositorio Subversion
can only be stored to disk unencrypted! You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible. See the documentation for details.
You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/root/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
A projeto1/teste.php
Gerado cópia de trabalho para revisão 1.
# ls
Área de Trabalho Documentos Downloads Imagens Modelos Música projeto1 Público Vídeos
# cd projeto1/
# svn list
teste.php
# svn update
Na revisão 1.
OBS: O
selinux pode está rejeitando sua conexão. Deixe ele em mode permissive ou disabled.
# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Reinicie o servidor
# init 6
* Testando
# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted