... | ... |
@@ -7,7 +7,63 @@ Github clone. you can install portable github system into unix/linux. |
7 | 7 |
* Github clone |
8 | 8 |
* Perl 5.8.7+ only needed |
9 | 9 |
|
10 |
-# Instllation into Unix/Linux system |
|
10 |
+# Instllation into Shared Server (Linux or Unix/Apache/SuExec/CGI/PHP5) |
|
11 |
+ |
|
12 |
+If you want to use GitPrep in Sahred Server, |
|
13 |
+you can use it. |
|
14 |
+ |
|
15 |
+Sahred Server must support Linux/Unix, Apache, SuExec, CGI, PHP5. |
|
16 |
+Many shared server support these, |
|
17 |
+so you will find needed server easily. |
|
18 |
+ |
|
19 |
+you also need git. |
|
20 |
+ |
|
21 |
+## Download |
|
22 |
+ |
|
23 |
+You donwload GitPrep. |
|
24 |
+ |
|
25 |
+https://github.com/yuki-kimoto/gitprep/archive/0.03.zip |
|
26 |
+ |
|
27 |
+You expand zip file. You see the following directory. |
|
28 |
+ |
|
29 |
+ gitprep-0.03 |
|
30 |
+ |
|
31 |
+Rename this gitprep-0.03 to gitprep. |
|
32 |
+ |
|
33 |
+ gitprep-0.03 -> gitprep |
|
34 |
+ |
|
35 |
+## Add git command path |
|
36 |
+ |
|
37 |
+GitPrep need git command. you must install git by yourself. |
|
38 |
+ |
|
39 |
+and you must add git command path into config file **gitprep.conf** |
|
40 |
+ |
|
41 |
+ [basic] |
|
42 |
+ ;;; Git command path |
|
43 |
+ git_bin=/home/yourname/local/git |
|
44 |
+ |
|
45 |
+## Upload Server by FTP |
|
46 |
+ |
|
47 |
+You upload these directory into server document root by FTP. |
|
48 |
+ |
|
49 |
+## Setup |
|
50 |
+ |
|
51 |
+Access the following URL by browser. |
|
52 |
+ |
|
53 |
+ http://(Your host name)/gitprep/setup/setup.php |
|
54 |
+ |
|
55 |
+And click Setup button once and wail abount 5 minutes. |
|
56 |
+ |
|
57 |
+## Go to application |
|
58 |
+ |
|
59 |
+If you see result, click "Go to Application". |
|
60 |
+ |
|
61 |
+## You see Internal Server Error |
|
62 |
+ |
|
63 |
+If you see internal server error, you see gitprep/log/production.log. |
|
64 |
+You know what error is happned. |
|
65 |
+ |
|
66 |
+# Instllation into your Unix/Linux system |
|
11 | 67 |
|
12 | 68 |
## Create gitprep user |
13 | 69 |
|
... | ... |
@@ -21,9 +77,9 @@ At first create **gitprep** user. This is not nesessary, but recommended. |
21 | 77 |
|
22 | 78 |
Download tar.gz archive and exapand it and change directory. |
23 | 79 |
|
24 |
- curl -kL https://github.com/yuki-kimoto/gitprep/archive/0.02.tar.gz > gitprep-0.02.tar.gz |
|
25 |
- tar xf gitprep-0.02.tar.gz |
|
26 |
- cd gitprep-0.02 |
|
80 |
+ curl -kL https://github.com/yuki-kimoto/gitprep/archivegitprep-0.03.tar.gz > gitprep-0.03.tar.gz |
|
81 |
+ tar xf gitprep-0.03.tar.gz |
|
82 |
+ cd gitprep-0.03 |
|
27 | 83 |
|
28 | 84 |
## Setup |
29 | 85 |
|
... | ... |
@@ -2,5 +2,10 @@ |
2 | 2 |
;;; SSH port |
3 | 3 |
;ssh_port=55555 |
4 | 4 |
|
5 |
+;;; Git command path |
|
6 |
+;git_bin=/usr/local/bin/git |
|
7 |
+;git_bin=~/local/git |
|
8 |
+ |
|
9 |
+ |
|
5 | 10 |
[hypnotoad] |
6 | 11 |
listen=http://*:10020 |
... | ... |
@@ -13,6 +13,7 @@ use Gitprep::API; |
13 | 13 |
use Carp 'croak'; |
14 | 14 |
use Gitprep::RepManager; |
15 | 15 |
use Scalar::Util 'weaken'; |
16 |
+use Carp 'croak'; |
|
16 | 17 |
|
17 | 18 |
has 'git'; |
18 | 19 |
has 'dbi'; |
... | ... |
@@ -29,8 +30,8 @@ sub startup { |
29 | 30 |
my $my_conf_file = $self->home->rel_file('gitprep.my.conf'); |
30 | 31 |
$self->plugin('INIConfig', {file => $my_conf_file}) if -f $my_conf_file; |
31 | 32 |
|
33 |
+ # Config |
|
32 | 34 |
my $conf = $self->config; |
33 |
- $conf->{root} = $self->home->rel_file('rep'); |
|
34 | 35 |
$conf->{hypnotoad} ||= {listen => ["http://*:10020"]}; |
35 | 36 |
my $listen = $conf->{hypnotoad}{listen} || ''; |
36 | 37 |
if ($listen ne '' && ref $listen ne 'ARRAY') { |
... | ... |
@@ -38,15 +39,22 @@ sub startup { |
38 | 39 |
} |
39 | 40 |
$conf->{hypnotoad}{listen} = $listen; |
40 | 41 |
|
41 |
- # Added public directory |
|
42 |
- push @{$self->static->paths}, $conf->{root}; |
|
43 |
- |
|
44 |
- # Git |
|
42 |
+ # Git command |
|
45 | 43 |
my $git = Gitprep::Git->new; |
46 |
- my $git_bin = $conf->{git_bin} ? $conf->{git_bin} : $git->search_bin; |
|
47 |
- die qq/Can't detect git command. set "git_bin" in gitprep.conf/ |
|
48 |
- unless $git_bin; |
|
44 |
+ my $git_bin = $conf->{basic}{git_bin} ? $conf->{basic}{git_bin} : $git->search_bin; |
|
45 |
+ unless ($git_bin) { |
|
46 |
+ my $error = "Can't detect git command. set git_bin in gitprep.conf"; |
|
47 |
+ $self->log->error($error); |
|
48 |
+ croak $error; |
|
49 |
+ } |
|
50 |
+ unless (-e $git_bin) { |
|
51 |
+ my $error = "$git_bin is not found"; |
|
52 |
+ $self->log->error($error); |
|
53 |
+ croak $error; |
|
54 |
+ } |
|
49 | 55 |
$git->bin($git_bin); |
56 |
+ |
|
57 |
+ # Repository home |
|
50 | 58 |
my $rep_home = $self->home->rel_file('rep'); |
51 | 59 |
$git->rep_home($rep_home); |
52 | 60 |
unless (-d $rep_home) { |
... | ... |
@@ -17,9 +17,6 @@ BEGIN { |
17 | 17 |
my $extlib = join('/', @base_dir, 'extlib', 'lib', 'perl5'); |
18 | 18 |
eval 'use lib $mojolegacy, $extlib, $lib'; |
19 | 19 |
croak $@ if $@; |
20 |
- |
|
21 |
- $DB::single = 1; |
|
22 |
- 1; |
|
23 | 20 |
} |
24 | 21 |
|
25 | 22 |
use Mojolicious::Commands; |
... | ... |
@@ -32,4 +29,5 @@ Please visit http://mojolicio.us for detailed installation instructions. |
32 | 29 |
EOF |
33 | 30 |
|
34 | 31 |
# Start commands |
32 |
+$ENV{MOJO_MODE} = 'production'; |
|
35 | 33 |
Mojolicious::Commands->start_app('Gitprep'); |