centos git lab

Running handlers:
There was an error running gitlab-ctl reconfigure:
execute[/opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8] (postgresql::enable line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
—- Begin output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 —-
STDOUT: The files belonging to this database system will be owned by user “gitlab-psql”.
This user must also own the server process.
解决方法:
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo dpkg-reconfigure locales

2.1配置访问路径
点击Setting up a domain name/URL
,此处有官方文档详细的配置说明,小弟在此处也是也此文档为说明,在安装结束之后,在此配置文件中/etc/gitlab/gitlab.rb修改如下:
external_url “http://gitlab.example.com”

例如本人设置的如下:
external_url ‘http://10.200.80.255’设置完成之后:

重置配置
sudo gitlab-ctl reconfigure
重启gitlab服务
sudo gitlab-ctl restart此时,在浏览器汇总输入http://10.800.80.255默认端口是80,就能访问到gitlab的首页了,初始化会让你设置管理员密码。此时使用:
root+你设置的密码就能访问。

2.2配置访问端口
有的时候默认的80端口被占用了,需要你更改端口,官网中说道:
Setting the NGINX listen port:
By default NGINX will listen on the port specified in external_url or implicitly use the right port (80 for HTTP, 443 for HTTPS). If you are running GitLab behind a reverse proxy, you may want to override the listen port to something else. For example, to use
port 8081:
nginx[‘listen_port’] = 8081

同理,在配置文件中/etc/gitlab/gitlab.rb修改如下:
nginx[‘listen_port’] = 8081

作者:社会你song哥
链接:https://www.jianshu.com/p/75590f1ae35b

发表评论

关闭菜单