2016년 1월 31일 일요일

, , , , , ,

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. Error Log

It is wrong link problem, try the below commands on terminal to remove all the files inside

user@user:~$ cd /var/lib/dpkg

user@user:~/var/lib/dpkg/updates $ ls
0000  0014  0028  0042  0056  0070  0084  0098  0112  0126  0140  0154  0168  0182  0196  0210  0224  0238
0001  0015  0029  0043  0057  0071  0085  0099  0113  0127  0141  0155  0169  0183  0197  0211  0225  0239
0002  0016  0030  0044  0058  0072  0086  0100  0114  0128  0142  0156  0170  0184  0198  0212  0226  0240
0003  0017  0031  0045  0059  0073  0087  0101  0115  0129  0143  0157  0171  0185  0199  0213  0227  0241
0004  0018  0032  0046  0060  0074  0088  0102  0116  0130  0144  0158  0172  0186  0200  0214  0228  0242
0005  0019  0033  0047  0061  0075  0089  0103  0117  0131  0145  0159  0173  0187  0201  0215  0229  0243
0006  0020  0034  0048  0062  0076  0090  0104  0118  0132  0146  0160  0174  0188  0202  0216  0230  0244
0007  0021  0035  0049  0063  0077  0091  0105  0119  0133  0147  0161  0175  0189  0203  0217  0231  0245
0008  0022  0036  0050  0064  0078  0092  0106  0120  0134  0148  0162  0176  0190  0204  0218  0232  0246
0009  0023  0037  0051  0065  0079  0093  0107  0121  0135  0149  0163  0177  0191  0205  0219  0233  0247
0010  0024  0038  0052  0066  0080  0094  0108  0122  0136  0150  0164  0178  0192  0206  0220  0234  0248
0011  0025  0039  0053  0067  0081  0095  0109  0123  0137  0151  0165  0179  0193  0207  0221  0235  0249
0012  0026  0040  0054  0068  0082  0096  0110  0124  0138  0152  0166  0180  0194  0208  0222  0236  0250
0013  0027  0041  0055  0069  0083  0097  0111  0125  0139  0153  0167  0181  0195  0209  0223  0237
user@user:~/var/lib/dpkg/updates $ sudo rm *

user@user:~/var/lib/dpkg/updates $ sudo aptitude update

Now you do not receive an error message.
Continue reading E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. Error Log

2016년 1월 28일 목요일

, , , , , ,

RetroPie Installation Log [Raspberry Pi]

1. Download RetroPie SD card image for Raspberry Pi 2



RetroPie SD card image is download here.

user@user:~/Downloads$ ls
retropie-v3.4-rpi2.img.gz

Extract downloaded file.

user@user:~/Downloads$ gzip -d retropie-v3.4-rpi2.img.gz 
user@user:~/Downloads$  ls 
retropie-v3.4-rpi2.img

2. Copy Image to SD card


To install RetroPie SD card image on your MicroSD card, you can use dd command.
Before the dd command, you need to find SD card location.

user@user:~/Downloads$ df -h
Filesystem         Size  Used Avail Use% Mounted on
/dev/sdf1           29G   44M   27G   1% /media/user/2d9c8a57

In my case, SD card is located in /dev/sdf.
Now, you can use dd command.
Here is the dd command log.

user@user:~/Downloads$ sudo dd bs=4M if=retropie-v3.4-rpi2.img of=/dev/sdf
619+1 records in
619+1 records out
2600000000 bytes (2.6 GB) copied, 117.633 s, 22.1 MB/s
user@user:~/Downloads$ sync
user@user:~/Downloads$ umount /dev/sdf

3. Insert SD card to Raspberry Pi



If the installation was successful this screen appears.


And this screen appears.

4. Controller configurations


When you first boot up you will be welcomed with the following screen.


Hold down any button on your keyboard or gamepad and the name will appear at the bottom and then open up into a configuration menu. 


If you wish to configure more than one controller, you can do so from the start menu of emulationstation. More details on maual controller configurations see this page.


when you have completed the setup. You can see this screen.

5. Expand file system


This allows your SD card to use all its storage rather than the small partition it was released with.


 Go to the RetroPie Menu


Select raspberry Pi configuration tool raspi-config


It will open up into the following. Choose 1. Expand Filesystem


You will get this message.


And reboot your Raspberry Pi.

6. Configuring Wifi



 Go to the RetroPie Menu


Select CONFIGURE WIFI.


It will open up into the following.


Select Connect to WiFi network, and configuring wifi.

Bibliography

[1] RetroPie-Setup : “retropie”  https://github.com/RetroPie/RetroPie-Setup/wiki/First-Installation (2016.01.29)
Continue reading RetroPie Installation Log [Raspberry Pi]
, , , , ,

Xgear 자바라 거치대

하루 일과의 마무리를 침대에 누워 youtube와 함께 보낸지도 4년...
아이폰 4를 쓰던 때와 달리 아이폰 6 Plus를 쓰게 되면서 자바라 거치대의 필요성을 느꼈다.
하지만 필요해도 물건의 가격과 택배비가 비슷하면 선뜻 구매를 못하는 이상한 씀씀이를 가진 나는 지인에게 자바라 거치대 좀 사줘~라고 때쓰다 욕먹기 일수 였다.
그러다 얼마전 문스콜라보를 통해 발뮤다 3종 세트를 사면서 쇼핑력이 폭발해 자바라를 찾기 시작했고 일반 자바라 거치대 보다는 비싸지만 마음에 드는 Xgear 자바라 거치대(이하 자바라)를 발견해 쇼핑했다. 색상은 파스텔 톤인 스카이 블루, 라일락 퍼플, 에메랄드 그린, 루즈 핑크 이렇게 4가지 색상이 있었고 평소 라임색을 좋아하는 나는 에메랄드 그린 색을 선택했다.


Made in China 제품 답지 않게 박싱에 상당히 신경을 쓴 모습이 보인다. 대부분이 중국어라 무엇인지 알수 없지만 친절히 Multifuncional mobilephone stand라고 영어로 표기해 이 제품이 무엇인가 알수 있게 되어있다.


박스안 포장 상태도 깔끔하게 되어있고, 요즘 중국산도 나름 고급스럽다. 깨알 같이 비닐에 Limitless Comfort... 이건 좀 오글거린다. 비닐을 뜯어보면 워런티에 관한 종이가 있는데 제품의 특성상 고장나면 새로 구입할 것이 뻔하므로 과감히 읽지 않았다.


비닐을 뜯고 살펴보니 아니? Xgear 옷을 입고있는 조그만 코알라가 자바라에 매달려있다. 몸체 중간중간에 달린 녹색 고무는 미관상 보기 좋기도 하지만 케이블 선을 정리하는 기능도 있다.


조금 더 당겨서 확인하니 퀄리티는 딱 가격에 맞는 퀄리티다. 코알라 몸은 집게 형태로 되어있어 위치를 옮기거나 다른 곳에 장식도 가능하다. 천천히 살펴보니 눈에 띄는 부분은  다른 자바라와 달리 자바라 고정부분이 일반 자바라처럼 집게가 아니고 나사형으로 되어있는 부분 그리고 몸체가 빗금형태가 아니고 매끈하게 되어있어 미관상으로 보기가 좋은점이다. 아연 합금으로 되어있다는데 뜯어 보지 않아서 확실하게 알길은 없다.


사진과 같이 집게 윗부분을 돌려서 고정할 수 있고 집게 안쪽부분은 고무로 처리되어 있어서 상처날 걱정은 안해도 되겠다.


사진상에 잘 보일지 모르지만 집게부분에 Xgear라고 프린팅 되어있다. 그래도 고급형 자바라라고 자부심이 느껴진다.


깨알같이 사용자의 건강을 걱정해주는 문구가 보이는가? 우리모두 건강을 위해서 밝은 곳에서 폰을 사용하고 20분 폰사용 후에는 충분한 휴식을 가지자. 아래에서 2번째 줄 havea가 무엇인지 한참 생각했다.


폰을 잡는 집게부분은 힘을 많이 안주어도 쉽게 벌어지는 편이라 걱정했지만 아이폰 6 Plus로 테스트한 결과 더 무거운 폰도 쓸수 있을 만큼 야무지게 폰을 잡아주었다. 물론 폰에도 상처가 나지않게 잡는 부분은 고무로 처리되어 있다.


아이폰 4를 거치해 보았다. 동영상 볼때 불편한 것 빼고는 역시 아이폰 4가 진리다.


한동안 침대에서 뿐만 아니라 리클라이너에서도 시간을 보내게 될것 같다.


리클라이너에 앉아 자바라에 거치된 폰을 보는 각이 아름답다. 영화볼때 빼고 쓰지를 않아 먼지만 쌓여가는 70인치 TV에게 미안하지만 자바라로 인해서 TV와 좀 더 멀어질것 같다.
Continue reading Xgear 자바라 거치대

2016년 1월 27일 수요일

, , , , , , , , ,

SD Card Format Log [Debian Linux]

First, connect your SD card on the host PC.
And run the following command for check the mount name.

user@user:~$ sudo fdisk -l

Disk /dev/sdf: 28.8 GiB, 30908350464 bytes, 60367872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5c8f34fa

Device     Boot  Start      End  Sectors    Size    Id   Type
/dev/sdf1  *      8192   124927   116736   57M  e W95 FAT16 (LBA)
/dev/sdf2       124928 60367871 60242944 28.7G 83 Linux

In my case SD card connected on the /dev/sdf1 and /dev/sdf2.
Checking that where the SD card connected, run the following command for delete a partition.
If there is no partition. you can skip this section.

user@user:~$ sudo fdisk /dev/sdf
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): m
Help:

  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

  Generic
   d   delete a partition
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table

  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table

Command (m for help):

Entering the m command ,you can see information about the command.
Now entering the d command for delete a partition.

Command (m for help): d
Partition number (1,2, default 2): 

Partition 2 has been deleted.

Command (m for help):

and

Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help):

Now, let's add a new partition. Entering the n command.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-60367871, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-60367871, default 60367871):
Created a new partition 1 of type 'Linux' and of size 28.8 GiB.
Command (m for help):

After add a new partition, you enter the p command for check the partition table.

Command (m for help): p
Disk /dev/sdf: 28.8 GiB, 30908350464 bytes, 60367872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5c8f34fa

Device     Boot Start      End     Sectors     Size  Id Type
/dev/sdf1        2048 60367871 60365824 28.8G 83 Linux
Command (m for help): 

In my case, /dev/sdf1 type change to FAT32.

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): b
If you have created or modified any DOS 6.x partitions, please see the fdisk documentation for additional information.
Changed type of partition 'Linux' to 'W95 FAT32'.

After working, you should write the current partition information. 
If you just shutdown the partition information is not stored.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

File system format


Through the following command to format the partition.

user@user:~$ sudo mkfs.ext4 /dev/sdf1
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 7545728 4k blocks and 1888656 inodes
Filesystem UUID: 2d9c8a57-b752-4cc5-875f-139a56696572
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

Allocating group tables: done                          
Writing inode tables: done                          
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 

Format is complete.

Formatted SD card

Continue reading SD Card Format Log [Debian Linux]

2016년 1월 20일 수요일

, , , , , , , , , ,

EPICS Multiple Archiver Appliance Confuguration Log [Debian and CenOS Linux]

1 Multiple Archiver Appliance Configuration


Before the multiple archiver appliance configuration, check the archiver appliance installation. Multiple archiver appliance configuration at least 2 server is required. If not set, check the archiver appliance installation section.

1.1 Modify appliances.xml File


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 appliance in the cluster. A sample appliances.xml with two appliances looks like

<appliances>
<appliance>
<identity>appliance0</identity>
<cluster_inetport>node1:16670</cluster_inetport>
<mgmt_url>http://node1:17665/mgmt/bpl</mgmt_url>
<engine_url>http://node1:17666/engine/bpl</engine_url>
<etl_url>http://node1:17667/etl/bpl</etl_url>
<retrieval_url>http://node1:17668/retrieval/bpl</retrieval_url>
<data_retrieval_url>http://archiver:17668/retrieval</data_retrieval_url>
</appliance>
<appliance>
<identity>appliance1</identity>
<cluster_inetport>node2:16670</cluster_inetport>
<mgmt_url>http://node2:17665/mgmt/bpl</mgmt_url>
<engine_url>http://node2:17666/engine/bpl</engine_url>
<etl_url>http://node2:17667/etl/bpl</etl_url>
<retrieval_url>http://node2:17668/retrieval/bpl</retrieval_url>
<data_retrieval_url>http://archiver:17668/retrieval</data_retrieval_url>
</appliance>
</appliances>

 

1.2 Modify startup.sh Script



  • node1
export ARCHAPPL_MYIDENTITY="appliance0"

  • node2
export ARCHAPPL_MYIDENTITY="appliance1"

 1.3 Modify httpd.conf file



Multiple archiver appliance using the load balancer for mgmt and retrieval. Load balancer can be defined in httpd.conf file. 
httpd.conf file is located /etc/httpd/conf/httpd.conf
Here is the way for load balancer. Just add the following part.

# Enabling load balancing for mgmt
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://mgmt>
BalancerMember http://node1:17665/mgmt/ route=1
BalancerMember http://node2:17665/mgmt/ route=2
ProxySet stickysession=ROUTEID
ProxySet lbmethod=bybusyness
</Proxy>
ProxyPass /mgmt balancer://mgmt
# Enabling load balancing for retrieval
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://archiver>
BalancerMember http://node1:17668/retrieval/ route=1
BalancerMember http://node2:17668/retrieval/ route=2
ProxySet stickysession=ROUTEID
ProxySet lbmethod=bybusyness
</Proxy>
ProxyPass /retrieval balancer://archiver

The same settings on every archiver appliance server that you have.

 1.4 Apache Configuration


Now, multiple archiver appliance is working. But it is still half-multiple archiver appliance. because apache is necessary to use a load balancer. For more information, please browse directly to the load balancing.
Apache Load Balancing

First, start apache service. ApacheIP = apache server IP address

[root@node1 ~]# service httpd start
Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name,
using ApacheIP for ServerName
[ OK ]
20[root@node1 ~]# service httpd status
httpd (pid 32957) is running..

second, use the curl as shown below. ApacheIP = apache server IP address


  • mgmt section 1


[root@node1 ~]# curl --verbose http://ApacheIP/mgmt
* About to connect() to ApacheIP port 80 (#0)
* Trying ApacheIP... connected
* Connected to ApacheIP (ApacheIP) port 80 (#0)
> GET /mgmt HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC
zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.1.5.18
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 20 Jan 2016 15:32:45 GMT
< Server: Apache-Coyote/1.1
< Accept-Ranges: bytes
< ETag: W/"283-1446591868000"
< Last-Modified: Tue, 03 Nov 2015 23:04:28 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 283
< Set-Cookie: ROUTEID=.2; path=/
< Set-Cookie: ROUTEID=.2; path=/
< Connection: close
<
<!DOCTYPE html>
<html>
<head>
<head>
<meta http-equiv="refresh" content="0;URL=ui/index.html">
</head><title>Redirecting...</title>
</head>
<body>
You should be redirected to the main management page.
If not, please click on this link <a href="ui/index.html"></a>.
</body>
</html>
* Closing connection #0


  •  mgmt section 2


[root@node1 ~]# curl --verbose http://ApacheIP/mgmt/ui/index.html
* About to connect() to ApacheIP port 80 (#0)
* Trying ApacheIP... connected
* Connected to ApacheIP (ApacheIP) port 80 (#0)
> GET /mgmt/ui/index.html HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC
zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.1.5.18
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 20 Jan 2016 15:36:19 GMT
< Server: Apache-Coyote/1.1
<
<
<
<
<
Content-Disposition: inline;filename="index.html"
ETag: index.html_5350_1446591868000
Last-Modified: Tue, 03 Nov 2015 23:04:28 GMT
Expires: Wed, 20 Jan 2016 15:46:19 GMT
ARCHAPPL_SRC: /root/archiver_appliance_node1/archiver_appliance/mgmt/webapps/mgmt/ui/
index.html
Content-Type: text/html;charset=UTF-8
Content-Length: 5350
Set-Cookie: ROUTEID=.1; path=/
Set-Cookie: ROUTEID=.1; path=/
Connection: close
<
<
<
<
<
<
<!DOCTYPE html>
<html>
<title>appliance archiver - Home</title>
<head>
<!-- @begin(main_includes) -->
<script type="text/javascript" src="comm/js/jquery-1.8.2.min.js"></script>
<link type="text/css" href="comm/js/jquery-ui-1.9.1.custom/css/cupertino/jquery-ui
-1.9.1.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="comm/js/jquery-ui-1.9.1.custom/js/jquery-ui-1.9.1.
custom.min.js"></script>
<link type="text/css" href="comm/css/main.css" rel="Stylesheet" />
<script type="text/javascript" src="comm/js/common.js"></script>
<!-- @end(main_includes) -->
<link type="text/css" href="css/mgmt.css" rel="Stylesheet" />
<script type="text/javascript" src="js/reporttable.js"></script>
<script type="text/javascript" src="js/mgmt.js"></script>
</head>
<body>
<!-- @begin(site_header) -->
<div class="pageheader">
<span class="apptitle" id="archiveInstallationTitle">LCLS Archiver Appliance</span>
<span id="siteimages"><img src="comm/img/labLogo.png"></img><img src="comm/img/labLogo2.
png"></img></span>
</div>
<!-- @end(site_header) -->
<!-- @begin(site_navbar) -->
<div class="navbar">
<div class="nav">
<ul class="mainmenu">
<li><a href="index.html">Home</a></li>
<li><a href="reports.html">Reports</a></li>
<li><a href="metrics.html">Metrics</a></li>
<li><a href="storage.html">Storage</a></li>
<li><a href="appliance.html">Appliances</a></li>
<li><a href="integration.html">Integration</a></li>
<li><a href="#" id="help">Help</a></li>
</ul>
</div>
</div>
<!-- @end(site_navbar) -->
<div class="page">
<div id="archivehelpdesk">
<!-- @begin(site_contact_text) -->
This is the archiver appliance management console for the LCLS archiver.
Please contact Jingchen Zhou for any questions regarding these archiver appliances.
For support, please contact Murali Shankar at 650 xxx xxxx or Bob Hall at 650 xxx xxxx.
<!-- @end(site_contact_text) -->
</div>
<div id="archivePVDiv">
To check the status of or to archive some PV’s, please type in some PV names here.
<div id="archstatpVNamesdiv">
<textarea id="archstatpVNames"></textarea>
</div>
<div id="archstatpVButtonsdiv">
<input type="button" id="archstatCheckStatus" name="Check status" value="Check Status"
onclick="checkPVStatus(); return false"></input>
<input type="button" id="archstatArchive" name="Archive" value="Archive" onclick="
archivePVs(); return false"></input>
<input type="button" id="archstatArchiveWithPeriod" name="Archive" value="Archive (
specify sampling period)" onclick="archivePVsWithDetails(); return false"></input>
<input type="button" id="lookupPVs" name="Lookup" value="Lookup" onclick="lookupPVs();
return false"></input>
<input type="button" id="pause" name="Pause" value="Pause" onclick="pauseMultiplePVs();
return false"></input>
<input type="button" id="resume" name="Resume" value="Resume" onclick="resumeMultiplePVs
(); return false"></input>
</div>
<div id="archstatsdiv">
<table id="archstats">
<thead><tr><th>PV Name</th><th>Status</th><th>Connected?</th><th>Monitored?</th><th>
Sampling period</th><th>Last event</th><th>Engine last flush</th><th>Details</th><th>
Quick chart</th></tr></thead>
<tbody>
<!-- The table data will go here -->
<template>
<tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td><img
height="25px" src="comm/img/details.png"/></td><td><img height="25px" src="comm/img/
chart.png"/></td></tr>
<tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td><img
height="25px" src="comm/img/details.png"/></td><td><img height="25px" src="comm/img/
chart.png"/></td></tr>
</template>
</tbody>
</table>
</div>
</div>
<div id="pvDetailsChangeParamDiv" title="Specify the sampling period for these PVs">
<div id="pvDetailsParams">
<div>Choose the sampling mode for these PVs:</div>
<div><select id="pvDetailsSamplingMethod">
<option value="MONITOR" selected="selected">Monitor</option>
<option value="SCAN">Scan</option>
</select>
</div>
<div>Set the sampling period for these PVs:</div>
<div><input type="text" id="pvDetailsSamplingPeriod"/>(secs)</div>
<div>Enter PV name be used to conditionally archive these PVs (can be blank)</div>
<div><input type="text" id="pvDetailsControllingPV"/></div>
<div>Use this policy (can be blank):</div>
<div><select id="pvDetailsPolicies">
<option value="" selected="selected">Select</option>
</select></div>
<div id="pvDetailsParamsOkdiv"><input id="pvDetailsParamsOk" type="button" name="Ok"
value="Ok"></input></div>
</div>
</div>
<!-- @begin(site_footer) -->
<div class="pagefooter">
</div>
<!-- @end(site_footer) -->
</div>
<div id="archapplversions"></div>
<script type="text/javascript">
$(document).ready(function() {
$("#pvDetailsParams").hide();
// See if we have any pv names in session storage
if(sessionStorage && ’archstatpVNames’ in sessionStorage) {
$(’#archstatpVNames’).val(sessionStorage[’archstatpVNames’]);
}
// If we have any PVs in the textarea, make a fresh JSON call to refresh status.
var pvText = $(’#archstatpVNames’).val();
if(pvText != null && pvText.length > 0) {
checkPVStatus();
}
showVersions();
// Set up help
$("#help").click(function() { window.open(’help/userguide.html#ArchivePV’); } );
});
</script>
</body>
* Closing connection #0


  •  retrieval section


[root@node1 ~]# curl --verbose http://ApacheIP/retrieval
* About to connect() to 10.1.5.18 port 80 (#0)
* Trying ApacheIP... connected
* Connected to ApacheIP (ApacheIP) port 80 (#0)
> GET /retrieval HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC
zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: ApacheIP
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Date: Wed, 20 Jan 2016 15:49:41 GMT
< Server: Apache-Coyote/1.1
< Content-Type: text/html;charset=utf-8
< Content-Language: en
< Content-Length: 973
< Set-Cookie: ROUTEID=.1; path=/
< Set-Cookie: ROUTEID=.1; path=/
< Connection: close
<
* Closing connection #0
<html><head><title>Apache Tomcat/7.0.65 - Error report</title><style><!--H1 {font-family:
Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-
family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14
px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {
font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-
family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color :
black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP
Status 404 - /retrieval//</h1><HR size="1" noshade="noshade"><p><b>type</b> Status
report</p><p><b>message</b> <u>/retrieval//</u></p><p><b>description</b> <u>The
requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache
Tomcat/7.0.65</h3></body></html>

 If you need to use names, you will need to make sure DNS.

1.5 Use the Multiple Archiver Appliance


If the machine running ApacheIP is called 10.1.5.18, your mgmt url will be
http://10.1.5.18/mgmt/ui/index.html
and your client retrieval url will be
http://10.1.5.18/retrieval.

Apache MGMT Homepage

Enter the PV to be stored in the listbox and then click on the “Archive” button. PV is the load balancing and archiving to each node. Check the table appliance parts in the picture above.

Bibliography

[1] The EPICS Archiver Appliance : “archiver appliance”http://slacmshankar.github.io/epicsarchiver_docs/index.html (2016.01.06)
[2] Email Q&A contents of EPICS Archiver Appliance Developer Shankar Murali (2016.01.20) 
Continue reading EPICS Multiple Archiver Appliance Confuguration Log [Debian and CenOS Linux]

2016년 1월 13일 수요일

, , , , , , , , ,

Raspberry Pi Raspbian installaion Log [Raspberry Pi]

1. Download Raspbian SD card image for Raspberry Pi


Download raspbian image from here.
Here is quick download log.

$ wget --content-disposition http://downloads.raspberrypi.org/raspbian_latest


Extract downloaded file.

user@user:~/Downloads$ unzip 2015-11-21-raspbian-jessie.zip
Archive:  2015-11-21-raspbian-jessie.zip
  inflating: 2015-11-21-raspbian-jessie.img
user@user:~/Downloads$ ls
2015-11-21-raspbian-jessie.img

2. Copy image to SD card


To install Raspbian SD card image on your MicroSD card, you can use dd command.
Before the dd command, you need to find SD card location.

user@user:~/Downloads$ df -h
Filesystem         Size  Used Avail Use% Mounted on
/dev/sdf1           29G   44M   27G   1% /media/user/2d9c8a57

In my case, SD card is located in /dev/sdf.
Now, you can use dd command.
Here is the dd command log.

user@user:~/Downloads$ sudo dd bs=4M if=2015-11-21-raspbian-jessie.img of=/dev/sdf

[sudo] password for user:
938+0 records in
938+0 records out
3934257152 bytes (3.9 GB) copied, 214.141 s, 18.4 MB/s
user@user:~/Downloads$ sync
user@user:~/Downloads$ umount /dev/sdf1

3. Insert SD card to Raspberry Pi



If the installation was successful this screen appears.

4. Expand user partition


This allows your SD card to use all its storage rather than the small partition it was released with.

pi@raspberrypi:~$ sudo raspi-config


Entering 1.Expand Filesystem


And reboot

pi@raspberrypi:~$ sudo reboot

5. Network configuration


If you use a static IP, make settings as shown below.
Modify interface file.

pi@raspberrypi:~$ nano /etc/network/interfaces

Wired network settings is as follows.

iface eth0 inet static
address XXX.XXX.XXX.XXX
netmask XXX.XXX.XXX.XXX
gateway XXX.XXX.XXX.XXX
dns-nameservers XXX.XXX.XXX.XXX

Wireless network settings is as follows.

allow-hotplug wlan0
iface wlan0 inet static
address XXX.XXX.XXX.XXX
netmask XXX.XXX.XXX.XXX
gateway XXX.XXX.XXX.XXX
dns-nameservers XXX.XXX.XXX.XXX
wpa-scan-ssid 1
wpa-ap-ssid 1
wpa-key-mgmt WPA-PSK
wpa-proto RSN WPA
wpa-pairwise CCMP TKIP
wpa-group CCMP TKIP
wpa-ssid "WirelessNetworkName"
wpa-psk "PASSWORD"
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

And system reboot or network reboot.

pi@raspberrypi:~$ sudo reboot 

pi@raspberrypi:~$ sudo service network restart

6. Package & Firmware upgrade

pi@raspberrypi:~$ sudo apt-get update
pi@raspberrypi:~$ sudo apt-get upgrade
pi@raspberrypi:~$ sudo rpi-update

7. Setup GPIO


Install a wiringPi for the use of the Raspberry Pi GPIO.


pi@raspberrypi:~$ git clone git://git.drogon.net/wiringPi
pi@raspberrypi:~$ cd wiringPi
pi@raspberrypi:~/wiringPi$ sudo ./build

Now, you can use the Raspberry Pi.
Continue reading Raspberry Pi Raspbian installaion Log [Raspberry Pi]
, , ,

Raspberry Pi No HDMI Audio Output Log [Raspberry Pi]

Open /boot/contex.txt file

pi@raspberrypi ~ $ cd /boot/
pi@raspberrypi /boot $ nano config.txt

and apply this settings:

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2


to

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2
Continue reading Raspberry Pi No HDMI Audio Output Log [Raspberry Pi]
, , ,

Raspberry Pi No HDMI Output When HDMI Cable is Connected After Power Supply Log [Raspberry Pi]

Open /boot/contex.txt file

pi@raspberrypi ~ $ cd /boot/
pi@raspberrypi /boot $ nano config.txt

and apply this settings:

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

to

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

Continue reading Raspberry Pi No HDMI Output When HDMI Cable is Connected After Power Supply Log [Raspberry Pi]

2016년 1월 12일 화요일

, , , , , , , , , ,

JDK1.8 installation Log [Debian and CentOS Linux]

JDK 1.8 installation

Sun Java JDK 1.8 is download here.
Here is the quick download log for all Linux user. In my case JDK 1.8 download the /opt directory.

root@user:/opt# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2
Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz"

Untar the downloaded file.

root@user:/opt# tar -xzf jdk-8u66-linux-x64.tar.gz
root@user:/opt# ls
jdk1.8.0_66

Here is the installation log for Debian Linux user.

root@user:/opt# update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_66/bin/java 1041
root@user:/opt# update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_66/bin/javac 1041
root@user:/opt# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection                                       Path                                    Priority       Status
------------------------------------------------------------
* 0     /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071       auto mode
1     /opt/jdk1.8.0_66/bin/java                                               1041       manual mode
2     /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java     1071       manual mode
Press enter to keep the current choice[*], or type selection number: 1
update-alternatives: using /opt/jdk1.8.0_66/bin/java to provide /usr/bin/java (java) in manual mode
root@user:/opt# java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

If you are using CentOS, here is the installation log.

[root@user opt]# alternatives --install /usr/bin/java java /opt/jdk1.8.0_66/bin/java 2
[root@user opt]# alternatives --config java
There are 4 programs which provide ’java’.
Selection           Command
-----------------------------------------------
*+ 1     /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2     /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
3     /usr/lib/jvm/jre-1.5.0-gcj/bin/java
4     /opt/jdk1.8.0_66/bin/java
Enter to keep the current selection[+], or type selection number: 4
[root@user opt]# alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_66/bin/jar 2
[root@user opt]# alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_66/bin/javac 2
[root@user opt]# alternatives --set jar /opt/jdk1.8.0_66/bin/jar
[root@user opt]# alternatives --set javac /opt/jdk1.8.0_66/bin/javac
[root@user opt]# java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

Continue reading JDK1.8 installation Log [Debian and CentOS Linux]
, , , , , , , , , , , ,

./quickstart.sh:204:./quickstart.sh:jar:not found error Log [Debian and CentOS Linux]

Sometimes, you can see this error

./quickstart.sh:204:./quickstart.sh:jar:not found error

Make the following settings do not panic.

You need to modify quickstart.sh script.[204 line]
Here is the error correction log.

jar xf "$SRCDIR/mgmt.war"

modify
 
YourJavaLocation/bin/jar xf "$SRCDIR/mgmt.war"

in my case

/opt/jdk1.8.0_65/bin/jar xf "$SRCDIR/mgmt.war"

Run archiver appliance quickstart after save.


Continue reading ./quickstart.sh:204:./quickstart.sh:jar:not found error Log [Debian and CentOS Linux]

2016년 1월 7일 목요일

, , , , , , , , , , , ,

EPICS Archiver Appliance Installation Using an Install Script Log[Debian and CentOS Linux]

1 Archiver Appliance Installation


Archiver appliance[1] is download here.

user@user:~/Downloads# ls
archappl_v0.0.1_SNAPSHOT_23-September-2015T07-41-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

Sun Java JDK 1.8 is download here.
Here is the quick download log for all Linux user. In my case JDK 1.8 download the /opt directory.

root@user:/opt# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2
Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz"

Untar the downloaded file.

root@user:/opt# tar -xzf jdk-8u66-linux-x64.tar.gz
root@user:/opt# ls
jdk1.8.0_66

Here is the installation log for Debian Linux user.

root@user:/opt# update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_66/bin/java 1041
root@user:/opt# update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_66/bin/javac 1041
root@user:/opt# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection                                       Path                                    Priority       Status
------------------------------------------------------------
* 0     /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071       auto mode
1     /opt/jdk1.8.0_66/bin/java                                               1041       manual mode
2     /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java     1071       manual mode
Press enter to keep the current choice[*], or type selection number: 1
update-alternatives: using /opt/jdk1.8.0_66/bin/java to provide /usr/bin/java (java) in manual mode
root@user:/opt# java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

If you are using CentOS, here is the installation log.

[root@user opt]# alternatives --install /usr/bin/java java /opt/jdk1.8.0_66/bin/java 2
[root@user opt]# alternatives --config java
There are 4 programs which provide ’java’.
Selection           Command
-----------------------------------------------
*+ 1     /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2     /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
3     /usr/lib/jvm/jre-1.5.0-gcj/bin/java
4     /opt/jdk1.8.0_66/bin/java
Enter to keep the current selection[+], or type selection number: 4
[root@user opt]# alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_66/bin/jar 2
[root@user opt]# alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_66/bin/javac 2
[root@user opt]# alternatives --set jar /opt/jdk1.8.0_66/bin/jar
[root@user opt]# alternatives --set javac /opt/jdk1.8.0_66/bin/javac
[root@user opt]# java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

Tomcat 7.x Download

Tomcat 7.x is download here.

user@user:~/Downloads# ls
apache-tomcat-7.0.65.tar.gz
archappl_v0.0.1_SNAPSHOT_23-September-2015T07-41-14.tar.gz

Chrome installation

Chrome is download here.
Here is the chrome installation log for Debian Linux user.

user@user:~/home/user/Downloads# ls
apache-tomcat-7.0.65.tar.gz
archappl_v0.0.1_SNAPSHOT_23-September-2015T07-41-14.tar.gz
google-chrome-stable_current_amd64.deb
user@user:~/Downloads$ su
Password:
root@user:/home/user/Downloads# dpkg -i google-chrome-stable_current_amd64.deb
root@user:/home/user/Downloads# aptitude install google-chrome-stable

MySQL installation and setting

Create MySQL user and table is needed for the archiver appliance installation.
Here is the quick installation log for Debian Linux user. Other Linux users install the same name package.

Package : mysql-server
root@user:~# aptitude install mysql-server

MySQL connector download here, and untar the download file.

user@user:~/home/user/Downloads# ls
apache-tomcat-7.0.65.tar.gz
archappl_v0.0.1_SNAPSHOT_23-September-2015T07-41-14.tar.gz
google-chrome-stable_current_amd64.deb
mysql-connector-java-5.1.38.tar.gz
user@user:~/home/user/Downloads# tar -xzf mysql-connector-java-5.1.38.tar.gz
user@user:~/home/user/Downloads# ls
apache-tomcat-7.0.65.tar.gz
archappl_v0.0.1_SNAPSHOT_23-September-2015T07-41-14.tar.gz
google-chrome-stable_current_amd64.deb mysql-connector-java-5.1.38.tar.gz
mysql-connector-java-5.1.38

Here is the create MySQL user and table log for Debian Linux user.

user@user:~$ 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.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> 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
user@user:~$ 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

If you are using CentOS, here is the create MySQL user and table log.

[root@user ~]# service mysqld start
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password ’new-password’
/usr/bin/mysqladmin -u root -h node2 password ’new-password’
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
[ OK ]
Starting mysqld:
[ OK ]
[root@user ~]# /usr/bin/mysqladmin -u root password ’password’
[root@user ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, 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, 1 row affected (0.00 sec)
mysql> grant all on databasename.* to username@localhost;
mysql> show databases;
+-------------------------+
| Database                              |
+-------------------------+
| information_schema          |
| mysql                                    |
| databasename                     |
+-------------------------+
4 rows in set (0.00 sec)

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.
If you want to simply test the system and quickly get going, please see the Quickstart section.

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

user@user:~$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, 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.

user@user:~$ mkdir archappl
user@user:~$ cd Downloads
user@user:~/Downloads$ mv archappl_v0.0.1_SNAPSHOT_23-September-2015T07-41-14.tar.gz apache-tomcat-7.0.65.tar.gz ./../archappl
user@user:~/Downloads$ cd ../archappl
user@user:~/archappl$ ls
apache-tomcat-7.0.65.tar.gz     archappl_v0.0.1_SNAPSHOT_23-September-2015T07-41-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

user@user:~/archappl$ tar -xzf archappl_v0.0.1_SNAPSHOT_23-September-2015T07-41-14.tar.gz
user@user:~/archappl$ ls
Apache_2.0_License.txt
install_scripts RELEASE_NOTES
apache-tomcat-7.0.65.tar.gz
LICENSE
retrieval.war
archappl_v0.0.1_SNAPSHOT_23-September-2015T07-41-14.tar.gz mgmt.war
sample_site_specific_content
engine.war
NOTICE
etl.war
quickstart.sh

4

Set JAVA HOME to point to a 1.8 JDK

user@user:~/archappl$ export JAVA_HOME=/opt/jdk1.8.0.66

5

Run the install script like so

user@user:~/archappl$ cd install_scripts
user@user:~archappl/install_scripts$ ./single_machine_install.sh

This should start the install script.

6

Soon you can see the following window.

Pick a folder for create the Tomcat instance      
It is recommended that you select an empty folder. In my case, create a archiver appliance
folder and pick this folder.

7

Soon you can see the following window.

Pick a Tomcat distribution (tar.gz) file
 Select a Tomcat distribution (tar.gz) file.

8

Soon you can see the following window.

Pick a mysql client jar
 Select a mysql client jar file.

9

Soon you can see the following window.

Question about ARCHAPPL APPLIANCES environment variable
 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.

Question about policies.py file
 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.

Done with the installation 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

 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 
Continue reading EPICS Archiver Appliance Installation Using an Install Script Log[Debian and CentOS Linux]