内部开发环境 git代码托管说明
前言
随着员工的增加 代码的开发版本管理 提上了日程。初步计划:
1 一台机器 192.168.1.240 git代码版本管理
2 运行环境 192.168.1.241 内部开发运行环境
软件工程师 通过git 每天吧代码从本地push到 git服务器,git服务器 实时的最新的动态同步到运行环境服务器。
软件工程师 通过192.168.1.241进行测试代码
搭建同步rsync
一键搭建安装rsync包代码
#!/bin/bash
#rsync Written by zhumaohai
#For more information please visit http://www.centos.bz
echo "Please input the rsync username:"
read username
echo "Please input the rsync username password:"
read password
echo "Please input the allow ip address:"
read allowip
echo "Please input the path you want to rsync:"
read rsyncpath
echo "==========================input all completed========================"
echo "==========================install rsync========================"
yum -y install rsync
useradd $username
mkdir /etc/rsyncd
cat >/etc/rsyncd/rsyncd.conf<<EOF
# Minimal configuration file for rsync daemon
# See rsync() and rsyncd.conf() man pages for help # This line is required by the /etc/init.d/rsyncd script
pid file = /var/run/rsyncd.pid
port =
#address = $serverip
#uid = nobody
#gid = nobody
uid = root
gid = root use chroot = yes
read only = yes #limit access to private LANs
hosts allow=$allowip
hosts deny=* max connections =
motd file = /etc/rsyncd/rsyncd.motd #This will give you a separate log file
#log file = /var/log/rsync.log #This will log every file transferred - up to ,+ per user, per sync
#transfer logging = yes log format = %t %a %m %f %b
syslog facility = local3
timeout = [home]
path = $rsyncpath
list=yes
ignore errors
auth users = $username
secrets file = /etc/rsyncd/rsyncd.secrets
EOF
echo "$username:$password" > /etc/rsyncd/rsyncd.secrets
chmod /etc/rsyncd/rsyncd.secrets
cat >/etc/rsyncd/rsyncd.motd<<EOF
+++++++++++++++++++++++++++
+ centos.bz rsync - +
+++++++++++++++++++++++++++
EOF
/usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf
echo "/usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf" >>/etc/rc.d/rc.local
ps -aux | grep rsync
客户端同样如此
客户端配置密码文件 不需要用户名 只要密码 切记
/etc/rsyncd/rsyncd.secrets #只需密码
同步测试
rsync -vzrtopg --progress --delete root@192.168.1.240::home /ranmufei/test/ --password-file=/etc/rsyncd/rsyncd.secrets
客户端 运行以上代码同步home模块的配置 到本地 ranmufei/test/ 目录下!!
git服务器搭建
参考git一键安装包
后续——————————
内部开发环境 git代码托管说明的更多相关文章
- .NET Core windows开发环境 + Git代码控管 + Docker 部署环境搭建
开发环境准备 下载vs code,.NET Core sdk: https://www.microsoft.com/net/core#windowscmd 目前最新版为code 1.8.1,.NET ...
- 探讨 Git 代码托管平台的若干问题
关于 Git 版本控制软件种类繁多,维基百科收录的最早的版本控制系统是 1972 年贝尔实验室开发的 Source Code Control System.1986 年 Concurrent Vers ...
- 探讨 Git 代码托管平台的若干问题 - 2019 版
关于 Git 版本控制软件种类繁多,维基百科收录的最早的版本控制系统是 1972 年贝尔实验室开发的 Source Code Control System.1986 年 Concurrent Vers ...
- git 代码托管使用方法
Git代码托管 1 准备材料 在coding,github这些代码托管网站上申请一个账户. Linux平台什么需要一个git,如ubuntu 需要 $ sudo apt-get install git ...
- 国内2大Git代码托管网站
可以说GitHub的出现完全颠覆了以往大家对代码托管网站的认识.GitHub不但是一个代码托管网站,更是一个程序员的SNS社区.GitHub真正迷人的是它的创新能力与Geek精神,这些都是无法模仿的. ...
- oschina(开源中国)的Git代码托管平台使用教程
oschina(开源中国)的Git代码托管平台使用教程 第一章 平台介绍 一. Git@OSC简介 开源中国的Git@OSC一个账号最多可以创建1000个项目,包含公有和私有,开源中国代码托管地址:h ...
- 程序员必须知道的几个Git代码托管平台
上一篇博客中2015继续任性——不会Git命令,照样玩转Git我们简单的介绍了在VS2013中使用Git,和GitHub客户端的使用.那么使用Git到底有什么好处呢?最为明显的是支持Git代码托管的平 ...
- 程序员必须知道的几个Git代码托管平台(转)
上一篇博客中2015继续任性——不会Git命令,照样玩转Git我们简单的介绍了在VS2013中使用Git,和GitHub客户端的使用.那么使用Git到底有什么好处呢?最为明显的是支持Git代码托管的平 ...
- 【转】程序员必须知道的几个Git代码托管平台
一.VS2013中克隆远程Git仓库和SSH的配置 1.VS2013中克隆远程项目 首先感谢园友的评论和补充,今日又仔细看了一下,VS2013中是可以克隆项目的,只是我一直用的GitHub来克隆的 ...
随机推荐
- jQuery的延迟对象
之前看别人的demo,发现在延迟对象被resolve时要执行的代码,有时会写在deferred.then方法里执行,有时会写在deferred.done方法里执行. 这让对延迟对象一知半解的我非常困惑 ...
- 策略模式(Strategy)
行为型模式:策略模式.模板方法模式.观察者模式.迭代子模式.责任链模式.命令模式.备忘录模式.状态模式.访问者模式.中介者模式.解释器模式 策略模式(Strategy) 策略模式定义了一系列算法,并将 ...
- Apache 支持.htaccess
******************************************************************************* Apache 服务器 ********* ...
- BenchmarkDotNet
.NET Core性能测试组件BenchmarkDotNet 支持.NET Framework Mono .NET Core 超强性能测试组件BenchmarkDotNet 支持Full .NET F ...
- JDK源码阅读(一) ArrayList
基于JDK7.0 ArrayList<E>类继承了抽象类AbstractList<E> 实现了List<E> 接口,RandomAccess接口,Cloneable ...
- linux tcp 好文
http://blog.csdn.net/htttw/article/details/7521053
- ViewController 的loadView、viewDidLoad、viewDidUnload分别是什么时候调用的,在自定义ViewCointroller时在这几个函数中应该做什么工作?
由init.loadView.viewDidLoad.viewDidUnload.dealloc的关系说起 init方法 在init方法中实例化必要的对象(遵从LazyLoad思想) init方法中初 ...
- uva 11136 - Hoax or what
用两个优先队列来实现,因为队列只能从一头出去: 所以维护一个数组,来标记这个队列的已经出列而另外一个队列没有出列的元素: 到时候再把他们删了就行: #include<cstdio> #in ...
- websocket nodejs实例
http://blog.sina.com.cn/s/blog_49cc837a0101aljs.html http://blog.sina.com.cn/s/blog_49cc837a0101a2q3 ...
- Count Good Substrings
Codeforces Round #258 (Div. 2) D:http://codeforces.com/problemset/problem/451/D 题意:给你一个字符串,只有ab组成.相同 ...