svn server and client configuration

Configuring the svn (server)
Project management tools (subversion), each company will be used (git / svn)
The purpose is to develop cooperation
4.1. Installation on linux from svn
You do not need from the official website (because linux is already integrated svn, just come in to load)
As long as linux comes with a tool / framework / component / project, do not need to download, can be installed directly
linux does not have these things, we must use the tar.gz archive for installation
yum -y install: installation command (carrying only install linux, non comes not installed)
yum -y install subversion (download command this command conf)
4.2. Svn detect whether the installation is successful
svn --version或者subversion --version
4.3. Create a folder (svn configuration file required)
Created in the home directory
mkdir -p svn/svnfile
4.4.svn loading a configuration file -
(Svn command comes, it does not belong to linux native commands)
svnadmin create /home/svn/svnfile
4.5. Implement your own configuration
Realize their configuration in the conf directory
When configuring the following three !!!!!!! file, all configuration must be to start from scratch, not any spaces !!!!!!
vim passwd:
Svn needed to configure the user name and password
All svn user configuration must be configured under [users] tag, it would not take effect
[users]
Username = password
seven = 123456
vim authz:
Equipped with the right information svn users (read, write)
All rights profile must be configured under [groups] label, or do not take effect
[/]: Obtain all the users passwd file, as long as all users in [Users] can be obtained under

 

All permissions and svn information about the user must be configured in the [/] before the label, or do not take effect
Username = rw
seven = rw
svnserver.conf:
anon-access = read
当用户没有登录svn的时候就可以执行的操作(匿名可以执行的操作)
write:代表即可以读又可以写
read, write, none
auth-access = write
 
当svn用户登录后可以执行的操作
write:既可以读又可以写
password-db = passwd
把所有的svn用户的账号密码匹配机制交给passwd文件进行管理
authz-db = authz
把所有的svn用户的权限交给authz文件进行管理
realm = My First Repository
realm = /home/svn/svnfile
指定了项目上传svn的目录,也就是说项目具体上传到svn的哪一个文件夹中
4.6.启动svn
svnserve -d -r /home/svn/svnfile
没有看到报错信息说明启动成功
 
5.配置svn的客户端
5.1.下载小乌龟svn
5.2.直接双击安装(command line client tools必须勾选上,如果不勾选就无法集成IDEA工具(svn.exe))
卸载后只能重新安装(如果选择目录安装不上,按照默认路径安装)
5.3.打开IDEA进行配置svn
5.3.1.找到settings菜单
5.3.2.搜索subversion
需要定位到svn的本地安装目录(定位svn.exe文件)
5.3.3.找到VCS菜单-->import into version control-->选择import into subversion
-->需要输入svn服务器的地址(不允许http),使用svn://192.168.xx.xx
-->输入账号和密码(不要点击import,直接关闭)
5.3.4.找到VCS菜单-->import into version control-->share project(subversion)

 


 

 

 

 
5.3.5.查看svn服务器上有哪些项目
找到VCS菜单-->browes VCS repository-->browes subversion repository(在svn服务器行已经把项目文件夹分享上去了,但是项目中没有具体的内容,因为代码还没有上传)
5.3.6.上传架构代码
对着项目点击右键-->subversion菜单-->commit Directory
只需要提交和项目相关的文件即可,其他的所有文件都不要提交只提交src和lib然后commit就ok

 

 
上传成功后,到svn所在的服务器去寻找的时候发现并没有上传的项目(以二进制的存在于svn服务器上)点击刷新项目上传成功

 

 
 
 
 
 
 
5.3.7.在svn服务器上把二进制项目转换为Java项目
svn checkout svn://svn所在服务器的ip地址/项目名(如果svn服务器上只有一个项目可以省略) /home(把项目所检出的路径) --username=seven --password=123456
5.3.8.把svn服务器上的项目删除
svn delete svn://svn所在服务器的ip地址/项目名(必须要携带项目名,否则无法删除) -m delete
5.3.9.把IDEA中的项目断开svn的连接
需要一个插件:plugins-->搜索svn disconnect
 
 
 
 
项目不想上传到svn
---》我的电脑---》查看---》点击隐藏文件夹----》

 

打开

 

删除 .svn项目就不会上传svn
 
 
 
从外部导入项目
将项目download到指定目录----》打开项目删除.idea(.idea中存放的为原来开发者使用 的idea的配置)

 

然后删除项目中所有后缀为iml的文件(!!!!是所有文件夹中后缀为iml的文件)

 

-----》用idea打开修改过的项目idea会自动加载本机idea的配置

Guess you like

Origin www.cnblogs.com/nanchuanbeiyu/p/11404957.html