gitlab-8.9.9安装和汉化

下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

开始安装

[root@linuxea-com ~]# yum install gitlab-ce-8.8.9-ce.0.el7.x86_64.rpm -y
[root@linuxea-com ~]# cat /etc/gitlab/gitlab.rb|grep 'http://10.0.1.61'
external_url 'http://10.0.1.61'
[root@linuxea-com ~]#  gitlab-ctl reconfigure
[root@linuxea-com ~]#  gitlab-ctl stop
ok: down: gitlab-workhorse: 1s, normally up
ok: down: logrotate: 0s, normally up
ok: down: nginx: 1s, normally up
ok: down: postgresql: 0s, normally up
ok: down: redis: 0s, normally up
ok: down: sidekiq: 0s, normally up
ok: down: unicorn: 0s, normally up

下载中文补丁

[root@linuxea-com ~]# git clone https://gitlab.com/larryli/gitlab.git Gitlab-cn && cd Gitlab-cn

查看版本

[root@linuxea-com Gitlab-cn]#  cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
8.9.9
[root@linuxea-com ~/sourceGitlab]# git diff origin/8-8-stable origin/8-8-zh > /tmp/8.8.diff

回车,提示输入y即可

[root@linuxea-com ~/sourceGitlab]# patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/8.9.9.diff
[root@linuxea-com ~/sourceGitlab]# gitlab-ctl start

不要被中文登陆界面所误导,登陆进去你看到的将会是中英交互模式....请下载8.8.0完美汉化

重新安装清理:

1,gitlab-ctl uninstall
2,rm -rf /etc/gitlab/* /var/log/gitlab/ /var/opt/gitlab/ /opt/gitlab/

web密码重置:gitlab-rails console production

irb(main):011:0> user = User.where(id:1).first
=> #<User id: 1, email: "admin@example.com", encrypted_password: "$2a$10$hnGIO79zr4ldahTwWVK4OOb9RQvV5Z1q.SaWjeIg/E....", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, created_at: "2017-01-12 03:37:45", updated_at: "2017-01-12 03:49:19", name: "Administrator", admin: true, projects_limit: 10, skype: "", linkedin: "", twitter: "", authentication_token: "WzXKZNQ3vr3JMeCMvyBR", theme_id: 2, bio: nil, failed_attempts: 4, locked_at: nil, username: "root", can_create_group: true, can_create_team: false, state: "active", color_scheme_id: 1, password_expires_at: nil, created_by_id: nil, last_credential_check_at: nil, avatar: nil, confirmation_token: nil, confirmed_at: "2017-01-12 03:37:45", confirmation_sent_at: nil, unconfirmed_email: nil, hide_no_ssh_key: false, website_url: "", notification_email: "admin@example.com", hide_no_password: false, password_automatically_set: false, location: nil, encrypted_otp_secret: nil, encrypted_otp_secret_iv: nil, encrypted_otp_secret_salt: nil, otp_required_for_login: false, otp_backup_codes: nil, public_email: "", dashboard: 0, project_view: 0, consumed_timestep: nil, layout: 0, hide_project_limit: false, unlock_token: nil, otp_grace_period_started_at: nil, ldap_email: false, external: false>
irb(main):012:0> user.password = 'admincom'
=> "admincom"
irb(main):013:0> user.save! 
=> true
irb(main):014:0> 
0 分享

您可以选择一种方式赞助本站

支付宝扫码赞助

支付宝扫码赞助

日期: 2017-01-12分类: 持续集成

标签: GitLab

发表评论