centos安装gitlab
1.打开系统防火墙 HTTP 和 SSH 的访问,安装postfix
sudo yum install curl policycoreutils policycoreutils-python openssh-server openssh-clients sudo systemctl enable sshd sudo systemctl start sshd sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
2.下载gitlab rpm安装文件
crul下载:
> curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash > sudo yum install gitlab-ce-10.1.0-ce.0.el7.x86_64
rpm下载
curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.1.0-ce.0.el7.x86_64.rpm rpm -i gitlab-ce-10.1.0-ce.0.el7.x86_64.rpm
如果下载失败,可以到https://packages.gitlab.com/gitlab/gitlab-ce手动下载,再用 rpm的方式自己安装
出现 It looks like… 表示安装成功!
3.配置 gitlab
vi /etc/gitlab/gitlab.rb
把external_url改成部署机器的域名或者IP地址。
4.对GitLab进行重配置 (这一步也是启动 GitLab)
gitlab-ctl reconfigure
遇到的坑:
ruby_block[supervise_redis_sleep] action run,会一直卡无法往下进行
解决方案:
1、按住CTRL+C强制结束;
2、运行:sudo systemctl restart gitlab-runsvdir;
3、再次执行:sudo gitlab-ctl reconfigure
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:db:configure
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20171027-3190-3qzkrj" ----
Ran "bash" "/tmp/chef-script20171027-3190-3qzkrj" returned 1
找不到文件 /var/opt/gitlab/postgresql/.s.PGSQL.5432
怀疑可能是执行的时候没有权限创建
sudo chmod 755 postgresql/
参考:
1.http://blog.csdn.net/u011241606/article/details/51471367
2.https://www.gitlab.cc/installation/#centos-7
3.http://www.cnblogs.com/springwind2006/p/6872773.html
4.https://isempty.me/archives/605
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· SQL Server 2025 AI相关能力初探
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
2012-10-25 DbDomainService<T> 无法自动生成代理类