网站建设 官网,芜湖的网站建设公司,妇科医院网站建设,黄页网站怎么查这里我们为gitlab服务器准备一台虚拟机#xff1a;192.168.19.6-gitlab服务器
在code阶段#xff0c;我们需要将不同版本的代码存储到一个仓库中#xff0c;常见的版本控制工具就是SVN或者Git#xff0c;这里我们采用Git作为版本控制工具#xff0c;GitLab作为远程仓库。…这里我们为gitlab服务器准备一台虚拟机192.168.19.6-gitlab服务器
在code阶段我们需要将不同版本的代码存储到一个仓库中常见的版本控制工具就是SVN或者Git这里我们采用Git作为版本控制工具GitLab作为远程仓库。
Git傻瓜式安装
2.1、gitlab安装
单独准备服务器采用Docker安装。这里需要先安装好docker和docker-compose 拉取gitlab镜像
docker pull gitlab/gitlab-ce 编写docker-compose.yml文件
在/usr/local/docker/gitlab-docker目录下编写docker-compose.yml文件文件的具体内容如下
external_url: 按照docker-compose的服务的IP地址 version: 3.1
services:gitlab:image: gitlab/gitlab-ce:latestcontainer_name: gitlabrestart: alwaysenvironment:GITLAB_OMNIBUS_CONFIG: |external_url http://192.168.19.6:8929gitlab_rails[gitlab_shell_ssh_port] 2224ports:- 8929:8929- 2224:2224volumes:- ./config:/etc/gitlab- ./logs:/var/log/gitlab- ./data:/var/opt/gitlab 启动docker-compose [rootlocalhost docker]# docker-compose up -d
Creating network docker_default with the default driver
Creating gitlab ... done 访问GitLab首页 在浏览器上输入192.168.19.6:8929 账号使用root密码eHxJVXetYyhvoeMOg88kPVgSz8gA9IESSKhRJAWI 查看root用户的初始密码 [rootlocalhost docker]# docker exec -it gitlab cat /etc/gitlab/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 hasnt been changed manually, either via UI or via command line.
#
# If the password shown here doesnt work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.
Password: eHxJVXetYyhvoeMOg88kPVgSz8gA9IESSKhRJAWI
# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours 从这里可以看出gitlab的root账号的初始密码是:eHxJVXetYyhvoeMOg88kPVgSz8gA9IESSKhRJAWI 修改密码为a897546s 可以修改为自己喜欢的密码 http://192.168.19.6:8929/-/profile/password/edit