redhat7.4安装gitlab

匿名 (未验证) 提交于 2019-12-02 23:52:01

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/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!