ps: 修改ip
_gitlab_conf() {
yum -y install epel-release
yum -y install git
yum -y install curl openssh-server openssh-clients postfix cronie policycoreutils-python-utils
systemctl enable --now postfix
cd /usr/src/
wget https://mirrors.bfsu.edu.cn/gitlab-ce/yum/el8/gitlab-ce-14.3.2-ce.0.el8.x86_64.rpm
rpm -ivh gitlab-ce-14.3.2-ce.0.el8.x86_64.rpm
sed -i 's|^external_url|#external_url|' /etc/gitlab/gitlab.rb
cat >> /etc/gitlab/gitlab.rb <<EOF
external_url 'http://192.168.143.102'
EOF
gitlab-ctl reconfigure
cat /etc/gitlab/initial_root_password
}
_gitlab_conf