同一サーバ上で複数のAipo6を動かすよ〜
↑前回の続き〜
以下、CV=まいんちゃんでどうぞ。(ぉぃ
参考文献&スペシャルサンクス:
DBをコピーするよ。
まず、
の「cayenne.dbcp.password=xxxxxxxx」の「xxxxxxxx」の部分を見て、aipo_postgresのパスワードを確認するよ。
/usr/local/aipo/tomcat/webapps/aipo/WEB-INF/datasource/dbcp-org001.properties
そして、
こんな感じで新しいDBのhogeが完成〜
# su - aipo_postgres((ハイフン無しだと環境変数が引き継がれない点に注意してね。))
$ pg_dump -v org001 > org001.dump
$ createdb hoge
Password: xxxxxxxx
$ psql -e hoge < org001.dump
Password: xxxxxxxx
Aipoを停めるよ。
# cd /usr/local/aipo/bin
# ./shutdown.sh
Shutdown Aipo.
Aipoをコピーするよ。
丸ごとコピーするよ。
# cd /usr/local/aipo/tomcat/webapps
# cp -pr aipo hoge
そして、
の、
/usr/local/aipo/tomcat/webapps/hoge/WEB-INF/datasource/dbcp-org001.properties
下線部分のhogeを書き換えるよ。
cayenne.dbcp.url=jdbc:postgresql://localhost:5432/hoge
さらに、
の、
/usr/local/aipo/tomcat/webapps/hoge/WEB-INF/web.xml
下線部分のhogeを書き換えるよ。
Aipo
hoge
org.apache.turbine.Turbine
:
Aipoを起動するよ。
# ./startup.sh
found temp directory
Using CATALINA_BASE: /usr/local/aipo/tomcat
Using CATALINA_HOME: /usr/local/aipo/tomcat
Using CATALINA_TMPDIR: /usr/local/aipo/tomcat/temp
Using JRE_HOME: /usr/local/aipo/jre
Using CLASSPATH: /usr/local/aipo/tomcat/bin/bootstrap.jar
Starting Aipo Version 6.0.1.0
Aipo URL: http://xxx.xxx.xxxx.xxx:80/aipo/
新しいAipoのURLは、
だよ。
はぴはぴはっぴ〜!!*1
みんなまた見てね。(ぉぃ
*1:まだちゃんと動作チェックしてないので、どこかミスがあったらスミマセン(汗)。