1. 安装ssh 命令:sudo yum install -y curl policycoreutils-pythonopenssh-server
2. 将SSH服务设置成开机自启动 命令:
sudo systemctl enable sshd
3. 启动SSH服务 启动命令:sudo systemctl start sshd 查看启动状态:sudo systemctl status sshd
4.接下来,安装Postfix以发送通知邮件 命令:sudo systemctl start postfix
5.启动postfix 命令:sudo systemctl start postfix
6. 添加gitlab镜像 命令:wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm (如无安装wget命令 需要安装 命令:yum -y install wget)
7. 安装Pyhthon环境 命令:yum install policycoreutils-python
8.安装gitlab 命令:rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
9.修改gitlab配置文件指定服务器ip和自定义端口 命令:vi /etc/gitlab/gitlab.rb
10.重置并启动GitLab 命令:
sudo gitlab-ctl reconfigure
11.重启:sudo gitlab-ctl restart
12.访问:http://192.168.71.245:8888/ (如出现无法访问的情况 防火墙问题 关闭防火墙或安全组配置访问端口即可)
13.修改密码并创建用户:
初始账户: root 密码:5iveL!fe
修改密码(至少8位) rootroot
创建用户 hezhipeng 12345678(设置权限)