centos 6.5 安装gitlab安装注意的问题分析以及解决方法

centos 6.5 安装gitlab安装注意的问题分析以及解决方法,第1张

删除按照官网进行 *** 作,环境为centos 6.5

注意安装过程中执行命令

sudo gitlab-ctl reconfigure

出现错误,在/etc/gitlab/gitlab.rb 中修改域名后再执行一次方可启动成功

 

 

 

 

进页面提示502,用命令

sudo gitlab-ctl tail postgresql

查看提示内存不足,官方也是建议1g内存进行搭建,512m的话也可以安装但是要添加swap,不然启动后就会提示内存不足,我目前是512的,添加swap后访问成功,但是有点慢可能,还是升为1g了。

上图是我目前的配置,注意这里修改了gitlab默认的仓库存储路径,

Storing Git data in an alternaTIve directory

我这里贴出来给大家看看

# Prevent users from wriTIng to the repositories while you move them.

sudogitlab-ctl stop

# Only move 'repositories'; 'gitlab-satellites' will be recreated

# automaTIcally. Note there is _no_ slash behind 'repositories', but there _is_ a

# slash behind 'git-data'.

sudorsync -av /var/opt/gitlab/git-data/repositories /mnt/nas/git-data/

# Fix permissions if necessary

sudogitlab-ctl reconfigure

# Double-check directory layout in /mnt/nas/git-data. Expected output:

# gitlab-satellites repositories

sudols /mnt/nas/git-data/

# Done! Start GitLab and verify that you can browse through the repositories in

# the web interface.

sudogitlab-ctl start

 

可以看到这是安装完成后gitlab一些文件和数据的路径

看到网上很多资料都不对,可能是过时了,所以搞gitlab建议大家还是以官网为主,说不定你在看我这个文章的时候也过时了

Omnibus-gitlab uses four different directories.

/opt/gitlab holds applicaTIon code for GitLab and its dependencies.

/var/opt/gitlab holds application data and configuration files that gitlab-ctl reconfigure writes to.

/etc/gitlab holds configuration files for omnibus-gitlab. These are the only files that you should ever have to edit manually.

/var/log/gitlab contains all log data generated by components of omnibus-gitlab.

有错误的时候尽量用 

sudo gitlab-ctl tail 

查看日志分析错误原因,我在配置邮件的时候也是试了很久才用上

接下来我们来配置邮件,我这里使用SMTP,用腾讯企业邮箱

还是修改/etc/gitlab/gitlab.rb 配置文件,再次提醒网上很多文章可以已经过时了

gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.exmail.qq.com" gitlab_rails['smtp_port'] = 25 gitlab_rails['smtp_user_name'] = "[email protected]" gitlab_rails['smtp_password'] = "password" gitlab_rails['smtp_domain'] = "exmail.qq.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true gitlab_rails['gitlab_email_from'] = '[email protected]' ##修改gitlab配置的发信人 user["git_user_email"] = "[email protected]"
保持发信人和登录邮箱一致,我配置这里的时候也出错了,原因是我在看腾讯官网时候写的是用的SSL,端口是465

但是gitlab好像不是用的ssl,gitlab的教程里也没找到是否启用ssl的配置,我也没去深究了,于是把端口号改为25,邮件发送成功。

大家在测试邮件的时候可以用忘记密码来发送邮件测试,然后用gitlab-ctl tail来查看,大概等1分钟就能看到发送邮件的日志,出错了再具体分析原因

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/dianzi/2525590.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-08-05
下一篇 2022-08-05

发表评论

登录后才能评论

评论列表(0条)

保存