Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Merge branch 'build/install-from-package' into 'next'
Browse files Browse the repository at this point in the history
from pull-request 1507

* refs/heads/build/install-from-package:
  README: Add the description for yobi.home
  README: Add the guide to install from binary
  Make yobi.home configurable
  Do not make public/uploadFiles
  config: Fix bugs about handling config files
  Revert "config: Fix config error while starting Yobi"
  build: Fix a bug that conf directory is ignored
  config: Make application.secret more secure
  build: Exclude conf directory while packaging
  Do not start unnecessary services for welcome page
  test: Fix possible test failure of PasswordResetApp
  config: Fix possible NPE of getSystemEmailAddress

Reviewed-by: ์ฑ„์ˆ˜์› <sw.chae@navercorp.com>
  • Loading branch information
doortts committed Mar 12, 2015
2 parents d969d62 + c6ffaad commit 162dd32
Show file tree
Hide file tree
Showing 19 changed files with 386 additions and 149 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ tmp
.idea*
*.iml
dist
public/uploadFiles
uploads
repo/
RUNNING_PID
Expand Down
141 changes: 108 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,47 @@ License
--
Copyright 2015 NAVER Corp. under the Apache License, Version 2.0

## How to install
How to install
--------------

### Check JDK version
### Install from binary

#### Install

Download the latest version of Yobi from http://yobi.io/yobi.zip and unzip it.
If you have wget and unzip:

wget http://yobi.io/yobi.zip
unzip yobi.zip

#### Start

Go the directory and start Yobi. If the directory is yobi-1.0.0:

cd yobi-1.0.0
bin/yobi

**Note**: If you are using Windows, run "bin/yobi.bat" instead of "bin/yobi".

Open http://127.0.0.1:9000 with your web browser then you can see the welcome
page.

#### Upgrade

Download the latest version of Yobi and unzip it.

**Note: Don't overwrite or delete `yobi.h2.db` file, `repo` & `uploads` directory!**

### Build from source

#### Check JDK version

java -version
javac -version

JDK version 7(1.7) or 8(1.8) is required.

### Download Play Activator
#### Download Play Activator

curl -O http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip

Expand All @@ -43,15 +74,15 @@ or using web browser (for windows)

http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip

### Unzip
#### Unzip

unzip typesafe-activator-1.2.10-minimal.zip

### Change directory to unzipped directory
#### Change directory to unzipped directory

cd typesafe-activator-1.2.10-minimal

### Download Yobi
#### Download Yobi

Case1. using [git client](http://git-scm.com/) (recommended)

Expand All @@ -68,11 +99,11 @@ If you want to download one of the stable releases, you can download a compresse

> You can locate your own Yobi directory in any other place. Please note that you must add Play Activator home path to $PATH environment in that case.
### Change directory to cloned Yobi directory (or cd to your unzipped file directory)
#### Change directory to cloned Yobi directory (or cd to your unzipped file directory)

cd yobi

### Run Play Activator
#### Run Play Activator

../activator

Expand All @@ -83,28 +114,23 @@ or (for windows)
Required files will be download automatically. In the first time, it may take about 10 min or more.


### Type start command in console
#### Type start command in console

start -DapplyEvolutions.default=true -Dhttp.port=9000

It will downloaded addtional files and compile sources.

If you want to run Yobi in development mode, use **run**. You can see more detailed errors and can use dynamic compilation.

Also, you can configure start options.
If your system's memory is over than 4G, we recommend to use follow options.

_JAVA_OPTIONS="-Xmx2048m -Xms1024m" activator "start -DapplyEvolutions.default=true -Dhttp.port=9000"

### Connect with browser
#### Connect with browser

http://127.0.0.1:9000

If you want to change port, check your permission to use 80 port

See [http://www.playframework.com/documentation/2.3.6/Production](http://www.playframework.com/documentation/2.3.6/Production)

### Upgrade Yobi
#### Upgrade Yobi

Case1. using git client (recommended)
In installed directory, just type git update command.
Expand All @@ -119,6 +145,20 @@ In installed directory, download latest release file and unzip it.

** Be careful! Don't overwrite or delete `yobi.h2.db` file, `repo` & `uploads` directory! **

### Options

When start yobi, You can specify the home directory that data and configuration
to read from and store into. If you want to use `/home/user/.yobi` as the home
directory, set 'yobi.home' property as follows:

bin/yobi -Dyobi.home=/home/user/.yobi

You can also specify Java options with `_JAVA_OPTIONS` environment variable. If
the memory of your system equals to or greater than 4GB, we recommend to start
Yobi as follows:

_JAVA_OPTIONS="-Xmx2048m -Xms1024m" activator "start -DapplyEvolutions.default=true -Dhttp.port=9000"

### Backup

Copy the below file and directories to another place.
Expand Down Expand Up @@ -159,14 +199,43 @@ Yobi๋Š” Apache 2.0 ๋ผ์ด์„ ์Šค๋กœ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค.

## ์„ค์น˜ํ•˜๊ธฐ

### JDK version ํ™•์ธ
### ๋‹ค์šด๋ฐ›์•„ ์„ค์น˜ํ•˜๊ธฐ

#### ์„ค์น˜

Yobi ์ตœ์‹  ๋ฒ„์ „(http://yobi.io/yobi.zip)์„ ๋‹ค์šด๋ฐ›์•„์„œ ์••์ถ•์„ ํ’‰๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด
wget์œผ๋กœ ๋ฐ›์•„์„œ unzip์œผ๋กœ ์••์ถ•์„ ํ‘ผ๋‹ค๋ฉด:

wget http://yobi.io/yobi.zip
unzip yobi.zip

#### ์‹คํ–‰

์••์ถ•์ด ํ’€๋ฆฐ ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ํ•ด์„œ yobi๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ yobi-1.0.0 ์ด๋ผ๋ฉด:

cd yobi-1.0.0
bin/yobi

**์ฃผ์˜**: ์œˆ๋„์šฐ ์‚ฌ์šฉ์ž๋Š” bin/yobi ๋Œ€์‹  bin/yobi.bat์„ ์‹คํ–‰ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

์ด์ œ ์›น ๋ธŒ๋ผ์šฐ์ €๋กœ http://127.0.0.1:9000 ์— ์ ‘์†ํ•˜๋ฉด ํ™˜์˜ ํŽ˜์ด์ง€๋ฅผ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

#### ์—…๊ทธ๋ ˆ์ด๋“œ

์„ค์น˜ํ•  ๋•Œ์™€ ๋˜‘๊ฐ™์ด, ์ตœ์‹  ๋ฒ„์ „์„ ๋‚ด๋ ค๋ฐ›์•„ Yobi๊ฐ€ ์„ค์น˜๋œ ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์••์ถ•ํŒŒ์ผ์„
ํ’‰๋‹ˆ๋‹ค. **์ฃผ์˜์‚ฌํ•ญ! `yobi.h2.db` ํŒŒ์ผ, `repo`์™€ `uploads` ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์‚ญ์ œํ•˜๊ฑฐ๋‚˜
๋ฎ์–ด์“ฐ์ง€ ์•Š๋„๋ก ์ฃผ์˜ํ•˜์„ธ์š”!**

### ์†Œ์Šค ์ฝ”๋“œ์—์„œ ๋นŒ๋“œํ•˜๊ธฐ

#### JDK version ํ™•์ธ

java -version
javac -version

JDK 7(1.7) ํ˜น์€ 8(1.8) ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

### Play Activator ๋‚ด๋ ค ๋ฐ›๊ธฐ
#### Play Activator ๋‚ด๋ ค ๋ฐ›๊ธฐ

curl -O http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip

Expand All @@ -178,34 +247,34 @@ JDK 7(1.7) ํ˜น์€ 8(1.8) ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip

### ์••์ถ•ํ’€๊ธฐ
#### ์••์ถ•ํ’€๊ธฐ

unzip typesafe-activator-1.2.10-minimal.zip

### ์••์ถ•์„ ํ‘ผ ๋‹ค์Œ ํ•˜์œ„ ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ์ด๋™
#### ์••์ถ•์„ ํ‘ผ ๋‹ค์Œ ํ•˜์œ„ ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ์ด๋™

cd typesafe-activator-1.2.10-minimal

### Yobi ์†Œ์Šค ๋‚ด๋ ค ๋ฐ›๊ธฐ
#### Yobi ์†Œ์Šค ๋‚ด๋ ค ๋ฐ›๊ธฐ

case1. [git ํด๋ผ์ด์–ธํŠธ](http://git-scm.com)๋ฅผ ์ด์šฉํ•œ ๋‹ค์šด๋กœ๋“œ (์ถ”์ฒœ)

git clone https://github.com/naver/yobi.git

case2. ๋‹จ์ˆœํžˆ ์ตœ์‹  ์•ˆ์ •๋ฒ„์ „์„ ๋‚ด๋ ค๋ฐ›๊ณ ์ž ํ•  ๋•Œ๋Š” ์•„๋ž˜ ๋งํฌ๋ฅผ ์ด์šฉํ•ด์„œ ์••์ถ•ํŒŒ์ผ์„ ๋‚ด๋ ค๋ฐ›์€ ๋‹ค์Œ yobi๋ฅผ ํด๋”์ด๋ฆ„์œผ๋กœํ•ด์„œ ํ•ด์ œํ•ฉ๋‹ˆ๋‹ค.

https://github.com/naver/yobi/archive/master.zip
git pull https://github.com/naver/yobi.git master

์ฃผ์˜! case2์˜ ๊ฒฝ์šฐ, ์—…๊ทธ๋ ˆ์ด๋“œ๋ฅผ ํ•  ๋•Œ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

> ์ž„์˜์˜ ์žฅ์†Œ์— Yobi ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์œ„์น˜์‹œํ‚ฌ ๊ฒฝ์šฐ์—๋Š” activator ์‹คํ–‰ํŒŒ์ผ์ด ์žˆ๋Š” Play Activator ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ $PATH ํ™˜๊ฒฝ๋ณ€์ˆ˜์— ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”.
### clone ๋ฐ›์€ Yobi ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ์ด๋™
#### clone ๋ฐ›์€ Yobi ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ์ด๋™
(ํ˜น์€ ์••์ถ•์„ ํ•ด์ œํ•œ ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ์ด๋™)

cd yobi

### ์ƒ๋‹จ์— ์žˆ๋Š” activator ์‹คํ–‰ํŒŒ์ผ ์‹คํ–‰
#### ์ƒ๋‹จ์— ์žˆ๋Š” activator ์‹คํ–‰ํŒŒ์ผ ์‹คํ–‰

../activator

Expand All @@ -215,27 +284,21 @@ case2. ๋‹จ์ˆœํžˆ ์ตœ์‹  ์•ˆ์ •๋ฒ„์ „์„ ๋‚ด๋ ค๋ฐ›๊ณ ์ž ํ•  ๋•Œ๋Š” ์•„๋ž˜ ๋งํฌ

์‹คํ–‰ํ•˜๋ฉด ํ•„์š”ํ•œ ํŒŒ์ผ๋“ค์„ web์—์„œ ๋‚ด๋ ค๋ฐ›์Šต๋‹ˆ๋‹ค. ์ฒซ ์‹คํ–‰์‹œ ๋„คํŠธ์›Œํฌ ์ƒํ™ฉ์— ๋”ฐ๋ผ 10์—ฌ๋ถ„ ๊ฐ€๊นŒ์ด ์†Œ์š”๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

### ์ฝ˜์†”์ด ๋œจ๋ฉด start ๋ช…๋ น์–ด๋กœ ๊ธฐ๋™
#### ์ฝ˜์†”์ด ๋œจ๋ฉด start ๋ช…๋ น์–ด๋กœ ๊ธฐ๋™

start -DapplyEvolutions.default=true -Dhttp.port=9000

์ถ”๊ฐ€๋กœ ํ•„์š”ํ•œ ํŒŒ์ผ๋“ค์„ web์—์„œ ๋‚ด๋ ค๋ฐ›์€ ๋‹ค์Œ ์†Œ์Šค ํŒŒ์ผ๋“ค์„ ์ปดํŒŒ์ผ ํ›„ ์šด์˜ ๋ชจ๋“œ(production mode)๋กœ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
๊ฐœ๋ฐœ ๋ชจ๋“œ(development mode)๋กœ ์‹คํ–‰ํ•˜๊ณ ์ž ํ•  ๊ฒฝ์šฐ์—๋Š” **start** ๋ช…๋ น์–ด ๋Œ€์‹ ์— **run** ๋ช…๋ น์–ด๋กœ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

์‹œ์ž‘ ์˜ต์…˜์€ ์กฐ์ •๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๋งŒ์•ฝ ์‹œ์Šคํ…œ ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ 4๊ธฐ๊ฐ€ ์ด์ƒ์ด๋ผ๋ฉด
์•„๋ž˜ ์˜ต์…˜์œผ๋กœ ์‹คํ–‰ํ•˜๋Š”๊ฑธ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.

_JAVA_OPTIONS="-Xmx2048m -Xms1024m" activator "start -DapplyEvolutions.default=true -Dhttp.port=9000"


### ๋ธŒ๋ผ์šฐ์ €๋กœ ์ ‘์†
#### ๋ธŒ๋ผ์šฐ์ €๋กœ ์ ‘์†

http://127.0.0.1:9000

80 ํฌํŠธ ๋“ฑ์œผ๋กœ ํฌํŠธ๋ฅผ ๋ณ€๊ฒฝํ•˜๊ณ  ์‹ถ์„ ๊ฒฝ์šฐ์—๋Š” ํ•ด๋‹น ํฌํŠธ๊ฐ€ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ์ง€ ํ™•์ธ ํ•œ ๋‹ค์Œ 80 ํฌํŠธ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๊ณ„์ •์œผ๋กœ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
๊ด€๋ จํ•ด์„œ๋Š” [http://www.playframework.com/documentation/2.3.6/Production](http://www.playframework.com/documentation/2.3.6/Production) ๋ถ€๋ถ„์„ ํ™•์ธํ•ด ์ฃผ์„ธ์š”.

### ์—…๊ทธ๋ ˆ์ด๋“œ ํ•˜๊ธฐ
#### ์—…๊ทธ๋ ˆ์ด๋“œ ํ•˜๊ธฐ

case1. git ํด๋ผ์ด์–ธํŠธ๋ฅผ ์ด์šฉ (์ถ”์ฒœ)
์„ค์น˜๋œ ๋””๋ ‰ํ„ฐ๋ฆฌ์—์„œ, ์•„๋ž˜์™€ ๊ฐ™์€ git ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ฉ๋‹ˆ๋‹ค
Expand All @@ -250,6 +313,18 @@ case2. ์••์ถ•ํŒŒ์ผ์„ ๋‚ด๋ ค๋ฐ›์„ ๊ฒฝ์šฐ

**์ฃผ์˜์‚ฌํ•ญ! `yobi.h2.db` ํŒŒ์ผ, `repo`์™€ `uploads` ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์‚ญ์ œํ•˜๊ฑฐ๋‚˜ ๋ฎ์–ด์“ฐ์ง€ ์•Š๋„๋ก ์ฃผ์˜ํ•˜์„ธ์š”!**

### ์˜ต์…˜

Yobi๊ฐ€ ํŒŒ์ผ์„ ๋ถˆ๋Ÿฌ์˜ค๊ณ  ์ €์žฅํ•  ํ™ˆ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ `yobi.home` ์†์„ฑ์„ ํ†ตํ•ด ์ง€์ •ํ• 
์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, /home/user/.yobi๋ฅผ ํ™ˆ ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์‚ฌ์šฉํ•˜๋ ค๋ฉด Yobi๋ฅผ
์‹œ์ž‘ํ•  ๋•Œ ๋‹ค์Œ๊ณผ ๊ฐ™์ด yobi.home ํ”„๋กœํผํ‹ฐ๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.

bin/yobi -Dyobi.home=/home/user/.yobi

`_JAVA_OPTIONS` ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ์ด์šฉํ•ด ์ž๋ฐ” ์˜ต์…˜์„ ์ง€์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์‹œ์Šคํ…œ
๋ฉ”๋ชจ๋ฆฌ๊ฐ€ 4๊ธฐ๊ฐ€ ์ด์ƒ์ด๋ผ๋ฉด, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์˜ต์…˜์œผ๋กœ ์‹คํ–‰ํ•˜๋Š”๊ฑธ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.

_JAVA_OPTIONS="-Xmx2048m -Xms1024m" activator "start -DapplyEvolutions.default=true -Dhttp.port=9000"

### ๋ฐฑ์—…ํ•˜๊ธฐ

Expand Down
Loading

0 comments on commit 162dd32

Please sign in to comment.