Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
Container registry
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
7591718e
提交
7591718e
编辑于
12 years ago
作者:
Riyad Preukschas
浏览文件
操作
下载
补丁
差异文件
Consistently use sudo -u foo -H
上级
78d3611e
No related branches found
No related tags found
无相关合并请求
变更
1
隐藏空白变更内容
行内
左右并排
显示
1 个更改的文件
doc/install/installation.md
+11
-11
11 个添加, 11 个删除
doc/install/installation.md
有
11 个添加
和
11 个删除
doc/install/installation.md
+
11
−
11
浏览文件 @
7591718e
...
...
@@ -83,21 +83,21 @@ Add your users to groups:
Generate key:
sudo
-H
-u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
sudo -u gitlab
-H
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
# 4. Gitolite
Clone GitLab's fork of the Gitolite source code:
sudo
-H
-u git git clone -b gl-v304 https://github.com/gitlabhq/gitolite.git /home/git/gitolite
sudo -u git
-H
git clone -b gl-v304 https://github.com/gitlabhq/gitolite.git /home/git/gitolite
Setup:
cd /home/git
sudo -u git -H mkdir bin
sudo -u git sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'
sudo -u git sh -c 'gitolite/install -ln /home/git/bin'
sudo -u git
-H
sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'
sudo -u git
-H
sh -c 'gitolite/install -ln /home/git/bin'
sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
sudo chmod 0444 /home/git/gitlab.pub
...
...
@@ -107,7 +107,7 @@ Setup:
Permissions:
sudo chmod -R g+rwX /home/git/repositories/
sudo chmod -R
u
g+rwX
s
/home/git/repositories/
sudo chown -R git:git /home/git/repositories/
# clone admin repo to add localhost to known_hosts
...
...
@@ -135,11 +135,11 @@ See doc/install/databases.md
#### Get source code
# Get gitlab code. Use this for stable setup
sudo
-H
-u gitlab git clone -b stable https://github.com/gitlabhq/gitlabhq.git gitlab
sudo -u gitlab
-H
git clone -b stable https://github.com/gitlabhq/gitlabhq.git gitlab
# Skip this for stable setup.
# Master branch (recent changes, less stable)
sudo
-H
-u gitlab git clone -b master https://github.com/gitlabhq/gitlabhq.git gitlab
sudo -u gitlab
-H
git clone -b master https://github.com/gitlabhq/gitlabhq.git gitlab
#### Copy configs
...
...
@@ -148,11 +148,11 @@ See doc/install/databases.md
# Rename config files
#
sudo -u gitlab cp config/gitlab.yml.example config/gitlab.yml
sudo -u gitlab
-H
cp config/gitlab.yml.example config/gitlab.yml
# Copy unicorn config
#
sudo -u gitlab cp config/unicorn.rb.example config/unicorn.rb
sudo -u gitlab
-H
cp config/unicorn.rb.example config/unicorn.rb
#### Install gems
...
...
@@ -172,7 +172,7 @@ Git requires a username and email in order to be able to do that.
#### Setup application
sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
sudo -u gitlab
-H
bundle exec rake gitlab:app:setup RAILS_ENV=production
#### Setup GitLab hooks
...
...
@@ -184,7 +184,7 @@ Git requires a username and email in order to be able to do that.
Checking status:
sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production
sudo -u gitlab
-H
bundle exec rake gitlab:app:status RAILS_ENV=production
# OUTPUT EXAMPLE
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录