侧边栏

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.16.1.144:9000'

执行重启命令

gitlab-ctl reconfigure
gitlab-ctl restart

访问地址

http://172.16.1.144:9000/

 3.汉化(待解决)

汉化地址:https://gitlab.com/xhang/

这是一个gitlab仓库地址可以下载gitlab的安装包,和带gitlab中文的安装包。因为我安装的gitlab是12.1.1,上面最新的是12.0.4,没有找到对应版本。

附几个汉化的博客,其处理思路基本为将/opt/gitlab/embedded/service/gitlab-rails/路径下的内容替换为汉化版本的。

https://www.cnblogs.com/cheng95/p/8037865.html

https://www.cnblogs.com/heyonggang/p/7778203.html

https://www.cnblogs.com/eos666/p/8858882.html

posted on 2019-07-26 11:25  SmilingEye  阅读(804)  评论(0编辑  收藏  举报

导航