Changes between Initial Version and Version 1 of epics/install/epics_base


Ignore:
Timestamp:
05/10/13 23:24:45 (11 years ago)
Author:
obina
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • epics/install/epics_base

    v1 v1  
     1= EPICS install = 
     2 
     3== ディレクトリ構造 == 
     4今回は、インストール先を {{{ /opt/epics }}} 以下とする。 
     5 
     6 
     7{{{ 
     8[epics@myvm1 ~]$ su - 
     9 
     10[root@myvm1 ~]# cd /opt 
     11[root@myvm1 opt]# mkdir epics 
     12[root@myvm1 opt]# chown epics:epics epics 
     13}}} 
     14 
     15 
     16全体の方針(appとかcssディレクトリは当面必要ない) 
     17{{{ 
     18/opt 
     19└─ epics 
     20      ├─ R314.12.3 
     21      │    ├─ base           <--- base 
     22      │    ├─ extensions     <--- extensions 
     23      │    ├─ modules        <--- modules 
     24      │    │      ├─ soft 
     25      │    │      │    ├─ asyn 
     26      │    │      │    ├─ seq 
     27      │    │      │    ├─ stream 
     28      │    │      │    └─ ...... 
     29      │    │      │ 
     30      │    │      └─ instruments 
     31      │    │            ├─ xxx 
     32      │    │            └─ ...... 
     33      │    │       
     34      │    │       
     35      │    └── etc            <--- 環境設定など 
     36      │ 
     37      ├─ app                    <--- 各グループ用の運転用アプリケーション 
     38      │    ├── CO 
     39      │    ├── LLRF 
     40      │    ├── VAC 
     41      │    └── .... 
     42      │ 
     43      ├─ css 
     44      │    ├── download 
     45      │    └── linux-x86 
     46      │ 
     47      └── arc                    <--- ダウンロードしてきたファイル置き場 
     48 
     49}}} 
     50 
     51 
     52ディレクトリを作成し、ダウンロードしたファイルをarcに置いておく. 
     53{{{ 
     54[epics@myvm1 ~]$ cd /opt/epics/ 
     55[epics@myvm1 epics]$ ls 
     56[epics@myvm1 epics]$ mkdir R314.12.3 
     57[epics@myvm1 epics]$ mkdir arc 
     58[epics@myvm1 epics]$ cd arc 
     59[epics@myvm1 arc]$ wget http://www.aps.anl.gov/epics/download/base/baseR3.14.12.3.tar.gz 
     60[epics@myvm1 arc]$ wget http://www.aps.anl.gov/epics/download/modules/asyn4-21.tar.gz 
     61[epics@myvm1 arc]$ wget http://www-csr.bessy.de/control/SoftDist/sequencer/releases/seq-2.1.12.tar.gz 
     62 
     63[epics@myvm1 arc]$ wget http://www.aps.anl.gov/epics/download/extensions/extensionsTop_20120904.tar.gz 
     64[epics@myvm1 arc]$ wget http://www.aps.anl.gov/epics/download/extensions/gateway2_0_4_0.tar.gz 
     65[epics@myvm1 arc]$ wget http://www.aps.anl.gov/epics/download/extensions/msi1-6.tar.gz 
     66[epics@myvm1 arc]$ wget http://downloads.sourceforge.net/project/procserv/2.6.0/procServ-2.6.0.tar.gz 
     67 
     68[epics@myvm1 arc]$ wget http://epics.web.psi.ch/software/streamdevice/StreamDevice-2-6.tgz 
     69[epics@myvm1 arc]$ wget http://epics.web.psi.ch/software/streamdevice/StreamDevice-2-6-patch20121113 
     70 
     71}}} 
     72 
     73 
     74{{{ 
     75[epics@myvm1 ~]$ cd /opt/epics/R314.12.3 
     76[epics@myvm1 R314.12.3]$ gzip -dc ../arc/baseR3.14.12.3.tar.gz | tar xvf - 
     77[epics@myvm1 R314.12.3]$ mv base-3.14.12.3 base 
     78}}} 
     79 
     80 
     81環境変数の設定。 
     82{{{ 
     83[epics@myvm1 base]$ setenv EPICS_HOST_ARCH linux-x86 
     84[epics@myvm1 base]$ setenv LANG C 
     85}}} 
     86 
     87.cshrcにも書いておく 
     88{{{ 
     89[epics@myvm1 base]$ vi ~/.cshrc 
     90 
     91setenv EPICS_HOST_ARCH linux-x86 
     92set path=(/opt/epics/R314.12.3/base/bin/${EPICS_HOST_ARCH} /opt/epics/R314.12.3/extensions/bin/${EPICS_HOST_ARCH} $path) 
     93}}} 
     94 
     95 
     96 
     97makeかける(本当はconfigure/以下のディレクトリを参照して、サイト依存の定義ファイルを適宜書き換える必要があるのだが、とりあえずVM上で使う分には全てデフォルトのままでmake一発でも問題ない....だろう) 
     98{{{ 
     99[epics@myvm1 base]$ pwd 
     100/opt/epics/R314.12.3/base 
     101[epics@myvm1 base]$ setenv LANG C 
     102[epics@myvm1 base]$ make |& tee log_make 
     103}}} 
     104エラーが出ずに終了すればOK。足りないライブラリ等があればyumで適宜インストールする。 
     105 
     106caget, camonitor などのコマンドが実行できるかどうかを確認。 
     107 
     108== application 作成して動作確認 == 
     109{{{ 
     110[epics@myvm1 ~]$ mkdir app 
     111[epics@myvm1 ~]$ cd app/ 
     112[epics@myvm1 ~/app]$ mkdir example 
     113[epics@myvm1 ~/app]$ cd example 
     114 
     115[epics@myvm1 example]$ makeBaseApp.pl -l 
     116Valid application types are: 
     117        support 
     118        ioc 
     119        caServer 
     120        example 
     121        caClient 
     122Valid iocBoot types are: 
     123        ioc 
     124        example 
     125 
     126[epics@myvm1 ~/app]$ makeBaseApp.pl -t example example 
     127[epics@myvm1 ~/app]$ makeBaseApp.pl -i -t example example 
     128Using target architecture linux-x86 (only one available) 
     129The following applications are available: 
     130    example 
     131What application should the IOC(s) boot? 
     132The default uses the IOC's name, even if not listed above. 
     133Application name? 
     134[epics@myvm1 example]$ 
     135 
     136 
     137[epics@myvm1 example]$ ls 
     138Makefile  configure  exampleApp  iocBoot 
     139[epics@myvm1 example]$ make 
     140....... 
     141[epics@myvm1 example]$ ls 
     142Makefile  bin  configure  db  dbd  exampleApp  include  iocBoot  lib 
     143 
     144[epics@myvm1 example]$ cd iocBoot/iocexample/ 
     145[epics@myvm1 iocexample]$ chmod +x st.cmd 
     146[epics@myvm1 iocexample]$ ./st.cmd 
     147#!../../bin/linux-x86/example 
     148## You may have to change example to something else 
     149## everywhere it appears in this file 
     150< envPaths 
     151epicsEnvSet("ARCH","linux-x86") 
     152epicsEnvSet("IOC","iocexample") 
     153epicsEnvSet("TOP","/home/epics/app/example") 
     154epicsEnvSet("EPICS_BASE","/opt/epics/R314.12.3/base") 
     155cd /home/epics/app/example 
     156## Register all support components 
     157dbLoadDatabase "dbd/example.dbd" 
     158example_registerRecordDeviceDriver pdbbase 
     159## Load record instances 
     160dbLoadTemplate "db/userHost.substitutions" 
     161dbLoadRecords "db/dbSubExample.db", "user=epicsHost" 
     162## Set this to see messages from mySub 
     163#var mySubDebug 1 
     164## Run this to trace the stages of iocInit 
     165#traceIocInit 
     166cd /home/epics/app/example/iocBoot/iocexample 
     167iocInit 
     168Starting iocInit 
     169############################################################################ 
     170## EPICS R3.14.12.3 $Date: Mon 2012-12-17 14:11:47 -0600$ 
     171## EPICS Base built May  9 2013 
     172############################################################################ 
     173iocRun: All initialization complete 
     174## Start any sequence programs 
     175#seq sncExample, "user=epicsHost" 
     176epics> dbl 
     177epicsHost:ai1 
     178epicsHost:ai2 
     179epicsHost:ai3 
     180epicsHost:aiExample 
     181epicsHost:aiExample1 
     182epicsHost:aiExample2 
     183epicsHost:aiExample3 
     184epicsHost:aSubExample 
     185epicsHost:calc1 
     186epicsHost:calc2 
     187epicsHost:calc3 
     188epicsHost:calcExample 
     189epicsHost:calcExample1 
     190epicsHost:calcExample2 
     191epicsHost:calcExample3 
     192epicsHost:compressExample 
     193epicsHost:subExample 
     194epicsHost:xxxExample 
     195epics> 
     196 
     197}}} 
     198 
     199 
     200 
     201{{{ 
     202[epics@myvm1 ~]$ camonitor epicsHost:ai1 
     203epicsHost:ai1                  2013-05-09 15:46:32.849534 0 LOLO MAJOR 
     204epicsHost:ai1                  2013-05-09 15:46:33.850045 1 LOLO MAJOR 
     205epicsHost:ai1                  2013-05-09 15:46:34.850436 2 LOLO MAJOR 
     206epicsHost:ai1                  2013-05-09 15:46:35.850790 3 LOW MINOR 
     207epicsHost:ai1                  2013-05-09 15:46:36.851606 4 LOW MINOR 
     208 
     209}}} 
     210 
     211 
     212== excasで動作確認 == 
     213こっちが先か? 
     214{{{ 
     215[epics@myvm1 ~]$ excas 
     216 
     217[epics@myvm1 example]$ camonitor jane 
     218jane                           2013-05-09 15:50:58.817616 0.160158 
     219jane                           2013-05-09 15:50:59.729124 0.0654289 
     220jane                           2013-05-09 15:50:59.824466 0.0727615 
     221jane                           2013-05-09 15:50:59.920104 0.00726627 
     222jane                           2013-05-09 15:51:00.015853 0.0968468 
     223jane                           2013-05-09 15:51:00.111367 0.0201175 
     224jane                           2013-05-09 15:51:00.207458 0.100361 
     225jane                           2013-05-09 15:51:00.303285 0.0551737 
     226}}}