本文共 2204 字,大约阅读时间需要 7 分钟。
版本控制介绍
版本控制是指对软件开发过程中各种程序代码,配置文件及说明文档等文件变更的管理,是软件配置管理的核心思想之一。版本控制最主要的功能就是追踪文件的变更。
版本控制的另一个重要功能是并行开发。软件开发往往是多人协同作业,版本控制可以有效地解决版本的同步以及不同开发者之间的开发通信问题,提高协同开发的效率。
版本控制是软件配置管理的核心功能。
常用的版本控制工具:
gitlabsubversion
gitlab部署//配置yum源[root@yanyinglai ~]# cd /etc/yum.repos.d/[root@yanyinglai yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo[root@yanyinglai ~]# sed -i 's/\$releasever/7/g' /etc/yum.repos.d/CentOS7-Base-163.repo[root@yanyinglai ~]# sed -i 's/^enabled=.*/enabled=1/g' /etc/yum.repos.d/CentOS7-Base-163.repo[root@yanyinglai ~]# yum -y install epel-release//安装git[root@yanyinglai ~]# yum -y install epel-release git//安装依赖包[root@yanyinglai ~]# yum -y install curl openssh-server openssh-clients postfix cronie policycoreutils-python//启动postfix服务并设置开机自启[root@yanyinglai ~]# systemctl restart postfix[root@yanyinglai ~]# systemctl enable postfix下载gitlab的rpm包[root@yanyinglai ~]# cd /usr/src/[root@yanyinglai src]# lsdebug kernels[root@yanyinglai src]#wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm[root@yanyinglai ~]# cd /usr/src/[root@yanyinglai src]# lsdebug kernels[root@yanyinglai src]# lsdebug gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm kernels//安装gitlab[root@yanyinglai src]# rpm -ivh gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm//修改配置文件[root@yanyinglai ~]# vim /etc/gitlab/gitlab.rbexternal_url 'http://192.168.47.2'//将此处设为gitlab的服务器ip地址或域名//重载配置文件并重启gitlab[root@yanyinglai ~]#gitlab-ctl reconfigure[root@yanyinglai ~]#gitlab-ctl restart//查看当前的gitlab版本[root@yanyinglai ~]# head -1 /opt/gitlab/version-manifest.txtgitlab-ce 11.2.1//设置管理员密码[root@yanyinglai ~]# gitlab-rails console productionirb(main):003:0* user = User.where(id: 1).first #id为1的是超级管理员=> #irb(main):004:0>irb(main):005:0* user.password = '88888888' #密码必须至少8个字符=> "yanyinglai123"irb(main):006:0> user.save! #保存修改Enqueued ActionMailer::DeliveryJob (Job ID: b80ac7d8-afe9-43a7-a4dd-c839cb0fd734) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1=> trueirb(main):007:0> exit #退出
3.gitlab管理
在浏览器中使用gitlab服务器的ip访问,页面如下图所示管理页面如下图所示
转载于:https://blog.51cto.com/13910274/2171368