内部开发环境 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来克隆的 ...
随机推荐
- 配置并学习微信JS-SDK(1)
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> 微信JS-SDK ...
- 移动端消除click事件的延迟效果
https://github.com/Plaputta/jquery.event.special.fastclick 用fastclick事件,类似zepto的tap事件,若想去除连点效果,可在外层显 ...
- JS实现继承多态
//类对象构造模版,无new访问,类似静态访问 var Class = { create: function () { return function () { //initialize初始化 //a ...
- 听同事讲 Bayesian statistics: Part 1 - Bayesian vs. Frequentist
听同事讲 Bayesian statistics: Part 1 - Bayesian vs. Frequentist 摘要:某一天与同事下班一同做地铁,刚到地铁站,同事遇到一熟人正从地铁站出来. ...
- Jqgrid动态拖拽
//注册事件 jQuery("#list1").jqGrid('setGridParam', { gridComplete : function() { $("#_emp ...
- iOS-NSString-Base64String-Base64原理
之前看到好多人找Str2Base64Str,还有好多自己写了方法的,仔细研究了下base64的编码原理(这个我写在下面),发现官方的API已经可以完成这项功能,这里贴出来供大家参考. 一言不合就上代码 ...
- 使用2to3将代码移植到Python 3-转
http://m.blog.csdn.net/blog/merryken/9104199# ❝ Life is pleasant. Death is peaceful. It’s the transi ...
- 【UVA11019】Matrix Matcher
Description Given an N × M matrix, your task is to find the number of occurences of an X × Y pattern ...
- 最完整的合并相交集合的Java代码(查并集)
这个是自己写的算法,如果有大牛,麻烦帮我并行化.初学者则可以学到不少东西. 产生测试用例 import java.io.*; import java.util.Random; public class ...
- 经典的单例模式c3p0来控制数据库连接池
package com.c3p0.datapools; //数据库连接池 单例模式 import java.sql.Connection; import java.sql.SQLException; ...