linux系统安装和使用SVN经验和遇到的问题
2015-08-29 16:18
591 查看
系统里已经安装上了svn服务
新建文件
在新建的文件里面建立一个版本库
版本库的配置
重启svn服务
初充一:若想达到客户端提交文件,服务器下某个目录(假如目录名为html)也同步自动更新,采用下面的方法(钩子)
第一步:服务器上检出
svn co svn://localhost/could (小乌龟连得地址) html(服务器文件夹地址)
第二步:新建post-commit文件
[root@i-531-29129-VM hooks]# pwd
/application/svndata/could/hooks
[root@i-531-29129-VM hooks]# vi post-commit
[root@i-531-29129-VM hooks]# cat post-commit
#!/bin/bash
WEB=/var/www/html/
export.UTF-8
svn update $WEB --username svnserver --password 'svnserverpwd'
[root@i-531-29129-VM hooks]# chmod 755 post-commit
[root@i-531-29129-VM hooks]# ll post-commit
-rwxr-xr-x. 1 root root 116 May 9 21:18 post-commit
[root@i-531-29129-VM hooks]# ./post-commit
At revision 5.
在./post-commit的时候 遇见了个编码的问题,显示的结果如下
[root@iZ284lduet9Z hooks]# ./post-commit
-bash: ./post-commit: /bin/bash^M: bad interpreter: 没有那个文件或目录
处理办法是:在linux系统
yun install dos2unix -y
然后在 dos2unix post-commit(就是对文件进行编码处理吧).
这样再进行./post-commit的时候就没问题了。
好的安装介绍地址:http://gongwen.sinaapp.com/article-135.html
新建文件
在新建的文件里面建立一个版本库
版本库的配置
重启svn服务
初充一:若想达到客户端提交文件,服务器下某个目录(假如目录名为html)也同步自动更新,采用下面的方法(钩子)
第一步:服务器上检出
svn co svn://localhost/could (小乌龟连得地址) html(服务器文件夹地址)
第二步:新建post-commit文件
[root@i-531-29129-VM hooks]# pwd
/application/svndata/could/hooks
[root@i-531-29129-VM hooks]# vi post-commit
[root@i-531-29129-VM hooks]# cat post-commit
#!/bin/bash
WEB=/var/www/html/
export.UTF-8
svn update $WEB --username svnserver --password 'svnserverpwd'
[root@i-531-29129-VM hooks]# chmod 755 post-commit
[root@i-531-29129-VM hooks]# ll post-commit
-rwxr-xr-x. 1 root root 116 May 9 21:18 post-commit
[root@i-531-29129-VM hooks]# ./post-commit
At revision 5.
在./post-commit的时候 遇见了个编码的问题,显示的结果如下
[root@iZ284lduet9Z hooks]# ./post-commit
-bash: ./post-commit: /bin/bash^M: bad interpreter: 没有那个文件或目录
处理办法是:在linux系统
yun install dos2unix -y
然后在 dos2unix post-commit(就是对文件进行编码处理吧).
这样再进行./post-commit的时候就没问题了。
好的安装介绍地址:http://gongwen.sinaapp.com/article-135.html
相关文章推荐
- Linux学习笔记----Linux 系统管理----系统定时任务
- Linux磁盘及文件系统管理
- Linux时间操作(time、gettimeofday)
- Ubuntu14.04(Linux)中安装配置Java环境
- CentOS VNCServer安装
- 在Centos 中将zookeeper设置成开机启动
- unix/linux编程实践教程------学习笔记
- LAMP初次搭建
- Linux 命令
- Linux下命令梳理
- 安装微型Linux系统 SliTaz
- Linux 下ssh创建ip加密码隧道
- Linux下的压缩解压缩命令详解
- [转] linux 信号量之SIGNAL
- linux运行、关闭、查看后台任务
- Linux下的压缩解压缩命令详解
- Linux下 不同颜色文件所代表的含义
- Linux下创建用户命令
- linux系统中重置mysql的root密码
- 解决CentOS 6.5中,Python-2.7.*交互模式下方向键、退格键等出现乱码的问题