当前位置: 首页 > wzjs >正文

电子科技技术支持东莞网站建设商业策划公司十大公司

电子科技技术支持东莞网站建设,商业策划公司十大公司,微营销网站建设,成都网站开发外包Linux_架构篇 欢迎来到Linux的世界,看笔记好好学多敲多打,每个人都是大神! 题目: 版本号: 1.0,0 作者: 老王要学习 日期: 2025.05.14 适用环境: Rocky9.5 文档说明 本文档聚焦于 Centos7 环境下 GitLab 的搭建与配置。详细介…

Linux_架构篇

欢迎来到Linux的世界,看笔记好好学多敲多打,每个人都是大神!

题目:

版本号: 1.0,0
作者: @老王要学习
日期: 2025.05.14
适用环境: Rocky9.5

文档说明

本文档聚焦于 Centos7 环境下 GitLab 的搭建与配置。详细介绍了硬件、软件要求,涵盖准备环境步骤,如更新缓存、卸载旧内核等,还阐述了网页访问配置流程,包括查看临时密码、登录、设置中文、创建群组用户项目等操作

环境准备

硬件要求

  • 服务器: 2核CPU、2GB内存,20GB硬盘空间
  • 网络: 确保服务器具有固定的IP地址,并且防火墙允许FTP端口(默认22端口)的通信

软件要求

  • 操作系统:Rocky9.5
  • FTP软件:SecureCRT
  • 软件包:gitlab-ce-17.9.7-ce.0.el8.x86_64

一、准备环境

1.1更新缓存关闭防火墙与selinux

dnf updatesystemctl stop firewalld && systemctl disable firewalldsed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/configreboot

1.2卸载旧内核

#查看内核版本
rpm -qa |grep kernel#卸载
dnf remove kernel-modules-core-5.14.0-503.14.1.el9_5.x86_64reboot

1.3添加 GitLab 软件源

#添加GitLab 软件源如下: 
cat>/etc/yum.repos.d/gitlab.repo<<EOF
[gitlab-ce] name=Gitlab CE Repository baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ gpgcheck=0 enabled=1
EOF# 更新软件源信息
dnf makecache#显示系统中已启用的可用软件库
dnf repolist 
#输出如下: 
repo id                            repo name
appstream                          Rocky Linux 9 - AppStream
baseos                             Rocky Linux 9 - BaseOS
extras                             Rocky Linux 9 - Extras
gitlab-ce                          Gitlab CE Repository

1.4安装配置gitlab

#导入下载好的安装包
[root@gitlab01 ~]# ls
anaconda-ks.cfg  gitlab-ce-17.9.7-ce.0.el8.x86_64.rpm#本地安装
dnf -y localinstall gitlab-ce-17.9.7-ce.0.el8.x86_64.rpm #配置gitlab.rb 
sed -i "s/external_url 'http:\/\/gitlab.example.com'/external_url 'http:\/\/192.168.174.10'/" /etc/gitlab/gitlab.rb #重新配置并应用 GitLab 的各项设置
gitlab-ctl reconfigure#启动 GitLab 所依赖的全部服务或者特定服务
gitlab-ctl start#查看端口号是否启动
ss -antpl | grep 80
LISTEN 0      511          0.0.0.0:8060      0.0.0.0:*    users:(("nginx",pid=3103,fd=8),("nginx",pid=3102,fd=8),("nginx",pid=3101,fd=8))
LISTEN 0      4096       127.0.0.1:9236      0.0.0.0:*    users:(("gitaly",pid=3080,fd=11),("gitaly",pid=3080,fd=5))                     
LISTEN 0      1024       127.0.0.1:8080      0.0.0.0:*    users:(("ruby",pid=2906,fd=24),("ruby",pid=2905,fd=24),("ruby",pid=2676,fd=24))
LISTEN 0      128        127.0.0.1:8082      0.0.0.0:*    users:(("ruby",pid=2710,fd=10))                                                
LISTEN 0      128        127.0.0.1:8092      0.0.0.0:*    users:(("ruby",pid=2708,fd=23))                                                
LISTEN 0      511          0.0.0.0:80        0.0.0.0:*    users:(("nginx",pid=3103,fd=7),("nginx",pid=3102,fd=7),("nginx",pid=3101,fd=7))

二、网页访问进行配置

2.1查看gitlab临时密码

grep "Password:" /etc/gitlab/initial_root_password 
#输出如下: 
Password: 9nZIxuuxPuuXcSXiRao0flJYQvQkoxncbRIDa69wd14=

2.2进入gitlab网页进行登录

http://192.168.174.10/

![[Linux实训笔记/5月/image/Pas在这里插入图片描述

2.3配置切换为中文页面

在这里插入图片描述

在这里插入图片描述

2.4修改登录密码(自定义密码)

在这里插入图片描述

2.5创建群组

在这里插入图片描述

2.5.1创建群组

在这里插入图片描述

2.5.2创建群组(dev)——私有——公司团队——创建完成

在这里插入图片描述

2.6创建用户

2.6.1回到主页——添加人员

在这里插入图片描述

2.6.2创建新的用户(项目经理)

在这里插入图片描述

2.6.3给pm添加密码

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

2.6.4登录pm账号

在这里插入图片描述

在这里插入图片描述

2.7同上创建步骤创建用户user1、user2并赋予密码

在这里插入图片描述

在这里插入图片描述

2.8创建好的用户添加到群组并赋予对应权限

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

2.8.1要求pm(项目经理)——所有者

在这里插入图片描述

2.8.2要求user1(成员)——维护者

在这里插入图片描述

2.8.3要求user2(成员)——开发者

在这里插入图片描述

2.8.4添加完的效果如下

在这里插入图片描述

2.8.5为自己上传头像(自己想尝试可以退出当前,登录其他成员账号,根据如下步骤设置适合的头像)

在这里插入图片描述

2.9创建项目

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

2.10添加SSH密钥

# 启动前一章创建git查看秘钥段
[root@git01 ~]# cat /root/.ssh/id_rsa.pub 
#输出如下: 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+peONJ63yFzsBBsZ6Pd+NDlBl91cE+Vd3P5JtYhLw/EwKIMpe6gpvGlJZwTkAdW0BE/HyVj7miibgspn/imhSfXRpj0ZvohVXaLFn7FNsYjyhiKSY0mHT/um/FM1wekwWILcBdRMYPkBgL9t0nGfgoROWsCGHgNAlRh+FT1lCQJmID/Vxq4G4j1bvxw2IMfA8lEzPTLzFkhwwFTfMs+nh09CsIA0QL2I5AQaGNJ2Vy/eWV1hlLIDHzYaAX3eiO56oifMXbB7zBJA2qSGzCsKxSNIRJ0d9ogLXCzi4PfC2K8afcb2UzCEMMSWEmUzkuZIsVMMDf8TTELvGFrx9ulOD root@git01

在这里插入图片描述

2.11回到主页进入项目中

在这里插入图片描述

2.12创建新的库并推送

在这里插入图片描述

#创建新的库
mkdir /tmp/mypm
cd /tmp/mypm/# 从Git远程仓库克隆代码到本地
git clone git@192.168.174.10:dev/my-project01.git
#输出如下: 
Cloning into 'my-project01'...
The authenticity of host '192.168.174.10 (192.168.174.10)' can't be established.
ECDSA key fingerprint is SHA256:Il0oHe9B52faODmM7davM8wp6hS9d9G0ZpIj8EOq75Y.
ECDSA key fingerprint is MD5:8f:ea:88:36:da:8a:eb:1b:85:9e:78:94:ea:52:44:67.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.174.10' (ECDSA) to the list of known hosts.
warning: You appear to have cloned an empty repository.
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>#进入库中写入文件
cd my-project01/
echo "今天也要努力" >>pm.txt# 添加到缓存区
git add .# 添加缓存区
git commit -m "add pm.txt"
#输出如下: 
[master (root-commit) 0f97f01] add pm.txt1 file changed, 1 insertion(+)create mode 100644 pm.txt

2.13推送现有的 Git 仓库

# 创建新的分支main
git switch --create main
#输出如下: 
Switched to a new branch 'main'# 推送到Git仓库
git push --set-upstream origin main
#输出如下: 
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 218 bytes | 218.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To 192.168.174.10:dev/my-project01.git* [new branch]      main -> main
branch 'main' set up to track 'origin/main'.

在这里插入图片描述

http://www.dtcms.com/wzjs/161744.html

相关文章:

  • 北京市丰台区住房和城乡建设委员会网站域名注册免费
  • 如何对网站做渗透上海网站排名优化怎么做
  • 陕西住建厅网站官网长沙网站设计
  • 设计网页怎么插图windows优化大师提供的
  • 百度快照 直接进网站小程序开发费用一览表
  • 做盗版小说网站赚钱嘛全国疫情最新情况最新消息今天
  • 做家旅游的视频网站好凡科建站官网登录
  • 深圳网站优化包年杭州seo网
  • 广州网站建设网站定制互联网广告联盟
  • 合肥网站维护阳城seo排名
  • 免费推广引流怎么做关键词优化seo
  • 长沙网站收录创建网页步骤
  • 珠宝首饰网站建设规划书手机网站关键词seo
  • 外包网站开发多少钱百度关键词推广怎么收费
  • 省交通建设质安监督局网站上海网站建设制作
  • 柬埔寨做赌博网站seo推广的网站和平台有哪些
  • 淘宝网站是怎么做的吗做一个企业网站需要多少钱
  • 柳州网站建设推荐优化疫情二十条措施
  • 旅游推荐网站怎么做友情链接交换群
  • 好的网站开发培训网站友链
  • 沈阳哪里做网站大型seo公司
  • wordpress google 360东莞百度seo排名
  • 建站宝盒nicebox手机版互联网运营培训课程
  • 知名的电子商务网站百度收录网站链接入口
  • 上海设计网站方法北京百度网讯科技有限公司
  • wordpress 一小时建站搜索引擎营销就是seo
  • 商贸公司网站建设合肥网站制作
  • web前端工程师简历seo关键词是什么
  • 中国建设银行新闻网站2345网址导航官网
  • 公司做网站的步骤营销模式和营销策略