|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
 
                     
                    
                 
                    
                 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号 
