Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
fd86bf4a
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fd86bf4a
编写于
10月 25, 2012
作者:
R
randx
提交者:
Dmitriy Zaporozhets
10月 25, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Decouple requirements and install
上级
5ff6fadc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
117 addition
and
112 deletion
+117
-112
doc/databases.md
doc/databases.md
+75
-0
doc/installation.md
doc/installation.md
+14
-112
doc/requirements.md
doc/requirements.md
+28
-0
未找到文件。
doc/databases.md
0 → 100644
浏览文件 @
fd86bf4a
# Databases:
GitLab use mysql as default database but you are free to use PostgreSQL or SQLite.
## SQLite
sudo apt-get install -y sqlite3 libsqlite3-dev
## MySQL
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
# Login to MySQL
$ mysql -u root -p
# Create the GitLab production database
mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
# Create the MySQL User change $password to a real password
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password';
# Grant proper permissions to the MySQL User
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost';
## PostgreSQL
sudo apt-get install -y postgresql-9.2 postgresql-server-dev-9.2
# Connect to database server
sudo -u postgres psql -d template1
# Add a user called gitlab. Change $password to a real password
template1=# CREATE USER gitlab WITH PASSWORD '$password';
# Create the GitLab production database
template1=# CREATE DATABASE IF NOT EXISTS gitlabhq_production;
# Grant all privileges on database
template1=# GRANT ALL PRIVILEGES ON DATABASE gitlabhq_production to gitlab;
# Quit from PostgreSQL server
template1=# \q
# Try connect to new database
$ su - gitlab
$ psql -d gitlabhq_production -U gitlab
#### Select the database you want to use
# SQLite
sudo -u gitlab cp config/database.yml.sqlite config/database.yml
# Mysql
sudo -u gitlab cp config/database.yml.mysql config/database.yml
# PostgreSQL
sudo -u gitlab cp config/database.yml.postgres config/database.yml
# make sure to update username/password in config/database.yml
#### Install gems
# mysql
sudo -u gitlab -H bundle install --without development test sqlite postgres --deployment
# or postgres
sudo -u gitlab -H bundle install --without development test sqlite mysql --deployment
# or sqlite
sudo -u gitlab -H bundle install --without development test mysql postgres --deployment
doc/installation.md
浏览文件 @
fd86bf4a
## Platform requirements:
_This installation guide created for Debian/Ubuntu and properly tested._
**The project is designed for the Linux operating system.**
It may work on FreeBSD and Mac OS, but we don't test our application for these systems and can't guarantee stability and full functionality.
We officially support (recent versions of) these Linux distributions:
-
Ubuntu Linux
-
Debian/GNU Linux
It should work on:
-
Fedora
-
CentOs
-
RedHat
You might have some luck using these, but no guarantees:
-
MacOS X
-
FreeBSD
GitLab does
**not**
run on Windows and we have no plans of making GitLab compatible.
## Hardware:
We recommend to use server with at least 1GB RAM for gitlab instance.
## This installation guide created for Debian/Ubuntu and properly tested.
_Checkout requirements before setup_
### IMPORTANT
### IMPORTANT
...
@@ -39,6 +10,7 @@ Only create a GitHub Issue if you want a specific part of this installation guid
...
@@ -39,6 +10,7 @@ Only create a GitHub Issue if you want a specific part of this installation guid
Also read the
[
Read this before you submit an issue
](
https://github.com/gitlabhq/gitlabhq/wiki/Read-this-before-you-submit-an-issue
)
wiki page.
Also read the
[
Read this before you submit an issue
](
https://github.com/gitlabhq/gitlabhq/wiki/Read-this-before-you-submit-an-issue
)
wiki page.
- - -
# Basic setup
# Basic setup
...
@@ -103,12 +75,9 @@ Create user for GitLab:
...
@@ -103,12 +75,9 @@ Create user for GitLab:
# ubuntu/debian
# ubuntu/debian
sudo adduser --disabled-login --gecos 'gitlab system' gitlab
sudo adduser --disabled-login --gecos 'gitlab system' gitlab
Add your user
to the
`git`
group
:
Add your user
s to groups
:
sudo usermod -a -G git gitlab
sudo usermod -a -G git gitlab
Add
`git`
user to
`gitlab`
group:
sudo usermod -a -G gitlab git
sudo usermod -a -G gitlab git
Generate key:
Generate key:
...
@@ -190,12 +159,19 @@ and ensure you have followed all of the above steps carefully.
...
@@ -190,12 +159,19 @@ and ensure you have followed all of the above steps carefully.
cd gitlab
cd gitlab
# Rename config files
# Rename config files
#
sudo -u gitlab cp config/gitlab.yml.example config/gitlab.yml
sudo -u gitlab cp config/gitlab.yml.example config/gitlab.yml
# Copy mysql db config
# Copy mysql db config
#
# make sure to update username/password in config/database.yml
# make sure to update username/password in config/database.yml
#
sudo -u gitlab cp config/database.yml.mysql config/database.yml
sudo -u gitlab cp config/database.yml.mysql config/database.yml
# Copy unicorn config
#
sudo -u gitlab cp config/unicorn.rb.example config/unicorn.rb
#### Install gems
#### Install gems
cd /home/gitlab/gitlab
cd /home/gitlab/gitlab
...
@@ -208,9 +184,6 @@ and ensure you have followed all of the above steps carefully.
...
@@ -208,9 +184,6 @@ and ensure you have followed all of the above steps carefully.
sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
#### Copy unicorn config
sudo -u gitlab cp config/unicorn.rb.example config/unicorn.rb
#### Setup GitLab hooks
#### Setup GitLab hooks
...
@@ -275,7 +248,7 @@ GitLab autostart:
...
@@ -275,7 +248,7 @@ GitLab autostart:
sudo /etc/init.d/nginx restart
sudo /etc/init.d/nginx restart
# Done! Visit
**YOUR_SERVER_FQDN**
for gitlab instance
# Done! Visit
YOUR_SERVER
for gitlab instance
You can login via web using admin generated with setup:
You can login via web using admin generated with setup:
...
@@ -283,6 +256,8 @@ You can login via web using admin generated with setup:
...
@@ -283,6 +256,8 @@ You can login via web using admin generated with setup:
5iveL!fe
5iveL!fe
- - -
# Advanced setup tips:
# Advanced setup tips:
...
@@ -318,76 +293,3 @@ a different host, you can configure its connection string in the
...
@@ -318,76 +293,3 @@ a different host, you can configure its connection string in the
**Ok - we have a working application now. **
**Ok - we have a working application now. **
**But keep going - there are some things that should be done **
**But keep going - there are some things that should be done **
# Database
## SQLite
sudo apt-get install -y sqlite3 libsqlite3-dev
## MySQL
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
# Login to MySQL
$ mysql -u root -p
# Create the GitLab production database
mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
# Create the MySQL User change $password to a real password
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password';
# Grant proper permissions to the MySQL User
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost';
## PostgreSQL
sudo apt-get install -y postgresql-9.2 postgresql-server-dev-9.2
# Connect to database server
sudo -u postgres psql -d template1
# Add a user called gitlab. Change $password to a real password
template1=# CREATE USER gitlab WITH PASSWORD '$password';
# Create the GitLab production database
template1=# CREATE DATABASE IF NOT EXISTS gitlabhq_production;
# Grant all privileges on database
template1=# GRANT ALL PRIVILEGES ON DATABASE gitlabhq_production to gitlab;
# Quit from PostgreSQL server
template1=# \q
# Try connect to new database
$ su - gitlab
$ psql -d gitlabhq_production -U gitlab
#### Select the database you want to use
# SQLite
sudo -u gitlab cp config/database.yml.sqlite config/database.yml
# Mysql
sudo -u gitlab cp config/database.yml.mysql config/database.yml
# PostgreSQL
sudo -u gitlab cp config/database.yml.postgres config/database.yml
# make sure to update username/password in config/database.yml
#### Install gems
# mysql
sudo -u gitlab -H bundle install --without development test sqlite postgres --deployment
# or postgres
sudo -u gitlab -H bundle install --without development test sqlite mysql --deployment
# or sqlite
sudo -u gitlab -H bundle install --without development test mysql postgres --deployment
doc/requirements.md
0 → 100644
浏览文件 @
fd86bf4a
## Platform requirements:
**The project is designed for the Linux operating system.**
It may work on FreeBSD and Mac OS, but we don't test our application for these systems and can't guarantee stability and full functionality.
We officially support (recent versions of) these Linux distributions:
-
Ubuntu Linux
-
Debian/GNU Linux
It should work on:
-
Fedora
-
CentOs
-
RedHat
You might have some luck using these, but no guarantees:
-
MacOS X
-
FreeBSD
GitLab does
**not**
run on Windows and we have no plans of making GitLab compatible.
## Hardware:
We recommend to use server with at least 1GB RAM for gitlab instance.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录