内部开发环境 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来克隆的 ...
随机推荐
- 1、Python django 框架下的word Excel TXT Image 等文件的上传
1.文件上传(input标签) (1)html代码(form表单用post方法提交) <input class="btn btn-primary col-md-1" styl ...
- ecshop安装程序源码阅读-安装脚本(2)
检查环境变量: 程序目录:图片目录,数据目录,临时目录 模板目录下模板文件 数据库连接函数 数据库配置: 读取数据库列表 创建配置文件(数据库,语言,session有效期等) 创建数据表 创建初始化数 ...
- Django 入门
Django 入门 Django是一个开放源代码的Web应用框架,由Python写成.采用了MVC的软件设计模型,即模型M,视图V和控制器C.它最初是被开发来用于管理劳伦斯出版集团旗下的一些以新闻内容 ...
- WPF Navigation导航
WPF导航这个话题,网上的解决方法有很多种,有点吃猪脚的感觉,弃之可惜,食之乏味. 不过还是简单聊聊吧. 常见的导航: 利用HyperLink导航,可以到某一个Page页面,也可以是外部链接,当然也可 ...
- 2016022612 - redis事务命令集合
参考地址:http://www.yiibai.com/redis/redis_transactions.html Redis事务由指令 MULTI 启动,以EXEC结束. 1.multi 用途:事务开 ...
- phonegap 4.2 环境搭建 及 项目创建 运行
安装Java 和 ADT 1.首先要安装java运行环境jdk,这个可以自行到官网下载.百度也有下载连接:( http://www.baidu.com/s?tn=baidu&ie=utf-8& ...
- Java操作Oracle数据库以及调用存储过程
操作Oracle数据库 publicclass DBConnection { //jdbc:oracle:thin:@localhost:1521:orcl publicstaticf ...
- Origin null is not allowed by Access-Control-Allow-Origin
http://www.cnblogs.com/accessking/archive/2012/05/12/2497000.html http://bbs.csdn.net/topics/3903099 ...
- 单片机Keil软件仿真与调试技巧
一.引言 单片机软件开发过程中,软件调试遇到的各种问题常令初学者感到不知所措.实际上.各种仿真开发软件的程序调试基本方法和技巧大同小异,掌握正确的程序调试基本技巧.对于排查这些程序错误问题可以起到举一 ...
- (转载)Mac和iOS开发资源汇总—更新于2013-07-19
(转载)http://beyondvincent.com/2013/07/18/resources-for-mac-and-ios-developers/ 小引 本文主要汇集一些苹果开发的资源,会经常 ...