zoukankan      html  css  js  c++  java
  • Gitlab的安装与配置

    gitlab的安装

          参考治疗:https://www.gitlab.com.cn/installation/#centos-7

                         http://www.21yunwei.com/archives/4351

        1.安装并配置必要的依赖关系

                如果你想使用 Postfix 发送邮件,请在安装过程中根据提示选择 'Internet Site'。 你也可以用 Sendmail 或者 配置一个自定义的 SMTP 服务 并 把它作为一个 SMTP 服务器。

          在 CentOS 系统上,下面的命令将会打开系统防火墙 HTTP 和 SSH 的访问。

    sudo yum install curl policycoreutils 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 镜像源并安装

    curl -sS http://packages.gitlab.com.cn/install/gitlab-ce/script.rpm.sh | sudo bash
    sudo yum install gitlab-ce
     

    如果你不太习惯使用命令管道的方式安装镜像仓库,你可以在这里找到 完整的安装脚本 或者 选择系统对应的安装包 使用下面的命令手动安装

    curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-XXX.rpm
    rpm -i gitlab-ce-XXX.rpm
    3.配置并启动 GitLab

    sudo gitlab-ctl reconfigure
     4.密码修改

    第一次访问 GitLab(http://IP)默认端口是80,系统会重定向 url 到重置密码的页面,你需要输入初始化管理员账号的密码。 设置完成后,系统会重定向到登录界面,你就可以使用刚才输入的密码登录系统了。低版本gitlab默认用户名和密码:root/5iveL!fe

    系统默认的管理员账号为 root, 登录系统后,你可以修改管理员账号为自己喜欢的账号。

    5.修改Domain到Ip

    把localhost 换成本机的IP地址,修改方式如下,在gitlab的/embedded/service/gitlab-rails/config的目录下修改gitlab.yum文件:

    cd /opt/gitlab/embedded/service/gitlab-rails/config
    sudo vim gitlab.yml  


    修改该完成后重新启动Gitlab

    sudo gitlab-ctl restart

  • 相关阅读:
    GridView 配合模板实现 合并单元格(多列)
    Parse和Convert的区别
    'EntityValidationErrors' property for more details
    This 在 C# 中的含义
    C# 之 深入理解using
    尝试从数据库进行更新时,遇到..
    处理远程桌面不能复制粘贴解决办法
    Can't load AMD 64-bit .dll on a IA 32-bit platform错误
    MyBatis笔试题
    MyBatis延迟加载和缓存
  • 原文地址:https://www.cnblogs.com/justuntil/p/10353157.html
Copyright © 2011-2022 走看看