sudo yum install -y curl policycoreutils-python openssh-server postfix
#启动sshd并配置开机启动 sudo systemctl enable sshd sudo systemctl start sshd #启动postfix并配置开机启动 sudo systemctl enable postfix sudo systemctl start postfix #防火墙放行http、https sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https #从新加载防火墙 sudo systemctl reload firewalld
清华大学源地址:https://mirrors.tuna.tsinghua.edu.cn/python
直接在服务器上下载git
cd /tmp && wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.3.5-ce.0.el7.x86_64.rpm
或者下载到本地的wondows机器再上传到服务器vim
一、安装gitlab服务器
rpm -ivh gitlab-ce-12.3.5-ce.0.el7.x86_64.rpm
二、修改配置文件 /etc/gitlab/gitlab.rbssh
vim /etc/gitlab/gitlab.rb
把图中的域名改为本身的域名或者ipcurl
sed -i "/^external_url/c external_url 'http://192.168.0.107:168' " /etc/gitlab/gitlab.rb
配置邮箱帐号
配置邮箱smtp
三、从新加载gitlab 的配置文件ide
gitlab-ctl reconfigure
首次加载配置文件时间有点长gitlab
四、gitlab 命令post
#gitlab 启动 gitlab-ctl start #gitlab 中止 gitlab-ctl stop #查看gitlab 状态 gitlab-ctl status
五、访问 http://192.168.0.107:168 设置管理员密码,登陆gitlaburl