1.安装ssh
sudo yum install -y curl policycoreutils-python openssh-server
2.将SSH服务设置成开机自启动,安装命令:
- sudo systemctl enable sshd *
3.启动SSH服务,
安装命令:
sudo systemctl start sshd
4.接下来,安装Postfix以发送通知邮件,
安装命令:
sudo yum install postfix
5.将postfix服务设置成开机自启动,
安装命令:
sudo systemctl enable postfix
- 启动postfix,
安装命令:
sudo systemctl start postfix
7.添加gitlab镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
安装gitlab 安装命令:
rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
4.修改gitlab配置文件指定服务器ip和自定义端口:
vim /etc/gitlab/gitlab.rb
修改端口
5.重置并启动GitLab
gitlab-ctl reconfigure
gitlab-ctl restart
6.添加公钥至gitlab
添加公匙
git remote add origin git@git-node1:root/git_demo.gitxxx
网友评论