Centos7 Gitlab 私有服务记录

前不久整了台小点的服务器,就开始作了,以下实时记录作死过程:


首先,贴上GitLab Installation,这个是Gitlab官方给出的私有化指导


1. 安装并配置必要的依赖关系

为了练习,我重新安装了需要的firewalld以及firewall-cmd。

sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd

sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

以下是问题记录:

1、配置firewalld

安装完成后可以输入”sudo systemctl start firewalld”启动防火墙服务,然后果不其然,出错了,输入 “sudo systemctl status firewalld” 查看firewalld状态,如图:
这里写图片描述
解决方法:

vim /usr/sbin/firewalld

将首行 “#!/usr/bin/python -Es” 修改为 “#!/usr/bin/python2.7 -Es” ,这是因为 firewalld 文件是用基于 python2.7 的脚本,而我的python版本是python3

  • 大家可以用 “ll /usr/bin/python*” 来查看以下python所指向的可执行文件
    这里写图片描述

  • 也可以直接输入 “python” 进入python 交互模式,也可以看到python版本

2、配置firewall-cmd,有类似的问题,同样是因为python版本导致,解决方法相同。
3、配置 postfix 时提示:
这里写图片描述
解决方法:

inet_interfaces = localhost
inet_protocols = all

设为:

inet_interfaces = all   //意为监听网卡的所有IP
inet_protocols = all

现在卡在 gitlab-ctl reconfigure 这一步了,GG
我要死了,一顿操作,现在yum不能用了,报错import的python包版本匹配不上

猜你喜欢

转载自blog.csdn.net/guo_lei_lamant/article/details/80175719