linux搭建gitlab服务
安装依赖:
yum install curl openssh-server openssh-clients postfix cronie policycoreutils-python –y
启动postfix,并设置为开机启动:
systemctl start postfix systemctl enable postfix
下载gitlab安装包:
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.2.7-ce.0.el7.x86_**.rpm
安装gitlab下载包:
rpm -ivh gitlab-ce-8.6.7-ce.0.el7.x86_**.rpm
修改配置文件:
vim /etc/gitlab/gitlab.rb 编辑external_url external_url="http://你的gitlab访问网址" 保存退出
加载配置文件并启动:
gitlab-ctl reconfigure 加载配置(每次修改后需要重新加载配置) gitlab-ctl restart 启动
其他常用命令
gitlab-ctl stop 停止服务
gitlab汉化:
停止服务:gitlab-ctl stop 服务器下载git:yum install -y git 下载指定版本汉化包:git clone https://gitlab.com/xhang/gitlab.git -b v10.2.7-zh 下载最新汉化包:git clone https://gitlab.com/xhang/gitlab.git 修改~/.bashrc文件:vim ~/.bashrc 在“alias cp=’cp-i’”前加#注释即可 执行命令:source ~/.bashrc reboot重启服务 克隆文件到需要汉化的地方:cp /gitlab/* /opt/gitlab/embedded/service/gitlab-rails/ -rf gitlab-ctl reconfigure gitlab-ctl restart
您还未登录, 登录 后可进行评论
发表
还没有评论哦,来抢个沙发吧!