2014年12月25日木曜日

メリークリスマス



M先生いつもありがとうございます。カワイイですね。

JSON2.4.4になっていたので、ローカルリポジトリから
WFツリー ^_^; に飾りつけ(上書きコピー)

#!/bin/bash

REPO_HOME=/home/ubuntu/.m2/repository
WFLY_HOME=/usr/local/wildfly
WFLY_ST_MOD=${WFLY_HOME}/standalone/modules
JSON_VER=2.4.4

R_JSON_ANN_JAR=${REPO_HOME}/com/fasterxml/jackson/core/jackson-annotations/${JSON_VER}/jackson-annotations-${JSON_VER}.jar
R_JSON_CORE_JAR=${REPO_HOME}/com/fasterxml/jackson/core/jackson-core/${JSON_VER}/jackson-core-${JSON_VER}.jar
R_JSON_DATA_JAR=${REPO_HOME}/com/fasterxml/jackson/core/jackson-databind/${JSON_VER}/jackson-databind-${JSON_VER}.jar

JSON_ANN_PATH=${WFLY_HOME}/modules/system/layers/base/com/fasterxml/jackson/core/jackson-annotations/main
JSON_CORE_PATH=${WFLY_HOME}/modules/system/layers/base/com/fasterxml/jackson/core/jackson-core/main
JSON_DATA_PATH=${WFLY_HOME}/modules/system/layers/base/com/fasterxml/jackson/core/jackson-databind/main

sudo -u wildfly cp ${R_JSON_ANN_JAR} ${JSON_ANN_PATH}
sudo -u wildfly cp ${R_JSON_CORE_JAR} ${JSON_CORE_PATH}
sudo -u wildfly cp ${R_JSON_DATA_JAR} ${JSON_DATA_PATH}

sudo -u wildfly sed -i "s/2.4.1/${JSON_VER}/" ${JSON_ANN_PATH}/module.xml
sudo -u wildfly sed -i "s/2.4.1/${JSON_VER}/" ${JSON_CORE_PATH}/module.xml
sudo -u wildfly sed -i "s/2.4.1/${JSON_VER}/" ${JSON_DATA_PATH}/module.xml


2014年12月9日火曜日

Ubuntu14.04 & ORCA4.8

先月末に公開された様子なので、移行の練習をしてみた。

LXCでUbuntu14.04のコンテナを作成

$ sudo lxc-create -n orca48 -t ubuntu

apt設定など(他省略)

$ sudo vi /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get install -y ntp

その他、設定ファイル等をscp等で持ってきておく

orca2014xxxx.dump
passwd ( 元サーバの /etc/jma-receipt/passwd )
cupsd.conf など

14.04serverでは必要になる追加パッケージをインストール

$ sudo apt-get install -y wget
$ sudo apt-get install -y syslinux-common

日医標準レセプトソフト(ORCA4.8)のインストール

$ sudo -i
# wget -q https://ftp.orca.med.or.jp/pub/ubuntu/archive.key
# ls でarchive.keyが表示されることを確認
archive.key
# apt-key add archive.key
OK
# wget -q -O /etc/apt/sources.list.d/jma-receipt-trusty48.list https://ftp.orca.med.or.jp/pub/ubuntu/jma-receipt-trusty48.list

# apt-get update
# apt-get dist-upgrade
# exit

$ sudo apt-get install -y jma-receipt

$ wget https://ftp.orca.med.or.jp/pub/data/receipt/outline/update/claim_update.tar.gz
$ tar xvzf claim_update.tar.gz
$ sudo bash claim_update.sh

$ sudo jma-setup --noinstall

データベースのリストア

$ sudo -u orca pg_restore -x -O -d orca orca2014xxxx.dump
$ sudo jma-setup

パスワードファイルを元サーバーと同じように配置

$ sudo cp passwd /etc/jma-receipt/
$ sudo chown orca:orca /etc/jma-receipt/passwd

元サーバーのパスワードをデータベースに登録

$ sudo -u orca /usr/lib/jma-receipt/bin/passwd_store.sh

サーバーの起動

$ sudo service jma-receipt start

クライアントでアクセスしてみる

CUPSなどの設定(省略)

2014年9月21日日曜日

Ubuntu14.04Server LXC上で OpenDolphin構築(2)

ビルド&テスト&実行環境用にシェルスクリプト作ってみる。
(M先生のソース用です)
UbuntuServer14.04のCloudImage(AWS)で試してます。
こちらのLXCでもOKでした。
github
https://gist.github.com/KunitoishiTomii/a337a19d9824fdb69f53

$ sudo apt-get update
$ sudo apt-get install -y git

$ git clone https://gist.github.com/a337a19d9824fdb69f53.git

$ cd a337a19d9824fdb69f53/

$ chmod +x *.sh

1.M先生のソース持ってきてビルド
$ sudo ./buildopendolphin.sh

2.PostgreSQLインストール&dolphinデータベース作成
$ sudo ./setpg.sh

3.Wildflyインストール+JDBCデプロイ、コネクションチェック
$ sudo ./setwfly.sh

4.DolphinDSのセット
$ sudo ./setdolphinDS.sh

5.warなどのデプロイ
$ sudo ./setwar.sh

6.自動起動設定
$ sudo ./setrcd.sh

7.起動
$ sudo service wildfly.sh start

8.リストア(新規導入時:M先生の導入書参照)
$ sudo ./restoredolphin.sh dolphinxxxx.dump

9.停止
$ sudo service wildfly.sh stop

10.再起動
$ sudo reboot

2014年6月15日日曜日

Ubuntu14.04Server LXC上で OpenDolphin構築(1)

Ubuntu14.04Server LXC上で OpenDolphin構築

$ sudo lxc-create -t ubuntu -n dolphin

$ sudo sh -c "echo 'net.ipv6.conf.all.disable_ipv6=1' >> /etc/sysctl.conf"
$ sudo sh -c "echo 'net.ipv6.conf.default.disable_ipv6=1' >> /etc/sysctl.conf"
$ sudo /sbin/sysctl -p

$ sudo sh -c 'echo "Acquire::http::Proxy \"http://192.168.xxx.xxx:3142/\";" >> /etc/apt/apt.conf.d/02proxy'

$ sudo apt-get update
$ sudo apt-get install -y postgresql ntp openjdk-7-jdk wget
$ sudo useradd dolphin -d /home/dolphin
$ getent passwd | grep dolphin
$ sudo -u postgres psql -c "create user dolphin with password 'dolphin';"
$ sudo -u postgres psql -c 'ALTER ROLE dolphin WITH SUPERUSER CREATEDB CREATEROLE REPLICATION;'
$ sudo -u postgres psql -c 'select rolname from pg_roles;'
$ sudo -u dolphin createdb -lC -Ttemplate0 -EUTF-8 dolphin
$ sudo -u dolphin psql -l
$ wget http://download.jboss.org/wildfly/8.1.0.Final/wildfly-8.1.0.Final.tar.gz
$ sudo tar zxvf ./wildfly-8.1.0.Final.tar.gz -C /usr/local/
$ sudo mv /usr/local/wildfly-8.1.0.Final /usr/local/jboss
$ sudo useradd jboss
$ sudo chown -R jboss.jboss /usr/local/jboss/
$ sudo /usr/local/jboss/bin/add-user.sh dolphin dolphin

Wildfly起動
$ sudo /usr/local/jboss/bin/standalone.sh -b=192.168.xxx.101 -bmanagement=192.168.xxx.101

ブラウザで管理コンソール
http://192.168.xxx.101:9990 user:dolphin pass:dolphin

Runtime
Manage Deployments
Add
postgresql-9.3-1101.jdbc41.jar
Enable

Configuration
Datasources
Add
Name:DolphinDS
Step 1 JNDI Name:java:jboss/datasources/DolphinDS
Step 2 JDBC Driver postgresql-9.3-1101.jdbc41.jar
Step 3 Connection Settings

Connection URL:jdbc:postgresql://localhost:5432/dolphin
Username:dolphin
Password:dolphin

Connection
Edit
Transaction Isolation TRANSACTION_READ_COMMITED
Use JTA
Save

一度wildfly終了、再起動。

Enable
Comfirm

Test Connection
確認。

後は導入書参考に
/usr/local/jboss/standalone/configuration/standalone.xmlコピーか編集、
ビルドしたwarをデプロイ等する。

LXCコンテナ移動

LXCコンテナ移動

移動先でもLXC環境を作っておく。

必要なデータバックアップとっておく。
一応コンテナシャットダウンしておく。

移動元
$ sudo -i
# cd /var/lib/lxc
# sudo tar cpzf orca.tar.gz orca
# scp orca.tar.gz ubuntu@192.168.xxx.100:

移動先
$ ssh ubuntu@192.168.xxx.100
$ sudo mv orca.tar.gz /var/lib/lxc

$ sudo -i
# cd /var/lib/lxc
# tar --numeric-owner -xpzf orca.tar.gz
# exit
$ sudo lxc-ls -f
$ sudo lxc-start -n orca -d
$ ps ax

参考:

ORCA,OpenDolphinとも移動できました。

LXCでブリッジ

#ブリッジを作成し、物理IFをブリッジポートへ紐付ける
$ sudo vi /etc/network/interfaces

auto lo
 iface lo inet loopback

auto br0
 iface br0 inet static
  address 192.168.xxx.192
  network 192.168.xxx.0
  netmask 255.255.255.0
  broadcast 192.168.xxx.255
  gateway 192.168.xxx.1
  dns-nameservers 192.168.xxx.1
  bridge_ports eth0
  bridge_stp off

auto eth0
 iface eth0 inet manual

$ sudo vi /etc/lxc/default.conf

#lxc.network.link=lxcbr0
lxc.network.link=br0

$ sudo vi /etc/default/lxc-net

#USE_LXC_BRIDGE="true"
USE_LXC_BRIDGE=“false”
..
#LXC_BRIDGE="lxcbr0"
#LXC_ADDR="10.0.3.1"
#LXC_NETMASK="255.255.255.0"
#LXC_NETWORK="10.0.3.0/24"
#LXC_DHCP_RANGE="10.0.3.2,10.0.3.254"

LXCでサーバー構築1

LXCで ORCA&OpenDolphin サーバー構築1

ubuntu14.04 server & ML115(メモリ1G:HDD250G)

ubuntu-14.04-server-amd64.isoとってくる

USBメモリを準備。dfでUSBメモリ確認。/dev/sdbだったら、
$ dd if=ubuntu-14.04-server-amd64.iso of=/dev/sdb bs=1M

USBメモリから起動、後はいつもと同じ。
opensshだけインストール

$ sudo vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
$ sudo reboot

LXC導入
$ sudo apt-get install lxc

いきなり作ってみる、ここは時間かかる。
$ sudo MIRROR=http://ubuntutym.u-toyama.ac.jp/ubuntu/ lxc-create -t ubuntu -n u12 -- -d ubuntu -r precise -a amd64

ミラー設定はあった方が早いかも
$ sudo vi /etc/default/lxc
MIRROR="http://192.168.xxx.xxx:3142/archive.ubuntu.com/ubuntu"

起動
$ sudo lxc-start -n u12 -d

確認
$ sudo lxc-ls -f

ログインしてみる
$ ssh ubuntu@10.0.3.197

Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.13.0-24-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

cupsで2枚印刷設定

ひさしぶりにCUPS設定機会があったので、備忘録。
当院では確認用に処方箋2枚印刷いるので。

$ sudo service cups stop

$ sudo vi /etc/cups/printers.conf

<Printer lp1>
UUID urn:uuid:208fa432-dbfc-3280-481a-a4b0d489c49a
Info 1F 5380DN *2
Location 1F
MakeModel Brother HL5380DN for CUPS
DeviceURI lpd://192.168.xxx.xxx/POSTSCRIPT_P1
State Idle
StateTime 1401861378 #1401861377から 1増やす。
Type 8392724
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
Option copies 2 #ここ挿入。
</Printer>

 $ sudo service cups restart
テスト印刷してみる。

2014年4月16日水曜日

Vagrant & PostgreSQL9.3で構築1

Vagrant使って、実験環境構築やってみる。

ubuntu.comにクラウド用のファイルが準備されている。


https://cloud-images.ubuntu.com/vagrant/precise/20140407/ のなかにある
precise-server-cloudimg-amd64-vagrant-disk1.box を指定。

boxファイルをリストに加える。
新しく仮想マシン設定して、立ち上げる。


$ mkdir precise64

$ cd precise64/

$ vagrant box add u12s-amd64  https://cloud-images.ubuntu.com/vagrant/precise/20140407/precise-server-cloudimg-amd64-vagrant-disk1.box

$ vagrant init u12s-amd64

A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on

`vagrantup.com` for more information on using Vagrant.

$ vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'precise-server-amd64'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: precise64_default_1397574231693_73861
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2202.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2202 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2202
    default: SSH username: vagrant
    default: SSH auth method: private key

    default: Warning: Connection timeout. Retrying...
...

ログインして構築開始。
passなしで入れるのはなんか拍子抜けだけど楽。

$ vagrant ssh

Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-60-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue Apr 15 11:47:34 UTC 2014

  System load:  0.0               Processes:           72
  Usage of /:   4.0% of 39.37GB   Users logged in:     0
  Memory usage: 15%               IP address for eth0: 10.0.2.15
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud


PostgreSQL 9.3インストール



$ sudo vi /etc/apt/sources.list.d/pgdg.list


ファイルの1行目に以下を書く。

deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main



wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

$ sudo apt-get update

sudo apt-get install -y postgresql-9.3

$ sudo adduser dolphin -disabled-password

$ sudo -u postgres createuser -P --interactive --replication dolphin

$ sudo -u dolphin createdb -lC -Ttemplate0 -EUTF-8 dolphin

確認してみる

$ sudo -u dolphin psql dolphin

dolphin=# \du

dolphin=# \q

OpenJDKインストール


$ sudo apt-get -y install openjdk-7-jdk

Wildfly展開


作成メモ2と同様に作成。もしくは展開

$ tar zxvf jboss-as-7.2.0-hibernate-4.2.11-resteasy-3.0.7.tgz 

$ sudo mv jboss /usr/local/

$ sudo useradd jboss

$ sudo chown -R jboss.jboss /usr/local/jboss


hibernate 4.2.11とresteasy 3.0.7に上がってました。

管理ユーザー登録を作成メモ1同様にする。



$ sudo -i
# /usr/local/jboss/bin/add-user.sh

一度ログオフ。
# exit
$ exit

ホストからアクセスできるようにVagrantfile を編集


$ vi Vagrantfile
...
#config.vm.network "private_network", ip: "192.168.33.10"
...

コメント外して、「”」外して「:」に書き換え
config.vm.network :private_network, ip: "192.168.33.10"

$ vagrant reload

==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2201.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2201 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2201
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 4.1.12
    default: VirtualBox Version: 4.3
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => /Users/dolphin/OD-ORCA

==> default: VM already provisioned. Run `vagrant provision` or use `--provision` to force it

$ vagrant ssh

Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-60-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue Apr 15 12:40:14 UTC 2014

  System load:  0.0               Processes:           77
  Usage of /:   4.7% of 39.37GB   Users logged in:     0
  Memory usage: 12%               IP address for eth0: 10.0.2.15
  Swap usage:   0%                IP address for eth1: 192.168.33.10

ホスト側から192.168.33.10でアクセスできる。

$ sudo /usr/local/jboss/bin/standalone.sh -b=192.168.33.10 -bmanagement=192.168.33.10

ホストからブラウザで入ってみる。

http://192.168.33.10:8080

2014年4月5日土曜日

ORCAインストール (OpenDolphin用)

Dr.Mのマニュアルを参考にUbuntu12.04LTS Server ORCA4.7用に改編

OpenDolphin日記も参考にさせていただいております。


仮想マシン:Ubuntu64bit用を選択 メモリ1024MB HDD8G


Ubuntuインストール

日本を選択。
キーボード日本語選択。
DHCP設定の前にESC押して固定アドレス設定。
192.168.x.100 固定アドレス
255.255.255.0 netmask
192.168.x.1 gateway
192.168.x.1 name server(s)
ディスク全体を使う
暗号化しない
パッケージでOpenSSH serverを選択する。
GRUB はい
再起動。

他端末からログイン

IPv6を無効にするために、ファイルの最後に2行追加

$ sudo vi /etc/sysctl.conf
..
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1

NTPをインストールする
$ sudo aptitude install -y ntp

NTPサーバーを設定。
$ sudo vi /etc/ntp.conf
..
server ntp.nict.jp (ネットワーク的に近いところ)

日医標準レセプトソフト (ORCA4.7)のインストール

$ sudo -i
# wget -q http://ftp.orca.med.or.jp/pub/ubuntu/archive.key 
# apt-key add archive.key
# wget -q -O /etc/apt/sources.list.d/jma-receipt-precise47.list http://ftp.orca.med.or.jp/pub/ubuntu/jma-receipt-precise47.list
# apt-get update
# apt-get dist-upgrade
# exit
$ sudo apt-get install -y jma-receipt
$ sudo dpkg-reconfigure -p critical jma-receipt
$ sudo jma-setup
$ sudo service jma-receipt start
$ sudo gluseradd -file /etc/jma-receipt/passwd -p ormaster123 ormaster


CUPSインストール、設定

$ sudo aptitude install -y cups
$ sudo vi /etc/cups/cupsd.conf
..
# Only listen for connections from the local machine.
Listen 192.168.x.100:631 (<--localhostからこのマシンのアドレスに変更)
Listen /var/run/cups/cups.sock
..
# Restrict access to the server.
..
<Location />  Order allow,deny
  Allow 192.168.x.0/24(追加)
</Location>
..
# Restrict access to the admin pages.
..
<Location /admin>  Order allow,deny
  Allow 192.168.x.0/24(追加)
</Location>
..
MaxJobs 0(追加)
$ sudo service cups restart


日本語印刷のためpoppler-dataパッケージ追加

参考:OpenDolphin日記

$ sudo aptitude install poppler-data



MFC-8870DWのLinux用ドライバをインストール


$ sudo bash ./linux-brjprinter-installer-2.0.0-1 MFC-8870DW

OpenDolphinとの連携のためにPostgreSQL設定


$ sudo vi /etc/postgresql/9.1/main/postgresql.conf
..
# - Connection Settings -
..
listen_addresses = '*' # what IP address(es) to listen on;
先頭の#とって、localhostから*に)

$ sudo vi /etc/postgresql/9.1/main/pg_hba.conf
..
# IPv4 local connections:
host all  all  127.0.0.1/32      md5
host all all 192.168.x.0/24 trust(追加)


OpenDolphinとの連携のためにORCAの設定

$ sudo dpkg-reconfigure jma-receipt
いいえ、いいえ、はい、8210のまま

$ sudo reboot

Webブラウザでhttp://192.168.x.100:631

プリンターの追加:OpenDolphin日記参照

ORCAクライアントから接続してテスト印刷してみる。

2014年4月1日火曜日

OpenDolphin server 作成メモ2

Ubuntuでの構築は

を参考にしています。
公開いただき誠にありがとうございます。

もちろん、2.3.8mおよび導入法を作成していただいたM先生の導入書も必要。(要連絡)
参考:http://www.masuda-naika.net/openDolphin.html

こちらではOpenDolphinサーバを単独で構築し、別のクライアントから設定しています。
手順に若干の差異があります。

Ubuntu 12.04 LTS Server インストール時にPostgreSQL,OpenSSHを選択しています。
参照:作成メモ1

PostgreSQLversion確認

$ psql --version
psql (PostgreSQL) 9.1.11
contains support for command-line editing

NetBeans7.4をビルド作業用マシンにインストール。
M先生の導入書に従ってOpenDolphin-2.3.8mのソース一式を持ってくる。
後は上記Ubuntu12.04.pdfのとおり、pom.xmlソース修正してビルドする。

作成メモ1でUbuntu Server に配置したJBOSS-AS-7.2.0の一部モジュールを入れ替える。

Hibernate-core 4.2.10
解凍して以下の5つのjarファイルを取り出し、コピーしておく。

$ cd hibernate-4.2.10/

 hibernate-commons-annotations-4.0.2.Final.jar
 hibernate-core-4.2.10.Final.jar
 hibernate-entitymanager-4.2.10.Final.jar
 hibernate-envers-4.2.10.Final.jar
 hibernate-infinispan-4.2.10.Final.jar

 
$ sudo cp hibernate-commons-annotations-4.0.2.Final.jar
/usr/local/jboss/modules/system/layers/base/org/hibernate/commons-annotations/main/

$ sudo cp hibernate-envers-4.2.10.Final.jar /usr/local/jboss/modules/system/layers/base/org/hibernate/envers/main/

$ sudo cp hibernate-core-4.2.10.Final.jar hibernate-entitymanager-4.2.10.Final.jar hibernate-infinispan-4.2.10.Final.jar /usr/local/jboss/modules/system/layers/base/org/hibernate/main/


以下のファイル中のjarファイル名の部分を入れ替えたjarファイル名に修正する。

$ sudo vi /usr/local/jboss/modules/system/layers/base/org/hibernate/commons-annotations/main/module.xml

$ sudo vi /usr/local/jboss/modules/system/layers/base/org/hibernate/envers/main/module.xml

$ sudo vi /usr/local/jboss/modules/system/layers/base/org/hibernate/main/module.xml



RESTEasy 3.0.6
解凍して、以下のディレクトリをまるごと上書きコピーする。

$ cd resteasy-jboss-modules-3.0.6.Final/

$ sudo cp -a com/ /usr/local/jboss/modules/system/layers/base/
$ sudo cp -a javax/ /usr/local/jboss/modules/system/layers/base/
$ sudo cp -a org/ /usr/local/jboss/modules/system/layers/base/


所有者そろえる
$  sudo chown -R jboss.jboss /usr/local/jboss

せっかくなのでアーカイブしておく(仮想マシン用コピーなど)
$ cd /usr/local
$ sudo tar zcvf jboss-as-7.2.0-hibernate-4.2.10-resteasy-3.0.6.zip ./jboss

もう一息。

Mac mini & OSIRIX & OpenWhale

端末はMac mini Mid2007(10.4.11) とEarly2009(10.5.8) ・・でした

メモリ増設とSSD換装とOSあげ。

JavaあげないとOpenWhaleDolphinキビシイ。
いままではRDP運用でしのいでた。

先人方のブログを参考になんとかメモリ増設とSSD換装。
USBインストーラ作成、試してみた。

10.6.8 Snow Leopard
10.7.5 Lion
10.8.5 Mountain Lion
10.9 Mavericks

いまだにOSIRIX 2.7.5 localizedを使っているので、
OSあげても、動いてくれないと困る・・
ということで試してみた。

10.9ではOSIRIXで一部動きが違うところがあった。
 シリーズが1つのとき自動的にそのシリーズが選択されない。
 1クリックで選択は可能だが、普段は自動的に選択されていた。

ということで、いまは10.7.5と10.8.5にすることにした。

OpenWhaleDolphin2.3.8mは、Java7環境なのでLionは必要。
Mid2007はメモリ3Gで心もとないが、端末としてなら生きていけるかも。

今後ともOpenWhaleよろしくお願いします。

・・素朴でかわいいです
・・いつの間にかOSIRIXとのID連携がっ!

2014年2月1日土曜日

OpenDolphin server 作成メモ1

新規仮想マシンの作成

Ubuntu64bit用を選択 メモリ1536MB HDD8GB

ホスト名設定時に ESC 押して固定アドレス指定。

192.168.1.xxx
255.255.255.0 netmask
192.168.1.xx gateway
192.168.1.xx nameserver(s)

ディスク全体を使う
暗号化しない

パッケージでOpenSSH server、PostgreSQLserver選ぶ

インストールのち再起動。別マシンからsshでログイン

OpenJDKインストール

$ sudo apt-get update

$ sudo apt-get -y install openjdk-7-jdk

$ java -version

java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

PostgreSQLデータベース設定

まずOSにユーザーdolphin追加

$ sudo adduser dolphin -disabled-password


ユーザー `dolphin' を追加しています...
新しいグループ `dolphin' (1001) を追加しています...
新しいユーザー `dolphin' (1001) をグループ `dolphin' に追加しています...
ホームディレクトリ `/home/dolphin' を作成しています...
`/etc/skel' からファイルをコピーしています...
Changing the user information for dolphin
Enter the new value, or press ENTER for the default (以下そのままで変更なし:ENTERのみ)
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
以上で正しいですか? [Y/n] Y


次にPostgreSQLのユーザーdolphin追加

$ sudo -u postgres createuser -P

Enter name of role to add: dolphin
Enter password for new role: *******
Enter it again: *******
Shall the new role be a superuser? (y/n) y

データベースdolphin作成

$ sudo -u dolphin createdb -lC -Ttemplate0 -EUTF-8 dolphin

ビルドしたjboss持ってくる

$ scp jboss-as-7.2.0.Final.zip xxxx@192.168.1.xxx:


解凍&配置

$ sudo apt-get install unzip

$ unzip jboss-as-7.2.0.Final.zip

$ mv jboss-as-7.2.0.Final jboss

$ sudo mv jboss /usr/local

$ sudo useradd jboss

$ sudo chown -R jboss.jboss /usr/local/jboss


管理ユーザー登録

$ sudo -i

# /usr/local/jboss/bin/add-user.sh

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): そのままENTER

Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : hogehoge (jboss管理コンソールでの名前とパスワード設定:パスワード8文字以上)
Password : ********
 to add user 'xxxxx' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'xxxxx' to file '/usr/local/jboss/standalone/configuration/mgmt-

users.properties'
Added user 'xxxxx' to file '/usr/local/jboss/domain/configuration/mgmt-users.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for

server to server EJB calls.
yes/no? no
To represent the user add the following to the server-identities definition <secret

value="xxxxxxxx" />


起動

$  sudo /usr/local/jboss/bin/standalone.sh -b=192.168.1.xxx -bmanagement=192.168.1.xxx

とりあえず JBossAS起動まで。

確認

ブラウザで http://192.168.1.xxx:8080 にアクセス、管理コンソールでは先に決定した名前とパスワードで入ることができる。

先月から試験運用はじめました。

先月半ばからOpenDolphin試験運用はじめました。

手書きカルテも見ながらの入力です。

ORCAとの連携は今のところ順調です。

今までORCA上でセットをあまり作ってこなかったため、

入力項目が多く、患者さんの待ち時間がちょっとのびてるかも。

この1ヶ月は厳しそうです。

現在がんばってORCAのセットやDolphinのスタンプを作っています。

今まで事務さん任せにしていたところを、ORCAも復習しながらがんばっております。


















今日のコマンド

$ sudo /usr/local/jboss/bin/standalone.sh -b=192.168.1.xxx -bmanagement=192.168.1.xxx

VMwareESXi上の仮想サーバ (UbuntuServer 12.04 LTS)で動かしています。

$ sudo -u dolphin pg_dump -Fc dolphin > dolphinxxxx.dump

毎日のバックアップ必要ですね。

ORCA病名や処方のデータを取り込む機能があり、ちょっと助かっています。

ありがとうございます。