LoginSignup
8
8

More than 5 years have passed since last update.

GrowthForecastをDebianにインストールしたい

Last updated at Posted at 2013-08-28

GrowthForecastをDebian上にインストールしたい。

1. growthforecastユーザをつくる

growthforecastユーザを作って/home/growthforecastにGrowthForecast関連のファイルを置くことにした。

harukasan$ sudo useradd -r -m -s /bin/bash growthforecast

2. Perl 5をインストールする

GrowthForecastではsystemのPerlではなく別にインストールすることを推奨している。
Perlのインストールにはperlbrewを使ってみることに。

harukasan$ sudo su - growthforecast
growthforecast$ \wget -O - http://install.perlbrew.pl | bash
growthforecast$ source perl5/perlbrew/etc/bashrc
growthforecast$ echo "source /home/growthforecast/perl5/perlbrew/etc/bashrc" >> ~/.bashrc

で、perlbrewを使ってPerl 5をインストールする。
はじめにPerl 5.19.3をいれようとしたらテストでこけて、よくわからなかったのでPerl 5.18.1をインストールした。Perl力低い。

Perl 5.19は開発版なので5.18が正解とのこと。

growthforecast$ perlbrew install perl-5.18.1

時間がかかるのでまったりお昼ご飯でも食べてこよう。

3. Cpanmをインストールする

お昼を食べ終わったらPerlのインストールが完了しているかと思うので、cpanmをインストールする。

growthforecast$ perlbrew switch perl-5.18.1
growthforecast$ perlbrew install-cpanm

4. GrowthForecastをインストールする

そのままインストールしようとするとエラーが出るので、必要なパッケージをインストールしておこう。
必要なパッケージはエラーログから推測できる。

harukasan$ sudo aptitude install  libcairo2-dev libpango1.0-dev libxml2-dev
growthforecast$ cpanm -n GrowthForecast

5. 起動してみる

growthforecast.plコマンドで起動してみる。

$ growthforecast.pl --data-dir /home/growthforecast/data &

起動できたらhttp://localhost:5125/にアクセスしてみることで確認できる。
デーモン化するためにはinit.dスクリプトを用意したりしないといけないが、長くなったので別の機会に。

8
8
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8