• 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.


  • 相关阅读:
    服务方式加载卸载NT驱动函数集
    《Windows核心编程》学习笔记(12)– 虚拟内存
    《Windows核心编程》学习笔记(14)– 堆
    数据库连接错误:提示TCP端口1433,sql server 2008 Connection refused:connect
    Windows驱动开发技术详解笔记
    Struts2文件上传的大小限制问题
    pragma comment的使用 pragma预处理指令详解
    解决FastCGI Error Error Number: 2147467259 (0x80004005). 和 Error Number: 1073741819 (0xc0000005).
    PHP中的日期处理
    mysql远程连接10061错误
  • 原文地址:https://www.cnblogs.com/yugengde/p/7220122.html
Copyright © 2020-2023  润新知