Install EPICS in CentOS 6 [detailed operation]
1, Install EPICS Base
1. Installation tools
① Open the terminal and enter root
② Install git, gcc, automake, autoconf, libtool, make and other tools
yum -y install git gcc automake autoconf libtool make
③ Install g + +, c++
yum whatprovides "* / g + +" (this command is to find out which installation package g + + is in) yum – y install gcc-c + + - 4.4.7-23.el6.x86_ (the installation content should be the same as the query result of the previous command)
④ Install readLine devel
yum –y install readline-devel
2. Install Base
① Download Base installation package
Website: https://epics.anl.gov/download/base/index.php
Download base-7.0.3.tar.gz
② Create the EPICS directory, enter the directory, move the base installation package to the directory, and extract the installation package
mkdir /home/yangdl/Epics cd /home/yangdl/Epics cp –r /home/yangdl/Downloads/base-7.0.3.tar.gz . tar –xzvf base-7.0.3.tar.gz
③ Establish soft links
ln –s base-7.0.3 base
④ View system architecture
/home/yangdl/Epics/base/startup/EpicsHostArch
Output: linux-x86 ʄ
⑤ Configure the config? Site file with vi editor
cd /home/yangdl/Epics/base/configure vi CONFIG_SITE
Enter the INSERT mode (press i) and assign linux-x86-64 to the three variables,
Save and exit, (press Esc +:, enter wq! Return)
⑥ Configuring the environment for compiling Base packages
vi /etc/profile
Add the following to the end of the / etc/profile file, save and exit
#Add content: export EPICS_BASE=/home/yangdl/Epics/base export EPICS_HOST_ARCH=linux-x86_64 export PATH=${PATH}:${EPICS_BASE}/bin/${EPICS_HOST_ARCH} export EPICS_CA_ADDR_LIST=127.0.0.1:5064 export EPICS_CA_AUTO_ADDR_LIST=no export NODE_EPICS_LIBCA=${EPICS_BASE}/lib/${EPICS_HOST_ARCH}/libca export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${EPICS_BASE}/lib/${EPICS_HOST_ARCH}
source /etc/profile (run the command for the modified profile to take effect immediately)
⑦ Compile Base package
cd ${EPICS_BASE} make
⑧ Check whether the installation is successful
makeBaseApp.pl
2, Create IOC
1. Create startup file
① Create a folder in the ${epics ﹣ base} / test / directory and enter the folder
mkdir ${EPICS_BASE}/test/firstIoc cd ${EPICS_BASE}/test/firstIoc
② Create App directory
makeBaseApp.pl –t example AppName ls
View files and folders generated in the directory
③ Create the iocBoot directory
makeBaseApp.pl –i –t example AppName ls
View files and folders generated in the directory
Compile 4.
make
2. Start IOC
① Enter startup folder
cd iocBoot/iocName ls (Show: Makefile README st.cmd)
② Add execution permission to the ioc startup script st.cmd in this directory
chmod +x ./st.cmd ls (Show: Makefile README **st.cmd**)
③ Configure environment path
make envPaths ls (Show: envPaths Makefile README st.cmd)
④ Start ioc
./st.cmd
⑤ Using iocsh to operate records
epics> dbl epics> dbpr root:ai1 epics> dbpf root:ai1.VAL 1
Three, expand
Write the above installation process as a script EpicsBaseIocAuto.sh
Run sh EpicsBaseIocAuto.sh to install Base and IOC automatically. (picture from him for reference)
4, Install Extensions
1. Download the installation package
① Extensions:
https://epics.anl.gov/extensions/configure/index.php (extensionsTop_20120904.tar.gz)
② ALH:
https://epics.anl.gov/extensions/alh/index.php (alh1_2_35.tar.gz)
③ MEDM:
https://epics.anl.gov/extensions/medm/index.php (MEDM3_1_11.tar.gz)
④ EDM:
https://github.com/gnartohl/edm/releases (edm-1-12-105D.tar.gz)
2. Environment settings
① Unzip the Extensions to the / home / yangdl / pictures / directory
cd /home/yangdl/Epics/ cp –r /home/yangdl/Downloads/extensionsTop_20120904.tar.gz . tar -xzvf extensionsTop_20120904.tar.gz
② Extract ALH, MEDM and EDM to the directory / home / yangdl / pictures / extensions / SRC /
cd src cp –r /home/yangdl/Downloads/*1*.tar.gz . tar –xzvf alh1_2_35.tar.gz tar –xzvf MEDM3_1_11.tar.gz tar –xzvf edm-1-12-105D.tar.gz
③ Create the etc folder in the extensions directory
cd /home/yangdl/Epics/extensions mkdir etc
④ Edit the profile file and run it for immediate effect
vi /etc/profile
Add the following to the end of the / etc/profile file, save and exit
#Add content: export EPICS_EXTENSIONS=/home/yangdl/Epics/extensions export PATH=${PATH}:${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH} export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH}
source /etc/profile
3. Install software tools
yum –y install libX* yum –y install xorg-x11-xbitmaps yum –y install openmotif yum –y install openmotif-devel yum –y install giflib-devel yum –y install flex yum –y install byacc yum -y install *75dpi*
4. Installation of ALH, MEDM, EDM
① Install ALH
cd ${EPICS_EXTENSIONS}/src/alh1_2_35 make
#Check whether the installation is successful
alh
② Install MEDM
cd ${EPICS_EXTENSIONS}/src/medm_MEDM3_1_11 make
#Check whether the installation is successful
medm
③ Installing EDM
Step 1. Configure the compilation environment
#Enter the extensions/configure directory, and modify the epics? Base and epics? Extensions parameters in the RELEASE file
cd ${EPICS_EXTENSIONS}/configure vi RELEASE
#Add content: export EPICS_BASE=/home/yangdl/Epics/base export EPICS_EXTENSIONS=/home/yangdl/Epics/extensions
make # Make the modified parameters effective immediately
Step 2. Compile EDM
mkdir –p ${EPICS_EXTENSIONS}/include/edm # In the extensions directory, create the edm folder cd ${EPICS_EXTENSIONS}/src # Go to the extensions/src directory mv edm-1-12-105D edm # Rename edm folder cd edm # Enter edm directory make # Compile
Step 3. Generate configuration file
cd ${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH} export EDMOBJECTS=$PWD export EDMPVOBJECTS=$PWD export EDM=${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}/edm for pv in Epics Calc Log Loc;do $EDM -addpv $PWD/lib$pv.so;done for ff in lib*.so;do ${EDM} -add $PWD/$ff; done sed -i -e "s|$PWD|"'${EDMLIBS}|' edmObjects edmPvObjects rm edmObjects~ edmPvObjects~ unset EDMOBJECTS EDMPVOBJECTS EDM install -d ${EPICS_EXTENSIONS}/etc mv edmObjects edmPvObjects ${EPICS_EXTENSIONS}/etc/
Step 4. Configure the running environment
#Edit profile file
vi /etc/profile
#Add the following to the end of the / etc/profile file
Add content: export EDMOBJECTS=$EPICS_EXTENSIONS/etc export EDMPVOBJECTS=$EPICS_EXTENSIONS/etc export EDMFILES=$EPICS_EXTENSIONS/src/edm/edmMain export EDMHELPFILES=$EPICS_EXTENSIONS/src/edm/helpFiles export EDMLIBS=$EPICS_EXTENSIONS/lib/$EPICS_HOST_ARCH xset fp+ /usr/share/X11/fonts/75dpi
#Make the modified profile file take effect immediately
source /etc/profile
Step 5. Check whether the installation is successful
edm