2017년 1월 25일 수요일

, ,

libncursesw.so.5: cannnot open... error solution [PetaLinux]

When I try to open petalinux-config the terminal get this error

namsh@namsh-VirtualBox:~/test_project/images/linux$ petalinux-config
INFO: Checking component...
INFO: Config linux
[INFO ] config linux
mconf: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
make: *** [config] Error 255
ERROR: Failed to config linux!
ERROR: Failed to config component linux
This is 32bit software on a 64bit install, I need the lib32 version
Solution is installing libncursesw5:i386 package

namsh@namsh-VirtualBox:~/test_project/images/linux$ sudo aptitude install libncursesw5:i386
The following NEW packages will be installed:
  libgpm2:i386{a} libncursesw5:i386 libtinfo5:i386{a} 

After the install package rerun petalinux-config

namsh@namsh-VirtualBox:~/test_project/images/linux$ petalinux-config
INFO: Checking component...
INFO: Config linux
[INFO ] config linux

Continue reading libncursesw.so.5: cannnot open... error solution [PetaLinux]

2017년 1월 23일 월요일

, , ,

petalinux build error solution [PetaLinux]

 When ruuning a standard petalinux build process on ubuntu. Sometimes fails to build with error messages
namsh@namsh-VirtualBox:~/test_project$ petalinux-build
INFO: Checking component...
INFO: Generating make files and build linux
INFO: Generating make files for the subcomponents of linux
INFO: Building linux
[INFO ] pre-build linux/rootfs/fwupgrade
[INFO ] pre-build linux/rootfs/peekpoke
[INFO ] pre-build linux/rootfs/uWeb
[INFO ] build linux/kernel
[INFO ] update linux/u-boot source
[INFO ] generate linux/u-boot configuration files
[INFO ] build linux/u-boot
[INFO ] build zynq_fsbl
[INFO ] Expanding stagefs
[ERROR] E: Sub-process /opt/petalinux-v2014.4-final/tools/packagemanager/bin/dpkg returned an error code (127)
[ERROR] make[2]: *** [.pkg_stagefs] Error 255
[ERROR] make[1]: *** [sub_build_component_/none/packages-repo/single/plnx-repo] Error 2
ERROR: Failed to build linux

The follow is the soltution of this error

1. Enable 32bit library
namsh@namsh-VirtualBox:/opt/petalinux-v2014.4-final$ sudo dpkg --add-architecture i386
[sudo] password for namsh: 

2. update the package
namsh@namsh-VirtualBox:/opt/petalinux-v2014.4-final$ sudo apt-get -y update
Ign http://extras.ubuntu.com trusty InRelease                                
Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB]        
...  
Hit http://security.ubuntu.com trusty-security/restricted Translation-en    
Hit http://security.ubuntu.com trusty-security/universe Translation-en      
Fetched 1,685 kB in 10s (158 kB/s)                                          
Reading package lists... Done

3. install the 32bit sellinux package
namsh@namsh-VirtualBox:/opt/petalinux-v2014.4-final$ sudo aptitude install libselinux1:i386
The following NEW packages will be installed:
  gcc-4.9-base:i386{a} libc6:i386{a} libgcc1:i386{a} libpcre3:i386{a}
  libselinux1:i386
0 packages upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,249 kB of archives. After unpacking 10.5 MB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main gcc-4.9-base i386 4.9.3-0ubuntu4 [15.1 kB]
...
4. rerun the petalinux-build
namsh@namsh-VirtualBox:~/test_project$ petalinux-build
INFO: Checking component...
INFO: Generating make files and build linux
INFO: Generating make files for the subcomponents of linux
INFO: Building linux
[INFO ] pre-build linux/rootfs/fwupgrade
[INFO ] pre-build linux/rootfs/peekpoke
[INFO ] pre-build linux/rootfs/uWeb
[INFO ] build linux/kernel
[INFO ] update linux/u-boot source
[INFO ] generate linux/u-boot configuration files
[INFO ] build linux/u-boot
[INFO ] build zynq_fsbl
[INFO ] Expanding stagefs
[INFO ] build linux/rootfs/fwupgrade
[INFO ] build linux/rootfs/peekpoke
[INFO ] build linux/rootfs/uWeb
[INFO ] build kernel in-tree modules
[INFO ] modules linux/kernel
[INFO ] post-build linux/rootfs/fwupgrade
[INFO ] post-build linux/rootfs/peekpoke
[INFO ] post-build linux/rootfs/uWeb
[INFO ] pre-install linux/rootfs/fwupgrade
[INFO ] pre-install linux/rootfs/peekpoke
[INFO ] pre-install linux/rootfs/uWeb
[INFO ] install system.dtb
[INFO ] install linux/kernel
[INFO ] update linux/u-boot source
[INFO ] generate linux/u-boot configuration files
[INFO ] build linux/u-boot
[INFO ] install linux/u-boot
[INFO ] Expanding rootfs
[INFO ] install sys_init
[INFO ] install linux/rootfs/fwupgrade
[INFO ] install linux/rootfs/peekpoke
[INFO ] install linux/rootfs/uWeb
[INFO ] install kernel in-tree modules
[INFO ] modules_install linux/kernel
[INFO ] post-install linux/rootfs/fwupgrade
[INFO ] post-install linux/rootfs/peekpoke
[INFO ] post-install linux/rootfs/uWeb
[INFO ] package rootfs.cpio to /home/namsh/test_project/images/linux
[INFO ] Update and install vmlinux image
[INFO ] vmlinux linux/kernel
[INFO ] install linux/kernel
[INFO ] package zImage
[INFO ] zImage linux/kernel
[INFO ] install linux/kernel

Continue reading petalinux build error solution [PetaLinux]

2016년 2월 16일 화요일

, , , ,

How to Create Example IOC Log [EPICS]

Make directory

[root@root]# mkdir testIOC
[root@root]# cd testIOC

Enter the following commands in a position to make the IOC.

[root@root testIOC]# makeBaseApp.pl -t ioc testIOC

testIOC is an example IOC file in the /base/templates/makeBaseApp/top/.
Enter the name of the IOC that you made after the ioc.

[root@root testIOC]# ls
configure  Makefile  testIOCApp

And make iocBoot. Enter the name you want to do in 'Application name?'.

[root@root testIOC]# makeBaseApp.pl -i testIOC
Using target architecture linux-x86_64 (only one available)
The following applications are available:
    testIOC
What application should the IOC(s) boot?
The default uses the IOC's name, even if not listed above.
Application name? testIOC
 [root@root testIOC]# ls
configure  iocBoot  Makefile  testIOCApp

Done!

Here is the tree structure of the IOC.

testIOC
├── configure
│      ├── CONFIG
│      ├── CONFIG_SITE
│      ├── Makefile
│      ├── RELEASE
│      ├── RULES
│      ├── RULES_DIRS
│      ├── RULES.ioc
│      └── RULES_TOP
├── iocBoot
│     ├── ioctestIOC
│     │   ├── Makefile
│     │   ├── README
│     │   └── st.cmd
│     └── Makefile
├── Makefile
└── testIOCApp
       ├── Db
       │   └── Makefile
       ├── Makefile
       └── src
             ├── Makefile
             └── testIOCMain.cpp


Here is the makeBaseApp.pl help response.

[root@node2 testIOC]# makeBaseApp.pl -h
Usage:
<base>/bin/<arch>/makeBaseApp.pl -h
             display help on command options
<base>/bin/<arch>/makeBaseApp.pl -l [options]
             list application types
<base>/bin/<arch>/makeBaseApp.pl -t type [options] [app ...]
             create application directories
<base>/bin/<arch>/makeBaseApp.pl -i -t type [options] [ioc ...]
             create ioc boot directories
where
 app  Application name (the created directory will have "App" appended)
 ioc  IOC name (the created directory will have "ioc" prepended)

 -a arch  Set the IOC architecture for use with -i (e.g. vxWorks-68040)
          If arch is not specified, you will be prompted
 -b base  Set the location of EPICS base (full path)
          If not specified, base path is taken from configure/RELEASE
          If configure does not exist, from environment
          If not found in environment, from makeBaseApp.pl location
 -d       Enable debug messages
 -i       Specifies that ioc boot directories will be generated
 -l       List valid application types for this installation
          If this is specified the other options are not used
 -p app   Set the application name for use with -i
          If not specified, you will be prompted
 -T top   Set the template top directory (where the application templates are)
          If not specified, top path is taken from configure/RELEASE
          If configure does not exist, top path is taken from environment
          If not found in environment, the templates from EPICS base are used
 -t type  Set the application type (-l for a list of valid types)
          If not specified, type is taken from environment
          If not found in environment, "default" is used
 -u user  Set username; overrides OS defaults

Environment:
EPICS_MBA_DEF_APP_TYPE  Application type you want to use as default
EPICS_MBA_TEMPLATE_TOP  Template top directory
EPICS_MBA_BASE          Location of EPICS base

Example: Create exampleApp

<base>/bin/<arch>/makeBaseApp.pl -t example example
<base>/bin/<arch>/makeBaseApp.pl -i -t example example

Continue reading How to Create Example IOC Log [EPICS]

2016년 2월 15일 월요일

, , , , , , ,

Deleting Data in a Mysql Table Log [Linux]

When using the truncate [table name] command does not delete the table, only those records can be deleted.
Here is the example of deleting data in a mysql table.


mysql> show databases;
+--------------------------+
| Database                         |
+--------------------------+
| information_schema  |
| single                                 |
| test                                     |
+--------------------------+
3 rows in set (0.00 sec)

mysql> use single
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> show tables;
+---------------------------+
| Tables_in_single            |
+---------------------------+
| ArchivePVRequests    |
| ExternalDataServers   |
| PVAliases                         |
| PVTypeInfo                     |
+---------------------------+
4 rows in set (0.00 sec)

mysql> truncate ArchivePVRequests;
Query OK, 0 rows affected (0.02 sec)

mysql> truncate ExternalDataServers;
Query OK, 0 rows affected (0.00 sec)

mysql> truncate PVAliases;
Query OK, 0 rows affected (0.00 sec)

mysql> truncate PVTypeInfo;
Query OK, 0 rows affected (0.00 sec)

mysql> show tables;
+---------------------------+
| Tables_in_single            |
+---------------------------+
| ArchivePVRequests    |
| ExternalDataServers   |
| PVAliases                         |
| PVTypeInfo                     |
+---------------------------+
4 rows in set (0.00 sec)

Continue reading Deleting Data in a Mysql Table Log [Linux]

2016년 2월 11일 목요일

, , , , , ,

No rule to make target `sncExample.o', needed by `sncExample' Error Log [EPICS]

Create a sequence of IOC, and I type make command. I get following response.

make[1]: *** No rule to make target `sncExample.o', needed by `sncExample'.  Stop.

It is sequence problem. Usually we use the C language, but state language is different.
So, we need to state language compiler for converting the C language.
(more detail about FSM (Finite-state machine) here.)
This is a simple problem. you are just installing EPICS synApps.
Looking at the synApps.

alive-1-0            delaygen-1-1-1      LICENSE                          seq-2-2-1
allenBradley-2-3     devIocStats-3-1-13  love-3-2-5                       seq.patch
areaDetector-R2-0    devIocStats.patch   make_3.14.12.5_linux-x86_64.out  softGlue-2-4-3
asyn-4-26            dircmp.out          make_3.15_linux-x86_64.out       sscan-2-10-1
autosave-5-6-1       documentation       Makefile                         std-3-4
busy-1-6-1           doMake              mca-7-6                          stream-2-6a
calc-3-4-2-1         dotag               measComp-1-1                     update.bat
camac-2-7            dxp-3-4             modbus-2-7                       update.csh
camac.patch          export.csh          motor-6-9                        utils
caputRecorder-1-4-2  ip-2-17             optics-2-9-3                     vac-1-5-1
checkout.bat         ip330-2-8           propsetForHtml.csh               vme-2-8-2
checkout.csh         ipac-2-13           quadEM-5-0                       xxx-5-8-3
configure            ipac.patch          README
dac128V-2-8          ipUnidig-2-10       README.tmm

seq-2-2-1 contain the sncExample.

user@user:~/synApps_5_8/support/seq-2-2-1/bin/linux-x86_64$ ls

cmdButtons  johng  pvGetAsync  sncExample  sncExOpt
demo        lemon  snc         sncExEntry

Continue reading No rule to make target `sncExample.o', needed by `sncExample' Error Log [EPICS]

2016년 2월 10일 수요일

, , , , , ,

Another app is currently holding the yum lock; waiting for it to exit Error Log [CentOS Linux]

Sometime, I can not use yum. When I type yum command, I get following response.

Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  23 M RSS (332 MB VSZ)
    Started: Thu Feb 11 15:10:08 2016 - 00:22 ago
    State  : Sleeping, pid: 31981

Here is the troubleshooting log.
First, grep yum and kill yum PID.

[root@root ~]# ps -ef | grep yum
root     30594 28617  0 14:54 pts/1    00:00:00 /usr/bin/python /usr/bin/yum check-update
root     30637 28801  0 14:55 pts/3    00:00:00 grep yum
[root@root ~]# kill -9 30594

Second, delete /var/run/yum.pid

[root@root ~]# cd /var/run/
[root@root run]# rm yum.pid
rm: remove regular file `yum.pid'? yes
This is because the yum is already running, but You trying to run the yum again.
I recommend waiting for the normal process ends.
Continue reading Another app is currently holding the yum lock; waiting for it to exit Error Log [CentOS Linux]

2016년 2월 4일 목요일

, , , , , , , , ,

EPICS Archiver Appliance Installation Using an Install Script Log [Raspberry Pi]

1 Archiver Appliance Installation


Archiver appliance[1] is download here.

pi@raspberrypi ~/archappl $ ls
archappl_v0.0.1_SNAPSHOT_03-November-2015T18-04-14.tar.gz

1.1 License


The EPICS archiver appliance is distributed under the terms of the EPICS license.

1.2 System requirements


A recent version of Linux

Definitely 64 bit Linux for production systems. If using RedHat, we should aim for RedHat 6.1

Sun Java JDK 1.8

Definitely the 64 bit version for production systems. We need the JDK, not the JRE.
A recent version of Tomcat 7.x
Preferably apache-tomcat-7.0.61 or later.

A recent version of Tomcat 7.x

Preferably apache-tomcat-7.0.61 or later.

Firefox or Chrome

The management UI works best with a recent version of Firefox or Chrome.
A recent version of MySQL mysql-5.1 or later
If persisting configuration to a database.

A recent version of MySQL mysql-5.1 or later

If persisting configuration to a database.

1.3 System Requirements Installation


JDK 1.8 installation


Raspberry Pi already using oracle-java8-jdk.

pi@raspberrypi ~ $ java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode)

If you do not have JDK8, Here is the quick installation log.

pi@raspberrypi ~ $ sudo aptitude istall oracle-java8-jdk

Tomcat 7.x Download


Tomcat 7.x is download here.

 pi@raspberrypi ~/archappl $ ls
apache-tomcat-7.0.65.tar.gz 
archappl_v0.0.1_SNAPSHOT_03-November-2015T18-04-14.tar.gz

MySQL installation and setting


Create MySQL user and table is needed for the archiver appliance installation.
Here is the quick installation log.

Package : mysql-server
pi@raspberrypi ~ $ sudo aptitude install mysql-server

MySQL connector download here, and untar the download file.

pi@raspberrypi ~/archappl $ ls
apache-tomcat-7.0.65.tar.gz                                mysql-connector-java-5.1.38
archappl_v0.0.1_SNAPSHOT_03-November-2015T18-04-14.tar.gz
mysql-connector-java-5.1.38.tar.gz

Here is the create MySQL user and table log.

pi@raspberrypi ~ $ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 66
Server version: 5.5.47-0+deb7u1 (Debian)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ’help;’ or ’\h’ for help. Type ’\c’ to clear the current input statement.
mysql> create user username@localhost identified by ’password’;
Query OK, 0 rows affected (0.00 sec)
mysql> create database databasename;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on databasename.* to username@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
pi@raspberrypi ~ $ mysql -u username -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 72
Server version: 5.5.46-0+deb8u1 (Debian)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ’help;’ or ’\h’ for help. Type ’\c’ to clear the current input statement.
mysql> show databases;
+-------------------------+
| Database                              |
+-------------------------+
| information_schema          |
| databasename                     |
+-------------------------+
2 rows in set (0.00 sec)
mysql> use databasename;
Database changed
mysql> exit;
bye

1.5 Archiver Appliance Installation Using an Install Script


Install script accommodates installations with a ”standard” set of parameters and installs the EPICS archiver appliance on one machine.

1

Make sure you have a recent version of Sun Java 1.8 from Oracle by running java -version.
You should see something like so

pi@raspberrypi ~ $ java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode)

2

The downloaded installation package to a Linux machine into a brand new folder. This should give you a tar.gz file like archappl vx.x.x.tar.gz. Also, Tomcat package into a brand new folder.

 pi@raspberrypi ~/archappl $ mkdir archappl_install
pi@raspberrypi ~/archappl $ ls
apache-tomcat-7.0.65.tar.gz                                mysql-connector-java-5.1.38
archappl_install                                           mysql-connector-java-5.1.38.tar.gz
archappl_v0.0.1_SNAPSHOT_03-November-2015T18-04-14.tar.gz

3

Untar the archappl vx.x.x.tar.gz. This should untar into 4 WAR files and a bash script
like so

pi@raspberrypi ~/archappl $ tar -xzf archappl_v0.0.1_SNAPSHOT_03-November-2015T18-04-14.tar.gz
pi@raspberrypi ~/archappl $ ls
Apache_2.0_License.txt                                     mgmt.war
apache-tomcat-7.0.65.tar.gz                                mysql-connector-java-5.1.38
archappl_install                                           mysql-connector-java-5.1.38.tar.gz
archappl_v0.0.1_SNAPSHOT_03-November-2015T18-04-14.tar.gz  NOTICE
engine.war                                                 quickstart.sh
etl.war                                                    RELEASE_NOTES
install_scripts                                            retrieval.war
LICENSE                                                    sample_site_specific_content


4

Set JAVA HOME to point to a 1.8 JDK

pi@raspberrypi ~/archappl $ cd install_scripts/pi@raspberrypi ~/archappl $ export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt

5
Run the install script like so

pi@raspberrypi ~/archappl/install_scripts $ ./single_machine_install.sh

This should start the install script.

6

Soon you can see the following window.


It is recommended that you select an empty folder. In my case, create a archiver appliance
folder and pick this folder.
If you starting X applications from the terminal and the warnings that follow


** (zenity:24316): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-H7CXbpqO6z: Connection refused

Do not worry. The accessibility warning is a known bug with an easy workaround if you don't use any accessibility feature:

pi@raspberrypi ~ $ export NO_AT_BRIDGE=1

Now, troubleshooting is finished.

7

Soon you can see the following window.


Select a Tomcat distribution (tar.gz) file.
If you see this screen, it is something wrong.


To start up a Java program as a daemon using Jsvc, we’ll need to do a few things
Just install jsvc package. And start the jsvc.

pi@raspberrypi ~ $ aptitude install jsvc


And you can see another error.

/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt//include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
compilation terminated.

Tomcat can not find jni_md.h header file.
Here is the troubleshooting log.

 pi@raspberrypi ~ $ sudo find / -name jni_md.h
/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/include/linux/jni_md.h
 pi@raspberrypi ~ $ cd /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/include/linux
pi@raspberrypi /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/include/linux $ ls
jawt_md.h  jni_md.h
pi@raspberrypi /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/include/linux $ cp jni_md.h ./..
pi@raspberrypi /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/include/linux $ cd ..
pi@raspberrypi /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/include $ ls
classfile_constants.h  jawt.h  jdwpTransport.h  jni.h  jni_md.h  jvmticmlr.h  jvmti.h  linux


8

Soon you can see the following window.


 Select a mysql client jar file.

9

Soon you can see the following window.


 In my case, select the YES button. The appliance.xml file is automatically created in the selected installation folder. And it is automatically export ARCHAPPL APPLIANCES. Of course, after the installation you can modify this file. If you want generate appliance.xml, following paragraph is the way for create appliance.xml and export appliance.xml.
The appliances.xml is a file that lists all the appliances in a cluster of archiver appliance. While it is not necessary to point to the same physical file, the contents are expected to be identical across all appliances in the cluster. The details of the file are outlined in the ConfigService javadoc. A sample appliances.xml with two appliances looks like

<appliances>
<appliance>
<identity>appliance0</identity>
<cluster_inetport>machinename:16670</cluster_inetport>
<mgmt_url>http://machinename:17665/mgmt/bpl</mgmt_url>
<engine_url>http://machinename:17666/engine/bpl</engine_url>
<etl_url>http://machinename:17667/etl/bpl</etl_url>
<retrieval_url>http://machinename:17668/retrieval/bpl</retrieval_url>
<data_retrieval_url>http://machinename:17668/retrieval</data_retrieval_url>
</appliance>
</appliances>
appliances.xml (END)

The archiver appliance looks at the environment variable ARCHAPPL APPLIANCES for the location of the appliances.xml file. Use an export statement like so

export ARCHAPPL_APPLIANCES=/location/appliances.xml

10

Soon you can see the following window.


MySQL information input window
 Enter a user name, password, databasename you set in MySQL. If not set, check the MySQL installation and setting section.

11

Soon you can see the following window.

Question about MySQL database table
 The archiver appliance ships with DDL, for MySQL, this is a file called archappl mysql.sql that is located in /home/user/archappl/install scripts/archappl mysql.sql. Execute this script in you newly created schema. We select the YES button.
There should be at least these tables

  • PVTypeInfo - This table stores the archiving parameters for the PVs
  • PVAliases - This table stores EPICS alias mappings
  • ExternalDataServers - This table stores information about external data servers.
  • ArchivePVRequests - This table stores archive requests that are still pending.
mysql> show tables;
+-----------------------+
| Tables_in_databasename|
+-----------------------+
| ArchivePVRequests           |
| ExternalDataServers        |
| PVAliases                          |
| PVTypeInfo                       |
+-----------------------+
4 rows in set (0.00 sec)


12

Soon you can see the following window.


 We did not create the policies.py file. We choose the No button. For more mention is back to the policies.py file.

13

Soon you can see the following window.


Congratulations. Now just add a few step to complete installation.


14

Setting up Apache Commons Daemon
Editing the /apache-tomcat-7-0-65/conf/server.xml file to change the ports to better suit your installation
  • By default, the connector port for the HTTP connector is set to 8080. Change this to the port used by the mgmt webapp for this appliance, in this example, 17665.

    <Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" />
     <Connector port="17665" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" />

    •  Remove/comment out the sections for the AJP connector.

      <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
       <!--Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /-->

      •  At the end, there should be two ports active in the /apache-tomcat-7-0-65/conf/server.xml file, one for the HTTP connector and the other for the SHUTDOWN command.

        <Server port="8005" shutdown="SHUTDOWN">


        You can ignore following paragraph about log4j.properties. The log4j.properties file is automatically created in apache-tomcat-7-0-65/lib folder. However, if you want a personal log settings, look in the following paragraphs.
        Setting the appropriate log4j configuration level by creating/editing the apache-tomcat-7-0-65/lib/log4j.properties. Here’s a sample that logs exceptions and errors with one exception - log messages logged to the config namespace are logged at INFO level.

        # Set root logger level and its only appender to A1.
        log4j.rootLogger=ERROR, A1
        log4j.logger.config.org.epics.archiverappliance=INFO
        log4j.logger.org.apache.http=ERROR
        # A1 is set to be a DailyRollingFileAppender
        log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
        log4j.appender.A1.File=arch.log
        log4j.appender.A1.DatePattern=’.’yyyy-MM-dd
        # A1 uses PatternLayout.
        log4j.appender.A1.layout=org.apache.log4j.PatternLayout
        log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

        15

        Setting up sampleStartup.sh
        Editing the /archiver appliance/sampleStartup.sh

        • Setting up EPICS environment.

          Default
          source /opt/local/setEPICSEnv.sh

          EPICS environment position.
          source /home/user/epics/R3.14.12.5/setEpicsEnv.sh

          • Setting up storage. 

            Default
            export ARCHAPPL_SHORT_TERM_FOLDER=/arch/sts/ArchiverStore
            export ARCHAPPL_MEDIUM_TERM_FOLDER=/arch/mts/ArchiverStore
            export ARCHAPPL_LONG_TERM_FOLDER=/arch/lts/ArchiverStore

            Storage environment variables example
            export ARCHAPPL_SHORT_TERM_FOLDER=/home/user/archiver_appliance/arch/STS
            export ARCHAPPL_MEDIUM_TERM_FOLDER=/home/user/archiver_appliance/arch/MTS
            export ARCHAPPL_LONG_TERM_FOLDER=/home/user/archiver_appliance/arch/LTS


            • Setting up JAVA_OPTS

            Default


            export JAVA_OPTS="-XX:MaxPermSize=128M -XX:+UseG1GC -Xmx4G -Xms4G -ea"


            Raspberry Pi 2 have only 1G memory. So, we need to change heap size.
            Be modified to suit you.


             Congratulations. Archiver appliance installation is now complete.

            16


            Here is how to use the script.

            Usage: ./sampleStartup.sh {start|stop|restart}

            Run the archive appliance like so

            user@user:~/archiver_appliance$ ./sampleStartup.sh start
            Starting tomcat at location /home/user/archiver_appliance/mgmt
            Using 64 bit versions of libraries
            ~/archiver_appliance/mgmt/logs ~/archiver_appliance
            ~/archiver_appliance
            Starting tomcat at location /home/user/archiver_appliance/engine
            Using 64 bit versions of libraries
            ~/archiver_appliance/engine/logs ~/archiver_appliance
            ~/archiver_appliance
            Starting tomcat at location /home/user/archiver_appliance/etl
            Using 64 bit versions of libraries
            ~/archiver_appliance/etl/logs ~/archiver_appliance
            ~/archiver_appliance
            Starting tomcat at location /home/user/archiver_appliance/retrieval
            Using 64 bit versions of libraries
            ~/archiver_appliance/retrieval/logs ~/archiver_appliance
            ~/archiver_appliance

            Bibliography

            [1] The EPICS Archiver Appliance : “archiver appliance”http://slacmshankar.github.io/epicsarchiver_docs/index.html (2016.01.06)
            [2] Sang-il Lee(2014), “Archiver Appliance 구성”, RISP control group technical document
            [3] UNIX & LINUX : “Couldn't connect to accessibility bus” http://unix.stackexchange.com/questions/230238/starting-x-applications-from-the-terminal-and-the-warnings-that-follow(2016.02.05)
            Continue reading EPICS Archiver Appliance Installation Using an Install Script Log [Raspberry Pi]