EPICS -- base的安装步骤详解
作者:互联网
环境准备:
- 安装平台:CentOS7
- 安装base的软件版本:base-7.0.3.1.tar.gz 下载地址
- 安装所依赖的软件包:readline-devel
安装过程:
- 安装依赖关系:
[root@localhost ~]# yum install readline-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.sjtu.edu.cn
* epel: fedora.cs.nctu.edu.tw
* extras: ftp.sjtu.edu.cn
* updates: ftp.sjtu.edu.cn
...
Package readline-devel-6.2-11.el7.x86_64 already installed and latest version
Nothing to do
- 新建安装目录/usr/local/EPICS(用户自己安装的软件习惯上放在/usr/local下):
[root@localhost ~]# cd /usr/local/
[root@localhost local]# mkdir /usr/local/EPICS
[root@localhost local]# cd EPICS/
[root@localhost EPICS]# pwd
/usr/local/EPICS
- 解压base软件包到/usr/local/EPICS下:
[root@localhost EPICS]# tar -xvzf /home/epics/base-7.0.3.1.tar.gz
base-7.0.3.1/LICENSE
base-7.0.3.1/Makefile
...
base-7.0.3.1/test/Makefile
base-7.0.3.1/test/tools/Makefile
base-7.0.3.1/test/tools/Snippets.plt
[root@localhost EPICS]# ls
base-7.0.3.1
- 为了在环境变量定义中,便于更换base版本,新建一个软链接:
[root@localhost EPICS]# ln -s base-7.0.3.1 base
[root@localhost EPICS]# ls
base base-7.0.3.1
[root@localhost EPICS]# ls -l
total 0
lrwxrwxrwx. 1 root root 12 Mar 16 10:41 base -> base-7.0.3.1
drwxr-xr-x. 8 root root 142 Mar 16 10:36 base-7.0.3.1
- 定义EPICS环境变量,为了使得全部用户都能使用这些环境变量,定义文件命名为epics.sh,并将其放在/etc/profile.d下:
[root@localhost EPICS]# vim /etc/profile.d/epics.sh
[root@localhost EPICS]# cat /etc/profile.d/epics.sh
export EPICS_BASE="/usr/local/EPICS/base"
export EPICS_HOST_ARCH=`${EPICS_BASE}/startup/EpicsHostArch`
export PATH="${PATH}:${EPICS_BASE}/bin/${EPICS_HOST_ARCH}"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${EPICS_BASE}/lib/${EPICS_HOST_ARCH}"
[root@localhost EPICS]#
- 使环境变量生效:
[root@localhost EPICS]# source /etc/profile.d/epics.sh # 使环境变量生效
[root@localhost EPICS]# echo $EPICS_BASE # 检查定义的环境变量
/usr/local/EPICS/base
[root@localhost EPICS]#
- 进入解压软件包所在的路径,运行make,编译源代码(等待大约5分钟),如果安装过程没有报错,则表示安装成功:
[root@localhost EPICS]# cd base
[root@localhost base]# make
make -C ./configure install
make[1]: Entering directory `/usr/local/EPICS/base-7.0.3.1/configure'
perl -CSD ../src/tools/makeMakefile.pl O.linux-x86_64 ../..
mkdir -p O.Common
make -C O.linux-x86_64 -f ../Makefile TOP=../.. \
...
make[4]: Nothing to be done for `install'.
make[4]: Leaving directory `/usr/local/EPICS/base-7.0.3.1/modules/pva2pva/iocBoot/iocwfdemo'
make[3]: Leaving directory `/usr/local/EPICS/base-7.0.3.1/modules/pva2pva/iocBoot'
make[2]: Leaving directory `/usr/local/EPICS/base-7.0.3.1/modules/pva2pva'
make[1]: Leaving directory `/usr/local/EPICS/base-7.0.3.1/modules'
[root@localhost base]#
- 可以使用EPICS base命令行工具,以下是三个常用EPICS base命令行工具:
[root@localhost base]# caget
No pv name specified. ('caget -h' for help.)
[root@localhost base]# caput
No pv name specified. ('caput -h' for help.)
[root@localhost base]# camonitor
No pv name specified. ('camonitor -h' for help.)
标签:--,EPICS,7.0,base,3.1,root,localhost 来源: https://blog.csdn.net/yuyuyuliang00/article/details/123520046