首页 技术 正文
技术 2022年11月21日
0 收藏 661 点赞 4,808 浏览 994 个字

操作系统:Centos 7

环境:VM虚拟机

  • 0x00:这里说下VM 虚拟机的配置

GitLab 搭建与使用

然后选择NAT模式

GitLab 搭建与使用GitLab 搭建与使用

接下来配置网络

GitLab 搭建与使用

cd /etc/sysconfig/network-scripts/GitLab 搭建与使用GitLab 搭建与使用编辑:vi ifcfg-ens33   改为静态地址:BOOTPROTOt=static开机启动:NOBOOT=yesGitLab 搭建与使用新增网卡信息:GitLab 搭建与使用然后设置物理机地址,调至虚拟机与物理机相互ping通GitLab 搭建与使用

  • 下载安装GitLab

安装ssh

sudo yum install -y curl policycoreutils-pythonopenssh-server

ssh开机启动

sudo systemctl enable sshd

防火墙开启http

sudo firewall-cmd –permanent –add-service=http

安装postfix

sudo yum install postfix

postfix设置开机启动

sudo systemctl enable postfix

安装wget

yum -y install wget

安装gitlab

镜像地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

安装git:

GitLab 搭建与使用

配置gitlab服务器ip和端口:

vi  /etc/gitlab/gitlab.rb

修改红色字体部分为IP和端口:

GitLab 搭建与使用

GitLab 搭建与使用

GitLab 搭建与使用

此处端口设置与上面文件相同

GitLab 搭建与使用

防火墙开启对应端口:

firewall-cmd –permanent –zone=public –remove-port=8090/tcp

GitLab 搭建与使用

下图firewall-cmd –relaod报错原因是单词打错了 应为reload

GitLab 搭建与使用

之前安装的软件记得启动

gitlab-ctlreconfigure

GitLab 搭建与使用

gitlab-ctl restart

GitLab 搭建与使用

GitLab 搭建与使用

  • git的使用

git项目中获取地址后在本地连接远程项目获取代码

GitLab 搭建与使用

连接之后进入文件夹并切换(创建)分支

GitLab 搭建与使用

git pull origin xxxx拉去 xxxx分支 编辑代码添加修改项: git status 查看状态git add xxxxxxxx 添加修改项完成后 git commit 并添加注释GitLab 搭建与使用

 git push origin xxxxxxxx 上传代码到分支xxxxxxxx 

GitLab 搭建与使用

 

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,953
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,478
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,290
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,107
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,739
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,773