Maison >Opération et maintenance >exploitation et maintenance Linux >Comment configurer le serveur Gitlab sous le système Linux
// 安装技术依赖 yum install -y curl policycoreutils-python openssh-server // 启动ssh服务/设置为开机启动 sudo systemctl enable sshd sudo systemctl start sshd
// 安装 postfix sudo yum install -y postfix // 启动 postfix 并设置为开机启动 sudo systemctl enable postfix sudo systemctl start postfix
yum install firewalld systemd -y
// 开放 ssh、http 服务 sudo firewall-cmd --add-service=ssh --permanent sudo firewall-cmd --add-service=http --permanent // 设置防火墙规则 sudo firewall-cmd --reload
Adresse miroir : https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce -13.1.2-ce.0.el7.x86_64.rpm
L'image est un peu grande et le téléchargement est lent En fonction de la vitesse du réseau, vous devez attendre quelques minutes ou plus Minutes
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-13.1.2-ce.0.el7.x86_64.rpm
Le processus d'installation prendra un certain temps, veuillez patienter. patiemment. Si l'image suivante apparaît, l'installation est réussie#🎜 🎜#
rpm -ivh gitlab-ce-13.1.2-ce.0.el7.x86_64.rpm
// 输入编辑命令 vim /etc/gitlab/gitlab.rb // 通过 vim 编辑命名找到 32 行 // 修改访问 URL // 格式:external_url 'http://ip:端口' external_url 'http://119.29.xx.xxx:8081'
# 🎜🎜#
// 开放 8081、8082 端口 firewall-cmd --permanent --zone=public --add-port=8081/tcp firewall-cmd --permanent --zone=public --add-port=8082/tcp // 重新加载防火墙配置 firewall-cmd --reload
7. Réinitialiser Gitlab (laisser la configuration modifiée prendre effet)
Le processus de réinitialisation peut prendre quelques minutes, attendez patiemment !
// 重置 gitlab gitlab-ctl reconfigure // 解决重置过程中卡住问题 systemctl restart gitlab-runsvdir
gitlab-ctl start // 启动所有 gitlab 组件; gitlab-ctl stop // 停止所有 gitlab 组件; gitlab-ctl restart // 重启所有 gitlab 组件; gitlab-ctl status // 查看服务状态; gitlab-ctl reconfigure // 刷新配置文件; vim /etc/gitlab/gitlab.rb // 修改默认的配置文件; gitlab-rake gitlab:check SANITIZE=true --trace // 检查gitlab; gitlab-ctl tail // 查看日志;
# 🎜 🎜#
Compte : root
cat /etc/gitlab/initial_root_passworddans le fichier /etc/gitlab/initial_root_password
Ce qui précède est le contenu détaillé de. pour plus d'informations, suivez d'autres articles connexes sur le site Web de PHP en chinois!