Quantcast
Channel: [ま]技術雑記AIPO | [ま]技術雑記
Viewing all articles
Browse latest Browse all 3

[Linux][ubuntu][Aipo] ubuntu server 12.04.2 に Aipo7をインストールした

0
0

aipo7以前、ubuntuにAipo5をインストールして稼働していたのですが、HDD故障によりデータ破損等が起きたのでサーバの再インストールを行いました。バックアップから復旧したのですが、Aipoに関しては新たにAipo7を再インストールしたので、そのメモです。

Aipo7公式サイト

http://aipo.com/

導入OS

Ubuntu Server 12.04.2

インストール手順

作業フォルダ作成

$ cd ~/
$ mkdir work
$ cd work

ダウンロード

$ wget "http://aipo.googlecode.com/files/aipo7020ja_linux32.tar.gz"

解凍

$ tar zxvf aipo7020ja_linux32.tar.gz
$ cd aipo7020ja_linux
$ tar zxvf aipo7020.tar.gz

インストール シェル スクリプトを変更

変更するファイル1

$ cp -a aipo/bin/installer.sh aipo/bin/installer.sh.org
$ vim aipo/bin/installer.sh
$ diff installer.sh.org installer.sh 
20c20,21
< sh ${script_path}/bin/${enc_str}/installer.sh | tee install.log
---
> #sh ${script_path}/bin/${enc_str}/installer.sh | tee install.log
> bash ${script_path}/bin/${enc_str}/installer.sh | tee install.log

変更するファイル2

$ cp -a aipo/bin/utf8/installer.sh aipo/bin/utf8/installer.sh.org
$ vim aipo/bin/utf8/installer.sh
$ diff installer.sh.org installer.sh
2a3,5
> apt-get -y install build-essential openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib
> apt-get -y install zlib1g-dev libreadline-gplv2-dev nmap
> 
111a115
> RANDOM=23423453
247c251,253
< rpm -qa --qf "%{GROUP},%{NAME}\n" > ${script_path}/bin/rpmlist
---
> #rpm -qa --qf "%{GROUP},%{NAME}\n" > ${script_path}/bin/rpmlist
> 
> dpkg -l > ${script_path}/bin/rpmlist
249c255,256
< tmp_str=`cat ${script_path}/bin/rpmlist | grep readline-devel`
---
> #tmp_str=`cat ${script_path}/bin/rpmlist | grep readline-devel`
> tmp_str=`cat ${script_path}/bin/rpmlist | grep libreadline-gplv2-dev`
260c267,268
< tmp_str=`cat ${script_path}/bin/rpmlist | grep zlib-devel`
---
> #tmp_str=`cat ${script_path}/bin/rpmlist | grep zlib-devel`
> tmp_str=`cat ${script_path}/bin/rpmlist | grep zlib1g-dev`
451,458c459,467
< unset tmp_str
< tmp_str=`test -d $aipo_dir/jre`
< if [ !tmp_str = 0 ]; then
< 	rm -rf $aipo_dir/jre
< fi
< 
< cd  $aipo_dir
< tar zxvf $src_dir"/jre.tar.gz"
---
> #unset tmp_str
> #tmp_str=`test -d $aipo_dir/jre`
> #if [ !tmp_str = 0 ]; then
> #	rm -rf $aipo_dir/jre
> #fi
> #
> #cd  $aipo_dir
> #tar zxvf $src_dir"/jre.tar.gz"
> ln -s /usr/lib/jvm/java-6-openjdk/jrw /usr/local/aipo/jre
624,625c633,634
< mv /etc/localtime /etc/localtime."2012/11/7".bak
< cp /usr/share/zoneinfo/Japan /etc/localtime
---
> #mv /etc/localtime /etc/localtime."2012/11/7".bak
> #cp /usr/share/zoneinfo/Japan /etc/localtime

インストール

$ sudo cp -R aipo /usr/local/
$ cd /usr/local/aipo/bin
$ sudo script aipo7.log
$ sudo sh installer.sh

postgresqlのユーザー名とパスをメモする

スタートアッププログラム修正

$ cd /usr/local/aipo/bin
$ sudo cp -a startup.sh startup.sh.org
$ sudo vim startup.sh
$ diff startup.sh.org startup.sh
14,15c14,15
< if [ -e /etc/sysconfig/network-scripts/ifcfg-${netitf} ]; then
< 	. /etc/sysconfig/network-scripts/ifcfg-${netitf}
---
> if [ -e /etc/network/interfaces ]; then
> 	. /etc/network/interfaces
20c20
< 	addr=`ifconfig ${netitf} | grep "inet addr" | cut -f 2 -d :| cut -f 1 -d " "`
---
> 	addr=`ifconfig ${netitf} | grep "inet" | cut -f 2 -d :| cut -f 1 -d " "`
24c24
< 	addr=`ifconfig eth0 | grep "inet addr" | cut -f 2 -d :| cut -f 1 -d " "`
---
> 	addr=`ifconfig eth0 | grep "inet" | cut -f 2 -d :| cut -f 1 -d " "`

自動起動スクリプトの作成

$ sudo vi /etc/init.d/aipo
#!/bin/sh

case "$1" in
  'start')
    echo "Starting Aipo"
    /usr/local/aipo/tomcat/bin/startup.sh
    /usr/local/aipo/bin/startup.sh
    echo "Done."
    ;;
  'stop')
    echo "Stopping Aipo"
    /usr/local/aipo/bin/shutdown.sh
    /usr/local/aipo/tomcat/bin/shutdown.sh
    echo "Done."
    ;;
  *)
    echo "Usage: /etc/init.d/aipo [ start | stop ]"
  ;;
esac

exit 0
$ sudo chmod +x /etc/init.d/aipo
$ sudo update-rc.d aipo defaults 90 9

※ apache2のProxy設定で http://xxxxxxx/aipo/ にアクセスすると http://localhost:81/aipo へアクセスするようにした為、update-rc.dの数値をapacheより先に起動するようにしています。

参考サイト

インストール方法は以下のサイトを参考にしました。


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images