Appion をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
本家様 [[http://emg.nysbc.org/redmine/projects/appion/wik...
&color(lightseagreen){''CentOS 7.6''}; に入れてみた
***準備 [#zf03b8f6]
以下のパッケージが必要みたい
&size(10){[[http://emg.nysbc.org/redmine/projects/appion/...
#code(nonumber){{
yum install \
python-tools python-devel python-matplotlib \
subversion ImageMagick grace gnuplot \
wxPython numpy scipy python-imaging \
gcc-gfortran compat-gcc-34-g77 \
gcc-objc fftw3-devel gsl-devel \
mysql mysql-server MySQL-python \
httpd php php-mysql phpMyAdmin \
gcc-c++ openmpi-devel libtiff-devel \
php-devel gd-devel re2c fftw3-devel php-gd \
xorg-x11-server-Xvfb netpbm-progs \
libssh2-devel
}}
だが、、品目が正しくない.
「mysql」「mysql-server」は「mariadb」「mariadb-server」...
&color(lightseagreen){''CentOS 7.6''};に「compat-gcc-34-g...
このパッケージは「Fortran 77 support for compatibility co...
&color(lightseagreen){''CentOS 7.6''};でg77って、見当たら...
補足
「php-pecl-ssh2」パッケージが必要であった
***mysqlの設定 [#m358f611]
「/etc/my.cnf.d/server.cnf」を修正します。
[mysqld]セクションの最後に下記を追加します
#code(nonumber){{
[root@c ~]# vi /etc/my.cnf.d/server.cnf
:
:
[mysqld]
query_cache_type = 1
query_cache_size = 100M
query_cache_limit= 100M
default_storage_engine=MyISAM
[mysqldump]
:
[root@c ~]#
}}
この後データベースを起動させます
#code(nonumber){{
[root@c ~]# systemctl enable mariadb
[root@c ~]# systemctl start mariadb
}}
次にAppion向けのデータベースを作ります
#code(nonumber){{
[root@c ~]# mysqladmin create leginondb
[root@c ~]# mysqladmin create projectdb
}}
mysqlにアクセスするユーザを作成。ここでは「usr_object」な...
#code(nonumber){{
[root@c ~]# mysql -u root mysql
mysql> CREATE USER usr_object@'%.sybyl.local' IDENTIFIED ...
mysql> GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON leg...
mysql> GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON pro...
*あるいは簡単に
CREATE USER usr_object@'localhost';
GRANT ALL PRIVILEGES ON leginondb.* TO usr_object@'localh...
GRANT ALL PRIVILEGES ON projectdb.* TO usr_object@'localh...
}}
これでmysqlユーザの「usr_object」は「leginondb」「project...
次に「ap」から始まるデータベースに対しての操作をmysqlユー...
&color(red){*};&size(10){「ap」から始まるデータベースはこ...
#code(nonumber){{
mysql> GRANT ALTER, CREATE, INSERT, SELECT, UPDATE, DELET...
*あるいは簡単に
GRANT ALTER, CREATE, INSERT, SELECT, UPDATE, DELETE ON `a...
}}
ここまできたら、mysqlユーザの「usr_object」で接続テストを...
#code(nonumber){{
[root@c ~]# mysql -u usr_object -D leginondb -h c.sybyl.l...
Enter password:
mysql> SHOW VARIABLES LIKE 'query%';
+------------------------------+-----------+
| Variable_name | Value |
+------------------------------+-----------+
| query_alloc_block_size | 8192 |
| query_cache_limit | 104857600 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 104857600 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 8192 |
+------------------------------+-----------+
7 rows in set (0.00 sec)
mysql> quit
[root@c ~]#
}}
コマンドラインで接続テスト
#code(nonumber){{
[root@c ~]# php -r "mysql_connect('c.sybyl.local','usr_ob...
Uptime: 2580 Threads: 1 Questions: 37 Slow queries: 0 ...
[root@c ~]#
*あるいは
php -r "mysql_connect('localhost','usr_object','','legino...
}}
***ファイルシステム [#g45ca505]
データの置き場所とかを考える
「/your_file_server_mount_point/whatever」
な場所を定義しておく。
ここでは「/home」でいいかなぁ
***アプリケーションの取得 [#i40d94e8]
gitから入手する。
基本、gitで取得した場所でアプリを展開する感じ
#code(nonumber){{
[root@c ~]# cd /Appl
[root@c Appl]# git clone -b myami-3.3 http://emg.nysbc.or...
(appionパッケージをインストールします)
[root@c Appl]# cd myami/appion
[root@c appion]# python setup.py install --install-script...
(次にmyamiパッケージをインストールします)
[root@c ~]# cd /App/myami
[root@c myami]# export PYTHONPATH=/Appl/myami/lib/python2...
[root@c myami]# ./pysetup.sh install --prefix=/Appl/myami...
Log file: /Appl/myami/pysetup.log
processing pyami... ok.
processing sinedon... ok.
processing redux... ok.
processing imageviewer... ok.
processing leginon... ok.
processing pyscope... ok.
processing slack... ok.
processing modules/radermacher... ok.
processing modules/libcv... ok.
processing modules/numextension... ok.
[root@c myami]#
}}
次に設定ファイをコピーします。
#code(nonumber){{
[root@c ~]# cp /Appl/myami/leginon/leginon.cfg.template /...
[root@c ~]# cp /Appl/myami/sinedon/examples/sinedon.cfg /...
}}
これが済めばコマンドラインで一応Appionは使えるっぽい
&color(red){*};myamiのインストールで「--prefix」を付けた...
#code(nonumber){{
[illya@c ~]$ export PYTHONPATH=/Appl/myami/lib/python2.7/...
[illya@c ~]$ /Appl/appion/gctf.py
/usr/lib64/python2.7/site-packages/matplotlib/__init__.py...
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotli...
or matplotlib.backends is imported for the first time.
warnings.warn(_use_error_msg)
... Time stamp: 19mar17d45
... Function name: gctf
... Appion directory: /usr/lib/python2.7/site-packages
... Processing hostname: c.sybyl.local
Usage: gctf.py --projectid=## --runname=<runname> --sessi...
:
:
[illya@c ~]$
}}
matplotlibの警告が出るが一応使えるっぽい
***Web Server Installation(Redux) [#lc0f0b90]
#code(nonumber){{
[root@c ~]# easy_install fs==0.5 PyFFTW3
[root@c ~]# cd /Appl/myami/
[root@c myami]# cp -r ./myamiweb /var/www/myamiweb
[root@c myami]# chmod 777 /var/www/myamiweb
}}
#code(nonumber){{
[root@c ~]# cd /Appl/myami/redux/
[root@c redux]# cp redux.cfg.template /etc/myami/redux.cfg
}}
「redux.cfg」を修正する
#code(nonumber){{
--- redux.cfg.template 2019-03-12 01:15:55.878031945 +0900
+++ /etc/myami/redux.cfg 2019-03-12 01:38:42.53069...
@@ -10,11 +10,11 @@
# Sizes are in MB
[cache]
-enable: no
+enable: yes
path: /var/cache/myami/redux
disksize: 500
memsize: 500
# default uses current directory... better to specify fu...
[log]
-file: redux.log
+file: /var/log/redux.log
}}
[cache]の場所を確保する
#code(nonumber){{
[root@c ~]# mkdir -p /var/cache/myami/redux
}}
サイトの設定ファイルを用意します
#code(nonumber){{
[root@c ~]# vi /etc/httpd/conf.d/myamiweb.conf
Alias /myamiweb /var/www/myamiweb
<Directory /var/www/myamiweb >
DirectoryIndex index.php
Options -Indexes
AllowOverride all
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc on
php_flag track_vars on
</Directory>
[root@c ~]# apachectl configtest
}}
reduxdデーモンを起動させる。
#code(nonumber){{
[root@c ~]# chkconfig --add reduxd <-- appionパッ...
[root@c ~]# vi /etc/init.d/reduxd
:
# Source function library.
. /etc/rc.d/init.d/functions
+export PATH=/Appl/myami/bin:$PATH
+export PYTHONPATH=/Appl/myami/lib/python2.7/site-package...
prog=reduxd
:
[root@c ~]# systemctl daemon-reload
[root@c ~]# systemctl start reduxd
[root@c ~]# systemctl status reduxd
}}
正常に動いたかは「systemctl status reduxd」の確認のほか、...
その後、webサーバを立ち上げて該当URLへアクセスする。ここ...
#code(nonumber){{
[root@c ~]# systemctl restart httpd
}}
すると下記のような画面が表示される
&ref(2019y03m17d_190702967.png,nolink);
ログイン設定は「Enable Login System:」は「No」、「Enable ...
&ref(2019y03m17d_191047201.png,nolink);
次に、データベースとの接続設定画面になる。
&ref(2019y03m17d_191312082.png,nolink);
ここでは下記のようにしました
|BGCOLOR(YELLOW):項目|BGCOLOR(YELLOW):値|
|Enter the Database Host Name:|localhost|
|Enter the Database username:|usr_object|
|Enter the Database password:||
|Enter the Leginon database name:|leginondb|
|Enter the Project database name:|projectdb|
次に、その他のセットアップ画面になって
&ref(2019y03m17d_191614559.png,nolink);
「Enter Redux Image Server location and port:」は、「loca...
具体的には、/var/log/redux.log に記載されています。
「Do you want to enable PHP image caching for faster imag...
「Do you want to enable the Appion image processing pipel...
「Enter Appion database prefix:」はそのまま「ap」
「Do you wish to use the IMAGIC image processing package...
「Do you wish to use programs that require MATLAB?」は持...
「Do you want to use image processing tools that are stil...
「Enter a temporary upload directory location.」は「/home...
「Enter a default Appion base directory location.」は「/A...
&ref(2019y03m17d_193211066.png,nolink);
計算を実行するノードの登録を行う。ここでは「localhost」の...
「Local cluster host name :」は「localhost」
「Path to Appion Scripts :」は「/Appl/appion」
「Path to appionlib directory :」は「/Appl/myami/appion/a...
「Base output directory :」は「/home/appion」
「Directory Seperator, eg. / :」は「/」
&ref(2019y03m17d_194422694.png,nolink);
このときにapacheユーザによる設定ファイル「/var/www/myamiw...
内容を確認して「DB initialiization」ボタンを押下します。
これが完了すれば、「http://localhost/myamiweb/index.php」...
&ref(2019y03m17d_200454253.png,nolink);
終了行:
本家様 [[http://emg.nysbc.org/redmine/projects/appion/wik...
&color(lightseagreen){''CentOS 7.6''}; に入れてみた
***準備 [#zf03b8f6]
以下のパッケージが必要みたい
&size(10){[[http://emg.nysbc.org/redmine/projects/appion/...
#code(nonumber){{
yum install \
python-tools python-devel python-matplotlib \
subversion ImageMagick grace gnuplot \
wxPython numpy scipy python-imaging \
gcc-gfortran compat-gcc-34-g77 \
gcc-objc fftw3-devel gsl-devel \
mysql mysql-server MySQL-python \
httpd php php-mysql phpMyAdmin \
gcc-c++ openmpi-devel libtiff-devel \
php-devel gd-devel re2c fftw3-devel php-gd \
xorg-x11-server-Xvfb netpbm-progs \
libssh2-devel
}}
だが、、品目が正しくない.
「mysql」「mysql-server」は「mariadb」「mariadb-server」...
&color(lightseagreen){''CentOS 7.6''};に「compat-gcc-34-g...
このパッケージは「Fortran 77 support for compatibility co...
&color(lightseagreen){''CentOS 7.6''};でg77って、見当たら...
補足
「php-pecl-ssh2」パッケージが必要であった
***mysqlの設定 [#m358f611]
「/etc/my.cnf.d/server.cnf」を修正します。
[mysqld]セクションの最後に下記を追加します
#code(nonumber){{
[root@c ~]# vi /etc/my.cnf.d/server.cnf
:
:
[mysqld]
query_cache_type = 1
query_cache_size = 100M
query_cache_limit= 100M
default_storage_engine=MyISAM
[mysqldump]
:
[root@c ~]#
}}
この後データベースを起動させます
#code(nonumber){{
[root@c ~]# systemctl enable mariadb
[root@c ~]# systemctl start mariadb
}}
次にAppion向けのデータベースを作ります
#code(nonumber){{
[root@c ~]# mysqladmin create leginondb
[root@c ~]# mysqladmin create projectdb
}}
mysqlにアクセスするユーザを作成。ここでは「usr_object」な...
#code(nonumber){{
[root@c ~]# mysql -u root mysql
mysql> CREATE USER usr_object@'%.sybyl.local' IDENTIFIED ...
mysql> GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON leg...
mysql> GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON pro...
*あるいは簡単に
CREATE USER usr_object@'localhost';
GRANT ALL PRIVILEGES ON leginondb.* TO usr_object@'localh...
GRANT ALL PRIVILEGES ON projectdb.* TO usr_object@'localh...
}}
これでmysqlユーザの「usr_object」は「leginondb」「project...
次に「ap」から始まるデータベースに対しての操作をmysqlユー...
&color(red){*};&size(10){「ap」から始まるデータベースはこ...
#code(nonumber){{
mysql> GRANT ALTER, CREATE, INSERT, SELECT, UPDATE, DELET...
*あるいは簡単に
GRANT ALTER, CREATE, INSERT, SELECT, UPDATE, DELETE ON `a...
}}
ここまできたら、mysqlユーザの「usr_object」で接続テストを...
#code(nonumber){{
[root@c ~]# mysql -u usr_object -D leginondb -h c.sybyl.l...
Enter password:
mysql> SHOW VARIABLES LIKE 'query%';
+------------------------------+-----------+
| Variable_name | Value |
+------------------------------+-----------+
| query_alloc_block_size | 8192 |
| query_cache_limit | 104857600 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 104857600 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 8192 |
+------------------------------+-----------+
7 rows in set (0.00 sec)
mysql> quit
[root@c ~]#
}}
コマンドラインで接続テスト
#code(nonumber){{
[root@c ~]# php -r "mysql_connect('c.sybyl.local','usr_ob...
Uptime: 2580 Threads: 1 Questions: 37 Slow queries: 0 ...
[root@c ~]#
*あるいは
php -r "mysql_connect('localhost','usr_object','','legino...
}}
***ファイルシステム [#g45ca505]
データの置き場所とかを考える
「/your_file_server_mount_point/whatever」
な場所を定義しておく。
ここでは「/home」でいいかなぁ
***アプリケーションの取得 [#i40d94e8]
gitから入手する。
基本、gitで取得した場所でアプリを展開する感じ
#code(nonumber){{
[root@c ~]# cd /Appl
[root@c Appl]# git clone -b myami-3.3 http://emg.nysbc.or...
(appionパッケージをインストールします)
[root@c Appl]# cd myami/appion
[root@c appion]# python setup.py install --install-script...
(次にmyamiパッケージをインストールします)
[root@c ~]# cd /App/myami
[root@c myami]# export PYTHONPATH=/Appl/myami/lib/python2...
[root@c myami]# ./pysetup.sh install --prefix=/Appl/myami...
Log file: /Appl/myami/pysetup.log
processing pyami... ok.
processing sinedon... ok.
processing redux... ok.
processing imageviewer... ok.
processing leginon... ok.
processing pyscope... ok.
processing slack... ok.
processing modules/radermacher... ok.
processing modules/libcv... ok.
processing modules/numextension... ok.
[root@c myami]#
}}
次に設定ファイをコピーします。
#code(nonumber){{
[root@c ~]# cp /Appl/myami/leginon/leginon.cfg.template /...
[root@c ~]# cp /Appl/myami/sinedon/examples/sinedon.cfg /...
}}
これが済めばコマンドラインで一応Appionは使えるっぽい
&color(red){*};myamiのインストールで「--prefix」を付けた...
#code(nonumber){{
[illya@c ~]$ export PYTHONPATH=/Appl/myami/lib/python2.7/...
[illya@c ~]$ /Appl/appion/gctf.py
/usr/lib64/python2.7/site-packages/matplotlib/__init__.py...
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotli...
or matplotlib.backends is imported for the first time.
warnings.warn(_use_error_msg)
... Time stamp: 19mar17d45
... Function name: gctf
... Appion directory: /usr/lib/python2.7/site-packages
... Processing hostname: c.sybyl.local
Usage: gctf.py --projectid=## --runname=<runname> --sessi...
:
:
[illya@c ~]$
}}
matplotlibの警告が出るが一応使えるっぽい
***Web Server Installation(Redux) [#lc0f0b90]
#code(nonumber){{
[root@c ~]# easy_install fs==0.5 PyFFTW3
[root@c ~]# cd /Appl/myami/
[root@c myami]# cp -r ./myamiweb /var/www/myamiweb
[root@c myami]# chmod 777 /var/www/myamiweb
}}
#code(nonumber){{
[root@c ~]# cd /Appl/myami/redux/
[root@c redux]# cp redux.cfg.template /etc/myami/redux.cfg
}}
「redux.cfg」を修正する
#code(nonumber){{
--- redux.cfg.template 2019-03-12 01:15:55.878031945 +0900
+++ /etc/myami/redux.cfg 2019-03-12 01:38:42.53069...
@@ -10,11 +10,11 @@
# Sizes are in MB
[cache]
-enable: no
+enable: yes
path: /var/cache/myami/redux
disksize: 500
memsize: 500
# default uses current directory... better to specify fu...
[log]
-file: redux.log
+file: /var/log/redux.log
}}
[cache]の場所を確保する
#code(nonumber){{
[root@c ~]# mkdir -p /var/cache/myami/redux
}}
サイトの設定ファイルを用意します
#code(nonumber){{
[root@c ~]# vi /etc/httpd/conf.d/myamiweb.conf
Alias /myamiweb /var/www/myamiweb
<Directory /var/www/myamiweb >
DirectoryIndex index.php
Options -Indexes
AllowOverride all
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc on
php_flag track_vars on
</Directory>
[root@c ~]# apachectl configtest
}}
reduxdデーモンを起動させる。
#code(nonumber){{
[root@c ~]# chkconfig --add reduxd <-- appionパッ...
[root@c ~]# vi /etc/init.d/reduxd
:
# Source function library.
. /etc/rc.d/init.d/functions
+export PATH=/Appl/myami/bin:$PATH
+export PYTHONPATH=/Appl/myami/lib/python2.7/site-package...
prog=reduxd
:
[root@c ~]# systemctl daemon-reload
[root@c ~]# systemctl start reduxd
[root@c ~]# systemctl status reduxd
}}
正常に動いたかは「systemctl status reduxd」の確認のほか、...
その後、webサーバを立ち上げて該当URLへアクセスする。ここ...
#code(nonumber){{
[root@c ~]# systemctl restart httpd
}}
すると下記のような画面が表示される
&ref(2019y03m17d_190702967.png,nolink);
ログイン設定は「Enable Login System:」は「No」、「Enable ...
&ref(2019y03m17d_191047201.png,nolink);
次に、データベースとの接続設定画面になる。
&ref(2019y03m17d_191312082.png,nolink);
ここでは下記のようにしました
|BGCOLOR(YELLOW):項目|BGCOLOR(YELLOW):値|
|Enter the Database Host Name:|localhost|
|Enter the Database username:|usr_object|
|Enter the Database password:||
|Enter the Leginon database name:|leginondb|
|Enter the Project database name:|projectdb|
次に、その他のセットアップ画面になって
&ref(2019y03m17d_191614559.png,nolink);
「Enter Redux Image Server location and port:」は、「loca...
具体的には、/var/log/redux.log に記載されています。
「Do you want to enable PHP image caching for faster imag...
「Do you want to enable the Appion image processing pipel...
「Enter Appion database prefix:」はそのまま「ap」
「Do you wish to use the IMAGIC image processing package...
「Do you wish to use programs that require MATLAB?」は持...
「Do you want to use image processing tools that are stil...
「Enter a temporary upload directory location.」は「/home...
「Enter a default Appion base directory location.」は「/A...
&ref(2019y03m17d_193211066.png,nolink);
計算を実行するノードの登録を行う。ここでは「localhost」の...
「Local cluster host name :」は「localhost」
「Path to Appion Scripts :」は「/Appl/appion」
「Path to appionlib directory :」は「/Appl/myami/appion/a...
「Base output directory :」は「/home/appion」
「Directory Seperator, eg. / :」は「/」
&ref(2019y03m17d_194422694.png,nolink);
このときにapacheユーザによる設定ファイル「/var/www/myamiw...
内容を確認して「DB initialiization」ボタンを押下します。
これが完了すれば、「http://localhost/myamiweb/index.php」...
&ref(2019y03m17d_200454253.png,nolink);
ページ名:
1