SVN, Eclipse, Linux
Salve pessoal gente boa !
Hoje quero passar aqui para dar uma ajuda quem vai instalar o SVN no linux e poder sincronizar com o Eclipse no seu windows ou linux e afins.
bem vamos la partindo do principio que o seu linux esta cabaço (virgem da silva).
subversion: Controlador de versão.
libapache2-svn: Biblioteca de integração entre apache e subversion.
apache2: Servidor Web Apache
entao no seu console digite
# sudo apt-get install subversion libapache2-svn apache2
depois de ter instalado o apache agora é mandar brasa no resto.
seguindo
# sudo apt-get install subversion libapache2-svn
Quando terminar de instalar vamos configurar o arquivo do svn seja com o seu joe ou vi
Observe que criei uma pasta no /var a pasta svn (mkdir svn apliquei as permissoes chmod 0777 na pasta).
Supondo que você esteja na pasta /var
# mkdir svn
Depois
# chmod 0777 /var/svn -R
# sudo joe /etc/apache2/mods-enabled/dav_svn.conf
# dav_svn.conf - Example Subversion/Apache configuration # # For details and further options see the Apache user manual and # the Subversion book. # # NOTE: for a setup with multiple vhosts, you will want to do this # configuration in /etc/apache2/sites-available/*, not here. # <Location URL> ... </Location> # URL controls how the repository appears to the outside world. # In this example clients access the repository as http://hostname/svn/ # Note, a literal /svn should NOT exist in your document root. <Location /svn> # Uncomment this to enable the repository DAV svn # Set this to the path to your repository #SVNPath /var/lib/svn # Alternatively, use SVNParentPath if you have multiple repositories under # under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...). # You need either SVNPath and SVNParentPath, but not both. SVNParentPath /var/svn # Access control is done at 3 levels: (1) Apache authentication, via # any of several methods. A "Basic Auth" section is commented out # below. (2) Apache <Limit> and <LimitExcept>, also commented out # below. (3) mod_authz_svn is a svn-specific authorization module # which offers fine-grained read/write access control for paths # within a repository. (The first two layers are coarse-grained; you # can only enable/disable access to an entire repository.) Note that # mod_authz_svn is noticeably slower than the other two layers, so if # you don't need the fine-grained control, don't configure it. # Basic Authentication is repository-wide. It is not secure unless # you are using https. See the 'htpasswd' command to create and # manage the password file - and the documentation for the # 'auth_basic' and 'authn_file' modules, which you will need for this # (enable them with 'a2enmod'). AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd # To enable authorization via mod_authz_svn #AuthzSVNAccessFile /etc/apache2/dav_svn.authz # The following three lines allow anonymous read, but make # committers authenticate themselves. It requires the 'authz_user' # module (enable it with 'a2enmod'). #<LimitExcept GET PROPFIND OPTIONS REPORT> #Require valid-user #</LimitExcept> </Location>
Pronto, só falta adicionar os usuários, para isso utilize o comando abaixo:
# sudo htpasswd -cm /etc/apache2/dav_svn.passwd seu_usuario
Vai pedir a senha e repetir a senha você segue normalmente os passos até finalizar o procedimento.
Próximo passo é criar um repositorio.
# sudo svnadmin create /var/svn/teste
Reinicie o apache dessa forma
# sudo /etc/init.d/apache2 force-reload
Se aparecer isso você instalou com sucesso.
“Revision 0″
Importando seu projeto para o repositorio.
# svn import /pasta/seuprojeto http://localhost/svn/teste
Baixando o Svn para fazer checkout no Eclipse.
Com o Eclipse aberto va em Help/Software Update
Na aba Avaiable Software
Add Site
Adicione http://subclipse.tigris.org/update_1.4.x e Ok.
Espere carregar e Desmarque o Mylyn
e depois clique em Install ao final reinicie a IDE ( ele pede se você quer reiniciar a IDE clique OK )
Depois de intalado… com o Eclipse aberto va em File / New / Other / Svn / Checkout Projects from SVN
Next
Create new Repository
adicione o endereco http://localhost/svn/teste ( ou o ip do seu servidor svn no lugar de localhost )
Next
Selecione a linha do http e Finish. pronto tera seu projeto do svn no Eclipse.
Ate o proximo post onde explicarei como desfrutar do SVN, controle de Versoes, Revisoes.
Felipe o/
Share on Facebook
Comentários