iis服务器助手广告广告
返回顶部
首页 > 资讯 > 操作系统 >Linux怎么搭建GitLab
  • 767
分享到

Linux怎么搭建GitLab

2023-06-28 08:06:25 767人浏览 安东尼
摘要

这篇文章主要介绍了linux怎么搭建gitLab的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇Linux怎么搭建GitLab文章都会有所收获,下面我们一起来看看吧。Linux搭建gitlab具体步骤以root

这篇文章主要介绍了linux怎么搭建gitLab的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇Linux怎么搭建GitLab文章都会有所收获,下面我们一起来看看吧。

Linux怎么搭建GitLab

Linux搭建gitlab具体步骤

以root 身份进行登录linux

1.先安装相关依赖:

 sudo yum install -y curl policycoreutils-python openssh-server  2.开启SSH 开机自启动 sudo systemctl enable sshd  sudo systemctl start sshd3.防火墙永久开放Http sudo firewall-cmd --permanent --add-service=http  sudo systemctl reload firewalld(注释防火墙停止重启:systemctl start/stop/reload firewalld) 4.

安装postfix,设置postfix开机自启,并启动,postfix支持gitlab发信功能

   yum install postfix

 systemctl enable postfix

 systemctl start postfix

下载gitlab:

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

安装(linux内存至少2g官方建议4g内存你配置linux内存的时候): mkdir /usr/local/gitlab

rpm -ivh gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

Linux怎么搭建GitLab

修改gitlab配置文件的服务器地址和端口,配置项:external_url,注意端口占用问题以及防火墙开通端口8989:

vi  /etc/gitlab/gitlab.rb

## GitLab URL ##! URL on which GitLab will be reachable. ##! For more details on configuring external_url see: ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab external_url ‘http://192.168.81.129:8989‘

永久开放端口8989:

firewall-cmd –permanent –add-port=8989/tcp

重启防火墙,运行命令: firewall-cmd –reload

查看端口号是否开启,运行命令: firewall-cmd –query-port=8989/tcp

重新启动gitlab配置文件

gitlab-ctl reconfigure gitlab-ctl restart

以上两个完成现实分别如下:

Running handlers: Running handlers complete Chef Client finished, 362/515 resources updated in 04 minutes 18 seconds gitlab Reconfigured!

[root@hostuser gitlab]# gitlab-ctl restart ok: run: gitaly: (pid 26240) 1s ok: run: gitlab-monitor: (pid 26261) 0s ok: run: gitlab-workhorse: (pid 26264) 1s ok: run: logrotate: (pid 26314) 0s ok: run: Nginx: (pid 26322) 1s ok: run: node-exporter: (pid 26334) 0s ok: run: postgres-exporter: (pid 26341) 0s ok: run: postgresql: (pid 26350) 0s ok: run: prometheus: (pid 26359) 0s ok: run: redis: (pid 26375) 1s ok: run: Redis-exporter: (pid 26379) 0s ok: run: sidekiq: (pid 26387) 0s ok: run: unicorn: (pid 26397) 0s

进入页面地址栏点击你设置的ip:8989

密码至少8位 adminadmin建议

默认用户名root ,输入密码adminadmin

Linux怎么搭建GitLab

关于“Linux怎么搭建GitLab”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“Linux怎么搭建GitLab”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注编程网操作系统频道。

--结束END--

本文标题: Linux怎么搭建GitLab

本文链接: https://www.lsjlt.com/news/318073.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作