标签:make 执行 overwrite 开发语言 -- 日志 tag ble tun
1 [root@localhost src]# vim /etc/yum.repos.d/gitlab-ce.repo 2 [gitlab-ce] 3 name=gitlab-ce 4 baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ 5 repo_gpgcheck=0 6 gpgcheck=0 7 enabled=1 8 gpgkey=https://packages.gitlab.com/gpg.key
1 [root@localhost src]# yum makecache 2 [root@localhost src]# yum install curl openssh-server openssh-clients postfix cronie -y
1 [root@localhost src]# systemctl start postfix 2 [root@localhost src]# systemctl enable postfix
1 [root@localhost src]# yum install gitlab-ce -y #自动安装最新版 2 或者 3 [root@localhost src]# yum install gitlab-ce-x.x.x -y #安装指定版本 4 或者安装下载好的版本 5 [root@localhost src]# yum install gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm -y
1 [root@localhost src]# gitlab-ctl reconfigure
1 [root@localhost src]# vim /etc/gitlab/gitlab.rb 2 external_url ‘http://192.168.32.12/‘ 3 或者 4 external_url ‘http://域名/‘ 5 [root@localhost src]# gitlab-ctl reconfigure
1 1)首先将/etc/gitlab/gitlab.rb文件中的192.168.1.24全部替换为gitlab.kevin.com 2 [root@code-server gitlab]# vim /etc/gitlab/gitlab.rb 3 external_url ‘http://192.168.1.24‘ 4 改为: 5 external_url ‘http://gitlab.kevin.com‘ 6 2)其次将下面两文件中的192.168.1.24全部替换为gitlab.kevin.com 7 /var/opt/gitlab/gitlab-shell/config.yml 8 /var/opt/gitlab/gitlab-rails/etc/gitlab.yml 9 下面两文件都是上面两文件的软链接,修改上面两个文件即可 10 [root@code-server gitlab]# ll /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml 11 lrwxrwxrwx 1 root root 43 Nov 9 18:00 /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml -> /var/opt/gitlab/gitlab-rails/etc/gitlab.yml 12 [root@code-server gitlab]# ll /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml 13 lrwxrwxrwx 1 root root 43 Nov 9 18:00 /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml -> /var/opt/gitlab/gitlab-rails/etc/gitlab.yml 14 3)然后将下面文件中的192.168.1.24全部替换为gitlab.kevin.com 15 /var/opt/gitlab/nginx/conf/gitlab-http.conf 16 4)最后执行"gitlab-ctl reconfigure"命令使之配置生效(注意最好不要执行"gitlab-ctl restart",只执行本命令即可)
1 默认时GitLab的仓库存储位置在“/var/opt/gitlab/git-data/repositories” 2 [root@localhost src]# cp /etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb.bak 3 [root@localhost src]# vim /etc/gitlab/gitlab.rb 4 #启用git_data_dirs参数,并修改如下: 5 git_data_dirs({ 6 "default" => { 7 "path" => "/data/git-data" 8 } 9 }) 10 [root@localhost src]# gitlab-ctl reconfigure 11 12 登陆默认用户名:root 密码需要重新设置
1 [root@localhost src]# gitlab-ctl stop 2 [root@localhost src]# git clone https://gitlab.com/xhang/gitlab.git # 克隆最新汉化版本 3 或者 4 [root@localhost src]# git clone https://gitlab.com/xhang/gitlab.git -b v10.8.2-zh # 克隆指定汉化版本 5 [root@localhost src]# yum install git patch -y # 安装git patch 6 [root@localhost src]# cd /root/gitlab 7 [root@localhost src]# git diff v10.8.2 v10.8.2-zh >/tmp/10.8.2-zh.diff 8 [root@localhost src]# patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/10.8.2-zh.diff 9 一路回车(不知道有没有问题,报错可忽略) 10 或者(然后) 11 [root@localhost src]# cd /opt/gitlab/embedded/service/gitlab-rails 12 [root@localhost src]# git apply /tmp/10.8.2-zh.diff 13 [root@localhost src]# gitlab-ctl start # 启动 14 如果失败: 15 [root@localhost src]# gitlab-ctl reconfigure
1 [root@localhost src]# yum install -y git 2 [root@localhost src]# tar zxf gitlab-11-4-stable-zh.tar.gz 3 [root@localhost src]# \cp -rf gitlab-11-4-stable-zh/* /opt/gitlab/embedded/service/gitlab-rails/ 4 cp: cannot overwrite non-directory `/opt/gitlab/embedded/service/gitlab-rails/log‘ with directory `gitlab-v10.7.0-zh/log‘ 5 cp: cannot overwrite non-directory `/opt/gitlab/embedded/service/gitlab-rails/tmp‘ with directory `gitlab-v10.7.0-zh/tmp‘ 6 此报错不用管,因为已经设置root密码,登录过,所以会报错。 7 [root@localhost src]# gitlab-ctl reconfigure
1 gitlab-ctl start # 启动所有 gitlab 组件; 2 gitlab-ctl stop # 停止所有 gitlab 组件; 3 gitlab-ctl restart # 重启所有 gitlab 组件; 4 gitlab-ctl status # 查看服务状态; 5 gitlab-ctl reconfigure # 启动服务; 6 vim /etc/gitlab/gitlab.rb # 修改默认的配置文件; 7 gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab; 8 gitlab-ctl tail #查看日志
1 [root@localhost src]# vim /etc/gitlab/gitlab.rb 2 gitlab_rails[‘ldap_enabled‘] = true 3 gitlab_rails[‘ldap_servers‘] = YAML.load <<-‘EOS‘ 4 main: 5 label: ‘LDAP‘ 6 host: ‘172.16.128.22‘ 7 port: 389 8 uid: ‘sAMAccountName‘ 9 bind_dn: ‘cn=administrator,cn=users,dc=www,dc=example,dc=com‘ 10 password: ‘password‘ 11 active_directory: true 12 allow_username_or_email_login: false 13 block_auto_created_users: false 14 base: ‘dc=www,dc=example,dc=com‘ 15 encryption: ‘plain‘ 16 EOS
1 [root@localhost src]# gitlab-ctl reconfigure
1 [root@localhost src]# gitlab-rake gitlab:ldap:check[200]
1 Git 全局设置 2 git config --global user.name "guoyunzong" 3 git config --global user.email "guoyunzong@sayms.com" 4 5 创建新版本库 6 git clone http://192.168.32.12/dev/test.git 7 cd test 8 touch README.md 9 git add README.md 10 git commit -m "add README" 11 git push -u origin master 12 13 已存在的文件夹 14 cd existing_folder 15 git init 16 git remote add origin http://192.168.32.12/dev/test.git 17 git add . 18 git commit -m "Initial commit" 19 git push -u origin master 20 21 已存在的 Git 版本库 22 cd existing_repo 23 git remote rename origin old-origin 24 git remote add origin http://192.168.32.12/dev/test.git 25 git push -u origin --all 26 git push -u origin --tags
标签:make 执行 overwrite 开发语言 -- 日志 tag ble tun
原文地址:https://www.cnblogs.com/gyz0517/p/10358657.html