CentOS7安装gitlab+汉化
mini安装centos7
更新yum源
- yum -y install net-tools wget lrzsz lsof
- mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
- cd /etc/yum.repos.d/
- wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
- yum clean all
- yum makecache
- yum -y update
- yum -y install pcre pcre-devel openssl openssl-devel gcc-c++
- yum -y install curl policycoreutils openssh-server openssh-clients postfix vim
- firewall-cmd --permanent --add-service=http
- systemctl reload firewalld
添加GitLab镜像源并安装
vim /etc/yum.repos.d/gitlab_gitlab-ce.repo [gitlab-ce] name=gitlab-ce baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7 repo_gpgcheck=0 gpgcheck=0 enabled=1 gpgkey=https://packages.gitlab.com/gpg.key
安装git
yum -y install gitlab-ce
配置gitlab
vim /etc/gitlab/gitlab.rb # 编辑对外的域名(gitlab.papamk.com请添加A记录指向本服务器的公网IP): external_url 'http://192.168.1.249/'
重新编译gitlab
gitlab-ctl reconfigure
汉化gitlab
cd /home wget https://gitlab.com/xhang/gitlab/-/archive/11-0-stable-zh/gitlab-11-0-stable-zh.tar.gz tar -zxvf gitlab-11-0-stable-zh.tar.gz
由于复制过多覆盖需要确认,所以把~/.bashrc进行修改
vi ~/.bashrc 注销cp命令 #alias cp='cp -i' source ~/.bashrc
覆盖gitlab的所有页面
cp -rf ./gitlab-11-0-stable-zh/* /opt/gitlab/embedded/service/gitlab-rails/
重新编译gitlab
gitlab-ctl reconfigure
启动gitlab
gitlab-ctl start
查看是否启动
netstat -tpln tcp 0 0 127.0.0.1:9100 0.0.0.0:* LISTEN 18040/node_exporter tcp 0 0 127.0.0.1:9229 0.0.0.0:* LISTEN 18022/gitlab-workho tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 18185/unicorn maste tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 18035/nginx: master tcp 0 0 127.0.0.1:9168 0.0.0.0:* LISTEN 18018/ruby tcp 0 0 127.0.0.1:8082 0.0.0.0:* LISTEN 18153/sidekiq 5.1.3 tcp 0 0 127.0.0.1:9236 0.0.0.0:* LISTEN 17999/gitaly tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 12972/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1312/master tcp 0 0 0.0.0.0:8060 0.0.0.0:* LISTEN 18035/nginx: master tcp 0 0 0.0.0.0:6783 0.0.0.0:* LISTEN 17993/alertmanager tcp 0 0 127.0.0.1:9121 0.0.0.0:* LISTEN 18143/redis_exporte tcp 0 0 127.0.0.1:9090 0.0.0.0:* LISTEN 18130/prometheus tcp 0 0 127.0.0.1:9187 0.0.0.0:* LISTEN 18118/postgres_expo tcp 0 0 127.0.0.1:9093 0.0.0.0:* LISTEN 17993/alertmanager tcp6 0 0 ::1:9168 :::* LISTEN 18018/ruby tcp6 0 0 :::22 :::* LISTEN 12972/sshd tcp6 0 0 ::1:25 :::* LISTEN 1312/master
出现以下这些进程就是正常的了。
打开页面:http://192.168.1.249
相关推荐
etnahh 2014-05-21
道北吴彦祖 2014-01-12
nercon 2020-02-22
NET追求者BLOG 2020-01-06
donghedonghe 2013-05-31
fairytale0 2013-07-19
heavenautumn 2020-05-31
etnahh 2014-07-11
向日葵Solros 2014-07-11
向日葵Solros 2014-07-10
xusong 2014-05-15
CaiKanXP 2019-12-21
shmilyILY 2014-01-14
tndroid 2013-07-04
xixixi 2013-07-04
lfjjia 2013-08-08
bruce 2014-03-07
xiaobaichen 2014-03-01
myspace 2019-11-12