redhat7.4安装gitlab

Posted smilingeye

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了redhat7.4安装gitlab相关的知识,希望对你有一定的参考价值。

1.参考官方安装指南

https://about.gitlab.com/install/#centos-7

2.遇到的问题

2.1.启动postfix出错

错误内容

Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.

查看出错命令

 systemctl status postfix.service

错误内容

● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 五 2019-07-26 09:41:05 CST; 22s ago
  Process: 35784 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)
  Process: 35782 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
  Process: 35775 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=75)

7月 26 09:41:03 172.16.1.187 aliasesdb[35775]: /usr/sbin/postconf: warning: valid_hostname: numeric hostname: 172.16.1.187
7月 26 09:41:03 172.16.1.187 aliasesdb[35775]: /usr/sbin/postconf: fatal: unable to use my own hostname
7月 26 09:41:04 172.16.1.187 aliasesdb[35775]: newaliases: warning: valid_hostname: numeric hostname: 172.16.1.187
7月 26 09:41:04 172.16.1.187 aliasesdb[35775]: newaliases: fatal: unable to use my own hostname
7月 26 09:41:04 172.16.1.187 postfix[35784]: warning: valid_hostname: numeric hostname: 172.16.1.187
7月 26 09:41:04 172.16.1.187 postfix[35784]: fatal: unable to use my own hostname
7月 26 09:41:05 172.16.1.187 systemd[1]: postfix.service: control process exited, code=exited status=1
7月 26 09:41:05 172.16.1.187 systemd[1]: Failed to start Postfix Mail Transport Agent.
7月 26 09:41:05 172.16.1.187 systemd[1]: Unit postfix.service entered failed state.
7月 26 09:41:05 172.16.1.187 systemd[1]: postfix.service failed.

执行命令

vim /etc/postfix/main.cf

在main.cf文件里加入

myhostname = mail.mydomain.com

技术图片

重新执行启动postfix命令

sudo systemctl start postfix

2.2修改ip与port

安装官方安装步骤执行命令后

sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ce

修改配置文件

sudo vim /etc/gitlab/gitlab.rb

修改或者添加

unicorn[port]=9000
external_url http://172.1.16.144:9000

执行重启命令

gitlab-ctl reconfigure
gitlab-ctl restart

访问地址

http://172.16.1.144:9000/

 

以上是关于redhat7.4安装gitlab的主要内容,如果未能解决你的问题,请参考以下文章

redhat7.4安装svn

gitlab迁移

0470-?????????Redhat7.4??????CDH5.16.1

redhat7.4修改yum 源为CentOS网易yum源

redhat7.4 docker run启动容器报错container_linux.go:449

ORA-12514:TNS 监听问题