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

加强公司内部网站建设中国建设银行属于什么类型网站

加强公司内部网站建设,中国建设银行属于什么类型网站,十大微信小程序游戏,门户网站建设需求前言 本文记录下基于docker安装gitlab并重置管理员密码的过程。 作为记录的同时也希望能帮助到需要的朋友们。 搭建过程 1. 准备好docker环境并启动docker [rootslave-node1 docker-gitlab]# docker version Client:Version: 18.06.1-ceAPI version: 1.38…

前言

本文记录下基于docker安装gitlab并重置管理员密码的过程。

作为记录的同时也希望能帮助到需要的朋友们。

搭建过程

1. 准备好docker环境并启动docker

[root@slave-node1 docker-gitlab]# docker version
Client:Version:           18.06.1-ceAPI version:       1.38Go version:        go1.10.3Git commit:        e68fc7aBuilt:             Tue Aug 21 17:23:03 2018OS/Arch:           linux/amd64Experimental:      falseServer:Engine:Version:          18.06.1-ceAPI version:      1.38 (minimum version 1.12)Go version:       go1.10.3Git commit:       e68fc7aBuilt:            Tue Aug 21 17:25:29 2018OS/Arch:          linux/amd64Experimental:     false
[root@slave-node1 docker-gitlab]# systemctl status docker
● docker.service - Docker Application Container EngineLoaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)Active: active (running) since Wed 2023-08-09 11:39:10 CST; 2h 6min agoDocs: https://docs.docker.comMain PID: 1870 (dockerd)Tasks: 88Memory: 115.1MCGroup: /system.slice/docker.service├─1870 /usr/bin/dockerd├─1878 docker-containerd --config /var/run/docker/containerd/containerd.toml├─9827 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 13888 -container-ip 172.17.0.2 -container-port 80├─9841 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 13443 -container-ip 172.17.0.2 -container-port 443├─9853 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 13222 -container-ip 172.17.0.2 -container-port 22└─9862 docker-containerd-shim -namespace moby -workdir /var/lib/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/46fecc380b118c78b1ac8ff45f...
....省略部分日志

2. 创建文件夹并运行容器

# 新建文件夹用于存储数据和日志
mkdir -p /opt/docker-gitlab
# 拉取镜像、创建并运行容器
docker run -d -p 13443:443 -p 13888:80 -p 13222:22 --name gitlab --restart always -v /opt/docker-gitlab/config:/etc/gitlab -v /opt/docker-gitlab/logs:/var/log/gitlab -v /opt/docker-gitlab/data:/var/opt/gitlab gitlab/gitlab-ce

首次启动过程比较慢,可以通过docker logs -f gitlab --tail 200实时查看启动日志。

3. 尝试访问

启动完成后访问服务器ip:13888即可看到gitlab首页
登录页面
​ 默认密码不清楚,网上很多说法是用户名是root, 密码是: 5iveL!fe 我试了下是进不去的,可能是版本升级后更换了默认密码吧。

补充说明:

后面在研究单点登录配置的时候发现在宿主机的/opt/docker-gitlab/config目录下存在initial_root_password这个文件,文件中包含了root密码,第一次登录可以使用这个密码,亲测有效。登录后建议还是要修改这个默认密码。

文件内容如下:

[root@slave-node1 config]# pwd
/opt/docker-gitlab/config
[root@slave-node1 config]# ls -ll
total 176
-rw-------. 1 root root 128291 Aug  9 11:52 gitlab.rb
-rw-------. 1 root root  19103 Aug  9 13:52 gitlab-secrets.json
-rw-------. 1 root root    749 Aug  9 11:52 initial_root_password
-rw-------. 1 root root    513 Aug  9 11:52 ssh_host_ecdsa_key
-rw-r--r--. 1 root root    179 Aug  9 11:52 ssh_host_ecdsa_key.pub
-rw-------. 1 root root    411 Aug  9 11:52 ssh_host_ed25519_key
-rw-r--r--. 1 root root     99 Aug  9 11:52 ssh_host_ed25519_key.pub
-rw-------. 1 root root   2602 Aug  9 11:52 ssh_host_rsa_key
-rw-r--r--. 1 root root    571 Aug  9 11:52 ssh_host_rsa_key.pub
drwxr-xr-x. 2 root root      6 Aug  9 11:53 trusted-certs
[root@slave-node1 config]# cat initial_root_password 
# WARNING: This value is valid only in the following conditions
#          1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
#          2. Password hasn't been changed manually, either via UI or via command line.
#
#          If the password shown here doesn't work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.# 没错这个就是root对应的初始密码了。
Password: 3dlrX3hiA4RebgqVU7f44I1f7l2jeNThEGYjxjVp/Uw=# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.

4. 修改ROOT密码

修改密码需要使用gitlab自带的控制台命令行工具,需要进入到容器中执行。

[root@slave-node1 docker-gitlab]# docker exec -it gitlab bash
root@ac5a942b141f:/# cd /opt/gitlab/
root@ac5a942b141f:/opt/gitlab# ls -ll
total 19972
-rw-r--r--.  1 root root  7854098 Jan  4  2022 LICENSE
drwxr-xr-x.  2 root root     4096 Jan  4  2022 LICENSES
drwxr-xr-x.  2 root root     4096 Jan  4  2022 bin
-rw-r--r--.  1 root root 12510625 Jan  4  2022 dependency_licenses.json
drwxr-xr-x. 18 root root     4096 Aug  9 05:52 embedded
drwxr-xr-x. 11 root root     4096 Aug  9 05:53 etc
drwxr-xr-x.  2 root root     4096 Aug  9 05:53 init
drwxr-xr-x.  2 root root     4096 Jan  4  2022 licenses
drwxr-xr-x.  2 root root     4096 Aug  9 05:53 service
drwxr-xr-x. 17 root root     4096 Aug  9 05:53 sv
drwxr-xr-x.  3 root root       18 Aug  9 05:52 var
-rw-r--r--.  1 root root    31571 Jan  4  2022 version-manifest.json
-rw-r--r--.  1 root root    12062 Jan  4  2022 version-manifest.txt
root@ac5a942b141f:/opt/gitlab# gitlab-rails console
--------------------------------------------------------------------------------Ruby:         ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]GitLab:       14.6.1 (661d663ab2b) FOSSGitLab Shell: 13.22.1PostgreSQL:   12.7
--------------------------------------------------------------------------------
Loading production environment (Rails 6.1.4.1)
irb(main):001:0> user=User.find_by(username:'root')
=> #<User id:1 @root>
irb(main):002:0> user.password='xxxxxxx'
=> "xxxxxxx"
irb(main):003:0> user.password_confirmation='xxxxxxx'
=> "xxxxxxx"
irb(main):004:0> user.save!
=> true
irb(main):005:0> exit
root@ac5a942b141f:/opt/gitlab# exit
exit

简单来说就是进入到命令行—>找到用户—>设置密码—>设置确认密码—>保存并退出。跟http请求逻辑有点像。

这样就完成了密码重置,可以重新访问http://ip:13888 使用root和修改后的密码登录,亲测有效。

当然这个方法修改任何一个存在的用户密码应该都是可行的。

gitlab首页展示

到此基于docker搭建的gitlab就完成了。

总结

本文简单记录了基于docker搭建gitlab环境的过程,同时提供了修改密码的过程。

针对以上内容有任何疑问或者建议欢迎留言评论~

创作不易,欢迎一键三连~~

http://www.yayakq.cn/news/688598/

相关文章:

  • 福州专业网站建设网络公司我做的静态网站怎么发布到网上
  • 东莞凤岗哪里有学做网站的在那个网站做义工好
  • 微信开发 微网站开发的详细流程php网站后台怎么进
  • dedecms产品展示织梦模板(营销型网站)响应式网站 英语
  • 音乐网站禁止做浅度链接个人可以做电影网站吗
  • 个人交互式网站备案古田路9号设计网站
  • 沈阳做网站优秀公司网页设计结课报告
  • 国外做家装的网站有哪些网站建设报告
  • 网站建设方案 下载808影院网
  • 网站建设新规wordpress自定义弹窗
  • 河南企业网站优化外包自建网站阿里云备案通过后怎么做
  • 企业网站开发协议微信怎么制作网页
  • 厦门高端网站建设公司湖南现在有什么网站做农副产品
  • 厦门建网站网址网站备案审核制度
  • 朝阳网站seo杭州网站建设书生商友
  • 做网站平台国外可以做自媒体的网站
  • 东莞网站建设公司制作网站个人网站可以做淘宝客网站吗
  • 网站建设需要的流程im聊天软件开发
  • 重庆专业的网站建设公司html5网络公司网站模板
  • 南京网站制作设计公司安装discuz x 3.1 网站虚拟主机的要求
  • 网站建设报价单表格天津企业展厅设计公司
  • 网站的做网站公司出口网站建设方案
  • 手机老是下载一些做任务的网站建设020网站需要多少钱
  • 天津 交友 网站建设做业务的网站
  • linuxvps建站教程青岛企业名录大全
  • 商务网站创建经费预算网站建设的运营计划
  • 用php源码如何建设网站浏览器游戏网址
  • 电商网站建设论文参考文献wordpress 主页 插件
  • 怎么快速推广网站如何设置中国建设银行网站
  • 专业做网文的网站有哪些苏州网站建设哪家快