zoukankan      html  css  js  c++  java
  • centos7搭建gitlab版本控制系统

    一. 配置centos7网络

    查看本地ip地址的方法: ip addr

    a) 修改对应网卡的DNS的配置文件

    sudo vi /etc/resolv.conf 
    修改以下内容

    nameserver 8.8.8.8 #google域名服务器
    nameserver 8.8.4.4 #google域名服务器

    b) 修改对应网卡的网关的配置文件
    sudo vi /etc/sysconfig/network

    修改以下内容
    NETWORKING=yes(表示系统是否使用网络,一般设置为yes。如果设为no,则不能使用网络,而且很多系统服务程序将无法启动)
    HOSTNAME=centos (设置本机的主机名,这里设置的主机名要和/etc/hosts中设置的主机名对应, 不需要想网址(centos.google.com)一样写全)
    GATEWAY=192.168.1.1(设置本机连接的网关的IP地址。例如,网关为10.0.0.2)

    c) 修改对应网卡的IP地址的配置文件

    sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0

    修改以下内容

    DEVICE=eth0 #描述网卡对应的设备别名,例如ifcfg-eth0的文件中它为eth0
    BOOTPROTO=static #设置网卡获得ip地址的方式,可能的选项为static,dhcp或bootp,分别对应静态指定的 ip地址,通过dhcp协议获得的ip地址,通过bootp协议获得的ip地址
    BROADCAST=192.168.0.255 #对应的子网广播地址
    HWADDR=00:07:E9:05:E8:B4 #对应的网卡物理地址
    IPADDR=12.168.1.2 #如果设置网卡获得 ip地址的方式为静态指定,此字段就指定了网卡对应的ip地址
    IPV6INIT=no
    IPV6_AUTOCONF=no
    NETMASK=255.255.255.0 #网卡对应的网络掩码
    NETWORK=192.168.1.0 #网卡对应的网络地址
    ONBOOT=yes #系统启动时是否设置此网络接口,设置为yes时,系统启动时激活此设备

    二. 安装 gitlab

    1. Install and configure the necessary dependencies

    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. Add the GitLab package server and install the package

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

    3. Configure and start GitLab

    sudo gitlab-ctl reconfigure

    4. Browse to the hostname and login

    On your first visit, you'll be redirected to a password reset screen to provide the password for the initial administrator account. Enter your desired password and you'll be redirected back to the login screen.

    The default account's username is root. Provide the password you created earlier and login. After login you can change the username if you wish.


  • 相关阅读:
    ASP.NET实现年月日三级联动(局部刷新)
    通过ip地址获取当前地理位置
    Microsoft.Practices.Unity 给不同的对象注入不同的Logger
    sqlserver 数据库里面金额类型为什么不建议用float,实例告诉你为什么不能。
    bindingredirect 没有效果
    Expression构建DataTable to Entity 映射委托
    windows 2003 远程桌面 连接输入账号密码后,只能看见蓝色屏幕和鼠标
    vmware workstation 10.0.1 install mac os mavericks
    教师节我的专属祝福方式!
    信盈达学员学习心得
  • 原文地址:https://www.cnblogs.com/yugengde/p/7220122.html
Copyright © 2011-2022 走看看