首页 > 系统相关 >Linux 安装 GitLab

Linux 安装 GitLab

时间:2022-12-15 18:45:00浏览次数:49  
标签:GitLab -- com gitlab ce https Linux 安装

*********************************************************************************
官网:https://about.gitlab.com/
        Product ——> Install GitLab ——> 选择安装环境CentOS(此出安装命令是收费的ee版本)
            ——> 到底下选择 CE or EE ——> Community Edition ——> CentOS 

一、安装依赖:dnf install -y curl policycoreutils openssh-server openssh-clients
    开机启动:systemctl enable sshd
    启动:systemctl start sshd
    添加http/https服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效
        firewall-cmd --permanent --add-service=http
        firewall-cmd --permanent --add-service=https
    重启防火墙:systemctl reload firewalld

    与邮件通知相关的Postfix组件其实可以暂时不用安装和配置,这个可以放到后面再来配置一个外部的SMTP服务器:
    安装: dnf install postfix
    开机启动:systemctl enable postfix
    启动:systemctl start postfix
二、
    添加GitLab包存储库 和安装:
    curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash
    下载并安装:EXTERNAL_URL="https://gitlab.example.com" dnf install -y gitlab-ce  速度很慢,可选择下方方式
  或
    外部下载gitlab可选择版本:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8
    wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-14.6.1-ce.0.el8.x86_64.rpm
    安装:rpm -i gitlab-ce-14.6.1-ce.0.el8.x86_64.rpm
三、
    编辑外部访问地址:修改配置文件:vim /etc/gitlab/gitlab.rb 中 EXTERNAL_URL的值
    # grep -i 'EXTERNAL_URL' /etc/gitlab/gitlab.rb 在文件中找内容 EXTERNAL_URL
        external_url 'https://gitlab.zz.com'   
        git_data_dirs({ "default" => { "path" => "/data/gitlabData" } })  (配置GitLab 数据保存路径)
        
        启动后在路径etc/gitlab下生成密码初始文件initial_root_password
        gitlab默认占用80端口,修改文件 /var/opt/gitlab/nginx/conf/gitlab-http.conf

    刷新配置:gitlab-ctl reconfigure
    停止:gitlab-ctl stop
    重启:gitlab-ctl restart
    
修改本地hosts文件   192.168.58.128   gitlab.zz.com

本地访问:http://gitlab.zz.com/ 账号root 查看密码: cat etc/gitlab/initial_root_password

或通过find / -name initial_root_password 查找文件所在位置
登录后先修改密码:admin123
************************************************************************************************************
添加 SSH Keys
  本地安装Git
  查看公约或生成: Git Bash Here 
    1.输入:cd ~/.ssh
    2.然后输入ls查看秘钥列表:如果没有看到id_ras.pub 文件说明没有配置,这个文件是公共ssh秘钥;
    3.如果没有,输入:cd  ~     然后输入:ssh-keygen.exe 然后按回车,再次按回车,在回车,按三次回车,就可生成密钥id_rsa.pub,使用记事本打开复制内容,添加到远程仓库的ssh密钥中;

创建项目:创建分支:
    变更默认分支:{projectName} ——> Repository ——>branches ——>project settings ——> Default branch
    
    添加User: Menu ——>Admin ——>overview ——>Users
    
    人员授权:Menu ——>Admin ——>overview ——>Projects ——> {projectName}——> Manage access

 

git config --global user.name "myname" 
git config --global user.email "[email protected]"

标签:GitLab,--,com,gitlab,ce,https,Linux,安装
From: https://www.cnblogs.com/zhey/p/16985821.html

相关文章

  • Rocky Linux9.1 手动配置静态IP
    #修改网络的配置文件[root@zabbix~]#vim/etc/NetworkManager/system-connections/ens192.nmconnection[connection]id=ens192uuid=0572911c-bd45-33c3-9442-c896e0320......
  • 使用Rsync在 Linux 上传输文件的示例
    在Linux操作系统上,“rsync”代表远程同步同步。它是用于将文件和目录从源(SRC)同步(复制)到目标(DEST)的实用程序。文件和目录可以在本地主机上同步,也可以在远程主机上......
  • 自制linux系统
    附加一块磁盘并进行分区,至少分区2个,一个用于/boot一个用于根目录/在将创建的分区进行格式化并挂载在/mnt/boot和/mnt/root下分别代表为根目录和boot目录对磁盘464个字节......
  • Linux 常用命令整理
    【常用命令】  查询当前时间:date  修改时间:tzselect #根据提示输入编号  显示当前绝对路径:pwd  重启系统:reboot  在指定文件中查找某内容:grep"某......
  • Linux安装 nginx
    安装nginx:在linux下安装nginx,首先需要安装gcc-c++编译器。执行文件make和安装nginx依赖的pcre和zlib包。最后安装nginx即可。  yum-yinstallmake  yum-y......
  • Linux 安装 Jdk1.8
    1、下载:jdk1.8.0_131-linux-64.tar.gz2、解压:tar-zxvfjdk1.8.0_131-linux-64.tar.gz3、修改环境变量:vi/etc/profile   到文件最低部添加:     exportJA......
  • Linux 安装 Flink
    文档:https://ifeve.com/flink-quick-start/下载地址:https://flink.apache.org/downloads.html下载:https://dlcdn.apache.org/flink/flink-1.15.1/flink-1.15.1-bin-scal......
  • Docker安装和基本原理及镜像管理
    一、Docker概述1.1IT架构的演进:裸金属→虚拟机→容器→函数化、代码化   云计算涌现出很多改变传统IT架构和运维方式的新技术,比如虚拟机、容器、微服务......
  • jmeter安装
    jmeter下载地址(注意jdk版本要1.8+)https://jmeter.apache.org/download_jmeter.cgijmeter添加环境变量系统环境变量中添加JMETER_HOME在path中添加D:\soft\jmete......
  • [ Linux ] 线程独立栈,线程分离,Linux线程互斥
    1.线程栈我们使用的线程库是用户级线程库(pthread),我们使用lddmythread可以查看mythread的链接信息。因此对于一个线程(tast_struct)都是通过在共享空间内执行pthread_crea......