|NO.Z.00014|——————————|CloudNative|——|CI/CD&GitLab操作 .V04|——|GitLab.UI初始化|
一、GItlab.UI初始化
### --- 登录gitlab
~~~ Chrome: http://10.10.10.11/,
~~~ 然后 change password: 并使用root用户登录

二、gitlab修改账户密码
### --- 设置超级管理员用户密码
[root@server11 ~]# gitlab-rails console production
irb(main):001:0> user = User.where(id: 1).first
=> #<User id:1 @root> // id为1的是超级管理员
irb(main):002:0> user.password = '1qaz2wsx'
=> "1qaz2wsx" // 密码必须至少8个字符
irb(main):003:0> user.save! // 如没有问题 返回true
exit // 退出
### --- gitlab常用操作
[root@server11 ~]# gitlab-ctl start // 启动所有 gitlab 组件;
[root@server11 ~]# gitlab-ctl stop // 停止所有 gitlab 组件;
[root@server11 ~]# gitlab-ctl restart // 重启所有 gitlab 组件;
[root@server11 ~]# gitlab-ctl status // 查看服务状态;
[root@server11 ~]# gitlab-ctl reconfigure // 初始化服务;
[root@server11 ~]# vim /etc/gitlab/gitlab.rb // 修改默认的配置文件;
[root@server11 ~]# gitlab-ctl tail // 查看日志;
三、登录gitlab后台管理

### --- 修改nginx.port
~~~ 如果需要手工修改nginx的port ,可以在gitlab.rb中设置 nginx['listen_port'] = 8000 ,
~~~ 然后再次 gitlab-ctl reconfigure即可
四、登录 gitlab 如下所示(首次登陆设置 root 密码):

五、gitlab配置一
### --- gitlab配置一
~~~ 去掉用户的自动注册功能(安全)
~~~ ——>admin are -> settings -> Sign-up Restrictions 去掉钩钩,
~~~ 然后拉到最下面保存,重新登录

### --- Gitlab配置二:
~~~ 创建gitlab项目组
~~~ 创建项目组:组名为Jenkins

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
——W.S.Landor
分类:
cdv015-jenkins2
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)