Java
server JRE
http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html
curl -O -s http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-i586.tar.gz?AuthParam=XXX tar xzfv server-jre-*-linux-x64.tar.gz* rm -f server-jre-*-linux-x64.tar.gz* mv jdk* /usr/local/ ln -s `ls -d /usr/local/jdk*` /usr/local/jre export JAVA_HOME=/usr/local/jre export PATH=$JAVA_HOME/bin:$PATH echo "" >> /etc/bashrc echo "# JAVA_HOME ENVIRONMENT VARIABLE" >> /etc/bashrc echo "export JAVA_HOME=$JAVA_HOME" >> /etc/bashrc echo "export PATH=\$JAVA_HOME/bin:/bin:\$PATH" >> /etc/bashrc
PostgreSQL
※9.4推奨だが、10.1でも動作した。
https://www.postgresql.org/ftp/source/
curl -O -s https://ftp.postgresql.org/pub/source/v10.1/postgresql-10.1.tar.gz tar xzfv postgresql-*.tar.gz ./configure --prefix=$PREFIX --with-ossp-uuid | tee configure.log yum install gcc readline-devel zlib-devel cd postgresql-* export CFLAGS="-O3 -m64" PREFIX=/usr/local/`pwd | sed "s/.*\///"` ./configure --prefix=$PREFIX | tee configure.log make world | tee make.log make install-world | tee make_install.log ln -s /usr/local/`pwd | sed "s/.*\///"` /usr/local/postgresql mkdir /pgsql-data export POSTGRESQL_HOME=/usr/local/pgsql export POSTGRESQL_DATA=/pgsql-data export PATH=$POSTGRESQL_HOME/bin:$PATH echo "" >> /etc/bashrc echo "# POSTGRESQL ENVIRONMENT VARIABLE" >> /etc/bashrc echo "export POSTGRESQL_HOME=$POSTGRESQL_HOME" >> /etc/bashrc echo "export POSTGRESQL_DATA=$POSTGRESQL_DATA" >> /etc/bashrc echo "export PATH=\$POSTGRESQL_HOME/bin:\$PATH" >> /etc/bashrc chown -R postgres:postgres $POSTGRESQL_DATA chown -R postgres:postgres $POSTGRESQL_HOME* cd $POSTGRESQL_HOME sudo -u postgres $POSTGRESQL_HOME/bin/initdb --encoding=UTF8 --pgdata=$POSTGRESQL_DATA --locale=ja_JP.UTF-8 --auth=trust cd
Postfix
JPiereを使用するにはSMTPメールサーバが必要である。
しかし、CentOSには標準でPostfixがインストールされており、既に稼働している。
今回はそれを使用するので、新規に専用のPostfixは構築しない。
JPiere
https://www.compiere-distribution-lab.net/jpiere-lab/install/jpiere4-1/
https://osdn.net/projects/jpiere/releases/
以下の最新のバージョンを選択
ExpDat_YYYYMMDD.zip
idempiereServer.gtk.linux.x86_64.zip
ダウンロードページが開き、自動でダウンロードが開始されるので、ダウンロードを中止する。ダウンロードURLのみコピーし、そのURLを用いてLinux上でダウンロードを再度行う。
バージョン「JPiere4.1 – 20171031」の場合、ダウンロードは次のコマンドで行える。
curl -O -s http://jaist.dl.osdn.jp/jpiere/68620/ExpDat_20171031.zip curl -O -s http://ymu.dl.osdn.jp/jpiere/68620/idempiereServer.gtk.linux.x86_64.zip yum install unzip -y unzip ExpDat_*.zip unzip idempiereServer.gtk.linux.x86_64.zip psql -U postgres -h localhost -c "CREATE ROLE adempiere SUPERUSER LOGIN PASSWORD 'adempiere'" createdb --template=template0 -E UNICODE -O adempiere -U adempiere -h localhost idempiere psql -d idempiere -U adempiere -h localhost -c "ALTER ROLE adempiere SET search_path TO adempiere, pg_catalog" psql -d idempiere -U adempiere -h localhost -f ExpDat.dmp > restore.log cp -r idempiere.gtk.linux.x86_64/idempiere-server/ /usr/local/jpiere4.1/ cd /usr/local/jpiere4.1/ ./console-setup.sh
[root@mail jpiere4.1-2]# ./console-setup.sh Setup idempiere Server Jan 04, 2018 2:41:42 PM org.compiere.install.ConfigurationData load INFO: Defaults Java Home [/usr/local/jdk1.8.0_152]: Jan 04, 2018 4:01:01 PM org.compiere.install.ConfigVM test INFO: OK: JavaHome=/usr/local/jdk1.8.0_152 Jan 04, 2018 4:01:01 PM org.compiere.install.ConfigVM test INFO: OK: Version=1.8.0_152 iDempiere Home [/usr/local/jpiere4.1]: Key Store Password [myPassword]: Jan 04, 2018 4:01:04 PM org.compiere.install.KeyStoreMgt <init> INFO: /usr/local/jpiere4.1-2/jettyhome/etc/keystore KeyStore Settings. (ON) Common Name [root]: (OU) Organization Unit [AdempiereUser]: (O) Organization [root]: (L) Locale/Town [MyTown]: (S) State []: (C) Country (2 Char) [US] JP Jan 04, 2018 4:01:17 PM org.compiere.install.ConfigurationData testAdempiere INFO: OK: AdempiereHome = /usr/local/jpiere4.1-2 Jan 04, 2018 4:01:17 PM org.compiere.install.KeyStoreMgt <init> INFO: /usr/local/jpiere4.1-2/jettyhome/etc/keystore Jan 04, 2018 4:01:17 PM org.compiere.install.KeyStoreMgt createCertificate INFO: Jan 04, 2018 4:01:49 PM org.compiere.install.KeyStoreMgt keytool INFO: keytool -genkey -keyalg rsa -alias idempiere -dname "CN=mail.corp, OU=root, O=AdempiereUser, L=MyTown, C=JP" -keypass myPassword -validity 999 -keystore /usr/local/jpiere4.1-2/jettyhome/etc/keystore -storepass myPassword Warning: The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore /usr/local/jpiere4.1-2/jettyhome/etc/keystore -destkeystore /usr/local/jpiere4.1-2/jettyhome/etc/keystore -deststoretype pkcs12". Jan 04, 2018 4:01:50 PM org.compiere.install.KeyStoreMgt keytool INFO: keytool -selfcert -alias idempiere -dname "CN=mail.corp, OU=root, O=AdempiereUser, L=MyTown, C=JP" -keypass myPassword -validity 999 -keystore /usr/local/jpiere4.1-2/jettyhome/etc/keystore -storepass myPassword Warning: The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore /usr/local/jpiere4.1-2/jettyhome/etc/keystore -destkeystore /usr/local/jpiere4.1-2/jettyhome/etc/keystore -deststoretype pkcs12". Jan 04, 2018 4:01:50 PM org.compiere.install.ConfigurationData testAdempiere INFO: OK: KeyStore = /usr/local/jpiere4.1-2/jettyhome/etc/keystore Application Server Host Name [mail.corp]: Application Server Web Port [8080]: Application Server SSL Port[8443]: DB Already Exists?(Y/N) [N]: 1. Oracle 2. PostgreSQL Database Type [2] Database Server Host Name [mail.corp]: 127.0.0.1 Database Server Port [5432]: Database Name[idempiere]: Database user [adempiere]: Database Password [adempiere]: Database System User Password [] Jan 04, 2018 4:06:43 PM org.adempiere.db.postgresql.config.ConfigPostgreSQL test INFO: OK: Database Server = /127.0.0.1 testPort[127.0.0.1, 5432] Jan 04, 2018 4:06:43 PM org.adempiere.db.postgresql.config.ConfigPostgreSQL test INFO: OK: Database Port = 5432 Jan 04, 2018 4:06:43 PM org.adempiere.db.postgresql.config.ConfigPostgreSQL test INFO: OK: System Connection = jdbc:postgresql://localhost:5432/template1 Jan 04, 2018 4:06:43 PM org.adempiere.db.postgresql.config.ConfigPostgreSQL test INFO: OK: Database User = adempiere Mail Server Host Name [null]: Mail User Login [null]: Mail User Password [] Administrator EMail [null]: Mail setting validation error: Error Mail Server = null Mail Server Host Name []: Mail User Login [null]: Mail User Password [] Administrator EMail [null]: Mail setting validation error: Error Mail Server = Mail Server Host Name []: Mail User Login [null]: Mail User Password [] Administrator EMail [null]: Mail setting validation error: Error Mail Server = Mail Server Host Name []: 127.0.0.1 Mail User Login [null]: Mail User Password [] Administrator EMail [null]: Jan 04, 2018 4:07:31 PM org.compiere.install.ConfigurationData testMail WARNING: Not valid: null - null Save changes (Y/N) [Y]: Jan 04, 2018 4:07:38 PM org.compiere.util.Ini loadProperties WARNING: /usr/local/jpiere4.1-2/idempiere.properties not found Jan 04, 2018 4:07:38 PM org.compiere.util.Ini loadProperties INFO: /usr/local/jpiere4.1-2/idempiere.properties #27 Jan 04, 2018 4:07:38 PM org.compiere.install.ConfigurationData save INFO: /usr/local/jpiere4.1-2/idempiereEnv.properties Changes save successfully. file=/usr/local/jpiere4.1-2/org.adempiere.install/build.xml exists=false Buildfile: build.xml setupInit: [echo] iDempiere Server Setup =================== [echo] IDEMPIERE_HOME = ${env.IDEMPIERE_HOME} [echo] Environment = idempiereEnv.properties [echo] Java VM = ${ADEMPIERE_JAVA_TYPE} [echo] Database = PostgreSQL [echo] Windows=${isWindows} [copy] Copying 1 file to /usr/local/jpiere4.1-2/jettyhome/etc [copy] Copying 1 file to /usr/local/jpiere4.1-2/jettyhome/etc [copy] Copying 1 file to /usr/local/jpiere4.1-2/jettyhome/etc [copy] Copying 1 file to /usr/local/jpiere4.1-2/jettyhome/etc [copy] Copying 1 file to /usr/local/jpiere4.1-2/jettyhome/etc [copy] Copying 1 file to /usr/local/jpiere4.1-2 [mkdir] Created dir: /usr/local/jpiere4.1-2/jettyhome/work [mkdir] Created dir: /usr/local/jpiere4.1-2/log setupWin: setupNonWin: [copy] Copying 1 file to /usr/local/jpiere4.1-2/utils [copy] Copying 1 file to /usr/local/jpiere4.1-2/utils [copy] Copying 1 file to /usr/local/jpiere4.1-2/utils setup: BUILD SUCCESSFUL BUILD SUCCESSFUL Total time: 0 seconds . For problems, check log file in base directory
停止用スクリプトの作成
yum install telnet expect -y cat > stop-server.sh << EOT #!/bin/expect set timeout 5 spawn env /bin/telnet localhost 12612 expect "osgi>" send "close\n" expect "Really want to stop" send "y\n" expect "osgi>" send "disconnect\n" expect "Disconnect from console" send "y\n" expect "Connection closed" exit 0 EOT chmod 775 stop-server.sh
firewall-cmd --new-service=jetty --permanent firewall-cmd --service=jetty --add-port=8080/tcp --permanent firewall-cmd --add-service=jetty --zone=public --permanent systemctl restart firewalld
yum -y install ibus-kkc vlgothic-*
./idempiere-server.sh &
http://192.168.199.132:8080/webui/
http://192.168.0.111:8080/webui/
初期ユーザー
https://www.compiere-distribution-lab.net/2013/10/12/idempiere%E6%A8%99%E6%BA%96%E6%A5%AD%E5%8B%99%E6%A9%9F%E8%83%BD-%E3%83%AD%E3%82%B0%E3%82%A4%E3%83%B3/#no3
スーパーユーザー
superuser@idempiere.com
System
システム管理者
system@idempiere.com
system @ idempiere.com
System
admin @ gardenworld.com
GardenAdmin
https://www.compiere-distribution-lab.net/jpiere-lab/lets-start-jpiere/operation/#no01
https://www.compiere-distribution-lab.net/2016/06/28/idempiere-lab-%E3%82%B5%E3%83%BC%E3%83%90%E8%B5%B7%E5%8B%95%E6%99%82%E3%81%AEdb%E3%83%93%E3%83%AB%E3%83%89%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/