<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://clonwiki0.jlab.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Boiarino</id>
	<title>CLONWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://clonwiki0.jlab.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Boiarino"/>
	<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Special:Contributions/Boiarino"/>
	<updated>2026-08-22T18:14:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=SSH&amp;diff=8775</id>
		<title>SSH</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=SSH&amp;diff=8775"/>
		<updated>2026-08-06T21:41:34Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
On RHEL9 machines, to be able to ssh to old machines (like vme controllers under CentOS5), run following as root:&lt;br /&gt;
&lt;br /&gt;
 update-crypto-policies --set LEGACY&lt;br /&gt;
&lt;br /&gt;
and then probably reboot, not sure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; that worked on RHEL9.7. On RHEL9.8, in addition, have to add 2 lines to the end of &#039;&#039;/etc/ssh/ssh_config&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 HostKeyAlgorithms +ssh-rsa&lt;br /&gt;
 PubkeyAcceptedAlgorithms +ssh-rsa&lt;br /&gt;
&lt;br /&gt;
== other issues ==&lt;br /&gt;
&lt;br /&gt;
To ssh ignoring &#039;Offending key in /site/etc/ssh_known_hosts&#039; do following:&lt;br /&gt;
&lt;br /&gt;
 ssh -o UserKnownHostsFile=/dev/null &amp;lt;hostname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If does not work, comment out following line in your &#039;&#039;/etc/ssh/ssh_config&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 ###GlobalKnownHostsFile /site/etc/ssh_known_hosts&lt;br /&gt;
&lt;br /&gt;
== old ==&lt;br /&gt;
&lt;br /&gt;
First, enable X11 forwarding: uncommented and properly set 2 following lines in &#039;&#039;/etc/ssh/ssh_config&#039;&#039; file: &lt;br /&gt;
&lt;br /&gt;
 Host *&lt;br /&gt;
 ForwardX11 yes&lt;br /&gt;
&lt;br /&gt;
Normally &#039;&#039;ssh&#039;&#039; creates &#039;&#039;.Xauthority&#039;&#039; file in &#039;&#039;$HOME&#039;&#039; directory. If &#039;&#039;$HOME&#039;&#039; directory is on file server and shared between different machines, it can be a conflict. It is recommended in that case to tell &#039;&#039;ssh&#039;&#039; to place &#039;&#039;.Xauthority&#039;&#039; file somewhere else, for example in &#039;&#039;/tmp&#039;&#039; directory which is usually local. Do following:&lt;br /&gt;
&lt;br /&gt;
1. Uncomment or add following line in &#039;&#039;/etc/ssh/sshd_config&#039;&#039; (it will force execution of /etc/ssh/sshrc script which we&#039;ll create below; also every user&#039;s $HOME/.ssh/environment file will be processed):&lt;br /&gt;
&lt;br /&gt;
 PermitUserEnvironment yes&lt;br /&gt;
&lt;br /&gt;
2. Create &#039;&#039;/etc/ssh/sshrc&#039;&#039; with following contents:&lt;br /&gt;
&lt;br /&gt;
 HOME=/tmp&lt;br /&gt;
 XAUTHORITY=$HOME/.Xauthority.$USER&lt;br /&gt;
 export XAUTHORITY&lt;br /&gt;
 if read proto cookie &amp;amp;&amp;amp; [ -n &amp;quot;$DISPLAY&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
       if [ `echo $DISPLAY | cut -c1-10` = &#039;localhost:&#039; ]&lt;br /&gt;
       then&lt;br /&gt;
               # X11UseLocalhost=yes&lt;br /&gt;
               echo add unix:`echo $DISPLAY |&lt;br /&gt;
               cut -c11-` $proto $cookie&lt;br /&gt;
       else&lt;br /&gt;
               # X11UseLocalhost=no&lt;br /&gt;
               echo add $DISPLAY $proto $cookie&lt;br /&gt;
       fi | /usr/openwin/bin/xauth -q -&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
(on RHEL4 &#039;&#039;xauth&#039;&#039; is located at &#039;&#039;/usr/X11R6/bin/xauth&#039;&#039;, on RHEL5 at &#039;&#039;/usr/bin&#039;&#039;, adjust script accordingly)&lt;br /&gt;
&lt;br /&gt;
3. Add two lines in &#039;&#039;/etc/profile&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 XAUTHORITY=/tmp/.Xauthority.$LOGNAME&lt;br /&gt;
 export XAUTHORITY&lt;br /&gt;
&lt;br /&gt;
4. NOTIFY ALL USERS TO HAVE THAT FILE WITH CORRESPONDING CONTENTS IN THEIR &#039;&#039;$HOME/.ssh&#039;&#039; directories. You can do it for example by placing following into &#039;&#039;/etc/.login&#039;&#039; (on linux you can use &#039;&#039;/etc/csh.login&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 if (! -e ~/.ssh/environment ) then&lt;br /&gt;
   echo &amp;quot;&amp;quot;&lt;br /&gt;
   echo &amp;quot;===== ERROR: create file &#039;~/.ssh/environment&#039; containing following line:&amp;quot;&lt;br /&gt;
   echo &amp;quot;=====       XAUTHORITY=/tmp/.Xauthority.$LOGNAME&amp;quot;&lt;br /&gt;
   echo &amp;quot;===== OTHERWISE SSH/X11 MAY NOT WORK PROPERLY&amp;quot;&lt;br /&gt;
   echo &amp;quot;&amp;quot;&lt;br /&gt;
 endif&lt;br /&gt;
&lt;br /&gt;
5. Create &#039;&#039;/root/.ssh/environment&#039;&#039; file with following contents:&lt;br /&gt;
&lt;br /&gt;
 XAUTHORITY=/tmp/.Xauthority.root&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Restart ssh service by&lt;br /&gt;
&lt;br /&gt;
 svcadm restart network/ssh&lt;br /&gt;
&lt;br /&gt;
(on Linux &#039;&#039;/etc/init.d/sshd restart&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
7. If need to make ssh without password between different clon machines for some user, login as that user and do following (chmod commands are important !):&lt;br /&gt;
&lt;br /&gt;
 mkdir .ssh&lt;br /&gt;
 chmod 700 .ssh&lt;br /&gt;
 cd .ssh&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
    &amp;lt;hit return 3 times&amp;gt;&lt;br /&gt;
 #cp id_rsa.pub authorized_keys&lt;br /&gt;
 ssh-copy-id &amp;lt;machine_name_you_are_in&amp;gt;&lt;br /&gt;
 chmod 600 *&lt;br /&gt;
&lt;br /&gt;
After that for this user all machines with the same home directory have to be accessible without typing password. If machine has different home directory, copy contents of the &#039;id_rsa.pub&#039; into remote machine &#039;authorized_keys&#039; file.&lt;br /&gt;
&lt;br /&gt;
8. Tunneling: for example to tunnel from home to clontrig0 for vnc (port 5902) do following:&lt;br /&gt;
 ssh -L 5902:localhost:4321 login1.jlab.org&lt;br /&gt;
and then from the same window:&lt;br /&gt;
 ssh -L 4321:localhost:5902 clontrig0&lt;br /&gt;
Now if VNCVIEWER on home machine connect to localhost:5902, it will actually connect to clontrig0:5902.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=JLAB_VME_TID&amp;diff=8774</id>
		<title>JLAB VME TID</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=JLAB_VME_TID&amp;diff=8774"/>
		<updated>2026-07-31T18:10:19Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page describes 12GeV-era TI board.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manual for the intermediate TID board:&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TImaster.pdf (pdf)] [https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TImaster.docx (docx)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manual for the TI at April 23, 2013:&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TI_23_apr_2013.pdf (pdf)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manual for the TI at December 3, 2013:&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TI_3_dec_2013.pdf (pdf)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clock distribution manual:&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TriggerClock.pdf (pdf)] [https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TriggerClock.docx (docx)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; To switch to 125MHz, flip the SC1 switch (very bottom of the board) bit#3 and bit#5 to HIGH (up). (The numbers are marked on the switch, from right to left).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=JLAB_VME_TID&amp;diff=8773</id>
		<title>JLAB VME TID</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=JLAB_VME_TID&amp;diff=8773"/>
		<updated>2026-07-31T18:10:10Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page describes 12GeV-era TI board.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manual for the intermediate TID board:&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TImaster.pdf (pdf)] [https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TImaster.docx (docx)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manual for the TI at April 23, 2013:&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TI_23_apr_2013.pdf (pdf)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Manual for the TI at December 3, 2013:&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TI_3_dec_2013.pdf (pdf)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clock distribution manual:&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TriggerClock.pdf (pdf)] [https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_VME_TriggerClock.docx (docx)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; To switch to 125MHz, flip the SC1 switch (very bottom of the board) bit#3 and bit#5 to HIGH (up). (The numbers are marked on the switch, from right to left).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8772</id>
		<title>MPD</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8772"/>
		<updated>2026-07-29T19:12:54Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Things to try in case of problems:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* recycle gem LV (and HV ?)&lt;br /&gt;
&lt;br /&gt;
* roc_reboot gem1/gem2&lt;br /&gt;
&lt;br /&gt;
* roc_reboot mpd1/2/3 and gem1/gem2&lt;br /&gt;
&lt;br /&gt;
* roc_reboot everything (helped once)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Useful commands to debug MPD/VTP readout problems:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp vtpRocStatus - check &#039;Trigger Cnt&#039; and &#039;Trigger Acks&#039;&lt;br /&gt;
 tcpClient gem1vtp mpdGStatus - check &#039;Event Builder&#039; table&lt;br /&gt;
 tcpClient gem1vtp vtpMpdPrintStatus -  check ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MPD-&amp;gt;SSP/VTP data format:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 [https://clonwiki0.jlab.org/wiki/clondocs/Docs/SSP_MPD_EventFormat_31_oct_2025.pdf (pdf)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MPD VTP firmware:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 fe_vtp_v7_mpd_jan1_26.bin - copied to fe_vtp_v7_mpd.bin and used&lt;br /&gt;
 fe_vtp_v7_mpd_jul29_26.bin - new version to address possible issues, to be tested&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8771</id>
		<title>MPD</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8771"/>
		<updated>2026-07-29T17:47:33Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Things to try in case of problems:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* recycle gem LV (and HV ?)&lt;br /&gt;
&lt;br /&gt;
* roc_reboot gem1/gem2&lt;br /&gt;
&lt;br /&gt;
* roc_reboot mpd1/2/3 and gem1/gem2&lt;br /&gt;
&lt;br /&gt;
* roc_reboot everything (helped once)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Useful commands to debug MPD/VTP readout problems:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp vtpRocStatus - check &#039;Trigger Cnt&#039; and &#039;Trigger Acks&#039;&lt;br /&gt;
 tcpClient gem1vtp mpdGStatus - check &#039;Event Builder&#039; table&lt;br /&gt;
 tcpClient gem1vtp vtpMpdPrintStatus -  check ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MPD-&amp;gt;SSP/VTP data format:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 [https://clonwiki0.jlab.org/wiki/clondocs/Docs/SSP_MPD_EventFormat_31_oct_2025.pdf (pdf)]&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8770</id>
		<title>MPD</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8770"/>
		<updated>2026-07-29T17:47:14Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Things to try in case of problems:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* recycle gem LV (and HV ?)&lt;br /&gt;
&lt;br /&gt;
* roc_reboot gem1/gem2&lt;br /&gt;
&lt;br /&gt;
* roc_reboot mpd1/2/3 and gem1/gem2&lt;br /&gt;
&lt;br /&gt;
* roc_reboot everything (helped once)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Useful commands to debug MPD/VTP readout problems:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp vtpRocStatus - check &#039;Trigger Cnt&#039; and &#039;Trigger Acks&#039;&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp mpdGStatus - check &#039;Event Builder&#039; table&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp vtpMpdPrintStatus -  check ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MPD-&amp;gt;SSP/VTP data format:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 [https://clonwiki0.jlab.org/wiki/clondocs/Docs/SSP_MPD_EventFormat_31_oct_2025.pdf (pdf)]&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8769</id>
		<title>MPD</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8769"/>
		<updated>2026-07-29T17:45:11Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Useful commands to debug MPD/VTP readout problems:&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp vtpRocStatus - check &#039;Trigger Cnt&#039; and &#039;Trigger Acks&#039;&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp mpdGStatus - check &#039;Event Builder&#039; table&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp vtpMpdPrintStatus -  check ...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tings to try in case of problems:&lt;br /&gt;
&lt;br /&gt;
* roc_reboot gem1/gem2&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
MPD-&amp;gt;SSP/VTP data format: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/SSP_MPD_EventFormat_31_oct_2025.pdf (pdf)]&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8768</id>
		<title>MPD</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8768"/>
		<updated>2026-07-29T17:18:47Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Useful commands to debug MPD/VTP readout problems:&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp vtpRocStatus - check &#039;Trigger Cnt&#039; and &#039;Trigger Acks&#039;&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp mpdGStatus - check &#039;Event Builder&#039; table&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp vtpMpdPrintStatus -  check ...&lt;br /&gt;
&lt;br /&gt;
MPD-&amp;gt;SSP/VTP data format: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/SSP_MPD_EventFormat_31_oct_2025.pdf (pdf)]&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Streaming&amp;diff=8767</id>
		<title>Streaming</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Streaming&amp;diff=8767"/>
		<updated>2026-07-29T14:39:27Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Streaming data format&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Raw data from VTP: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/streaming_evio4_format.png png]&lt;br /&gt;
&lt;br /&gt;
Aggregated data: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/streaming_evio6_format.png png]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;git ???&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
VTP library checkout:&lt;br /&gt;
&lt;br /&gt;
cd $CODA/src/&lt;br /&gt;
git&lt;br /&gt;
&lt;br /&gt;
Ben about &#039;no hits&#039; debugging:&lt;br /&gt;
 The vtpStats() function (I think that&#039;s what it&#039;s called) that shows MIG Writes and Read is a good indicator it&#039;s building hits - so that&#039;ll be a good &lt;br /&gt;
 thing to check if you aren&#039;t seeing hits in data to see if that shows anything (we can estimate the event builder hit rate on the VTP based on the number&lt;br /&gt;
 of MIG writes &amp;amp; reads per second). Let me know if you&#039;d like me to try in debug something (particularly if you have it in a weird state: if you can leave&lt;br /&gt;
 it in that state I can try to login to check).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Customization_on_CLON_Cluster&amp;diff=8766</id>
		<title>Linux Customization on CLON Cluster</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Customization_on_CLON_Cluster&amp;diff=8766"/>
		<updated>2026-07-28T17:34:00Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Following steps must be performed to complain with CLON Cluster requirements:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Automount&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DO NOT NEED ANY MORE * Include machine name into [[clonfs1]] export list&lt;br /&gt;
&lt;br /&gt;
* Add/Modify [[automounts]]-related files in &#039;/etc&#039; directory (or copy them from similar machine) and symbolic links. Restart automount service.&lt;br /&gt;
&lt;br /&gt;
NOTE: To mount temporary &#039;&#039;iso&#039;&#039; images use command:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/isoimage&lt;br /&gt;
 mount -o loop -t iso9660 blablabla.iso /mnt/isoimage&lt;br /&gt;
&lt;br /&gt;
* on daq servers, set [[ramdisk]] and disable swap by running &#039;&#039;swapoff -a&#039;&#039; and commenting out &#039;&#039;swap&#039;&#039; line in &#039;&#039;/etc/fstab&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* on daq servers, install package for dynamically loading rol3&#039;s into coda_ebc:&lt;br /&gt;
&lt;br /&gt;
 yum install patchelf&lt;br /&gt;
&lt;br /&gt;
* on daq servers, install TIpci card driver if needed, see [[JLAB PCI TI]]&lt;br /&gt;
&lt;br /&gt;
* (ON RHEL5 DO &#039;&#039;yum install mysql-devel&#039;&#039;): perform [[MySQL Installation]]&lt;br /&gt;
&lt;br /&gt;
* install [[Scons]] (needed for example by evio compilation)&lt;br /&gt;
&lt;br /&gt;
* customize [[Java]]&lt;br /&gt;
&lt;br /&gt;
* install [[MYA]] - related stuff&lt;br /&gt;
&lt;br /&gt;
* for EPICS machines: copy /etc/sudoers&lt;br /&gt;
&lt;br /&gt;
* Install required [[Tcl/Tk]] packages&lt;br /&gt;
&lt;br /&gt;
* Install [[Mellanox]] driver if needed&lt;br /&gt;
&lt;br /&gt;
* Install required [[PERL]] modules&lt;br /&gt;
&lt;br /&gt;
* DO NOT NEED ON RHEL5: activate [[Ntp]] service (by default it is disabled, at least in RHEL4)&lt;br /&gt;
&lt;br /&gt;
* Proceed with SUN&#039;s [[JAVA installation]] (default one is IBM&#039;s and our stuff is not compiling; besides all Sun machines have Sun&#039;s JAVA and we want to have the same version everywhere).&lt;br /&gt;
&lt;br /&gt;
* install [[UPS (Uninterruptible Power Supplies)]] - related software&lt;br /&gt;
&lt;br /&gt;
* configure printers (see [[Troubleshooting printing]])&lt;br /&gt;
&lt;br /&gt;
* configure [[X server]] if your machine has display(s)&lt;br /&gt;
&lt;br /&gt;
* setup [[Nrpe]]&lt;br /&gt;
&lt;br /&gt;
* configure [[Systemd]] services if needed&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Installation_Procedure&amp;diff=8765</id>
		<title>Linux Installation Procedure</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Installation_Procedure&amp;diff=8765"/>
		<updated>2026-07-28T17:31:44Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 (64 bit) - machine under puppet control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dell servers hardware trick(s) ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;!!! if BIOS date/time is incorrect, it may prevent redhat subscription and installation to work correctly, set it to correct value !!! (it was not confirmed, problem may be different and was fixed at the same time as time was correctly set) &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* if BIOS does not remember time setting after power unplugged, battery on motherboard may need to be replaced&lt;br /&gt;
&lt;br /&gt;
* if looks dead, remove the power cords, then held in the on button for 30 seconds; then plug it back in and it may boots up fine - known Dell feature&lt;br /&gt;
&lt;br /&gt;
== ARM (CentsOS7) ==&lt;br /&gt;
&lt;br /&gt;
See [[yum]] for specifics.&lt;br /&gt;
&lt;br /&gt;
 yum install xauth wget bzip2 xterm expat-devel libX11-devel libXpm-devel motif-devel mariadb-devel&lt;br /&gt;
&lt;br /&gt;
== RHEL9 (64 bit) - machine under puppet control ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: select installation type &#039;&#039;&#039;H&#039;&#039;&#039;, then type &#039;&#039;&#039;B&#039;&#039;&#039;.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: during custom disk partitioning, select &#039;Standard&#039; for every partition, if you want it to be standard, or &#039;Raid&#039; if applicable&lt;br /&gt;
&lt;br /&gt;
Root password will be set by puppet during installation, as well as most other needed settings.&lt;br /&gt;
&lt;br /&gt;
Install useful packages:&lt;br /&gt;
 yum install ncdu mysql gfortran&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: graphic screen is disabled, run following command as root:&lt;br /&gt;
 systemctl set-default graphical.target&lt;br /&gt;
&lt;br /&gt;
== RHEL9 (64 bit) - for machine NOT under puppet control ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: select installation type &#039;&#039;&#039;D&#039;&#039;&#039; (not &#039;&#039;&#039;S&#039;&#039;&#039;, otherwise it will not be level 2 server)&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: during custom disk partitioning, select &#039;Standard&#039; for every partition, if you want it to be standard, or &#039;Raid&#039; if applicable&lt;br /&gt;
&lt;br /&gt;
When installation complete, ssh as authorized user and do following:&lt;br /&gt;
&lt;br /&gt;
 sudo yum install emacs&lt;br /&gt;
 cd /etc&lt;br /&gt;
 sudo chmod a+rw shadow&lt;br /&gt;
 sudo emacs shadow&lt;br /&gt;
&lt;br /&gt;
Copy to /etc/shadow root and other needed passwords from another clon machine. &lt;br /&gt;
&lt;br /&gt;
 sudo chmod a-rw shadow&lt;br /&gt;
&lt;br /&gt;
After that, type &#039;&#039;su&#039;&#039; to become superuser. All following settings can be done now without typing &#039;&#039;sudo&#039;&#039; every time. You still will not be able to ssh remotely as root - always ssh as authorized user and type &#039;&#039;su&#039;&#039; to become root.&lt;br /&gt;
&lt;br /&gt;
Update /etc/passwd and /etc/group using another clon machine as example.&lt;br /&gt;
&lt;br /&gt;
 yum install expat-devel libXaw-devel mysql-devel motif-devel ncurses-devel apr-devel net-snmp-utils&lt;br /&gt;
 yum install xorg-x11-utils # for xprop/xwininfo/etc creg stuff&lt;br /&gt;
 yum install s-nail # for /usr/bin/mail&lt;br /&gt;
 yum install ncdu gfortran&lt;br /&gt;
 yum install libconfig-devel # recent addition for CODA libraries&lt;br /&gt;
&lt;br /&gt;
To be able to ssh to old machines (like vme controllers under CentOS5), run following as root:&lt;br /&gt;
&lt;br /&gt;
 update-crypto-policies --set LEGACY&lt;br /&gt;
&lt;br /&gt;
and then probably reboot, not sure.&lt;br /&gt;
&lt;br /&gt;
Somebody mentioned also adding &#039;&#039;RequiredRSASize 1024&#039;&#039; to a config file in &#039;&#039;/etc/ssh/ssh_config.d/&#039;&#039;, but I did not do it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Note: this changes all daemons and system settings and is a bit overkill if you only need to adjust the settings for ssh and sshd.&lt;br /&gt;
&lt;br /&gt;
    Exclude (only) sshd from the system-wide cryptographic policy. You opt-out by editing /etc/sysconfig/sshd and uncommenting the line # CRYPTO_POLICY= , (if necessary you can then adjust adjust /etc/ssh/sshd_config and add legacy crypto settings) and restart the ssh daemon.&lt;br /&gt;
&lt;br /&gt;
For the ssh command line client on the RHEL 9 system: you&#039;re recommended to edit ˜/.ssh/config and override the modern/secure system wide ssh client defaults by adding a Host entry that adds support for suitable legacy encryption options for that particular host:&lt;br /&gt;
&lt;br /&gt;
#    ˜/.ssh/config&lt;br /&gt;
&lt;br /&gt;
Host rhel6.example.com&lt;br /&gt;
  KexAlgorithms +diffie-hellman-group14-sha1&lt;br /&gt;
  MACs +hmac-sha1&lt;br /&gt;
  HostKeyAlgorithms +ssh-rsa&lt;br /&gt;
  PubkeyAcceptedKeyTypes +ssh-rsa&lt;br /&gt;
  PubkeyAcceptedAlgorithms +ssh-rsa&lt;br /&gt;
&lt;br /&gt;
Prepare auto-mounting directories:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
 mv apps apps.orig&lt;br /&gt;
 mv home home.orig&lt;br /&gt;
 mv scratch scratch.orig&lt;br /&gt;
 mv work work.orig&lt;br /&gt;
 mkdir apps&lt;br /&gt;
 mkdir home&lt;br /&gt;
 mkdir scratch&lt;br /&gt;
 mkdir work&lt;br /&gt;
 mkdir logs&lt;br /&gt;
 cd /usr&lt;br /&gt;
 mv local local.orig&lt;br /&gt;
 mkdir local&lt;br /&gt;
 mkdir clas&lt;br /&gt;
 mkdir clas12&lt;br /&gt;
 mkdir downloads&lt;br /&gt;
 cd&lt;br /&gt;
&lt;br /&gt;
== RHEL8 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; to boot from USB stick, insert USB stick, turn machine ON holding F2, and in BIOS Boot Configuration, set Enable Security Boot to OFF, save and exit, holding F2. When in BIOS again, in Boot Configuration make &#039;&#039;UEFI PHY USB ...&#039;&#039; first in boot sequence, local hard drive second, disable all other boot options, save and exit. Do NOT hold F2, Linux installation from USB stick will start. &#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; when asked about D/S options (very first question in installation process), &#039;&#039;&#039;REMOVE USB STICK BEFORE ANSWERING QUESTION ABOUT DESKTOP/SERVER&#039;&#039;&#039;, otherwise it will be destroyed by following installation steps !!!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; to disable/enable puppet, do following as root: &lt;br /&gt;
 puppet agent --disable &amp;quot;temporary&amp;quot;&lt;br /&gt;
 puppet agent --enable&lt;br /&gt;
&lt;br /&gt;
 yum install emacs&lt;br /&gt;
 yum install xorg-x11-fonts-misc&lt;br /&gt;
&lt;br /&gt;
Move and create some directories in preparation for automounts:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
 mv apps apps.orig&lt;br /&gt;
 mv home home.orig&lt;br /&gt;
 mv scratch scratch.orig&lt;br /&gt;
 mkdir apps&lt;br /&gt;
 mkdir home&lt;br /&gt;
 mkdir scratch&lt;br /&gt;
 mkdir work&lt;br /&gt;
 mkdir logs&lt;br /&gt;
 cd /usr&lt;br /&gt;
 mv local local.orig&lt;br /&gt;
 mkdir local&lt;br /&gt;
 mkdir clas&lt;br /&gt;
 mkdir clas12&lt;br /&gt;
 mkdir downloads&lt;br /&gt;
 cd&lt;br /&gt;
&lt;br /&gt;
Add line &#039;&#039;&#039;+dir:/etc/auto.master.d&#039;&#039;&#039; to &#039;&#039;/etc/auto.master&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/auto.master.d/direct.autofs&#039;&#039; with the line &#039;&#039;&#039;/- /etc/auto.direct&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/auto.direct&#039;&#039; with the following contents:&lt;br /&gt;
&lt;br /&gt;
 # machine-dependent system directories&lt;br /&gt;
 /apps                 -rw,bg     clonfs1:/vol/apps/RHEL8_x86_64&lt;br /&gt;
 /usr/local            -rw,bg     clonfs1:/vol/local/RHEL8_x86_64&lt;br /&gt;
 # machine-independent system directories&lt;br /&gt;
 /home                 -rw,bg     clonfs1:/vol/home&lt;br /&gt;
 #/work                 -rw,bg     clonfs1-old:/vol/work&lt;br /&gt;
 /scratch              -rw,bg     clonfs1:/vol/scratch&lt;br /&gt;
 # machine-independent clas directories&lt;br /&gt;
 /usr/downloads        -rw,bg     clonfs1:/vol/downloads&lt;br /&gt;
 /usr/clas             -rw,bg     clonfs1:/vol/clas&lt;br /&gt;
 /usr/clas12           -rw,bg     clonfs1:/vol/clas12&lt;br /&gt;
 # Used for data storage before shipping to tape&lt;br /&gt;
 #/logs                 -rw,bg     clonfs1-old:/vol/logs&lt;br /&gt;
&lt;br /&gt;
Restart autofs:&lt;br /&gt;
&lt;br /&gt;
 service autofs reload&lt;br /&gt;
 service autofs restart&lt;br /&gt;
&lt;br /&gt;
Remove from the end of the &#039;&#039;/etc/passwd&#039;&#039; line &#039;&#039;&#039;+::::::&#039;&#039;&#039;, and add following:&lt;br /&gt;
&lt;br /&gt;
 hpsrun:x:8796:9998:hpsrun Account:/home/hpsrun:/bin/tcsh&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clasioc:x:6008:9998:CLAS IOCs:/home/clasioc:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:3888:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +sshd::::::&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
Update &#039;&#039;/etc/shadow&#039;&#039;, adding passwords for local accounts (copy it from another machine).&lt;br /&gt;
&lt;br /&gt;
Add following to &#039;&#039;/etc/group&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 clon:x:383:clascron&lt;br /&gt;
 onliners:x:9998:abbottd,avakian,baltzell,battagli,brooksw,bruhwel,boiarino,carman,chen,clasboot,clascron,clasrun,cole,cuevas,davidl,danagu,dugger,elton,epics,fklein,gilfoyle,giovanet,golovach,gurjyan,heddle,heyes,hovanes,jacobsg,jenkins,kliv,lcsmith,marki,mestayer,nerses,parkkj,pasyuk,primex,ripani,rossi,saw,staylor,sytnik,taiuti,taylorw,timmer,wooyoung&lt;br /&gt;
&lt;br /&gt;
== RHEL7 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
Installed using DVD provided by Computer Center, currently RHEL7.3. Requires MAC address to be registered with Computer Center (using jnet.jlab.org as &#039;boiarino&#039;) because it is network-based installation. On DELL servers, hold F2 after power on and go to &#039;Device Settings&#039; to see mac address. Remember machine memory size as well, will needed when create partitions, find it in &#039;System BIOS -&amp;gt; Memory Settings&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: all disks will be reformatted in a process, all information will be lost !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Please enter the hostname of this system: &amp;lt;hostname&amp;gt; &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What type of system are you building? (D)esktop: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Is this a CUE level 1 or CUE level 2 System build (1/2): 2 &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Please enter the System Admin&#039;s CUE username: boiarino &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do you want to use the default partitioning scheme (y/n)? n &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Are you sure you want to use your own partitioning scheme (y/n)? y &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose &#039;Standard Partition&#039; scheme and create following partitions: /boot - 1GB, swap - double memory size, / - the rest of space.&lt;br /&gt;
&lt;br /&gt;
Installation will proceed. When prompted, remove installation disk and reboot machine if not done automatically.&lt;br /&gt;
&lt;br /&gt;
After reboot patching process will be started and it will take a while, do not interrupt it, otherwise system will not be installed correctly.&lt;br /&gt;
&lt;br /&gt;
When machine reboots for the last time, ask Paul Letta to set usual hallb root password. From now on remote root access is possible. Alternatively, user &#039;&#039;boiarino&#039;&#039; can execute most of actions using &#039;&#039;sudo&#039;&#039;,&lt;br /&gt;
like &#039;&#039;sudo emacs&#039;&#039; for protected files. &#039;&#039;sudo reboot&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
Go to /boot/grub2 and modify file grub.cfg, Linux kernel boot options, adding options &#039;&#039;net.ifnames=0 biosdevname=0&#039;&#039;, so your boot string has following section:&lt;br /&gt;
&lt;br /&gt;
 ..... rhgb net.ifnames=0 biosdevname=0 quiet .....&lt;br /&gt;
&lt;br /&gt;
so whole line looks something like this:&lt;br /&gt;
&lt;br /&gt;
 linux16 /vmlinuz-3.10.0-327.18.2.el7.x86_64 root=UUID=b5d1b5ad-e3f6-4db4-8972-aa9c1a91d116 ro vconsole.keymap=us crashkernel=auto  vconsole.font=latarcyrheb-sun16 rhgb net.ifnames=0 biosdevname=0 quiet LANG=en_US.UTF-8&lt;br /&gt;
&lt;br /&gt;
Reboot machine, ethernet ports must be named &#039;&#039;eth0&#039;&#039;, &#039;&#039;eth1&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
To update manually, use commands &#039;&#039;yum list updates&#039;&#039; and &#039;&#039;yum update&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; add machine to the appropriate &#039;&#039;&#039;puppet&#039;&#039;&#039; group, it will do all following automatically (hopefully).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; on RHEL7.9, RPM EPEL REPO is not enabled by default, which prevents from installing nload, itcl, itk etc. To bring it back, it can be copied it from older machine, for example:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/yum.repos.d&lt;br /&gt;
 scp clondaq7:/etc/yum.repos.d/epel.repo .&lt;br /&gt;
 cd /etc/pki/rpm-gpg&lt;br /&gt;
 scp clondaq7:/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 .&lt;br /&gt;
&lt;br /&gt;
Alternatively, following can be used to add repo&#039;s:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --enable &amp;lt;repo_id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In particular, following have to be enabled to get nload, xpdf, python-alembic, tix, itcl, itk etc:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --enable JLab_EPEL_EPEL_7&lt;br /&gt;
 subscription-manager repos --enable rhel-7-workstation-optional-rpms&lt;br /&gt;
&lt;br /&gt;
Repo ID&#039;s can be obtained by:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --list&lt;br /&gt;
&lt;br /&gt;
Installed repo&#039;s can be seen by:&lt;br /&gt;
&lt;br /&gt;
 yum repolist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Yum updates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edit the &#039;&#039;/etc/yum.conf&#039;&#039; file and add the following line to force installation of the 32bit and 64bit libraries:&lt;br /&gt;
&lt;br /&gt;
 multilib_policy=all&lt;br /&gt;
&lt;br /&gt;
Install following packages:&lt;br /&gt;
&lt;br /&gt;
 yum install xterm mesa-dri-drivers telnet rsh readline-devel net-snmp-utils tigervnc-server tigervnc xpdf nload mariadb-devel libxml2-devel glibc-devel qt-devel python-alembic openssl-devel apr-devel&lt;br /&gt;
 yum install libconfig-devel # recent addition for CODA libraries&lt;br /&gt;
&lt;br /&gt;
Fonts for EPICS EDMs:&lt;br /&gt;
&lt;br /&gt;
 yum install xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-75dpi bitmap-miscfixed-fonts&lt;br /&gt;
 yum install bitmap-console-fonts bitmap-fixed-fonts bitmap-lucida-typewriter-fonts&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/100dpi /etc/X11/fontpath.d/xorg-x11-fonts-100dpi:pri=60&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/75dpi /etc/X11/fontpath.d/xorg-x11-fonts-75dpi:pri=50&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/misc /etc/X11/fontpath.d/xorg-x11-fonts-misc:pri=40&lt;br /&gt;
 ln -s  /usr/share/fonts/bitmap /etc/X11/fontpath.d/bitmap-fonts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do following to be able to compile and run 32-bit apps on 64-bit machine (for compatibility with 32bit applications):&lt;br /&gt;
&lt;br /&gt;
 yum install libXpm-devel libXaw-devel motif-devel glibc-devel ncurses-devel readline-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/passwd&#039;&#039; adding following:&lt;br /&gt;
&lt;br /&gt;
 hpsrun:x:8796:9998:hpsrun Account:/home/hpsrun:/bin/tcsh&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clasioc:x:6008:9998:CLAS IOCs:/home/clasioc:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:3888:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +sshd::::::&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: user-related lines must be removed, like&lt;br /&gt;
&lt;br /&gt;
 +boiarino::::::&lt;br /&gt;
&lt;br /&gt;
as well as&lt;br /&gt;
&lt;br /&gt;
 +::::::&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: assumed that following line is in already:&lt;br /&gt;
&lt;br /&gt;
 +@ccc::::::&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: if following line exist, it must be placed in the end, or removed:&lt;br /&gt;
&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/group&#039;&#039; adding following:&lt;br /&gt;
&lt;br /&gt;
 onliners::9998:heyes,hujl,rwm,timmer,wolin,taylorw,cuevas,abbottd,abulafia,anciant,anghi,aswin,auger,avakian,banta,barrow,battagli,bjlee,bogdan,brooksw,bruhwel,boiarino,buckle,burchesk,burin,bzh,cetina,chen,cole,cords,corvi,costy,davidl,costy,davidl,dcarter,dcurry,dennisl,deppman,dhlee,doughty,drago,dytman,dugger,dugger,elton,fedro,ficenec,fklein,france,freyberg,gholden,gilfoyle,golovach,gurjyan,haddock,heddle,jenkins,jhardie,jmorris,kellyk,klusman,kmkim,kossov,lcsmith,longhi,manak,marchand,marki,mastersj,mjohnson,mosbackr,mueller,muguira,murphyl,necaise,odonnell,opper,parkkj,pasyuk,phkim,piot,riccardi,richardt,ripani,rossi,saw,sergpozd,serov,sholt,staylor,taiuti,tang,tedeschi,vineyard,vlassov,vvsap,weygand,wooyoung,burchesk,clasrun,giovanet,clasboot,clascoda,clasroot,clasmail,clascron,trigger,epics,southern,carstens,ccutter,danagu,heyes,huertas,jacobsg,kliv,lachniet,mestayer,primex,hovanes,nerses,sytnik,baltzell,carman&lt;br /&gt;
 clon::383:clascoda,clascron,clasmail&lt;br /&gt;
 nagios::9997:nagios&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/shadow&#039;&#039; using an example from another RHEL7 clon machine (clonioc2 etc). Do &#039;&#039;chmod 600 shadow&#039;&#039; before editing and &#039;&#039;chmod 000 shadow&#039;&#039; after.&lt;br /&gt;
&lt;br /&gt;
Make sure file &#039;&#039;/etc/ssh/sshd_config&#039;&#039; has following line uncommented (must be pushed in by CC security scripts):&lt;br /&gt;
&lt;br /&gt;
 ##PermitUserEnvironment yes&lt;br /&gt;
&lt;br /&gt;
NOT NEEDED, DONE IN THE END OF FILE ALREADY !!! Uncomment following in file &#039;&#039;/etc/ssh/ssh_config&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 ##Host *&lt;br /&gt;
 ##ForwardX11 yes&lt;br /&gt;
&lt;br /&gt;
Add line &#039;export NO_AT_BRIDGE=1&#039; to the file &#039;/etc/environment&#039; to suppress annoying messages like &#039;** (emacs:38714): WARNING **: Couldn&#039;t register with accessibility bus: Did not receive a reply.&#039;&lt;br /&gt;
&lt;br /&gt;
If big (&amp;gt;2GB) partition to be formated, do following (for example /dev/sdb):&lt;br /&gt;
&lt;br /&gt;
 parted /dev/sdb&lt;br /&gt;
 (parted) print&lt;br /&gt;
 (parted) mklabel gpt&lt;br /&gt;
 (parted) print&lt;br /&gt;
 mkpart primary 0GB 25855.2GB&lt;br /&gt;
 (parted) print&lt;br /&gt;
 (parted) quit&lt;br /&gt;
&lt;br /&gt;
 mkfs.xfs /dev/sdb1&lt;br /&gt;
&lt;br /&gt;
then create /data and mount it using &#039;&#039;/etc/fstab&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 /dev/sdb1                                 /data                   xfs     defaults        1 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; sometimes machine can loose NIS connection, then ssh to it becomes intermittent; if it happens ssh as root (may have to try several times) and run command&lt;br /&gt;
&lt;br /&gt;
 ypwhich&lt;br /&gt;
&lt;br /&gt;
to shows NIS server. If it returns nothing check file &#039;&#039;/etc/resolv.conf&#039;&#039;, it must have following (as on July 2019):&lt;br /&gt;
&lt;br /&gt;
 search jlab.org acc.jlab.org&lt;br /&gt;
 nameserver 129.57.90.255&lt;br /&gt;
 nameserver 129.57.32.101&lt;br /&gt;
&lt;br /&gt;
If file is empty or does not contain right info, fix it. After that run command&lt;br /&gt;
&lt;br /&gt;
 ypbind&lt;br /&gt;
&lt;br /&gt;
It should fix a problem. Run &#039;&#039;ypwhich&#039;&#039; to make sure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Display Setting:&#039;&#039;&#039; if machine is multi-head, goto &#039;&#039;Applications-&amp;gt;System Tools-&amp;gt;Settings-&amp;gt;Devices-&amp;gt;Displays&#039;&#039; and arrange displays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Proceed to the [[Linux Customization on CLON Cluster]].&lt;br /&gt;
&lt;br /&gt;
== RHEL6 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (using jnet.jlab.org as &#039;boiarino&#039;) because it is network-based installation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: all disks will be reformatted in a process, all information will be lost !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ...[D]esktop: [use &#039;s&#039; for server, &#039;d&#039; for desktop] &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* root password: enter root password&lt;br /&gt;
&lt;br /&gt;
* admin user: boiarino&lt;br /&gt;
&lt;br /&gt;
Installation will proceed. When prompted, remove installation disk and reboot machine if not done automatically. After reboot patching process will be started and it will take a while, do not interrupt it, otherwise system will not be installed correctly.&lt;br /&gt;
&lt;br /&gt;
To make emacs work, install&lt;br /&gt;
&lt;br /&gt;
 yum install libotf&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/yum.conf file and add the following line to force installation of teh 32bit and 64bit libraries:&lt;br /&gt;
&lt;br /&gt;
 multilib_policy=all&lt;br /&gt;
&lt;br /&gt;
Install following packages:&lt;br /&gt;
&lt;br /&gt;
 yum install openmotif-devel xinetd mysql-devel cmake libXpm-devel net-snmp-utils&lt;br /&gt;
 yum install mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel (for OpenGL, needed by ROOT)&lt;br /&gt;
 yum install libXaw-devel (for xterm)&lt;br /&gt;
 yum install expat-devel libgcj-devel (for evio/et)&lt;br /&gt;
&lt;br /&gt;
 yum install compat-libtermcap (for xterm)&lt;br /&gt;
 ln -s /lib/libtermcap.so.2 /usr/lib/libtermcap.so&lt;br /&gt;
 ###ln -s /lib64/libtermcap.so.2 /usr/lib64/libtermcap.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install following fonts for EPICS EDMs:&lt;br /&gt;
&lt;br /&gt;
 yum install xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-75dpi bitmap-miscfixed-fonts&lt;br /&gt;
 yum install bitmap-console-fonts bitmap-fixed-fonts bitmap-lucida-typewriter-fonts&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/100dpi /etc/X11/fontpath.d/xorg-x11-fonts-100dpi:pri=60&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/75dpi /etc/X11/fontpath.d/xorg-x11-fonts-75dpi:pri=50&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/misc /etc/X11/fontpath.d/xorg-x11-fonts-misc:pri=40&lt;br /&gt;
 ln -s  /usr/share/fonts/bitmap /etc/X11/fontpath.d/bitmap-fonts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Useful &#039;&#039;yum&#039;&#039; commands:&lt;br /&gt;
&lt;br /&gt;
 yum whatprovides libstdc++.so.5 - show which package contains libstdc++.so.5&lt;br /&gt;
&lt;br /&gt;
== RHEL5 ==&lt;br /&gt;
&lt;br /&gt;
Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (email to helpdesk@jlab.org) because it is network-based installation.&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ...[D]esktop: Server (it is ignored, will do Desktop anyway ...)&lt;br /&gt;
&lt;br /&gt;
* root password: enter root password&lt;br /&gt;
&lt;br /&gt;
* system user: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* manually partition disk: 100MB /boot, 2048 etc MB swap, the rest /.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CFENGINE&#039;&#039;&#039;: there are procesess restoring some system config files (in particular &#039;&#039;/etc/ssh/sshd_config&#039;&#039;) in according to the Computer Center - maintained templete. To shut them down: (1) comment out &#039;&#039;cfengine&#039;&#039;-related stuff in root cronjobs; (2) do &#039;&#039;/etc/init.d/cfengine stop&#039;&#039;; (3) do &#039;&#039;chkconfig cfengine off&#039;&#039;. Ask CC (Sherman White, Paul Letta) to fix templete.&lt;br /&gt;
&lt;br /&gt;
Run &#039;&#039;/usr/bin/system-config-authentication&#039;&#039; and set NIS servers list as &#039;&#039;clon00,clon10,nis1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add following in the end of &#039;&#039;/etc/passwd&#039;&#039;:&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:6005:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +@ccc::::::&lt;br /&gt;
&lt;br /&gt;
Add following in the end of &#039;&#039;/etc/group&#039;&#039;:&lt;br /&gt;
 onliners::9998:heyes,hujl,rwm,timmer,wolin,taylorw,cuevas,abbottd,abulafia,anciant,anghi,aswin,auger,avakian,banta,barrow,battagli,bjlee,bogdan,brooksw,bruhwel,boiarino,buckle,burchesk,burin,bzh,cetina,chen,cole,cords,corvi,costy,davidl,costy,davidl,dcarter,dcurry,dennisl,deppman,dhlee,doughty,drago,dytman,dugger,dugger,elton,fedro,ficenec,fklein,france,freyberg,gholden,gilfoyle,golovach,gurjyan,haddock,heddle,jenkins,jhardie,jmorris,kellyk,klusman,kmkim,kossov,lcsmith,longhi,manak,marchand,marki,mastersj,mjohnson,mosbackr,mueller,muguira,murphyl,necaise,odonnell,opper,parkkj,pasyuk,phkim,piot,riccardi,richardt,ripani,rossi,saw,sergpozd,serov,sholt,staylor,taiuti,tang,tedeschi,vineyard,vlassov,vvsap,weygand,wooyoung,burchesk,clasrun,giovanet,clasboot,clascoda,clasroot,clasmail,clascron,trigger,epics,southern,carstens,ccutter,danagu,heyes,huertas,jacobsg,kliv,lachniet,mestayer,primex,hovanes,nerses,sytnik&lt;br /&gt;
 clon::383:clascoda,clascron,clasmail&lt;br /&gt;
 nagios::9997:nagios&lt;br /&gt;
&lt;br /&gt;
Create &#039;&#039;/etc/shadow&#039;&#039; files with entries for users clasrun, epics and nagios (copy from another machine).&lt;br /&gt;
&lt;br /&gt;
Install updates: normally all updates should be installed by now, it can be done manually by commands&lt;br /&gt;
 yum list updates&lt;br /&gt;
 yum update&lt;br /&gt;
&lt;br /&gt;
Configure [[SSH]].&lt;br /&gt;
&lt;br /&gt;
Install missing packages:&lt;br /&gt;
 yum install openmotif-devel xinetd mysql-devel cmake&lt;br /&gt;
&lt;br /&gt;
Some additional packages on request (for EPICS):&lt;br /&gt;
&lt;br /&gt;
 yum install mc lapack lapack-devel blas blas-devel giflib-devel&lt;br /&gt;
&lt;br /&gt;
Proceed to the [[Linux Customization on CLON Cluster]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PROBLEMS&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
1. /usr/lib/libg2c.so link is missing&lt;br /&gt;
&lt;br /&gt;
FIXED ??? 2. /usr/lib/libXm.so link is missing&lt;br /&gt;
&lt;br /&gt;
3. Created /etc/shadow file for clasrun, epics and nagios&lt;br /&gt;
&lt;br /&gt;
== RHEL4 ==&lt;br /&gt;
&lt;br /&gt;
Get RHEL4 CDs from Paul Letta.&lt;br /&gt;
&lt;br /&gt;
Connect terminal, keyboard and mouse.&lt;br /&gt;
&lt;br /&gt;
Boot from CD1. Follow instructions. When asked, choose following options:&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;Manually partition with Disk Druid&#039;, set /boot to 100MB, then / to 40GB, then swap to 8192MB or at least double memory size. The rest of disk can be set as /space.&lt;br /&gt;
&lt;br /&gt;
* Network: choose manually, type clonpc2.jlab.org; click &#039;EDIT&#039;, deactivate &#039;Configure using DHCP&#039;,&lt;br /&gt;
type IP address and netmask (255.255.255.0), click Ok.&lt;br /&gt;
Type Gateway (for example 129.57.167.99) and 3 DNS servers (129.57.167.5,129.57.167.14,129.57.32.100).&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;No firewall&#039;&lt;br /&gt;
&lt;br /&gt;
* Disable &#039;SELinux&#039;&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;Customize software packages to be installed&#039;, click &#039;Everything&#039;.&lt;br /&gt;
&lt;br /&gt;
You will be asked to install CD2, CD3 and CD4, then CD1 again.&lt;br /&gt;
Then you will be asked to click &#039;Reboot&#039;. First remove CD, then click &#039;Reboot&#039;.&lt;br /&gt;
You will be asked few more questions. When asked to activate service, choose&lt;br /&gt;
&#039;Tell me why I need to register ..&#039; and click &#039;Next&#039;. Choose &#039;I can not complete registration ..&#039;&lt;br /&gt;
and click &#039;Next&#039;. You will see &#039;System user&#039; screen, click &#039;Use network login..&#039;.&lt;br /&gt;
Choose &#039;Enable NIS support&#039; and click &#039;Configure NIS&#039;. Type NIS Domain: &#039;CCCHP&#039; and NIS Server: clon00.jlab.org.&lt;br /&gt;
Finish installation process.&lt;br /&gt;
&lt;br /&gt;
* fix files &#039;&#039;/etc/passwd&#039;&#039;, &#039;&#039;/etc/shadow&#039;&#039; and &#039;&#039;/etc/group&#039;&#039; adding clasrun etc (see examples on another machines).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if machine has multiple network ports, Linux may not assign them properly to specified IP names and addresses. If problem occures, open network GUI and delete all existing records. After that, click &#039;&#039;New&#039;&#039; and pick hadrware port you want to configure from the list of available ports (tricky part is to know which RJ-45 connector corresponds to which port ..). Configure and activate it, make sure it works. Repeat for other ports. Results will be stored in directory &#039;&#039;/etc/sysconfig/network-scripts&#039;&#039;, file names will be &#039;&#039;ifcfg-eth0&#039;&#039;, &#039;&#039;ifcfg-eth1&#039;&#039; etc. If modifying those files manually, restart network by &#039;&#039;/etc/init.d/network restart&#039;&#039;. Finally, set routing, for example for &#039;&#039;clonmon&#039;&#039; command &#039;&#039;route -n&#039;&#039; shows following:&lt;br /&gt;
 Kernel IP routing table&lt;br /&gt;
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
 129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1&lt;br /&gt;
 129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3&lt;br /&gt;
 129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937&lt;br /&gt;
 129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3&lt;br /&gt;
 0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3&lt;br /&gt;
Run following commands:&lt;br /&gt;
 /sbin/route add -net 129.57.160.0 netmask 255.255.255.0 gw 129.57.160.5 dev eth1&lt;br /&gt;
 /sbin/route add -net 129.57.68.0 netmask 255.255.255.0 gw 129.57.68.26 dev eth3&lt;br /&gt;
 /sbin/route add -net 129.57.69.0 netmask 255.255.255.0 gw 129.57.69.206 dev dev5937&lt;br /&gt;
 /sbin/route add -net 129.57.64.0 netmask 255.255.255.0 gw 129.57.64.57 dev eth0&lt;br /&gt;
Now &#039;&#039;route -n&#039;&#039; shows following:&lt;br /&gt;
 Kernel IP routing table&lt;br /&gt;
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
 129.57.160.0    129.57.160.5    255.255.255.0   UG    0      0        0 eth1&lt;br /&gt;
 129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1&lt;br /&gt;
 129.57.68.0     129.57.68.26    255.255.255.0   UG    0      0        0 eth3&lt;br /&gt;
 129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3&lt;br /&gt;
 129.57.69.0     129.57.69.206   255.255.255.0   UG    0      0        0 dev5937&lt;br /&gt;
 129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937&lt;br /&gt;
 129.57.64.0     129.57.64.57    255.255.255.0   UG    0      0        0 eth0&lt;br /&gt;
 129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3&lt;br /&gt;
 0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3&lt;br /&gt;
In that example automount will do configured using &#039;&#039;clonmon-daq1&#039;&#039; interface, because default &#039;&#039;clonmon&#039;&#039; interface is on external subnet. To make that routing table permanent (retore it after reboot) I tried to add four files with following contents to the &#039;&#039;/etc/sysconfig/network-scripts&#039;&#039; directory:&lt;br /&gt;
 route-eth1:&lt;br /&gt;
   GATEWAY0=129.57.160.5&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.160.0&lt;br /&gt;
 route-eth3:&lt;br /&gt;
   GATEWAY0=129.57.68.26&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.68.0&lt;br /&gt;
 route-dev5937:&lt;br /&gt;
   GATEWAY0=129.57.69.206&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.69.0&lt;br /&gt;
 route-eth0:&lt;br /&gt;
   GATEWAY0=129.57.64.57&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.64.0&lt;br /&gt;
It did not worked. Then I added four &#039;&#039;/sbin/route add ..&#039;&#039; lines to &#039;&#039;/etc/rc.local&#039;&#039; script, and it worked.&lt;br /&gt;
&lt;br /&gt;
From now on you can use remote &#039;ssh&#039; connection.&lt;br /&gt;
&lt;br /&gt;
* To configure your system to use the patch server, issue the following commands as root:&lt;br /&gt;
 # mount jlabsite:/site /mnt&lt;br /&gt;
 # /mnt/CC/linux/satellite-connect --patchall&lt;br /&gt;
The script will prompt you for an activation key, but if you don&#039;t know what this is, just hit ENTER and it will use a sensible default.  Depending on how many patches need to be applied to your system to bring it up to the current level, this script may take a very long time to run.  When it finishes, you should reboot your machine to make the new patches take effect.&lt;br /&gt;
&lt;br /&gt;
To install updates later run &#039;&#039;up2date -uf&#039;&#039; as &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Configure [[SSH]].&lt;br /&gt;
&lt;br /&gt;
* Proceed with [[Linux Customization on CLON Cluster]] if applicable.&lt;br /&gt;
&lt;br /&gt;
To boot Linux in single user mode (no graphics), add &#039;&#039;single&#039;&#039; to the end of boot line during boot process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;background info&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Add startup script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create script in &#039;&#039;/etc/init.d/&#039;&#039; directory (use existing scripts as example). Must have a line like&lt;br /&gt;
 # chkconfig:	- 91 09&lt;br /&gt;
which specifies start and stop order. Run commands&lt;br /&gt;
 chkconfig --add &amp;lt;scriptname&amp;gt;&lt;br /&gt;
 chkconfig --level 3 &amp;lt;scriptname&amp;gt; on&lt;br /&gt;
for every level you want that script to be executed (usualy 3 and/or 4 and/or 5). Check if it os done using command&lt;br /&gt;
 chkconfig --list | grep &amp;lt;scriptname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xxx&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can choose to download the RHEL operating system directly from the Red Hat Web site and not receive a media kit from HP containing the software. This scenario occurs when the media option AJR is deselected from the order. (The media kit option is always selected by default. )&lt;br /&gt;
&lt;br /&gt;
It is necessary to register at the Red Hat Web site prior to download. Registration requires the activation code that each customer receives from HP when ordering either RHEL.&lt;br /&gt;
&lt;br /&gt;
You can download RHEL for each available platform as four CD ISO images or one DVD ISO image.&lt;br /&gt;
&lt;br /&gt;
Use the following procedure to download RHEL and create the installation media:&lt;br /&gt;
&lt;br /&gt;
   1.&lt;br /&gt;
&lt;br /&gt;
      Register and log in at the following Red Hat Web site:&lt;br /&gt;
&lt;br /&gt;
      www.redhat.com/rhn&lt;br /&gt;
   2.&lt;br /&gt;
&lt;br /&gt;
      Click on channels and then select Red Hat Enterprise Linux ES (v.4 for 64–bit Intel Itanium).&lt;br /&gt;
   3.&lt;br /&gt;
&lt;br /&gt;
      Select Downloads and then download the ISO images of install, compatibility and source disks&lt;br /&gt;
&lt;br /&gt;
      Files with ia64 in the name are for the Itanium platform.&lt;br /&gt;
   4.&lt;br /&gt;
&lt;br /&gt;
      Create the CDs or a DVD from the ISO images.&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	IMPORTANT: Create the CDs or DVD using the contents of the ISO images. Do not create the CDs or DVD by burning the .iso files themselves to CD or DVD. For example, if you are using K3b to burn a CD, click Tools&amp;gt;CD&amp;gt;Burn CD Image, select the .iso image, then click Burn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bootup scripts&#039;&#039;&#039; for example for level 5 execution (multiuser with X):&lt;br /&gt;
&lt;br /&gt;
 cp &amp;lt;script-file&amp;gt; /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/&amp;lt;script-file&amp;gt;&lt;br /&gt;
 ln -s /etc/init.d/&amp;lt;scriptfile&amp;gt; /etc/rc.d/rc5.d/S50&amp;lt;scriptfile&amp;gt;&lt;br /&gt;
 ln -s /etc/init.d/&amp;lt;scriptfile&amp;gt; /etc/rc.d/rc5.d/K50&amp;lt;scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changing hostname/IP address&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Changing hostname on RHEL&lt;br /&gt;
 1. Change the HOSTNAME line in /etc/sysconfig/network&lt;br /&gt;
 2. Change the hostname (FQDN and alias) in /etc/hosts&lt;br /&gt;
 3. Run &#039;/bin/hostname new_hostname&#039; for the hostname change to take effect immediately.&lt;br /&gt;
 4. Run &#039;/sbin/service syslog restart&#039; for syslog to log using the new hostname.&lt;br /&gt;
 A reboot is not required to change the system hostname.&lt;br /&gt;
&lt;br /&gt;
 IP address: You have to change the IP address entry in&lt;br /&gt;
 /etc/sysconfig/network-scripts/ifcfg-eth0.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Installation_Procedure&amp;diff=8764</id>
		<title>Linux Installation Procedure</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Installation_Procedure&amp;diff=8764"/>
		<updated>2026-07-28T17:31:22Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 (64 bit) - for machine NOT under puppet control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dell servers hardware trick(s) ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;!!! if BIOS date/time is incorrect, it may prevent redhat subscription and installation to work correctly, set it to correct value !!! (it was not confirmed, problem may be different and was fixed at the same time as time was correctly set) &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* if BIOS does not remember time setting after power unplugged, battery on motherboard may need to be replaced&lt;br /&gt;
&lt;br /&gt;
* if looks dead, remove the power cords, then held in the on button for 30 seconds; then plug it back in and it may boots up fine - known Dell feature&lt;br /&gt;
&lt;br /&gt;
== ARM (CentsOS7) ==&lt;br /&gt;
&lt;br /&gt;
See [[yum]] for specifics.&lt;br /&gt;
&lt;br /&gt;
 yum install xauth wget bzip2 xterm expat-devel libX11-devel libXpm-devel motif-devel mariadb-devel&lt;br /&gt;
&lt;br /&gt;
== RHEL9 (64 bit) - machine under puppet control ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: select installation type &#039;&#039;&#039;H&#039;&#039;&#039;, then type &#039;&#039;&#039;B&#039;&#039;&#039;.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: during custom disk partitioning, select &#039;Standard&#039; for every partition, if you want it to be standard, or &#039;Raid&#039; if applicable&lt;br /&gt;
&lt;br /&gt;
Root password will be set by puppet during installation, as well as most other needed settings.&lt;br /&gt;
&lt;br /&gt;
Install package(s) for DAQ servers (where coda_ebc is running):&lt;br /&gt;
 yum install patchelf&lt;br /&gt;
&lt;br /&gt;
Install useful packages:&lt;br /&gt;
 yum install ncdu mysql gfortran&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: graphic screen is disabled, run following command as root:&lt;br /&gt;
 systemctl set-default graphical.target&lt;br /&gt;
&lt;br /&gt;
== RHEL9 (64 bit) - for machine NOT under puppet control ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: select installation type &#039;&#039;&#039;D&#039;&#039;&#039; (not &#039;&#039;&#039;S&#039;&#039;&#039;, otherwise it will not be level 2 server)&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: during custom disk partitioning, select &#039;Standard&#039; for every partition, if you want it to be standard, or &#039;Raid&#039; if applicable&lt;br /&gt;
&lt;br /&gt;
When installation complete, ssh as authorized user and do following:&lt;br /&gt;
&lt;br /&gt;
 sudo yum install emacs&lt;br /&gt;
 cd /etc&lt;br /&gt;
 sudo chmod a+rw shadow&lt;br /&gt;
 sudo emacs shadow&lt;br /&gt;
&lt;br /&gt;
Copy to /etc/shadow root and other needed passwords from another clon machine. &lt;br /&gt;
&lt;br /&gt;
 sudo chmod a-rw shadow&lt;br /&gt;
&lt;br /&gt;
After that, type &#039;&#039;su&#039;&#039; to become superuser. All following settings can be done now without typing &#039;&#039;sudo&#039;&#039; every time. You still will not be able to ssh remotely as root - always ssh as authorized user and type &#039;&#039;su&#039;&#039; to become root.&lt;br /&gt;
&lt;br /&gt;
Update /etc/passwd and /etc/group using another clon machine as example.&lt;br /&gt;
&lt;br /&gt;
 yum install expat-devel libXaw-devel mysql-devel motif-devel ncurses-devel apr-devel net-snmp-utils&lt;br /&gt;
 yum install xorg-x11-utils # for xprop/xwininfo/etc creg stuff&lt;br /&gt;
 yum install s-nail # for /usr/bin/mail&lt;br /&gt;
 yum install ncdu gfortran&lt;br /&gt;
 yum install libconfig-devel # recent addition for CODA libraries&lt;br /&gt;
&lt;br /&gt;
To be able to ssh to old machines (like vme controllers under CentOS5), run following as root:&lt;br /&gt;
&lt;br /&gt;
 update-crypto-policies --set LEGACY&lt;br /&gt;
&lt;br /&gt;
and then probably reboot, not sure.&lt;br /&gt;
&lt;br /&gt;
Somebody mentioned also adding &#039;&#039;RequiredRSASize 1024&#039;&#039; to a config file in &#039;&#039;/etc/ssh/ssh_config.d/&#039;&#039;, but I did not do it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Note: this changes all daemons and system settings and is a bit overkill if you only need to adjust the settings for ssh and sshd.&lt;br /&gt;
&lt;br /&gt;
    Exclude (only) sshd from the system-wide cryptographic policy. You opt-out by editing /etc/sysconfig/sshd and uncommenting the line # CRYPTO_POLICY= , (if necessary you can then adjust adjust /etc/ssh/sshd_config and add legacy crypto settings) and restart the ssh daemon.&lt;br /&gt;
&lt;br /&gt;
For the ssh command line client on the RHEL 9 system: you&#039;re recommended to edit ˜/.ssh/config and override the modern/secure system wide ssh client defaults by adding a Host entry that adds support for suitable legacy encryption options for that particular host:&lt;br /&gt;
&lt;br /&gt;
#    ˜/.ssh/config&lt;br /&gt;
&lt;br /&gt;
Host rhel6.example.com&lt;br /&gt;
  KexAlgorithms +diffie-hellman-group14-sha1&lt;br /&gt;
  MACs +hmac-sha1&lt;br /&gt;
  HostKeyAlgorithms +ssh-rsa&lt;br /&gt;
  PubkeyAcceptedKeyTypes +ssh-rsa&lt;br /&gt;
  PubkeyAcceptedAlgorithms +ssh-rsa&lt;br /&gt;
&lt;br /&gt;
Prepare auto-mounting directories:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
 mv apps apps.orig&lt;br /&gt;
 mv home home.orig&lt;br /&gt;
 mv scratch scratch.orig&lt;br /&gt;
 mv work work.orig&lt;br /&gt;
 mkdir apps&lt;br /&gt;
 mkdir home&lt;br /&gt;
 mkdir scratch&lt;br /&gt;
 mkdir work&lt;br /&gt;
 mkdir logs&lt;br /&gt;
 cd /usr&lt;br /&gt;
 mv local local.orig&lt;br /&gt;
 mkdir local&lt;br /&gt;
 mkdir clas&lt;br /&gt;
 mkdir clas12&lt;br /&gt;
 mkdir downloads&lt;br /&gt;
 cd&lt;br /&gt;
&lt;br /&gt;
== RHEL8 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; to boot from USB stick, insert USB stick, turn machine ON holding F2, and in BIOS Boot Configuration, set Enable Security Boot to OFF, save and exit, holding F2. When in BIOS again, in Boot Configuration make &#039;&#039;UEFI PHY USB ...&#039;&#039; first in boot sequence, local hard drive second, disable all other boot options, save and exit. Do NOT hold F2, Linux installation from USB stick will start. &#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; when asked about D/S options (very first question in installation process), &#039;&#039;&#039;REMOVE USB STICK BEFORE ANSWERING QUESTION ABOUT DESKTOP/SERVER&#039;&#039;&#039;, otherwise it will be destroyed by following installation steps !!!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; to disable/enable puppet, do following as root: &lt;br /&gt;
 puppet agent --disable &amp;quot;temporary&amp;quot;&lt;br /&gt;
 puppet agent --enable&lt;br /&gt;
&lt;br /&gt;
 yum install emacs&lt;br /&gt;
 yum install xorg-x11-fonts-misc&lt;br /&gt;
&lt;br /&gt;
Move and create some directories in preparation for automounts:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
 mv apps apps.orig&lt;br /&gt;
 mv home home.orig&lt;br /&gt;
 mv scratch scratch.orig&lt;br /&gt;
 mkdir apps&lt;br /&gt;
 mkdir home&lt;br /&gt;
 mkdir scratch&lt;br /&gt;
 mkdir work&lt;br /&gt;
 mkdir logs&lt;br /&gt;
 cd /usr&lt;br /&gt;
 mv local local.orig&lt;br /&gt;
 mkdir local&lt;br /&gt;
 mkdir clas&lt;br /&gt;
 mkdir clas12&lt;br /&gt;
 mkdir downloads&lt;br /&gt;
 cd&lt;br /&gt;
&lt;br /&gt;
Add line &#039;&#039;&#039;+dir:/etc/auto.master.d&#039;&#039;&#039; to &#039;&#039;/etc/auto.master&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/auto.master.d/direct.autofs&#039;&#039; with the line &#039;&#039;&#039;/- /etc/auto.direct&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/auto.direct&#039;&#039; with the following contents:&lt;br /&gt;
&lt;br /&gt;
 # machine-dependent system directories&lt;br /&gt;
 /apps                 -rw,bg     clonfs1:/vol/apps/RHEL8_x86_64&lt;br /&gt;
 /usr/local            -rw,bg     clonfs1:/vol/local/RHEL8_x86_64&lt;br /&gt;
 # machine-independent system directories&lt;br /&gt;
 /home                 -rw,bg     clonfs1:/vol/home&lt;br /&gt;
 #/work                 -rw,bg     clonfs1-old:/vol/work&lt;br /&gt;
 /scratch              -rw,bg     clonfs1:/vol/scratch&lt;br /&gt;
 # machine-independent clas directories&lt;br /&gt;
 /usr/downloads        -rw,bg     clonfs1:/vol/downloads&lt;br /&gt;
 /usr/clas             -rw,bg     clonfs1:/vol/clas&lt;br /&gt;
 /usr/clas12           -rw,bg     clonfs1:/vol/clas12&lt;br /&gt;
 # Used for data storage before shipping to tape&lt;br /&gt;
 #/logs                 -rw,bg     clonfs1-old:/vol/logs&lt;br /&gt;
&lt;br /&gt;
Restart autofs:&lt;br /&gt;
&lt;br /&gt;
 service autofs reload&lt;br /&gt;
 service autofs restart&lt;br /&gt;
&lt;br /&gt;
Remove from the end of the &#039;&#039;/etc/passwd&#039;&#039; line &#039;&#039;&#039;+::::::&#039;&#039;&#039;, and add following:&lt;br /&gt;
&lt;br /&gt;
 hpsrun:x:8796:9998:hpsrun Account:/home/hpsrun:/bin/tcsh&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clasioc:x:6008:9998:CLAS IOCs:/home/clasioc:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:3888:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +sshd::::::&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
Update &#039;&#039;/etc/shadow&#039;&#039;, adding passwords for local accounts (copy it from another machine).&lt;br /&gt;
&lt;br /&gt;
Add following to &#039;&#039;/etc/group&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 clon:x:383:clascron&lt;br /&gt;
 onliners:x:9998:abbottd,avakian,baltzell,battagli,brooksw,bruhwel,boiarino,carman,chen,clasboot,clascron,clasrun,cole,cuevas,davidl,danagu,dugger,elton,epics,fklein,gilfoyle,giovanet,golovach,gurjyan,heddle,heyes,hovanes,jacobsg,jenkins,kliv,lcsmith,marki,mestayer,nerses,parkkj,pasyuk,primex,ripani,rossi,saw,staylor,sytnik,taiuti,taylorw,timmer,wooyoung&lt;br /&gt;
&lt;br /&gt;
== RHEL7 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
Installed using DVD provided by Computer Center, currently RHEL7.3. Requires MAC address to be registered with Computer Center (using jnet.jlab.org as &#039;boiarino&#039;) because it is network-based installation. On DELL servers, hold F2 after power on and go to &#039;Device Settings&#039; to see mac address. Remember machine memory size as well, will needed when create partitions, find it in &#039;System BIOS -&amp;gt; Memory Settings&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: all disks will be reformatted in a process, all information will be lost !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Please enter the hostname of this system: &amp;lt;hostname&amp;gt; &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What type of system are you building? (D)esktop: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Is this a CUE level 1 or CUE level 2 System build (1/2): 2 &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Please enter the System Admin&#039;s CUE username: boiarino &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do you want to use the default partitioning scheme (y/n)? n &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Are you sure you want to use your own partitioning scheme (y/n)? y &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose &#039;Standard Partition&#039; scheme and create following partitions: /boot - 1GB, swap - double memory size, / - the rest of space.&lt;br /&gt;
&lt;br /&gt;
Installation will proceed. When prompted, remove installation disk and reboot machine if not done automatically.&lt;br /&gt;
&lt;br /&gt;
After reboot patching process will be started and it will take a while, do not interrupt it, otherwise system will not be installed correctly.&lt;br /&gt;
&lt;br /&gt;
When machine reboots for the last time, ask Paul Letta to set usual hallb root password. From now on remote root access is possible. Alternatively, user &#039;&#039;boiarino&#039;&#039; can execute most of actions using &#039;&#039;sudo&#039;&#039;,&lt;br /&gt;
like &#039;&#039;sudo emacs&#039;&#039; for protected files. &#039;&#039;sudo reboot&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
Go to /boot/grub2 and modify file grub.cfg, Linux kernel boot options, adding options &#039;&#039;net.ifnames=0 biosdevname=0&#039;&#039;, so your boot string has following section:&lt;br /&gt;
&lt;br /&gt;
 ..... rhgb net.ifnames=0 biosdevname=0 quiet .....&lt;br /&gt;
&lt;br /&gt;
so whole line looks something like this:&lt;br /&gt;
&lt;br /&gt;
 linux16 /vmlinuz-3.10.0-327.18.2.el7.x86_64 root=UUID=b5d1b5ad-e3f6-4db4-8972-aa9c1a91d116 ro vconsole.keymap=us crashkernel=auto  vconsole.font=latarcyrheb-sun16 rhgb net.ifnames=0 biosdevname=0 quiet LANG=en_US.UTF-8&lt;br /&gt;
&lt;br /&gt;
Reboot machine, ethernet ports must be named &#039;&#039;eth0&#039;&#039;, &#039;&#039;eth1&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
To update manually, use commands &#039;&#039;yum list updates&#039;&#039; and &#039;&#039;yum update&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; add machine to the appropriate &#039;&#039;&#039;puppet&#039;&#039;&#039; group, it will do all following automatically (hopefully).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; on RHEL7.9, RPM EPEL REPO is not enabled by default, which prevents from installing nload, itcl, itk etc. To bring it back, it can be copied it from older machine, for example:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/yum.repos.d&lt;br /&gt;
 scp clondaq7:/etc/yum.repos.d/epel.repo .&lt;br /&gt;
 cd /etc/pki/rpm-gpg&lt;br /&gt;
 scp clondaq7:/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 .&lt;br /&gt;
&lt;br /&gt;
Alternatively, following can be used to add repo&#039;s:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --enable &amp;lt;repo_id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In particular, following have to be enabled to get nload, xpdf, python-alembic, tix, itcl, itk etc:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --enable JLab_EPEL_EPEL_7&lt;br /&gt;
 subscription-manager repos --enable rhel-7-workstation-optional-rpms&lt;br /&gt;
&lt;br /&gt;
Repo ID&#039;s can be obtained by:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --list&lt;br /&gt;
&lt;br /&gt;
Installed repo&#039;s can be seen by:&lt;br /&gt;
&lt;br /&gt;
 yum repolist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Yum updates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edit the &#039;&#039;/etc/yum.conf&#039;&#039; file and add the following line to force installation of the 32bit and 64bit libraries:&lt;br /&gt;
&lt;br /&gt;
 multilib_policy=all&lt;br /&gt;
&lt;br /&gt;
Install following packages:&lt;br /&gt;
&lt;br /&gt;
 yum install xterm mesa-dri-drivers telnet rsh readline-devel net-snmp-utils tigervnc-server tigervnc xpdf nload mariadb-devel libxml2-devel glibc-devel qt-devel python-alembic openssl-devel apr-devel&lt;br /&gt;
 yum install libconfig-devel # recent addition for CODA libraries&lt;br /&gt;
&lt;br /&gt;
Fonts for EPICS EDMs:&lt;br /&gt;
&lt;br /&gt;
 yum install xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-75dpi bitmap-miscfixed-fonts&lt;br /&gt;
 yum install bitmap-console-fonts bitmap-fixed-fonts bitmap-lucida-typewriter-fonts&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/100dpi /etc/X11/fontpath.d/xorg-x11-fonts-100dpi:pri=60&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/75dpi /etc/X11/fontpath.d/xorg-x11-fonts-75dpi:pri=50&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/misc /etc/X11/fontpath.d/xorg-x11-fonts-misc:pri=40&lt;br /&gt;
 ln -s  /usr/share/fonts/bitmap /etc/X11/fontpath.d/bitmap-fonts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do following to be able to compile and run 32-bit apps on 64-bit machine (for compatibility with 32bit applications):&lt;br /&gt;
&lt;br /&gt;
 yum install libXpm-devel libXaw-devel motif-devel glibc-devel ncurses-devel readline-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/passwd&#039;&#039; adding following:&lt;br /&gt;
&lt;br /&gt;
 hpsrun:x:8796:9998:hpsrun Account:/home/hpsrun:/bin/tcsh&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clasioc:x:6008:9998:CLAS IOCs:/home/clasioc:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:3888:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +sshd::::::&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: user-related lines must be removed, like&lt;br /&gt;
&lt;br /&gt;
 +boiarino::::::&lt;br /&gt;
&lt;br /&gt;
as well as&lt;br /&gt;
&lt;br /&gt;
 +::::::&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: assumed that following line is in already:&lt;br /&gt;
&lt;br /&gt;
 +@ccc::::::&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: if following line exist, it must be placed in the end, or removed:&lt;br /&gt;
&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/group&#039;&#039; adding following:&lt;br /&gt;
&lt;br /&gt;
 onliners::9998:heyes,hujl,rwm,timmer,wolin,taylorw,cuevas,abbottd,abulafia,anciant,anghi,aswin,auger,avakian,banta,barrow,battagli,bjlee,bogdan,brooksw,bruhwel,boiarino,buckle,burchesk,burin,bzh,cetina,chen,cole,cords,corvi,costy,davidl,costy,davidl,dcarter,dcurry,dennisl,deppman,dhlee,doughty,drago,dytman,dugger,dugger,elton,fedro,ficenec,fklein,france,freyberg,gholden,gilfoyle,golovach,gurjyan,haddock,heddle,jenkins,jhardie,jmorris,kellyk,klusman,kmkim,kossov,lcsmith,longhi,manak,marchand,marki,mastersj,mjohnson,mosbackr,mueller,muguira,murphyl,necaise,odonnell,opper,parkkj,pasyuk,phkim,piot,riccardi,richardt,ripani,rossi,saw,sergpozd,serov,sholt,staylor,taiuti,tang,tedeschi,vineyard,vlassov,vvsap,weygand,wooyoung,burchesk,clasrun,giovanet,clasboot,clascoda,clasroot,clasmail,clascron,trigger,epics,southern,carstens,ccutter,danagu,heyes,huertas,jacobsg,kliv,lachniet,mestayer,primex,hovanes,nerses,sytnik,baltzell,carman&lt;br /&gt;
 clon::383:clascoda,clascron,clasmail&lt;br /&gt;
 nagios::9997:nagios&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/shadow&#039;&#039; using an example from another RHEL7 clon machine (clonioc2 etc). Do &#039;&#039;chmod 600 shadow&#039;&#039; before editing and &#039;&#039;chmod 000 shadow&#039;&#039; after.&lt;br /&gt;
&lt;br /&gt;
Make sure file &#039;&#039;/etc/ssh/sshd_config&#039;&#039; has following line uncommented (must be pushed in by CC security scripts):&lt;br /&gt;
&lt;br /&gt;
 ##PermitUserEnvironment yes&lt;br /&gt;
&lt;br /&gt;
NOT NEEDED, DONE IN THE END OF FILE ALREADY !!! Uncomment following in file &#039;&#039;/etc/ssh/ssh_config&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 ##Host *&lt;br /&gt;
 ##ForwardX11 yes&lt;br /&gt;
&lt;br /&gt;
Add line &#039;export NO_AT_BRIDGE=1&#039; to the file &#039;/etc/environment&#039; to suppress annoying messages like &#039;** (emacs:38714): WARNING **: Couldn&#039;t register with accessibility bus: Did not receive a reply.&#039;&lt;br /&gt;
&lt;br /&gt;
If big (&amp;gt;2GB) partition to be formated, do following (for example /dev/sdb):&lt;br /&gt;
&lt;br /&gt;
 parted /dev/sdb&lt;br /&gt;
 (parted) print&lt;br /&gt;
 (parted) mklabel gpt&lt;br /&gt;
 (parted) print&lt;br /&gt;
 mkpart primary 0GB 25855.2GB&lt;br /&gt;
 (parted) print&lt;br /&gt;
 (parted) quit&lt;br /&gt;
&lt;br /&gt;
 mkfs.xfs /dev/sdb1&lt;br /&gt;
&lt;br /&gt;
then create /data and mount it using &#039;&#039;/etc/fstab&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 /dev/sdb1                                 /data                   xfs     defaults        1 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; sometimes machine can loose NIS connection, then ssh to it becomes intermittent; if it happens ssh as root (may have to try several times) and run command&lt;br /&gt;
&lt;br /&gt;
 ypwhich&lt;br /&gt;
&lt;br /&gt;
to shows NIS server. If it returns nothing check file &#039;&#039;/etc/resolv.conf&#039;&#039;, it must have following (as on July 2019):&lt;br /&gt;
&lt;br /&gt;
 search jlab.org acc.jlab.org&lt;br /&gt;
 nameserver 129.57.90.255&lt;br /&gt;
 nameserver 129.57.32.101&lt;br /&gt;
&lt;br /&gt;
If file is empty or does not contain right info, fix it. After that run command&lt;br /&gt;
&lt;br /&gt;
 ypbind&lt;br /&gt;
&lt;br /&gt;
It should fix a problem. Run &#039;&#039;ypwhich&#039;&#039; to make sure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Display Setting:&#039;&#039;&#039; if machine is multi-head, goto &#039;&#039;Applications-&amp;gt;System Tools-&amp;gt;Settings-&amp;gt;Devices-&amp;gt;Displays&#039;&#039; and arrange displays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Proceed to the [[Linux Customization on CLON Cluster]].&lt;br /&gt;
&lt;br /&gt;
== RHEL6 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (using jnet.jlab.org as &#039;boiarino&#039;) because it is network-based installation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: all disks will be reformatted in a process, all information will be lost !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ...[D]esktop: [use &#039;s&#039; for server, &#039;d&#039; for desktop] &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* root password: enter root password&lt;br /&gt;
&lt;br /&gt;
* admin user: boiarino&lt;br /&gt;
&lt;br /&gt;
Installation will proceed. When prompted, remove installation disk and reboot machine if not done automatically. After reboot patching process will be started and it will take a while, do not interrupt it, otherwise system will not be installed correctly.&lt;br /&gt;
&lt;br /&gt;
To make emacs work, install&lt;br /&gt;
&lt;br /&gt;
 yum install libotf&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/yum.conf file and add the following line to force installation of teh 32bit and 64bit libraries:&lt;br /&gt;
&lt;br /&gt;
 multilib_policy=all&lt;br /&gt;
&lt;br /&gt;
Install following packages:&lt;br /&gt;
&lt;br /&gt;
 yum install openmotif-devel xinetd mysql-devel cmake libXpm-devel net-snmp-utils&lt;br /&gt;
 yum install mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel (for OpenGL, needed by ROOT)&lt;br /&gt;
 yum install libXaw-devel (for xterm)&lt;br /&gt;
 yum install expat-devel libgcj-devel (for evio/et)&lt;br /&gt;
&lt;br /&gt;
 yum install compat-libtermcap (for xterm)&lt;br /&gt;
 ln -s /lib/libtermcap.so.2 /usr/lib/libtermcap.so&lt;br /&gt;
 ###ln -s /lib64/libtermcap.so.2 /usr/lib64/libtermcap.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install following fonts for EPICS EDMs:&lt;br /&gt;
&lt;br /&gt;
 yum install xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-75dpi bitmap-miscfixed-fonts&lt;br /&gt;
 yum install bitmap-console-fonts bitmap-fixed-fonts bitmap-lucida-typewriter-fonts&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/100dpi /etc/X11/fontpath.d/xorg-x11-fonts-100dpi:pri=60&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/75dpi /etc/X11/fontpath.d/xorg-x11-fonts-75dpi:pri=50&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/misc /etc/X11/fontpath.d/xorg-x11-fonts-misc:pri=40&lt;br /&gt;
 ln -s  /usr/share/fonts/bitmap /etc/X11/fontpath.d/bitmap-fonts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Useful &#039;&#039;yum&#039;&#039; commands:&lt;br /&gt;
&lt;br /&gt;
 yum whatprovides libstdc++.so.5 - show which package contains libstdc++.so.5&lt;br /&gt;
&lt;br /&gt;
== RHEL5 ==&lt;br /&gt;
&lt;br /&gt;
Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (email to helpdesk@jlab.org) because it is network-based installation.&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ...[D]esktop: Server (it is ignored, will do Desktop anyway ...)&lt;br /&gt;
&lt;br /&gt;
* root password: enter root password&lt;br /&gt;
&lt;br /&gt;
* system user: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* manually partition disk: 100MB /boot, 2048 etc MB swap, the rest /.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CFENGINE&#039;&#039;&#039;: there are procesess restoring some system config files (in particular &#039;&#039;/etc/ssh/sshd_config&#039;&#039;) in according to the Computer Center - maintained templete. To shut them down: (1) comment out &#039;&#039;cfengine&#039;&#039;-related stuff in root cronjobs; (2) do &#039;&#039;/etc/init.d/cfengine stop&#039;&#039;; (3) do &#039;&#039;chkconfig cfengine off&#039;&#039;. Ask CC (Sherman White, Paul Letta) to fix templete.&lt;br /&gt;
&lt;br /&gt;
Run &#039;&#039;/usr/bin/system-config-authentication&#039;&#039; and set NIS servers list as &#039;&#039;clon00,clon10,nis1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add following in the end of &#039;&#039;/etc/passwd&#039;&#039;:&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:6005:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +@ccc::::::&lt;br /&gt;
&lt;br /&gt;
Add following in the end of &#039;&#039;/etc/group&#039;&#039;:&lt;br /&gt;
 onliners::9998:heyes,hujl,rwm,timmer,wolin,taylorw,cuevas,abbottd,abulafia,anciant,anghi,aswin,auger,avakian,banta,barrow,battagli,bjlee,bogdan,brooksw,bruhwel,boiarino,buckle,burchesk,burin,bzh,cetina,chen,cole,cords,corvi,costy,davidl,costy,davidl,dcarter,dcurry,dennisl,deppman,dhlee,doughty,drago,dytman,dugger,dugger,elton,fedro,ficenec,fklein,france,freyberg,gholden,gilfoyle,golovach,gurjyan,haddock,heddle,jenkins,jhardie,jmorris,kellyk,klusman,kmkim,kossov,lcsmith,longhi,manak,marchand,marki,mastersj,mjohnson,mosbackr,mueller,muguira,murphyl,necaise,odonnell,opper,parkkj,pasyuk,phkim,piot,riccardi,richardt,ripani,rossi,saw,sergpozd,serov,sholt,staylor,taiuti,tang,tedeschi,vineyard,vlassov,vvsap,weygand,wooyoung,burchesk,clasrun,giovanet,clasboot,clascoda,clasroot,clasmail,clascron,trigger,epics,southern,carstens,ccutter,danagu,heyes,huertas,jacobsg,kliv,lachniet,mestayer,primex,hovanes,nerses,sytnik&lt;br /&gt;
 clon::383:clascoda,clascron,clasmail&lt;br /&gt;
 nagios::9997:nagios&lt;br /&gt;
&lt;br /&gt;
Create &#039;&#039;/etc/shadow&#039;&#039; files with entries for users clasrun, epics and nagios (copy from another machine).&lt;br /&gt;
&lt;br /&gt;
Install updates: normally all updates should be installed by now, it can be done manually by commands&lt;br /&gt;
 yum list updates&lt;br /&gt;
 yum update&lt;br /&gt;
&lt;br /&gt;
Configure [[SSH]].&lt;br /&gt;
&lt;br /&gt;
Install missing packages:&lt;br /&gt;
 yum install openmotif-devel xinetd mysql-devel cmake&lt;br /&gt;
&lt;br /&gt;
Some additional packages on request (for EPICS):&lt;br /&gt;
&lt;br /&gt;
 yum install mc lapack lapack-devel blas blas-devel giflib-devel&lt;br /&gt;
&lt;br /&gt;
Proceed to the [[Linux Customization on CLON Cluster]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PROBLEMS&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
1. /usr/lib/libg2c.so link is missing&lt;br /&gt;
&lt;br /&gt;
FIXED ??? 2. /usr/lib/libXm.so link is missing&lt;br /&gt;
&lt;br /&gt;
3. Created /etc/shadow file for clasrun, epics and nagios&lt;br /&gt;
&lt;br /&gt;
== RHEL4 ==&lt;br /&gt;
&lt;br /&gt;
Get RHEL4 CDs from Paul Letta.&lt;br /&gt;
&lt;br /&gt;
Connect terminal, keyboard and mouse.&lt;br /&gt;
&lt;br /&gt;
Boot from CD1. Follow instructions. When asked, choose following options:&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;Manually partition with Disk Druid&#039;, set /boot to 100MB, then / to 40GB, then swap to 8192MB or at least double memory size. The rest of disk can be set as /space.&lt;br /&gt;
&lt;br /&gt;
* Network: choose manually, type clonpc2.jlab.org; click &#039;EDIT&#039;, deactivate &#039;Configure using DHCP&#039;,&lt;br /&gt;
type IP address and netmask (255.255.255.0), click Ok.&lt;br /&gt;
Type Gateway (for example 129.57.167.99) and 3 DNS servers (129.57.167.5,129.57.167.14,129.57.32.100).&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;No firewall&#039;&lt;br /&gt;
&lt;br /&gt;
* Disable &#039;SELinux&#039;&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;Customize software packages to be installed&#039;, click &#039;Everything&#039;.&lt;br /&gt;
&lt;br /&gt;
You will be asked to install CD2, CD3 and CD4, then CD1 again.&lt;br /&gt;
Then you will be asked to click &#039;Reboot&#039;. First remove CD, then click &#039;Reboot&#039;.&lt;br /&gt;
You will be asked few more questions. When asked to activate service, choose&lt;br /&gt;
&#039;Tell me why I need to register ..&#039; and click &#039;Next&#039;. Choose &#039;I can not complete registration ..&#039;&lt;br /&gt;
and click &#039;Next&#039;. You will see &#039;System user&#039; screen, click &#039;Use network login..&#039;.&lt;br /&gt;
Choose &#039;Enable NIS support&#039; and click &#039;Configure NIS&#039;. Type NIS Domain: &#039;CCCHP&#039; and NIS Server: clon00.jlab.org.&lt;br /&gt;
Finish installation process.&lt;br /&gt;
&lt;br /&gt;
* fix files &#039;&#039;/etc/passwd&#039;&#039;, &#039;&#039;/etc/shadow&#039;&#039; and &#039;&#039;/etc/group&#039;&#039; adding clasrun etc (see examples on another machines).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if machine has multiple network ports, Linux may not assign them properly to specified IP names and addresses. If problem occures, open network GUI and delete all existing records. After that, click &#039;&#039;New&#039;&#039; and pick hadrware port you want to configure from the list of available ports (tricky part is to know which RJ-45 connector corresponds to which port ..). Configure and activate it, make sure it works. Repeat for other ports. Results will be stored in directory &#039;&#039;/etc/sysconfig/network-scripts&#039;&#039;, file names will be &#039;&#039;ifcfg-eth0&#039;&#039;, &#039;&#039;ifcfg-eth1&#039;&#039; etc. If modifying those files manually, restart network by &#039;&#039;/etc/init.d/network restart&#039;&#039;. Finally, set routing, for example for &#039;&#039;clonmon&#039;&#039; command &#039;&#039;route -n&#039;&#039; shows following:&lt;br /&gt;
 Kernel IP routing table&lt;br /&gt;
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
 129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1&lt;br /&gt;
 129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3&lt;br /&gt;
 129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937&lt;br /&gt;
 129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3&lt;br /&gt;
 0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3&lt;br /&gt;
Run following commands:&lt;br /&gt;
 /sbin/route add -net 129.57.160.0 netmask 255.255.255.0 gw 129.57.160.5 dev eth1&lt;br /&gt;
 /sbin/route add -net 129.57.68.0 netmask 255.255.255.0 gw 129.57.68.26 dev eth3&lt;br /&gt;
 /sbin/route add -net 129.57.69.0 netmask 255.255.255.0 gw 129.57.69.206 dev dev5937&lt;br /&gt;
 /sbin/route add -net 129.57.64.0 netmask 255.255.255.0 gw 129.57.64.57 dev eth0&lt;br /&gt;
Now &#039;&#039;route -n&#039;&#039; shows following:&lt;br /&gt;
 Kernel IP routing table&lt;br /&gt;
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
 129.57.160.0    129.57.160.5    255.255.255.0   UG    0      0        0 eth1&lt;br /&gt;
 129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1&lt;br /&gt;
 129.57.68.0     129.57.68.26    255.255.255.0   UG    0      0        0 eth3&lt;br /&gt;
 129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3&lt;br /&gt;
 129.57.69.0     129.57.69.206   255.255.255.0   UG    0      0        0 dev5937&lt;br /&gt;
 129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937&lt;br /&gt;
 129.57.64.0     129.57.64.57    255.255.255.0   UG    0      0        0 eth0&lt;br /&gt;
 129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3&lt;br /&gt;
 0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3&lt;br /&gt;
In that example automount will do configured using &#039;&#039;clonmon-daq1&#039;&#039; interface, because default &#039;&#039;clonmon&#039;&#039; interface is on external subnet. To make that routing table permanent (retore it after reboot) I tried to add four files with following contents to the &#039;&#039;/etc/sysconfig/network-scripts&#039;&#039; directory:&lt;br /&gt;
 route-eth1:&lt;br /&gt;
   GATEWAY0=129.57.160.5&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.160.0&lt;br /&gt;
 route-eth3:&lt;br /&gt;
   GATEWAY0=129.57.68.26&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.68.0&lt;br /&gt;
 route-dev5937:&lt;br /&gt;
   GATEWAY0=129.57.69.206&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.69.0&lt;br /&gt;
 route-eth0:&lt;br /&gt;
   GATEWAY0=129.57.64.57&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.64.0&lt;br /&gt;
It did not worked. Then I added four &#039;&#039;/sbin/route add ..&#039;&#039; lines to &#039;&#039;/etc/rc.local&#039;&#039; script, and it worked.&lt;br /&gt;
&lt;br /&gt;
From now on you can use remote &#039;ssh&#039; connection.&lt;br /&gt;
&lt;br /&gt;
* To configure your system to use the patch server, issue the following commands as root:&lt;br /&gt;
 # mount jlabsite:/site /mnt&lt;br /&gt;
 # /mnt/CC/linux/satellite-connect --patchall&lt;br /&gt;
The script will prompt you for an activation key, but if you don&#039;t know what this is, just hit ENTER and it will use a sensible default.  Depending on how many patches need to be applied to your system to bring it up to the current level, this script may take a very long time to run.  When it finishes, you should reboot your machine to make the new patches take effect.&lt;br /&gt;
&lt;br /&gt;
To install updates later run &#039;&#039;up2date -uf&#039;&#039; as &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Configure [[SSH]].&lt;br /&gt;
&lt;br /&gt;
* Proceed with [[Linux Customization on CLON Cluster]] if applicable.&lt;br /&gt;
&lt;br /&gt;
To boot Linux in single user mode (no graphics), add &#039;&#039;single&#039;&#039; to the end of boot line during boot process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;background info&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Add startup script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create script in &#039;&#039;/etc/init.d/&#039;&#039; directory (use existing scripts as example). Must have a line like&lt;br /&gt;
 # chkconfig:	- 91 09&lt;br /&gt;
which specifies start and stop order. Run commands&lt;br /&gt;
 chkconfig --add &amp;lt;scriptname&amp;gt;&lt;br /&gt;
 chkconfig --level 3 &amp;lt;scriptname&amp;gt; on&lt;br /&gt;
for every level you want that script to be executed (usualy 3 and/or 4 and/or 5). Check if it os done using command&lt;br /&gt;
 chkconfig --list | grep &amp;lt;scriptname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xxx&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can choose to download the RHEL operating system directly from the Red Hat Web site and not receive a media kit from HP containing the software. This scenario occurs when the media option AJR is deselected from the order. (The media kit option is always selected by default. )&lt;br /&gt;
&lt;br /&gt;
It is necessary to register at the Red Hat Web site prior to download. Registration requires the activation code that each customer receives from HP when ordering either RHEL.&lt;br /&gt;
&lt;br /&gt;
You can download RHEL for each available platform as four CD ISO images or one DVD ISO image.&lt;br /&gt;
&lt;br /&gt;
Use the following procedure to download RHEL and create the installation media:&lt;br /&gt;
&lt;br /&gt;
   1.&lt;br /&gt;
&lt;br /&gt;
      Register and log in at the following Red Hat Web site:&lt;br /&gt;
&lt;br /&gt;
      www.redhat.com/rhn&lt;br /&gt;
   2.&lt;br /&gt;
&lt;br /&gt;
      Click on channels and then select Red Hat Enterprise Linux ES (v.4 for 64–bit Intel Itanium).&lt;br /&gt;
   3.&lt;br /&gt;
&lt;br /&gt;
      Select Downloads and then download the ISO images of install, compatibility and source disks&lt;br /&gt;
&lt;br /&gt;
      Files with ia64 in the name are for the Itanium platform.&lt;br /&gt;
   4.&lt;br /&gt;
&lt;br /&gt;
      Create the CDs or a DVD from the ISO images.&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	IMPORTANT: Create the CDs or DVD using the contents of the ISO images. Do not create the CDs or DVD by burning the .iso files themselves to CD or DVD. For example, if you are using K3b to burn a CD, click Tools&amp;gt;CD&amp;gt;Burn CD Image, select the .iso image, then click Burn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bootup scripts&#039;&#039;&#039; for example for level 5 execution (multiuser with X):&lt;br /&gt;
&lt;br /&gt;
 cp &amp;lt;script-file&amp;gt; /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/&amp;lt;script-file&amp;gt;&lt;br /&gt;
 ln -s /etc/init.d/&amp;lt;scriptfile&amp;gt; /etc/rc.d/rc5.d/S50&amp;lt;scriptfile&amp;gt;&lt;br /&gt;
 ln -s /etc/init.d/&amp;lt;scriptfile&amp;gt; /etc/rc.d/rc5.d/K50&amp;lt;scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changing hostname/IP address&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Changing hostname on RHEL&lt;br /&gt;
 1. Change the HOSTNAME line in /etc/sysconfig/network&lt;br /&gt;
 2. Change the hostname (FQDN and alias) in /etc/hosts&lt;br /&gt;
 3. Run &#039;/bin/hostname new_hostname&#039; for the hostname change to take effect immediately.&lt;br /&gt;
 4. Run &#039;/sbin/service syslog restart&#039; for syslog to log using the new hostname.&lt;br /&gt;
 A reboot is not required to change the system hostname.&lt;br /&gt;
&lt;br /&gt;
 IP address: You have to change the IP address entry in&lt;br /&gt;
 /etc/sysconfig/network-scripts/ifcfg-eth0.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Installation_Procedure&amp;diff=8763</id>
		<title>Linux Installation Procedure</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Installation_Procedure&amp;diff=8763"/>
		<updated>2026-07-28T16:04:27Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 (64 bit) - for machine NOT under puppet control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dell servers hardware trick(s) ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;!!! if BIOS date/time is incorrect, it may prevent redhat subscription and installation to work correctly, set it to correct value !!! (it was not confirmed, problem may be different and was fixed at the same time as time was correctly set) &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* if BIOS does not remember time setting after power unplugged, battery on motherboard may need to be replaced&lt;br /&gt;
&lt;br /&gt;
* if looks dead, remove the power cords, then held in the on button for 30 seconds; then plug it back in and it may boots up fine - known Dell feature&lt;br /&gt;
&lt;br /&gt;
== ARM (CentsOS7) ==&lt;br /&gt;
&lt;br /&gt;
See [[yum]] for specifics.&lt;br /&gt;
&lt;br /&gt;
 yum install xauth wget bzip2 xterm expat-devel libX11-devel libXpm-devel motif-devel mariadb-devel&lt;br /&gt;
&lt;br /&gt;
== RHEL9 (64 bit) - machine under puppet control ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: select installation type &#039;&#039;&#039;H&#039;&#039;&#039;, then type &#039;&#039;&#039;B&#039;&#039;&#039;.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: during custom disk partitioning, select &#039;Standard&#039; for every partition, if you want it to be standard, or &#039;Raid&#039; if applicable&lt;br /&gt;
&lt;br /&gt;
Root password will be set by puppet during installation, as well as most other needed settings.&lt;br /&gt;
&lt;br /&gt;
Install package(s) for DAQ servers (where coda_ebc is running):&lt;br /&gt;
 yum install patchelf&lt;br /&gt;
&lt;br /&gt;
Install useful packages:&lt;br /&gt;
 yum install ncdu mysql gfortran&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: graphic screen is disabled, run following command as root:&lt;br /&gt;
 systemctl set-default graphical.target&lt;br /&gt;
&lt;br /&gt;
== RHEL9 (64 bit) - for machine NOT under puppet control ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: select installation type &#039;&#039;&#039;D&#039;&#039;&#039; (not &#039;&#039;&#039;S&#039;&#039;&#039;, otherwise it will not be level 2 server)&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: during custom disk partitioning, select &#039;Standard&#039; for every partition, if you want it to be standard, or &#039;Raid&#039; if applicable&lt;br /&gt;
&lt;br /&gt;
When installation complete, ssh as authorized user and do following:&lt;br /&gt;
&lt;br /&gt;
 sudo yum install emacs&lt;br /&gt;
 cd /etc&lt;br /&gt;
 sudo chmod a+rw shadow&lt;br /&gt;
 sudo emacs shadow&lt;br /&gt;
&lt;br /&gt;
Copy to /etc/shadow root and other needed passwords from another clon machine. &lt;br /&gt;
&lt;br /&gt;
 sudo chmod a-rw shadow&lt;br /&gt;
&lt;br /&gt;
After that, type &#039;&#039;su&#039;&#039; to become superuser. All following settings can be done now without typing &#039;&#039;sudo&#039;&#039; every time. You still will not be able to ssh remotely as root - always ssh as authorized user and type &#039;&#039;su&#039;&#039; to become root.&lt;br /&gt;
&lt;br /&gt;
Update /etc/passwd and /etc/group using another clon machine as example.&lt;br /&gt;
&lt;br /&gt;
 yum install expat-devel libXaw-devel mysql-devel motif-devel ncurses-devel apr-devel net-snmp-utils&lt;br /&gt;
 yum install xorg-x11-utils # for xprop/xwininfo/etc creg stuff&lt;br /&gt;
 yum install s-nail # for /usr/bin/mail&lt;br /&gt;
 yum install ncdu gfortran&lt;br /&gt;
 yum install patchelf&lt;br /&gt;
 yum install libconfig-devel # recent addition for CODA libraries&lt;br /&gt;
&lt;br /&gt;
To be able to ssh to old machines (like vme controllers under CentOS5), run following as root:&lt;br /&gt;
&lt;br /&gt;
 update-crypto-policies --set LEGACY&lt;br /&gt;
&lt;br /&gt;
and then probably reboot, not sure.&lt;br /&gt;
&lt;br /&gt;
Somebody mentioned also adding &#039;&#039;RequiredRSASize 1024&#039;&#039; to a config file in &#039;&#039;/etc/ssh/ssh_config.d/&#039;&#039;, but I did not do it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Note: this changes all daemons and system settings and is a bit overkill if you only need to adjust the settings for ssh and sshd.&lt;br /&gt;
&lt;br /&gt;
    Exclude (only) sshd from the system-wide cryptographic policy. You opt-out by editing /etc/sysconfig/sshd and uncommenting the line # CRYPTO_POLICY= , (if necessary you can then adjust adjust /etc/ssh/sshd_config and add legacy crypto settings) and restart the ssh daemon.&lt;br /&gt;
&lt;br /&gt;
For the ssh command line client on the RHEL 9 system: you&#039;re recommended to edit ˜/.ssh/config and override the modern/secure system wide ssh client defaults by adding a Host entry that adds support for suitable legacy encryption options for that particular host:&lt;br /&gt;
&lt;br /&gt;
#    ˜/.ssh/config&lt;br /&gt;
&lt;br /&gt;
Host rhel6.example.com&lt;br /&gt;
  KexAlgorithms +diffie-hellman-group14-sha1&lt;br /&gt;
  MACs +hmac-sha1&lt;br /&gt;
  HostKeyAlgorithms +ssh-rsa&lt;br /&gt;
  PubkeyAcceptedKeyTypes +ssh-rsa&lt;br /&gt;
  PubkeyAcceptedAlgorithms +ssh-rsa&lt;br /&gt;
&lt;br /&gt;
Prepare auto-mounting directories:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
 mv apps apps.orig&lt;br /&gt;
 mv home home.orig&lt;br /&gt;
 mv scratch scratch.orig&lt;br /&gt;
 mv work work.orig&lt;br /&gt;
 mkdir apps&lt;br /&gt;
 mkdir home&lt;br /&gt;
 mkdir scratch&lt;br /&gt;
 mkdir work&lt;br /&gt;
 mkdir logs&lt;br /&gt;
 cd /usr&lt;br /&gt;
 mv local local.orig&lt;br /&gt;
 mkdir local&lt;br /&gt;
 mkdir clas&lt;br /&gt;
 mkdir clas12&lt;br /&gt;
 mkdir downloads&lt;br /&gt;
 cd&lt;br /&gt;
&lt;br /&gt;
== RHEL8 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; to boot from USB stick, insert USB stick, turn machine ON holding F2, and in BIOS Boot Configuration, set Enable Security Boot to OFF, save and exit, holding F2. When in BIOS again, in Boot Configuration make &#039;&#039;UEFI PHY USB ...&#039;&#039; first in boot sequence, local hard drive second, disable all other boot options, save and exit. Do NOT hold F2, Linux installation from USB stick will start. &#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; when asked about D/S options (very first question in installation process), &#039;&#039;&#039;REMOVE USB STICK BEFORE ANSWERING QUESTION ABOUT DESKTOP/SERVER&#039;&#039;&#039;, otherwise it will be destroyed by following installation steps !!!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; to disable/enable puppet, do following as root: &lt;br /&gt;
 puppet agent --disable &amp;quot;temporary&amp;quot;&lt;br /&gt;
 puppet agent --enable&lt;br /&gt;
&lt;br /&gt;
 yum install emacs&lt;br /&gt;
 yum install xorg-x11-fonts-misc&lt;br /&gt;
&lt;br /&gt;
Move and create some directories in preparation for automounts:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
 mv apps apps.orig&lt;br /&gt;
 mv home home.orig&lt;br /&gt;
 mv scratch scratch.orig&lt;br /&gt;
 mkdir apps&lt;br /&gt;
 mkdir home&lt;br /&gt;
 mkdir scratch&lt;br /&gt;
 mkdir work&lt;br /&gt;
 mkdir logs&lt;br /&gt;
 cd /usr&lt;br /&gt;
 mv local local.orig&lt;br /&gt;
 mkdir local&lt;br /&gt;
 mkdir clas&lt;br /&gt;
 mkdir clas12&lt;br /&gt;
 mkdir downloads&lt;br /&gt;
 cd&lt;br /&gt;
&lt;br /&gt;
Add line &#039;&#039;&#039;+dir:/etc/auto.master.d&#039;&#039;&#039; to &#039;&#039;/etc/auto.master&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/auto.master.d/direct.autofs&#039;&#039; with the line &#039;&#039;&#039;/- /etc/auto.direct&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/auto.direct&#039;&#039; with the following contents:&lt;br /&gt;
&lt;br /&gt;
 # machine-dependent system directories&lt;br /&gt;
 /apps                 -rw,bg     clonfs1:/vol/apps/RHEL8_x86_64&lt;br /&gt;
 /usr/local            -rw,bg     clonfs1:/vol/local/RHEL8_x86_64&lt;br /&gt;
 # machine-independent system directories&lt;br /&gt;
 /home                 -rw,bg     clonfs1:/vol/home&lt;br /&gt;
 #/work                 -rw,bg     clonfs1-old:/vol/work&lt;br /&gt;
 /scratch              -rw,bg     clonfs1:/vol/scratch&lt;br /&gt;
 # machine-independent clas directories&lt;br /&gt;
 /usr/downloads        -rw,bg     clonfs1:/vol/downloads&lt;br /&gt;
 /usr/clas             -rw,bg     clonfs1:/vol/clas&lt;br /&gt;
 /usr/clas12           -rw,bg     clonfs1:/vol/clas12&lt;br /&gt;
 # Used for data storage before shipping to tape&lt;br /&gt;
 #/logs                 -rw,bg     clonfs1-old:/vol/logs&lt;br /&gt;
&lt;br /&gt;
Restart autofs:&lt;br /&gt;
&lt;br /&gt;
 service autofs reload&lt;br /&gt;
 service autofs restart&lt;br /&gt;
&lt;br /&gt;
Remove from the end of the &#039;&#039;/etc/passwd&#039;&#039; line &#039;&#039;&#039;+::::::&#039;&#039;&#039;, and add following:&lt;br /&gt;
&lt;br /&gt;
 hpsrun:x:8796:9998:hpsrun Account:/home/hpsrun:/bin/tcsh&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clasioc:x:6008:9998:CLAS IOCs:/home/clasioc:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:3888:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +sshd::::::&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
Update &#039;&#039;/etc/shadow&#039;&#039;, adding passwords for local accounts (copy it from another machine).&lt;br /&gt;
&lt;br /&gt;
Add following to &#039;&#039;/etc/group&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 clon:x:383:clascron&lt;br /&gt;
 onliners:x:9998:abbottd,avakian,baltzell,battagli,brooksw,bruhwel,boiarino,carman,chen,clasboot,clascron,clasrun,cole,cuevas,davidl,danagu,dugger,elton,epics,fklein,gilfoyle,giovanet,golovach,gurjyan,heddle,heyes,hovanes,jacobsg,jenkins,kliv,lcsmith,marki,mestayer,nerses,parkkj,pasyuk,primex,ripani,rossi,saw,staylor,sytnik,taiuti,taylorw,timmer,wooyoung&lt;br /&gt;
&lt;br /&gt;
== RHEL7 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
Installed using DVD provided by Computer Center, currently RHEL7.3. Requires MAC address to be registered with Computer Center (using jnet.jlab.org as &#039;boiarino&#039;) because it is network-based installation. On DELL servers, hold F2 after power on and go to &#039;Device Settings&#039; to see mac address. Remember machine memory size as well, will needed when create partitions, find it in &#039;System BIOS -&amp;gt; Memory Settings&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: all disks will be reformatted in a process, all information will be lost !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Please enter the hostname of this system: &amp;lt;hostname&amp;gt; &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What type of system are you building? (D)esktop: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Is this a CUE level 1 or CUE level 2 System build (1/2): 2 &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Please enter the System Admin&#039;s CUE username: boiarino &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do you want to use the default partitioning scheme (y/n)? n &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Are you sure you want to use your own partitioning scheme (y/n)? y &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose &#039;Standard Partition&#039; scheme and create following partitions: /boot - 1GB, swap - double memory size, / - the rest of space.&lt;br /&gt;
&lt;br /&gt;
Installation will proceed. When prompted, remove installation disk and reboot machine if not done automatically.&lt;br /&gt;
&lt;br /&gt;
After reboot patching process will be started and it will take a while, do not interrupt it, otherwise system will not be installed correctly.&lt;br /&gt;
&lt;br /&gt;
When machine reboots for the last time, ask Paul Letta to set usual hallb root password. From now on remote root access is possible. Alternatively, user &#039;&#039;boiarino&#039;&#039; can execute most of actions using &#039;&#039;sudo&#039;&#039;,&lt;br /&gt;
like &#039;&#039;sudo emacs&#039;&#039; for protected files. &#039;&#039;sudo reboot&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
Go to /boot/grub2 and modify file grub.cfg, Linux kernel boot options, adding options &#039;&#039;net.ifnames=0 biosdevname=0&#039;&#039;, so your boot string has following section:&lt;br /&gt;
&lt;br /&gt;
 ..... rhgb net.ifnames=0 biosdevname=0 quiet .....&lt;br /&gt;
&lt;br /&gt;
so whole line looks something like this:&lt;br /&gt;
&lt;br /&gt;
 linux16 /vmlinuz-3.10.0-327.18.2.el7.x86_64 root=UUID=b5d1b5ad-e3f6-4db4-8972-aa9c1a91d116 ro vconsole.keymap=us crashkernel=auto  vconsole.font=latarcyrheb-sun16 rhgb net.ifnames=0 biosdevname=0 quiet LANG=en_US.UTF-8&lt;br /&gt;
&lt;br /&gt;
Reboot machine, ethernet ports must be named &#039;&#039;eth0&#039;&#039;, &#039;&#039;eth1&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
To update manually, use commands &#039;&#039;yum list updates&#039;&#039; and &#039;&#039;yum update&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; add machine to the appropriate &#039;&#039;&#039;puppet&#039;&#039;&#039; group, it will do all following automatically (hopefully).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; on RHEL7.9, RPM EPEL REPO is not enabled by default, which prevents from installing nload, itcl, itk etc. To bring it back, it can be copied it from older machine, for example:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/yum.repos.d&lt;br /&gt;
 scp clondaq7:/etc/yum.repos.d/epel.repo .&lt;br /&gt;
 cd /etc/pki/rpm-gpg&lt;br /&gt;
 scp clondaq7:/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 .&lt;br /&gt;
&lt;br /&gt;
Alternatively, following can be used to add repo&#039;s:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --enable &amp;lt;repo_id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In particular, following have to be enabled to get nload, xpdf, python-alembic, tix, itcl, itk etc:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --enable JLab_EPEL_EPEL_7&lt;br /&gt;
 subscription-manager repos --enable rhel-7-workstation-optional-rpms&lt;br /&gt;
&lt;br /&gt;
Repo ID&#039;s can be obtained by:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --list&lt;br /&gt;
&lt;br /&gt;
Installed repo&#039;s can be seen by:&lt;br /&gt;
&lt;br /&gt;
 yum repolist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Yum updates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edit the &#039;&#039;/etc/yum.conf&#039;&#039; file and add the following line to force installation of the 32bit and 64bit libraries:&lt;br /&gt;
&lt;br /&gt;
 multilib_policy=all&lt;br /&gt;
&lt;br /&gt;
Install following packages:&lt;br /&gt;
&lt;br /&gt;
 yum install xterm mesa-dri-drivers telnet rsh readline-devel net-snmp-utils tigervnc-server tigervnc xpdf nload mariadb-devel libxml2-devel glibc-devel qt-devel python-alembic openssl-devel apr-devel&lt;br /&gt;
 yum install libconfig-devel # recent addition for CODA libraries&lt;br /&gt;
&lt;br /&gt;
Fonts for EPICS EDMs:&lt;br /&gt;
&lt;br /&gt;
 yum install xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-75dpi bitmap-miscfixed-fonts&lt;br /&gt;
 yum install bitmap-console-fonts bitmap-fixed-fonts bitmap-lucida-typewriter-fonts&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/100dpi /etc/X11/fontpath.d/xorg-x11-fonts-100dpi:pri=60&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/75dpi /etc/X11/fontpath.d/xorg-x11-fonts-75dpi:pri=50&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/misc /etc/X11/fontpath.d/xorg-x11-fonts-misc:pri=40&lt;br /&gt;
 ln -s  /usr/share/fonts/bitmap /etc/X11/fontpath.d/bitmap-fonts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do following to be able to compile and run 32-bit apps on 64-bit machine (for compatibility with 32bit applications):&lt;br /&gt;
&lt;br /&gt;
 yum install libXpm-devel libXaw-devel motif-devel glibc-devel ncurses-devel readline-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/passwd&#039;&#039; adding following:&lt;br /&gt;
&lt;br /&gt;
 hpsrun:x:8796:9998:hpsrun Account:/home/hpsrun:/bin/tcsh&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clasioc:x:6008:9998:CLAS IOCs:/home/clasioc:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:3888:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +sshd::::::&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: user-related lines must be removed, like&lt;br /&gt;
&lt;br /&gt;
 +boiarino::::::&lt;br /&gt;
&lt;br /&gt;
as well as&lt;br /&gt;
&lt;br /&gt;
 +::::::&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: assumed that following line is in already:&lt;br /&gt;
&lt;br /&gt;
 +@ccc::::::&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: if following line exist, it must be placed in the end, or removed:&lt;br /&gt;
&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/group&#039;&#039; adding following:&lt;br /&gt;
&lt;br /&gt;
 onliners::9998:heyes,hujl,rwm,timmer,wolin,taylorw,cuevas,abbottd,abulafia,anciant,anghi,aswin,auger,avakian,banta,barrow,battagli,bjlee,bogdan,brooksw,bruhwel,boiarino,buckle,burchesk,burin,bzh,cetina,chen,cole,cords,corvi,costy,davidl,costy,davidl,dcarter,dcurry,dennisl,deppman,dhlee,doughty,drago,dytman,dugger,dugger,elton,fedro,ficenec,fklein,france,freyberg,gholden,gilfoyle,golovach,gurjyan,haddock,heddle,jenkins,jhardie,jmorris,kellyk,klusman,kmkim,kossov,lcsmith,longhi,manak,marchand,marki,mastersj,mjohnson,mosbackr,mueller,muguira,murphyl,necaise,odonnell,opper,parkkj,pasyuk,phkim,piot,riccardi,richardt,ripani,rossi,saw,sergpozd,serov,sholt,staylor,taiuti,tang,tedeschi,vineyard,vlassov,vvsap,weygand,wooyoung,burchesk,clasrun,giovanet,clasboot,clascoda,clasroot,clasmail,clascron,trigger,epics,southern,carstens,ccutter,danagu,heyes,huertas,jacobsg,kliv,lachniet,mestayer,primex,hovanes,nerses,sytnik,baltzell,carman&lt;br /&gt;
 clon::383:clascoda,clascron,clasmail&lt;br /&gt;
 nagios::9997:nagios&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/shadow&#039;&#039; using an example from another RHEL7 clon machine (clonioc2 etc). Do &#039;&#039;chmod 600 shadow&#039;&#039; before editing and &#039;&#039;chmod 000 shadow&#039;&#039; after.&lt;br /&gt;
&lt;br /&gt;
Make sure file &#039;&#039;/etc/ssh/sshd_config&#039;&#039; has following line uncommented (must be pushed in by CC security scripts):&lt;br /&gt;
&lt;br /&gt;
 ##PermitUserEnvironment yes&lt;br /&gt;
&lt;br /&gt;
NOT NEEDED, DONE IN THE END OF FILE ALREADY !!! Uncomment following in file &#039;&#039;/etc/ssh/ssh_config&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 ##Host *&lt;br /&gt;
 ##ForwardX11 yes&lt;br /&gt;
&lt;br /&gt;
Add line &#039;export NO_AT_BRIDGE=1&#039; to the file &#039;/etc/environment&#039; to suppress annoying messages like &#039;** (emacs:38714): WARNING **: Couldn&#039;t register with accessibility bus: Did not receive a reply.&#039;&lt;br /&gt;
&lt;br /&gt;
If big (&amp;gt;2GB) partition to be formated, do following (for example /dev/sdb):&lt;br /&gt;
&lt;br /&gt;
 parted /dev/sdb&lt;br /&gt;
 (parted) print&lt;br /&gt;
 (parted) mklabel gpt&lt;br /&gt;
 (parted) print&lt;br /&gt;
 mkpart primary 0GB 25855.2GB&lt;br /&gt;
 (parted) print&lt;br /&gt;
 (parted) quit&lt;br /&gt;
&lt;br /&gt;
 mkfs.xfs /dev/sdb1&lt;br /&gt;
&lt;br /&gt;
then create /data and mount it using &#039;&#039;/etc/fstab&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 /dev/sdb1                                 /data                   xfs     defaults        1 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; sometimes machine can loose NIS connection, then ssh to it becomes intermittent; if it happens ssh as root (may have to try several times) and run command&lt;br /&gt;
&lt;br /&gt;
 ypwhich&lt;br /&gt;
&lt;br /&gt;
to shows NIS server. If it returns nothing check file &#039;&#039;/etc/resolv.conf&#039;&#039;, it must have following (as on July 2019):&lt;br /&gt;
&lt;br /&gt;
 search jlab.org acc.jlab.org&lt;br /&gt;
 nameserver 129.57.90.255&lt;br /&gt;
 nameserver 129.57.32.101&lt;br /&gt;
&lt;br /&gt;
If file is empty or does not contain right info, fix it. After that run command&lt;br /&gt;
&lt;br /&gt;
 ypbind&lt;br /&gt;
&lt;br /&gt;
It should fix a problem. Run &#039;&#039;ypwhich&#039;&#039; to make sure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Display Setting:&#039;&#039;&#039; if machine is multi-head, goto &#039;&#039;Applications-&amp;gt;System Tools-&amp;gt;Settings-&amp;gt;Devices-&amp;gt;Displays&#039;&#039; and arrange displays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Proceed to the [[Linux Customization on CLON Cluster]].&lt;br /&gt;
&lt;br /&gt;
== RHEL6 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (using jnet.jlab.org as &#039;boiarino&#039;) because it is network-based installation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: all disks will be reformatted in a process, all information will be lost !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ...[D]esktop: [use &#039;s&#039; for server, &#039;d&#039; for desktop] &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* root password: enter root password&lt;br /&gt;
&lt;br /&gt;
* admin user: boiarino&lt;br /&gt;
&lt;br /&gt;
Installation will proceed. When prompted, remove installation disk and reboot machine if not done automatically. After reboot patching process will be started and it will take a while, do not interrupt it, otherwise system will not be installed correctly.&lt;br /&gt;
&lt;br /&gt;
To make emacs work, install&lt;br /&gt;
&lt;br /&gt;
 yum install libotf&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/yum.conf file and add the following line to force installation of teh 32bit and 64bit libraries:&lt;br /&gt;
&lt;br /&gt;
 multilib_policy=all&lt;br /&gt;
&lt;br /&gt;
Install following packages:&lt;br /&gt;
&lt;br /&gt;
 yum install openmotif-devel xinetd mysql-devel cmake libXpm-devel net-snmp-utils&lt;br /&gt;
 yum install mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel (for OpenGL, needed by ROOT)&lt;br /&gt;
 yum install libXaw-devel (for xterm)&lt;br /&gt;
 yum install expat-devel libgcj-devel (for evio/et)&lt;br /&gt;
&lt;br /&gt;
 yum install compat-libtermcap (for xterm)&lt;br /&gt;
 ln -s /lib/libtermcap.so.2 /usr/lib/libtermcap.so&lt;br /&gt;
 ###ln -s /lib64/libtermcap.so.2 /usr/lib64/libtermcap.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install following fonts for EPICS EDMs:&lt;br /&gt;
&lt;br /&gt;
 yum install xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-75dpi bitmap-miscfixed-fonts&lt;br /&gt;
 yum install bitmap-console-fonts bitmap-fixed-fonts bitmap-lucida-typewriter-fonts&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/100dpi /etc/X11/fontpath.d/xorg-x11-fonts-100dpi:pri=60&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/75dpi /etc/X11/fontpath.d/xorg-x11-fonts-75dpi:pri=50&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/misc /etc/X11/fontpath.d/xorg-x11-fonts-misc:pri=40&lt;br /&gt;
 ln -s  /usr/share/fonts/bitmap /etc/X11/fontpath.d/bitmap-fonts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Useful &#039;&#039;yum&#039;&#039; commands:&lt;br /&gt;
&lt;br /&gt;
 yum whatprovides libstdc++.so.5 - show which package contains libstdc++.so.5&lt;br /&gt;
&lt;br /&gt;
== RHEL5 ==&lt;br /&gt;
&lt;br /&gt;
Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (email to helpdesk@jlab.org) because it is network-based installation.&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ...[D]esktop: Server (it is ignored, will do Desktop anyway ...)&lt;br /&gt;
&lt;br /&gt;
* root password: enter root password&lt;br /&gt;
&lt;br /&gt;
* system user: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* manually partition disk: 100MB /boot, 2048 etc MB swap, the rest /.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CFENGINE&#039;&#039;&#039;: there are procesess restoring some system config files (in particular &#039;&#039;/etc/ssh/sshd_config&#039;&#039;) in according to the Computer Center - maintained templete. To shut them down: (1) comment out &#039;&#039;cfengine&#039;&#039;-related stuff in root cronjobs; (2) do &#039;&#039;/etc/init.d/cfengine stop&#039;&#039;; (3) do &#039;&#039;chkconfig cfengine off&#039;&#039;. Ask CC (Sherman White, Paul Letta) to fix templete.&lt;br /&gt;
&lt;br /&gt;
Run &#039;&#039;/usr/bin/system-config-authentication&#039;&#039; and set NIS servers list as &#039;&#039;clon00,clon10,nis1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add following in the end of &#039;&#039;/etc/passwd&#039;&#039;:&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:6005:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +@ccc::::::&lt;br /&gt;
&lt;br /&gt;
Add following in the end of &#039;&#039;/etc/group&#039;&#039;:&lt;br /&gt;
 onliners::9998:heyes,hujl,rwm,timmer,wolin,taylorw,cuevas,abbottd,abulafia,anciant,anghi,aswin,auger,avakian,banta,barrow,battagli,bjlee,bogdan,brooksw,bruhwel,boiarino,buckle,burchesk,burin,bzh,cetina,chen,cole,cords,corvi,costy,davidl,costy,davidl,dcarter,dcurry,dennisl,deppman,dhlee,doughty,drago,dytman,dugger,dugger,elton,fedro,ficenec,fklein,france,freyberg,gholden,gilfoyle,golovach,gurjyan,haddock,heddle,jenkins,jhardie,jmorris,kellyk,klusman,kmkim,kossov,lcsmith,longhi,manak,marchand,marki,mastersj,mjohnson,mosbackr,mueller,muguira,murphyl,necaise,odonnell,opper,parkkj,pasyuk,phkim,piot,riccardi,richardt,ripani,rossi,saw,sergpozd,serov,sholt,staylor,taiuti,tang,tedeschi,vineyard,vlassov,vvsap,weygand,wooyoung,burchesk,clasrun,giovanet,clasboot,clascoda,clasroot,clasmail,clascron,trigger,epics,southern,carstens,ccutter,danagu,heyes,huertas,jacobsg,kliv,lachniet,mestayer,primex,hovanes,nerses,sytnik&lt;br /&gt;
 clon::383:clascoda,clascron,clasmail&lt;br /&gt;
 nagios::9997:nagios&lt;br /&gt;
&lt;br /&gt;
Create &#039;&#039;/etc/shadow&#039;&#039; files with entries for users clasrun, epics and nagios (copy from another machine).&lt;br /&gt;
&lt;br /&gt;
Install updates: normally all updates should be installed by now, it can be done manually by commands&lt;br /&gt;
 yum list updates&lt;br /&gt;
 yum update&lt;br /&gt;
&lt;br /&gt;
Configure [[SSH]].&lt;br /&gt;
&lt;br /&gt;
Install missing packages:&lt;br /&gt;
 yum install openmotif-devel xinetd mysql-devel cmake&lt;br /&gt;
&lt;br /&gt;
Some additional packages on request (for EPICS):&lt;br /&gt;
&lt;br /&gt;
 yum install mc lapack lapack-devel blas blas-devel giflib-devel&lt;br /&gt;
&lt;br /&gt;
Proceed to the [[Linux Customization on CLON Cluster]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PROBLEMS&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
1. /usr/lib/libg2c.so link is missing&lt;br /&gt;
&lt;br /&gt;
FIXED ??? 2. /usr/lib/libXm.so link is missing&lt;br /&gt;
&lt;br /&gt;
3. Created /etc/shadow file for clasrun, epics and nagios&lt;br /&gt;
&lt;br /&gt;
== RHEL4 ==&lt;br /&gt;
&lt;br /&gt;
Get RHEL4 CDs from Paul Letta.&lt;br /&gt;
&lt;br /&gt;
Connect terminal, keyboard and mouse.&lt;br /&gt;
&lt;br /&gt;
Boot from CD1. Follow instructions. When asked, choose following options:&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;Manually partition with Disk Druid&#039;, set /boot to 100MB, then / to 40GB, then swap to 8192MB or at least double memory size. The rest of disk can be set as /space.&lt;br /&gt;
&lt;br /&gt;
* Network: choose manually, type clonpc2.jlab.org; click &#039;EDIT&#039;, deactivate &#039;Configure using DHCP&#039;,&lt;br /&gt;
type IP address and netmask (255.255.255.0), click Ok.&lt;br /&gt;
Type Gateway (for example 129.57.167.99) and 3 DNS servers (129.57.167.5,129.57.167.14,129.57.32.100).&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;No firewall&#039;&lt;br /&gt;
&lt;br /&gt;
* Disable &#039;SELinux&#039;&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;Customize software packages to be installed&#039;, click &#039;Everything&#039;.&lt;br /&gt;
&lt;br /&gt;
You will be asked to install CD2, CD3 and CD4, then CD1 again.&lt;br /&gt;
Then you will be asked to click &#039;Reboot&#039;. First remove CD, then click &#039;Reboot&#039;.&lt;br /&gt;
You will be asked few more questions. When asked to activate service, choose&lt;br /&gt;
&#039;Tell me why I need to register ..&#039; and click &#039;Next&#039;. Choose &#039;I can not complete registration ..&#039;&lt;br /&gt;
and click &#039;Next&#039;. You will see &#039;System user&#039; screen, click &#039;Use network login..&#039;.&lt;br /&gt;
Choose &#039;Enable NIS support&#039; and click &#039;Configure NIS&#039;. Type NIS Domain: &#039;CCCHP&#039; and NIS Server: clon00.jlab.org.&lt;br /&gt;
Finish installation process.&lt;br /&gt;
&lt;br /&gt;
* fix files &#039;&#039;/etc/passwd&#039;&#039;, &#039;&#039;/etc/shadow&#039;&#039; and &#039;&#039;/etc/group&#039;&#039; adding clasrun etc (see examples on another machines).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if machine has multiple network ports, Linux may not assign them properly to specified IP names and addresses. If problem occures, open network GUI and delete all existing records. After that, click &#039;&#039;New&#039;&#039; and pick hadrware port you want to configure from the list of available ports (tricky part is to know which RJ-45 connector corresponds to which port ..). Configure and activate it, make sure it works. Repeat for other ports. Results will be stored in directory &#039;&#039;/etc/sysconfig/network-scripts&#039;&#039;, file names will be &#039;&#039;ifcfg-eth0&#039;&#039;, &#039;&#039;ifcfg-eth1&#039;&#039; etc. If modifying those files manually, restart network by &#039;&#039;/etc/init.d/network restart&#039;&#039;. Finally, set routing, for example for &#039;&#039;clonmon&#039;&#039; command &#039;&#039;route -n&#039;&#039; shows following:&lt;br /&gt;
 Kernel IP routing table&lt;br /&gt;
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
 129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1&lt;br /&gt;
 129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3&lt;br /&gt;
 129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937&lt;br /&gt;
 129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3&lt;br /&gt;
 0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3&lt;br /&gt;
Run following commands:&lt;br /&gt;
 /sbin/route add -net 129.57.160.0 netmask 255.255.255.0 gw 129.57.160.5 dev eth1&lt;br /&gt;
 /sbin/route add -net 129.57.68.0 netmask 255.255.255.0 gw 129.57.68.26 dev eth3&lt;br /&gt;
 /sbin/route add -net 129.57.69.0 netmask 255.255.255.0 gw 129.57.69.206 dev dev5937&lt;br /&gt;
 /sbin/route add -net 129.57.64.0 netmask 255.255.255.0 gw 129.57.64.57 dev eth0&lt;br /&gt;
Now &#039;&#039;route -n&#039;&#039; shows following:&lt;br /&gt;
 Kernel IP routing table&lt;br /&gt;
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
 129.57.160.0    129.57.160.5    255.255.255.0   UG    0      0        0 eth1&lt;br /&gt;
 129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1&lt;br /&gt;
 129.57.68.0     129.57.68.26    255.255.255.0   UG    0      0        0 eth3&lt;br /&gt;
 129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3&lt;br /&gt;
 129.57.69.0     129.57.69.206   255.255.255.0   UG    0      0        0 dev5937&lt;br /&gt;
 129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937&lt;br /&gt;
 129.57.64.0     129.57.64.57    255.255.255.0   UG    0      0        0 eth0&lt;br /&gt;
 129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3&lt;br /&gt;
 0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3&lt;br /&gt;
In that example automount will do configured using &#039;&#039;clonmon-daq1&#039;&#039; interface, because default &#039;&#039;clonmon&#039;&#039; interface is on external subnet. To make that routing table permanent (retore it after reboot) I tried to add four files with following contents to the &#039;&#039;/etc/sysconfig/network-scripts&#039;&#039; directory:&lt;br /&gt;
 route-eth1:&lt;br /&gt;
   GATEWAY0=129.57.160.5&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.160.0&lt;br /&gt;
 route-eth3:&lt;br /&gt;
   GATEWAY0=129.57.68.26&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.68.0&lt;br /&gt;
 route-dev5937:&lt;br /&gt;
   GATEWAY0=129.57.69.206&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.69.0&lt;br /&gt;
 route-eth0:&lt;br /&gt;
   GATEWAY0=129.57.64.57&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.64.0&lt;br /&gt;
It did not worked. Then I added four &#039;&#039;/sbin/route add ..&#039;&#039; lines to &#039;&#039;/etc/rc.local&#039;&#039; script, and it worked.&lt;br /&gt;
&lt;br /&gt;
From now on you can use remote &#039;ssh&#039; connection.&lt;br /&gt;
&lt;br /&gt;
* To configure your system to use the patch server, issue the following commands as root:&lt;br /&gt;
 # mount jlabsite:/site /mnt&lt;br /&gt;
 # /mnt/CC/linux/satellite-connect --patchall&lt;br /&gt;
The script will prompt you for an activation key, but if you don&#039;t know what this is, just hit ENTER and it will use a sensible default.  Depending on how many patches need to be applied to your system to bring it up to the current level, this script may take a very long time to run.  When it finishes, you should reboot your machine to make the new patches take effect.&lt;br /&gt;
&lt;br /&gt;
To install updates later run &#039;&#039;up2date -uf&#039;&#039; as &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Configure [[SSH]].&lt;br /&gt;
&lt;br /&gt;
* Proceed with [[Linux Customization on CLON Cluster]] if applicable.&lt;br /&gt;
&lt;br /&gt;
To boot Linux in single user mode (no graphics), add &#039;&#039;single&#039;&#039; to the end of boot line during boot process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;background info&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Add startup script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create script in &#039;&#039;/etc/init.d/&#039;&#039; directory (use existing scripts as example). Must have a line like&lt;br /&gt;
 # chkconfig:	- 91 09&lt;br /&gt;
which specifies start and stop order. Run commands&lt;br /&gt;
 chkconfig --add &amp;lt;scriptname&amp;gt;&lt;br /&gt;
 chkconfig --level 3 &amp;lt;scriptname&amp;gt; on&lt;br /&gt;
for every level you want that script to be executed (usualy 3 and/or 4 and/or 5). Check if it os done using command&lt;br /&gt;
 chkconfig --list | grep &amp;lt;scriptname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xxx&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can choose to download the RHEL operating system directly from the Red Hat Web site and not receive a media kit from HP containing the software. This scenario occurs when the media option AJR is deselected from the order. (The media kit option is always selected by default. )&lt;br /&gt;
&lt;br /&gt;
It is necessary to register at the Red Hat Web site prior to download. Registration requires the activation code that each customer receives from HP when ordering either RHEL.&lt;br /&gt;
&lt;br /&gt;
You can download RHEL for each available platform as four CD ISO images or one DVD ISO image.&lt;br /&gt;
&lt;br /&gt;
Use the following procedure to download RHEL and create the installation media:&lt;br /&gt;
&lt;br /&gt;
   1.&lt;br /&gt;
&lt;br /&gt;
      Register and log in at the following Red Hat Web site:&lt;br /&gt;
&lt;br /&gt;
      www.redhat.com/rhn&lt;br /&gt;
   2.&lt;br /&gt;
&lt;br /&gt;
      Click on channels and then select Red Hat Enterprise Linux ES (v.4 for 64–bit Intel Itanium).&lt;br /&gt;
   3.&lt;br /&gt;
&lt;br /&gt;
      Select Downloads and then download the ISO images of install, compatibility and source disks&lt;br /&gt;
&lt;br /&gt;
      Files with ia64 in the name are for the Itanium platform.&lt;br /&gt;
   4.&lt;br /&gt;
&lt;br /&gt;
      Create the CDs or a DVD from the ISO images.&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	IMPORTANT: Create the CDs or DVD using the contents of the ISO images. Do not create the CDs or DVD by burning the .iso files themselves to CD or DVD. For example, if you are using K3b to burn a CD, click Tools&amp;gt;CD&amp;gt;Burn CD Image, select the .iso image, then click Burn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bootup scripts&#039;&#039;&#039; for example for level 5 execution (multiuser with X):&lt;br /&gt;
&lt;br /&gt;
 cp &amp;lt;script-file&amp;gt; /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/&amp;lt;script-file&amp;gt;&lt;br /&gt;
 ln -s /etc/init.d/&amp;lt;scriptfile&amp;gt; /etc/rc.d/rc5.d/S50&amp;lt;scriptfile&amp;gt;&lt;br /&gt;
 ln -s /etc/init.d/&amp;lt;scriptfile&amp;gt; /etc/rc.d/rc5.d/K50&amp;lt;scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changing hostname/IP address&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Changing hostname on RHEL&lt;br /&gt;
 1. Change the HOSTNAME line in /etc/sysconfig/network&lt;br /&gt;
 2. Change the hostname (FQDN and alias) in /etc/hosts&lt;br /&gt;
 3. Run &#039;/bin/hostname new_hostname&#039; for the hostname change to take effect immediately.&lt;br /&gt;
 4. Run &#039;/sbin/service syslog restart&#039; for syslog to log using the new hostname.&lt;br /&gt;
 A reboot is not required to change the system hostname.&lt;br /&gt;
&lt;br /&gt;
 IP address: You have to change the IP address entry in&lt;br /&gt;
 /etc/sysconfig/network-scripts/ifcfg-eth0.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Installation_Procedure&amp;diff=8762</id>
		<title>Linux Installation Procedure</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Installation_Procedure&amp;diff=8762"/>
		<updated>2026-07-28T16:03:52Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 (64 bit) - machine under puppet control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Dell servers hardware trick(s) ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;!!! if BIOS date/time is incorrect, it may prevent redhat subscription and installation to work correctly, set it to correct value !!! (it was not confirmed, problem may be different and was fixed at the same time as time was correctly set) &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* if BIOS does not remember time setting after power unplugged, battery on motherboard may need to be replaced&lt;br /&gt;
&lt;br /&gt;
* if looks dead, remove the power cords, then held in the on button for 30 seconds; then plug it back in and it may boots up fine - known Dell feature&lt;br /&gt;
&lt;br /&gt;
== ARM (CentsOS7) ==&lt;br /&gt;
&lt;br /&gt;
See [[yum]] for specifics.&lt;br /&gt;
&lt;br /&gt;
 yum install xauth wget bzip2 xterm expat-devel libX11-devel libXpm-devel motif-devel mariadb-devel&lt;br /&gt;
&lt;br /&gt;
== RHEL9 (64 bit) - machine under puppet control ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: select installation type &#039;&#039;&#039;H&#039;&#039;&#039;, then type &#039;&#039;&#039;B&#039;&#039;&#039;.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: during custom disk partitioning, select &#039;Standard&#039; for every partition, if you want it to be standard, or &#039;Raid&#039; if applicable&lt;br /&gt;
&lt;br /&gt;
Root password will be set by puppet during installation, as well as most other needed settings.&lt;br /&gt;
&lt;br /&gt;
Install package(s) for DAQ servers (where coda_ebc is running):&lt;br /&gt;
 yum install patchelf&lt;br /&gt;
&lt;br /&gt;
Install useful packages:&lt;br /&gt;
 yum install ncdu mysql gfortran&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: graphic screen is disabled, run following command as root:&lt;br /&gt;
 systemctl set-default graphical.target&lt;br /&gt;
&lt;br /&gt;
== RHEL9 (64 bit) - for machine NOT under puppet control ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: select installation type &#039;&#039;&#039;D&#039;&#039;&#039; (not &#039;&#039;&#039;S&#039;&#039;&#039;, otherwise it will not be level 2 server)&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: during custom disk partitioning, select &#039;Standard&#039; for every partition, if you want it to be standard, or &#039;Raid&#039; if applicable&lt;br /&gt;
&lt;br /&gt;
When installation complete, ssh as authorized user and do following:&lt;br /&gt;
&lt;br /&gt;
 sudo yum install emacs&lt;br /&gt;
 cd /etc&lt;br /&gt;
 sudo chmod a+rw shadow&lt;br /&gt;
 sudo emacs shadow&lt;br /&gt;
&lt;br /&gt;
Copy to /etc/shadow root and other needed passwords from another clon machine. &lt;br /&gt;
&lt;br /&gt;
 sudo chmod a-rw shadow&lt;br /&gt;
&lt;br /&gt;
After that, type &#039;&#039;su&#039;&#039; to become superuser. All following settings can be done now without typing &#039;&#039;sudo&#039;&#039; every time. You still will not be able to ssh remotely as root - always ssh as authorized user and type &#039;&#039;su&#039;&#039; to become root.&lt;br /&gt;
&lt;br /&gt;
Update /etc/passwd and /etc/group using another clon machine as example.&lt;br /&gt;
&lt;br /&gt;
 yum install expat-devel libXaw-devel mysql-devel motif-devel ncurses-devel apr-devel net-snmp-utils&lt;br /&gt;
 yum install xorg-x11-utils # for xprop/xwininfo/etc creg stuff&lt;br /&gt;
 yum install s-nail # for /usr/bin/mail&lt;br /&gt;
 yum install ncdu gfortran&lt;br /&gt;
 yum install libconfig-devel # recent addition for CODA libraries&lt;br /&gt;
&lt;br /&gt;
To be able to ssh to old machines (like vme controllers under CentOS5), run following as root:&lt;br /&gt;
&lt;br /&gt;
 update-crypto-policies --set LEGACY&lt;br /&gt;
&lt;br /&gt;
and then probably reboot, not sure.&lt;br /&gt;
&lt;br /&gt;
Somebody mentioned also adding &#039;&#039;RequiredRSASize 1024&#039;&#039; to a config file in &#039;&#039;/etc/ssh/ssh_config.d/&#039;&#039;, but I did not do it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Note: this changes all daemons and system settings and is a bit overkill if you only need to adjust the settings for ssh and sshd.&lt;br /&gt;
&lt;br /&gt;
    Exclude (only) sshd from the system-wide cryptographic policy. You opt-out by editing /etc/sysconfig/sshd and uncommenting the line # CRYPTO_POLICY= , (if necessary you can then adjust adjust /etc/ssh/sshd_config and add legacy crypto settings) and restart the ssh daemon.&lt;br /&gt;
&lt;br /&gt;
For the ssh command line client on the RHEL 9 system: you&#039;re recommended to edit ˜/.ssh/config and override the modern/secure system wide ssh client defaults by adding a Host entry that adds support for suitable legacy encryption options for that particular host:&lt;br /&gt;
&lt;br /&gt;
#    ˜/.ssh/config&lt;br /&gt;
&lt;br /&gt;
Host rhel6.example.com&lt;br /&gt;
  KexAlgorithms +diffie-hellman-group14-sha1&lt;br /&gt;
  MACs +hmac-sha1&lt;br /&gt;
  HostKeyAlgorithms +ssh-rsa&lt;br /&gt;
  PubkeyAcceptedKeyTypes +ssh-rsa&lt;br /&gt;
  PubkeyAcceptedAlgorithms +ssh-rsa&lt;br /&gt;
&lt;br /&gt;
Prepare auto-mounting directories:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
 mv apps apps.orig&lt;br /&gt;
 mv home home.orig&lt;br /&gt;
 mv scratch scratch.orig&lt;br /&gt;
 mv work work.orig&lt;br /&gt;
 mkdir apps&lt;br /&gt;
 mkdir home&lt;br /&gt;
 mkdir scratch&lt;br /&gt;
 mkdir work&lt;br /&gt;
 mkdir logs&lt;br /&gt;
 cd /usr&lt;br /&gt;
 mv local local.orig&lt;br /&gt;
 mkdir local&lt;br /&gt;
 mkdir clas&lt;br /&gt;
 mkdir clas12&lt;br /&gt;
 mkdir downloads&lt;br /&gt;
 cd&lt;br /&gt;
&lt;br /&gt;
== RHEL8 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; to boot from USB stick, insert USB stick, turn machine ON holding F2, and in BIOS Boot Configuration, set Enable Security Boot to OFF, save and exit, holding F2. When in BIOS again, in Boot Configuration make &#039;&#039;UEFI PHY USB ...&#039;&#039; first in boot sequence, local hard drive second, disable all other boot options, save and exit. Do NOT hold F2, Linux installation from USB stick will start. &#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; when asked about D/S options (very first question in installation process), &#039;&#039;&#039;REMOVE USB STICK BEFORE ANSWERING QUESTION ABOUT DESKTOP/SERVER&#039;&#039;&#039;, otherwise it will be destroyed by following installation steps !!!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; to disable/enable puppet, do following as root: &lt;br /&gt;
 puppet agent --disable &amp;quot;temporary&amp;quot;&lt;br /&gt;
 puppet agent --enable&lt;br /&gt;
&lt;br /&gt;
 yum install emacs&lt;br /&gt;
 yum install xorg-x11-fonts-misc&lt;br /&gt;
&lt;br /&gt;
Move and create some directories in preparation for automounts:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
 mv apps apps.orig&lt;br /&gt;
 mv home home.orig&lt;br /&gt;
 mv scratch scratch.orig&lt;br /&gt;
 mkdir apps&lt;br /&gt;
 mkdir home&lt;br /&gt;
 mkdir scratch&lt;br /&gt;
 mkdir work&lt;br /&gt;
 mkdir logs&lt;br /&gt;
 cd /usr&lt;br /&gt;
 mv local local.orig&lt;br /&gt;
 mkdir local&lt;br /&gt;
 mkdir clas&lt;br /&gt;
 mkdir clas12&lt;br /&gt;
 mkdir downloads&lt;br /&gt;
 cd&lt;br /&gt;
&lt;br /&gt;
Add line &#039;&#039;&#039;+dir:/etc/auto.master.d&#039;&#039;&#039; to &#039;&#039;/etc/auto.master&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/auto.master.d/direct.autofs&#039;&#039; with the line &#039;&#039;&#039;/- /etc/auto.direct&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/auto.direct&#039;&#039; with the following contents:&lt;br /&gt;
&lt;br /&gt;
 # machine-dependent system directories&lt;br /&gt;
 /apps                 -rw,bg     clonfs1:/vol/apps/RHEL8_x86_64&lt;br /&gt;
 /usr/local            -rw,bg     clonfs1:/vol/local/RHEL8_x86_64&lt;br /&gt;
 # machine-independent system directories&lt;br /&gt;
 /home                 -rw,bg     clonfs1:/vol/home&lt;br /&gt;
 #/work                 -rw,bg     clonfs1-old:/vol/work&lt;br /&gt;
 /scratch              -rw,bg     clonfs1:/vol/scratch&lt;br /&gt;
 # machine-independent clas directories&lt;br /&gt;
 /usr/downloads        -rw,bg     clonfs1:/vol/downloads&lt;br /&gt;
 /usr/clas             -rw,bg     clonfs1:/vol/clas&lt;br /&gt;
 /usr/clas12           -rw,bg     clonfs1:/vol/clas12&lt;br /&gt;
 # Used for data storage before shipping to tape&lt;br /&gt;
 #/logs                 -rw,bg     clonfs1-old:/vol/logs&lt;br /&gt;
&lt;br /&gt;
Restart autofs:&lt;br /&gt;
&lt;br /&gt;
 service autofs reload&lt;br /&gt;
 service autofs restart&lt;br /&gt;
&lt;br /&gt;
Remove from the end of the &#039;&#039;/etc/passwd&#039;&#039; line &#039;&#039;&#039;+::::::&#039;&#039;&#039;, and add following:&lt;br /&gt;
&lt;br /&gt;
 hpsrun:x:8796:9998:hpsrun Account:/home/hpsrun:/bin/tcsh&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clasioc:x:6008:9998:CLAS IOCs:/home/clasioc:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:3888:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +sshd::::::&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
Update &#039;&#039;/etc/shadow&#039;&#039;, adding passwords for local accounts (copy it from another machine).&lt;br /&gt;
&lt;br /&gt;
Add following to &#039;&#039;/etc/group&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 clon:x:383:clascron&lt;br /&gt;
 onliners:x:9998:abbottd,avakian,baltzell,battagli,brooksw,bruhwel,boiarino,carman,chen,clasboot,clascron,clasrun,cole,cuevas,davidl,danagu,dugger,elton,epics,fklein,gilfoyle,giovanet,golovach,gurjyan,heddle,heyes,hovanes,jacobsg,jenkins,kliv,lcsmith,marki,mestayer,nerses,parkkj,pasyuk,primex,ripani,rossi,saw,staylor,sytnik,taiuti,taylorw,timmer,wooyoung&lt;br /&gt;
&lt;br /&gt;
== RHEL7 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
Installed using DVD provided by Computer Center, currently RHEL7.3. Requires MAC address to be registered with Computer Center (using jnet.jlab.org as &#039;boiarino&#039;) because it is network-based installation. On DELL servers, hold F2 after power on and go to &#039;Device Settings&#039; to see mac address. Remember machine memory size as well, will needed when create partitions, find it in &#039;System BIOS -&amp;gt; Memory Settings&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: all disks will be reformatted in a process, all information will be lost !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Please enter the hostname of this system: &amp;lt;hostname&amp;gt; &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* What type of system are you building? (D)esktop: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Is this a CUE level 1 or CUE level 2 System build (1/2): 2 &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Please enter the System Admin&#039;s CUE username: boiarino &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Do you want to use the default partitioning scheme (y/n)? n &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Are you sure you want to use your own partitioning scheme (y/n)? y &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose &#039;Standard Partition&#039; scheme and create following partitions: /boot - 1GB, swap - double memory size, / - the rest of space.&lt;br /&gt;
&lt;br /&gt;
Installation will proceed. When prompted, remove installation disk and reboot machine if not done automatically.&lt;br /&gt;
&lt;br /&gt;
After reboot patching process will be started and it will take a while, do not interrupt it, otherwise system will not be installed correctly.&lt;br /&gt;
&lt;br /&gt;
When machine reboots for the last time, ask Paul Letta to set usual hallb root password. From now on remote root access is possible. Alternatively, user &#039;&#039;boiarino&#039;&#039; can execute most of actions using &#039;&#039;sudo&#039;&#039;,&lt;br /&gt;
like &#039;&#039;sudo emacs&#039;&#039; for protected files. &#039;&#039;sudo reboot&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
Go to /boot/grub2 and modify file grub.cfg, Linux kernel boot options, adding options &#039;&#039;net.ifnames=0 biosdevname=0&#039;&#039;, so your boot string has following section:&lt;br /&gt;
&lt;br /&gt;
 ..... rhgb net.ifnames=0 biosdevname=0 quiet .....&lt;br /&gt;
&lt;br /&gt;
so whole line looks something like this:&lt;br /&gt;
&lt;br /&gt;
 linux16 /vmlinuz-3.10.0-327.18.2.el7.x86_64 root=UUID=b5d1b5ad-e3f6-4db4-8972-aa9c1a91d116 ro vconsole.keymap=us crashkernel=auto  vconsole.font=latarcyrheb-sun16 rhgb net.ifnames=0 biosdevname=0 quiet LANG=en_US.UTF-8&lt;br /&gt;
&lt;br /&gt;
Reboot machine, ethernet ports must be named &#039;&#039;eth0&#039;&#039;, &#039;&#039;eth1&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
To update manually, use commands &#039;&#039;yum list updates&#039;&#039; and &#039;&#039;yum update&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; add machine to the appropriate &#039;&#039;&#039;puppet&#039;&#039;&#039; group, it will do all following automatically (hopefully).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; on RHEL7.9, RPM EPEL REPO is not enabled by default, which prevents from installing nload, itcl, itk etc. To bring it back, it can be copied it from older machine, for example:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/yum.repos.d&lt;br /&gt;
 scp clondaq7:/etc/yum.repos.d/epel.repo .&lt;br /&gt;
 cd /etc/pki/rpm-gpg&lt;br /&gt;
 scp clondaq7:/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 .&lt;br /&gt;
&lt;br /&gt;
Alternatively, following can be used to add repo&#039;s:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --enable &amp;lt;repo_id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In particular, following have to be enabled to get nload, xpdf, python-alembic, tix, itcl, itk etc:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --enable JLab_EPEL_EPEL_7&lt;br /&gt;
 subscription-manager repos --enable rhel-7-workstation-optional-rpms&lt;br /&gt;
&lt;br /&gt;
Repo ID&#039;s can be obtained by:&lt;br /&gt;
&lt;br /&gt;
 subscription-manager repos --list&lt;br /&gt;
&lt;br /&gt;
Installed repo&#039;s can be seen by:&lt;br /&gt;
&lt;br /&gt;
 yum repolist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Yum updates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Edit the &#039;&#039;/etc/yum.conf&#039;&#039; file and add the following line to force installation of the 32bit and 64bit libraries:&lt;br /&gt;
&lt;br /&gt;
 multilib_policy=all&lt;br /&gt;
&lt;br /&gt;
Install following packages:&lt;br /&gt;
&lt;br /&gt;
 yum install xterm mesa-dri-drivers telnet rsh readline-devel net-snmp-utils tigervnc-server tigervnc xpdf nload mariadb-devel libxml2-devel glibc-devel qt-devel python-alembic openssl-devel apr-devel&lt;br /&gt;
 yum install libconfig-devel # recent addition for CODA libraries&lt;br /&gt;
&lt;br /&gt;
Fonts for EPICS EDMs:&lt;br /&gt;
&lt;br /&gt;
 yum install xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-75dpi bitmap-miscfixed-fonts&lt;br /&gt;
 yum install bitmap-console-fonts bitmap-fixed-fonts bitmap-lucida-typewriter-fonts&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/100dpi /etc/X11/fontpath.d/xorg-x11-fonts-100dpi:pri=60&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/75dpi /etc/X11/fontpath.d/xorg-x11-fonts-75dpi:pri=50&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/misc /etc/X11/fontpath.d/xorg-x11-fonts-misc:pri=40&lt;br /&gt;
 ln -s  /usr/share/fonts/bitmap /etc/X11/fontpath.d/bitmap-fonts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do following to be able to compile and run 32-bit apps on 64-bit machine (for compatibility with 32bit applications):&lt;br /&gt;
&lt;br /&gt;
 yum install libXpm-devel libXaw-devel motif-devel glibc-devel ncurses-devel readline-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/passwd&#039;&#039; adding following:&lt;br /&gt;
&lt;br /&gt;
 hpsrun:x:8796:9998:hpsrun Account:/home/hpsrun:/bin/tcsh&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clasioc:x:6008:9998:CLAS IOCs:/home/clasioc:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:3888:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +sshd::::::&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: user-related lines must be removed, like&lt;br /&gt;
&lt;br /&gt;
 +boiarino::::::&lt;br /&gt;
&lt;br /&gt;
as well as&lt;br /&gt;
&lt;br /&gt;
 +::::::&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: assumed that following line is in already:&lt;br /&gt;
&lt;br /&gt;
 +@ccc::::::&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: if following line exist, it must be placed in the end, or removed:&lt;br /&gt;
&lt;br /&gt;
 +::::::/bin/false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/group&#039;&#039; adding following:&lt;br /&gt;
&lt;br /&gt;
 onliners::9998:heyes,hujl,rwm,timmer,wolin,taylorw,cuevas,abbottd,abulafia,anciant,anghi,aswin,auger,avakian,banta,barrow,battagli,bjlee,bogdan,brooksw,bruhwel,boiarino,buckle,burchesk,burin,bzh,cetina,chen,cole,cords,corvi,costy,davidl,costy,davidl,dcarter,dcurry,dennisl,deppman,dhlee,doughty,drago,dytman,dugger,dugger,elton,fedro,ficenec,fklein,france,freyberg,gholden,gilfoyle,golovach,gurjyan,haddock,heddle,jenkins,jhardie,jmorris,kellyk,klusman,kmkim,kossov,lcsmith,longhi,manak,marchand,marki,mastersj,mjohnson,mosbackr,mueller,muguira,murphyl,necaise,odonnell,opper,parkkj,pasyuk,phkim,piot,riccardi,richardt,ripani,rossi,saw,sergpozd,serov,sholt,staylor,taiuti,tang,tedeschi,vineyard,vlassov,vvsap,weygand,wooyoung,burchesk,clasrun,giovanet,clasboot,clascoda,clasroot,clasmail,clascron,trigger,epics,southern,carstens,ccutter,danagu,heyes,huertas,jacobsg,kliv,lachniet,mestayer,primex,hovanes,nerses,sytnik,baltzell,carman&lt;br /&gt;
 clon::383:clascoda,clascron,clasmail&lt;br /&gt;
 nagios::9997:nagios&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/shadow&#039;&#039; using an example from another RHEL7 clon machine (clonioc2 etc). Do &#039;&#039;chmod 600 shadow&#039;&#039; before editing and &#039;&#039;chmod 000 shadow&#039;&#039; after.&lt;br /&gt;
&lt;br /&gt;
Make sure file &#039;&#039;/etc/ssh/sshd_config&#039;&#039; has following line uncommented (must be pushed in by CC security scripts):&lt;br /&gt;
&lt;br /&gt;
 ##PermitUserEnvironment yes&lt;br /&gt;
&lt;br /&gt;
NOT NEEDED, DONE IN THE END OF FILE ALREADY !!! Uncomment following in file &#039;&#039;/etc/ssh/ssh_config&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 ##Host *&lt;br /&gt;
 ##ForwardX11 yes&lt;br /&gt;
&lt;br /&gt;
Add line &#039;export NO_AT_BRIDGE=1&#039; to the file &#039;/etc/environment&#039; to suppress annoying messages like &#039;** (emacs:38714): WARNING **: Couldn&#039;t register with accessibility bus: Did not receive a reply.&#039;&lt;br /&gt;
&lt;br /&gt;
If big (&amp;gt;2GB) partition to be formated, do following (for example /dev/sdb):&lt;br /&gt;
&lt;br /&gt;
 parted /dev/sdb&lt;br /&gt;
 (parted) print&lt;br /&gt;
 (parted) mklabel gpt&lt;br /&gt;
 (parted) print&lt;br /&gt;
 mkpart primary 0GB 25855.2GB&lt;br /&gt;
 (parted) print&lt;br /&gt;
 (parted) quit&lt;br /&gt;
&lt;br /&gt;
 mkfs.xfs /dev/sdb1&lt;br /&gt;
&lt;br /&gt;
then create /data and mount it using &#039;&#039;/etc/fstab&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 /dev/sdb1                                 /data                   xfs     defaults        1 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; sometimes machine can loose NIS connection, then ssh to it becomes intermittent; if it happens ssh as root (may have to try several times) and run command&lt;br /&gt;
&lt;br /&gt;
 ypwhich&lt;br /&gt;
&lt;br /&gt;
to shows NIS server. If it returns nothing check file &#039;&#039;/etc/resolv.conf&#039;&#039;, it must have following (as on July 2019):&lt;br /&gt;
&lt;br /&gt;
 search jlab.org acc.jlab.org&lt;br /&gt;
 nameserver 129.57.90.255&lt;br /&gt;
 nameserver 129.57.32.101&lt;br /&gt;
&lt;br /&gt;
If file is empty or does not contain right info, fix it. After that run command&lt;br /&gt;
&lt;br /&gt;
 ypbind&lt;br /&gt;
&lt;br /&gt;
It should fix a problem. Run &#039;&#039;ypwhich&#039;&#039; to make sure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Display Setting:&#039;&#039;&#039; if machine is multi-head, goto &#039;&#039;Applications-&amp;gt;System Tools-&amp;gt;Settings-&amp;gt;Devices-&amp;gt;Displays&#039;&#039; and arrange displays.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Proceed to the [[Linux Customization on CLON Cluster]].&lt;br /&gt;
&lt;br /&gt;
== RHEL6 (64 bit) ==&lt;br /&gt;
&lt;br /&gt;
Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (using jnet.jlab.org as &#039;boiarino&#039;) because it is network-based installation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: all disks will be reformatted in a process, all information will be lost !&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ...[D]esktop: [use &#039;s&#039; for server, &#039;d&#039; for desktop] &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* root password: enter root password&lt;br /&gt;
&lt;br /&gt;
* admin user: boiarino&lt;br /&gt;
&lt;br /&gt;
Installation will proceed. When prompted, remove installation disk and reboot machine if not done automatically. After reboot patching process will be started and it will take a while, do not interrupt it, otherwise system will not be installed correctly.&lt;br /&gt;
&lt;br /&gt;
To make emacs work, install&lt;br /&gt;
&lt;br /&gt;
 yum install libotf&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/yum.conf file and add the following line to force installation of teh 32bit and 64bit libraries:&lt;br /&gt;
&lt;br /&gt;
 multilib_policy=all&lt;br /&gt;
&lt;br /&gt;
Install following packages:&lt;br /&gt;
&lt;br /&gt;
 yum install openmotif-devel xinetd mysql-devel cmake libXpm-devel net-snmp-utils&lt;br /&gt;
 yum install mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel (for OpenGL, needed by ROOT)&lt;br /&gt;
 yum install libXaw-devel (for xterm)&lt;br /&gt;
 yum install expat-devel libgcj-devel (for evio/et)&lt;br /&gt;
&lt;br /&gt;
 yum install compat-libtermcap (for xterm)&lt;br /&gt;
 ln -s /lib/libtermcap.so.2 /usr/lib/libtermcap.so&lt;br /&gt;
 ###ln -s /lib64/libtermcap.so.2 /usr/lib64/libtermcap.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install following fonts for EPICS EDMs:&lt;br /&gt;
&lt;br /&gt;
 yum install xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-75dpi bitmap-miscfixed-fonts&lt;br /&gt;
 yum install bitmap-console-fonts bitmap-fixed-fonts bitmap-lucida-typewriter-fonts&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/100dpi /etc/X11/fontpath.d/xorg-x11-fonts-100dpi:pri=60&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/75dpi /etc/X11/fontpath.d/xorg-x11-fonts-75dpi:pri=50&lt;br /&gt;
 ln -s  /usr/share/X11/fonts/misc /etc/X11/fontpath.d/xorg-x11-fonts-misc:pri=40&lt;br /&gt;
 ln -s  /usr/share/fonts/bitmap /etc/X11/fontpath.d/bitmap-fonts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Useful &#039;&#039;yum&#039;&#039; commands:&lt;br /&gt;
&lt;br /&gt;
 yum whatprovides libstdc++.so.5 - show which package contains libstdc++.so.5&lt;br /&gt;
&lt;br /&gt;
== RHEL5 ==&lt;br /&gt;
&lt;br /&gt;
Installed using CD provided by Computer Center. Requires MAC address to be registered with Computer Center (email to helpdesk@jlab.org) because it is network-based installation.&lt;br /&gt;
&lt;br /&gt;
Dialog:&lt;br /&gt;
&lt;br /&gt;
* boot: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ...[D]esktop: Server (it is ignored, will do Desktop anyway ...)&lt;br /&gt;
&lt;br /&gt;
* root password: enter root password&lt;br /&gt;
&lt;br /&gt;
* system user: &amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* manually partition disk: 100MB /boot, 2048 etc MB swap, the rest /.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CFENGINE&#039;&#039;&#039;: there are procesess restoring some system config files (in particular &#039;&#039;/etc/ssh/sshd_config&#039;&#039;) in according to the Computer Center - maintained templete. To shut them down: (1) comment out &#039;&#039;cfengine&#039;&#039;-related stuff in root cronjobs; (2) do &#039;&#039;/etc/init.d/cfengine stop&#039;&#039;; (3) do &#039;&#039;chkconfig cfengine off&#039;&#039;. Ask CC (Sherman White, Paul Letta) to fix templete.&lt;br /&gt;
&lt;br /&gt;
Run &#039;&#039;/usr/bin/system-config-authentication&#039;&#039; and set NIS servers list as &#039;&#039;clon00,clon10,nis1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add following in the end of &#039;&#039;/etc/passwd&#039;&#039;:&lt;br /&gt;
 clasrun:x:2508:9998:Online DAQ:/home/clasrun:/bin/tcsh&lt;br /&gt;
 clas12run:x:6007:146:clas12run Account:/home/clas12run:/bin/tcsh&lt;br /&gt;
 clascron:x:6005:146:CLAS Cron Jobs:/home/clascron:/bin/tcsh&lt;br /&gt;
 clasboot:x:6000:146:Boot Scripts Only:/home/clasboot:/bin/tcsh&lt;br /&gt;
 clasmail:x:6003:146:CLAS Automated Mail:/home/clasmail:/bin/tcsh&lt;br /&gt;
 epics:x:5001:146:EPICS Account:/home/epics:/bin/tcsh&lt;br /&gt;
 nagios:x:6246:9997:Nagios:/home/nagios:/bin/tcsh&lt;br /&gt;
 +@clon_cluster::::::&lt;br /&gt;
 +@ccc::::::&lt;br /&gt;
&lt;br /&gt;
Add following in the end of &#039;&#039;/etc/group&#039;&#039;:&lt;br /&gt;
 onliners::9998:heyes,hujl,rwm,timmer,wolin,taylorw,cuevas,abbottd,abulafia,anciant,anghi,aswin,auger,avakian,banta,barrow,battagli,bjlee,bogdan,brooksw,bruhwel,boiarino,buckle,burchesk,burin,bzh,cetina,chen,cole,cords,corvi,costy,davidl,costy,davidl,dcarter,dcurry,dennisl,deppman,dhlee,doughty,drago,dytman,dugger,dugger,elton,fedro,ficenec,fklein,france,freyberg,gholden,gilfoyle,golovach,gurjyan,haddock,heddle,jenkins,jhardie,jmorris,kellyk,klusman,kmkim,kossov,lcsmith,longhi,manak,marchand,marki,mastersj,mjohnson,mosbackr,mueller,muguira,murphyl,necaise,odonnell,opper,parkkj,pasyuk,phkim,piot,riccardi,richardt,ripani,rossi,saw,sergpozd,serov,sholt,staylor,taiuti,tang,tedeschi,vineyard,vlassov,vvsap,weygand,wooyoung,burchesk,clasrun,giovanet,clasboot,clascoda,clasroot,clasmail,clascron,trigger,epics,southern,carstens,ccutter,danagu,heyes,huertas,jacobsg,kliv,lachniet,mestayer,primex,hovanes,nerses,sytnik&lt;br /&gt;
 clon::383:clascoda,clascron,clasmail&lt;br /&gt;
 nagios::9997:nagios&lt;br /&gt;
&lt;br /&gt;
Create &#039;&#039;/etc/shadow&#039;&#039; files with entries for users clasrun, epics and nagios (copy from another machine).&lt;br /&gt;
&lt;br /&gt;
Install updates: normally all updates should be installed by now, it can be done manually by commands&lt;br /&gt;
 yum list updates&lt;br /&gt;
 yum update&lt;br /&gt;
&lt;br /&gt;
Configure [[SSH]].&lt;br /&gt;
&lt;br /&gt;
Install missing packages:&lt;br /&gt;
 yum install openmotif-devel xinetd mysql-devel cmake&lt;br /&gt;
&lt;br /&gt;
Some additional packages on request (for EPICS):&lt;br /&gt;
&lt;br /&gt;
 yum install mc lapack lapack-devel blas blas-devel giflib-devel&lt;br /&gt;
&lt;br /&gt;
Proceed to the [[Linux Customization on CLON Cluster]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PROBLEMS&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
1. /usr/lib/libg2c.so link is missing&lt;br /&gt;
&lt;br /&gt;
FIXED ??? 2. /usr/lib/libXm.so link is missing&lt;br /&gt;
&lt;br /&gt;
3. Created /etc/shadow file for clasrun, epics and nagios&lt;br /&gt;
&lt;br /&gt;
== RHEL4 ==&lt;br /&gt;
&lt;br /&gt;
Get RHEL4 CDs from Paul Letta.&lt;br /&gt;
&lt;br /&gt;
Connect terminal, keyboard and mouse.&lt;br /&gt;
&lt;br /&gt;
Boot from CD1. Follow instructions. When asked, choose following options:&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;Manually partition with Disk Druid&#039;, set /boot to 100MB, then / to 40GB, then swap to 8192MB or at least double memory size. The rest of disk can be set as /space.&lt;br /&gt;
&lt;br /&gt;
* Network: choose manually, type clonpc2.jlab.org; click &#039;EDIT&#039;, deactivate &#039;Configure using DHCP&#039;,&lt;br /&gt;
type IP address and netmask (255.255.255.0), click Ok.&lt;br /&gt;
Type Gateway (for example 129.57.167.99) and 3 DNS servers (129.57.167.5,129.57.167.14,129.57.32.100).&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;No firewall&#039;&lt;br /&gt;
&lt;br /&gt;
* Disable &#039;SELinux&#039;&lt;br /&gt;
&lt;br /&gt;
* Choose &#039;Customize software packages to be installed&#039;, click &#039;Everything&#039;.&lt;br /&gt;
&lt;br /&gt;
You will be asked to install CD2, CD3 and CD4, then CD1 again.&lt;br /&gt;
Then you will be asked to click &#039;Reboot&#039;. First remove CD, then click &#039;Reboot&#039;.&lt;br /&gt;
You will be asked few more questions. When asked to activate service, choose&lt;br /&gt;
&#039;Tell me why I need to register ..&#039; and click &#039;Next&#039;. Choose &#039;I can not complete registration ..&#039;&lt;br /&gt;
and click &#039;Next&#039;. You will see &#039;System user&#039; screen, click &#039;Use network login..&#039;.&lt;br /&gt;
Choose &#039;Enable NIS support&#039; and click &#039;Configure NIS&#039;. Type NIS Domain: &#039;CCCHP&#039; and NIS Server: clon00.jlab.org.&lt;br /&gt;
Finish installation process.&lt;br /&gt;
&lt;br /&gt;
* fix files &#039;&#039;/etc/passwd&#039;&#039;, &#039;&#039;/etc/shadow&#039;&#039; and &#039;&#039;/etc/group&#039;&#039; adding clasrun etc (see examples on another machines).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if machine has multiple network ports, Linux may not assign them properly to specified IP names and addresses. If problem occures, open network GUI and delete all existing records. After that, click &#039;&#039;New&#039;&#039; and pick hadrware port you want to configure from the list of available ports (tricky part is to know which RJ-45 connector corresponds to which port ..). Configure and activate it, make sure it works. Repeat for other ports. Results will be stored in directory &#039;&#039;/etc/sysconfig/network-scripts&#039;&#039;, file names will be &#039;&#039;ifcfg-eth0&#039;&#039;, &#039;&#039;ifcfg-eth1&#039;&#039; etc. If modifying those files manually, restart network by &#039;&#039;/etc/init.d/network restart&#039;&#039;. Finally, set routing, for example for &#039;&#039;clonmon&#039;&#039; command &#039;&#039;route -n&#039;&#039; shows following:&lt;br /&gt;
 Kernel IP routing table&lt;br /&gt;
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
 129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1&lt;br /&gt;
 129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3&lt;br /&gt;
 129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937&lt;br /&gt;
 129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3&lt;br /&gt;
 0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3&lt;br /&gt;
Run following commands:&lt;br /&gt;
 /sbin/route add -net 129.57.160.0 netmask 255.255.255.0 gw 129.57.160.5 dev eth1&lt;br /&gt;
 /sbin/route add -net 129.57.68.0 netmask 255.255.255.0 gw 129.57.68.26 dev eth3&lt;br /&gt;
 /sbin/route add -net 129.57.69.0 netmask 255.255.255.0 gw 129.57.69.206 dev dev5937&lt;br /&gt;
 /sbin/route add -net 129.57.64.0 netmask 255.255.255.0 gw 129.57.64.57 dev eth0&lt;br /&gt;
Now &#039;&#039;route -n&#039;&#039; shows following:&lt;br /&gt;
 Kernel IP routing table&lt;br /&gt;
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
 129.57.160.0    129.57.160.5    255.255.255.0   UG    0      0        0 eth1&lt;br /&gt;
 129.57.160.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1&lt;br /&gt;
 129.57.68.0     129.57.68.26    255.255.255.0   UG    0      0        0 eth3&lt;br /&gt;
 129.57.68.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3&lt;br /&gt;
 129.57.69.0     129.57.69.206   255.255.255.0   UG    0      0        0 dev5937&lt;br /&gt;
 129.57.69.0     0.0.0.0         255.255.255.0   U     0      0        0 dev5937&lt;br /&gt;
 129.57.64.0     129.57.64.57    255.255.255.0   UG    0      0        0 eth0&lt;br /&gt;
 129.57.64.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3&lt;br /&gt;
 0.0.0.0         129.57.68.100   0.0.0.0         UG    0      0        0 eth3&lt;br /&gt;
In that example automount will do configured using &#039;&#039;clonmon-daq1&#039;&#039; interface, because default &#039;&#039;clonmon&#039;&#039; interface is on external subnet. To make that routing table permanent (retore it after reboot) I tried to add four files with following contents to the &#039;&#039;/etc/sysconfig/network-scripts&#039;&#039; directory:&lt;br /&gt;
 route-eth1:&lt;br /&gt;
   GATEWAY0=129.57.160.5&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.160.0&lt;br /&gt;
 route-eth3:&lt;br /&gt;
   GATEWAY0=129.57.68.26&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.68.0&lt;br /&gt;
 route-dev5937:&lt;br /&gt;
   GATEWAY0=129.57.69.206&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.69.0&lt;br /&gt;
 route-eth0:&lt;br /&gt;
   GATEWAY0=129.57.64.57&lt;br /&gt;
   NETMASK0=255.255.255.0&lt;br /&gt;
   ADDRESS0=129.57.64.0&lt;br /&gt;
It did not worked. Then I added four &#039;&#039;/sbin/route add ..&#039;&#039; lines to &#039;&#039;/etc/rc.local&#039;&#039; script, and it worked.&lt;br /&gt;
&lt;br /&gt;
From now on you can use remote &#039;ssh&#039; connection.&lt;br /&gt;
&lt;br /&gt;
* To configure your system to use the patch server, issue the following commands as root:&lt;br /&gt;
 # mount jlabsite:/site /mnt&lt;br /&gt;
 # /mnt/CC/linux/satellite-connect --patchall&lt;br /&gt;
The script will prompt you for an activation key, but if you don&#039;t know what this is, just hit ENTER and it will use a sensible default.  Depending on how many patches need to be applied to your system to bring it up to the current level, this script may take a very long time to run.  When it finishes, you should reboot your machine to make the new patches take effect.&lt;br /&gt;
&lt;br /&gt;
To install updates later run &#039;&#039;up2date -uf&#039;&#039; as &#039;&#039;root&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Configure [[SSH]].&lt;br /&gt;
&lt;br /&gt;
* Proceed with [[Linux Customization on CLON Cluster]] if applicable.&lt;br /&gt;
&lt;br /&gt;
To boot Linux in single user mode (no graphics), add &#039;&#039;single&#039;&#039; to the end of boot line during boot process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;background info&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Add startup script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create script in &#039;&#039;/etc/init.d/&#039;&#039; directory (use existing scripts as example). Must have a line like&lt;br /&gt;
 # chkconfig:	- 91 09&lt;br /&gt;
which specifies start and stop order. Run commands&lt;br /&gt;
 chkconfig --add &amp;lt;scriptname&amp;gt;&lt;br /&gt;
 chkconfig --level 3 &amp;lt;scriptname&amp;gt; on&lt;br /&gt;
for every level you want that script to be executed (usualy 3 and/or 4 and/or 5). Check if it os done using command&lt;br /&gt;
 chkconfig --list | grep &amp;lt;scriptname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xxx&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can choose to download the RHEL operating system directly from the Red Hat Web site and not receive a media kit from HP containing the software. This scenario occurs when the media option AJR is deselected from the order. (The media kit option is always selected by default. )&lt;br /&gt;
&lt;br /&gt;
It is necessary to register at the Red Hat Web site prior to download. Registration requires the activation code that each customer receives from HP when ordering either RHEL.&lt;br /&gt;
&lt;br /&gt;
You can download RHEL for each available platform as four CD ISO images or one DVD ISO image.&lt;br /&gt;
&lt;br /&gt;
Use the following procedure to download RHEL and create the installation media:&lt;br /&gt;
&lt;br /&gt;
   1.&lt;br /&gt;
&lt;br /&gt;
      Register and log in at the following Red Hat Web site:&lt;br /&gt;
&lt;br /&gt;
      www.redhat.com/rhn&lt;br /&gt;
   2.&lt;br /&gt;
&lt;br /&gt;
      Click on channels and then select Red Hat Enterprise Linux ES (v.4 for 64–bit Intel Itanium).&lt;br /&gt;
   3.&lt;br /&gt;
&lt;br /&gt;
      Select Downloads and then download the ISO images of install, compatibility and source disks&lt;br /&gt;
&lt;br /&gt;
      Files with ia64 in the name are for the Itanium platform.&lt;br /&gt;
   4.&lt;br /&gt;
&lt;br /&gt;
      Create the CDs or a DVD from the ISO images.&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	IMPORTANT: Create the CDs or DVD using the contents of the ISO images. Do not create the CDs or DVD by burning the .iso files themselves to CD or DVD. For example, if you are using K3b to burn a CD, click Tools&amp;gt;CD&amp;gt;Burn CD Image, select the .iso image, then click Burn.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bootup scripts&#039;&#039;&#039; for example for level 5 execution (multiuser with X):&lt;br /&gt;
&lt;br /&gt;
 cp &amp;lt;script-file&amp;gt; /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/&amp;lt;script-file&amp;gt;&lt;br /&gt;
 ln -s /etc/init.d/&amp;lt;scriptfile&amp;gt; /etc/rc.d/rc5.d/S50&amp;lt;scriptfile&amp;gt;&lt;br /&gt;
 ln -s /etc/init.d/&amp;lt;scriptfile&amp;gt; /etc/rc.d/rc5.d/K50&amp;lt;scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changing hostname/IP address&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Changing hostname on RHEL&lt;br /&gt;
 1. Change the HOSTNAME line in /etc/sysconfig/network&lt;br /&gt;
 2. Change the hostname (FQDN and alias) in /etc/hosts&lt;br /&gt;
 3. Run &#039;/bin/hostname new_hostname&#039; for the hostname change to take effect immediately.&lt;br /&gt;
 4. Run &#039;/sbin/service syslog restart&#039; for syslog to log using the new hostname.&lt;br /&gt;
 A reboot is not required to change the system hostname.&lt;br /&gt;
&lt;br /&gt;
 IP address: You have to change the IP address entry in&lt;br /&gt;
 /etc/sysconfig/network-scripts/ifcfg-eth0.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8761</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8761"/>
		<updated>2026-07-27T19:21:36Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Grounding.pdf MVT Grounding]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/HitachiCable_KZ12_262_Footprint.pdf MM&amp;lt;-&amp;gt;FEU Hitachi Cable]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVT vs Sampa Dynamic range, noise etc&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/SNR.png Finding a working point]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sampa Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8760</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8760"/>
		<updated>2026-07-27T17:59:22Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Grounding.pdf MVT Grounding]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVT vs Sampa Dynamic range, noise etc&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/SNR.png Finding a working point]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sampa Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8759</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8759"/>
		<updated>2026-07-27T17:58:45Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Grounding.pdf MVT Grounding]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVT vs Sampa Dynamic range, noise etc&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/SNR.png Finding a working point]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8758</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8758"/>
		<updated>2026-07-27T17:57:53Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Grounding.pdf MVT Grounding]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVT vs Sampa Dynamic range, noise etc&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/SNR.png Finding a working point]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8757</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8757"/>
		<updated>2026-07-27T17:57:11Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Grounding.pdf MVT Grounding]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVT vs Sampa Dynamic range, noise etc&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/SNR.png Finding a working point]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8756</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8756"/>
		<updated>2026-07-27T17:56:29Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Grounding.pdf MVT Grounding]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVT vs Sampa Dynamic range, noise etc&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/SNR.png Finding a working point]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8755</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8755"/>
		<updated>2026-07-27T17:55:54Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Grounding.pdf MVT Grounding]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVT vs Sampa Dynamic range, noise etc&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/SNR.png vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8754</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8754"/>
		<updated>2026-07-27T17:50:15Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Grounding.pdf MVT Grounding]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVT vs Sampa Dynamic range and noise&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8753</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8753"/>
		<updated>2026-07-27T17:49:04Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVT vs Sampa Dynamic range and noise&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8752</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8752"/>
		<updated>2026-07-27T17:44:21Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/210427_MvtSampa.pdf MVT vs Sampa Dynamic range]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8751</id>
		<title>Sampa</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Sampa&amp;diff=8751"/>
		<updated>2026-07-27T17:37:58Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Dream-based electronics info&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_FEU_User_Manual.pdf FEU User Manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/CLAS12_MVT_Readout,pdf MVT Readout]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/MVT_Readout_Architecture.pdf MVT Readout Architecture]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DAQ running instructions&#039;&#039;&#039; can be found here:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/index.php/CLON_Standard_Procedures CLON Standard Procedures]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Documentation&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_Sep2018.pdf SAMPA V3 full manual]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_V5_DataSheet_final.pdf SAMPA V5 Data Sheet]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/sampa_i2c.pdf sampa/felix register access instructions from Takao Sakaguchi (Mar 11, 2022)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; CLAS12 Note in Overleaf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link for editing: https://www.overleaf.com/8293172751dbgzdpgzhpvx#31e19b&lt;br /&gt;
&lt;br /&gt;
Link for viewing: https://www.overleaf.com/read/ngbcwczybzdc#8187f4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From Irakli (March 17, 2021)&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
   The main shortcoming in the Sampa V5 is its relatively low dynamic range.&lt;br /&gt;
 You can have linearity range up to 66 fC (30 mV/Fc gain) or up to 100 fC (20 mV/fC gain).&lt;br /&gt;
 Unfortunately the 4 mV/fC gain (500 fC range) has been removed from the Sampa V5.&lt;br /&gt;
 (It was in Sampa V4 but characterized for positive signals).&lt;br /&gt;
   The working point of our current Dream electronics is 200 fC dynamic range.&lt;br /&gt;
 And if needed we can switch to  600 fC or 100 fC.&lt;br /&gt;
   This means that with Sampa V5 you can get quite often in a non-linear range with saturating ADC counts.&lt;br /&gt;
 It does not mean that the very frontend stage of Sampa will not be able to work at high hit rate.&lt;br /&gt;
 It is very robust and can sustain high currents.&lt;br /&gt;
 It is just that you will not be able to recover timing from the pulse maximum.&lt;br /&gt;
 The rising edge should be OK though, if sampling rate is fast enough to have 3 samples per front.&lt;br /&gt;
   The sampling rate of Sampa is 10 or 20 MHz.&lt;br /&gt;
 Current Dream electronics operate at 25 MHz.&lt;br /&gt;
   Concerning the peaking time we are almost there.&lt;br /&gt;
 Sampa can work with 160 ns peaking time and we are using 180 ns peaking time.&lt;br /&gt;
 But Dream has mush more peaking time choice - can be handy in certain cases to get better S/N.&lt;br /&gt;
   Concerning the input capacitance.&lt;br /&gt;
 Normally Sampa V5 is designed for input capacitance ranges of several tens of pF.&lt;br /&gt;
 The MVT strip capacitances vary from  80 to 120 pF.&lt;br /&gt;
 If you will conserve the cables you will need to add 70 to 100pF.&lt;br /&gt;
 Sampa will see 150 pF to 200 pF capacitance.&lt;br /&gt;
 Measurements show (ati Jlab by the way) that Sampa looks stable for this capacitences.&lt;br /&gt;
 But what I expect that for theses capacitances the 20 mV/fC transfer function will be lowered by about 20% and 25% respectively.&lt;br /&gt;
 With increase of the noise level, the S/N ration will suffer, for sure, but may still remain fine, because on can increase detector gain.&lt;br /&gt;
 (Attention though, high detector gain means high probability of ADC saturation).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LV control&#039;&#039;&#039; (PL506 WIENER supply in EEL/125, &#039;mmtblv&#039;, 129.57.86.105)&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:v_set 4.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:i_set 1.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch3:switch 1&lt;br /&gt;
&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:v_set 2.0&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:i_set 5.5&lt;br /&gt;
 caput B_HW_MMTBLV_Sl0_Ch4:switch 1&lt;br /&gt;
&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch3:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
 caget B_HW_MMTBLV_Sl0_Ch4:i_set:fbk&lt;br /&gt;
                           v_set:fbk&lt;br /&gt;
                           i_rd&lt;br /&gt;
                           v_term&lt;br /&gt;
                           v_sens&lt;br /&gt;
&lt;br /&gt;
SNMP for PL506 described here: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/PL506_PL512_with_SNMP.pdf PL506 manual with SNMP description]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER MACHINE REBOOT, login as root and load Felix module:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 insmod /usr/clas12/release/1.4.0/coda/src/tpc-devel_ben/dam_pcie/src/dam_pcie.ko&lt;br /&gt;
&lt;br /&gt;
Also, you may go to /root, run ./ti_init and select option 15 to set TIfanout mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AFTER SAMPA BOARD POWER RECYCLE, LOAD FIRMWARE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Programmer must be connected to Sampa board and to clonpc11 usb. Run VIVADO, click &#039;&#039;Open Hardware Manager&#039;&#039;, then click &#039;&#039;Open Target&#039;&#039; and choose &#039;&#039;Auto Connect&#039;&#039; in popup menu.&lt;br /&gt;
Click on appropriate device (like &#039;&#039;xilinx_tcf/Digilent/210299...&#039;&#039;), device name will shows up below (like &#039;&#039;xc7a200t_0&#039;&#039;). Click on it with right mouse button and select &#039;&#039;Boot from Configuration Memory Device&#039;&#039; from dropdown menu.&lt;br /&gt;
NOTE: for some programmers, you have to run vivado as root, otherwise vivado may not see programmer. Click &#039;&#039;Update device&#039;&#039; on the top of GUI, device status should be &#039;&#039;Programmed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HV control&#039;&#039;&#039; (channel 00 must be 500V, channel 06 - 600V): run &#039;&#039;clascss&#039;&#039; as &#039;&#039;clasrun@clonsl1&#039;&#039;, menu screenshot: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_MM_HV_control.png MM HV Control]&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/Sampa_PMT_HV_control.png PMT HV Control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Test setup data processing is done on clonfarm21, with CODA=/usr/clas12/release/1.4.0_streaming/coda (streaming branch):&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/misc&lt;br /&gt;
 uncomment &#039;#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.00000&lt;br /&gt;
 comment out &#039;//#define WRITE&#039; in &#039;main/dreamsampa.cc&#039;&lt;br /&gt;
 make&lt;br /&gt;
 ./Linux_x86_64_RHEL9/bin/dreamsampa data/svt123sampa_003452.evio.out.00000&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pizza-box computer&#039;&#039;&#039; in the same rack as Dream electronics&lt;br /&gt;
&lt;br /&gt;
Computer is used by Irakli to debug things, it is sedipcu182/129.57.86.95 (user/pass: clas12/clas12).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=JLAB_FADC250&amp;diff=8750</id>
		<title>JLAB FADC250</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=JLAB_FADC250&amp;diff=8750"/>
		<updated>2026-07-01T19:13:14Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Downloads:&lt;br /&gt;
&lt;br /&gt;
V3 library [https://code.jlab.org/fedaq/drivers/faV3 (git)]&lt;br /&gt;
&lt;br /&gt;
Documentation:&lt;br /&gt;
&lt;br /&gt;
V2 modes/data formats [https://clonwiki0.jlab.org/wiki/clondocs/Docs/FADC250_modes_2.pdf (pdf)]&lt;br /&gt;
&lt;br /&gt;
V3 modes/data formats [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Programming_FADCV3_V8a.pdf (pdf)] [https://clonwiki0.jlab.org/wiki/clondocs/Docs/Programming_FADCV3_V8a.docx (docx)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other documentation:&lt;br /&gt;
&lt;br /&gt;
Sep 1, 2011 registers description in [https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_FADC250_1_sep_2011_Programming_the_FADCV2_3.pdf  V2 Programming (pdf)]&lt;br /&gt;
&lt;br /&gt;
Some documentation received on Sep 12, 2011 from Bryan Moffit:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_FADC250_Data_Format_V2_11_13.pdf  V2 data format (pdf)]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_FADC250_V2_ADC_FPGA_V5.pdf  V2 FPGA (pdf)]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_FADC_Signal_Control_Module.pdf  Signal Control Module (pdf)]&lt;br /&gt;
&lt;br /&gt;
Some documentation for V1 FADC:&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_FADC_DataFormat_v1.pdf  V1 data format (pdf)]&lt;br /&gt;
&lt;br /&gt;
[https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_FADC_Prog_v7.pdf V1 Programming ((pdf)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== firmware upgrade procedure from Bryan Moffit April 2013 ==&lt;br /&gt;
&lt;br /&gt;
 1. Copy /root/linuxvme directory tree from pcal0 (or wherever it installed already).&lt;br /&gt;
    scp -r root@pcal0:linuxvme/ .&lt;br /&gt;
 &lt;br /&gt;
 2. Copy /root/.bashrc (to set LINUXVME_* env variables)&lt;br /&gt;
    scp root@pcal0:.bashrc .&lt;br /&gt;
  &lt;br /&gt;
 3. (re)Compile required libraries&lt;br /&gt;
    cd linuxvme/jvme&lt;br /&gt;
    make clean;make&lt;br /&gt;
    cd ~/linuxvme/ti&lt;br /&gt;
    make clean; make ARCH=Linux; make ARCH=Linux tiEMload&lt;br /&gt;
    cd ~/linuxvme/fadcV2&lt;br /&gt;
    make clean; make ARCH=Linux&lt;br /&gt;
    cd firmware/linux&lt;br /&gt;
    make clean; make firmwareGTest&lt;br /&gt;
 &lt;br /&gt;
 4.  Update TI firmware&lt;br /&gt;
    cd ~/linuxvme/ti&lt;br /&gt;
    ./tiEMload ti146.svf&lt;br /&gt;
 &lt;br /&gt;
 5.  Update fADC250 firmware (all in crate)&lt;br /&gt;
    cd ~/linuxvme/fadcV2/firmware/linux&lt;br /&gt;
    ./firmwareGTest 1 ../CTRL_FPGA_V2_TOP_0x0211.mcs&lt;br /&gt;
    ./firmwareGTest 2 ../FADC250_V2_TOP_0x0907.mcs&lt;br /&gt;
 &lt;br /&gt;
 TI firmware can be found in coda.jlab.org, going to &#039;custom hardware, then TI, then firmware.&lt;br /&gt;
&lt;br /&gt;
== Test results - pulser with realistic shape ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* FADC250 Signal: one channel - 100 events; width because of trigger jitter ?&lt;br /&gt;
fadc250.SB.doublepeak.pdf ( [https://clonwiki0.jlab.org/wiki/clondocs/Docs/fadc250/fadc250.SB.doublepeak.pdf pdf])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* FADC250 Signal: one channel - one event&lt;br /&gt;
fadc250.SB.onepeak.pdf ( [https://clonwiki0.jlab.org/wiki/clondocs/Docs/fadc250/fadc250.SB.onepeak.pdf pdf])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* FADC250 Signals, offset=3300 for all channels: 16 channels - one event. Note: channel 6 - dead, channel 15 - overflow due to high offset&lt;br /&gt;
fadc250.SB.16ch.pdf ( [https://clonwiki0.jlab.org/wiki/clondocs/Docs/fadc250/fadc250.SB.16ch.pdf pdf])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* FADC250 Signals, offset=3200 for all channels: 16 channels - one event. Note: channel 6 - dead&lt;br /&gt;
fadc250_16ch.10452.pdf ( [https://clonwiki0.jlab.org/wiki/clondocs/Docs/fadc250/fadc250_16ch.10452.pdf pdf])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* FADC250 Baseline (Pedestal) measurements: presentation in time-line and distribution, based on about 60 hours running with 1 Hz event rate&lt;br /&gt;
fadc250_16ch_bl_ped.10452.pdf ( [https://clonwiki0.jlab.org/wiki/clondocs/Docs/fadc250/fadc250_16ch_bl_ped.10452.pdf pdf])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* FADC250 Offset Calibration&lt;br /&gt;
fadc250_16ch_bl_slope.10453.pdf ( [https://clonwiki0.jlab.org/wiki/clondocs/Docs/fadc250/fadc250_16ch_bl_slope.10453.pdf pdf])&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Network&amp;diff=8749</id>
		<title>Network</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Network&amp;diff=8749"/>
		<updated>2026-06-05T15:01:53Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* Bond four network ports together, links to Maroc electronics (example for clondaq9) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Display traffic ==&lt;br /&gt;
&lt;br /&gt;
 nload -i 10000000 -o 10000000 p6p1&lt;br /&gt;
&lt;br /&gt;
 netstat -anp | grep &amp;lt;port&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; when setting secondary ports in &#039;&#039;nmtui&#039;&#039; as &#039;&#039;manual&#039;&#039;, always specify jlab default &#039;DNS servers&#039; and &#039;Search domains&#039;, just in case !!! It looks like it prevents &#039;&#039;/etc/resolv.conf&#039;&#039; from being overwritten under certain circumstances, for example:&lt;br /&gt;
&lt;br /&gt;
                              ┌───────────────────────────┤ Edit Connection ├───────────────────────────┐&lt;br /&gt;
                              │                                                                         │ &lt;br /&gt;
                              │         Profile name enp161s0np0_____________________________           │ &lt;br /&gt;
                              │               Device enp161s0np0 (94:6D:AE:EF:87:68)_________           │ &lt;br /&gt;
                              │                                                                         │ &lt;br /&gt;
                              │ ═ ETHERNET                                                    &amp;lt;Show&amp;gt;    │ &lt;br /&gt;
                              │ ═ 802.1X SECURITY                                             &amp;lt;Show&amp;gt;    │ &lt;br /&gt;
                              │                                                                         │ &lt;br /&gt;
                              │ ╤ IPv4 CONFIGURATION &amp;lt;Manual&amp;gt;                                 &amp;lt;Hide&amp;gt;    │ &lt;br /&gt;
                              │ │          Addresses 129.57.69.10/24__________ &amp;lt;Remove&amp;gt;                 │ &lt;br /&gt;
                              │ │                    &amp;lt;Add...&amp;gt;                                           │ &lt;br /&gt;
                              │ │            Gateway 129.57.69.1______________                          │ &lt;br /&gt;
                              │ │        DNS servers 129.57.90.255____________ &amp;lt;Remove&amp;gt;                 │ &lt;br /&gt;
                              │ │                    129.57.32.101____________ &amp;lt;Remove&amp;gt;                 │ &lt;br /&gt;
                              │ │                    &amp;lt;Add...&amp;gt;                                           │ &lt;br /&gt;
                              │ │     Search domains jlab.org_________________ &amp;lt;Remove&amp;gt;                 │ &lt;br /&gt;
                              │ │                    acc.jlab.org_____________ &amp;lt;Remove&amp;gt;                 │ &lt;br /&gt;
                              │ │                    &amp;lt;Add...&amp;gt;                                           │ &lt;br /&gt;
                              │ │                                                                       │ &lt;br /&gt;
                              │ │            Routing (No custom routes) &amp;lt;Edit...&amp;gt;                       │ &lt;br /&gt;
                              │ │ [ ] Never use this network for default route                          │ &lt;br /&gt;
                              │ │ [X] Ignore automatically obtained routes                              │ &lt;br /&gt;
                              │ │ [X] Ignore automatically obtained DNS parameters                      │ &lt;br /&gt;
                              │ │                                                                       │ &lt;br /&gt;
                              │ │ [ ] Require IPv4 addressing for this connection                       │ &lt;br /&gt;
                              │ └                                                                       │ &lt;br /&gt;
                              │                                                                         │ &lt;br /&gt;
                              │ ═ IPv6 CONFIGURATION &amp;lt;Automatic&amp;gt;                              &amp;lt;Show&amp;gt;    │ &lt;br /&gt;
                              │                                                                         │ &lt;br /&gt;
                              │ [X] Automatically connect                                               │ &lt;br /&gt;
                              │ [X] Available to all users                                              │ &lt;br /&gt;
                              │                                                                         │ &lt;br /&gt;
                              │                                                           &amp;lt;Cancel&amp;gt; &amp;lt;OK&amp;gt; │ &lt;br /&gt;
                              │                                                                        &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; after changing network,you may need to reboot machine to update &#039;&#039;nmtui&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; New links will shows up as &#039;&#039;Wired connection ..&#039;&#039;, so run &#039;&#039;nmtui&#039;&#039;, and in every new connection change &#039;&#039;Profile name&#039;&#039; from  &#039;&#039;Wired connection ..&#039;&#039; to the actual device name, like &#039;&#039;enp0s29u1u6&#039;&#039;, to avoid confusion while setting bond later.&lt;br /&gt;
&lt;br /&gt;
== Local network configuring using nmtui - example ==&lt;br /&gt;
&lt;br /&gt;
               ┌───────────────────────────┤ Edit Connection ├───────────────────────────┐&lt;br /&gt;
               │                                                                         │&lt;br /&gt;
               │         Profile name localport1______________________________           │&lt;br /&gt;
               │               Device E8:EA:6A:40:2F:50 (enp0s20u6)___________           │&lt;br /&gt;
               │                                                                         │&lt;br /&gt;
               │ ═ ETHERNET                                                    &amp;lt;Show&amp;gt;    │&lt;br /&gt;
               │                                                                         │&lt;br /&gt;
               │ ╤ IPv4 CONFIGURATION &amp;lt;Manual&amp;gt;                                 &amp;lt;Hide&amp;gt;    │&lt;br /&gt;
               │ │          Addresses 192.168.0.11_____________ &amp;lt;Remove&amp;gt;                 │&lt;br /&gt;
               │ │                    &amp;lt;Add...&amp;gt;                                           │&lt;br /&gt;
               │ │            Gateway _________________________                          │&lt;br /&gt;
               │ │        DNS servers &amp;lt;Add...&amp;gt;                                           │&lt;br /&gt;
               │ │     Search domains &amp;lt;Add...&amp;gt;                                           │&lt;br /&gt;
               │ │                                                                       │&lt;br /&gt;
               │ │            Routing (No custom routes) &amp;lt;Edit...&amp;gt;                       │&lt;br /&gt;
               │ │ [X] Never use this network for default route                          │&lt;br /&gt;
               │ │ [X] Ignore automatically obtained routes                              │&lt;br /&gt;
               │ │ [X] Ignore automatically obtained DNS parameters                      │&lt;br /&gt;
               │ │                                                                       │&lt;br /&gt;
               │ │ [X] Require IPv4 addressing for this connection                       │&lt;br /&gt;
               │ └                                                                       │&lt;br /&gt;
               │                                                                         │&lt;br /&gt;
               │ ═ IPv6 CONFIGURATION &amp;lt;Automatic&amp;gt;                              &amp;lt;Show&amp;gt;    │&lt;br /&gt;
               │                                                                         │&lt;br /&gt;
               │ [X] Automatically connect                                               │&lt;br /&gt;
               │ [X] Available to all users                                              │&lt;br /&gt;
               │                                                                         │&lt;br /&gt;
               │                                                           &amp;lt;Cancel&amp;gt; &amp;lt;OK&amp;gt; │&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bond two network ports together, links to the switch (example for clonfarm21) ==&lt;br /&gt;
&lt;br /&gt;
 nmcli connection add type bond con-name enp_bond ifname enp_bond bond.options mode=802.3ad&lt;br /&gt;
 nmcli connection add type ethernet ifname ens7np0 master enp_bond&lt;br /&gt;
 nmcli connection add type ethernet ifname ens2np0 master enp_bond&lt;br /&gt;
 nmcli connection show&lt;br /&gt;
&lt;br /&gt;
Last command will show follwoing:&lt;br /&gt;
&lt;br /&gt;
 NAME                UUID                                  TYPE      DEVICE   &lt;br /&gt;
 enp_bond            969dc408-bb43-49e0-8c29-62965f70f4c7  bond      enp_bond &lt;br /&gt;
 ens10f0             f333ab08-b67a-41c9-9108-7658af3435d0  ethernet  ens10f0  &lt;br /&gt;
 ens2np0             85e7f4bd-5daf-3095-b207-bdcaf14d903c  ethernet  ens2np0  &lt;br /&gt;
 ens7np0             5abd79b1-22e9-4210-9262-fc2dbbda51f7  ethernet  ens7np0  &lt;br /&gt;
 lo                  bcf93a26-5114-45c5-b586-9288dfefbb33  loopback  lo       &lt;br /&gt;
 bond-slave-ens2np0  7961787a-f51f-459d-9bf8-0add8a528679  ethernet  --       &lt;br /&gt;
 bond-slave-ens7np0  aa376ad3-fd9f-44a2-8154-04685ce2da72  ethernet  --       &lt;br /&gt;
 ens10f1             0c14d2dd-c3bc-4d3d-8c7d-04cded521498  ethernet  --       &lt;br /&gt;
 usb0                4fef7067-fb03-4115-ac62-c95a91979384  ethernet  --&lt;br /&gt;
&lt;br /&gt;
Now, set bond method to &#039;manual&#039;, and set IP address:&lt;br /&gt;
&lt;br /&gt;
 nmcli connection modify enp_bond ipv4.method manual ipv4.address 129.57.69.11/24&lt;br /&gt;
&lt;br /&gt;
Set [[Routing]] if needed.&lt;br /&gt;
&lt;br /&gt;
Run &#039;nmtui&#039;, you can actually do there everything what was done above. In addition, set mode &#039;&#039;&#039;Broadcast&#039;&#039;&#039; (IT IS IMPORTANT !), and MII=100/0/0.&lt;br /&gt;
&lt;br /&gt;
Finally, disactivate both ens2np0 and ens7np0, and activate enp_bond; using &#039;nmtui&#039;, or command &#039;nmcli connection down/up &amp;lt;connection&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: in our case, enp_bond inheritate mac from ens2np0, but IP from ens7np0; only ens7np0 was registered on jnet.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: to change hash policy to &#039;&#039;layer3+4&#039;&#039;, do following&lt;br /&gt;
&lt;br /&gt;
 echo 1 &amp;gt; /sys/class/net/enp_bond/bonding/xmit_hash_policy&lt;br /&gt;
 cat /sys/class/net/enp_bond/bonding/xmit_hash_policy&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: to change frame size (default mtu=1500), do following&lt;br /&gt;
&lt;br /&gt;
 nmcli connection modify enp_bond 802-3-ethernet.mtu 9000&lt;br /&gt;
&lt;br /&gt;
to check result (and other setting):&lt;br /&gt;
&lt;br /&gt;
 more /etc/NetworkManager/system-connections/enp_bond.nmconnection&lt;br /&gt;
&lt;br /&gt;
It can be done temporary, for example for interface &#039;&#039;ens2np0&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 ip link set dev ens2np0 mtu 9000&lt;br /&gt;
&lt;br /&gt;
To apply changes, restart NetworkManager:&lt;br /&gt;
&lt;br /&gt;
 systemctl restart NetworkManager&lt;br /&gt;
&lt;br /&gt;
or bring the connection down and up:&lt;br /&gt;
&lt;br /&gt;
 nmcli connection down ens2np0&lt;br /&gt;
 nmcli connection up ens2np0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To delete bond, run following command:&lt;br /&gt;
&lt;br /&gt;
 nmcli connection delete enp_bond&lt;br /&gt;
&lt;br /&gt;
== Bond four network ports together, links to Maroc electronics (example for clondaq9) ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; to add new interface to existing bond, delete bond completely and create it from scratch as described below&lt;br /&gt;
&lt;br /&gt;
 nmcli connection add type bond con-name enp_bond ifname enp_bond bond.options mode=broadcast&lt;br /&gt;
 nmcli connection add type ethernet ifname enp0s20u5 master enp_bond&lt;br /&gt;
 nmcli connection add type ethernet ifname enp0s20u6 master enp_bond&lt;br /&gt;
 nmcli connection add type ethernet ifname enp0s29u1u5 master enp_bond&lt;br /&gt;
 nmcli connection add type ethernet ifname enp0s29u1u6 master enp_bond&lt;br /&gt;
 nmcli connection show&lt;br /&gt;
 nmcli connection modify enp_bond ipv4.method manual ipv4.address 192.168.0.2/24&lt;br /&gt;
&lt;br /&gt;
Deactivate individual ports and activate bond:&lt;br /&gt;
&lt;br /&gt;
 nmcli connection down enp0s20u5&lt;br /&gt;
 nmcli connection down enp0s20u6&lt;br /&gt;
 nmcli connection down enp0s29u1u5&lt;br /&gt;
 nmcli connection down enp0s29u1u6&lt;br /&gt;
 nmcli connection up enp_bond&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run &#039;&#039;nmtui&#039;&#039; and fix remaining details - screen should looks like this:&lt;br /&gt;
         ┌────────────────────────────┤ Edit Connection ├────────────────────────────┐&lt;br /&gt;
         │                                                                           │&lt;br /&gt;
         │           Profile name enp_bond________________________________           │&lt;br /&gt;
         │                 Device enp_bond________________________________           │&lt;br /&gt;
         │                                                                           │&lt;br /&gt;
         │ ╤ BOND                                                          &amp;lt;Hide&amp;gt;    │&lt;br /&gt;
         │ │ Slaves                                                                  │&lt;br /&gt;
         │ │ ┌─────────────────────────────────────────────────┐                     │&lt;br /&gt;
         │ │ │ bond-slave-enp0s29u1u6                        ↑ │ &amp;lt;Add&amp;gt;               │&lt;br /&gt;
         │ │ │ bond-slave-enp0s29u1u5                        ▒ │                     │&lt;br /&gt;
         │ │ │ bond-slave-enp0s20u6                          ▒ │ &amp;lt;Edit...&amp;gt;           │&lt;br /&gt;
         │ │ │ bond-slave-enp0s20u5                          ▒ │                     │&lt;br /&gt;
         │ │ │                                               ▒ │ &amp;lt;Delete&amp;gt;            │&lt;br /&gt;
         │ │ │                                               ↓ │                     │&lt;br /&gt;
         │ │ └─────────────────────────────────────────────────┘                     │&lt;br /&gt;
         │ │                 Mode &amp;lt;Broadcast&amp;gt;                                        │&lt;br /&gt;
         │ │      Link monitoring &amp;lt;MII (recommended)&amp;gt;                                │&lt;br /&gt;
         │ │ Monitoring frequency 100_______ ms                                      │&lt;br /&gt;
         │ │        Link up delay 0_________ ms                                      │&lt;br /&gt;
         │ │      Link down delay 0_________ ms                                      │&lt;br /&gt;
         │ │   Cloned MAC address ________________________________________           │&lt;br /&gt;
         │ └                                                                         │&lt;br /&gt;
         │                                                                           │&lt;br /&gt;
         │ ╤ IPv4 CONFIGURATION   &amp;lt;Manual&amp;gt;                                 &amp;lt;Hide&amp;gt;    │&lt;br /&gt;
         │ │            Addresses 192.168.0.2/24___________ &amp;lt;Remove&amp;gt;                 │&lt;br /&gt;
         │ │                      &amp;lt;Add...&amp;gt;                                           │&lt;br /&gt;
         │ │              Gateway _________________________                          │&lt;br /&gt;
         │ │          DNS servers &amp;lt;Add...&amp;gt;                                           │&lt;br /&gt;
         │ │       Search domains &amp;lt;Add...&amp;gt;                                           │&lt;br /&gt;
         │ │                                                                         │&lt;br /&gt;
         │ │              Routing (No custom routes) &amp;lt;Edit...&amp;gt;                       │&lt;br /&gt;
         │ │ [X] Never use this network for default route                            │&lt;br /&gt;
         │ │ [X] Ignore automatically obtained routes                                │&lt;br /&gt;
         │ │ [X] Ignore automatically obtained DNS parameters                        │&lt;br /&gt;
         │ │                                                                         │&lt;br /&gt;
         │ │ [X] Require IPv4 addressing for this connection                         │&lt;br /&gt;
         │ └                                                                         │&lt;br /&gt;
         │                                                                           │&lt;br /&gt;
         │ ═ IPv6 CONFIGURATION   &amp;lt;Automatic&amp;gt;                              &amp;lt;Show&amp;gt;    │&lt;br /&gt;
         │                                                                           │&lt;br /&gt;
         │ [X] Automatically connect                                                 │&lt;br /&gt;
         │ [X] Available to all users                                                │&lt;br /&gt;
         │                                                                           │&lt;br /&gt;
         │                                                             &amp;lt;Cancel&amp;gt; &amp;lt;OK&amp;gt; │&lt;br /&gt;
         │                                                                           │&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8748</id>
		<title>MySQL Installation</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8748"/>
		<updated>2026-05-27T15:00:05Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; RHEL9&#039;s yum offers mariadb10.5 and mysql8.0 by default. To see newer alternatives available, run &lt;br /&gt;
&lt;br /&gt;
 dnf module list mariadb&lt;br /&gt;
 dnf module list mysql&lt;br /&gt;
&lt;br /&gt;
If you want to use for example mariadb version 10.11 instead of 10.5, run&lt;br /&gt;
&lt;br /&gt;
 dnf module enable mariadb:10.11&lt;br /&gt;
&lt;br /&gt;
To go back to default, run&lt;br /&gt;
&lt;br /&gt;
 dnf module disable mariadb:10.11&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installation on clondb2 (or any new server).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Build server using options H and B; on formatting stage, create directory &#039;&#039;/database&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Stop and disable puppet:&lt;br /&gt;
&lt;br /&gt;
 systemctl stop puppet&lt;br /&gt;
 systemctl disable puppet&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 yum install mysql-server&lt;br /&gt;
&lt;br /&gt;
Set appropriate ownership for &#039;&#039;/database&#039;&#039; directory (assuming that &#039;&#039;/database&#039;&#039; directory exists):&lt;br /&gt;
&lt;br /&gt;
 chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Sometimes mysql log files can be very large, so they can be placed to separate partition if available, for example &#039;&#039;/data/logs&#039;&#039;, in that case adjust corresponding line &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NONONO!!!&#039;&#039;&#039; Create subdirectories if using &#039;&#039;/database&#039;&#039; area:&lt;br /&gt;
 mkdir /database/logs&lt;br /&gt;
 mkdir /database/run&lt;br /&gt;
 chown mysql:mysql /database/log&lt;br /&gt;
 chown mysql:mysql /database/run&lt;br /&gt;
&lt;br /&gt;
Modify settings in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section) as following (example from clondb1 27-May-2026):&lt;br /&gt;
&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 ##datadir=/var/lib/mysql&lt;br /&gt;
 datadir=/database&lt;br /&gt;
 socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
 ##socket=/database/run/mysql.sock&lt;br /&gt;
 ##log-error=/var/log/mysql/mysqld.log&lt;br /&gt;
 log-error=/database/log/mysqld.log&lt;br /&gt;
 ##pid-file=/run/mysqld/mysqld.pid&lt;br /&gt;
 pid-file=/database/run/mysqld.pid&lt;br /&gt;
 &lt;br /&gt;
 ###&lt;br /&gt;
 # sergey: following some of Marty&#039;s settings&lt;br /&gt;
 ###&lt;br /&gt;
 &lt;br /&gt;
 # Tuning parameters&lt;br /&gt;
 open-files-limit                =  1040400&lt;br /&gt;
 max_connections                 = 1024&lt;br /&gt;
 &lt;br /&gt;
 # Basically disable client lockout due to bad connections&lt;br /&gt;
 max_connect_errors              = 1000&lt;br /&gt;
 &lt;br /&gt;
 ###key_buffer                      = 256M&lt;br /&gt;
 max_allowed_packet              = 64M&lt;br /&gt;
 ###query_cache_size                = 64M&lt;br /&gt;
 ###query_cache_type                = On&lt;br /&gt;
 ###table_cache                     = 512&lt;br /&gt;
 ###sort_buffer                     = 1M&lt;br /&gt;
 myisam_sort_buffer_size         = 64M&lt;br /&gt;
 ###thread_cache                    = 16&lt;br /&gt;
 tmp_table_size                  = 64M&lt;br /&gt;
 max_heap_table_size             = 64M&lt;br /&gt;
 &lt;br /&gt;
 # InnoDB Config&lt;br /&gt;
 innodb_data_home_dir            = data&lt;br /&gt;
 innodb_data_file_path           = ibdata1:10M:autoextend&lt;br /&gt;
 ###innodb_log_group_home_dir       = data&lt;br /&gt;
 innodb_undo_directory           = data&lt;br /&gt;
 &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 %&lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 #innodb_buffer_pool_size         = 256M&lt;br /&gt;
 innodb_buffer_pool_size         = 4G&lt;br /&gt;
 ###innodb_additional_mem_pool_size = 20M&lt;br /&gt;
 &lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size            = 64M&lt;br /&gt;
 innodb_log_buffer_size          = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit  = 1&lt;br /&gt;
 innodb_lock_wait_timeout        = 50&lt;br /&gt;
 ###innodb_use_sys_malloc           = On&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a replication master for replication to externally visible slave, but also&lt;br /&gt;
 # to provide point in time DB recovery if needed.&lt;br /&gt;
 server-id                       = 1111&lt;br /&gt;
 log-bin                         = data/mysql-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 ##expire_logs_days                = 14&lt;br /&gt;
 binlog_expire_logs_seconds      = 604800&lt;br /&gt;
 &lt;br /&gt;
 #sergey: added 2 following lines on Jason Cooper request 30-apr-2026&lt;br /&gt;
 binlog-row-value-options        = &amp;quot;&amp;quot;&lt;br /&gt;
 binlog_transaction_compression  = 0&lt;br /&gt;
 &lt;br /&gt;
 #sergey: trying to make mariadb replica happy ...&lt;br /&gt;
 character-set-server = utf8mb3&lt;br /&gt;
 collation-server = utf8mb3_general_ci&lt;br /&gt;
 skip-character-set-client-handshake&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a slave if necessary...&lt;br /&gt;
 skip_slave_start                = 0&lt;br /&gt;
 #read-only                      = 0&lt;br /&gt;
 #relay-log                      = mysql-relay-bin&lt;br /&gt;
 report-host                     = clondb1.jlab.org&lt;br /&gt;
 ###replicate-do-db                   = clas12&lt;br /&gt;
 &lt;br /&gt;
 # Diagnostic Logging configuration&lt;br /&gt;
 ###log-warnings                    = 2&lt;br /&gt;
 general-log                     = 1&lt;br /&gt;
 general_log_file                = /database/log/mysqld-general.log&lt;br /&gt;
 slow_query_log                  = 1&lt;br /&gt;
 slow_query_log_file             = /database/log/mysqld-slow-queries.log&lt;br /&gt;
 &lt;br /&gt;
 #sergey: ???&lt;br /&gt;
 #[isamchk]&lt;br /&gt;
 #key_buffer                      = 128M&lt;br /&gt;
 #sort_buffer                     = 128M&lt;br /&gt;
 #read_buffer                     = 2M&lt;br /&gt;
 #write_buffer                    = 2M&lt;br /&gt;
 &lt;br /&gt;
 #sergey: ???&lt;br /&gt;
 #[myisamchk]&lt;br /&gt;
 #key_buffer                      = 128M&lt;br /&gt;
 #sort_buffer                     = 128M&lt;br /&gt;
 #read_buffer                     = 2M&lt;br /&gt;
 #write_buffer                    = 2M&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; during reboot, directory &#039;&#039;/run/mysqld&#039;&#039; was not created by &#039;&#039;systemd-tmpfiles-setup.service&#039;&#039;, although corresponding file &#039;&#039;/usr/lib/tmpfiles.d/mysqld.conf&#039;&#039; contains line &#039;&#039;d /run/mysqld 0755 mysql mysql -&#039;&#039;, error message from tmpfiles service is following:&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/mysqld.conf:1: Failed to resolve user &#039;mysql&#039;: No such process&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/nss-pam-ldapd.conf:2: Failed to resolve user &#039;nslcd&#039;: No such process&lt;br /&gt;
Since we moved PID file to &#039;&#039;/database/run&#039;&#039; directory, it does not effect us, but still ... Problem seems related to the missing &#039;&#039;mysql&#039;&#039; user in &#039;&#039;/etc/passwd&#039;&#039;. That user exists globally on CUE, but during boot it seems not available yet. Not sure why mysqld installation process did not create that user locally, or maybe puppet removed it ... anyway I added line &#039;&#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/sbin/nologin&#039;&#039; manually to &#039;&#039;/etc/passwd&#039;&#039;, and problem was solved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable mysql server:&lt;br /&gt;
 systemctl enable --now mysqld.service&lt;br /&gt;
&lt;br /&gt;
Check server status:&lt;br /&gt;
 systemctl status mysqld.service&lt;br /&gt;
&lt;br /&gt;
Go to old database machine and backup all databases, for example for clondb1:&lt;br /&gt;
 mysqldump -u root -p --routines --events --triggers --single-transaction --result-file=clondb1_full_backup.sql --all-databases&lt;br /&gt;
&lt;br /&gt;
Copy file &#039;&#039;clondb1_full_backup.sql&#039;&#039; to the new server &#039;&#039;clondb2&#039;&#039; and run following command:&lt;br /&gt;
 mysql &amp;lt; clondb1_full_backup.sql&lt;br /&gt;
&lt;br /&gt;
Restart service, it is needed in particular to upgrade &#039;&#039;mysql.user&#039;&#039; and maybe other tables imported from another mysql server:&lt;br /&gt;
 systemctl restart mysqld.service&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if dumping older database, using &#039;--all-databases&#039; in &#039;mysqldump&#039; command may screwed up something, for example error message &#039;ERROR 1449 (HY000): The user specified as a definer (&#039;mysql.infoschema&#039;@&#039;localhost&#039;) does not exist&#039; may shows up; to fix it, do force upgrade: add/uncomment line &#039;&#039;upgrade=FORCE&#039;&#039; in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; file, and restart service, after that comment that line out.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: set legacy authentication in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section), needed until all clients are mysql8.0 or higher&lt;br /&gt;
 default_authentication_plugin=mysql_native_password&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if importing from older database, it seems previous setting is not enough, every user&#039;s plugin have to be set specifically to &#039;&#039;mysql_native_password&#039;&#039;, at least for users without passwords, for example:&lt;br /&gt;
 ALTER USER &#039;clasrun&#039;@&#039;%&#039; IDENTIFIED WITH mysql_native_password;&lt;br /&gt;
or if it does not work, create new account with previous one deleted, and then restore old account name, using &#039;&#039;phpMyAdmin&#039;&#039;: User accounts-&amp;gt;Edit privileges-&amp;gt;Login information-&amp;gt;Authentication plugin.&#039;&#039;&#039; Make sure password/nopassword is preserved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; inserting &#039;rcdb&#039; produced errors which were overruled by&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 mysql&amp;gt; SOURCE /root/clondb1_rcdb_backup.sql&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 1;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; increasing open file limit in &#039;&#039;/etc/my*&#039; config file (like &#039;&#039;open_files_limit=65535&#039;&#039; or in older versions &#039;&#039;open-files-limit=65535&#039;&#039;) may not be enough; run command&lt;br /&gt;
 systemctl edit mysql.service (or mariadb.service)&lt;br /&gt;
and add following:&lt;br /&gt;
 [Service]&lt;br /&gt;
 LimitNOFILE=65535&lt;br /&gt;
 # LimitMEMLOCK=infinity # Optional, if needed&lt;br /&gt;
then reload and restart corresponding services:&lt;br /&gt;
 systemctl deamon-reload&lt;br /&gt;
 systemctl restart mysql.service (or mariadb.service)&lt;br /&gt;
and check actual setting in mysql session:&lt;br /&gt;
 SHOW VARIABLES LIKE &#039;open%&#039;;&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | Variable_name    | Value |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | open_files_limit | 65535 |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 1 row in set (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was an error in &#039;mysql &amp;lt; clondb3_full_backup.sql&#039; connamd:&lt;br /&gt;
 ERROR 1418 (HY000) at line 1013: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)&lt;br /&gt;
It was fixed by following setting in mysql root session:&lt;br /&gt;
 SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
&lt;br /&gt;
Mount file server partition for mysql backups: add following line to &#039;&#039;/etc/auto.direct&#039;&#039;:&lt;br /&gt;
 /mysql                -rw,bg     clonfs1:/vol/mysql&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/dbdumperpw.txt&#039;&#039; containing mysql password for the user &#039;&#039;dbdumper&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/usr/bin/mail&#039;&#039; installed.&lt;br /&gt;
&lt;br /&gt;
Start backup cronjob from clascron account:&lt;br /&gt;
 20 9,18 * * * (/usr/local/bin/dumpdb clondb1new dbdumper /mysql/clondb1new/backup) | mail -s &amp;quot;DB Dump from clondb1new&amp;quot; boiarino@jlab.org&lt;br /&gt;
&lt;br /&gt;
== Installation of the older MariaDB on RHEL9 from source ==&lt;br /&gt;
&lt;br /&gt;
 cd /root&lt;br /&gt;
 cp /usr/downloads/mariadb-5.5.68.tar.gz .&lt;br /&gt;
 tar -xzvf mariadb-5.5.68.tar.gz&lt;br /&gt;
 rm mariadb-5.5.68.tar.gz&lt;br /&gt;
 cd mariadb-5.5.68&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake .. -DCMAKE_INSTALL_PREFIX=/root/mysql -DMYSQL_DATADIR=/database -DDISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING=TRUE&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was compilation error, I commented out soome lines in &#039;&#039;storage/tokudb/ft-index/portability/toku_pthread.cc&#039;&#039;, probably there is better way ... :&lt;br /&gt;
&lt;br /&gt;
 int toku_pthread_yield(void) {&lt;br /&gt;
    //#if defined(HAVE_PTHREAD_YIELD)&lt;br /&gt;
    //# if defined(PTHREAD_YIELD_RETURNS_INT)&lt;br /&gt;
    return pthread_yield();&lt;br /&gt;
    //# elif defined(PTHREAD_YIELD_RETURNS_VOID)&lt;br /&gt;
    //    pthread_yield();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //# else&lt;br /&gt;
    //#  error &amp;quot;don&#039;t know what pthread_yield() returns&amp;quot;&lt;br /&gt;
    //# endif&lt;br /&gt;
    //#elif defined(HAVE_PTHREAD_YIELD_NP)&lt;br /&gt;
    //    pthread_yield_np();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //#else&lt;br /&gt;
    //# error &amp;quot;cannot find pthread_yield or pthread_yield_np&amp;quot;&lt;br /&gt;
    //#endif&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysql:27&#039; user and &#039;mysql:27&#039; group exists.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/root&#039;&#039; is &#039;&#039;drwxr-xr-x.  root root&#039;&#039;, &#039;&#039;/root/mysql&#039;&#039; is &#039;&#039;drwxr-xr-x. root root&#039;&#039;, and &#039;&#039;/database&#039;&#039; is &#039;&#039;drwxr-xr-x. mysql mysql&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Initialize the Data Directory: The initial system tables and data directory need to be created before MariaDB can run:&lt;br /&gt;
 cd /root/mysql&lt;br /&gt;
 scripts/mysql_install_db --user=mysql --basedir=/root/mysql --datadir=/database&lt;br /&gt;
&lt;br /&gt;
Start the MariaDB server manually to make sure it is running:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe&lt;br /&gt;
&lt;br /&gt;
Import everything from the old clondb3&#039;s sql file:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysql -u root&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SOURCE /root/clondb3_full_backup.sql;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; in case of &#039;&#039;root&#039;&#039; access problems, run it with following flags:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe --skip-grant-tables --skip-networking&lt;br /&gt;
&lt;br /&gt;
or, if you know &#039;&#039;root@loocalhost&#039;&#039; password on older clondb3, enter mysql with that password. Alter &#039;&#039;root@localhost&#039;&#039; user setting it as &#039;&#039;no password&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To run it as systemd service, create file &#039;&#039;/usr/lib/systemd/system/mariadb.service&#039;&#039; with following content:&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Mariadb 5.5&lt;br /&gt;
 After=network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=forking&lt;br /&gt;
 PrivateTmp=true&lt;br /&gt;
 User=mysql&lt;br /&gt;
 Group=mysql&lt;br /&gt;
 ExecStart=/root/mysql/support-files/mysql.server start&lt;br /&gt;
 ExecStop=/root/mysql/support-files/mysql.server stop&lt;br /&gt;
 Restart=on-abort&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Enable and start service:&lt;br /&gt;
&lt;br /&gt;
 systemctl daemon-reload&lt;br /&gt;
 systemctl enable mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
Uses mariadb instead of mysql:&lt;br /&gt;
&lt;br /&gt;
 systemctl restart mariadb&lt;br /&gt;
&lt;br /&gt;
useful commands:&lt;br /&gt;
&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
 systemctl stop mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if cannot ssh to clondb1 from unix machine(s), try to ssh from one of the ROCs !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Master replica setting for computer center&#039;s slave (database &#039;rcdb&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/my/cnf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 open-files-limit                =  1040400&lt;br /&gt;
 server-id=1111&lt;br /&gt;
 log-bin                         = mariadb-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;systemctl restart mariadb&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
ssh root@clondb1 and do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@&#039;%.jlab.org&#039; IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
 USE rcdb;&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;mysqldump -u root -p --opt rcdb &amp;gt; rcdb.sql&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 UNLOCK TABLES;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Tell computer center following info: username(replica), password(clonreplica), output of command &#039;SHOW MASTER STATUS&#039;, and file &#039;rcdb.sql&#039; location.&lt;br /&gt;
&lt;br /&gt;
== Main MySQL server on clondb1 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clondb1&#039;&#039; is the primary MYSQL machine for CLAS Online databases, it is running MYSQL server and has database on its local disk in /database. All other CLON cluster machines have MYSQL installed but server should not be run there&lt;br /&gt;
&lt;br /&gt;
Installation for RHEL4 machines with satelite service (type following as &#039;root&#039;):&lt;br /&gt;
&lt;br /&gt;
  up2date mysql&lt;br /&gt;
  up2date mysql-server&lt;br /&gt;
&lt;br /&gt;
version 4.1.20 was obtained August 19, 2006; newer version can be installed if &#039;up2date&#039; will be used in future; repeat that procedure on all Linux_i686 and Linux_x86_64 machines.&lt;br /&gt;
&lt;br /&gt;
Installation for all other machines: Get tarball &#039;mysql-4.1.20.tar.gz&#039; from http://www.mysql.com/ and place it to /usr/local/downloads on CLON fileserver. Then do following:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 cp ../downloads/mysql-4.1.20.tar.gz .&lt;br /&gt;
 gunzip mysql-4.1.20.tar.gz&lt;br /&gt;
 tar xvf mysql-4.1.20.tar&lt;br /&gt;
 rm mysql-4.1.20.tar&lt;br /&gt;
 cd mysql-4.1.20&lt;br /&gt;
&lt;br /&gt;
Linux:&lt;br /&gt;
 ./configure --prefix=/usr --without-server&lt;br /&gt;
&lt;br /&gt;
Solaris:&lt;br /&gt;
 bash&lt;br /&gt;
 CC=cc CFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; CXX=CC CXXFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; ./configure --prefix=/usr --without-server&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
Repeat for all SunOS_i86pc, SunOS_sun4u, Linux_ppc machines. Login as &#039;root&#039; and do:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysql-4.1.20&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
It will install everything into /usr/bin, /usr/lib and /usr/include/mysql (same directories as on RHEL4).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; you may want to create symbolic links from &#039;&#039;/usr/lib&#039;&#039; to &#039;&#039;/usr/lib/mysql&#039;&#039; area for the libraries if it was not done by installation procedure:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/lib&lt;br /&gt;
 ln -s mysql/libmysqlclient.a libmysqlclient.a&lt;br /&gt;
 ln -s mysql/libmysqlclient.so libmysqlclient.so&lt;br /&gt;
 ln -s mysql/libmysqlclient.so.14 libmysqlclient.so.14&lt;br /&gt;
&lt;br /&gt;
Clondb1 preparations:&lt;br /&gt;
&lt;br /&gt;
Login as &#039;root&#039; and execute following commands:&lt;br /&gt;
&lt;br /&gt;
  id mysql&lt;br /&gt;
&lt;br /&gt;
you should see something like this:&lt;br /&gt;
&lt;br /&gt;
  uid=27(mysql) gid=27(mysql) groups=27(mysql)&lt;br /&gt;
&lt;br /&gt;
If &#039;mysql&#039; user or group does not exist, create it.&lt;br /&gt;
Specify desired database directory in &#039;/etc/my.cnf&#039;:&lt;br /&gt;
&lt;br /&gt;
  ###datadir=/var/lib/mysql&lt;br /&gt;
  datadir=/database&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;/var/lib/mysql&#039; directory has appropriate ownership (in our case basedir=/var/lib):&lt;br /&gt;
&lt;br /&gt;
  drwxr-xr-x   2 mysql     mysql    4096 Jun  1 23:42 mysql&lt;br /&gt;
&lt;br /&gt;
Same about /database:&lt;br /&gt;
&lt;br /&gt;
  chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Modify &#039;/etc/my.cnf&#039; if neseccary.&lt;br /&gt;
&lt;br /&gt;
Starting mysql server:&lt;br /&gt;
&lt;br /&gt;
  cd /var/lib/mysql&lt;br /&gt;
  mysql_install_db --user=mysql&lt;br /&gt;
&lt;br /&gt;
some useful instructions will be printed:&lt;br /&gt;
&lt;br /&gt;
  To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
  to the right place for your system&lt;br /&gt;
  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
  To do so, start the server, then issue the following commands:&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;new-password&#039;&lt;br /&gt;
  /usr/bin/mysqladmin -u root -h clondb1.jlab.org password &#039;new-password&#039;&lt;br /&gt;
  See the manual for more instructions.&lt;br /&gt;
  You can start the MySQL daemon with:&lt;br /&gt;
  cd /usr ; /usr/bin/mysqld_safe &amp;amp;&lt;br /&gt;
  You can test the MySQL daemon with the benchmarks in the &#039;sql-bench&#039; directory:&lt;br /&gt;
  cd sql-bench ; perl run-all-tests&lt;br /&gt;
  Please report any problems with the /usr/bin/mysqlbug script!&lt;br /&gt;
  The latest information about MySQL is available on the web at&lt;br /&gt;
  http://www.mysql.com&lt;br /&gt;
  Support MySQL by buying support/licenses at http://shop.mysql.com&lt;br /&gt;
&lt;br /&gt;
Now start mysql deamon:&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
NOTE: it did not worked, and wierd thing happened: when I tried to modify /etc/init.d/mysqld it started to work&lt;br /&gt;
right after I touched it; no real changes were applied, just file date was changed ...&lt;br /&gt;
It can be started as well as following: (cd /usr; /usr/bin/mysqld_safe &amp;amp;)&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysqld&#039; is running:&lt;br /&gt;
&lt;br /&gt;
  ps -ef | grep mysql&lt;br /&gt;
    root     23028 21947  0 20:54 pts/2    00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf&lt;br /&gt;
       --pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
    mysql    23053 23028  0 20:54 pts/2    00:00:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf &lt;br /&gt;
       --basedir=/usr --datadir=/database --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking&lt;br /&gt;
       --socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
Set mysql root password:&lt;br /&gt;
&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;********&#039;&lt;br /&gt;
&lt;br /&gt;
== MySQL server on Intel-based VME controllers ==&lt;br /&gt;
&lt;br /&gt;
To run standalone DAQ on Intel-based VME controller, MySQL server must be local. Following steps were performed to activate it:&lt;br /&gt;
&lt;br /&gt;
* yum install mysql mysql-devel mysql-server&lt;br /&gt;
&lt;br /&gt;
* NOTE: previous will create mysql user amd group and do other stuff, so you can skip following:&lt;br /&gt;
&lt;br /&gt;
 add &#039;mysql:x:27:&#039; to the /etc/group file if it is not there&lt;br /&gt;
 add &#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash&#039; to the /etc/passwd file if it is not there&lt;br /&gt;
 mkdir /var/lib/mysql&lt;br /&gt;
 chown mysql:mysql /var/lib/mysql&lt;br /&gt;
 mkdir /var/run/mysqld/&lt;br /&gt;
 chown mysql:mysql /var/run/mysqld/&lt;br /&gt;
&lt;br /&gt;
* create /var/lib/mysql/ directory in /root area and place appropriate line into /snapshot/files&lt;br /&gt;
&lt;br /&gt;
* reboot controller, mysql directory must be copied into custom area of the controller&lt;br /&gt;
&lt;br /&gt;
* /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
* mysql -h localhost -u root(should be able to enter mysql); GRANT ALL PRIVILEGES ON *.* TO &#039;clasrun&#039;@&#039;svt2.jlab.org&#039;; FLUSH PRIVILEGES;&lt;br /&gt;
&lt;br /&gt;
* cd /var/lib/mysql/&lt;br /&gt;
&lt;br /&gt;
* ssh clondb1; mysqldump --databases daq_daq daq_clasdev -h clondb1 -u root -p &amp;gt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
* mysql --force -h localhost -u root &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
== Dumping ==&lt;br /&gt;
&lt;br /&gt;
Dump is running as a cron job from clascron account on clondb1. See /database/dumpdb script. It accually locks table-by-table and dumps them, so it is not a whole database snapshot. Maybe better to run it on slave server locking whole database ...&lt;br /&gt;
&lt;br /&gt;
== Setting up replica ==&lt;br /&gt;
&lt;br /&gt;
clondb2 is a slave MySQL replica for the master running on clondb1 machine.&lt;br /&gt;
&lt;br /&gt;
Set up an account on the master server &#039;&#039;clondb1&#039;&#039; that the slave can use to make its connection. You need to grant the account REPLICATION SLAVE privilege:&lt;br /&gt;
&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@clondb2.jlab.org IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
&lt;br /&gt;
Take a snapshot of the data on the master server:&lt;br /&gt;
 &lt;br /&gt;
a) Lock all the tables on the master (flush to disk and lock):&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
&lt;br /&gt;
b) Run&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
and note the File and Position (if blank, don&#039;t worry). Accually it can be found in mirror.sql file (see below).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: do not exit MySQL session !!! LEAVE the MySQL client that you used for that running.&lt;br /&gt;
This will prevent updates while you&#039;re copying to your mirror.&lt;br /&gt;
&lt;br /&gt;
NOTE: when mysqldump started (see below) database will be locked, and it stays locked until dump is finished; when it is finished database will be unlocked; it seems not necessary to do (a),(b) and (d).&lt;br /&gt;
&lt;br /&gt;
c) From another window, take a dump of the data on the Master server:&lt;br /&gt;
 mysqldump --master-data --all-databases -uroot -p &amp;gt; mirror.sql&lt;br /&gt;
 &lt;br /&gt;
d) UNLOCK TABLES;&lt;br /&gt;
&lt;br /&gt;
5. Check that the Master server has an ID set and is running with the log-bin option. This should be in the my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 log-bin=mysql-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
or just (as it is now on clondb1):&lt;br /&gt;
 log-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
Server ids (Master and Slave) must all be unique positive integers.&lt;br /&gt;
&lt;br /&gt;
NOTE: to cleanup log-bin files do following:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25 22:00:00&#039;;&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25&#039;;&lt;br /&gt;
&lt;br /&gt;
or ask mysql to cleanup old files:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; SET GLOBAL expire_logs_days=10;&lt;br /&gt;
  mysql&amp;gt; show variables like &#039;expire_%&#039;;&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | Variable_name    | Value |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | expire_logs_days | 10    |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    1 row in set (0.00 sec)&lt;br /&gt;
To make that setting permanent, add following to &#039;&#039;/etc/my.cfg&#039;&#039; in &#039;[mysqld]&#039; section:&lt;br /&gt;
 expire_logs_days=10&lt;br /&gt;
It is also useful to add&lt;br /&gt;
 set-variable = open_files_limit=1040400&lt;br /&gt;
&lt;br /&gt;
Restart the server:&lt;br /&gt;
 /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
6. Stop the slave server and configure its my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 server-id=2&lt;br /&gt;
Restart the slave server&lt;br /&gt;
&lt;br /&gt;
7. Load the data onto the slave server; transfer the &#039;&#039;mirror.sql&#039;&#039; file created on master machine, then run&lt;br /&gt;
&lt;br /&gt;
  mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
Restart the slave server if you&#039;ve transferred different account information over!&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
8. Tell the slave server to act as a slave server, for example:&lt;br /&gt;
 CHANGE MASTER TO MASTER_HOST=&#039;clondb1.jlab.org&#039;, MASTER_USER=&#039;replica&#039;,&lt;br /&gt;
   MASTER_PASSWORD=&#039;clonreplica&#039;, MASTER_LOG_FILE=&#039;clondb1-bin.000790&#039;, MASTER_LOG_POS=9815913;&lt;br /&gt;
NOTE: MASTER_LOG_FILE and MASTER_LOG_POS are defined in the begining of mirror.sql file, get it from there.&lt;br /&gt;
&lt;br /&gt;
9. Start the slave threads&lt;br /&gt;
 START SLAVE;&lt;br /&gt;
&lt;br /&gt;
That should be it ... your slave will contact your master for any updates since the backup copy was taken.&lt;br /&gt;
&lt;br /&gt;
10. SHOW SLAVE STATUS;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to load data into slave server again, stop slave first, then load data and start slave again (it maybe necessary if slave server lost communication to the master):&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; STOP SLAVE;&lt;br /&gt;
  unix&amp;gt; mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
  mysql&amp;gt; START SLAVE;&lt;br /&gt;
&lt;br /&gt;
OPTIONS ON SETUP&lt;br /&gt;
&lt;br /&gt;
To reset slave (it will delete all log files) do following:&lt;br /&gt;
 stop slave;&lt;br /&gt;
 reset slave;&lt;br /&gt;
 start slave;&lt;br /&gt;
&lt;br /&gt;
Some alternatives:&lt;br /&gt;
&lt;br /&gt;
a) If you want to use LOAD TABLE FROM MASTER or LOAD DATA FROM MASTER commands later, you need to give your slave SUPER and RELOAD global privileges, and also SELECT privilege over any tables that you want to load.&lt;br /&gt;
&lt;br /&gt;
b) The data can also be transferred, more efficiently, in binary. In summary, you use tar, zip or similar software to squish the data directory in MySQL&#039;s data directory (extra steps needed if you&#039;re using InnoDb as well) and transfer those files - data files, log files, .frm definition files - and unpack them.&lt;br /&gt;
  &lt;br /&gt;
c) If you&#039;re going to be running different user accounts / passwords etc. on the slave server, or it&#039;s a significantly more recent version of MySQL, then do NOT transfer the database called mysql.&lt;br /&gt;
&lt;br /&gt;
d) If you&#039;re copying to a slave that has previously functioned as a slave, restart it with the --skip-slave-start option in order to avoid it contacting its old master right away.&lt;br /&gt;
&lt;br /&gt;
e) If you configure your slave server as a master too, then it can take over for data changes in the event of a prolonged failure of the master, and can feed data through to second layer slaves. With a properly configured network with homogeneous systems, the old master can be brought back in later as a slave to automatically catch up.&lt;br /&gt;
&lt;br /&gt;
WHAT HAPPENS WHEN IT&#039;S RUNNING?&lt;br /&gt;
&lt;br /&gt;
The Master server keeps a binary log file of database updates for passing to the slaves as required.&lt;br /&gt;
&lt;br /&gt;
The Slave server keeps data files called master.info and relay-log.info to keep track of how it&#039;s doing in processing the master log. It maintains a connection to the Master so that updates are virtually instant.&lt;br /&gt;
&lt;br /&gt;
If a slave server looses connection to the master, it will retry connecting periodically (default 60 seconds, --master-connect-retry option to change), and when it gets back in touch it will catch up.&lt;br /&gt;
&lt;br /&gt;
Master servers do not maintain a list of known slaves, let alone a note of whether or not they&#039;re up to date.&lt;br /&gt;
&lt;br /&gt;
You are STRONGLY advised not to edit any of these files directly, but rather to use commands such as CHANGE MASTER TO ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also MySQL - our FAQ&lt;br /&gt;
&lt;br /&gt;
== Full manual ==&lt;br /&gt;
&lt;br /&gt;
Complete MYSQL manual can be found at http://dev.mysql.com/doc/refman/4.1/en/index.html.&lt;br /&gt;
&lt;br /&gt;
== Problems observed ==&lt;br /&gt;
&lt;br /&gt;
1. After &#039;&#039;up2date&#039;&#039; on August 28, 2007 mysqld did not started, error message in file &#039;&#039;/var/log/mysqld.log&#039;&#039; was:&lt;br /&gt;
&lt;br /&gt;
 070829 12:16:58  mysqld started&lt;br /&gt;
 070829 12:16:58 [Warning] Can&#039;t create test file /database/clondb1.lower-test&lt;br /&gt;
 /usr/libexec/mysqld: Can&#039;t change dir to &#039;/database/&#039; (Errcode: 13)&lt;br /&gt;
 070829 12:16:58 [ERROR] Aborting&lt;br /&gt;
 070829 12:16:58 [Note] /usr/libexec/mysqld: Shutdown complete&lt;br /&gt;
 070829 12:16:58  mysqld ended&lt;br /&gt;
&lt;br /&gt;
Found on web following recommendation:&lt;br /&gt;
&lt;br /&gt;
 its because rhel 4 has selinux installed with it You need to disable it&lt;br /&gt;
 try&lt;br /&gt;
 setsebool -P mysqld_disable_trans=1&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
&lt;br /&gt;
 the newer version of linux has selinux installed.&lt;br /&gt;
 If that is it uses user mysqld_t which doesnt have permissions there.&lt;br /&gt;
 You can either shut selinux off totally - use the command i said or you&lt;br /&gt;
 will need to reflag files.&lt;br /&gt;
&lt;br /&gt;
After running command &#039;&#039;setsebool -P mysqld_disable_trans=1&#039;&#039; as &#039;&#039;root&#039;&#039; mysqld started fine.&lt;br /&gt;
It is started fine on reboot as well.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8747</id>
		<title>MySQL Installation</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8747"/>
		<updated>2026-05-27T14:52:23Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; RHEL9&#039;s yum offers mariadb10.5 and mysql8.0 by default. To see newer alternatives available, run &lt;br /&gt;
&lt;br /&gt;
 dnf module list mariadb&lt;br /&gt;
 dnf module list mysql&lt;br /&gt;
&lt;br /&gt;
If you want to use for example mariadb version 10.11 instead of 10.5, run&lt;br /&gt;
&lt;br /&gt;
 dnf module enable mariadb:10.11&lt;br /&gt;
&lt;br /&gt;
To go back to default, run&lt;br /&gt;
&lt;br /&gt;
 dnf module disable mariadb:10.11&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installation on clondb2 (or any new server).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Build server using options H and B; on formatting stage, create directory &#039;&#039;/database&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Stop and disable puppet:&lt;br /&gt;
&lt;br /&gt;
 systemctl stop puppet&lt;br /&gt;
 systemctl disable puppet&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 yum install mysql-server&lt;br /&gt;
&lt;br /&gt;
Set appropriate ownership for &#039;&#039;/database&#039;&#039; directory (assuming that &#039;&#039;/database&#039;&#039; directory exists):&lt;br /&gt;
&lt;br /&gt;
 chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Sometimes mysql log files can be very large, so they can be placed to separate partition if available, for example &#039;&#039;/data/logs&#039;&#039;, in that case adjust corresponding line &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NONONO!!!&#039;&#039;&#039; Create subdirectories if using &#039;&#039;/database&#039;&#039; area:&lt;br /&gt;
 mkdir /database/logs&lt;br /&gt;
 mkdir /database/run&lt;br /&gt;
 chown mysql:mysql /database/log&lt;br /&gt;
 chown mysql:mysql /database/run&lt;br /&gt;
&lt;br /&gt;
Modify settings in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section) as following:&lt;br /&gt;
&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 datadir=/database&lt;br /&gt;
 socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
 log-error=/database/logs/mysqld.log&lt;br /&gt;
 ##pid-file=/database/run/mysqld.pid&lt;br /&gt;
 pid-file=/run/mysqld/mysqld.pid&lt;br /&gt;
&lt;br /&gt;
 # Tuning parameters&lt;br /&gt;
 open_files_limit                =  1040400&lt;br /&gt;
 max_connections                 = 1024&lt;br /&gt;
 &lt;br /&gt;
 # Basically disable client lockout due to bad connections&lt;br /&gt;
 max_connect_errors              = 1000&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 max_allowed_packet              = 64M&lt;br /&gt;
 myisam_sort_buffer_size         = 64M&lt;br /&gt;
 tmp_table_size                  = 64M&lt;br /&gt;
 max_heap_table_size             = 64M&lt;br /&gt;
 &lt;br /&gt;
 # InnoDB Config&lt;br /&gt;
 innodb_data_home_dir            = data&lt;br /&gt;
 innodb_data_file_path           = ibdata1:10M:autoextend&lt;br /&gt;
 innodb_undo_directory           = data&lt;br /&gt;
 &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 %&lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size         = 256M&lt;br /&gt;
 &lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size            = 64M&lt;br /&gt;
 innodb_log_buffer_size          = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit  = 1&lt;br /&gt;
 innodb_lock_wait_timeout        = 50&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a replication master for replication to externally visible slave, but also&lt;br /&gt;
 # to provide point in time DB recovery if needed.&lt;br /&gt;
 server-id                       = 1111&lt;br /&gt;
 log-bin                         = data/mysql-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a slave if necessary...&lt;br /&gt;
 #skip_slave_start                = 0&lt;br /&gt;
 #report-host                     = clondb2.jlab.org&lt;br /&gt;
 &lt;br /&gt;
 # Diagnostic Logging configuration&lt;br /&gt;
 ###log-warnings                    = 2&lt;br /&gt;
 general-log                     = 1&lt;br /&gt;
 general_log_file                = /database/log/mysqld-general.log&lt;br /&gt;
 slow_query_log                  = 1&lt;br /&gt;
 slow_query_log_file             = /database/log/mysqld-slow-queries.log&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; during reboot, directory &#039;&#039;/run/mysqld&#039;&#039; was not created by &#039;&#039;systemd-tmpfiles-setup.service&#039;&#039;, although corresponding file &#039;&#039;/usr/lib/tmpfiles.d/mysqld.conf&#039;&#039; contains line &#039;&#039;d /run/mysqld 0755 mysql mysql -&#039;&#039;, error message from tmpfiles service is following:&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/mysqld.conf:1: Failed to resolve user &#039;mysql&#039;: No such process&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/nss-pam-ldapd.conf:2: Failed to resolve user &#039;nslcd&#039;: No such process&lt;br /&gt;
Since we moved PID file to &#039;&#039;/database/run&#039;&#039; directory, it does not effect us, but still ... Problem seems related to the missing &#039;&#039;mysql&#039;&#039; user in &#039;&#039;/etc/passwd&#039;&#039;. That user exists globally on CUE, but during boot it seems not available yet. Not sure why mysqld installation process did not create that user locally, or maybe puppet removed it ... anyway I added line &#039;&#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/sbin/nologin&#039;&#039; manually to &#039;&#039;/etc/passwd&#039;&#039;, and problem was solved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable mysql server:&lt;br /&gt;
 systemctl enable --now mysqld.service&lt;br /&gt;
&lt;br /&gt;
Check server status:&lt;br /&gt;
 systemctl status mysqld.service&lt;br /&gt;
&lt;br /&gt;
Go to old database machine and backup all databases, for example for clondb1:&lt;br /&gt;
 mysqldump -u root -p --routines --events --triggers --single-transaction --result-file=clondb1_full_backup.sql --all-databases&lt;br /&gt;
&lt;br /&gt;
Copy file &#039;&#039;clondb1_full_backup.sql&#039;&#039; to the new server &#039;&#039;clondb2&#039;&#039; and run following command:&lt;br /&gt;
 mysql &amp;lt; clondb1_full_backup.sql&lt;br /&gt;
&lt;br /&gt;
Restart service, it is needed in particular to upgrade &#039;&#039;mysql.user&#039;&#039; and maybe other tables imported from another mysql server:&lt;br /&gt;
 systemctl restart mysqld.service&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if dumping older database, using &#039;--all-databases&#039; in &#039;mysqldump&#039; command may screwed up something, for example error message &#039;ERROR 1449 (HY000): The user specified as a definer (&#039;mysql.infoschema&#039;@&#039;localhost&#039;) does not exist&#039; may shows up; to fix it, do force upgrade: add/uncomment line &#039;&#039;upgrade=FORCE&#039;&#039; in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; file, and restart service, after that comment that line out.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: set legacy authentication in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section), needed until all clients are mysql8.0 or higher&lt;br /&gt;
 default_authentication_plugin=mysql_native_password&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if importing from older database, it seems previous setting is not enough, every user&#039;s plugin have to be set specifically to &#039;&#039;mysql_native_password&#039;&#039;, at least for users without passwords, for example:&lt;br /&gt;
 ALTER USER &#039;clasrun&#039;@&#039;%&#039; IDENTIFIED WITH mysql_native_password;&lt;br /&gt;
or if it does not work, create new account with previous one deleted, and then restore old account name, using &#039;&#039;phpMyAdmin&#039;&#039;: User accounts-&amp;gt;Edit privileges-&amp;gt;Login information-&amp;gt;Authentication plugin.&#039;&#039;&#039; Make sure password/nopassword is preserved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; inserting &#039;rcdb&#039; produced errors which were overruled by&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 mysql&amp;gt; SOURCE /root/clondb1_rcdb_backup.sql&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 1;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; increasing open file limit in &#039;&#039;/etc/my*&#039; config file (like &#039;&#039;open_files_limit=65535&#039;&#039; or in older versions &#039;&#039;open-files-limit=65535&#039;&#039;) may not be enough; run command&lt;br /&gt;
 systemctl edit mysql.service (or mariadb.service)&lt;br /&gt;
and add following:&lt;br /&gt;
 [Service]&lt;br /&gt;
 LimitNOFILE=65535&lt;br /&gt;
 # LimitMEMLOCK=infinity # Optional, if needed&lt;br /&gt;
then reload and restart corresponding services:&lt;br /&gt;
 systemctl deamon-reload&lt;br /&gt;
 systemctl restart mysql.service (or mariadb.service)&lt;br /&gt;
and check actual setting in mysql session:&lt;br /&gt;
 SHOW VARIABLES LIKE &#039;open%&#039;;&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | Variable_name    | Value |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | open_files_limit | 65535 |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 1 row in set (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was an error in &#039;mysql &amp;lt; clondb3_full_backup.sql&#039; connamd:&lt;br /&gt;
 ERROR 1418 (HY000) at line 1013: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)&lt;br /&gt;
It was fixed by following setting in mysql root session:&lt;br /&gt;
 SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
&lt;br /&gt;
Mount file server partition for mysql backups: add following line to &#039;&#039;/etc/auto.direct&#039;&#039;:&lt;br /&gt;
 /mysql                -rw,bg     clonfs1:/vol/mysql&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/dbdumperpw.txt&#039;&#039; containing mysql password for the user &#039;&#039;dbdumper&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/usr/bin/mail&#039;&#039; installed.&lt;br /&gt;
&lt;br /&gt;
Start backup cronjob from clascron account:&lt;br /&gt;
 20 9,18 * * * (/usr/local/bin/dumpdb clondb1new dbdumper /mysql/clondb1new/backup) | mail -s &amp;quot;DB Dump from clondb1new&amp;quot; boiarino@jlab.org&lt;br /&gt;
&lt;br /&gt;
== Installation of the older MariaDB on RHEL9 from source ==&lt;br /&gt;
&lt;br /&gt;
 cd /root&lt;br /&gt;
 cp /usr/downloads/mariadb-5.5.68.tar.gz .&lt;br /&gt;
 tar -xzvf mariadb-5.5.68.tar.gz&lt;br /&gt;
 rm mariadb-5.5.68.tar.gz&lt;br /&gt;
 cd mariadb-5.5.68&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake .. -DCMAKE_INSTALL_PREFIX=/root/mysql -DMYSQL_DATADIR=/database -DDISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING=TRUE&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was compilation error, I commented out soome lines in &#039;&#039;storage/tokudb/ft-index/portability/toku_pthread.cc&#039;&#039;, probably there is better way ... :&lt;br /&gt;
&lt;br /&gt;
 int toku_pthread_yield(void) {&lt;br /&gt;
    //#if defined(HAVE_PTHREAD_YIELD)&lt;br /&gt;
    //# if defined(PTHREAD_YIELD_RETURNS_INT)&lt;br /&gt;
    return pthread_yield();&lt;br /&gt;
    //# elif defined(PTHREAD_YIELD_RETURNS_VOID)&lt;br /&gt;
    //    pthread_yield();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //# else&lt;br /&gt;
    //#  error &amp;quot;don&#039;t know what pthread_yield() returns&amp;quot;&lt;br /&gt;
    //# endif&lt;br /&gt;
    //#elif defined(HAVE_PTHREAD_YIELD_NP)&lt;br /&gt;
    //    pthread_yield_np();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //#else&lt;br /&gt;
    //# error &amp;quot;cannot find pthread_yield or pthread_yield_np&amp;quot;&lt;br /&gt;
    //#endif&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysql:27&#039; user and &#039;mysql:27&#039; group exists.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/root&#039;&#039; is &#039;&#039;drwxr-xr-x.  root root&#039;&#039;, &#039;&#039;/root/mysql&#039;&#039; is &#039;&#039;drwxr-xr-x. root root&#039;&#039;, and &#039;&#039;/database&#039;&#039; is &#039;&#039;drwxr-xr-x. mysql mysql&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Initialize the Data Directory: The initial system tables and data directory need to be created before MariaDB can run:&lt;br /&gt;
 cd /root/mysql&lt;br /&gt;
 scripts/mysql_install_db --user=mysql --basedir=/root/mysql --datadir=/database&lt;br /&gt;
&lt;br /&gt;
Start the MariaDB server manually to make sure it is running:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe&lt;br /&gt;
&lt;br /&gt;
Import everything from the old clondb3&#039;s sql file:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysql -u root&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SOURCE /root/clondb3_full_backup.sql;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; in case of &#039;&#039;root&#039;&#039; access problems, run it with following flags:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe --skip-grant-tables --skip-networking&lt;br /&gt;
&lt;br /&gt;
or, if you know &#039;&#039;root@loocalhost&#039;&#039; password on older clondb3, enter mysql with that password. Alter &#039;&#039;root@localhost&#039;&#039; user setting it as &#039;&#039;no password&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To run it as systemd service, create file &#039;&#039;/usr/lib/systemd/system/mariadb.service&#039;&#039; with following content:&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Mariadb 5.5&lt;br /&gt;
 After=network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=forking&lt;br /&gt;
 PrivateTmp=true&lt;br /&gt;
 User=mysql&lt;br /&gt;
 Group=mysql&lt;br /&gt;
 ExecStart=/root/mysql/support-files/mysql.server start&lt;br /&gt;
 ExecStop=/root/mysql/support-files/mysql.server stop&lt;br /&gt;
 Restart=on-abort&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Enable and start service:&lt;br /&gt;
&lt;br /&gt;
 systemctl daemon-reload&lt;br /&gt;
 systemctl enable mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
Uses mariadb instead of mysql:&lt;br /&gt;
&lt;br /&gt;
 systemctl restart mariadb&lt;br /&gt;
&lt;br /&gt;
useful commands:&lt;br /&gt;
&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
 systemctl stop mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if cannot ssh to clondb1 from unix machine(s), try to ssh from one of the ROCs !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Master replica setting for computer center&#039;s slave (database &#039;rcdb&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/my/cnf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 open-files-limit                =  1040400&lt;br /&gt;
 server-id=1111&lt;br /&gt;
 log-bin                         = mariadb-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;systemctl restart mariadb&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
ssh root@clondb1 and do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@&#039;%.jlab.org&#039; IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
 USE rcdb;&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;mysqldump -u root -p --opt rcdb &amp;gt; rcdb.sql&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 UNLOCK TABLES;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Tell computer center following info: username(replica), password(clonreplica), output of command &#039;SHOW MASTER STATUS&#039;, and file &#039;rcdb.sql&#039; location.&lt;br /&gt;
&lt;br /&gt;
== Main MySQL server on clondb1 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clondb1&#039;&#039; is the primary MYSQL machine for CLAS Online databases, it is running MYSQL server and has database on its local disk in /database. All other CLON cluster machines have MYSQL installed but server should not be run there&lt;br /&gt;
&lt;br /&gt;
Installation for RHEL4 machines with satelite service (type following as &#039;root&#039;):&lt;br /&gt;
&lt;br /&gt;
  up2date mysql&lt;br /&gt;
  up2date mysql-server&lt;br /&gt;
&lt;br /&gt;
version 4.1.20 was obtained August 19, 2006; newer version can be installed if &#039;up2date&#039; will be used in future; repeat that procedure on all Linux_i686 and Linux_x86_64 machines.&lt;br /&gt;
&lt;br /&gt;
Installation for all other machines: Get tarball &#039;mysql-4.1.20.tar.gz&#039; from http://www.mysql.com/ and place it to /usr/local/downloads on CLON fileserver. Then do following:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 cp ../downloads/mysql-4.1.20.tar.gz .&lt;br /&gt;
 gunzip mysql-4.1.20.tar.gz&lt;br /&gt;
 tar xvf mysql-4.1.20.tar&lt;br /&gt;
 rm mysql-4.1.20.tar&lt;br /&gt;
 cd mysql-4.1.20&lt;br /&gt;
&lt;br /&gt;
Linux:&lt;br /&gt;
 ./configure --prefix=/usr --without-server&lt;br /&gt;
&lt;br /&gt;
Solaris:&lt;br /&gt;
 bash&lt;br /&gt;
 CC=cc CFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; CXX=CC CXXFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; ./configure --prefix=/usr --without-server&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
Repeat for all SunOS_i86pc, SunOS_sun4u, Linux_ppc machines. Login as &#039;root&#039; and do:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysql-4.1.20&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
It will install everything into /usr/bin, /usr/lib and /usr/include/mysql (same directories as on RHEL4).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; you may want to create symbolic links from &#039;&#039;/usr/lib&#039;&#039; to &#039;&#039;/usr/lib/mysql&#039;&#039; area for the libraries if it was not done by installation procedure:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/lib&lt;br /&gt;
 ln -s mysql/libmysqlclient.a libmysqlclient.a&lt;br /&gt;
 ln -s mysql/libmysqlclient.so libmysqlclient.so&lt;br /&gt;
 ln -s mysql/libmysqlclient.so.14 libmysqlclient.so.14&lt;br /&gt;
&lt;br /&gt;
Clondb1 preparations:&lt;br /&gt;
&lt;br /&gt;
Login as &#039;root&#039; and execute following commands:&lt;br /&gt;
&lt;br /&gt;
  id mysql&lt;br /&gt;
&lt;br /&gt;
you should see something like this:&lt;br /&gt;
&lt;br /&gt;
  uid=27(mysql) gid=27(mysql) groups=27(mysql)&lt;br /&gt;
&lt;br /&gt;
If &#039;mysql&#039; user or group does not exist, create it.&lt;br /&gt;
Specify desired database directory in &#039;/etc/my.cnf&#039;:&lt;br /&gt;
&lt;br /&gt;
  ###datadir=/var/lib/mysql&lt;br /&gt;
  datadir=/database&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;/var/lib/mysql&#039; directory has appropriate ownership (in our case basedir=/var/lib):&lt;br /&gt;
&lt;br /&gt;
  drwxr-xr-x   2 mysql     mysql    4096 Jun  1 23:42 mysql&lt;br /&gt;
&lt;br /&gt;
Same about /database:&lt;br /&gt;
&lt;br /&gt;
  chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Modify &#039;/etc/my.cnf&#039; if neseccary.&lt;br /&gt;
&lt;br /&gt;
Starting mysql server:&lt;br /&gt;
&lt;br /&gt;
  cd /var/lib/mysql&lt;br /&gt;
  mysql_install_db --user=mysql&lt;br /&gt;
&lt;br /&gt;
some useful instructions will be printed:&lt;br /&gt;
&lt;br /&gt;
  To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
  to the right place for your system&lt;br /&gt;
  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
  To do so, start the server, then issue the following commands:&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;new-password&#039;&lt;br /&gt;
  /usr/bin/mysqladmin -u root -h clondb1.jlab.org password &#039;new-password&#039;&lt;br /&gt;
  See the manual for more instructions.&lt;br /&gt;
  You can start the MySQL daemon with:&lt;br /&gt;
  cd /usr ; /usr/bin/mysqld_safe &amp;amp;&lt;br /&gt;
  You can test the MySQL daemon with the benchmarks in the &#039;sql-bench&#039; directory:&lt;br /&gt;
  cd sql-bench ; perl run-all-tests&lt;br /&gt;
  Please report any problems with the /usr/bin/mysqlbug script!&lt;br /&gt;
  The latest information about MySQL is available on the web at&lt;br /&gt;
  http://www.mysql.com&lt;br /&gt;
  Support MySQL by buying support/licenses at http://shop.mysql.com&lt;br /&gt;
&lt;br /&gt;
Now start mysql deamon:&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
NOTE: it did not worked, and wierd thing happened: when I tried to modify /etc/init.d/mysqld it started to work&lt;br /&gt;
right after I touched it; no real changes were applied, just file date was changed ...&lt;br /&gt;
It can be started as well as following: (cd /usr; /usr/bin/mysqld_safe &amp;amp;)&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysqld&#039; is running:&lt;br /&gt;
&lt;br /&gt;
  ps -ef | grep mysql&lt;br /&gt;
    root     23028 21947  0 20:54 pts/2    00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf&lt;br /&gt;
       --pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
    mysql    23053 23028  0 20:54 pts/2    00:00:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf &lt;br /&gt;
       --basedir=/usr --datadir=/database --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking&lt;br /&gt;
       --socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
Set mysql root password:&lt;br /&gt;
&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;********&#039;&lt;br /&gt;
&lt;br /&gt;
== MySQL server on Intel-based VME controllers ==&lt;br /&gt;
&lt;br /&gt;
To run standalone DAQ on Intel-based VME controller, MySQL server must be local. Following steps were performed to activate it:&lt;br /&gt;
&lt;br /&gt;
* yum install mysql mysql-devel mysql-server&lt;br /&gt;
&lt;br /&gt;
* NOTE: previous will create mysql user amd group and do other stuff, so you can skip following:&lt;br /&gt;
&lt;br /&gt;
 add &#039;mysql:x:27:&#039; to the /etc/group file if it is not there&lt;br /&gt;
 add &#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash&#039; to the /etc/passwd file if it is not there&lt;br /&gt;
 mkdir /var/lib/mysql&lt;br /&gt;
 chown mysql:mysql /var/lib/mysql&lt;br /&gt;
 mkdir /var/run/mysqld/&lt;br /&gt;
 chown mysql:mysql /var/run/mysqld/&lt;br /&gt;
&lt;br /&gt;
* create /var/lib/mysql/ directory in /root area and place appropriate line into /snapshot/files&lt;br /&gt;
&lt;br /&gt;
* reboot controller, mysql directory must be copied into custom area of the controller&lt;br /&gt;
&lt;br /&gt;
* /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
* mysql -h localhost -u root(should be able to enter mysql); GRANT ALL PRIVILEGES ON *.* TO &#039;clasrun&#039;@&#039;svt2.jlab.org&#039;; FLUSH PRIVILEGES;&lt;br /&gt;
&lt;br /&gt;
* cd /var/lib/mysql/&lt;br /&gt;
&lt;br /&gt;
* ssh clondb1; mysqldump --databases daq_daq daq_clasdev -h clondb1 -u root -p &amp;gt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
* mysql --force -h localhost -u root &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
== Dumping ==&lt;br /&gt;
&lt;br /&gt;
Dump is running as a cron job from clascron account on clondb1. See /database/dumpdb script. It accually locks table-by-table and dumps them, so it is not a whole database snapshot. Maybe better to run it on slave server locking whole database ...&lt;br /&gt;
&lt;br /&gt;
== Setting up replica ==&lt;br /&gt;
&lt;br /&gt;
clondb2 is a slave MySQL replica for the master running on clondb1 machine.&lt;br /&gt;
&lt;br /&gt;
Set up an account on the master server &#039;&#039;clondb1&#039;&#039; that the slave can use to make its connection. You need to grant the account REPLICATION SLAVE privilege:&lt;br /&gt;
&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@clondb2.jlab.org IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
&lt;br /&gt;
Take a snapshot of the data on the master server:&lt;br /&gt;
 &lt;br /&gt;
a) Lock all the tables on the master (flush to disk and lock):&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
&lt;br /&gt;
b) Run&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
and note the File and Position (if blank, don&#039;t worry). Accually it can be found in mirror.sql file (see below).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: do not exit MySQL session !!! LEAVE the MySQL client that you used for that running.&lt;br /&gt;
This will prevent updates while you&#039;re copying to your mirror.&lt;br /&gt;
&lt;br /&gt;
NOTE: when mysqldump started (see below) database will be locked, and it stays locked until dump is finished; when it is finished database will be unlocked; it seems not necessary to do (a),(b) and (d).&lt;br /&gt;
&lt;br /&gt;
c) From another window, take a dump of the data on the Master server:&lt;br /&gt;
 mysqldump --master-data --all-databases -uroot -p &amp;gt; mirror.sql&lt;br /&gt;
 &lt;br /&gt;
d) UNLOCK TABLES;&lt;br /&gt;
&lt;br /&gt;
5. Check that the Master server has an ID set and is running with the log-bin option. This should be in the my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 log-bin=mysql-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
or just (as it is now on clondb1):&lt;br /&gt;
 log-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
Server ids (Master and Slave) must all be unique positive integers.&lt;br /&gt;
&lt;br /&gt;
NOTE: to cleanup log-bin files do following:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25 22:00:00&#039;;&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25&#039;;&lt;br /&gt;
&lt;br /&gt;
or ask mysql to cleanup old files:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; SET GLOBAL expire_logs_days=10;&lt;br /&gt;
  mysql&amp;gt; show variables like &#039;expire_%&#039;;&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | Variable_name    | Value |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | expire_logs_days | 10    |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    1 row in set (0.00 sec)&lt;br /&gt;
To make that setting permanent, add following to &#039;&#039;/etc/my.cfg&#039;&#039; in &#039;[mysqld]&#039; section:&lt;br /&gt;
 expire_logs_days=10&lt;br /&gt;
It is also useful to add&lt;br /&gt;
 set-variable = open_files_limit=1040400&lt;br /&gt;
&lt;br /&gt;
Restart the server:&lt;br /&gt;
 /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
6. Stop the slave server and configure its my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 server-id=2&lt;br /&gt;
Restart the slave server&lt;br /&gt;
&lt;br /&gt;
7. Load the data onto the slave server; transfer the &#039;&#039;mirror.sql&#039;&#039; file created on master machine, then run&lt;br /&gt;
&lt;br /&gt;
  mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
Restart the slave server if you&#039;ve transferred different account information over!&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
8. Tell the slave server to act as a slave server, for example:&lt;br /&gt;
 CHANGE MASTER TO MASTER_HOST=&#039;clondb1.jlab.org&#039;, MASTER_USER=&#039;replica&#039;,&lt;br /&gt;
   MASTER_PASSWORD=&#039;clonreplica&#039;, MASTER_LOG_FILE=&#039;clondb1-bin.000790&#039;, MASTER_LOG_POS=9815913;&lt;br /&gt;
NOTE: MASTER_LOG_FILE and MASTER_LOG_POS are defined in the begining of mirror.sql file, get it from there.&lt;br /&gt;
&lt;br /&gt;
9. Start the slave threads&lt;br /&gt;
 START SLAVE;&lt;br /&gt;
&lt;br /&gt;
That should be it ... your slave will contact your master for any updates since the backup copy was taken.&lt;br /&gt;
&lt;br /&gt;
10. SHOW SLAVE STATUS;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to load data into slave server again, stop slave first, then load data and start slave again (it maybe necessary if slave server lost communication to the master):&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; STOP SLAVE;&lt;br /&gt;
  unix&amp;gt; mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
  mysql&amp;gt; START SLAVE;&lt;br /&gt;
&lt;br /&gt;
OPTIONS ON SETUP&lt;br /&gt;
&lt;br /&gt;
To reset slave (it will delete all log files) do following:&lt;br /&gt;
 stop slave;&lt;br /&gt;
 reset slave;&lt;br /&gt;
 start slave;&lt;br /&gt;
&lt;br /&gt;
Some alternatives:&lt;br /&gt;
&lt;br /&gt;
a) If you want to use LOAD TABLE FROM MASTER or LOAD DATA FROM MASTER commands later, you need to give your slave SUPER and RELOAD global privileges, and also SELECT privilege over any tables that you want to load.&lt;br /&gt;
&lt;br /&gt;
b) The data can also be transferred, more efficiently, in binary. In summary, you use tar, zip or similar software to squish the data directory in MySQL&#039;s data directory (extra steps needed if you&#039;re using InnoDb as well) and transfer those files - data files, log files, .frm definition files - and unpack them.&lt;br /&gt;
  &lt;br /&gt;
c) If you&#039;re going to be running different user accounts / passwords etc. on the slave server, or it&#039;s a significantly more recent version of MySQL, then do NOT transfer the database called mysql.&lt;br /&gt;
&lt;br /&gt;
d) If you&#039;re copying to a slave that has previously functioned as a slave, restart it with the --skip-slave-start option in order to avoid it contacting its old master right away.&lt;br /&gt;
&lt;br /&gt;
e) If you configure your slave server as a master too, then it can take over for data changes in the event of a prolonged failure of the master, and can feed data through to second layer slaves. With a properly configured network with homogeneous systems, the old master can be brought back in later as a slave to automatically catch up.&lt;br /&gt;
&lt;br /&gt;
WHAT HAPPENS WHEN IT&#039;S RUNNING?&lt;br /&gt;
&lt;br /&gt;
The Master server keeps a binary log file of database updates for passing to the slaves as required.&lt;br /&gt;
&lt;br /&gt;
The Slave server keeps data files called master.info and relay-log.info to keep track of how it&#039;s doing in processing the master log. It maintains a connection to the Master so that updates are virtually instant.&lt;br /&gt;
&lt;br /&gt;
If a slave server looses connection to the master, it will retry connecting periodically (default 60 seconds, --master-connect-retry option to change), and when it gets back in touch it will catch up.&lt;br /&gt;
&lt;br /&gt;
Master servers do not maintain a list of known slaves, let alone a note of whether or not they&#039;re up to date.&lt;br /&gt;
&lt;br /&gt;
You are STRONGLY advised not to edit any of these files directly, but rather to use commands such as CHANGE MASTER TO ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also MySQL - our FAQ&lt;br /&gt;
&lt;br /&gt;
== Full manual ==&lt;br /&gt;
&lt;br /&gt;
Complete MYSQL manual can be found at http://dev.mysql.com/doc/refman/4.1/en/index.html.&lt;br /&gt;
&lt;br /&gt;
== Problems observed ==&lt;br /&gt;
&lt;br /&gt;
1. After &#039;&#039;up2date&#039;&#039; on August 28, 2007 mysqld did not started, error message in file &#039;&#039;/var/log/mysqld.log&#039;&#039; was:&lt;br /&gt;
&lt;br /&gt;
 070829 12:16:58  mysqld started&lt;br /&gt;
 070829 12:16:58 [Warning] Can&#039;t create test file /database/clondb1.lower-test&lt;br /&gt;
 /usr/libexec/mysqld: Can&#039;t change dir to &#039;/database/&#039; (Errcode: 13)&lt;br /&gt;
 070829 12:16:58 [ERROR] Aborting&lt;br /&gt;
 070829 12:16:58 [Note] /usr/libexec/mysqld: Shutdown complete&lt;br /&gt;
 070829 12:16:58  mysqld ended&lt;br /&gt;
&lt;br /&gt;
Found on web following recommendation:&lt;br /&gt;
&lt;br /&gt;
 its because rhel 4 has selinux installed with it You need to disable it&lt;br /&gt;
 try&lt;br /&gt;
 setsebool -P mysqld_disable_trans=1&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
&lt;br /&gt;
 the newer version of linux has selinux installed.&lt;br /&gt;
 If that is it uses user mysqld_t which doesnt have permissions there.&lt;br /&gt;
 You can either shut selinux off totally - use the command i said or you&lt;br /&gt;
 will need to reflag files.&lt;br /&gt;
&lt;br /&gt;
After running command &#039;&#039;setsebool -P mysqld_disable_trans=1&#039;&#039; as &#039;&#039;root&#039;&#039; mysqld started fine.&lt;br /&gt;
It is started fine on reboot as well.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8746</id>
		<title>MySQL Installation</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8746"/>
		<updated>2026-05-27T14:52:04Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; RHEL9&#039;s yum offers mariadb10.5 and mysql8.0 by default. To see newer alternatives available, run &lt;br /&gt;
&lt;br /&gt;
 dnf module list mariadb&lt;br /&gt;
 dnf module list mysql&lt;br /&gt;
&lt;br /&gt;
If you want to use for example mariadb version 10.11 instead of 10.5, run&lt;br /&gt;
&lt;br /&gt;
 dnf module enable mariadb:10.11&lt;br /&gt;
&lt;br /&gt;
To go back to default, run&lt;br /&gt;
&lt;br /&gt;
 dnf module disable mariadb:10.11&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation on clondb2 (or any new server).&lt;br /&gt;
&lt;br /&gt;
Build server using options H and B; on formatting stage, create directory &#039;&#039;/database&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Stop and disable puppet:&lt;br /&gt;
&lt;br /&gt;
 systemctl stop puppet&lt;br /&gt;
 systemctl disable puppet&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 yum install mysql-server&lt;br /&gt;
&lt;br /&gt;
Set appropriate ownership for &#039;&#039;/database&#039;&#039; directory (assuming that &#039;&#039;/database&#039;&#039; directory exists):&lt;br /&gt;
&lt;br /&gt;
 chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Sometimes mysql log files can be very large, so they can be placed to separate partition if available, for example &#039;&#039;/data/logs&#039;&#039;, in that case adjust corresponding line &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NONONO!!!&#039;&#039;&#039; Create subdirectories if using &#039;&#039;/database&#039;&#039; area:&lt;br /&gt;
 mkdir /database/logs&lt;br /&gt;
 mkdir /database/run&lt;br /&gt;
 chown mysql:mysql /database/log&lt;br /&gt;
 chown mysql:mysql /database/run&lt;br /&gt;
&lt;br /&gt;
Modify settings in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section) as following:&lt;br /&gt;
&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 datadir=/database&lt;br /&gt;
 socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
 log-error=/database/logs/mysqld.log&lt;br /&gt;
 ##pid-file=/database/run/mysqld.pid&lt;br /&gt;
 pid-file=/run/mysqld/mysqld.pid&lt;br /&gt;
&lt;br /&gt;
 # Tuning parameters&lt;br /&gt;
 open_files_limit                =  1040400&lt;br /&gt;
 max_connections                 = 1024&lt;br /&gt;
 &lt;br /&gt;
 # Basically disable client lockout due to bad connections&lt;br /&gt;
 max_connect_errors              = 1000&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 max_allowed_packet              = 64M&lt;br /&gt;
 myisam_sort_buffer_size         = 64M&lt;br /&gt;
 tmp_table_size                  = 64M&lt;br /&gt;
 max_heap_table_size             = 64M&lt;br /&gt;
 &lt;br /&gt;
 # InnoDB Config&lt;br /&gt;
 innodb_data_home_dir            = data&lt;br /&gt;
 innodb_data_file_path           = ibdata1:10M:autoextend&lt;br /&gt;
 innodb_undo_directory           = data&lt;br /&gt;
 &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 %&lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size         = 256M&lt;br /&gt;
 &lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size            = 64M&lt;br /&gt;
 innodb_log_buffer_size          = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit  = 1&lt;br /&gt;
 innodb_lock_wait_timeout        = 50&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a replication master for replication to externally visible slave, but also&lt;br /&gt;
 # to provide point in time DB recovery if needed.&lt;br /&gt;
 server-id                       = 1111&lt;br /&gt;
 log-bin                         = data/mysql-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a slave if necessary...&lt;br /&gt;
 #skip_slave_start                = 0&lt;br /&gt;
 #report-host                     = clondb2.jlab.org&lt;br /&gt;
 &lt;br /&gt;
 # Diagnostic Logging configuration&lt;br /&gt;
 ###log-warnings                    = 2&lt;br /&gt;
 general-log                     = 1&lt;br /&gt;
 general_log_file                = /database/log/mysqld-general.log&lt;br /&gt;
 slow_query_log                  = 1&lt;br /&gt;
 slow_query_log_file             = /database/log/mysqld-slow-queries.log&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; during reboot, directory &#039;&#039;/run/mysqld&#039;&#039; was not created by &#039;&#039;systemd-tmpfiles-setup.service&#039;&#039;, although corresponding file &#039;&#039;/usr/lib/tmpfiles.d/mysqld.conf&#039;&#039; contains line &#039;&#039;d /run/mysqld 0755 mysql mysql -&#039;&#039;, error message from tmpfiles service is following:&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/mysqld.conf:1: Failed to resolve user &#039;mysql&#039;: No such process&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/nss-pam-ldapd.conf:2: Failed to resolve user &#039;nslcd&#039;: No such process&lt;br /&gt;
Since we moved PID file to &#039;&#039;/database/run&#039;&#039; directory, it does not effect us, but still ... Problem seems related to the missing &#039;&#039;mysql&#039;&#039; user in &#039;&#039;/etc/passwd&#039;&#039;. That user exists globally on CUE, but during boot it seems not available yet. Not sure why mysqld installation process did not create that user locally, or maybe puppet removed it ... anyway I added line &#039;&#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/sbin/nologin&#039;&#039; manually to &#039;&#039;/etc/passwd&#039;&#039;, and problem was solved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable mysql server:&lt;br /&gt;
 systemctl enable --now mysqld.service&lt;br /&gt;
&lt;br /&gt;
Check server status:&lt;br /&gt;
 systemctl status mysqld.service&lt;br /&gt;
&lt;br /&gt;
Go to old database machine and backup all databases, for example for clondb1:&lt;br /&gt;
 mysqldump -u root -p --routines --events --triggers --single-transaction --result-file=clondb1_full_backup.sql --all-databases&lt;br /&gt;
&lt;br /&gt;
Copy file &#039;&#039;clondb1_full_backup.sql&#039;&#039; to the new server &#039;&#039;clondb2&#039;&#039; and run following command:&lt;br /&gt;
 mysql &amp;lt; clondb1_full_backup.sql&lt;br /&gt;
&lt;br /&gt;
Restart service, it is needed in particular to upgrade &#039;&#039;mysql.user&#039;&#039; and maybe other tables imported from another mysql server:&lt;br /&gt;
 systemctl restart mysqld.service&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if dumping older database, using &#039;--all-databases&#039; in &#039;mysqldump&#039; command may screwed up something, for example error message &#039;ERROR 1449 (HY000): The user specified as a definer (&#039;mysql.infoschema&#039;@&#039;localhost&#039;) does not exist&#039; may shows up; to fix it, do force upgrade: add/uncomment line &#039;&#039;upgrade=FORCE&#039;&#039; in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; file, and restart service, after that comment that line out.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: set legacy authentication in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section), needed until all clients are mysql8.0 or higher&lt;br /&gt;
 default_authentication_plugin=mysql_native_password&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if importing from older database, it seems previous setting is not enough, every user&#039;s plugin have to be set specifically to &#039;&#039;mysql_native_password&#039;&#039;, at least for users without passwords, for example:&lt;br /&gt;
 ALTER USER &#039;clasrun&#039;@&#039;%&#039; IDENTIFIED WITH mysql_native_password;&lt;br /&gt;
or if it does not work, create new account with previous one deleted, and then restore old account name, using &#039;&#039;phpMyAdmin&#039;&#039;: User accounts-&amp;gt;Edit privileges-&amp;gt;Login information-&amp;gt;Authentication plugin.&#039;&#039;&#039; Make sure password/nopassword is preserved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; inserting &#039;rcdb&#039; produced errors which were overruled by&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 mysql&amp;gt; SOURCE /root/clondb1_rcdb_backup.sql&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 1;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; increasing open file limit in &#039;&#039;/etc/my*&#039; config file (like &#039;&#039;open_files_limit=65535&#039;&#039; or in older versions &#039;&#039;open-files-limit=65535&#039;&#039;) may not be enough; run command&lt;br /&gt;
 systemctl edit mysql.service (or mariadb.service)&lt;br /&gt;
and add following:&lt;br /&gt;
 [Service]&lt;br /&gt;
 LimitNOFILE=65535&lt;br /&gt;
 # LimitMEMLOCK=infinity # Optional, if needed&lt;br /&gt;
then reload and restart corresponding services:&lt;br /&gt;
 systemctl deamon-reload&lt;br /&gt;
 systemctl restart mysql.service (or mariadb.service)&lt;br /&gt;
and check actual setting in mysql session:&lt;br /&gt;
 SHOW VARIABLES LIKE &#039;open%&#039;;&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | Variable_name    | Value |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | open_files_limit | 65535 |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 1 row in set (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was an error in &#039;mysql &amp;lt; clondb3_full_backup.sql&#039; connamd:&lt;br /&gt;
 ERROR 1418 (HY000) at line 1013: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)&lt;br /&gt;
It was fixed by following setting in mysql root session:&lt;br /&gt;
 SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
&lt;br /&gt;
Mount file server partition for mysql backups: add following line to &#039;&#039;/etc/auto.direct&#039;&#039;:&lt;br /&gt;
 /mysql                -rw,bg     clonfs1:/vol/mysql&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/dbdumperpw.txt&#039;&#039; containing mysql password for the user &#039;&#039;dbdumper&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/usr/bin/mail&#039;&#039; installed.&lt;br /&gt;
&lt;br /&gt;
Start backup cronjob from clascron account:&lt;br /&gt;
 20 9,18 * * * (/usr/local/bin/dumpdb clondb1new dbdumper /mysql/clondb1new/backup) | mail -s &amp;quot;DB Dump from clondb1new&amp;quot; boiarino@jlab.org&lt;br /&gt;
&lt;br /&gt;
== Installation of the older MariaDB on RHEL9 from source ==&lt;br /&gt;
&lt;br /&gt;
 cd /root&lt;br /&gt;
 cp /usr/downloads/mariadb-5.5.68.tar.gz .&lt;br /&gt;
 tar -xzvf mariadb-5.5.68.tar.gz&lt;br /&gt;
 rm mariadb-5.5.68.tar.gz&lt;br /&gt;
 cd mariadb-5.5.68&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake .. -DCMAKE_INSTALL_PREFIX=/root/mysql -DMYSQL_DATADIR=/database -DDISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING=TRUE&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was compilation error, I commented out soome lines in &#039;&#039;storage/tokudb/ft-index/portability/toku_pthread.cc&#039;&#039;, probably there is better way ... :&lt;br /&gt;
&lt;br /&gt;
 int toku_pthread_yield(void) {&lt;br /&gt;
    //#if defined(HAVE_PTHREAD_YIELD)&lt;br /&gt;
    //# if defined(PTHREAD_YIELD_RETURNS_INT)&lt;br /&gt;
    return pthread_yield();&lt;br /&gt;
    //# elif defined(PTHREAD_YIELD_RETURNS_VOID)&lt;br /&gt;
    //    pthread_yield();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //# else&lt;br /&gt;
    //#  error &amp;quot;don&#039;t know what pthread_yield() returns&amp;quot;&lt;br /&gt;
    //# endif&lt;br /&gt;
    //#elif defined(HAVE_PTHREAD_YIELD_NP)&lt;br /&gt;
    //    pthread_yield_np();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //#else&lt;br /&gt;
    //# error &amp;quot;cannot find pthread_yield or pthread_yield_np&amp;quot;&lt;br /&gt;
    //#endif&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysql:27&#039; user and &#039;mysql:27&#039; group exists.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/root&#039;&#039; is &#039;&#039;drwxr-xr-x.  root root&#039;&#039;, &#039;&#039;/root/mysql&#039;&#039; is &#039;&#039;drwxr-xr-x. root root&#039;&#039;, and &#039;&#039;/database&#039;&#039; is &#039;&#039;drwxr-xr-x. mysql mysql&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Initialize the Data Directory: The initial system tables and data directory need to be created before MariaDB can run:&lt;br /&gt;
 cd /root/mysql&lt;br /&gt;
 scripts/mysql_install_db --user=mysql --basedir=/root/mysql --datadir=/database&lt;br /&gt;
&lt;br /&gt;
Start the MariaDB server manually to make sure it is running:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe&lt;br /&gt;
&lt;br /&gt;
Import everything from the old clondb3&#039;s sql file:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysql -u root&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SOURCE /root/clondb3_full_backup.sql;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; in case of &#039;&#039;root&#039;&#039; access problems, run it with following flags:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe --skip-grant-tables --skip-networking&lt;br /&gt;
&lt;br /&gt;
or, if you know &#039;&#039;root@loocalhost&#039;&#039; password on older clondb3, enter mysql with that password. Alter &#039;&#039;root@localhost&#039;&#039; user setting it as &#039;&#039;no password&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To run it as systemd service, create file &#039;&#039;/usr/lib/systemd/system/mariadb.service&#039;&#039; with following content:&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Mariadb 5.5&lt;br /&gt;
 After=network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=forking&lt;br /&gt;
 PrivateTmp=true&lt;br /&gt;
 User=mysql&lt;br /&gt;
 Group=mysql&lt;br /&gt;
 ExecStart=/root/mysql/support-files/mysql.server start&lt;br /&gt;
 ExecStop=/root/mysql/support-files/mysql.server stop&lt;br /&gt;
 Restart=on-abort&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Enable and start service:&lt;br /&gt;
&lt;br /&gt;
 systemctl daemon-reload&lt;br /&gt;
 systemctl enable mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
Uses mariadb instead of mysql:&lt;br /&gt;
&lt;br /&gt;
 systemctl restart mariadb&lt;br /&gt;
&lt;br /&gt;
useful commands:&lt;br /&gt;
&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
 systemctl stop mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if cannot ssh to clondb1 from unix machine(s), try to ssh from one of the ROCs !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Master replica setting for computer center&#039;s slave (database &#039;rcdb&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/my/cnf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 open-files-limit                =  1040400&lt;br /&gt;
 server-id=1111&lt;br /&gt;
 log-bin                         = mariadb-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;systemctl restart mariadb&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
ssh root@clondb1 and do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@&#039;%.jlab.org&#039; IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
 USE rcdb;&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;mysqldump -u root -p --opt rcdb &amp;gt; rcdb.sql&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 UNLOCK TABLES;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Tell computer center following info: username(replica), password(clonreplica), output of command &#039;SHOW MASTER STATUS&#039;, and file &#039;rcdb.sql&#039; location.&lt;br /&gt;
&lt;br /&gt;
== Main MySQL server on clondb1 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clondb1&#039;&#039; is the primary MYSQL machine for CLAS Online databases, it is running MYSQL server and has database on its local disk in /database. All other CLON cluster machines have MYSQL installed but server should not be run there&lt;br /&gt;
&lt;br /&gt;
Installation for RHEL4 machines with satelite service (type following as &#039;root&#039;):&lt;br /&gt;
&lt;br /&gt;
  up2date mysql&lt;br /&gt;
  up2date mysql-server&lt;br /&gt;
&lt;br /&gt;
version 4.1.20 was obtained August 19, 2006; newer version can be installed if &#039;up2date&#039; will be used in future; repeat that procedure on all Linux_i686 and Linux_x86_64 machines.&lt;br /&gt;
&lt;br /&gt;
Installation for all other machines: Get tarball &#039;mysql-4.1.20.tar.gz&#039; from http://www.mysql.com/ and place it to /usr/local/downloads on CLON fileserver. Then do following:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 cp ../downloads/mysql-4.1.20.tar.gz .&lt;br /&gt;
 gunzip mysql-4.1.20.tar.gz&lt;br /&gt;
 tar xvf mysql-4.1.20.tar&lt;br /&gt;
 rm mysql-4.1.20.tar&lt;br /&gt;
 cd mysql-4.1.20&lt;br /&gt;
&lt;br /&gt;
Linux:&lt;br /&gt;
 ./configure --prefix=/usr --without-server&lt;br /&gt;
&lt;br /&gt;
Solaris:&lt;br /&gt;
 bash&lt;br /&gt;
 CC=cc CFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; CXX=CC CXXFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; ./configure --prefix=/usr --without-server&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
Repeat for all SunOS_i86pc, SunOS_sun4u, Linux_ppc machines. Login as &#039;root&#039; and do:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysql-4.1.20&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
It will install everything into /usr/bin, /usr/lib and /usr/include/mysql (same directories as on RHEL4).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; you may want to create symbolic links from &#039;&#039;/usr/lib&#039;&#039; to &#039;&#039;/usr/lib/mysql&#039;&#039; area for the libraries if it was not done by installation procedure:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/lib&lt;br /&gt;
 ln -s mysql/libmysqlclient.a libmysqlclient.a&lt;br /&gt;
 ln -s mysql/libmysqlclient.so libmysqlclient.so&lt;br /&gt;
 ln -s mysql/libmysqlclient.so.14 libmysqlclient.so.14&lt;br /&gt;
&lt;br /&gt;
Clondb1 preparations:&lt;br /&gt;
&lt;br /&gt;
Login as &#039;root&#039; and execute following commands:&lt;br /&gt;
&lt;br /&gt;
  id mysql&lt;br /&gt;
&lt;br /&gt;
you should see something like this:&lt;br /&gt;
&lt;br /&gt;
  uid=27(mysql) gid=27(mysql) groups=27(mysql)&lt;br /&gt;
&lt;br /&gt;
If &#039;mysql&#039; user or group does not exist, create it.&lt;br /&gt;
Specify desired database directory in &#039;/etc/my.cnf&#039;:&lt;br /&gt;
&lt;br /&gt;
  ###datadir=/var/lib/mysql&lt;br /&gt;
  datadir=/database&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;/var/lib/mysql&#039; directory has appropriate ownership (in our case basedir=/var/lib):&lt;br /&gt;
&lt;br /&gt;
  drwxr-xr-x   2 mysql     mysql    4096 Jun  1 23:42 mysql&lt;br /&gt;
&lt;br /&gt;
Same about /database:&lt;br /&gt;
&lt;br /&gt;
  chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Modify &#039;/etc/my.cnf&#039; if neseccary.&lt;br /&gt;
&lt;br /&gt;
Starting mysql server:&lt;br /&gt;
&lt;br /&gt;
  cd /var/lib/mysql&lt;br /&gt;
  mysql_install_db --user=mysql&lt;br /&gt;
&lt;br /&gt;
some useful instructions will be printed:&lt;br /&gt;
&lt;br /&gt;
  To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
  to the right place for your system&lt;br /&gt;
  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
  To do so, start the server, then issue the following commands:&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;new-password&#039;&lt;br /&gt;
  /usr/bin/mysqladmin -u root -h clondb1.jlab.org password &#039;new-password&#039;&lt;br /&gt;
  See the manual for more instructions.&lt;br /&gt;
  You can start the MySQL daemon with:&lt;br /&gt;
  cd /usr ; /usr/bin/mysqld_safe &amp;amp;&lt;br /&gt;
  You can test the MySQL daemon with the benchmarks in the &#039;sql-bench&#039; directory:&lt;br /&gt;
  cd sql-bench ; perl run-all-tests&lt;br /&gt;
  Please report any problems with the /usr/bin/mysqlbug script!&lt;br /&gt;
  The latest information about MySQL is available on the web at&lt;br /&gt;
  http://www.mysql.com&lt;br /&gt;
  Support MySQL by buying support/licenses at http://shop.mysql.com&lt;br /&gt;
&lt;br /&gt;
Now start mysql deamon:&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
NOTE: it did not worked, and wierd thing happened: when I tried to modify /etc/init.d/mysqld it started to work&lt;br /&gt;
right after I touched it; no real changes were applied, just file date was changed ...&lt;br /&gt;
It can be started as well as following: (cd /usr; /usr/bin/mysqld_safe &amp;amp;)&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysqld&#039; is running:&lt;br /&gt;
&lt;br /&gt;
  ps -ef | grep mysql&lt;br /&gt;
    root     23028 21947  0 20:54 pts/2    00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf&lt;br /&gt;
       --pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
    mysql    23053 23028  0 20:54 pts/2    00:00:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf &lt;br /&gt;
       --basedir=/usr --datadir=/database --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking&lt;br /&gt;
       --socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
Set mysql root password:&lt;br /&gt;
&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;********&#039;&lt;br /&gt;
&lt;br /&gt;
== MySQL server on Intel-based VME controllers ==&lt;br /&gt;
&lt;br /&gt;
To run standalone DAQ on Intel-based VME controller, MySQL server must be local. Following steps were performed to activate it:&lt;br /&gt;
&lt;br /&gt;
* yum install mysql mysql-devel mysql-server&lt;br /&gt;
&lt;br /&gt;
* NOTE: previous will create mysql user amd group and do other stuff, so you can skip following:&lt;br /&gt;
&lt;br /&gt;
 add &#039;mysql:x:27:&#039; to the /etc/group file if it is not there&lt;br /&gt;
 add &#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash&#039; to the /etc/passwd file if it is not there&lt;br /&gt;
 mkdir /var/lib/mysql&lt;br /&gt;
 chown mysql:mysql /var/lib/mysql&lt;br /&gt;
 mkdir /var/run/mysqld/&lt;br /&gt;
 chown mysql:mysql /var/run/mysqld/&lt;br /&gt;
&lt;br /&gt;
* create /var/lib/mysql/ directory in /root area and place appropriate line into /snapshot/files&lt;br /&gt;
&lt;br /&gt;
* reboot controller, mysql directory must be copied into custom area of the controller&lt;br /&gt;
&lt;br /&gt;
* /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
* mysql -h localhost -u root(should be able to enter mysql); GRANT ALL PRIVILEGES ON *.* TO &#039;clasrun&#039;@&#039;svt2.jlab.org&#039;; FLUSH PRIVILEGES;&lt;br /&gt;
&lt;br /&gt;
* cd /var/lib/mysql/&lt;br /&gt;
&lt;br /&gt;
* ssh clondb1; mysqldump --databases daq_daq daq_clasdev -h clondb1 -u root -p &amp;gt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
* mysql --force -h localhost -u root &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
== Dumping ==&lt;br /&gt;
&lt;br /&gt;
Dump is running as a cron job from clascron account on clondb1. See /database/dumpdb script. It accually locks table-by-table and dumps them, so it is not a whole database snapshot. Maybe better to run it on slave server locking whole database ...&lt;br /&gt;
&lt;br /&gt;
== Setting up replica ==&lt;br /&gt;
&lt;br /&gt;
clondb2 is a slave MySQL replica for the master running on clondb1 machine.&lt;br /&gt;
&lt;br /&gt;
Set up an account on the master server &#039;&#039;clondb1&#039;&#039; that the slave can use to make its connection. You need to grant the account REPLICATION SLAVE privilege:&lt;br /&gt;
&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@clondb2.jlab.org IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
&lt;br /&gt;
Take a snapshot of the data on the master server:&lt;br /&gt;
 &lt;br /&gt;
a) Lock all the tables on the master (flush to disk and lock):&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
&lt;br /&gt;
b) Run&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
and note the File and Position (if blank, don&#039;t worry). Accually it can be found in mirror.sql file (see below).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: do not exit MySQL session !!! LEAVE the MySQL client that you used for that running.&lt;br /&gt;
This will prevent updates while you&#039;re copying to your mirror.&lt;br /&gt;
&lt;br /&gt;
NOTE: when mysqldump started (see below) database will be locked, and it stays locked until dump is finished; when it is finished database will be unlocked; it seems not necessary to do (a),(b) and (d).&lt;br /&gt;
&lt;br /&gt;
c) From another window, take a dump of the data on the Master server:&lt;br /&gt;
 mysqldump --master-data --all-databases -uroot -p &amp;gt; mirror.sql&lt;br /&gt;
 &lt;br /&gt;
d) UNLOCK TABLES;&lt;br /&gt;
&lt;br /&gt;
5. Check that the Master server has an ID set and is running with the log-bin option. This should be in the my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 log-bin=mysql-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
or just (as it is now on clondb1):&lt;br /&gt;
 log-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
Server ids (Master and Slave) must all be unique positive integers.&lt;br /&gt;
&lt;br /&gt;
NOTE: to cleanup log-bin files do following:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25 22:00:00&#039;;&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25&#039;;&lt;br /&gt;
&lt;br /&gt;
or ask mysql to cleanup old files:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; SET GLOBAL expire_logs_days=10;&lt;br /&gt;
  mysql&amp;gt; show variables like &#039;expire_%&#039;;&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | Variable_name    | Value |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | expire_logs_days | 10    |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    1 row in set (0.00 sec)&lt;br /&gt;
To make that setting permanent, add following to &#039;&#039;/etc/my.cfg&#039;&#039; in &#039;[mysqld]&#039; section:&lt;br /&gt;
 expire_logs_days=10&lt;br /&gt;
It is also useful to add&lt;br /&gt;
 set-variable = open_files_limit=1040400&lt;br /&gt;
&lt;br /&gt;
Restart the server:&lt;br /&gt;
 /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
6. Stop the slave server and configure its my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 server-id=2&lt;br /&gt;
Restart the slave server&lt;br /&gt;
&lt;br /&gt;
7. Load the data onto the slave server; transfer the &#039;&#039;mirror.sql&#039;&#039; file created on master machine, then run&lt;br /&gt;
&lt;br /&gt;
  mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
Restart the slave server if you&#039;ve transferred different account information over!&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
8. Tell the slave server to act as a slave server, for example:&lt;br /&gt;
 CHANGE MASTER TO MASTER_HOST=&#039;clondb1.jlab.org&#039;, MASTER_USER=&#039;replica&#039;,&lt;br /&gt;
   MASTER_PASSWORD=&#039;clonreplica&#039;, MASTER_LOG_FILE=&#039;clondb1-bin.000790&#039;, MASTER_LOG_POS=9815913;&lt;br /&gt;
NOTE: MASTER_LOG_FILE and MASTER_LOG_POS are defined in the begining of mirror.sql file, get it from there.&lt;br /&gt;
&lt;br /&gt;
9. Start the slave threads&lt;br /&gt;
 START SLAVE;&lt;br /&gt;
&lt;br /&gt;
That should be it ... your slave will contact your master for any updates since the backup copy was taken.&lt;br /&gt;
&lt;br /&gt;
10. SHOW SLAVE STATUS;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to load data into slave server again, stop slave first, then load data and start slave again (it maybe necessary if slave server lost communication to the master):&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; STOP SLAVE;&lt;br /&gt;
  unix&amp;gt; mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
  mysql&amp;gt; START SLAVE;&lt;br /&gt;
&lt;br /&gt;
OPTIONS ON SETUP&lt;br /&gt;
&lt;br /&gt;
To reset slave (it will delete all log files) do following:&lt;br /&gt;
 stop slave;&lt;br /&gt;
 reset slave;&lt;br /&gt;
 start slave;&lt;br /&gt;
&lt;br /&gt;
Some alternatives:&lt;br /&gt;
&lt;br /&gt;
a) If you want to use LOAD TABLE FROM MASTER or LOAD DATA FROM MASTER commands later, you need to give your slave SUPER and RELOAD global privileges, and also SELECT privilege over any tables that you want to load.&lt;br /&gt;
&lt;br /&gt;
b) The data can also be transferred, more efficiently, in binary. In summary, you use tar, zip or similar software to squish the data directory in MySQL&#039;s data directory (extra steps needed if you&#039;re using InnoDb as well) and transfer those files - data files, log files, .frm definition files - and unpack them.&lt;br /&gt;
  &lt;br /&gt;
c) If you&#039;re going to be running different user accounts / passwords etc. on the slave server, or it&#039;s a significantly more recent version of MySQL, then do NOT transfer the database called mysql.&lt;br /&gt;
&lt;br /&gt;
d) If you&#039;re copying to a slave that has previously functioned as a slave, restart it with the --skip-slave-start option in order to avoid it contacting its old master right away.&lt;br /&gt;
&lt;br /&gt;
e) If you configure your slave server as a master too, then it can take over for data changes in the event of a prolonged failure of the master, and can feed data through to second layer slaves. With a properly configured network with homogeneous systems, the old master can be brought back in later as a slave to automatically catch up.&lt;br /&gt;
&lt;br /&gt;
WHAT HAPPENS WHEN IT&#039;S RUNNING?&lt;br /&gt;
&lt;br /&gt;
The Master server keeps a binary log file of database updates for passing to the slaves as required.&lt;br /&gt;
&lt;br /&gt;
The Slave server keeps data files called master.info and relay-log.info to keep track of how it&#039;s doing in processing the master log. It maintains a connection to the Master so that updates are virtually instant.&lt;br /&gt;
&lt;br /&gt;
If a slave server looses connection to the master, it will retry connecting periodically (default 60 seconds, --master-connect-retry option to change), and when it gets back in touch it will catch up.&lt;br /&gt;
&lt;br /&gt;
Master servers do not maintain a list of known slaves, let alone a note of whether or not they&#039;re up to date.&lt;br /&gt;
&lt;br /&gt;
You are STRONGLY advised not to edit any of these files directly, but rather to use commands such as CHANGE MASTER TO ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also MySQL - our FAQ&lt;br /&gt;
&lt;br /&gt;
== Full manual ==&lt;br /&gt;
&lt;br /&gt;
Complete MYSQL manual can be found at http://dev.mysql.com/doc/refman/4.1/en/index.html.&lt;br /&gt;
&lt;br /&gt;
== Problems observed ==&lt;br /&gt;
&lt;br /&gt;
1. After &#039;&#039;up2date&#039;&#039; on August 28, 2007 mysqld did not started, error message in file &#039;&#039;/var/log/mysqld.log&#039;&#039; was:&lt;br /&gt;
&lt;br /&gt;
 070829 12:16:58  mysqld started&lt;br /&gt;
 070829 12:16:58 [Warning] Can&#039;t create test file /database/clondb1.lower-test&lt;br /&gt;
 /usr/libexec/mysqld: Can&#039;t change dir to &#039;/database/&#039; (Errcode: 13)&lt;br /&gt;
 070829 12:16:58 [ERROR] Aborting&lt;br /&gt;
 070829 12:16:58 [Note] /usr/libexec/mysqld: Shutdown complete&lt;br /&gt;
 070829 12:16:58  mysqld ended&lt;br /&gt;
&lt;br /&gt;
Found on web following recommendation:&lt;br /&gt;
&lt;br /&gt;
 its because rhel 4 has selinux installed with it You need to disable it&lt;br /&gt;
 try&lt;br /&gt;
 setsebool -P mysqld_disable_trans=1&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
&lt;br /&gt;
 the newer version of linux has selinux installed.&lt;br /&gt;
 If that is it uses user mysqld_t which doesnt have permissions there.&lt;br /&gt;
 You can either shut selinux off totally - use the command i said or you&lt;br /&gt;
 will need to reflag files.&lt;br /&gt;
&lt;br /&gt;
After running command &#039;&#039;setsebool -P mysqld_disable_trans=1&#039;&#039; as &#039;&#039;root&#039;&#039; mysqld started fine.&lt;br /&gt;
It is started fine on reboot as well.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8745</id>
		<title>MySQL Installation</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8745"/>
		<updated>2026-05-27T14:49:50Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; RHEL9&#039;s yum offers mariadb10.5 and mysql8.0 by default. To see newer alternatives available, run &lt;br /&gt;
&lt;br /&gt;
 dnf module list mariadb&lt;br /&gt;
 dnf module list mysql&lt;br /&gt;
&lt;br /&gt;
If you want to use for example mariadb version 10.11 instead of 10.5, run&lt;br /&gt;
&lt;br /&gt;
 dnf module enable mariadb:10.11&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation on clondb2 (or any new server).&lt;br /&gt;
&lt;br /&gt;
Build server using options H and B; on formatting stage, create directory &#039;&#039;/database&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Stop and disable puppet:&lt;br /&gt;
&lt;br /&gt;
 systemctl stop puppet&lt;br /&gt;
 systemctl disable puppet&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 yum install mysql-server&lt;br /&gt;
&lt;br /&gt;
Set appropriate ownership for &#039;&#039;/database&#039;&#039; directory (assuming that &#039;&#039;/database&#039;&#039; directory exists):&lt;br /&gt;
&lt;br /&gt;
 chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Sometimes mysql log files can be very large, so they can be placed to separate partition if available, for example &#039;&#039;/data/logs&#039;&#039;, in that case adjust corresponding line &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NONONO!!!&#039;&#039;&#039; Create subdirectories if using &#039;&#039;/database&#039;&#039; area:&lt;br /&gt;
 mkdir /database/logs&lt;br /&gt;
 mkdir /database/run&lt;br /&gt;
 chown mysql:mysql /database/log&lt;br /&gt;
 chown mysql:mysql /database/run&lt;br /&gt;
&lt;br /&gt;
Modify settings in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section) as following:&lt;br /&gt;
&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 datadir=/database&lt;br /&gt;
 socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
 log-error=/database/logs/mysqld.log&lt;br /&gt;
 ##pid-file=/database/run/mysqld.pid&lt;br /&gt;
 pid-file=/run/mysqld/mysqld.pid&lt;br /&gt;
&lt;br /&gt;
 # Tuning parameters&lt;br /&gt;
 open_files_limit                =  1040400&lt;br /&gt;
 max_connections                 = 1024&lt;br /&gt;
 &lt;br /&gt;
 # Basically disable client lockout due to bad connections&lt;br /&gt;
 max_connect_errors              = 1000&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 max_allowed_packet              = 64M&lt;br /&gt;
 myisam_sort_buffer_size         = 64M&lt;br /&gt;
 tmp_table_size                  = 64M&lt;br /&gt;
 max_heap_table_size             = 64M&lt;br /&gt;
 &lt;br /&gt;
 # InnoDB Config&lt;br /&gt;
 innodb_data_home_dir            = data&lt;br /&gt;
 innodb_data_file_path           = ibdata1:10M:autoextend&lt;br /&gt;
 innodb_undo_directory           = data&lt;br /&gt;
 &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 %&lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size         = 256M&lt;br /&gt;
 &lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size            = 64M&lt;br /&gt;
 innodb_log_buffer_size          = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit  = 1&lt;br /&gt;
 innodb_lock_wait_timeout        = 50&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a replication master for replication to externally visible slave, but also&lt;br /&gt;
 # to provide point in time DB recovery if needed.&lt;br /&gt;
 server-id                       = 1111&lt;br /&gt;
 log-bin                         = data/mysql-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a slave if necessary...&lt;br /&gt;
 #skip_slave_start                = 0&lt;br /&gt;
 #report-host                     = clondb2.jlab.org&lt;br /&gt;
 &lt;br /&gt;
 # Diagnostic Logging configuration&lt;br /&gt;
 ###log-warnings                    = 2&lt;br /&gt;
 general-log                     = 1&lt;br /&gt;
 general_log_file                = /database/log/mysqld-general.log&lt;br /&gt;
 slow_query_log                  = 1&lt;br /&gt;
 slow_query_log_file             = /database/log/mysqld-slow-queries.log&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; during reboot, directory &#039;&#039;/run/mysqld&#039;&#039; was not created by &#039;&#039;systemd-tmpfiles-setup.service&#039;&#039;, although corresponding file &#039;&#039;/usr/lib/tmpfiles.d/mysqld.conf&#039;&#039; contains line &#039;&#039;d /run/mysqld 0755 mysql mysql -&#039;&#039;, error message from tmpfiles service is following:&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/mysqld.conf:1: Failed to resolve user &#039;mysql&#039;: No such process&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/nss-pam-ldapd.conf:2: Failed to resolve user &#039;nslcd&#039;: No such process&lt;br /&gt;
Since we moved PID file to &#039;&#039;/database/run&#039;&#039; directory, it does not effect us, but still ... Problem seems related to the missing &#039;&#039;mysql&#039;&#039; user in &#039;&#039;/etc/passwd&#039;&#039;. That user exists globally on CUE, but during boot it seems not available yet. Not sure why mysqld installation process did not create that user locally, or maybe puppet removed it ... anyway I added line &#039;&#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/sbin/nologin&#039;&#039; manually to &#039;&#039;/etc/passwd&#039;&#039;, and problem was solved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable mysql server:&lt;br /&gt;
 systemctl enable --now mysqld.service&lt;br /&gt;
&lt;br /&gt;
Check server status:&lt;br /&gt;
 systemctl status mysqld.service&lt;br /&gt;
&lt;br /&gt;
Go to old database machine and backup all databases, for example for clondb1:&lt;br /&gt;
 mysqldump -u root -p --routines --events --triggers --single-transaction --result-file=clondb1_full_backup.sql --all-databases&lt;br /&gt;
&lt;br /&gt;
Copy file &#039;&#039;clondb1_full_backup.sql&#039;&#039; to the new server &#039;&#039;clondb2&#039;&#039; and run following command:&lt;br /&gt;
 mysql &amp;lt; clondb1_full_backup.sql&lt;br /&gt;
&lt;br /&gt;
Restart service, it is needed in particular to upgrade &#039;&#039;mysql.user&#039;&#039; and maybe other tables imported from another mysql server:&lt;br /&gt;
 systemctl restart mysqld.service&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if dumping older database, using &#039;--all-databases&#039; in &#039;mysqldump&#039; command may screwed up something, for example error message &#039;ERROR 1449 (HY000): The user specified as a definer (&#039;mysql.infoschema&#039;@&#039;localhost&#039;) does not exist&#039; may shows up; to fix it, do force upgrade: add/uncomment line &#039;&#039;upgrade=FORCE&#039;&#039; in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; file, and restart service, after that comment that line out.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: set legacy authentication in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section), needed until all clients are mysql8.0 or higher&lt;br /&gt;
 default_authentication_plugin=mysql_native_password&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if importing from older database, it seems previous setting is not enough, every user&#039;s plugin have to be set specifically to &#039;&#039;mysql_native_password&#039;&#039;, at least for users without passwords, for example:&lt;br /&gt;
 ALTER USER &#039;clasrun&#039;@&#039;%&#039; IDENTIFIED WITH mysql_native_password;&lt;br /&gt;
or if it does not work, create new account with previous one deleted, and then restore old account name, using &#039;&#039;phpMyAdmin&#039;&#039;: User accounts-&amp;gt;Edit privileges-&amp;gt;Login information-&amp;gt;Authentication plugin.&#039;&#039;&#039; Make sure password/nopassword is preserved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; inserting &#039;rcdb&#039; produced errors which were overruled by&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 mysql&amp;gt; SOURCE /root/clondb1_rcdb_backup.sql&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 1;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; increasing open file limit in &#039;&#039;/etc/my*&#039; config file (like &#039;&#039;open_files_limit=65535&#039;&#039; or in older versions &#039;&#039;open-files-limit=65535&#039;&#039;) may not be enough; run command&lt;br /&gt;
 systemctl edit mysql.service (or mariadb.service)&lt;br /&gt;
and add following:&lt;br /&gt;
 [Service]&lt;br /&gt;
 LimitNOFILE=65535&lt;br /&gt;
 # LimitMEMLOCK=infinity # Optional, if needed&lt;br /&gt;
then reload and restart corresponding services:&lt;br /&gt;
 systemctl deamon-reload&lt;br /&gt;
 systemctl restart mysql.service (or mariadb.service)&lt;br /&gt;
and check actual setting in mysql session:&lt;br /&gt;
 SHOW VARIABLES LIKE &#039;open%&#039;;&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | Variable_name    | Value |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | open_files_limit | 65535 |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 1 row in set (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was an error in &#039;mysql &amp;lt; clondb3_full_backup.sql&#039; connamd:&lt;br /&gt;
 ERROR 1418 (HY000) at line 1013: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)&lt;br /&gt;
It was fixed by following setting in mysql root session:&lt;br /&gt;
 SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
&lt;br /&gt;
Mount file server partition for mysql backups: add following line to &#039;&#039;/etc/auto.direct&#039;&#039;:&lt;br /&gt;
 /mysql                -rw,bg     clonfs1:/vol/mysql&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/dbdumperpw.txt&#039;&#039; containing mysql password for the user &#039;&#039;dbdumper&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/usr/bin/mail&#039;&#039; installed.&lt;br /&gt;
&lt;br /&gt;
Start backup cronjob from clascron account:&lt;br /&gt;
 20 9,18 * * * (/usr/local/bin/dumpdb clondb1new dbdumper /mysql/clondb1new/backup) | mail -s &amp;quot;DB Dump from clondb1new&amp;quot; boiarino@jlab.org&lt;br /&gt;
&lt;br /&gt;
== Installation of the older MariaDB on RHEL9 from source ==&lt;br /&gt;
&lt;br /&gt;
 cd /root&lt;br /&gt;
 cp /usr/downloads/mariadb-5.5.68.tar.gz .&lt;br /&gt;
 tar -xzvf mariadb-5.5.68.tar.gz&lt;br /&gt;
 rm mariadb-5.5.68.tar.gz&lt;br /&gt;
 cd mariadb-5.5.68&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake .. -DCMAKE_INSTALL_PREFIX=/root/mysql -DMYSQL_DATADIR=/database -DDISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING=TRUE&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was compilation error, I commented out soome lines in &#039;&#039;storage/tokudb/ft-index/portability/toku_pthread.cc&#039;&#039;, probably there is better way ... :&lt;br /&gt;
&lt;br /&gt;
 int toku_pthread_yield(void) {&lt;br /&gt;
    //#if defined(HAVE_PTHREAD_YIELD)&lt;br /&gt;
    //# if defined(PTHREAD_YIELD_RETURNS_INT)&lt;br /&gt;
    return pthread_yield();&lt;br /&gt;
    //# elif defined(PTHREAD_YIELD_RETURNS_VOID)&lt;br /&gt;
    //    pthread_yield();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //# else&lt;br /&gt;
    //#  error &amp;quot;don&#039;t know what pthread_yield() returns&amp;quot;&lt;br /&gt;
    //# endif&lt;br /&gt;
    //#elif defined(HAVE_PTHREAD_YIELD_NP)&lt;br /&gt;
    //    pthread_yield_np();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //#else&lt;br /&gt;
    //# error &amp;quot;cannot find pthread_yield or pthread_yield_np&amp;quot;&lt;br /&gt;
    //#endif&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysql:27&#039; user and &#039;mysql:27&#039; group exists.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/root&#039;&#039; is &#039;&#039;drwxr-xr-x.  root root&#039;&#039;, &#039;&#039;/root/mysql&#039;&#039; is &#039;&#039;drwxr-xr-x. root root&#039;&#039;, and &#039;&#039;/database&#039;&#039; is &#039;&#039;drwxr-xr-x. mysql mysql&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Initialize the Data Directory: The initial system tables and data directory need to be created before MariaDB can run:&lt;br /&gt;
 cd /root/mysql&lt;br /&gt;
 scripts/mysql_install_db --user=mysql --basedir=/root/mysql --datadir=/database&lt;br /&gt;
&lt;br /&gt;
Start the MariaDB server manually to make sure it is running:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe&lt;br /&gt;
&lt;br /&gt;
Import everything from the old clondb3&#039;s sql file:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysql -u root&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SOURCE /root/clondb3_full_backup.sql;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; in case of &#039;&#039;root&#039;&#039; access problems, run it with following flags:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe --skip-grant-tables --skip-networking&lt;br /&gt;
&lt;br /&gt;
or, if you know &#039;&#039;root@loocalhost&#039;&#039; password on older clondb3, enter mysql with that password. Alter &#039;&#039;root@localhost&#039;&#039; user setting it as &#039;&#039;no password&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To run it as systemd service, create file &#039;&#039;/usr/lib/systemd/system/mariadb.service&#039;&#039; with following content:&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Mariadb 5.5&lt;br /&gt;
 After=network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=forking&lt;br /&gt;
 PrivateTmp=true&lt;br /&gt;
 User=mysql&lt;br /&gt;
 Group=mysql&lt;br /&gt;
 ExecStart=/root/mysql/support-files/mysql.server start&lt;br /&gt;
 ExecStop=/root/mysql/support-files/mysql.server stop&lt;br /&gt;
 Restart=on-abort&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Enable and start service:&lt;br /&gt;
&lt;br /&gt;
 systemctl daemon-reload&lt;br /&gt;
 systemctl enable mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
Uses mariadb instead of mysql:&lt;br /&gt;
&lt;br /&gt;
 systemctl restart mariadb&lt;br /&gt;
&lt;br /&gt;
useful commands:&lt;br /&gt;
&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
 systemctl stop mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if cannot ssh to clondb1 from unix machine(s), try to ssh from one of the ROCs !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Master replica setting for computer center&#039;s slave (database &#039;rcdb&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/my/cnf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 open-files-limit                =  1040400&lt;br /&gt;
 server-id=1111&lt;br /&gt;
 log-bin                         = mariadb-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;systemctl restart mariadb&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
ssh root@clondb1 and do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@&#039;%.jlab.org&#039; IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
 USE rcdb;&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;mysqldump -u root -p --opt rcdb &amp;gt; rcdb.sql&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 UNLOCK TABLES;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Tell computer center following info: username(replica), password(clonreplica), output of command &#039;SHOW MASTER STATUS&#039;, and file &#039;rcdb.sql&#039; location.&lt;br /&gt;
&lt;br /&gt;
== Main MySQL server on clondb1 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clondb1&#039;&#039; is the primary MYSQL machine for CLAS Online databases, it is running MYSQL server and has database on its local disk in /database. All other CLON cluster machines have MYSQL installed but server should not be run there&lt;br /&gt;
&lt;br /&gt;
Installation for RHEL4 machines with satelite service (type following as &#039;root&#039;):&lt;br /&gt;
&lt;br /&gt;
  up2date mysql&lt;br /&gt;
  up2date mysql-server&lt;br /&gt;
&lt;br /&gt;
version 4.1.20 was obtained August 19, 2006; newer version can be installed if &#039;up2date&#039; will be used in future; repeat that procedure on all Linux_i686 and Linux_x86_64 machines.&lt;br /&gt;
&lt;br /&gt;
Installation for all other machines: Get tarball &#039;mysql-4.1.20.tar.gz&#039; from http://www.mysql.com/ and place it to /usr/local/downloads on CLON fileserver. Then do following:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 cp ../downloads/mysql-4.1.20.tar.gz .&lt;br /&gt;
 gunzip mysql-4.1.20.tar.gz&lt;br /&gt;
 tar xvf mysql-4.1.20.tar&lt;br /&gt;
 rm mysql-4.1.20.tar&lt;br /&gt;
 cd mysql-4.1.20&lt;br /&gt;
&lt;br /&gt;
Linux:&lt;br /&gt;
 ./configure --prefix=/usr --without-server&lt;br /&gt;
&lt;br /&gt;
Solaris:&lt;br /&gt;
 bash&lt;br /&gt;
 CC=cc CFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; CXX=CC CXXFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; ./configure --prefix=/usr --without-server&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
Repeat for all SunOS_i86pc, SunOS_sun4u, Linux_ppc machines. Login as &#039;root&#039; and do:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysql-4.1.20&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
It will install everything into /usr/bin, /usr/lib and /usr/include/mysql (same directories as on RHEL4).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; you may want to create symbolic links from &#039;&#039;/usr/lib&#039;&#039; to &#039;&#039;/usr/lib/mysql&#039;&#039; area for the libraries if it was not done by installation procedure:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/lib&lt;br /&gt;
 ln -s mysql/libmysqlclient.a libmysqlclient.a&lt;br /&gt;
 ln -s mysql/libmysqlclient.so libmysqlclient.so&lt;br /&gt;
 ln -s mysql/libmysqlclient.so.14 libmysqlclient.so.14&lt;br /&gt;
&lt;br /&gt;
Clondb1 preparations:&lt;br /&gt;
&lt;br /&gt;
Login as &#039;root&#039; and execute following commands:&lt;br /&gt;
&lt;br /&gt;
  id mysql&lt;br /&gt;
&lt;br /&gt;
you should see something like this:&lt;br /&gt;
&lt;br /&gt;
  uid=27(mysql) gid=27(mysql) groups=27(mysql)&lt;br /&gt;
&lt;br /&gt;
If &#039;mysql&#039; user or group does not exist, create it.&lt;br /&gt;
Specify desired database directory in &#039;/etc/my.cnf&#039;:&lt;br /&gt;
&lt;br /&gt;
  ###datadir=/var/lib/mysql&lt;br /&gt;
  datadir=/database&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;/var/lib/mysql&#039; directory has appropriate ownership (in our case basedir=/var/lib):&lt;br /&gt;
&lt;br /&gt;
  drwxr-xr-x   2 mysql     mysql    4096 Jun  1 23:42 mysql&lt;br /&gt;
&lt;br /&gt;
Same about /database:&lt;br /&gt;
&lt;br /&gt;
  chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Modify &#039;/etc/my.cnf&#039; if neseccary.&lt;br /&gt;
&lt;br /&gt;
Starting mysql server:&lt;br /&gt;
&lt;br /&gt;
  cd /var/lib/mysql&lt;br /&gt;
  mysql_install_db --user=mysql&lt;br /&gt;
&lt;br /&gt;
some useful instructions will be printed:&lt;br /&gt;
&lt;br /&gt;
  To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
  to the right place for your system&lt;br /&gt;
  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
  To do so, start the server, then issue the following commands:&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;new-password&#039;&lt;br /&gt;
  /usr/bin/mysqladmin -u root -h clondb1.jlab.org password &#039;new-password&#039;&lt;br /&gt;
  See the manual for more instructions.&lt;br /&gt;
  You can start the MySQL daemon with:&lt;br /&gt;
  cd /usr ; /usr/bin/mysqld_safe &amp;amp;&lt;br /&gt;
  You can test the MySQL daemon with the benchmarks in the &#039;sql-bench&#039; directory:&lt;br /&gt;
  cd sql-bench ; perl run-all-tests&lt;br /&gt;
  Please report any problems with the /usr/bin/mysqlbug script!&lt;br /&gt;
  The latest information about MySQL is available on the web at&lt;br /&gt;
  http://www.mysql.com&lt;br /&gt;
  Support MySQL by buying support/licenses at http://shop.mysql.com&lt;br /&gt;
&lt;br /&gt;
Now start mysql deamon:&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
NOTE: it did not worked, and wierd thing happened: when I tried to modify /etc/init.d/mysqld it started to work&lt;br /&gt;
right after I touched it; no real changes were applied, just file date was changed ...&lt;br /&gt;
It can be started as well as following: (cd /usr; /usr/bin/mysqld_safe &amp;amp;)&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysqld&#039; is running:&lt;br /&gt;
&lt;br /&gt;
  ps -ef | grep mysql&lt;br /&gt;
    root     23028 21947  0 20:54 pts/2    00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf&lt;br /&gt;
       --pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
    mysql    23053 23028  0 20:54 pts/2    00:00:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf &lt;br /&gt;
       --basedir=/usr --datadir=/database --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking&lt;br /&gt;
       --socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
Set mysql root password:&lt;br /&gt;
&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;********&#039;&lt;br /&gt;
&lt;br /&gt;
== MySQL server on Intel-based VME controllers ==&lt;br /&gt;
&lt;br /&gt;
To run standalone DAQ on Intel-based VME controller, MySQL server must be local. Following steps were performed to activate it:&lt;br /&gt;
&lt;br /&gt;
* yum install mysql mysql-devel mysql-server&lt;br /&gt;
&lt;br /&gt;
* NOTE: previous will create mysql user amd group and do other stuff, so you can skip following:&lt;br /&gt;
&lt;br /&gt;
 add &#039;mysql:x:27:&#039; to the /etc/group file if it is not there&lt;br /&gt;
 add &#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash&#039; to the /etc/passwd file if it is not there&lt;br /&gt;
 mkdir /var/lib/mysql&lt;br /&gt;
 chown mysql:mysql /var/lib/mysql&lt;br /&gt;
 mkdir /var/run/mysqld/&lt;br /&gt;
 chown mysql:mysql /var/run/mysqld/&lt;br /&gt;
&lt;br /&gt;
* create /var/lib/mysql/ directory in /root area and place appropriate line into /snapshot/files&lt;br /&gt;
&lt;br /&gt;
* reboot controller, mysql directory must be copied into custom area of the controller&lt;br /&gt;
&lt;br /&gt;
* /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
* mysql -h localhost -u root(should be able to enter mysql); GRANT ALL PRIVILEGES ON *.* TO &#039;clasrun&#039;@&#039;svt2.jlab.org&#039;; FLUSH PRIVILEGES;&lt;br /&gt;
&lt;br /&gt;
* cd /var/lib/mysql/&lt;br /&gt;
&lt;br /&gt;
* ssh clondb1; mysqldump --databases daq_daq daq_clasdev -h clondb1 -u root -p &amp;gt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
* mysql --force -h localhost -u root &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
== Dumping ==&lt;br /&gt;
&lt;br /&gt;
Dump is running as a cron job from clascron account on clondb1. See /database/dumpdb script. It accually locks table-by-table and dumps them, so it is not a whole database snapshot. Maybe better to run it on slave server locking whole database ...&lt;br /&gt;
&lt;br /&gt;
== Setting up replica ==&lt;br /&gt;
&lt;br /&gt;
clondb2 is a slave MySQL replica for the master running on clondb1 machine.&lt;br /&gt;
&lt;br /&gt;
Set up an account on the master server &#039;&#039;clondb1&#039;&#039; that the slave can use to make its connection. You need to grant the account REPLICATION SLAVE privilege:&lt;br /&gt;
&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@clondb2.jlab.org IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
&lt;br /&gt;
Take a snapshot of the data on the master server:&lt;br /&gt;
 &lt;br /&gt;
a) Lock all the tables on the master (flush to disk and lock):&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
&lt;br /&gt;
b) Run&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
and note the File and Position (if blank, don&#039;t worry). Accually it can be found in mirror.sql file (see below).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: do not exit MySQL session !!! LEAVE the MySQL client that you used for that running.&lt;br /&gt;
This will prevent updates while you&#039;re copying to your mirror.&lt;br /&gt;
&lt;br /&gt;
NOTE: when mysqldump started (see below) database will be locked, and it stays locked until dump is finished; when it is finished database will be unlocked; it seems not necessary to do (a),(b) and (d).&lt;br /&gt;
&lt;br /&gt;
c) From another window, take a dump of the data on the Master server:&lt;br /&gt;
 mysqldump --master-data --all-databases -uroot -p &amp;gt; mirror.sql&lt;br /&gt;
 &lt;br /&gt;
d) UNLOCK TABLES;&lt;br /&gt;
&lt;br /&gt;
5. Check that the Master server has an ID set and is running with the log-bin option. This should be in the my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 log-bin=mysql-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
or just (as it is now on clondb1):&lt;br /&gt;
 log-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
Server ids (Master and Slave) must all be unique positive integers.&lt;br /&gt;
&lt;br /&gt;
NOTE: to cleanup log-bin files do following:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25 22:00:00&#039;;&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25&#039;;&lt;br /&gt;
&lt;br /&gt;
or ask mysql to cleanup old files:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; SET GLOBAL expire_logs_days=10;&lt;br /&gt;
  mysql&amp;gt; show variables like &#039;expire_%&#039;;&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | Variable_name    | Value |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | expire_logs_days | 10    |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    1 row in set (0.00 sec)&lt;br /&gt;
To make that setting permanent, add following to &#039;&#039;/etc/my.cfg&#039;&#039; in &#039;[mysqld]&#039; section:&lt;br /&gt;
 expire_logs_days=10&lt;br /&gt;
It is also useful to add&lt;br /&gt;
 set-variable = open_files_limit=1040400&lt;br /&gt;
&lt;br /&gt;
Restart the server:&lt;br /&gt;
 /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
6. Stop the slave server and configure its my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 server-id=2&lt;br /&gt;
Restart the slave server&lt;br /&gt;
&lt;br /&gt;
7. Load the data onto the slave server; transfer the &#039;&#039;mirror.sql&#039;&#039; file created on master machine, then run&lt;br /&gt;
&lt;br /&gt;
  mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
Restart the slave server if you&#039;ve transferred different account information over!&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
8. Tell the slave server to act as a slave server, for example:&lt;br /&gt;
 CHANGE MASTER TO MASTER_HOST=&#039;clondb1.jlab.org&#039;, MASTER_USER=&#039;replica&#039;,&lt;br /&gt;
   MASTER_PASSWORD=&#039;clonreplica&#039;, MASTER_LOG_FILE=&#039;clondb1-bin.000790&#039;, MASTER_LOG_POS=9815913;&lt;br /&gt;
NOTE: MASTER_LOG_FILE and MASTER_LOG_POS are defined in the begining of mirror.sql file, get it from there.&lt;br /&gt;
&lt;br /&gt;
9. Start the slave threads&lt;br /&gt;
 START SLAVE;&lt;br /&gt;
&lt;br /&gt;
That should be it ... your slave will contact your master for any updates since the backup copy was taken.&lt;br /&gt;
&lt;br /&gt;
10. SHOW SLAVE STATUS;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to load data into slave server again, stop slave first, then load data and start slave again (it maybe necessary if slave server lost communication to the master):&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; STOP SLAVE;&lt;br /&gt;
  unix&amp;gt; mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
  mysql&amp;gt; START SLAVE;&lt;br /&gt;
&lt;br /&gt;
OPTIONS ON SETUP&lt;br /&gt;
&lt;br /&gt;
To reset slave (it will delete all log files) do following:&lt;br /&gt;
 stop slave;&lt;br /&gt;
 reset slave;&lt;br /&gt;
 start slave;&lt;br /&gt;
&lt;br /&gt;
Some alternatives:&lt;br /&gt;
&lt;br /&gt;
a) If you want to use LOAD TABLE FROM MASTER or LOAD DATA FROM MASTER commands later, you need to give your slave SUPER and RELOAD global privileges, and also SELECT privilege over any tables that you want to load.&lt;br /&gt;
&lt;br /&gt;
b) The data can also be transferred, more efficiently, in binary. In summary, you use tar, zip or similar software to squish the data directory in MySQL&#039;s data directory (extra steps needed if you&#039;re using InnoDb as well) and transfer those files - data files, log files, .frm definition files - and unpack them.&lt;br /&gt;
  &lt;br /&gt;
c) If you&#039;re going to be running different user accounts / passwords etc. on the slave server, or it&#039;s a significantly more recent version of MySQL, then do NOT transfer the database called mysql.&lt;br /&gt;
&lt;br /&gt;
d) If you&#039;re copying to a slave that has previously functioned as a slave, restart it with the --skip-slave-start option in order to avoid it contacting its old master right away.&lt;br /&gt;
&lt;br /&gt;
e) If you configure your slave server as a master too, then it can take over for data changes in the event of a prolonged failure of the master, and can feed data through to second layer slaves. With a properly configured network with homogeneous systems, the old master can be brought back in later as a slave to automatically catch up.&lt;br /&gt;
&lt;br /&gt;
WHAT HAPPENS WHEN IT&#039;S RUNNING?&lt;br /&gt;
&lt;br /&gt;
The Master server keeps a binary log file of database updates for passing to the slaves as required.&lt;br /&gt;
&lt;br /&gt;
The Slave server keeps data files called master.info and relay-log.info to keep track of how it&#039;s doing in processing the master log. It maintains a connection to the Master so that updates are virtually instant.&lt;br /&gt;
&lt;br /&gt;
If a slave server looses connection to the master, it will retry connecting periodically (default 60 seconds, --master-connect-retry option to change), and when it gets back in touch it will catch up.&lt;br /&gt;
&lt;br /&gt;
Master servers do not maintain a list of known slaves, let alone a note of whether or not they&#039;re up to date.&lt;br /&gt;
&lt;br /&gt;
You are STRONGLY advised not to edit any of these files directly, but rather to use commands such as CHANGE MASTER TO ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also MySQL - our FAQ&lt;br /&gt;
&lt;br /&gt;
== Full manual ==&lt;br /&gt;
&lt;br /&gt;
Complete MYSQL manual can be found at http://dev.mysql.com/doc/refman/4.1/en/index.html.&lt;br /&gt;
&lt;br /&gt;
== Problems observed ==&lt;br /&gt;
&lt;br /&gt;
1. After &#039;&#039;up2date&#039;&#039; on August 28, 2007 mysqld did not started, error message in file &#039;&#039;/var/log/mysqld.log&#039;&#039; was:&lt;br /&gt;
&lt;br /&gt;
 070829 12:16:58  mysqld started&lt;br /&gt;
 070829 12:16:58 [Warning] Can&#039;t create test file /database/clondb1.lower-test&lt;br /&gt;
 /usr/libexec/mysqld: Can&#039;t change dir to &#039;/database/&#039; (Errcode: 13)&lt;br /&gt;
 070829 12:16:58 [ERROR] Aborting&lt;br /&gt;
 070829 12:16:58 [Note] /usr/libexec/mysqld: Shutdown complete&lt;br /&gt;
 070829 12:16:58  mysqld ended&lt;br /&gt;
&lt;br /&gt;
Found on web following recommendation:&lt;br /&gt;
&lt;br /&gt;
 its because rhel 4 has selinux installed with it You need to disable it&lt;br /&gt;
 try&lt;br /&gt;
 setsebool -P mysqld_disable_trans=1&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
&lt;br /&gt;
 the newer version of linux has selinux installed.&lt;br /&gt;
 If that is it uses user mysqld_t which doesnt have permissions there.&lt;br /&gt;
 You can either shut selinux off totally - use the command i said or you&lt;br /&gt;
 will need to reflag files.&lt;br /&gt;
&lt;br /&gt;
After running command &#039;&#039;setsebool -P mysqld_disable_trans=1&#039;&#039; as &#039;&#039;root&#039;&#039; mysqld started fine.&lt;br /&gt;
It is started fine on reboot as well.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8744</id>
		<title>MySQL Installation</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8744"/>
		<updated>2026-05-27T14:32:00Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; RHEL9&#039;s yum offers mariadb10.5 by default. To see newer alternatives available, run&lt;br /&gt;
&lt;br /&gt;
 dnf module list mariadb&lt;br /&gt;
&lt;br /&gt;
If you want to make for example version 10.11 default, run&lt;br /&gt;
&lt;br /&gt;
 dnf module enable mariadb:10.11&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation on clondb2 (or any new server).&lt;br /&gt;
&lt;br /&gt;
Build server using options H and B; on formatting stage, create directory &#039;&#039;/database&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Stop and disable puppet:&lt;br /&gt;
&lt;br /&gt;
 systemctl stop puppet&lt;br /&gt;
 systemctl disable puppet&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 yum install mysql-server&lt;br /&gt;
&lt;br /&gt;
Set appropriate ownership for &#039;&#039;/database&#039;&#039; directory (assuming that &#039;&#039;/database&#039;&#039; directory exists):&lt;br /&gt;
&lt;br /&gt;
 chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Sometimes mysql log files can be very large, so they can be placed to separate partition if available, for example &#039;&#039;/data/logs&#039;&#039;, in that case adjust corresponding line &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NONONO!!!&#039;&#039;&#039; Create subdirectories if using &#039;&#039;/database&#039;&#039; area:&lt;br /&gt;
 mkdir /database/logs&lt;br /&gt;
 mkdir /database/run&lt;br /&gt;
 chown mysql:mysql /database/log&lt;br /&gt;
 chown mysql:mysql /database/run&lt;br /&gt;
&lt;br /&gt;
Modify settings in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section) as following:&lt;br /&gt;
&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 datadir=/database&lt;br /&gt;
 socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
 log-error=/database/logs/mysqld.log&lt;br /&gt;
 ##pid-file=/database/run/mysqld.pid&lt;br /&gt;
 pid-file=/run/mysqld/mysqld.pid&lt;br /&gt;
&lt;br /&gt;
 # Tuning parameters&lt;br /&gt;
 open_files_limit                =  1040400&lt;br /&gt;
 max_connections                 = 1024&lt;br /&gt;
 &lt;br /&gt;
 # Basically disable client lockout due to bad connections&lt;br /&gt;
 max_connect_errors              = 1000&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 max_allowed_packet              = 64M&lt;br /&gt;
 myisam_sort_buffer_size         = 64M&lt;br /&gt;
 tmp_table_size                  = 64M&lt;br /&gt;
 max_heap_table_size             = 64M&lt;br /&gt;
 &lt;br /&gt;
 # InnoDB Config&lt;br /&gt;
 innodb_data_home_dir            = data&lt;br /&gt;
 innodb_data_file_path           = ibdata1:10M:autoextend&lt;br /&gt;
 innodb_undo_directory           = data&lt;br /&gt;
 &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 %&lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size         = 256M&lt;br /&gt;
 &lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size            = 64M&lt;br /&gt;
 innodb_log_buffer_size          = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit  = 1&lt;br /&gt;
 innodb_lock_wait_timeout        = 50&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a replication master for replication to externally visible slave, but also&lt;br /&gt;
 # to provide point in time DB recovery if needed.&lt;br /&gt;
 server-id                       = 1111&lt;br /&gt;
 log-bin                         = data/mysql-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a slave if necessary...&lt;br /&gt;
 #skip_slave_start                = 0&lt;br /&gt;
 #report-host                     = clondb2.jlab.org&lt;br /&gt;
 &lt;br /&gt;
 # Diagnostic Logging configuration&lt;br /&gt;
 ###log-warnings                    = 2&lt;br /&gt;
 general-log                     = 1&lt;br /&gt;
 general_log_file                = /database/log/mysqld-general.log&lt;br /&gt;
 slow_query_log                  = 1&lt;br /&gt;
 slow_query_log_file             = /database/log/mysqld-slow-queries.log&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; during reboot, directory &#039;&#039;/run/mysqld&#039;&#039; was not created by &#039;&#039;systemd-tmpfiles-setup.service&#039;&#039;, although corresponding file &#039;&#039;/usr/lib/tmpfiles.d/mysqld.conf&#039;&#039; contains line &#039;&#039;d /run/mysqld 0755 mysql mysql -&#039;&#039;, error message from tmpfiles service is following:&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/mysqld.conf:1: Failed to resolve user &#039;mysql&#039;: No such process&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/nss-pam-ldapd.conf:2: Failed to resolve user &#039;nslcd&#039;: No such process&lt;br /&gt;
Since we moved PID file to &#039;&#039;/database/run&#039;&#039; directory, it does not effect us, but still ... Problem seems related to the missing &#039;&#039;mysql&#039;&#039; user in &#039;&#039;/etc/passwd&#039;&#039;. That user exists globally on CUE, but during boot it seems not available yet. Not sure why mysqld installation process did not create that user locally, or maybe puppet removed it ... anyway I added line &#039;&#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/sbin/nologin&#039;&#039; manually to &#039;&#039;/etc/passwd&#039;&#039;, and problem was solved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable mysql server:&lt;br /&gt;
 systemctl enable --now mysqld.service&lt;br /&gt;
&lt;br /&gt;
Check server status:&lt;br /&gt;
 systemctl status mysqld.service&lt;br /&gt;
&lt;br /&gt;
Go to old database machine and backup all databases, for example for clondb1:&lt;br /&gt;
 mysqldump -u root -p --routines --events --triggers --single-transaction --result-file=clondb1_full_backup.sql --all-databases&lt;br /&gt;
&lt;br /&gt;
Copy file &#039;&#039;clondb1_full_backup.sql&#039;&#039; to the new server &#039;&#039;clondb2&#039;&#039; and run following command:&lt;br /&gt;
 mysql &amp;lt; clondb1_full_backup.sql&lt;br /&gt;
&lt;br /&gt;
Restart service, it is needed in particular to upgrade &#039;&#039;mysql.user&#039;&#039; and maybe other tables imported from another mysql server:&lt;br /&gt;
 systemctl restart mysqld.service&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if dumping older database, using &#039;--all-databases&#039; in &#039;mysqldump&#039; command may screwed up something, for example error message &#039;ERROR 1449 (HY000): The user specified as a definer (&#039;mysql.infoschema&#039;@&#039;localhost&#039;) does not exist&#039; may shows up; to fix it, do force upgrade: add/uncomment line &#039;&#039;upgrade=FORCE&#039;&#039; in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; file, and restart service, after that comment that line out.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: set legacy authentication in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section), needed until all clients are mysql8.0 or higher&lt;br /&gt;
 default_authentication_plugin=mysql_native_password&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if importing from older database, it seems previous setting is not enough, every user&#039;s plugin have to be set specifically to &#039;&#039;mysql_native_password&#039;&#039;, at least for users without passwords, for example:&lt;br /&gt;
 ALTER USER &#039;clasrun&#039;@&#039;%&#039; IDENTIFIED WITH mysql_native_password;&lt;br /&gt;
or if it does not work, create new account with previous one deleted, and then restore old account name, using &#039;&#039;phpMyAdmin&#039;&#039;: User accounts-&amp;gt;Edit privileges-&amp;gt;Login information-&amp;gt;Authentication plugin.&#039;&#039;&#039; Make sure password/nopassword is preserved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; inserting &#039;rcdb&#039; produced errors which were overruled by&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 mysql&amp;gt; SOURCE /root/clondb1_rcdb_backup.sql&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 1;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; increasing open file limit in &#039;&#039;/etc/my*&#039; config file (like &#039;&#039;open_files_limit=65535&#039;&#039; or in older versions &#039;&#039;open-files-limit=65535&#039;&#039;) may not be enough; run command&lt;br /&gt;
 systemctl edit mysql.service (or mariadb.service)&lt;br /&gt;
and add following:&lt;br /&gt;
 [Service]&lt;br /&gt;
 LimitNOFILE=65535&lt;br /&gt;
 # LimitMEMLOCK=infinity # Optional, if needed&lt;br /&gt;
then reload and restart corresponding services:&lt;br /&gt;
 systemctl deamon-reload&lt;br /&gt;
 systemctl restart mysql.service (or mariadb.service)&lt;br /&gt;
and check actual setting in mysql session:&lt;br /&gt;
 SHOW VARIABLES LIKE &#039;open%&#039;;&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | Variable_name    | Value |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | open_files_limit | 65535 |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 1 row in set (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was an error in &#039;mysql &amp;lt; clondb3_full_backup.sql&#039; connamd:&lt;br /&gt;
 ERROR 1418 (HY000) at line 1013: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)&lt;br /&gt;
It was fixed by following setting in mysql root session:&lt;br /&gt;
 SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
&lt;br /&gt;
Mount file server partition for mysql backups: add following line to &#039;&#039;/etc/auto.direct&#039;&#039;:&lt;br /&gt;
 /mysql                -rw,bg     clonfs1:/vol/mysql&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/dbdumperpw.txt&#039;&#039; containing mysql password for the user &#039;&#039;dbdumper&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/usr/bin/mail&#039;&#039; installed.&lt;br /&gt;
&lt;br /&gt;
Start backup cronjob from clascron account:&lt;br /&gt;
 20 9,18 * * * (/usr/local/bin/dumpdb clondb1new dbdumper /mysql/clondb1new/backup) | mail -s &amp;quot;DB Dump from clondb1new&amp;quot; boiarino@jlab.org&lt;br /&gt;
&lt;br /&gt;
== Installation of the older MariaDB on RHEL9 from source ==&lt;br /&gt;
&lt;br /&gt;
 cd /root&lt;br /&gt;
 cp /usr/downloads/mariadb-5.5.68.tar.gz .&lt;br /&gt;
 tar -xzvf mariadb-5.5.68.tar.gz&lt;br /&gt;
 rm mariadb-5.5.68.tar.gz&lt;br /&gt;
 cd mariadb-5.5.68&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake .. -DCMAKE_INSTALL_PREFIX=/root/mysql -DMYSQL_DATADIR=/database -DDISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING=TRUE&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was compilation error, I commented out soome lines in &#039;&#039;storage/tokudb/ft-index/portability/toku_pthread.cc&#039;&#039;, probably there is better way ... :&lt;br /&gt;
&lt;br /&gt;
 int toku_pthread_yield(void) {&lt;br /&gt;
    //#if defined(HAVE_PTHREAD_YIELD)&lt;br /&gt;
    //# if defined(PTHREAD_YIELD_RETURNS_INT)&lt;br /&gt;
    return pthread_yield();&lt;br /&gt;
    //# elif defined(PTHREAD_YIELD_RETURNS_VOID)&lt;br /&gt;
    //    pthread_yield();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //# else&lt;br /&gt;
    //#  error &amp;quot;don&#039;t know what pthread_yield() returns&amp;quot;&lt;br /&gt;
    //# endif&lt;br /&gt;
    //#elif defined(HAVE_PTHREAD_YIELD_NP)&lt;br /&gt;
    //    pthread_yield_np();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //#else&lt;br /&gt;
    //# error &amp;quot;cannot find pthread_yield or pthread_yield_np&amp;quot;&lt;br /&gt;
    //#endif&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysql:27&#039; user and &#039;mysql:27&#039; group exists.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/root&#039;&#039; is &#039;&#039;drwxr-xr-x.  root root&#039;&#039;, &#039;&#039;/root/mysql&#039;&#039; is &#039;&#039;drwxr-xr-x. root root&#039;&#039;, and &#039;&#039;/database&#039;&#039; is &#039;&#039;drwxr-xr-x. mysql mysql&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Initialize the Data Directory: The initial system tables and data directory need to be created before MariaDB can run:&lt;br /&gt;
 cd /root/mysql&lt;br /&gt;
 scripts/mysql_install_db --user=mysql --basedir=/root/mysql --datadir=/database&lt;br /&gt;
&lt;br /&gt;
Start the MariaDB server manually to make sure it is running:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe&lt;br /&gt;
&lt;br /&gt;
Import everything from the old clondb3&#039;s sql file:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysql -u root&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SOURCE /root/clondb3_full_backup.sql;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; in case of &#039;&#039;root&#039;&#039; access problems, run it with following flags:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe --skip-grant-tables --skip-networking&lt;br /&gt;
&lt;br /&gt;
or, if you know &#039;&#039;root@loocalhost&#039;&#039; password on older clondb3, enter mysql with that password. Alter &#039;&#039;root@localhost&#039;&#039; user setting it as &#039;&#039;no password&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To run it as systemd service, create file &#039;&#039;/usr/lib/systemd/system/mariadb.service&#039;&#039; with following content:&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Mariadb 5.5&lt;br /&gt;
 After=network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=forking&lt;br /&gt;
 PrivateTmp=true&lt;br /&gt;
 User=mysql&lt;br /&gt;
 Group=mysql&lt;br /&gt;
 ExecStart=/root/mysql/support-files/mysql.server start&lt;br /&gt;
 ExecStop=/root/mysql/support-files/mysql.server stop&lt;br /&gt;
 Restart=on-abort&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Enable and start service:&lt;br /&gt;
&lt;br /&gt;
 systemctl daemon-reload&lt;br /&gt;
 systemctl enable mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
Uses mariadb instead of mysql:&lt;br /&gt;
&lt;br /&gt;
 systemctl restart mariadb&lt;br /&gt;
&lt;br /&gt;
useful commands:&lt;br /&gt;
&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
 systemctl stop mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if cannot ssh to clondb1 from unix machine(s), try to ssh from one of the ROCs !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Master replica setting for computer center&#039;s slave (database &#039;rcdb&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/my/cnf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 open-files-limit                =  1040400&lt;br /&gt;
 server-id=1111&lt;br /&gt;
 log-bin                         = mariadb-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;systemctl restart mariadb&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
ssh root@clondb1 and do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@&#039;%.jlab.org&#039; IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
 USE rcdb;&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;mysqldump -u root -p --opt rcdb &amp;gt; rcdb.sql&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 UNLOCK TABLES;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Tell computer center following info: username(replica), password(clonreplica), output of command &#039;SHOW MASTER STATUS&#039;, and file &#039;rcdb.sql&#039; location.&lt;br /&gt;
&lt;br /&gt;
== Main MySQL server on clondb1 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clondb1&#039;&#039; is the primary MYSQL machine for CLAS Online databases, it is running MYSQL server and has database on its local disk in /database. All other CLON cluster machines have MYSQL installed but server should not be run there&lt;br /&gt;
&lt;br /&gt;
Installation for RHEL4 machines with satelite service (type following as &#039;root&#039;):&lt;br /&gt;
&lt;br /&gt;
  up2date mysql&lt;br /&gt;
  up2date mysql-server&lt;br /&gt;
&lt;br /&gt;
version 4.1.20 was obtained August 19, 2006; newer version can be installed if &#039;up2date&#039; will be used in future; repeat that procedure on all Linux_i686 and Linux_x86_64 machines.&lt;br /&gt;
&lt;br /&gt;
Installation for all other machines: Get tarball &#039;mysql-4.1.20.tar.gz&#039; from http://www.mysql.com/ and place it to /usr/local/downloads on CLON fileserver. Then do following:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 cp ../downloads/mysql-4.1.20.tar.gz .&lt;br /&gt;
 gunzip mysql-4.1.20.tar.gz&lt;br /&gt;
 tar xvf mysql-4.1.20.tar&lt;br /&gt;
 rm mysql-4.1.20.tar&lt;br /&gt;
 cd mysql-4.1.20&lt;br /&gt;
&lt;br /&gt;
Linux:&lt;br /&gt;
 ./configure --prefix=/usr --without-server&lt;br /&gt;
&lt;br /&gt;
Solaris:&lt;br /&gt;
 bash&lt;br /&gt;
 CC=cc CFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; CXX=CC CXXFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; ./configure --prefix=/usr --without-server&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
Repeat for all SunOS_i86pc, SunOS_sun4u, Linux_ppc machines. Login as &#039;root&#039; and do:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysql-4.1.20&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
It will install everything into /usr/bin, /usr/lib and /usr/include/mysql (same directories as on RHEL4).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; you may want to create symbolic links from &#039;&#039;/usr/lib&#039;&#039; to &#039;&#039;/usr/lib/mysql&#039;&#039; area for the libraries if it was not done by installation procedure:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/lib&lt;br /&gt;
 ln -s mysql/libmysqlclient.a libmysqlclient.a&lt;br /&gt;
 ln -s mysql/libmysqlclient.so libmysqlclient.so&lt;br /&gt;
 ln -s mysql/libmysqlclient.so.14 libmysqlclient.so.14&lt;br /&gt;
&lt;br /&gt;
Clondb1 preparations:&lt;br /&gt;
&lt;br /&gt;
Login as &#039;root&#039; and execute following commands:&lt;br /&gt;
&lt;br /&gt;
  id mysql&lt;br /&gt;
&lt;br /&gt;
you should see something like this:&lt;br /&gt;
&lt;br /&gt;
  uid=27(mysql) gid=27(mysql) groups=27(mysql)&lt;br /&gt;
&lt;br /&gt;
If &#039;mysql&#039; user or group does not exist, create it.&lt;br /&gt;
Specify desired database directory in &#039;/etc/my.cnf&#039;:&lt;br /&gt;
&lt;br /&gt;
  ###datadir=/var/lib/mysql&lt;br /&gt;
  datadir=/database&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;/var/lib/mysql&#039; directory has appropriate ownership (in our case basedir=/var/lib):&lt;br /&gt;
&lt;br /&gt;
  drwxr-xr-x   2 mysql     mysql    4096 Jun  1 23:42 mysql&lt;br /&gt;
&lt;br /&gt;
Same about /database:&lt;br /&gt;
&lt;br /&gt;
  chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Modify &#039;/etc/my.cnf&#039; if neseccary.&lt;br /&gt;
&lt;br /&gt;
Starting mysql server:&lt;br /&gt;
&lt;br /&gt;
  cd /var/lib/mysql&lt;br /&gt;
  mysql_install_db --user=mysql&lt;br /&gt;
&lt;br /&gt;
some useful instructions will be printed:&lt;br /&gt;
&lt;br /&gt;
  To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
  to the right place for your system&lt;br /&gt;
  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
  To do so, start the server, then issue the following commands:&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;new-password&#039;&lt;br /&gt;
  /usr/bin/mysqladmin -u root -h clondb1.jlab.org password &#039;new-password&#039;&lt;br /&gt;
  See the manual for more instructions.&lt;br /&gt;
  You can start the MySQL daemon with:&lt;br /&gt;
  cd /usr ; /usr/bin/mysqld_safe &amp;amp;&lt;br /&gt;
  You can test the MySQL daemon with the benchmarks in the &#039;sql-bench&#039; directory:&lt;br /&gt;
  cd sql-bench ; perl run-all-tests&lt;br /&gt;
  Please report any problems with the /usr/bin/mysqlbug script!&lt;br /&gt;
  The latest information about MySQL is available on the web at&lt;br /&gt;
  http://www.mysql.com&lt;br /&gt;
  Support MySQL by buying support/licenses at http://shop.mysql.com&lt;br /&gt;
&lt;br /&gt;
Now start mysql deamon:&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
NOTE: it did not worked, and wierd thing happened: when I tried to modify /etc/init.d/mysqld it started to work&lt;br /&gt;
right after I touched it; no real changes were applied, just file date was changed ...&lt;br /&gt;
It can be started as well as following: (cd /usr; /usr/bin/mysqld_safe &amp;amp;)&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysqld&#039; is running:&lt;br /&gt;
&lt;br /&gt;
  ps -ef | grep mysql&lt;br /&gt;
    root     23028 21947  0 20:54 pts/2    00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf&lt;br /&gt;
       --pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
    mysql    23053 23028  0 20:54 pts/2    00:00:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf &lt;br /&gt;
       --basedir=/usr --datadir=/database --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking&lt;br /&gt;
       --socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
Set mysql root password:&lt;br /&gt;
&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;********&#039;&lt;br /&gt;
&lt;br /&gt;
== MySQL server on Intel-based VME controllers ==&lt;br /&gt;
&lt;br /&gt;
To run standalone DAQ on Intel-based VME controller, MySQL server must be local. Following steps were performed to activate it:&lt;br /&gt;
&lt;br /&gt;
* yum install mysql mysql-devel mysql-server&lt;br /&gt;
&lt;br /&gt;
* NOTE: previous will create mysql user amd group and do other stuff, so you can skip following:&lt;br /&gt;
&lt;br /&gt;
 add &#039;mysql:x:27:&#039; to the /etc/group file if it is not there&lt;br /&gt;
 add &#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash&#039; to the /etc/passwd file if it is not there&lt;br /&gt;
 mkdir /var/lib/mysql&lt;br /&gt;
 chown mysql:mysql /var/lib/mysql&lt;br /&gt;
 mkdir /var/run/mysqld/&lt;br /&gt;
 chown mysql:mysql /var/run/mysqld/&lt;br /&gt;
&lt;br /&gt;
* create /var/lib/mysql/ directory in /root area and place appropriate line into /snapshot/files&lt;br /&gt;
&lt;br /&gt;
* reboot controller, mysql directory must be copied into custom area of the controller&lt;br /&gt;
&lt;br /&gt;
* /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
* mysql -h localhost -u root(should be able to enter mysql); GRANT ALL PRIVILEGES ON *.* TO &#039;clasrun&#039;@&#039;svt2.jlab.org&#039;; FLUSH PRIVILEGES;&lt;br /&gt;
&lt;br /&gt;
* cd /var/lib/mysql/&lt;br /&gt;
&lt;br /&gt;
* ssh clondb1; mysqldump --databases daq_daq daq_clasdev -h clondb1 -u root -p &amp;gt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
* mysql --force -h localhost -u root &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
== Dumping ==&lt;br /&gt;
&lt;br /&gt;
Dump is running as a cron job from clascron account on clondb1. See /database/dumpdb script. It accually locks table-by-table and dumps them, so it is not a whole database snapshot. Maybe better to run it on slave server locking whole database ...&lt;br /&gt;
&lt;br /&gt;
== Setting up replica ==&lt;br /&gt;
&lt;br /&gt;
clondb2 is a slave MySQL replica for the master running on clondb1 machine.&lt;br /&gt;
&lt;br /&gt;
Set up an account on the master server &#039;&#039;clondb1&#039;&#039; that the slave can use to make its connection. You need to grant the account REPLICATION SLAVE privilege:&lt;br /&gt;
&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@clondb2.jlab.org IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
&lt;br /&gt;
Take a snapshot of the data on the master server:&lt;br /&gt;
 &lt;br /&gt;
a) Lock all the tables on the master (flush to disk and lock):&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
&lt;br /&gt;
b) Run&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
and note the File and Position (if blank, don&#039;t worry). Accually it can be found in mirror.sql file (see below).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: do not exit MySQL session !!! LEAVE the MySQL client that you used for that running.&lt;br /&gt;
This will prevent updates while you&#039;re copying to your mirror.&lt;br /&gt;
&lt;br /&gt;
NOTE: when mysqldump started (see below) database will be locked, and it stays locked until dump is finished; when it is finished database will be unlocked; it seems not necessary to do (a),(b) and (d).&lt;br /&gt;
&lt;br /&gt;
c) From another window, take a dump of the data on the Master server:&lt;br /&gt;
 mysqldump --master-data --all-databases -uroot -p &amp;gt; mirror.sql&lt;br /&gt;
 &lt;br /&gt;
d) UNLOCK TABLES;&lt;br /&gt;
&lt;br /&gt;
5. Check that the Master server has an ID set and is running with the log-bin option. This should be in the my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 log-bin=mysql-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
or just (as it is now on clondb1):&lt;br /&gt;
 log-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
Server ids (Master and Slave) must all be unique positive integers.&lt;br /&gt;
&lt;br /&gt;
NOTE: to cleanup log-bin files do following:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25 22:00:00&#039;;&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25&#039;;&lt;br /&gt;
&lt;br /&gt;
or ask mysql to cleanup old files:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; SET GLOBAL expire_logs_days=10;&lt;br /&gt;
  mysql&amp;gt; show variables like &#039;expire_%&#039;;&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | Variable_name    | Value |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | expire_logs_days | 10    |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    1 row in set (0.00 sec)&lt;br /&gt;
To make that setting permanent, add following to &#039;&#039;/etc/my.cfg&#039;&#039; in &#039;[mysqld]&#039; section:&lt;br /&gt;
 expire_logs_days=10&lt;br /&gt;
It is also useful to add&lt;br /&gt;
 set-variable = open_files_limit=1040400&lt;br /&gt;
&lt;br /&gt;
Restart the server:&lt;br /&gt;
 /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
6. Stop the slave server and configure its my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 server-id=2&lt;br /&gt;
Restart the slave server&lt;br /&gt;
&lt;br /&gt;
7. Load the data onto the slave server; transfer the &#039;&#039;mirror.sql&#039;&#039; file created on master machine, then run&lt;br /&gt;
&lt;br /&gt;
  mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
Restart the slave server if you&#039;ve transferred different account information over!&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
8. Tell the slave server to act as a slave server, for example:&lt;br /&gt;
 CHANGE MASTER TO MASTER_HOST=&#039;clondb1.jlab.org&#039;, MASTER_USER=&#039;replica&#039;,&lt;br /&gt;
   MASTER_PASSWORD=&#039;clonreplica&#039;, MASTER_LOG_FILE=&#039;clondb1-bin.000790&#039;, MASTER_LOG_POS=9815913;&lt;br /&gt;
NOTE: MASTER_LOG_FILE and MASTER_LOG_POS are defined in the begining of mirror.sql file, get it from there.&lt;br /&gt;
&lt;br /&gt;
9. Start the slave threads&lt;br /&gt;
 START SLAVE;&lt;br /&gt;
&lt;br /&gt;
That should be it ... your slave will contact your master for any updates since the backup copy was taken.&lt;br /&gt;
&lt;br /&gt;
10. SHOW SLAVE STATUS;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to load data into slave server again, stop slave first, then load data and start slave again (it maybe necessary if slave server lost communication to the master):&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; STOP SLAVE;&lt;br /&gt;
  unix&amp;gt; mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
  mysql&amp;gt; START SLAVE;&lt;br /&gt;
&lt;br /&gt;
OPTIONS ON SETUP&lt;br /&gt;
&lt;br /&gt;
To reset slave (it will delete all log files) do following:&lt;br /&gt;
 stop slave;&lt;br /&gt;
 reset slave;&lt;br /&gt;
 start slave;&lt;br /&gt;
&lt;br /&gt;
Some alternatives:&lt;br /&gt;
&lt;br /&gt;
a) If you want to use LOAD TABLE FROM MASTER or LOAD DATA FROM MASTER commands later, you need to give your slave SUPER and RELOAD global privileges, and also SELECT privilege over any tables that you want to load.&lt;br /&gt;
&lt;br /&gt;
b) The data can also be transferred, more efficiently, in binary. In summary, you use tar, zip or similar software to squish the data directory in MySQL&#039;s data directory (extra steps needed if you&#039;re using InnoDb as well) and transfer those files - data files, log files, .frm definition files - and unpack them.&lt;br /&gt;
  &lt;br /&gt;
c) If you&#039;re going to be running different user accounts / passwords etc. on the slave server, or it&#039;s a significantly more recent version of MySQL, then do NOT transfer the database called mysql.&lt;br /&gt;
&lt;br /&gt;
d) If you&#039;re copying to a slave that has previously functioned as a slave, restart it with the --skip-slave-start option in order to avoid it contacting its old master right away.&lt;br /&gt;
&lt;br /&gt;
e) If you configure your slave server as a master too, then it can take over for data changes in the event of a prolonged failure of the master, and can feed data through to second layer slaves. With a properly configured network with homogeneous systems, the old master can be brought back in later as a slave to automatically catch up.&lt;br /&gt;
&lt;br /&gt;
WHAT HAPPENS WHEN IT&#039;S RUNNING?&lt;br /&gt;
&lt;br /&gt;
The Master server keeps a binary log file of database updates for passing to the slaves as required.&lt;br /&gt;
&lt;br /&gt;
The Slave server keeps data files called master.info and relay-log.info to keep track of how it&#039;s doing in processing the master log. It maintains a connection to the Master so that updates are virtually instant.&lt;br /&gt;
&lt;br /&gt;
If a slave server looses connection to the master, it will retry connecting periodically (default 60 seconds, --master-connect-retry option to change), and when it gets back in touch it will catch up.&lt;br /&gt;
&lt;br /&gt;
Master servers do not maintain a list of known slaves, let alone a note of whether or not they&#039;re up to date.&lt;br /&gt;
&lt;br /&gt;
You are STRONGLY advised not to edit any of these files directly, but rather to use commands such as CHANGE MASTER TO ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also MySQL - our FAQ&lt;br /&gt;
&lt;br /&gt;
== Full manual ==&lt;br /&gt;
&lt;br /&gt;
Complete MYSQL manual can be found at http://dev.mysql.com/doc/refman/4.1/en/index.html.&lt;br /&gt;
&lt;br /&gt;
== Problems observed ==&lt;br /&gt;
&lt;br /&gt;
1. After &#039;&#039;up2date&#039;&#039; on August 28, 2007 mysqld did not started, error message in file &#039;&#039;/var/log/mysqld.log&#039;&#039; was:&lt;br /&gt;
&lt;br /&gt;
 070829 12:16:58  mysqld started&lt;br /&gt;
 070829 12:16:58 [Warning] Can&#039;t create test file /database/clondb1.lower-test&lt;br /&gt;
 /usr/libexec/mysqld: Can&#039;t change dir to &#039;/database/&#039; (Errcode: 13)&lt;br /&gt;
 070829 12:16:58 [ERROR] Aborting&lt;br /&gt;
 070829 12:16:58 [Note] /usr/libexec/mysqld: Shutdown complete&lt;br /&gt;
 070829 12:16:58  mysqld ended&lt;br /&gt;
&lt;br /&gt;
Found on web following recommendation:&lt;br /&gt;
&lt;br /&gt;
 its because rhel 4 has selinux installed with it You need to disable it&lt;br /&gt;
 try&lt;br /&gt;
 setsebool -P mysqld_disable_trans=1&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
&lt;br /&gt;
 the newer version of linux has selinux installed.&lt;br /&gt;
 If that is it uses user mysqld_t which doesnt have permissions there.&lt;br /&gt;
 You can either shut selinux off totally - use the command i said or you&lt;br /&gt;
 will need to reflag files.&lt;br /&gt;
&lt;br /&gt;
After running command &#039;&#039;setsebool -P mysqld_disable_trans=1&#039;&#039; as &#039;&#039;root&#039;&#039; mysqld started fine.&lt;br /&gt;
It is started fine on reboot as well.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8743</id>
		<title>MySQL Installation</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MySQL_Installation&amp;diff=8743"/>
		<updated>2026-05-27T13:59:14Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; RHEL9&#039;s yum offers mariadb10.5 by default; to get newer version, do&lt;br /&gt;
&lt;br /&gt;
 dnf module enable mariadb:10.11&lt;br /&gt;
&lt;br /&gt;
Installation on clondb2 (or any new server).&lt;br /&gt;
&lt;br /&gt;
Build server using options H and B; on formatting stage, create directory &#039;&#039;/database&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Stop and disable puppet:&lt;br /&gt;
&lt;br /&gt;
 systemctl stop puppet&lt;br /&gt;
 systemctl disable puppet&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 yum install mysql-server&lt;br /&gt;
&lt;br /&gt;
Set appropriate ownership for &#039;&#039;/database&#039;&#039; directory (assuming that &#039;&#039;/database&#039;&#039; directory exists):&lt;br /&gt;
&lt;br /&gt;
 chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Sometimes mysql log files can be very large, so they can be placed to separate partition if available, for example &#039;&#039;/data/logs&#039;&#039;, in that case adjust corresponding line &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NONONO!!!&#039;&#039;&#039; Create subdirectories if using &#039;&#039;/database&#039;&#039; area:&lt;br /&gt;
 mkdir /database/logs&lt;br /&gt;
 mkdir /database/run&lt;br /&gt;
 chown mysql:mysql /database/log&lt;br /&gt;
 chown mysql:mysql /database/run&lt;br /&gt;
&lt;br /&gt;
Modify settings in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section) as following:&lt;br /&gt;
&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 datadir=/database&lt;br /&gt;
 socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
 log-error=/database/logs/mysqld.log&lt;br /&gt;
 ##pid-file=/database/run/mysqld.pid&lt;br /&gt;
 pid-file=/run/mysqld/mysqld.pid&lt;br /&gt;
&lt;br /&gt;
 # Tuning parameters&lt;br /&gt;
 open_files_limit                =  1040400&lt;br /&gt;
 max_connections                 = 1024&lt;br /&gt;
 &lt;br /&gt;
 # Basically disable client lockout due to bad connections&lt;br /&gt;
 max_connect_errors              = 1000&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 max_allowed_packet              = 64M&lt;br /&gt;
 myisam_sort_buffer_size         = 64M&lt;br /&gt;
 tmp_table_size                  = 64M&lt;br /&gt;
 max_heap_table_size             = 64M&lt;br /&gt;
 &lt;br /&gt;
 # InnoDB Config&lt;br /&gt;
 innodb_data_home_dir            = data&lt;br /&gt;
 innodb_data_file_path           = ibdata1:10M:autoextend&lt;br /&gt;
 innodb_undo_directory           = data&lt;br /&gt;
 &lt;br /&gt;
 # You can set .._buffer_pool_size up to 50 - 80 %&lt;br /&gt;
 # of RAM but beware of setting memory usage too high&lt;br /&gt;
 innodb_buffer_pool_size         = 256M&lt;br /&gt;
 &lt;br /&gt;
 # Set .._log_file_size to 25 % of buffer pool size&lt;br /&gt;
 innodb_log_file_size            = 64M&lt;br /&gt;
 innodb_log_buffer_size          = 8M&lt;br /&gt;
 innodb_flush_log_at_trx_commit  = 1&lt;br /&gt;
 innodb_lock_wait_timeout        = 50&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a replication master for replication to externally visible slave, but also&lt;br /&gt;
 # to provide point in time DB recovery if needed.&lt;br /&gt;
 server-id                       = 1111&lt;br /&gt;
 log-bin                         = data/mysql-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
 &lt;br /&gt;
 # Configure as a slave if necessary...&lt;br /&gt;
 #skip_slave_start                = 0&lt;br /&gt;
 #report-host                     = clondb2.jlab.org&lt;br /&gt;
 &lt;br /&gt;
 # Diagnostic Logging configuration&lt;br /&gt;
 ###log-warnings                    = 2&lt;br /&gt;
 general-log                     = 1&lt;br /&gt;
 general_log_file                = /database/log/mysqld-general.log&lt;br /&gt;
 slow_query_log                  = 1&lt;br /&gt;
 slow_query_log_file             = /database/log/mysqld-slow-queries.log&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; during reboot, directory &#039;&#039;/run/mysqld&#039;&#039; was not created by &#039;&#039;systemd-tmpfiles-setup.service&#039;&#039;, although corresponding file &#039;&#039;/usr/lib/tmpfiles.d/mysqld.conf&#039;&#039; contains line &#039;&#039;d /run/mysqld 0755 mysql mysql -&#039;&#039;, error message from tmpfiles service is following:&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/mysqld.conf:1: Failed to resolve user &#039;mysql&#039;: No such process&lt;br /&gt;
 Jan 06 19:05:49 localhost systemd-tmpfiles[799]: /usr/lib/tmpfiles.d/nss-pam-ldapd.conf:2: Failed to resolve user &#039;nslcd&#039;: No such process&lt;br /&gt;
Since we moved PID file to &#039;&#039;/database/run&#039;&#039; directory, it does not effect us, but still ... Problem seems related to the missing &#039;&#039;mysql&#039;&#039; user in &#039;&#039;/etc/passwd&#039;&#039;. That user exists globally on CUE, but during boot it seems not available yet. Not sure why mysqld installation process did not create that user locally, or maybe puppet removed it ... anyway I added line &#039;&#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/sbin/nologin&#039;&#039; manually to &#039;&#039;/etc/passwd&#039;&#039;, and problem was solved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable mysql server:&lt;br /&gt;
 systemctl enable --now mysqld.service&lt;br /&gt;
&lt;br /&gt;
Check server status:&lt;br /&gt;
 systemctl status mysqld.service&lt;br /&gt;
&lt;br /&gt;
Go to old database machine and backup all databases, for example for clondb1:&lt;br /&gt;
 mysqldump -u root -p --routines --events --triggers --single-transaction --result-file=clondb1_full_backup.sql --all-databases&lt;br /&gt;
&lt;br /&gt;
Copy file &#039;&#039;clondb1_full_backup.sql&#039;&#039; to the new server &#039;&#039;clondb2&#039;&#039; and run following command:&lt;br /&gt;
 mysql &amp;lt; clondb1_full_backup.sql&lt;br /&gt;
&lt;br /&gt;
Restart service, it is needed in particular to upgrade &#039;&#039;mysql.user&#039;&#039; and maybe other tables imported from another mysql server:&lt;br /&gt;
 systemctl restart mysqld.service&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if dumping older database, using &#039;--all-databases&#039; in &#039;mysqldump&#039; command may screwed up something, for example error message &#039;ERROR 1449 (HY000): The user specified as a definer (&#039;mysql.infoschema&#039;@&#039;localhost&#039;) does not exist&#039; may shows up; to fix it, do force upgrade: add/uncomment line &#039;&#039;upgrade=FORCE&#039;&#039; in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; file, and restart service, after that comment that line out.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: set legacy authentication in &#039;&#039;/etc/my.cnf.d/mysql-server.cnf&#039;&#039; ([mysqld] section), needed until all clients are mysql8.0 or higher&lt;br /&gt;
 default_authentication_plugin=mysql_native_password&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if importing from older database, it seems previous setting is not enough, every user&#039;s plugin have to be set specifically to &#039;&#039;mysql_native_password&#039;&#039;, at least for users without passwords, for example:&lt;br /&gt;
 ALTER USER &#039;clasrun&#039;@&#039;%&#039; IDENTIFIED WITH mysql_native_password;&lt;br /&gt;
or if it does not work, create new account with previous one deleted, and then restore old account name, using &#039;&#039;phpMyAdmin&#039;&#039;: User accounts-&amp;gt;Edit privileges-&amp;gt;Login information-&amp;gt;Authentication plugin.&#039;&#039;&#039; Make sure password/nopassword is preserved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; inserting &#039;rcdb&#039; produced errors which were overruled by&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 mysql&amp;gt; SOURCE /root/clondb1_rcdb_backup.sql&lt;br /&gt;
 mysql&amp;gt; SET FOREIGN_KEY_CHECKS = 1;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; increasing open file limit in &#039;&#039;/etc/my*&#039; config file (like &#039;&#039;open_files_limit=65535&#039;&#039; or in older versions &#039;&#039;open-files-limit=65535&#039;&#039;) may not be enough; run command&lt;br /&gt;
 systemctl edit mysql.service (or mariadb.service)&lt;br /&gt;
and add following:&lt;br /&gt;
 [Service]&lt;br /&gt;
 LimitNOFILE=65535&lt;br /&gt;
 # LimitMEMLOCK=infinity # Optional, if needed&lt;br /&gt;
then reload and restart corresponding services:&lt;br /&gt;
 systemctl deamon-reload&lt;br /&gt;
 systemctl restart mysql.service (or mariadb.service)&lt;br /&gt;
and check actual setting in mysql session:&lt;br /&gt;
 SHOW VARIABLES LIKE &#039;open%&#039;;&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | Variable_name    | Value |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 | open_files_limit | 65535 |&lt;br /&gt;
 +------------------+-------+&lt;br /&gt;
 1 row in set (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was an error in &#039;mysql &amp;lt; clondb3_full_backup.sql&#039; connamd:&lt;br /&gt;
 ERROR 1418 (HY000) at line 1013: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)&lt;br /&gt;
It was fixed by following setting in mysql root session:&lt;br /&gt;
 SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
&lt;br /&gt;
Mount file server partition for mysql backups: add following line to &#039;&#039;/etc/auto.direct&#039;&#039;:&lt;br /&gt;
 /mysql                -rw,bg     clonfs1:/vol/mysql&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/dbdumperpw.txt&#039;&#039; containing mysql password for the user &#039;&#039;dbdumper&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/usr/bin/mail&#039;&#039; installed.&lt;br /&gt;
&lt;br /&gt;
Start backup cronjob from clascron account:&lt;br /&gt;
 20 9,18 * * * (/usr/local/bin/dumpdb clondb1new dbdumper /mysql/clondb1new/backup) | mail -s &amp;quot;DB Dump from clondb1new&amp;quot; boiarino@jlab.org&lt;br /&gt;
&lt;br /&gt;
== Installation of the older MariaDB on RHEL9 from source ==&lt;br /&gt;
&lt;br /&gt;
 cd /root&lt;br /&gt;
 cp /usr/downloads/mariadb-5.5.68.tar.gz .&lt;br /&gt;
 tar -xzvf mariadb-5.5.68.tar.gz&lt;br /&gt;
 rm mariadb-5.5.68.tar.gz&lt;br /&gt;
 cd mariadb-5.5.68&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake .. -DCMAKE_INSTALL_PREFIX=/root/mysql -DMYSQL_DATADIR=/database -DDISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING=TRUE&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; it was compilation error, I commented out soome lines in &#039;&#039;storage/tokudb/ft-index/portability/toku_pthread.cc&#039;&#039;, probably there is better way ... :&lt;br /&gt;
&lt;br /&gt;
 int toku_pthread_yield(void) {&lt;br /&gt;
    //#if defined(HAVE_PTHREAD_YIELD)&lt;br /&gt;
    //# if defined(PTHREAD_YIELD_RETURNS_INT)&lt;br /&gt;
    return pthread_yield();&lt;br /&gt;
    //# elif defined(PTHREAD_YIELD_RETURNS_VOID)&lt;br /&gt;
    //    pthread_yield();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //# else&lt;br /&gt;
    //#  error &amp;quot;don&#039;t know what pthread_yield() returns&amp;quot;&lt;br /&gt;
    //# endif&lt;br /&gt;
    //#elif defined(HAVE_PTHREAD_YIELD_NP)&lt;br /&gt;
    //    pthread_yield_np();&lt;br /&gt;
    //    return 0;&lt;br /&gt;
    //#else&lt;br /&gt;
    //# error &amp;quot;cannot find pthread_yield or pthread_yield_np&amp;quot;&lt;br /&gt;
    //#endif&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysql:27&#039; user and &#039;mysql:27&#039; group exists.&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;&#039;/root&#039;&#039; is &#039;&#039;drwxr-xr-x.  root root&#039;&#039;, &#039;&#039;/root/mysql&#039;&#039; is &#039;&#039;drwxr-xr-x. root root&#039;&#039;, and &#039;&#039;/database&#039;&#039; is &#039;&#039;drwxr-xr-x. mysql mysql&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Initialize the Data Directory: The initial system tables and data directory need to be created before MariaDB can run:&lt;br /&gt;
 cd /root/mysql&lt;br /&gt;
 scripts/mysql_install_db --user=mysql --basedir=/root/mysql --datadir=/database&lt;br /&gt;
&lt;br /&gt;
Start the MariaDB server manually to make sure it is running:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe&lt;br /&gt;
&lt;br /&gt;
Import everything from the old clondb3&#039;s sql file:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysql -u root&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SET FOREIGN_KEY_CHECKS = 0;&lt;br /&gt;
 MariaDB [mysql]&amp;gt; SOURCE /root/clondb3_full_backup.sql;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; in case of &#039;&#039;root&#039;&#039; access problems, run it with following flags:&lt;br /&gt;
&lt;br /&gt;
 ./bin/mysqld_safe --skip-grant-tables --skip-networking&lt;br /&gt;
&lt;br /&gt;
or, if you know &#039;&#039;root@loocalhost&#039;&#039; password on older clondb3, enter mysql with that password. Alter &#039;&#039;root@localhost&#039;&#039; user setting it as &#039;&#039;no password&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To run it as systemd service, create file &#039;&#039;/usr/lib/systemd/system/mariadb.service&#039;&#039; with following content:&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Mariadb 5.5&lt;br /&gt;
 After=network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=forking&lt;br /&gt;
 PrivateTmp=true&lt;br /&gt;
 User=mysql&lt;br /&gt;
 Group=mysql&lt;br /&gt;
 ExecStart=/root/mysql/support-files/mysql.server start&lt;br /&gt;
 ExecStop=/root/mysql/support-files/mysql.server stop&lt;br /&gt;
 Restart=on-abort&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Enable and start service:&lt;br /&gt;
&lt;br /&gt;
 systemctl daemon-reload&lt;br /&gt;
 systemctl enable mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
Uses mariadb instead of mysql:&lt;br /&gt;
&lt;br /&gt;
 systemctl restart mariadb&lt;br /&gt;
&lt;br /&gt;
useful commands:&lt;br /&gt;
&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
 systemctl stop mariadb&lt;br /&gt;
 systemctl start mariadb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if cannot ssh to clondb1 from unix machine(s), try to ssh from one of the ROCs !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Master replica setting for computer center&#039;s slave (database &#039;rcdb&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Modify file &#039;&#039;/etc/my/cnf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 open-files-limit                =  1040400&lt;br /&gt;
 server-id=1111&lt;br /&gt;
 log-bin                         = mariadb-bin&lt;br /&gt;
 binlog-format                   = ROW&lt;br /&gt;
 sync_binlog                     = 1&lt;br /&gt;
 expire_logs_days                = 14&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;systemctl restart mariadb&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
ssh root@clondb1 and do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@&#039;%.jlab.org&#039; IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
 USE rcdb;&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Run command &#039;&#039;mysqldump -u root -p --opt rcdb &amp;gt; rcdb.sql&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Do following:&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 UNLOCK TABLES;&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
Tell computer center following info: username(replica), password(clonreplica), output of command &#039;SHOW MASTER STATUS&#039;, and file &#039;rcdb.sql&#039; location.&lt;br /&gt;
&lt;br /&gt;
== Main MySQL server on clondb1 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clondb1&#039;&#039; is the primary MYSQL machine for CLAS Online databases, it is running MYSQL server and has database on its local disk in /database. All other CLON cluster machines have MYSQL installed but server should not be run there&lt;br /&gt;
&lt;br /&gt;
Installation for RHEL4 machines with satelite service (type following as &#039;root&#039;):&lt;br /&gt;
&lt;br /&gt;
  up2date mysql&lt;br /&gt;
  up2date mysql-server&lt;br /&gt;
&lt;br /&gt;
version 4.1.20 was obtained August 19, 2006; newer version can be installed if &#039;up2date&#039; will be used in future; repeat that procedure on all Linux_i686 and Linux_x86_64 machines.&lt;br /&gt;
&lt;br /&gt;
Installation for all other machines: Get tarball &#039;mysql-4.1.20.tar.gz&#039; from http://www.mysql.com/ and place it to /usr/local/downloads on CLON fileserver. Then do following:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 cp ../downloads/mysql-4.1.20.tar.gz .&lt;br /&gt;
 gunzip mysql-4.1.20.tar.gz&lt;br /&gt;
 tar xvf mysql-4.1.20.tar&lt;br /&gt;
 rm mysql-4.1.20.tar&lt;br /&gt;
 cd mysql-4.1.20&lt;br /&gt;
&lt;br /&gt;
Linux:&lt;br /&gt;
 ./configure --prefix=/usr --without-server&lt;br /&gt;
&lt;br /&gt;
Solaris:&lt;br /&gt;
 bash&lt;br /&gt;
 CC=cc CFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; CXX=CC CXXFLAGS=&amp;quot;-xO5 -KPIC -mt&amp;quot; ./configure --prefix=/usr --without-server&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
Repeat for all SunOS_i86pc, SunOS_sun4u, Linux_ppc machines. Login as &#039;root&#039; and do:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysql-4.1.20&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
It will install everything into /usr/bin, /usr/lib and /usr/include/mysql (same directories as on RHEL4).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; you may want to create symbolic links from &#039;&#039;/usr/lib&#039;&#039; to &#039;&#039;/usr/lib/mysql&#039;&#039; area for the libraries if it was not done by installation procedure:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/lib&lt;br /&gt;
 ln -s mysql/libmysqlclient.a libmysqlclient.a&lt;br /&gt;
 ln -s mysql/libmysqlclient.so libmysqlclient.so&lt;br /&gt;
 ln -s mysql/libmysqlclient.so.14 libmysqlclient.so.14&lt;br /&gt;
&lt;br /&gt;
Clondb1 preparations:&lt;br /&gt;
&lt;br /&gt;
Login as &#039;root&#039; and execute following commands:&lt;br /&gt;
&lt;br /&gt;
  id mysql&lt;br /&gt;
&lt;br /&gt;
you should see something like this:&lt;br /&gt;
&lt;br /&gt;
  uid=27(mysql) gid=27(mysql) groups=27(mysql)&lt;br /&gt;
&lt;br /&gt;
If &#039;mysql&#039; user or group does not exist, create it.&lt;br /&gt;
Specify desired database directory in &#039;/etc/my.cnf&#039;:&lt;br /&gt;
&lt;br /&gt;
  ###datadir=/var/lib/mysql&lt;br /&gt;
  datadir=/database&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;/var/lib/mysql&#039; directory has appropriate ownership (in our case basedir=/var/lib):&lt;br /&gt;
&lt;br /&gt;
  drwxr-xr-x   2 mysql     mysql    4096 Jun  1 23:42 mysql&lt;br /&gt;
&lt;br /&gt;
Same about /database:&lt;br /&gt;
&lt;br /&gt;
  chown mysql:mysql /database&lt;br /&gt;
&lt;br /&gt;
Modify &#039;/etc/my.cnf&#039; if neseccary.&lt;br /&gt;
&lt;br /&gt;
Starting mysql server:&lt;br /&gt;
&lt;br /&gt;
  cd /var/lib/mysql&lt;br /&gt;
  mysql_install_db --user=mysql&lt;br /&gt;
&lt;br /&gt;
some useful instructions will be printed:&lt;br /&gt;
&lt;br /&gt;
  To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
  to the right place for your system&lt;br /&gt;
  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
  To do so, start the server, then issue the following commands:&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;new-password&#039;&lt;br /&gt;
  /usr/bin/mysqladmin -u root -h clondb1.jlab.org password &#039;new-password&#039;&lt;br /&gt;
  See the manual for more instructions.&lt;br /&gt;
  You can start the MySQL daemon with:&lt;br /&gt;
  cd /usr ; /usr/bin/mysqld_safe &amp;amp;&lt;br /&gt;
  You can test the MySQL daemon with the benchmarks in the &#039;sql-bench&#039; directory:&lt;br /&gt;
  cd sql-bench ; perl run-all-tests&lt;br /&gt;
  Please report any problems with the /usr/bin/mysqlbug script!&lt;br /&gt;
  The latest information about MySQL is available on the web at&lt;br /&gt;
  http://www.mysql.com&lt;br /&gt;
  Support MySQL by buying support/licenses at http://shop.mysql.com&lt;br /&gt;
&lt;br /&gt;
Now start mysql deamon:&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
NOTE: it did not worked, and wierd thing happened: when I tried to modify /etc/init.d/mysqld it started to work&lt;br /&gt;
right after I touched it; no real changes were applied, just file date was changed ...&lt;br /&gt;
It can be started as well as following: (cd /usr; /usr/bin/mysqld_safe &amp;amp;)&lt;br /&gt;
&lt;br /&gt;
Make sure &#039;mysqld&#039; is running:&lt;br /&gt;
&lt;br /&gt;
  ps -ef | grep mysql&lt;br /&gt;
    root     23028 21947  0 20:54 pts/2    00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf&lt;br /&gt;
       --pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
    mysql    23053 23028  0 20:54 pts/2    00:00:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf &lt;br /&gt;
       --basedir=/usr --datadir=/database --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking&lt;br /&gt;
       --socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
Set mysql root password:&lt;br /&gt;
&lt;br /&gt;
  /usr/bin/mysqladmin -u root password &#039;********&#039;&lt;br /&gt;
&lt;br /&gt;
== MySQL server on Intel-based VME controllers ==&lt;br /&gt;
&lt;br /&gt;
To run standalone DAQ on Intel-based VME controller, MySQL server must be local. Following steps were performed to activate it:&lt;br /&gt;
&lt;br /&gt;
* yum install mysql mysql-devel mysql-server&lt;br /&gt;
&lt;br /&gt;
* NOTE: previous will create mysql user amd group and do other stuff, so you can skip following:&lt;br /&gt;
&lt;br /&gt;
 add &#039;mysql:x:27:&#039; to the /etc/group file if it is not there&lt;br /&gt;
 add &#039;mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash&#039; to the /etc/passwd file if it is not there&lt;br /&gt;
 mkdir /var/lib/mysql&lt;br /&gt;
 chown mysql:mysql /var/lib/mysql&lt;br /&gt;
 mkdir /var/run/mysqld/&lt;br /&gt;
 chown mysql:mysql /var/run/mysqld/&lt;br /&gt;
&lt;br /&gt;
* create /var/lib/mysql/ directory in /root area and place appropriate line into /snapshot/files&lt;br /&gt;
&lt;br /&gt;
* reboot controller, mysql directory must be copied into custom area of the controller&lt;br /&gt;
&lt;br /&gt;
* /etc/init.d/mysqld start&lt;br /&gt;
&lt;br /&gt;
* mysql -h localhost -u root(should be able to enter mysql); GRANT ALL PRIVILEGES ON *.* TO &#039;clasrun&#039;@&#039;svt2.jlab.org&#039;; FLUSH PRIVILEGES;&lt;br /&gt;
&lt;br /&gt;
* cd /var/lib/mysql/&lt;br /&gt;
&lt;br /&gt;
* ssh clondb1; mysqldump --databases daq_daq daq_clasdev -h clondb1 -u root -p &amp;gt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
* mysql --force -h localhost -u root &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
== Dumping ==&lt;br /&gt;
&lt;br /&gt;
Dump is running as a cron job from clascron account on clondb1. See /database/dumpdb script. It accually locks table-by-table and dumps them, so it is not a whole database snapshot. Maybe better to run it on slave server locking whole database ...&lt;br /&gt;
&lt;br /&gt;
== Setting up replica ==&lt;br /&gt;
&lt;br /&gt;
clondb2 is a slave MySQL replica for the master running on clondb1 machine.&lt;br /&gt;
&lt;br /&gt;
Set up an account on the master server &#039;&#039;clondb1&#039;&#039; that the slave can use to make its connection. You need to grant the account REPLICATION SLAVE privilege:&lt;br /&gt;
&lt;br /&gt;
 GRANT REPLICATION SLAVE ON *.* TO replica@clondb2.jlab.org IDENTIFIED BY &#039;clonreplica&#039;;&lt;br /&gt;
&lt;br /&gt;
Take a snapshot of the data on the master server:&lt;br /&gt;
 &lt;br /&gt;
a) Lock all the tables on the master (flush to disk and lock):&lt;br /&gt;
 FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
&lt;br /&gt;
b) Run&lt;br /&gt;
 SHOW MASTER STATUS;&lt;br /&gt;
and note the File and Position (if blank, don&#039;t worry). Accually it can be found in mirror.sql file (see below).&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: do not exit MySQL session !!! LEAVE the MySQL client that you used for that running.&lt;br /&gt;
This will prevent updates while you&#039;re copying to your mirror.&lt;br /&gt;
&lt;br /&gt;
NOTE: when mysqldump started (see below) database will be locked, and it stays locked until dump is finished; when it is finished database will be unlocked; it seems not necessary to do (a),(b) and (d).&lt;br /&gt;
&lt;br /&gt;
c) From another window, take a dump of the data on the Master server:&lt;br /&gt;
 mysqldump --master-data --all-databases -uroot -p &amp;gt; mirror.sql&lt;br /&gt;
 &lt;br /&gt;
d) UNLOCK TABLES;&lt;br /&gt;
&lt;br /&gt;
5. Check that the Master server has an ID set and is running with the log-bin option. This should be in the my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 log-bin=mysql-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
or just (as it is now on clondb1):&lt;br /&gt;
 log-bin&lt;br /&gt;
 server-id=1&lt;br /&gt;
Server ids (Master and Slave) must all be unique positive integers.&lt;br /&gt;
&lt;br /&gt;
NOTE: to cleanup log-bin files do following:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25 22:00:00&#039;;&lt;br /&gt;
  mysql&amp;gt; purge master logs before &#039;2007-01-25&#039;;&lt;br /&gt;
&lt;br /&gt;
or ask mysql to cleanup old files:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; SET GLOBAL expire_logs_days=10;&lt;br /&gt;
  mysql&amp;gt; show variables like &#039;expire_%&#039;;&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | Variable_name    | Value |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    | expire_logs_days | 10    |&lt;br /&gt;
    +------------------+-------+&lt;br /&gt;
    1 row in set (0.00 sec)&lt;br /&gt;
To make that setting permanent, add following to &#039;&#039;/etc/my.cfg&#039;&#039; in &#039;[mysqld]&#039; section:&lt;br /&gt;
 expire_logs_days=10&lt;br /&gt;
It is also useful to add&lt;br /&gt;
 set-variable = open_files_limit=1040400&lt;br /&gt;
&lt;br /&gt;
Restart the server:&lt;br /&gt;
 /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
6. Stop the slave server and configure its my.cnf file - for example&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 server-id=2&lt;br /&gt;
Restart the slave server&lt;br /&gt;
&lt;br /&gt;
7. Load the data onto the slave server; transfer the &#039;&#039;mirror.sql&#039;&#039; file created on master machine, then run&lt;br /&gt;
&lt;br /&gt;
  mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
&lt;br /&gt;
Restart the slave server if you&#039;ve transferred different account information over!&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/mysqld restart&lt;br /&gt;
&lt;br /&gt;
8. Tell the slave server to act as a slave server, for example:&lt;br /&gt;
 CHANGE MASTER TO MASTER_HOST=&#039;clondb1.jlab.org&#039;, MASTER_USER=&#039;replica&#039;,&lt;br /&gt;
   MASTER_PASSWORD=&#039;clonreplica&#039;, MASTER_LOG_FILE=&#039;clondb1-bin.000790&#039;, MASTER_LOG_POS=9815913;&lt;br /&gt;
NOTE: MASTER_LOG_FILE and MASTER_LOG_POS are defined in the begining of mirror.sql file, get it from there.&lt;br /&gt;
&lt;br /&gt;
9. Start the slave threads&lt;br /&gt;
 START SLAVE;&lt;br /&gt;
&lt;br /&gt;
That should be it ... your slave will contact your master for any updates since the backup copy was taken.&lt;br /&gt;
&lt;br /&gt;
10. SHOW SLAVE STATUS;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want to load data into slave server again, stop slave first, then load data and start slave again (it maybe necessary if slave server lost communication to the master):&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; STOP SLAVE;&lt;br /&gt;
  unix&amp;gt; mysql --force -hclondb2 -uroot -p******** &amp;lt; mirror.sql&lt;br /&gt;
  mysql&amp;gt; START SLAVE;&lt;br /&gt;
&lt;br /&gt;
OPTIONS ON SETUP&lt;br /&gt;
&lt;br /&gt;
To reset slave (it will delete all log files) do following:&lt;br /&gt;
 stop slave;&lt;br /&gt;
 reset slave;&lt;br /&gt;
 start slave;&lt;br /&gt;
&lt;br /&gt;
Some alternatives:&lt;br /&gt;
&lt;br /&gt;
a) If you want to use LOAD TABLE FROM MASTER or LOAD DATA FROM MASTER commands later, you need to give your slave SUPER and RELOAD global privileges, and also SELECT privilege over any tables that you want to load.&lt;br /&gt;
&lt;br /&gt;
b) The data can also be transferred, more efficiently, in binary. In summary, you use tar, zip or similar software to squish the data directory in MySQL&#039;s data directory (extra steps needed if you&#039;re using InnoDb as well) and transfer those files - data files, log files, .frm definition files - and unpack them.&lt;br /&gt;
  &lt;br /&gt;
c) If you&#039;re going to be running different user accounts / passwords etc. on the slave server, or it&#039;s a significantly more recent version of MySQL, then do NOT transfer the database called mysql.&lt;br /&gt;
&lt;br /&gt;
d) If you&#039;re copying to a slave that has previously functioned as a slave, restart it with the --skip-slave-start option in order to avoid it contacting its old master right away.&lt;br /&gt;
&lt;br /&gt;
e) If you configure your slave server as a master too, then it can take over for data changes in the event of a prolonged failure of the master, and can feed data through to second layer slaves. With a properly configured network with homogeneous systems, the old master can be brought back in later as a slave to automatically catch up.&lt;br /&gt;
&lt;br /&gt;
WHAT HAPPENS WHEN IT&#039;S RUNNING?&lt;br /&gt;
&lt;br /&gt;
The Master server keeps a binary log file of database updates for passing to the slaves as required.&lt;br /&gt;
&lt;br /&gt;
The Slave server keeps data files called master.info and relay-log.info to keep track of how it&#039;s doing in processing the master log. It maintains a connection to the Master so that updates are virtually instant.&lt;br /&gt;
&lt;br /&gt;
If a slave server looses connection to the master, it will retry connecting periodically (default 60 seconds, --master-connect-retry option to change), and when it gets back in touch it will catch up.&lt;br /&gt;
&lt;br /&gt;
Master servers do not maintain a list of known slaves, let alone a note of whether or not they&#039;re up to date.&lt;br /&gt;
&lt;br /&gt;
You are STRONGLY advised not to edit any of these files directly, but rather to use commands such as CHANGE MASTER TO ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also MySQL - our FAQ&lt;br /&gt;
&lt;br /&gt;
== Full manual ==&lt;br /&gt;
&lt;br /&gt;
Complete MYSQL manual can be found at http://dev.mysql.com/doc/refman/4.1/en/index.html.&lt;br /&gt;
&lt;br /&gt;
== Problems observed ==&lt;br /&gt;
&lt;br /&gt;
1. After &#039;&#039;up2date&#039;&#039; on August 28, 2007 mysqld did not started, error message in file &#039;&#039;/var/log/mysqld.log&#039;&#039; was:&lt;br /&gt;
&lt;br /&gt;
 070829 12:16:58  mysqld started&lt;br /&gt;
 070829 12:16:58 [Warning] Can&#039;t create test file /database/clondb1.lower-test&lt;br /&gt;
 /usr/libexec/mysqld: Can&#039;t change dir to &#039;/database/&#039; (Errcode: 13)&lt;br /&gt;
 070829 12:16:58 [ERROR] Aborting&lt;br /&gt;
 070829 12:16:58 [Note] /usr/libexec/mysqld: Shutdown complete&lt;br /&gt;
 070829 12:16:58  mysqld ended&lt;br /&gt;
&lt;br /&gt;
Found on web following recommendation:&lt;br /&gt;
&lt;br /&gt;
 its because rhel 4 has selinux installed with it You need to disable it&lt;br /&gt;
 try&lt;br /&gt;
 setsebool -P mysqld_disable_trans=1&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
&lt;br /&gt;
 the newer version of linux has selinux installed.&lt;br /&gt;
 If that is it uses user mysqld_t which doesnt have permissions there.&lt;br /&gt;
 You can either shut selinux off totally - use the command i said or you&lt;br /&gt;
 will need to reflag files.&lt;br /&gt;
&lt;br /&gt;
After running command &#039;&#039;setsebool -P mysqld_disable_trans=1&#039;&#039; as &#039;&#039;root&#039;&#039; mysqld started fine.&lt;br /&gt;
It is started fine on reboot as well.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Tricks&amp;diff=8742</id>
		<title>Linux Tricks</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Tricks&amp;diff=8742"/>
		<updated>2026-05-24T16:12:23Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Color change when connected remotely ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; after opening vnc session to linux machine from macbook laptop, small window pops up asking about some color settings (create color profile etc), and keeps asking for password; none of passwords actually works, and it keeps asking again and again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fix:&#039;&#039;&#039; on linux machine, create file &#039;&#039;/etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla&#039;&#039; with permissions 644 and following contents:&lt;br /&gt;
 [Allow Colord all Users]&lt;br /&gt;
 Identity=unix-user:*&lt;br /&gt;
 Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile&lt;br /&gt;
 ResultAny=no&lt;br /&gt;
 ResultInactive=no&lt;br /&gt;
 ResultActive=yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enable systemd log persistency (remember all reboots, not only last one) ===&lt;br /&gt;
&lt;br /&gt;
Run &#039;&#039;emacs /etc/systemd/journald.conf&#039;&#039;, set&lt;br /&gt;
&lt;br /&gt;
 Storage=persistent&lt;br /&gt;
&lt;br /&gt;
and run&lt;br /&gt;
&lt;br /&gt;
 systemctl restart systemd-journald&lt;br /&gt;
&lt;br /&gt;
Alternatively:&lt;br /&gt;
&lt;br /&gt;
 mkdir /var/log/journal&lt;br /&gt;
 systemd-tmpfiles --create --prefix /var/log/journal&lt;br /&gt;
 systemctl restart systemd-journald&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Also, see [[Gnome]] if using GNOME desktop.&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=JLAB_PCI_TI&amp;diff=8741</id>
		<title>JLAB PCI TI</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=JLAB_PCI_TI&amp;diff=8741"/>
		<updated>2026-05-20T21:50:31Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* initial setting after installing card into new machine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;TIpcieUS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== initial setting after installing card into new machine ==&lt;br /&gt;
&lt;br /&gt;
Login as &#039;&#039;clasrun&#039;&#039; and run command &#039;&#039;ti_config&#039;&#039;, enter root password in a process. It will save TIpcieUS&#039;s driver &#039;&#039;config&#039;&#039; file to &#039;&#039;/root&#039;&#039; directory. Later in case of problems, driver can be effectively restored by running script &#039;&#039;ti_reload&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It should be 3 scripts in &#039;&#039;$CODA/src/scripts&#039;&#039; directory with following contents:&lt;br /&gt;
&lt;br /&gt;
ti_config:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 #&lt;br /&gt;
 # save TIpcieUS driver config file into /root&lt;br /&gt;
 #&lt;br /&gt;
 set temp = `lspci | awk -F&#039; &#039; &#039;/9038/{print $1}&#039;`&lt;br /&gt;
 echo $temp&lt;br /&gt;
 set dest = &amp;quot;/sys/bus/pci/devices/0000:$temp&amp;quot;&lt;br /&gt;
 echo $dest/config&lt;br /&gt;
 echo &amp;quot;Enter root password&amp;quot;&lt;br /&gt;
 su - root -c &amp;quot;cp $dest/config /root/config&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ti_reload:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 #&lt;br /&gt;
 # TIpcieUS driver reload&lt;br /&gt;
 #&lt;br /&gt;
 set temp = `lspci | awk -F&#039; &#039; &#039;/9038/{print $1}&#039;`&lt;br /&gt;
 echo $temp&lt;br /&gt;
 set dest = &amp;quot;/sys/bus/pci/devices/0000:$temp&amp;quot;&lt;br /&gt;
 echo $dest&lt;br /&gt;
 echo &amp;quot;Enter root password&amp;quot;&lt;br /&gt;
 su - root -c &amp;quot;cp -f /root/config $dest&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ti_menu:&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/tcsh&lt;br /&gt;
 #&lt;br /&gt;
 # William&#039;s menu&lt;br /&gt;
 #&lt;br /&gt;
 ~jgu/PCIeTI/TIpcieUS/tools/TIcontrol /dev/xdma0_user&lt;br /&gt;
&lt;br /&gt;
Change &#039;&#039;/dev/xdma0_user&#039;&#039; file permissions to make it accessable to users:&lt;br /&gt;
&lt;br /&gt;
 chmod go+rw /dev/xdma0_user&lt;br /&gt;
&lt;br /&gt;
== TIpcieUS ==&lt;br /&gt;
&lt;br /&gt;
Manual 2024 [https://clonwiki0.jlab.org/wiki/clondocs/Docs/TIpcieUS_18_sep_2024.pdf (pdf)]&lt;br /&gt;
&lt;br /&gt;
Old manual 2020 [https://clonwiki0.jlab.org/wiki/clondocs/Docs/TIpcieUS_2_nov_2020.pdf (pdf)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pinout of the 34-pin connector (TI CPI has 40-pin connector, but first 34 pins are the same, although they are typically NOT ECL but LVDS)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Pin name Signal Name            Signal Level&lt;br /&gt;
&lt;br /&gt;
  1 / 2    BUSY_out              + / - ECL&lt;br /&gt;
  3 / 4    Trigger_out           + / - ECL&lt;br /&gt;
  5 / 6    UserControlled_out1   + / - ECL&lt;br /&gt;
  7 / 8    UserControlled_out2   + / - ECL&lt;br /&gt;
  9 / 10   UserControlled_out3   + / - ECL&lt;br /&gt;
 11 / 12   UserControlled_out4   + / - ECL&lt;br /&gt;
 13 / 14   OT1                   + / - ECL&lt;br /&gt;
 15 / 16   PromptTrigger_out     + / - ECL&lt;br /&gt;
 17 / 18   Inhibit_in            + / - ECL&lt;br /&gt;
 19 / 20   Trigger_in            + / - ECL&lt;br /&gt;
 21 / 22   Trigger_ch#1_in       + / - ECL&lt;br /&gt;
 23 / 24   Trigger_ch#2_in       + / - ECL&lt;br /&gt;
 25 / 26   Trigger_ch#3_in       + / - ECL&lt;br /&gt;
 27 / 28   Clock_in              + / - ECL&lt;br /&gt;
 29 / 30   Trigger_ch#4_in       + / - ECL&lt;br /&gt;
 31 / 32   Trigger_ch#5_in       + / - ECL&lt;br /&gt;
 33 / 34   Trigger_ch#6_in       + / - ECL&lt;br /&gt;
&lt;br /&gt;
 35 / 36   &lt;br /&gt;
 37 / 38   &lt;br /&gt;
 39 / 40   CLK output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installing driver on newly built machine&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 ssh boiarino@...&lt;br /&gt;
&lt;br /&gt;
For release 1.4.0 on RHEL7 mchines:&lt;br /&gt;
 cd /usr/clas12/release/1.4.0/coda/src/TIpcieUS/xdma&lt;br /&gt;
&lt;br /&gt;
For release 2.0.0:&lt;br /&gt;
 cd /usr/clas12/release/2.0.0/coda/src/TIpcieUS-devel/xdma&lt;br /&gt;
&lt;br /&gt;
 make -B&lt;br /&gt;
&lt;br /&gt;
Become superuser (&#039;&#039;su&#039;&#039;) and run following:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
 reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; controlling tool can be used as following:&lt;br /&gt;
&lt;br /&gt;
 ssh as root&lt;br /&gt;
&lt;br /&gt;
Run TI control script:&lt;br /&gt;
 cd ~jgu/PCIeTI/TIpcieUS/tools&lt;br /&gt;
 ./TIcontrol   /dev/xdma0_user&lt;br /&gt;
&lt;br /&gt;
or run following if exists:&lt;br /&gt;
 /root/ti_init&lt;br /&gt;
&lt;br /&gt;
For slave mode, type &#039;2&#039;, then type &#039;9&#039;. It should bring TIpcie board to the right state. After that you can start the daq from scratch.&lt;br /&gt;
&lt;br /&gt;
For Sampa setup, set TI board to the &#039;bridge&#039; mode by typing &#039;15&#039;.&lt;br /&gt;
&lt;br /&gt;
Another useful option is 4 - it shows temperature etc parameters.&lt;br /&gt;
&lt;br /&gt;
== old version ==&lt;br /&gt;
&lt;br /&gt;
Manual for TI board in PCI format in [https://clonwiki0.jlab.org/wiki/clondocs/Docs/JLAB_PCI_PCITI_board_RevC.pdf (pdf)]&lt;br /&gt;
&lt;br /&gt;
On some DELL servers (R440 for example) booter will give an pci error and ask to push F1. To disable F1 pushing,&lt;br /&gt;
in BIOS go to &#039;System BIOS Settings&#039; -&amp;gt; &#039;Miscellaneous Settings&#039; -&amp;gt; &#039;F1/F2 Prompt on Error&#039; and click &#039;Disabled&#039;.&lt;br /&gt;
&lt;br /&gt;
Sometimes device /dev/TIpcie may be removed during patching or/and rebooting process. To restore it do following as root:&lt;br /&gt;
&lt;br /&gt;
 cd $CODA/src/TIpcie/linux_driver&lt;br /&gt;
 ./reload_driver.sh&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Move2silo&amp;diff=8740</id>
		<title>Move2silo</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Move2silo&amp;diff=8740"/>
		<updated>2026-05-04T15:32:53Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;RHEL9&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
NOTE: package installed from &#039;&#039;yum&#039;&#039;, presumably by &#039;&#039;puppet&#039;&#039;, and presumably by command &#039;&#039;yum install jasmine-client&#039;&#039; (&#039;&#039;jasmine-client-54.10.5-1&#039;&#039;, or whatever newer vertion is)&lt;br /&gt;
&lt;br /&gt;
CLAS12(rg-l) data:&lt;br /&gt;
&lt;br /&gt;
 MAILTO=&amp;quot;&amp;quot;&lt;br /&gt;
 # Scan for to-tape files every 10 minutes&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/bin/jmigrate /data/stage2 /data/stage2 /mss/clas12/rg-l/data -jvm:-Dfile.transfer.client.displayrates=true&lt;br /&gt;
 ##0,10,20,30,40,50 * * * * /usr/bin/jmigrate /data/stage2 /data/stage2 /mss/clas12/rg-l/data -jvm:-Dfile.transfer.client.displayrates=true -delete written&lt;br /&gt;
&lt;br /&gt;
PRAD test setup data:&lt;br /&gt;
&lt;br /&gt;
 MAILTO=&amp;quot;&amp;quot;&lt;br /&gt;
 # Scan for to-tape files every 10 minutes&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/bin/jmigrate /data/stage2 /data/stage2 /mss/hallb/prad2/data -jvm:-Dfile.transfer.client.displayrates=true -delete written&lt;br /&gt;
&lt;br /&gt;
uRwell test setup data (clondaq11):&lt;br /&gt;
&lt;br /&gt;
 MAILTO=&amp;quot;&amp;quot;&lt;br /&gt;
 # Scan for to-tape files every 10 minutes&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/bin/jmigrate /data/uRwell /data/uRwell /mss/clas12/detectors/uRwell/2026_EEL -jvm:-Dfile.transfer.client.displayrates=true -delete written&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; log files can be found in &#039;&#039;/tmp/clascron/jmigrate&#039;&#039; subdirectories&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; &#039;&#039;jmigrate&#039;&#039; is the wrapper for &#039;&#039;jmirror&#039;&#039;, options should be looked there; add flag &#039;&#039;-cache&#039;&#039; if want files to be stored in cache; add flag &#039;&#039;-min-age=1800&#039;&#039; to wait file become 1800 seconds old, before moving it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RHEL7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
NOTE: &#039;&#039;jasmine&#039;&#039; software installed by Chris Larrieu to the area &#039;&#039;/usr/local/scicomp&#039;&#039; mounted on all RHEL7 machines&lt;br /&gt;
&lt;br /&gt;
Data moving process initiated by cronjob, running from &#039;clascron&#039; account, for example for HPS experiment on clondaq5:&lt;br /&gt;
&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/local/scicomp/jasmine/bin/jmigrate /data/stage5 /data/stage5 /mss/hallb/hps/physrun2019/data -jvm:-Dfile.transfer.client.displayrates=true&lt;br /&gt;
&lt;br /&gt;
and for CLAS12 run group A on clondaq6:&lt;br /&gt;
&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/local/scicomp/jasmine/bin/jmigrate /data/stage6 /data/stage6 /mss/clas12/rg-a/data -jvm:-Dfile.transfer.client.displayrates=true&lt;br /&gt;
&lt;br /&gt;
Cronjob files for different run periods can be found in &#039;&#039;~clascron/backup/&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OLD&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In auto.master make sure the auto.direct is mounted without timeout:&lt;br /&gt;
&lt;br /&gt;
 /-      /etc/auto.direct  --timeout 0&lt;br /&gt;
&lt;br /&gt;
If changed, restart autofs (on RHEL7 do &#039;service autofs restart&#039;). To forcibly unmount do &#039;umount -lf /xxx/yyy&#039;.&lt;br /&gt;
&lt;br /&gt;
Following have to be in auto.direct:&lt;br /&gt;
&lt;br /&gt;
 /lustre/scicomp/jasmine/fairy2 -fstype=nfs,rw,async,vers=3 scidaqgw10b:/lustre/scicomp/jasmine/fairy2&lt;br /&gt;
&lt;br /&gt;
Following cronjob have to be running as user &#039;clascron&#039; on machine moving data to tape:&lt;br /&gt;
&lt;br /&gt;
 # Scan for to-tape files every 15 minutes&lt;br /&gt;
 10,25,40,55 * * * * /usr/local/scicomp/jasmine/bin/jmigrate /data/totape /data/totape /mss/clas12/er-a/data -jvm:-Dfile.transfer.client.displayrates=true&lt;br /&gt;
 # access occasionally to keep it visible&lt;br /&gt;
 * * * * * /bin/csh -c &amp;quot;(ls -al /lustre/scicomp/jasmine/fairy2/) &amp;gt;&amp;gt;&amp;amp;! /usr/logs/disks/clondaq6_lustre&amp;quot;&lt;br /&gt;
 * * * * * /bin/csh -c &amp;quot;(sleep 48; rm -f /usr/logs/disks/clondaq6_lustre) &amp;gt;&amp;gt;&amp;amp;! /dev/null&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Log files are in&lt;br /&gt;
 /usr/local/scicomp/jasmine/log/jmigrate/data-totape/.&lt;br /&gt;
&lt;br /&gt;
If job stuck, remove the lock file:&lt;br /&gt;
&lt;br /&gt;
 rm /tmp/jmigrate-data-totape.lock&lt;br /&gt;
&lt;br /&gt;
Useful command to check process status:&lt;br /&gt;
&lt;br /&gt;
 ps auxf | grep java&lt;br /&gt;
&lt;br /&gt;
If see something like&lt;br /&gt;
&lt;br /&gt;
 clascron 128847  0.0  1.0 7307240 662088 ?      D    Dec14   0:00  \_ java -DJMirror.minFileModif.........&lt;br /&gt;
&lt;br /&gt;
job marked as &#039;D&#039; is in uninterruptable state and cannot not be kiiled by &#039;kill -9&#039;. Other stuck jobs can be killed, they became &amp;lt;defunct&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To see files on tape, ssh to ifarm65 and type:&lt;br /&gt;
&lt;br /&gt;
 ls -ltrh /mss/clas12/er-a/data/ | tail&lt;br /&gt;
&lt;br /&gt;
To see files still in cache:&lt;br /&gt;
&lt;br /&gt;
 ls -ltrh /cache/mss/clas12/er-a/data/ | tail&lt;br /&gt;
&lt;br /&gt;
To retrieve from the tape :&lt;br /&gt;
 jget /mss/clas12/er-a/data/clas_00XXXX.evio.Y #copy to the current directory&lt;br /&gt;
 jget /mss/clas12/er-a/data/clas_00XXXX.evio.Y /path/to/dir #copy to the directory with path&lt;br /&gt;
 jget /mss/clas12/er-a/data/clas_00XXXX.evio.Y /mss/clas12/er-a/data/clas_00XXXX.evio.Z /path/to/dir # copy two files&lt;br /&gt;
&lt;br /&gt;
Mover&#039;s status can be checked at https://scicomp.jlab.org/scicomp/moverStatus&lt;br /&gt;
&lt;br /&gt;
Job&#039;s schedule can be checked at https://scicomp.jlab.org/scicomp/tapeJob/scheduled&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: problems were observed in Dec 2017 moving data with NFS-mounted scidaqgw10b or scidaqgw10f. To fix stuched job, jcancel have to be issued on movers side. When NFS mount was removed and process started to use network socket, everything works.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Move2silo&amp;diff=8739</id>
		<title>Move2silo</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Move2silo&amp;diff=8739"/>
		<updated>2026-05-04T15:32:18Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;RHEL9&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
NOTE: package installed from &#039;&#039;yum&#039;&#039;, presumably by &#039;&#039;puppet&#039;&#039;, and presumably by command &#039;&#039;yum install jasmine-client&#039;&#039; (&#039;&#039;jasmine-client-54.10.5-1&#039;&#039;, or whatever newer vertion is)&lt;br /&gt;
&lt;br /&gt;
CLAS12(rg-l) data:&lt;br /&gt;
&lt;br /&gt;
 MAILTO=&amp;quot;&amp;quot;&lt;br /&gt;
 # Scan for to-tape files every 10 minutes&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/bin/jmigrate /data/stage2 /data/stage2 /mss/clas12/rg-l/data -jvm:-Dfile.transfer.client.displayrates=true&lt;br /&gt;
 ##0,10,20,30,40,50 * * * * /usr/bin/jmigrate /data/stage2 /data/stage2 /mss/clas12/rg-l/data -jvm:-Dfile.transfer.client.displayrates=true -delete written&lt;br /&gt;
&lt;br /&gt;
PRAD test setup data:&lt;br /&gt;
&lt;br /&gt;
 MAILTO=&amp;quot;&amp;quot;&lt;br /&gt;
 # Scan for to-tape files every 10 minutes&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/bin/jmigrate /data/stage2 /data/stage2 /mss/hallb/prad2/data -jvm:-Dfile.transfer.client.displayrates=true -delete written&lt;br /&gt;
&lt;br /&gt;
uRwell test setup data (clondaq11):&lt;br /&gt;
&lt;br /&gt;
 MAILTO=&amp;quot;&amp;quot;&lt;br /&gt;
 # Scan for to-tape files every 10 minutes&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/bin/jmigrate /data/uRwell /data/uRwell /mss/clas12/detectors/uRwell/2026_EEL -jvm:-Dfile.transfer.client.displayrates=true -delete written&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; log files can be found in &#039;&#039;/tmp/clascron/jmigrate&#039;&#039; subdirectories&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; &#039;&#039;jmigrate&#039;&#039; is the wrapper for &#039;&#039;jmirror&#039;&#039;, help for options should be looket there; add flag &#039;&#039;-cache&#039;&#039; if want files to be stored in cache; add flag &#039;&#039;-min-age=1800&#039;&#039; to wait file become 1800 seconds old, before moving it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RHEL7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
NOTE: &#039;&#039;jasmine&#039;&#039; software installed by Chris Larrieu to the area &#039;&#039;/usr/local/scicomp&#039;&#039; mounted on all RHEL7 machines&lt;br /&gt;
&lt;br /&gt;
Data moving process initiated by cronjob, running from &#039;clascron&#039; account, for example for HPS experiment on clondaq5:&lt;br /&gt;
&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/local/scicomp/jasmine/bin/jmigrate /data/stage5 /data/stage5 /mss/hallb/hps/physrun2019/data -jvm:-Dfile.transfer.client.displayrates=true&lt;br /&gt;
&lt;br /&gt;
and for CLAS12 run group A on clondaq6:&lt;br /&gt;
&lt;br /&gt;
 0,10,20,30,40,50 * * * * /usr/local/scicomp/jasmine/bin/jmigrate /data/stage6 /data/stage6 /mss/clas12/rg-a/data -jvm:-Dfile.transfer.client.displayrates=true&lt;br /&gt;
&lt;br /&gt;
Cronjob files for different run periods can be found in &#039;&#039;~clascron/backup/&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OLD&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In auto.master make sure the auto.direct is mounted without timeout:&lt;br /&gt;
&lt;br /&gt;
 /-      /etc/auto.direct  --timeout 0&lt;br /&gt;
&lt;br /&gt;
If changed, restart autofs (on RHEL7 do &#039;service autofs restart&#039;). To forcibly unmount do &#039;umount -lf /xxx/yyy&#039;.&lt;br /&gt;
&lt;br /&gt;
Following have to be in auto.direct:&lt;br /&gt;
&lt;br /&gt;
 /lustre/scicomp/jasmine/fairy2 -fstype=nfs,rw,async,vers=3 scidaqgw10b:/lustre/scicomp/jasmine/fairy2&lt;br /&gt;
&lt;br /&gt;
Following cronjob have to be running as user &#039;clascron&#039; on machine moving data to tape:&lt;br /&gt;
&lt;br /&gt;
 # Scan for to-tape files every 15 minutes&lt;br /&gt;
 10,25,40,55 * * * * /usr/local/scicomp/jasmine/bin/jmigrate /data/totape /data/totape /mss/clas12/er-a/data -jvm:-Dfile.transfer.client.displayrates=true&lt;br /&gt;
 # access occasionally to keep it visible&lt;br /&gt;
 * * * * * /bin/csh -c &amp;quot;(ls -al /lustre/scicomp/jasmine/fairy2/) &amp;gt;&amp;gt;&amp;amp;! /usr/logs/disks/clondaq6_lustre&amp;quot;&lt;br /&gt;
 * * * * * /bin/csh -c &amp;quot;(sleep 48; rm -f /usr/logs/disks/clondaq6_lustre) &amp;gt;&amp;gt;&amp;amp;! /dev/null&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Log files are in&lt;br /&gt;
 /usr/local/scicomp/jasmine/log/jmigrate/data-totape/.&lt;br /&gt;
&lt;br /&gt;
If job stuck, remove the lock file:&lt;br /&gt;
&lt;br /&gt;
 rm /tmp/jmigrate-data-totape.lock&lt;br /&gt;
&lt;br /&gt;
Useful command to check process status:&lt;br /&gt;
&lt;br /&gt;
 ps auxf | grep java&lt;br /&gt;
&lt;br /&gt;
If see something like&lt;br /&gt;
&lt;br /&gt;
 clascron 128847  0.0  1.0 7307240 662088 ?      D    Dec14   0:00  \_ java -DJMirror.minFileModif.........&lt;br /&gt;
&lt;br /&gt;
job marked as &#039;D&#039; is in uninterruptable state and cannot not be kiiled by &#039;kill -9&#039;. Other stuck jobs can be killed, they became &amp;lt;defunct&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To see files on tape, ssh to ifarm65 and type:&lt;br /&gt;
&lt;br /&gt;
 ls -ltrh /mss/clas12/er-a/data/ | tail&lt;br /&gt;
&lt;br /&gt;
To see files still in cache:&lt;br /&gt;
&lt;br /&gt;
 ls -ltrh /cache/mss/clas12/er-a/data/ | tail&lt;br /&gt;
&lt;br /&gt;
To retrieve from the tape :&lt;br /&gt;
 jget /mss/clas12/er-a/data/clas_00XXXX.evio.Y #copy to the current directory&lt;br /&gt;
 jget /mss/clas12/er-a/data/clas_00XXXX.evio.Y /path/to/dir #copy to the directory with path&lt;br /&gt;
 jget /mss/clas12/er-a/data/clas_00XXXX.evio.Y /mss/clas12/er-a/data/clas_00XXXX.evio.Z /path/to/dir # copy two files&lt;br /&gt;
&lt;br /&gt;
Mover&#039;s status can be checked at https://scicomp.jlab.org/scicomp/moverStatus&lt;br /&gt;
&lt;br /&gt;
Job&#039;s schedule can be checked at https://scicomp.jlab.org/scicomp/tapeJob/scheduled&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: problems were observed in Dec 2017 moving data with NFS-mounted scidaqgw10b or scidaqgw10f. To fix stuched job, jcancel have to be issued on movers side. When NFS mount was removed and process started to use network socket, everything works.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=SILO&amp;diff=8738</id>
		<title>SILO</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=SILO&amp;diff=8738"/>
		<updated>2026-05-04T15:22:31Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;OBSOLETE, see [[move2silo]] &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
JLAB SILO system is used to move data to tape during data taking. It is controlled by cron job on Event Recorder machine (currently clondaq5/clondaq6), run as user &#039;clascron&#039; (shows setting for &#039;&#039;kpp&#039;&#039; run, data recorded into &#039;&#039;/data/totape&#039;&#039; directory and deleted automatically after being recorded to the tape):&lt;br /&gt;
&lt;br /&gt;
 clondaq6:clascron&amp;gt; crontab -l&lt;br /&gt;
 # Scan for to-tape files every 15 minutes&lt;br /&gt;
 10,25,40,55 * * * * /usr/local/scicomp/jasmine/bin/jmigrate /data/totape /data/totape /mss/clas12/kpp/data -jvm:-Dfile.transfer.client.displayrates=true&lt;br /&gt;
 # access occasionally to keep it visible&lt;br /&gt;
 * * * * * /bin/csh -c &amp;quot;(ls -al /lustre/scicomp/jasmine/fairy2/) &amp;gt;&amp;gt;&amp;amp;! /usr/logs/disks/clondaq6_lustre&amp;quot;&lt;br /&gt;
 * * * * * /bin/csh -c &amp;quot;(sleep 48; rm -f /usr/logs/disks/clondaq6_lustre) &amp;gt;&amp;gt;&amp;amp;! /dev/null&amp;quot;&lt;br /&gt;
 clondaq6:clascron&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Following line must be present in &#039;&#039;/etc/auto.direct&#039; file:&lt;br /&gt;
&lt;br /&gt;
 /lustre/scicomp/jasmine/fairy2 -fstype=nfs,rw,async,vers=3 scidaqgw10a:/lustre/scicomp/jasmine/fairy2&lt;br /&gt;
&lt;br /&gt;
and mount-point directory &#039;&#039;/lustre/scicomp/jasmine/fairy2&#039;&#039; must exist.&lt;br /&gt;
&lt;br /&gt;
Request have to be submitted to Computer Centre to create corresponding volume (&#039;&#039;clas12/kpp/data&#039;&#039; in example above) if used for the first time.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8737</id>
		<title>MPD</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=MPD&amp;diff=8737"/>
		<updated>2026-04-26T00:06:57Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Useful commands to debug MPD/VTP readout problems:&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp vtpRocStatus - check &#039;Trigger Cnt&#039; and &#039;Trigger Acks&#039;&lt;br /&gt;
&lt;br /&gt;
 tcpClient gem1vtp mpdGStatus - check &#039;Event Builder&#039; table&lt;br /&gt;
&lt;br /&gt;
MPD-&amp;gt;SSP/VTP data format: [https://clonwiki0.jlab.org/wiki/clondocs/Docs/SSP_MPD_EventFormat_31_oct_2025.pdf (pdf)]&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Clonweb&amp;diff=8736</id>
		<title>Clonweb</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Clonweb&amp;diff=8736"/>
		<updated>2026-04-13T18:16:47Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
Directory &#039;&#039;/www&#039;&#039; contains all applications, except &#039;&#039;rcdb&#039;&#039; which is located in &#039;&#039;/usr/local/src/rcdb&#039;&#039;. Symbolic links in &#039;&#039;/www/html&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Directory &#039;&#039;/etc/httpd/conf.d/ contains following custom files:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # webserver.conf&lt;br /&gt;
 #&lt;br /&gt;
 ServerName clonweb.jlab.org&lt;br /&gt;
 DocumentRoot /www/html&lt;br /&gt;
 ServerAdmin boiarino@jlab.org&lt;br /&gt;
 UseCanonicalName On&lt;br /&gt;
 #&lt;br /&gt;
 LogLevel warn&lt;br /&gt;
 ExtendedStatus On&lt;br /&gt;
 #&lt;br /&gt;
 DirectoryIndex index.html index.php&lt;br /&gt;
 #&lt;br /&gt;
 RewriteEngine   On&lt;br /&gt;
 #&lt;br /&gt;
 &amp;lt;Directory &amp;quot;/www/html&amp;quot;&amp;gt;&lt;br /&gt;
     DirectoryIndex index.html index.php&lt;br /&gt;
     Options Indexes FollowSymLinks&lt;br /&gt;
 #    AllowOverride None&lt;br /&gt;
     AllowOverride All&lt;br /&gt;
     Require all granted&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # rcdb.conf&lt;br /&gt;
 #&lt;br /&gt;
 # define mysql connection string&lt;br /&gt;
     SetEnv RCDB_CONNECTION &amp;quot;mysql://rcdb_ro@clondb1/rcdb&amp;quot;&lt;br /&gt;
 # define rcdb home directory&lt;br /&gt;
     Define RCDB_HOME /www/html/rcdb&lt;br /&gt;
 # following makes httpd to execute specified script, when url address is just RCDB_HOME&lt;br /&gt;
     WSGIScriptAlias /rcdb ${RCDB_HOME}/rcdb_www/rcdb_www.wsgi&lt;br /&gt;
 # following specify top path to the python scripts, including subdirectories&lt;br /&gt;
     WSGIPythonPath ${RCDB_HOME}/rcdb_www&lt;br /&gt;
 #&lt;br /&gt;
 ####   WSGIDaemonProcess rcdb_www threads=5&lt;br /&gt;
 ####   WSGIProcessGroup rcdb_www&lt;br /&gt;
 ####   WSGIApplicationGroup %{GLOBAL}&lt;br /&gt;
 #&lt;br /&gt;
 #&amp;lt;Directory &amp;quot;/www/html/rcdb/rcdb_www&amp;quot;&amp;gt;&lt;br /&gt;
 #    Options Indexes FollowSymLinks&lt;br /&gt;
 #    AllowOverride All&lt;br /&gt;
 #    Require all granted&lt;br /&gt;
 #&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RHEL6 ==&lt;br /&gt;
&lt;br /&gt;
* yum install httpd-devel php (php-mysql ?)&lt;br /&gt;
&lt;br /&gt;
== old stuff ==&lt;br /&gt;
&lt;br /&gt;
TO BE: Sun X4100 server, currently old desktop.&lt;br /&gt;
&lt;br /&gt;
IP address:&lt;br /&gt;
 clonweb/129.57.167.42&lt;br /&gt;
&lt;br /&gt;
TO BE IP address:&lt;br /&gt;
 clonweb-new/129.57.167.26/00:11:43:35:48:4A&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clonweb&#039;&#039; is CLON group web server holding monitoring and utility tools as well as documentation.&lt;br /&gt;
It assume to be viewed by everybody but can be modified by CLON system experts only.&lt;br /&gt;
It is running RHEL4 in almost standard configuration, with extra &#039;clonweb&#039; partition from file server&lt;br /&gt;
mounted as &#039;/www&#039; where all CLON applications are held. There are some restrictions: &#039;clonweb&#039; is not&lt;br /&gt;
visible from outside of JLAB firewall. Access to &#039;clonweb&#039; is opened through port 80 only, so only web browsing&lt;br /&gt;
shell be used. Main index.html menu contains full list of applications running on &#039;clonweb&#039;.&lt;br /&gt;
&lt;br /&gt;
Following procedures were used to install an applications:&lt;br /&gt;
&lt;br /&gt;
== apache ==&lt;br /&gt;
&lt;br /&gt;
See [[Apache]] for Apache and PHP installation procedure.&lt;br /&gt;
&lt;br /&gt;
== wiki ==&lt;br /&gt;
&lt;br /&gt;
Wiki were moved to [[Clonwiki]] machine, reference link will point you there.&lt;br /&gt;
&lt;br /&gt;
== phpmyadmin ==&lt;br /&gt;
&lt;br /&gt;
  su&lt;br /&gt;
  download &#039;phpMyAdmin-2.9.1.1-english.tar.gz&#039; from web to &#039;/usr/local/downloads&#039;&lt;br /&gt;
  cp phpMyAdmin-2.9.1.1-english.tar.gz /www/apache2.2.3/htdocs&lt;br /&gt;
  cd /www/apache2.2.3/htdocs&lt;br /&gt;
  gunzip  phpMyAdmin-2.9.1.1-english.tar.gz&lt;br /&gt;
  tar xvf phpMyAdmin-2.9.1.1-english.tar&lt;br /&gt;
  mv phpMyAdmin-2.9.1.1-english phpMyAdmin&lt;br /&gt;
  cd phpMyAdmin&lt;br /&gt;
  cp config.sample.inc.php config.inc.php&lt;br /&gt;
&lt;br /&gt;
Edit config.inc.php setting following (&#039;controlpass&#039; must be the root password to mysql):&lt;br /&gt;
If &#039;holla&#039; is not set message &#039;The configuration file now needs a secret passphrase&lt;br /&gt;
(blowfish_secret).&#039; will shows up (&#039;holla&#039; can be any word ???):&lt;br /&gt;
&lt;br /&gt;
  $cfg[&#039;blowfish_secret&#039;] = &#039;holla&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
  $cfg[&#039;Servers&#039;][$i][&#039;host&#039;] = &#039;clondb1.jlab.org&#039;;&lt;br /&gt;
  $cfg[&#039;Servers&#039;][$i][&#039;controluser&#039;] = &#039;root&#039;;&lt;br /&gt;
  $cfg[&#039;Servers&#039;][$i][&#039;controlpass&#039;] = &#039;********&#039;;&lt;br /&gt;
&lt;br /&gt;
Change config file&#039;s owner to &#039;apache&#039; and set maximum protective mode:&lt;br /&gt;
&lt;br /&gt;
  chown apache.apache config.inc.php&lt;br /&gt;
  chmod 400 config.inc.php&lt;br /&gt;
&lt;br /&gt;
NOTE: make sure that &#039;mysql -h clondb1 -u root -p&#039; works from clonweb; if not, grant&lt;br /&gt;
appropriate mysql privileges.&lt;br /&gt;
&lt;br /&gt;
NOTE: following procedure was recommended but did not worked for me:&lt;br /&gt;
&lt;br /&gt;
  mkdir config&lt;br /&gt;
  chmod 777 config&lt;br /&gt;
  cp config.sample.inc.php config/config.inc.php&lt;br /&gt;
  chmod 666 config/config.inc.php&lt;br /&gt;
  open browser (as &#039;root&#039; ?), type following URL:&lt;br /&gt;
      http://clonweb/phpMyAdmin/scripts/setup.php&lt;br /&gt;
  Click on the &amp;quot;Add&amp;quot; button in the &amp;quot;Servers&amp;quot; section and fill in the following&lt;br /&gt;
  fields:&lt;br /&gt;
      Server hostname:	clondb1.jlab.org&lt;br /&gt;
         (This is the host that your MySQL server is running on)&lt;br /&gt;
      Server port:	3306&lt;br /&gt;
         (the port your MySQL server is configured to use)&lt;br /&gt;
      Password for config auth:	....&lt;br /&gt;
         (the root password for your MySQL server)&lt;br /&gt;
  Press the button that says &amp;quot;Add&amp;quot; in green. Then press the &amp;quot;Save&amp;quot; button in&lt;br /&gt;
  the &amp;quot;Configuration&amp;quot; section.&lt;br /&gt;
  Now copy the configuration file into the main directory and delete the config&lt;br /&gt;
  directory:&lt;br /&gt;
      cp config/config.inc.php ./&lt;br /&gt;
      rm -rf config&lt;br /&gt;
  Assuming your MySQL server is running, you are now ready to connect to it and&lt;br /&gt;
  administer it with phpMyAdmin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start a Web browser and enter the following URL: http://clonweb/phpMyAdmin/&lt;br /&gt;
&lt;br /&gt;
== preparations for dual apachies ==&lt;br /&gt;
&lt;br /&gt;
from web:&lt;br /&gt;
&lt;br /&gt;
    If you need to run two different apache installations on the same box, the quickest way, IMO, is to have two separate conf files for the&lt;br /&gt;
 servers (/usr/local/apache/conf/httpd-server1.conf and /usr/local/apache/conf/httpd-server2.conf). In your startup script, you will need&lt;br /&gt;
 to tell apache where to find the conf file, which I think is -f, but that&#039;s off the top of my head. The drawback here is that if both servers &lt;br /&gt;
 need to share the machine name (both departments use http://foo), then at least one server will need to be on a non-standard port,&lt;br /&gt;
 giving you something like http://foo and http://foo:8080. That&#039;s fine. It works. It&#039;s just extra work for one department.&lt;br /&gt;
   Now, if one machine will run both servers, but under different names (i.e., foo1 and foo2) you can use apache&#039;s vhosting capabilites. I&#039;ve&lt;br /&gt;
 never had to do this, so I don&#039;t know how to. :) The conf file that comes with the distro is pretty well documented, so it shouldn&#039;t be too&lt;br /&gt;
 difficult to figure.&lt;br /&gt;
   A third option is to use .htaccess. I&#039;m going to assume that some form of authentication is going to be used. If not, one department&lt;br /&gt;
 could just as easily look at http://foo1 as changing from http://foo/dept1 to http://foo/dept2. Using .htaccess, you can restrict access to&lt;br /&gt;
 the directories on a per-user basis (which can present maintenance issues) and serve all content off one server. I don&#039;t know all the&lt;br /&gt;
 particulars of your situation, but this is what I would lean toward if I could.&lt;br /&gt;
&lt;br /&gt;
see also page http://httpd.apache.org/docs/2.0/vhosts/examples.html, in particular:&lt;br /&gt;
&lt;br /&gt;
 The server has two IP addresses. On one (172.20.30.40), we will serve the &amp;quot;main&amp;quot; server, server.domain.com and on the other (172.20.30.50), &lt;br /&gt;
 we will serve two or more virtual hosts. Server configuration:&lt;br /&gt;
     Listen 80&lt;br /&gt;
     # This is the &amp;quot;main&amp;quot; server running on 172.20.30.40&lt;br /&gt;
     ServerName server.domain.com&lt;br /&gt;
     DocumentRoot /www/mainserver&lt;br /&gt;
     # This is the other address&lt;br /&gt;
     NameVirtualHost 172.20.30.50&lt;br /&gt;
     &amp;lt;VirtualHost 172.20.30.50&amp;gt;&lt;br /&gt;
     DocumentRoot /www/example1&lt;br /&gt;
     ServerName www.example1.com&lt;br /&gt;
     # Other directives here ...&lt;br /&gt;
     &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
     &amp;lt;VirtualHost 172.20.30.50&amp;gt;&lt;br /&gt;
     DocumentRoot /www/example2&lt;br /&gt;
     ServerName www.example2.org&lt;br /&gt;
     # Other directives here ...&lt;br /&gt;
     &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 Any request to an address other than 172.20.30.50 will be served from the main server. A request to 172.20.30.50&lt;br /&gt;
 with an unknown hostname, or no Host: header, will be served from www.example1.com.&lt;br /&gt;
&lt;br /&gt;
 The server machine has two IP addresses (192.168.1.1 and 172.20.30.40). The machine is sitting between an internal (intranet)&lt;br /&gt;
 network and an external (internet) network. Outside of the network, the name server.example.com resolves to the external &lt;br /&gt;
 address (172.20.30.40), but inside the network, that same name resolves to the internal address (192.168.1.1).&lt;br /&gt;
 The server can be made to respond to internal and external requests with the same content, with just one VirtualHost section.&lt;br /&gt;
 Server configuration:&lt;br /&gt;
     NameVirtualHost 192.168.1.1&lt;br /&gt;
     NameVirtualHost 172.20.30.40&lt;br /&gt;
     &amp;lt;VirtualHost 192.168.1.1 172.20.30.40&amp;gt;&lt;br /&gt;
     DocumentRoot /www/server1&lt;br /&gt;
     ServerName server.example.com&lt;br /&gt;
     ServerAlias server&lt;br /&gt;
     &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 Now requests from both networks will be served from the same VirtualHost.&lt;br /&gt;
 Note:&lt;br /&gt;
   On the internal network, one can just use the name server rather than the fully qualified host name server.example.com.&lt;br /&gt;
   Note also that, in the above example, you can replace the list of IP addresses with *, which will cause the server to respond the same&lt;br /&gt;
   on all addresses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTES:&lt;br /&gt;
&lt;br /&gt;
smartd fails on boot startup 17-jan-2007&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Clonweb&amp;diff=8735</id>
		<title>Clonweb</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Clonweb&amp;diff=8735"/>
		<updated>2026-04-13T18:16:22Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
Directory &#039;&#039;/www&#039;&#039; contains all applications, except &#039;&#039;rcdb&#039;&#039; which is located in &#039;&#039;/usr/local/src/rcdb&#039;&#039;. Symbolic links in &#039;&#039;/www/html&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Directory &#039;&#039;/etc/httpd/conf.d/ contains following custom files:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # webserver.conf&lt;br /&gt;
 #&lt;br /&gt;
 ServerName clonweb.jlab.org&lt;br /&gt;
 DocumentRoot /www/html&lt;br /&gt;
 ServerAdmin boiarino@jlab.org&lt;br /&gt;
 UseCanonicalName On&lt;br /&gt;
 #&lt;br /&gt;
 LogLevel warn&lt;br /&gt;
 ExtendedStatus On&lt;br /&gt;
 #&lt;br /&gt;
 DirectoryIndex index.html index.php&lt;br /&gt;
 #&lt;br /&gt;
 RewriteEngine   On&lt;br /&gt;
 #&lt;br /&gt;
 &amp;lt;Directory &amp;quot;/www/html&amp;quot;&amp;gt;&lt;br /&gt;
     DirectoryIndex index.html index.php&lt;br /&gt;
     Options Indexes FollowSymLinks&lt;br /&gt;
 #    AllowOverride None&lt;br /&gt;
     AllowOverride All&lt;br /&gt;
     Require all granted&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # rcdb.conf&lt;br /&gt;
 #&lt;br /&gt;
 # define mysql connection string&lt;br /&gt;
     SetEnv RCDB_CONNECTION &amp;quot;mysql://rcdb_ro@clondb1/rcdb&amp;quot;&lt;br /&gt;
 # define rcdb home directory&lt;br /&gt;
     Define RCDB_HOME /www/html/rcdb&lt;br /&gt;
 # following makes httpd to execute specified script, when url address is just RCDB_HOME&lt;br /&gt;
     WSGIScriptAlias /rcdb ${RCDB_HOME}/rcdb_www/rcdb_www.wsgi&lt;br /&gt;
 # following specify top path to the python scripts, including subdirectories&lt;br /&gt;
     WSGIPythonPath ${RCDB_HOME}/rcdb_www&lt;br /&gt;
 #&lt;br /&gt;
 ####   WSGIDaemonProcess rcdb_www threads=5&lt;br /&gt;
 ####   WSGIProcessGroup rcdb_www&lt;br /&gt;
 ####   WSGIApplicationGroup %{GLOBAL}&lt;br /&gt;
 #&lt;br /&gt;
 #&amp;lt;Directory &amp;quot;/www/html/rcdb/rcdb_www&amp;quot;&amp;gt;&lt;br /&gt;
 #    Options Indexes FollowSymLinks&lt;br /&gt;
 #    AllowOverride All&lt;br /&gt;
 #    Require all granted&lt;br /&gt;
 #&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RHEL6 ==&lt;br /&gt;
&lt;br /&gt;
* yum install httpd-devel php (php-mysql ?)&lt;br /&gt;
&lt;br /&gt;
== old stuff ==&lt;br /&gt;
&lt;br /&gt;
TO BE: Sun X4100 server, currently old desktop.&lt;br /&gt;
&lt;br /&gt;
IP address:&lt;br /&gt;
 clonweb/129.57.167.42&lt;br /&gt;
&lt;br /&gt;
TO BE IP address:&lt;br /&gt;
 clonweb-new/129.57.167.26/00:11:43:35:48:4A&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clonweb&#039;&#039; is CLON group web server holding monitoring and utility tools as well as documentation.&lt;br /&gt;
It assume to be viewed by everybody but can be modified by CLON system experts only.&lt;br /&gt;
It is running RHEL4 in almost standard configuration, with extra &#039;clonweb&#039; partition from file server&lt;br /&gt;
mounted as &#039;/www&#039; where all CLON applications are held. There are some restrictions: &#039;clonweb&#039; is not&lt;br /&gt;
visible from outside of JLAB firewall. Access to &#039;clonweb&#039; is opened through port 80 only, so only web browsing&lt;br /&gt;
shell be used. Main index.html menu contains full list of applications running on &#039;clonweb&#039;.&lt;br /&gt;
&lt;br /&gt;
Following procedures were used to install an applications:&lt;br /&gt;
&lt;br /&gt;
== apache ==&lt;br /&gt;
&lt;br /&gt;
See [[Apache]] for Apache and PHP installation procedure.&lt;br /&gt;
&lt;br /&gt;
== wiki ==&lt;br /&gt;
&lt;br /&gt;
Wiki were moved to [[Clonwiki]] machine, reference link will point you there.&lt;br /&gt;
&lt;br /&gt;
== phpmyadmin ==&lt;br /&gt;
&lt;br /&gt;
  su&lt;br /&gt;
  download &#039;phpMyAdmin-2.9.1.1-english.tar.gz&#039; from web to &#039;/usr/local/downloads&#039;&lt;br /&gt;
  cp phpMyAdmin-2.9.1.1-english.tar.gz /www/apache2.2.3/htdocs&lt;br /&gt;
  cd /www/apache2.2.3/htdocs&lt;br /&gt;
  gunzip  phpMyAdmin-2.9.1.1-english.tar.gz&lt;br /&gt;
  tar xvf phpMyAdmin-2.9.1.1-english.tar&lt;br /&gt;
  mv phpMyAdmin-2.9.1.1-english phpMyAdmin&lt;br /&gt;
  cd phpMyAdmin&lt;br /&gt;
  cp config.sample.inc.php config.inc.php&lt;br /&gt;
&lt;br /&gt;
Edit config.inc.php setting following (&#039;controlpass&#039; must be the root password to mysql):&lt;br /&gt;
If &#039;holla&#039; is not set message &#039;The configuration file now needs a secret passphrase&lt;br /&gt;
(blowfish_secret).&#039; will shows up (&#039;holla&#039; can be any word ???):&lt;br /&gt;
&lt;br /&gt;
  $cfg[&#039;blowfish_secret&#039;] = &#039;holla&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
  $cfg[&#039;Servers&#039;][$i][&#039;host&#039;] = &#039;clondb1.jlab.org&#039;;&lt;br /&gt;
  $cfg[&#039;Servers&#039;][$i][&#039;controluser&#039;] = &#039;root&#039;;&lt;br /&gt;
  $cfg[&#039;Servers&#039;][$i][&#039;controlpass&#039;] = &#039;********&#039;;&lt;br /&gt;
&lt;br /&gt;
Change config file&#039;s owner to &#039;apache&#039; and set maximum protective mode:&lt;br /&gt;
&lt;br /&gt;
  chown apache.apache config.inc.php&lt;br /&gt;
  chmod 400 config.inc.php&lt;br /&gt;
&lt;br /&gt;
NOTE: make sure that &#039;mysql -h clondb1 -u root -p&#039; works from clonweb; if not, grant&lt;br /&gt;
appropriate mysql privileges.&lt;br /&gt;
&lt;br /&gt;
NOTE: following procedure was recommended but did not worked for me:&lt;br /&gt;
&lt;br /&gt;
  mkdir config&lt;br /&gt;
  chmod 777 config&lt;br /&gt;
  cp config.sample.inc.php config/config.inc.php&lt;br /&gt;
  chmod 666 config/config.inc.php&lt;br /&gt;
  open browser (as &#039;root&#039; ?), type following URL:&lt;br /&gt;
      http://clonweb/phpMyAdmin/scripts/setup.php&lt;br /&gt;
  Click on the &amp;quot;Add&amp;quot; button in the &amp;quot;Servers&amp;quot; section and fill in the following&lt;br /&gt;
  fields:&lt;br /&gt;
      Server hostname:	clondb1.jlab.org&lt;br /&gt;
         (This is the host that your MySQL server is running on)&lt;br /&gt;
      Server port:	3306&lt;br /&gt;
         (the port your MySQL server is configured to use)&lt;br /&gt;
      Password for config auth:	....&lt;br /&gt;
         (the root password for your MySQL server)&lt;br /&gt;
  Press the button that says &amp;quot;Add&amp;quot; in green. Then press the &amp;quot;Save&amp;quot; button in&lt;br /&gt;
  the &amp;quot;Configuration&amp;quot; section.&lt;br /&gt;
  Now copy the configuration file into the main directory and delete the config&lt;br /&gt;
  directory:&lt;br /&gt;
      cp config/config.inc.php ./&lt;br /&gt;
      rm -rf config&lt;br /&gt;
  Assuming your MySQL server is running, you are now ready to connect to it and&lt;br /&gt;
  administer it with phpMyAdmin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start a Web browser and enter the following URL: http://clonweb/phpMyAdmin/&lt;br /&gt;
&lt;br /&gt;
== preparations for dual apachies ==&lt;br /&gt;
&lt;br /&gt;
from web:&lt;br /&gt;
&lt;br /&gt;
    If you need to run two different apache installations on the same box, the quickest way, IMO, is to have two separate conf files for the&lt;br /&gt;
 servers (/usr/local/apache/conf/httpd-server1.conf and /usr/local/apache/conf/httpd-server2.conf). In your startup script, you will need&lt;br /&gt;
 to tell apache where to find the conf file, which I think is -f, but that&#039;s off the top of my head. The drawback here is that if both servers &lt;br /&gt;
 need to share the machine name (both departments use http://foo), then at least one server will need to be on a non-standard port,&lt;br /&gt;
 giving you something like http://foo and http://foo:8080. That&#039;s fine. It works. It&#039;s just extra work for one department.&lt;br /&gt;
   Now, if one machine will run both servers, but under different names (i.e., foo1 and foo2) you can use apache&#039;s vhosting capabilites. I&#039;ve&lt;br /&gt;
 never had to do this, so I don&#039;t know how to. :) The conf file that comes with the distro is pretty well documented, so it shouldn&#039;t be too&lt;br /&gt;
 difficult to figure.&lt;br /&gt;
   A third option is to use .htaccess. I&#039;m going to assume that some form of authentication is going to be used. If not, one department&lt;br /&gt;
 could just as easily look at http://foo1 as changing from http://foo/dept1 to http://foo/dept2. Using .htaccess, you can restrict access to&lt;br /&gt;
 the directories on a per-user basis (which can present maintenance issues) and serve all content off one server. I don&#039;t know all the&lt;br /&gt;
 particulars of your situation, but this is what I would lean toward if I could.&lt;br /&gt;
&lt;br /&gt;
see also page http://httpd.apache.org/docs/2.0/vhosts/examples.html, in particular:&lt;br /&gt;
&lt;br /&gt;
 The server has two IP addresses. On one (172.20.30.40), we will serve the &amp;quot;main&amp;quot; server, server.domain.com and on the other (172.20.30.50), &lt;br /&gt;
 we will serve two or more virtual hosts. Server configuration:&lt;br /&gt;
     Listen 80&lt;br /&gt;
     # This is the &amp;quot;main&amp;quot; server running on 172.20.30.40&lt;br /&gt;
     ServerName server.domain.com&lt;br /&gt;
     DocumentRoot /www/mainserver&lt;br /&gt;
     # This is the other address&lt;br /&gt;
     NameVirtualHost 172.20.30.50&lt;br /&gt;
     &amp;lt;VirtualHost 172.20.30.50&amp;gt;&lt;br /&gt;
     DocumentRoot /www/example1&lt;br /&gt;
     ServerName www.example1.com&lt;br /&gt;
     # Other directives here ...&lt;br /&gt;
     &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
     &amp;lt;VirtualHost 172.20.30.50&amp;gt;&lt;br /&gt;
     DocumentRoot /www/example2&lt;br /&gt;
     ServerName www.example2.org&lt;br /&gt;
     # Other directives here ...&lt;br /&gt;
     &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 Any request to an address other than 172.20.30.50 will be served from the main server. A request to 172.20.30.50&lt;br /&gt;
 with an unknown hostname, or no Host: header, will be served from www.example1.com.&lt;br /&gt;
&lt;br /&gt;
 The server machine has two IP addresses (192.168.1.1 and 172.20.30.40). The machine is sitting between an internal (intranet)&lt;br /&gt;
 network and an external (internet) network. Outside of the network, the name server.example.com resolves to the external &lt;br /&gt;
 address (172.20.30.40), but inside the network, that same name resolves to the internal address (192.168.1.1).&lt;br /&gt;
 The server can be made to respond to internal and external requests with the same content, with just one VirtualHost section.&lt;br /&gt;
 Server configuration:&lt;br /&gt;
     NameVirtualHost 192.168.1.1&lt;br /&gt;
     NameVirtualHost 172.20.30.40&lt;br /&gt;
     &amp;lt;VirtualHost 192.168.1.1 172.20.30.40&amp;gt;&lt;br /&gt;
     DocumentRoot /www/server1&lt;br /&gt;
     ServerName server.example.com&lt;br /&gt;
     ServerAlias server&lt;br /&gt;
     &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 Now requests from both networks will be served from the same VirtualHost.&lt;br /&gt;
 Note:&lt;br /&gt;
   On the internal network, one can just use the name server rather than the fully qualified host name server.example.com.&lt;br /&gt;
   Note also that, in the above example, you can replace the list of IP addresses with *, which will cause the server to respond the same&lt;br /&gt;
   on all addresses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTES:&lt;br /&gt;
&lt;br /&gt;
smartd fails on boot startup 17-jan-2007&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Clonweb&amp;diff=8734</id>
		<title>Clonweb</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Clonweb&amp;diff=8734"/>
		<updated>2026-04-13T18:14:33Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
Directory &#039;&#039;/www&#039;&#039; contains all applications, except &#039;&#039;rcdb&#039;&#039; which is located in &#039;&#039;/usr/local/src/rcdb&#039;&#039;. Symbolic links in &#039;&#039;/www/html&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Directory &#039;&#039;/etc/httpd/conf.d/ contains following custom files:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # webserver.conf&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 ServerName clonweb.jlab.org&lt;br /&gt;
 DocumentRoot /www/html&lt;br /&gt;
 ServerAdmin boiarino@jlab.org&lt;br /&gt;
 UseCanonicalName On&lt;br /&gt;
 &lt;br /&gt;
 LogLevel warn&lt;br /&gt;
 ExtendedStatus On&lt;br /&gt;
 &lt;br /&gt;
 DirectoryIndex index.html index.php&lt;br /&gt;
 &lt;br /&gt;
 RewriteEngine   On&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;Directory &amp;quot;/www/html&amp;quot;&amp;gt;&lt;br /&gt;
     DirectoryIndex index.html index.php&lt;br /&gt;
     Options Indexes FollowSymLinks&lt;br /&gt;
 #    AllowOverride None&lt;br /&gt;
     AllowOverride All&lt;br /&gt;
     Require all granted&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RHEL6 ==&lt;br /&gt;
&lt;br /&gt;
* yum install httpd-devel php (php-mysql ?)&lt;br /&gt;
&lt;br /&gt;
== old stuff ==&lt;br /&gt;
&lt;br /&gt;
TO BE: Sun X4100 server, currently old desktop.&lt;br /&gt;
&lt;br /&gt;
IP address:&lt;br /&gt;
 clonweb/129.57.167.42&lt;br /&gt;
&lt;br /&gt;
TO BE IP address:&lt;br /&gt;
 clonweb-new/129.57.167.26/00:11:43:35:48:4A&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clonweb&#039;&#039; is CLON group web server holding monitoring and utility tools as well as documentation.&lt;br /&gt;
It assume to be viewed by everybody but can be modified by CLON system experts only.&lt;br /&gt;
It is running RHEL4 in almost standard configuration, with extra &#039;clonweb&#039; partition from file server&lt;br /&gt;
mounted as &#039;/www&#039; where all CLON applications are held. There are some restrictions: &#039;clonweb&#039; is not&lt;br /&gt;
visible from outside of JLAB firewall. Access to &#039;clonweb&#039; is opened through port 80 only, so only web browsing&lt;br /&gt;
shell be used. Main index.html menu contains full list of applications running on &#039;clonweb&#039;.&lt;br /&gt;
&lt;br /&gt;
Following procedures were used to install an applications:&lt;br /&gt;
&lt;br /&gt;
== apache ==&lt;br /&gt;
&lt;br /&gt;
See [[Apache]] for Apache and PHP installation procedure.&lt;br /&gt;
&lt;br /&gt;
== wiki ==&lt;br /&gt;
&lt;br /&gt;
Wiki were moved to [[Clonwiki]] machine, reference link will point you there.&lt;br /&gt;
&lt;br /&gt;
== phpmyadmin ==&lt;br /&gt;
&lt;br /&gt;
  su&lt;br /&gt;
  download &#039;phpMyAdmin-2.9.1.1-english.tar.gz&#039; from web to &#039;/usr/local/downloads&#039;&lt;br /&gt;
  cp phpMyAdmin-2.9.1.1-english.tar.gz /www/apache2.2.3/htdocs&lt;br /&gt;
  cd /www/apache2.2.3/htdocs&lt;br /&gt;
  gunzip  phpMyAdmin-2.9.1.1-english.tar.gz&lt;br /&gt;
  tar xvf phpMyAdmin-2.9.1.1-english.tar&lt;br /&gt;
  mv phpMyAdmin-2.9.1.1-english phpMyAdmin&lt;br /&gt;
  cd phpMyAdmin&lt;br /&gt;
  cp config.sample.inc.php config.inc.php&lt;br /&gt;
&lt;br /&gt;
Edit config.inc.php setting following (&#039;controlpass&#039; must be the root password to mysql):&lt;br /&gt;
If &#039;holla&#039; is not set message &#039;The configuration file now needs a secret passphrase&lt;br /&gt;
(blowfish_secret).&#039; will shows up (&#039;holla&#039; can be any word ???):&lt;br /&gt;
&lt;br /&gt;
  $cfg[&#039;blowfish_secret&#039;] = &#039;holla&#039;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
  $cfg[&#039;Servers&#039;][$i][&#039;host&#039;] = &#039;clondb1.jlab.org&#039;;&lt;br /&gt;
  $cfg[&#039;Servers&#039;][$i][&#039;controluser&#039;] = &#039;root&#039;;&lt;br /&gt;
  $cfg[&#039;Servers&#039;][$i][&#039;controlpass&#039;] = &#039;********&#039;;&lt;br /&gt;
&lt;br /&gt;
Change config file&#039;s owner to &#039;apache&#039; and set maximum protective mode:&lt;br /&gt;
&lt;br /&gt;
  chown apache.apache config.inc.php&lt;br /&gt;
  chmod 400 config.inc.php&lt;br /&gt;
&lt;br /&gt;
NOTE: make sure that &#039;mysql -h clondb1 -u root -p&#039; works from clonweb; if not, grant&lt;br /&gt;
appropriate mysql privileges.&lt;br /&gt;
&lt;br /&gt;
NOTE: following procedure was recommended but did not worked for me:&lt;br /&gt;
&lt;br /&gt;
  mkdir config&lt;br /&gt;
  chmod 777 config&lt;br /&gt;
  cp config.sample.inc.php config/config.inc.php&lt;br /&gt;
  chmod 666 config/config.inc.php&lt;br /&gt;
  open browser (as &#039;root&#039; ?), type following URL:&lt;br /&gt;
      http://clonweb/phpMyAdmin/scripts/setup.php&lt;br /&gt;
  Click on the &amp;quot;Add&amp;quot; button in the &amp;quot;Servers&amp;quot; section and fill in the following&lt;br /&gt;
  fields:&lt;br /&gt;
      Server hostname:	clondb1.jlab.org&lt;br /&gt;
         (This is the host that your MySQL server is running on)&lt;br /&gt;
      Server port:	3306&lt;br /&gt;
         (the port your MySQL server is configured to use)&lt;br /&gt;
      Password for config auth:	....&lt;br /&gt;
         (the root password for your MySQL server)&lt;br /&gt;
  Press the button that says &amp;quot;Add&amp;quot; in green. Then press the &amp;quot;Save&amp;quot; button in&lt;br /&gt;
  the &amp;quot;Configuration&amp;quot; section.&lt;br /&gt;
  Now copy the configuration file into the main directory and delete the config&lt;br /&gt;
  directory:&lt;br /&gt;
      cp config/config.inc.php ./&lt;br /&gt;
      rm -rf config&lt;br /&gt;
  Assuming your MySQL server is running, you are now ready to connect to it and&lt;br /&gt;
  administer it with phpMyAdmin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start a Web browser and enter the following URL: http://clonweb/phpMyAdmin/&lt;br /&gt;
&lt;br /&gt;
== preparations for dual apachies ==&lt;br /&gt;
&lt;br /&gt;
from web:&lt;br /&gt;
&lt;br /&gt;
    If you need to run two different apache installations on the same box, the quickest way, IMO, is to have two separate conf files for the&lt;br /&gt;
 servers (/usr/local/apache/conf/httpd-server1.conf and /usr/local/apache/conf/httpd-server2.conf). In your startup script, you will need&lt;br /&gt;
 to tell apache where to find the conf file, which I think is -f, but that&#039;s off the top of my head. The drawback here is that if both servers &lt;br /&gt;
 need to share the machine name (both departments use http://foo), then at least one server will need to be on a non-standard port,&lt;br /&gt;
 giving you something like http://foo and http://foo:8080. That&#039;s fine. It works. It&#039;s just extra work for one department.&lt;br /&gt;
   Now, if one machine will run both servers, but under different names (i.e., foo1 and foo2) you can use apache&#039;s vhosting capabilites. I&#039;ve&lt;br /&gt;
 never had to do this, so I don&#039;t know how to. :) The conf file that comes with the distro is pretty well documented, so it shouldn&#039;t be too&lt;br /&gt;
 difficult to figure.&lt;br /&gt;
   A third option is to use .htaccess. I&#039;m going to assume that some form of authentication is going to be used. If not, one department&lt;br /&gt;
 could just as easily look at http://foo1 as changing from http://foo/dept1 to http://foo/dept2. Using .htaccess, you can restrict access to&lt;br /&gt;
 the directories on a per-user basis (which can present maintenance issues) and serve all content off one server. I don&#039;t know all the&lt;br /&gt;
 particulars of your situation, but this is what I would lean toward if I could.&lt;br /&gt;
&lt;br /&gt;
see also page http://httpd.apache.org/docs/2.0/vhosts/examples.html, in particular:&lt;br /&gt;
&lt;br /&gt;
 The server has two IP addresses. On one (172.20.30.40), we will serve the &amp;quot;main&amp;quot; server, server.domain.com and on the other (172.20.30.50), &lt;br /&gt;
 we will serve two or more virtual hosts. Server configuration:&lt;br /&gt;
     Listen 80&lt;br /&gt;
     # This is the &amp;quot;main&amp;quot; server running on 172.20.30.40&lt;br /&gt;
     ServerName server.domain.com&lt;br /&gt;
     DocumentRoot /www/mainserver&lt;br /&gt;
     # This is the other address&lt;br /&gt;
     NameVirtualHost 172.20.30.50&lt;br /&gt;
     &amp;lt;VirtualHost 172.20.30.50&amp;gt;&lt;br /&gt;
     DocumentRoot /www/example1&lt;br /&gt;
     ServerName www.example1.com&lt;br /&gt;
     # Other directives here ...&lt;br /&gt;
     &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
     &amp;lt;VirtualHost 172.20.30.50&amp;gt;&lt;br /&gt;
     DocumentRoot /www/example2&lt;br /&gt;
     ServerName www.example2.org&lt;br /&gt;
     # Other directives here ...&lt;br /&gt;
     &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 Any request to an address other than 172.20.30.50 will be served from the main server. A request to 172.20.30.50&lt;br /&gt;
 with an unknown hostname, or no Host: header, will be served from www.example1.com.&lt;br /&gt;
&lt;br /&gt;
 The server machine has two IP addresses (192.168.1.1 and 172.20.30.40). The machine is sitting between an internal (intranet)&lt;br /&gt;
 network and an external (internet) network. Outside of the network, the name server.example.com resolves to the external &lt;br /&gt;
 address (172.20.30.40), but inside the network, that same name resolves to the internal address (192.168.1.1).&lt;br /&gt;
 The server can be made to respond to internal and external requests with the same content, with just one VirtualHost section.&lt;br /&gt;
 Server configuration:&lt;br /&gt;
     NameVirtualHost 192.168.1.1&lt;br /&gt;
     NameVirtualHost 172.20.30.40&lt;br /&gt;
     &amp;lt;VirtualHost 192.168.1.1 172.20.30.40&amp;gt;&lt;br /&gt;
     DocumentRoot /www/server1&lt;br /&gt;
     ServerName server.example.com&lt;br /&gt;
     ServerAlias server&lt;br /&gt;
     &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 Now requests from both networks will be served from the same VirtualHost.&lt;br /&gt;
 Note:&lt;br /&gt;
   On the internal network, one can just use the name server rather than the fully qualified host name server.example.com.&lt;br /&gt;
   Note also that, in the above example, you can replace the list of IP addresses with *, which will cause the server to respond the same&lt;br /&gt;
   on all addresses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTES:&lt;br /&gt;
&lt;br /&gt;
smartd fails on boot startup 17-jan-2007&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Process_Management&amp;diff=8733</id>
		<title>Process Management</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Process_Management&amp;diff=8733"/>
		<updated>2026-04-10T17:11:36Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In addition to runcontrol-managed processes, other DAQ-related processes are running on machine specified by environment variable &#039;&#039;&#039;CLON_DAQ&#039;&#039;&#039;. To start those processes, run following command on any clondaq* machine as &#039;&#039;clasrun&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 start_process_management&lt;br /&gt;
&lt;br /&gt;
It will start &#039;&#039;ipc_process_manager&#039;&#039; controlled by config file &#039;&#039;$CLON_PARMS/processes/ipc_process_manager.cfg&#039;&#039;. It is running permanently, making sure that all processes, specified in config fie, are alive, and will restart them if needed. To stop all those processes, run&lt;br /&gt;
&lt;br /&gt;
 stop_process_management&lt;br /&gt;
&lt;br /&gt;
To check running processes:&lt;br /&gt;
&lt;br /&gt;
 check_process_management&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== old info, can be incorrect ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: make sure &#039;&#039;clascron&#039;&#039; account exist on all machines participating in cron job-based monitoring, and it is in &#039;&#039;onliners&#039;&#039; group. If not, modify &#039;&#039;/etc/passwd&#039;&#039;, &#039;&#039;/etc/shadow&#039;&#039; and &#039;&#039;/etc/group&#039;&#039; files using examples from existing machines. Scripts started by cron jobs will use &#039;&#039;ssh -n node ...&#039;&#039; statements so &#039;&#039;clascron&#039;&#039; must be able to ssh. It must be done without password, so login to every machine running related cron jobs (clon10, clon00, clon01) as &#039;&#039;clascron&#039;&#039; and make sure you can ssh to all other machines without password. If necessary, fix &#039;&#039;~/.ssh/known_hosts&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generic information&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Directory &#039;&#039;$CLON_PARMS/processes&#039;&#039; contains 6 configuration files for CLON process management system:&lt;br /&gt;
&lt;br /&gt;
 ipc_process_manager.cfg      &amp;lt;- ipc_process_manager(perl script) &amp;lt;- control_ipc_process_manager (csh script)&lt;br /&gt;
 ipc_critical_processes.cfg   &amp;lt;- ipc_process_monitor(perl script) &amp;lt;- cronjobs&lt;br /&gt;
&lt;br /&gt;
To start/stop &#039;ipc_process_manager&#039;:&lt;br /&gt;
&lt;br /&gt;
 control_ipc_process_manager start clasrun&lt;br /&gt;
 control_ipc_process_manager stop clasrun&lt;br /&gt;
&lt;br /&gt;
Currently used components:&lt;br /&gt;
&lt;br /&gt;
 epics_monitor&lt;br /&gt;
 ipcbank2et&lt;br /&gt;
 dbrouter&lt;br /&gt;
 run_log_update&lt;br /&gt;
&lt;br /&gt;
 #clas_epics_server&lt;br /&gt;
 #alarm_handler&lt;br /&gt;
 #alarm_server&lt;br /&gt;
 #alarm_browser&lt;br /&gt;
&lt;br /&gt;
CLAS-era stuff:&lt;br /&gt;
&lt;br /&gt;
 critical_processes.cfg&lt;br /&gt;
 process_manager.cfg&lt;br /&gt;
 remote_critical_processes.cfg&lt;br /&gt;
 sys10_critical_processes.cfg&lt;br /&gt;
&lt;br /&gt;
To watch ipc messages:&lt;br /&gt;
&lt;br /&gt;
 java clonjava/ipc_monitor -a clasrun&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Process_Management&amp;diff=8732</id>
		<title>Process Management</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Process_Management&amp;diff=8732"/>
		<updated>2026-04-10T17:03:43Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In addition to runcontrol-managed processes, other DAQ-related processes are running on machine specified by environment variable &#039;&#039;&#039;CLON_DAQ&#039;&#039;&#039;. To start those processes, run following command on any clondaq* machine as &#039;&#039;clasrun&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 start_process_management&lt;br /&gt;
&lt;br /&gt;
It will start &#039;&#039;ipc_process_manager&#039;&#039; controlled by config file &#039;&#039;$CLON_PARMS/processes/ipc_process_manager.cfg&#039;&#039;. It is running permanently, making sure that all processes, specified in config fie, are alive, and will restart them if needed. To stop all those processes, run&lt;br /&gt;
&lt;br /&gt;
 stop_process_management&lt;br /&gt;
&lt;br /&gt;
To check running processes:&lt;br /&gt;
&lt;br /&gt;
 ipc_check -a clasrun -d &amp;quot;*&amp;quot; -u ipc_procman -w 4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== old info, can be incorrect ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: make sure &#039;&#039;clascron&#039;&#039; account exist on all machines participating in cron job-based monitoring, and it is in &#039;&#039;onliners&#039;&#039; group. If not, modify &#039;&#039;/etc/passwd&#039;&#039;, &#039;&#039;/etc/shadow&#039;&#039; and &#039;&#039;/etc/group&#039;&#039; files using examples from existing machines. Scripts started by cron jobs will use &#039;&#039;ssh -n node ...&#039;&#039; statements so &#039;&#039;clascron&#039;&#039; must be able to ssh. It must be done without password, so login to every machine running related cron jobs (clon10, clon00, clon01) as &#039;&#039;clascron&#039;&#039; and make sure you can ssh to all other machines without password. If necessary, fix &#039;&#039;~/.ssh/known_hosts&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generic information&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Directory &#039;&#039;$CLON_PARMS/processes&#039;&#039; contains 6 configuration files for CLON process management system:&lt;br /&gt;
&lt;br /&gt;
 ipc_process_manager.cfg      &amp;lt;- ipc_process_manager(perl script) &amp;lt;- control_ipc_process_manager (csh script)&lt;br /&gt;
 ipc_critical_processes.cfg   &amp;lt;- ipc_process_monitor(perl script) &amp;lt;- cronjobs&lt;br /&gt;
&lt;br /&gt;
To start/stop &#039;ipc_process_manager&#039;:&lt;br /&gt;
&lt;br /&gt;
 control_ipc_process_manager start clasrun&lt;br /&gt;
 control_ipc_process_manager stop clasrun&lt;br /&gt;
&lt;br /&gt;
Currently used components:&lt;br /&gt;
&lt;br /&gt;
 epics_monitor&lt;br /&gt;
 ipcbank2et&lt;br /&gt;
 dbrouter&lt;br /&gt;
 run_log_update&lt;br /&gt;
&lt;br /&gt;
 #clas_epics_server&lt;br /&gt;
 #alarm_handler&lt;br /&gt;
 #alarm_server&lt;br /&gt;
 #alarm_browser&lt;br /&gt;
&lt;br /&gt;
CLAS-era stuff:&lt;br /&gt;
&lt;br /&gt;
 critical_processes.cfg&lt;br /&gt;
 process_manager.cfg&lt;br /&gt;
 remote_critical_processes.cfg&lt;br /&gt;
 sys10_critical_processes.cfg&lt;br /&gt;
&lt;br /&gt;
To watch ipc messages:&lt;br /&gt;
&lt;br /&gt;
 java clonjava/ipc_monitor -a clasrun&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Process_Management&amp;diff=8731</id>
		<title>Process Management</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Process_Management&amp;diff=8731"/>
		<updated>2026-04-10T16:56:24Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To check running processes:&lt;br /&gt;
&lt;br /&gt;
ipc_check -a clasrun -d &amp;quot;*&amp;quot; -u ipc_procman -w 4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== old info, can be incorrect ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: make sure &#039;&#039;clascron&#039;&#039; account exist on all machines participating in cron job-based monitoring, and it is in &#039;&#039;onliners&#039;&#039; group. If not, modify &#039;&#039;/etc/passwd&#039;&#039;, &#039;&#039;/etc/shadow&#039;&#039; and &#039;&#039;/etc/group&#039;&#039; files using examples from existing machines. Scripts started by cron jobs will use &#039;&#039;ssh -n node ...&#039;&#039; statements so &#039;&#039;clascron&#039;&#039; must be able to ssh. It must be done without password, so login to every machine running related cron jobs (clon10, clon00, clon01) as &#039;&#039;clascron&#039;&#039; and make sure you can ssh to all other machines without password. If necessary, fix &#039;&#039;~/.ssh/known_hosts&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generic information&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Directory &#039;&#039;$CLON_PARMS/processes&#039;&#039; contains 6 configuration files for CLON process management system:&lt;br /&gt;
&lt;br /&gt;
 ipc_process_manager.cfg      &amp;lt;- ipc_process_manager(perl script) &amp;lt;- control_ipc_process_manager (csh script)&lt;br /&gt;
 ipc_critical_processes.cfg   &amp;lt;- ipc_process_monitor(perl script) &amp;lt;- cronjobs&lt;br /&gt;
&lt;br /&gt;
To start/stop &#039;ipc_process_manager&#039;:&lt;br /&gt;
&lt;br /&gt;
 control_ipc_process_manager start clasrun&lt;br /&gt;
 control_ipc_process_manager stop clasrun&lt;br /&gt;
&lt;br /&gt;
Currently used components:&lt;br /&gt;
&lt;br /&gt;
 epics_monitor&lt;br /&gt;
 ipcbank2et&lt;br /&gt;
 dbrouter&lt;br /&gt;
 run_log_update&lt;br /&gt;
&lt;br /&gt;
 #clas_epics_server&lt;br /&gt;
 #alarm_handler&lt;br /&gt;
 #alarm_server&lt;br /&gt;
 #alarm_browser&lt;br /&gt;
&lt;br /&gt;
CLAS-era stuff:&lt;br /&gt;
&lt;br /&gt;
 critical_processes.cfg&lt;br /&gt;
 process_manager.cfg&lt;br /&gt;
 remote_critical_processes.cfg&lt;br /&gt;
 sys10_critical_processes.cfg&lt;br /&gt;
&lt;br /&gt;
To watch ipc messages:&lt;br /&gt;
&lt;br /&gt;
 java clonjava/ipc_monitor -a clasrun&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=PERL&amp;diff=8730</id>
		<title>PERL</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=PERL&amp;diff=8730"/>
		<updated>2026-04-09T19:56:23Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
 yum install perl&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
To see what modules are installed already:&lt;br /&gt;
&lt;br /&gt;
 perl -MFile::Find=find -MFile::Spec::Functions -Tlw -e &#039;find { wanted =&amp;gt; sub { print canonpath $_ if /\.pm\z/ }, no_chdir =&amp;gt; 1 }, @INC&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pezca-1.3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* yum install perl-DBD-MySQL&lt;br /&gt;
&lt;br /&gt;
* setenv EPICS_EXTENSIONS /usr/clas12/release/0.3/epics/apps&lt;br /&gt;
* export EPICS_EXTENSIONS=/usr/clas12/release/0.3/epics/apps&lt;br /&gt;
* perl Makefile.PL INSTALL_BASE=/usr/lib64/perl5/vendor_perl&lt;br /&gt;
* make&lt;br /&gt;
* &#039;install&#039; puts it in some wrong place, do following:&lt;br /&gt;
&lt;br /&gt;
 cp Pezca.pm /usr/lib64/perl5/vendor_perl/&lt;br /&gt;
&lt;br /&gt;
== old stuff ==&lt;br /&gt;
&lt;br /&gt;
To see what modules are installed already, run command &#039;&#039;perldoc perllocal&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Check module example: &#039;&#039;perl -MRRDs -le &#039;print q(ok!)&#039; &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
We are installing PERL modules directly into the PERL system location. Normally PERL modiles will be obtained from [http://www.cpan.org/] in a form of tar files and placed in /usr/local/downloads. For every platform they must be copied to /usr/local/src, untared and installed. Following modules must be installed:&lt;br /&gt;
 Pezca&lt;br /&gt;
 Tk&lt;br /&gt;
 DBI&lt;br /&gt;
 DBD::mysql&lt;br /&gt;
 Time&lt;br /&gt;
 URI&lt;br /&gt;
 HTML::Tagset&lt;br /&gt;
 HTML::Parser&lt;br /&gt;
 IO-Compress-Base&lt;br /&gt;
 Compress-Raw-Zlib (see note below)&lt;br /&gt;
 Compress-Raw-Bzip2&lt;br /&gt;
 IO-Compress-Bzip2&lt;br /&gt;
 IO-Compress-Zlib&lt;br /&gt;
 Compress-Zlib (on RHEL5 it suggests to install with option)&lt;br /&gt;
 LWP (libwww-perl) (use default options when asked)&lt;br /&gt;
 XML-Parser&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; need for Arne&#039;s online plots: GD.pm, GNUPLOT_TO_PNG_GIF.pm, ONLINE_SUB.pm&lt;br /&gt;
&lt;br /&gt;
For installation instructions see README inside those packages. Usually you have to type:&lt;br /&gt;
 perl Makefile.PL&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake test (optionally)&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
Following was noticed:&lt;br /&gt;
&lt;br /&gt;
* Pezca_0.3: After running &#039;perl Makefile.PL&#039; and before &#039;gmake&#039;, modify &#039;Makefile&#039;: after &#039;-Iinclude&#039;, add &#039;-Iinclude/os/solaris -Iinclude/O.solaris&#039; (adjust for OS; do not know why it did not happened during &#039;perl Makefile.PL&#039; ...). Also, module &#039;osdTime.cc&#039; must be compiled by &#039;CC&#039;, not by &#039;cc&#039; as it is happening (just go to &#039;libCom/os/generic&#039;, type &#039;gmake&#039;, copy last failed command, replace &#039;cc&#039; by &#039;CC&#039; and execute).&lt;br /&gt;
&lt;br /&gt;
* Pezca_0.4: After running &#039;perl Makefile.PL.ontop&#039; and before &#039;gmake&#039;, modify &#039;Makefile&#039;: after -I.../include/os add &#039;/solaris&#039; with corresponding flavor. Also, version 0.4 can be (and must be) compiled using our EPICS, not the one which comes with Pezca. To do so EPICS_BASE and EPICS_EXTENSIONS environment variables must be defined, and configuring must be done by command &#039;&#039;perl Makefile.PL.ontop&#039;&#039;. On solaris-x86, modify &#039;&#039;platform_ontop.pm&#039;&#039; as following:&lt;br /&gt;
 # platform dependant sub-directory for include files (on sparc-solaris probably the same using &#039;&#039;solaris-sparc&#039;&#039;):&lt;br /&gt;
 my %os_inc_subdir= (&#039;linux-x86&#039; =&amp;gt; &#039;Linux&#039;,&lt;br /&gt;
                     &#039;win32-x86&#039; =&amp;gt; &#039;WIN32&#039;,&lt;br /&gt;
                     &#039;hpux-11&#039;   =&amp;gt; &#039;hp700&#039;,&lt;br /&gt;
                     &#039;solaris&#039;   =&amp;gt; &#039;solaris&#039;,                     &amp;lt;----- added&lt;br /&gt;
                   );&lt;br /&gt;
 # platform dependant sub-directory for libraries in the base:&lt;br /&gt;
 my %os_b_lib_subdir= (&#039;linux-x86&#039; =&amp;gt; &#039;linux-x86&#039;,&lt;br /&gt;
                       &#039;win32-x86&#039; =&amp;gt; &#039;win32-x86&#039;,&lt;br /&gt;
                       &#039;hpux-11&#039;   =&amp;gt; &#039;hp700&#039;,&lt;br /&gt;
                       &#039;solaris&#039;   =&amp;gt; &#039;solaris-x86&#039;,                     &amp;lt;----- added&lt;br /&gt;
                     );&lt;br /&gt;
 # platform dependant sub-directory for libraries in the extensions directory:&lt;br /&gt;
 my %os_e_lib_subdir= (&#039;linux-x86&#039; =&amp;gt; &#039;linux-x86&#039;,&lt;br /&gt;
                       &#039;win32-x86&#039; =&amp;gt; &#039;win32-x86&#039;,&lt;br /&gt;
                       &#039;hpux-11&#039;   =&amp;gt; &#039;hp700&#039;,&lt;br /&gt;
                       &#039;solaris&#039;   =&amp;gt; &#039;solaris-x86&#039;,                     &amp;lt;----- added&lt;br /&gt;
                     );&lt;br /&gt;
&lt;br /&gt;
* DBI:&lt;br /&gt;
&lt;br /&gt;
 clon01:DBI-1.52&amp;gt; perl Makefile.PL&lt;br /&gt;
 *** Note:&lt;br /&gt;
    The optional PlRPC-modules (RPC::PlServer etc) are not installed.&lt;br /&gt;
    If you want to use the DBD::Proxy driver and DBI::ProxyServer&lt;br /&gt;
    modules, then you&#039;ll need to install the RPC::PlServer, RPC::PlClient,&lt;br /&gt;
    Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you.&lt;br /&gt;
    You can install them any time after installing the DBI.&lt;br /&gt;
    You do *not* need these modules for typical DBI usage.&lt;br /&gt;
 Optional modules are available from any CPAN mirror, in particular&lt;br /&gt;
    http://search.cpan.org/&lt;br /&gt;
    http://www.perl.com/CPAN/modules/by-module&lt;br /&gt;
    http://www.perl.org/CPAN/modules/by-module&lt;br /&gt;
    ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module&lt;br /&gt;
&lt;br /&gt;
* Compress-Raw-Zlib:&lt;br /&gt;
&lt;br /&gt;
sed -e &amp;quot;s|BUILD_ZLIB\s*= True|BUILD_ZLIB = False|&amp;quot; -e &amp;quot;s|INCLUDE\s*= ./zlib-src|INCLUDE    = /usr/include|&amp;quot; -e &amp;quot;s|LIB\s*= ./zlib-src|LIB        = /usr/lib|&amp;quot; config.in&lt;br /&gt;
&lt;br /&gt;
Install all modules on one machine of each flavor and execute following for the rest:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/Pezca-0.4&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/Tk-804.027/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/DBI-1.52/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/DBD-mysql-3.0008/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/Time-modules-2006.0814/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/URI-1.35/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/HTML-Tagset-3.10/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/HTML-Parser-3.56/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/IO-Compress-Base-2.005/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/Compress-Raw-Zlib-2.005/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/Compress-Raw-Bzip2-2.005/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/IO-Compress-Bzip2-2.005/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/IO-Compress-Zlib-2.005/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/Compress-Zlib-2.005/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/libwww-perl-5.808/&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/XML-Parser-2.36/&lt;br /&gt;
 gmake install&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Boot_Server&amp;diff=8729</id>
		<title>Linux Boot Server</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Boot_Server&amp;diff=8729"/>
		<updated>2026-04-08T20:47:25Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* VTP CentOS boot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Main boot server is clon01&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TO DO&#039;&#039;&#039; Check UBOOT commands to erase existing environment variables:&lt;br /&gt;
&lt;br /&gt;
 env default -a -f&lt;br /&gt;
 env erase&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;VTP CentOS boot&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
UBOOT (example for gem0vtp):&lt;br /&gt;
&lt;br /&gt;
 Zynq&amp;gt; printenv&lt;br /&gt;
 autoload=no&lt;br /&gt;
 baudrate=115200&lt;br /&gt;
 bootcmd=run tftpboot&lt;br /&gt;
 bootdelay=3&lt;br /&gt;
 bootro=setenv bootargs ${bootargs} ro&lt;br /&gt;
 bootrw=setenv bootargs ${bootargs} rw&lt;br /&gt;
 devicetree_image=devicetree.dtb&lt;br /&gt;
 devicetree_load_address=0x2000000&lt;br /&gt;
 ethact=ethernet@e000b000&lt;br /&gt;
 ethaddr=ce:ba:f0:03:xx:xx&lt;br /&gt;
 extargs=setenv bootargs ${bootargs} console=ttyPS0,115200 ip=:::::eth0:dhcp uio_pdrv_genirq.of_id=my-uio rootwait cma=384MB&lt;br /&gt;
 fdt_high=0x20000000&lt;br /&gt;
 fdtcontroladdr=3ffa9e30&lt;br /&gt;
 initrd_high=0x20000000&lt;br /&gt;
 kernel_image=uImage-4.4.0-xilinx-00004-g8d932a&lt;br /&gt;
 kernel_load_address=0x2080000&lt;br /&gt;
 load_devicetree=if tftpboot ${devicetree_load_address} ${tftppath}/${devicetree_image}; then echo OK; else echo FAILED; reset; fi;&lt;br /&gt;
 load_dhcp=if dhcp; then echo OK; else echo FAILED; reset; fi;&lt;br /&gt;
 load_kernel=if tftpboot ${kernel_load_address} ${tftppath}/${kernel_image}; then echo OK; else echo FAILED; reset; fi;&lt;br /&gt;
 modeboot=sdboot&lt;br /&gt;
 netmask=255.255.255.0&lt;br /&gt;
 nfsargs=setenv bootargs nfsroot=${rootserverip}:${rootpath},vers=3&lt;br /&gt;
 rootpath=/vol/diskless/CentOS7/armv7/root&lt;br /&gt;
 rootserverip=129.57.167.152&lt;br /&gt;
 serverip=129.57.167.4&lt;br /&gt;
 stderr=serial@e0000000&lt;br /&gt;
 stdin=serial@e0000000&lt;br /&gt;
 stdout=serial@e0000000&lt;br /&gt;
 tftp_boot_string=echo TFTPing Image to RAM&lt;br /&gt;
 tftpboot=run load_dhcp tftp_boot_string nfsargs extargs bootro load_kernel load_devicetree &amp;amp;&amp;amp; bootm ${kernel_load_address} - ${devicetree_load_address}&lt;br /&gt;
 tftpboot_rw=dhcp &amp;amp;&amp;amp; run tftp_boot_string nfsargs extargs bootrw load_kernel load_devicetree &amp;amp;&amp;amp; bootm ${kernel_load_address} - ${devicetree_load_address}&lt;br /&gt;
 tftppath=linux-install/CentOS7-armv7-Diskless&lt;br /&gt;
 &lt;br /&gt;
 Environment size: 1603/131068 bytes&lt;br /&gt;
 Zynq&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy-Paste following on uboot prompt to program above settings (do it by groups as shown, otherwise it may place some bull...):&lt;br /&gt;
&lt;br /&gt;
 setenv bootargs&lt;br /&gt;
 setenv gatewayip&lt;br /&gt;
 setenv ipaddr&lt;br /&gt;
 setenv kernel_path&lt;br /&gt;
 setenv nfsip&lt;br /&gt;
 setenv nfsroot&lt;br /&gt;
 setenv sdboot&lt;br /&gt;
 setenv sdboot_no&lt;br /&gt;
 setenv setboot&lt;br /&gt;
 setenv tftpboot_no&lt;br /&gt;
 setenv tt_string&lt;br /&gt;
&lt;br /&gt;
 setenv autoload &#039;no&#039;&lt;br /&gt;
 setenv baudrate &#039;115200&#039;&lt;br /&gt;
 setenv bootcmd &#039;run tftpboot&#039;&lt;br /&gt;
 setenv bootdelay &#039;3&#039;&lt;br /&gt;
 setenv bootro &#039;setenv bootargs ${bootargs} ro&#039;&lt;br /&gt;
 setenv bootrw &#039;setenv bootargs ${bootargs} rw&#039;&lt;br /&gt;
 setenv devicetree_image &#039;devicetree.dtb&#039;&lt;br /&gt;
 setenv devicetree_load_address &#039;0x2000000&#039;&lt;br /&gt;
 setenv ethact &#039;ethernet@e000b000&#039;&lt;br /&gt;
 setenv ethaddr &#039;ce:ba:f0:03:00:d1&#039;&lt;br /&gt;
 setenv extargs &#039;setenv bootargs ${bootargs} console=ttyPS0,115200 ip=:::::eth0:dhcp uio_pdrv_genirq.of_id=my-uio rootwait cma=384MB&#039;&lt;br /&gt;
 setenv fdt_high &#039;0x20000000&#039;&lt;br /&gt;
 setenv fdtcontroladdr &#039;3ffa9e30&#039;&lt;br /&gt;
 setenv initrd_high &#039;0x20000000&#039;&lt;br /&gt;
 setenv kernel_image &#039;uImage-4.4.0-xilinx-00004-g8d932a&#039;&lt;br /&gt;
 setenv kernel_load_address &#039;0x2080000&#039;&lt;br /&gt;
 &lt;br /&gt;
 setenv load_devicetree &#039;if tftpboot ${devicetree_load_address} ${tftppath}/${devicetree_image}; then echo OK; else echo FAILED; reset; fi;&#039;&lt;br /&gt;
 setenv load_dhcp &#039;if dhcp; then echo OK; else echo FAILED; reset; fi;&#039;&lt;br /&gt;
 setenv load_kernel &#039;if tftpboot ${kernel_load_address} ${tftppath}/${kernel_image}; then echo OK; else echo FAILED; reset; fi;&#039;&lt;br /&gt;
 setenv modeboot &#039;sdboot&#039;&lt;br /&gt;
 setenv netmask &#039;255.255.255.0&#039;&lt;br /&gt;
 setenv nfsargs &#039;setenv bootargs nfsroot=${rootserverip}:${rootpath},vers=3&#039;&lt;br /&gt;
 setenv rootpath &#039;/vol/diskless/CentOS7/armv7/root&#039;&lt;br /&gt;
 setenv rootserverip &#039;129.57.167.152&#039;&lt;br /&gt;
 setenv serverip &#039;129.57.167.4&#039;&lt;br /&gt;
 setenv stderr &#039;serial@e0000000&#039;&lt;br /&gt;
 setenv stdin &#039;serial@e0000000&#039;&lt;br /&gt;
 setenv stdout &#039;serial@e0000000&#039;&lt;br /&gt;
 setenv tftp_boot_string &#039;echo TFTPing Image to RAM&#039;&lt;br /&gt;
 &lt;br /&gt;
 setenv tftpboot &#039;run load_dhcp tftp_boot_string nfsargs extargs bootro load_kernel load_devicetree &amp;amp;&amp;amp; bootm ${kernel_load_address} - ${devicetree_load_address}&#039;&lt;br /&gt;
 setenv tftpboot_rw &#039;dhcp &amp;amp;&amp;amp; run tftp_boot_string nfsargs extargs bootrw load_kernel load_devicetree &amp;amp;&amp;amp; bootm ${kernel_load_address} - ${devicetree_load_address}&#039;&lt;br /&gt;
 setenv tftppath &#039;linux-install/CentOS7-armv7-Diskless&#039;&lt;br /&gt;
 &lt;br /&gt;
After that, customize following:&lt;br /&gt;
&lt;br /&gt;
 ethaddr&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tftpboot server settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 /tftpboot/linux-install/CentOS7-armv7-Diskless/uImage-4.4.0-xilinx-00004-g8d932a&lt;br /&gt;
                                                uImage-4.4.0-xilinx-00003-gdf4da5&lt;br /&gt;
                                                zynq-jlab-vtp.dtb_fixed_uio&lt;br /&gt;
                                                devicetree.dtb -&amp;gt; zynq-jlab-vtp.dtb_fixed_uio&lt;br /&gt;
&lt;br /&gt;
By default, root filesystem will be read-only. To make it &#039;rw&#039;, stop booting process on serial connection, type &#039;&#039;run tftpboot_rw&#039;&#039; and push &amp;lt;enter&amp;gt;. After that you can ssh as root and run &#039;&#039;yum&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;VTP Archlinux boot&#039;&#039;&#039; ==&lt;br /&gt;
 &lt;br /&gt;
 Zynq&amp;gt; printenv&lt;br /&gt;
 autoload=no&lt;br /&gt;
 baudrate=115200&lt;br /&gt;
 bootargs=console=ttyPS0,115200 ip=:::::eth0:dhcp nfsroot=${nfsip}:${nfsroot},${nfsargs} uio_pdrv_genirq.of_id=my-uio ro rootwait&lt;br /&gt;
 bootcmd=run $modeboot&lt;br /&gt;
 bootdelay=3&lt;br /&gt;
 devicetree_image=zynq-jlab-vtp.dtb&lt;br /&gt;
 devicetree_load_address=0x2000000&lt;br /&gt;
 ethact=ethernet@e000b000&lt;br /&gt;
 ethaddr=CE:BA:F0:03:00:02&lt;br /&gt;
 fdt_high=0x20000000&lt;br /&gt;
 fdtcontroladdr=3ffa9e30&lt;br /&gt;
 gatewayip=129.57.68.100&lt;br /&gt;
 initrd_high=0x20000000&lt;br /&gt;
 ipaddr=129.57.68.38&lt;br /&gt;
 kernel_image=uImage&lt;br /&gt;
 kernel_load_address=0x2080000&lt;br /&gt;
 kernel_path=linux-install/ArchLinux-armv71&lt;br /&gt;
 modeboot=sdboot&lt;br /&gt;
 netmask=255.255.255.0&lt;br /&gt;
 nfsargs=vers=3,tcp,timeo=600,retrans=10&lt;br /&gt;
 nfsip=129.57.167.152&lt;br /&gt;
 nfsroot=/vol/diskless/ArchLinux/armv7-devel/root&lt;br /&gt;
 sdboot=run setboot; echo Copying Linux from TFTP server to RAM...; echo Download Kernel; if tftpboot 0x2080000 linux-install/ArchLinux-armv71/uImage; then echo OK; else echo FAILED; reset; fi; echo Download DeviceTree; if tftpboot 0x2000000 linux-install/ArchLinux-armv71/zynq-jlab-vtp.dtb; then echo OK; else echo FAILED; reset; fi; echo Boot system; bootm 0x2080000 - 0x2000000&lt;br /&gt;
 sdboot_no=if mmcinfo; then echo Copying Linux from SD to RAM... &amp;amp;&amp;amp; load mmc 0 ${kernel_load_address} ${kernel_image} &amp;amp;&amp;amp; load mmc 0 ${devicetree_load_address} ${devicetree_image} &amp;amp;&amp;amp; bootm ${kernel_load_address} - ${devicetree_load_address}; fi&lt;br /&gt;
 serverip=129.57.167.4&lt;br /&gt;
 setboot=setenv bootargs console=ttyPS0,115200 ip=:::::eth0:dhcp nfsroot=${nfsip}:${nfsroot},${nfsargs} uio_pdrv_genirq.of_id=my-uio ro rootwait&lt;br /&gt;
 stderr=serial@e0000000&lt;br /&gt;
 stdin=serial@e0000000&lt;br /&gt;
 stdout=serial@e0000000&lt;br /&gt;
 tftpboot_no=echo Copying Linux from tftp server to RAM... &amp;amp;&amp;amp;tftpboot ${kernel_load_address} linux_vtp/${kernel_image} &amp;amp;&amp;amp;tftpboot ${devicetree_load_address} linux_vtp/${devicetree_image} &amp;amp;&amp;amp;bootm ${kernel_load_address} - ${devicetree_load_address};&lt;br /&gt;
 &lt;br /&gt;
 Environment size: 1828/131068 bytes&lt;br /&gt;
 Zynq&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy-Paste following on uboot prompt to program above settings (do it line-by-line, otherwise it may place some bull...):&lt;br /&gt;
&lt;br /&gt;
 setenv autoload &#039;no&#039;&lt;br /&gt;
 setenv baudrate &#039;115200&#039;&lt;br /&gt;
 setenv bootargs &#039;console=ttyPS0,115200 ip=:::::eth0:dhcp nfsroot=${nfsip}:${nfsroot},${nfsargs} uio_pdrv_genirq.of_id=my-uio ro rootwait&#039;&lt;br /&gt;
 setenv bootcmd &#039;run $modeboot&#039;&lt;br /&gt;
 setenv bootdelay &#039;3&#039;&lt;br /&gt;
 setenv devicetree_image &#039;zynq-jlab-vtp.dtb&#039;&lt;br /&gt;
 setenv devicetree_load_address &#039;0x2000000&#039;&lt;br /&gt;
 setenv ethact &#039;ethernet@e000b000&#039;&lt;br /&gt;
 setenv ethaddr &#039;CE:BA:F0:03:00:02&#039;&lt;br /&gt;
 setenv fdt_high &#039;0x20000000&#039;&lt;br /&gt;
 setenv fdtcontroladdr &#039;3ffa9e30&#039;&lt;br /&gt;
 setenv gatewayip &#039;129.57.68.100&#039;&lt;br /&gt;
 setenv initrd_high &#039;0x20000000&#039;&lt;br /&gt;
 setenv ipaddr &#039;129.57.68.38&#039;&lt;br /&gt;
 setenv kernel_image &#039;uImage&#039;&lt;br /&gt;
 setenv kernel_load_address &#039;0x2080000&#039;&lt;br /&gt;
 setenv kernel_path &#039;linux-install/ArchLinux-armv71&#039;&lt;br /&gt;
 setenv modeboot &#039;sdboot&#039;&lt;br /&gt;
 setenv netmask &#039;255.255.255.0&#039;&lt;br /&gt;
 setenv nfsargs &#039;vers=3,tcp,timeo=600,retrans=10&#039;&lt;br /&gt;
 setenv nfsip &#039;129.57.167.152&#039;&lt;br /&gt;
 setenv nfsroot &#039;/vol/diskless/ArchLinux/armv7-devel/root&#039;&lt;br /&gt;
 setenv sdboot &#039;run setboot; echo Copying Linux from TFTP server to RAM...; echo Download Kernel; if tftpboot 0x2080000 linux-install/ArchLinux-armv71/uImage; then echo OK; else echo FAILED; reset; fi; echo Download DeviceTree; if tftpboot 0x2000000 linux-install/ArchLinux-armv71/zynq-jlab-vtp.dtb; then echo OK; else echo FAILED; reset; fi; echo Boot system; bootm 0x2080000 - 0x2000000&#039;&lt;br /&gt;
 setenv sdboot_no &#039;if mmcinfo; then echo Copying Linux from SD to RAM... &amp;amp;&amp;amp; load mmc 0 ${kernel_load_address} ${kernel_image} &amp;amp;&amp;amp; load mmc 0 ${devicetree_load_address} ${devicetree_image} &amp;amp;&amp;amp; bootm ${kernel_load_address} - ${devicetree_load_address}; fi&#039;&lt;br /&gt;
 setenv serverip &#039;129.57.167.4&#039;&lt;br /&gt;
 setenv setboot &#039;setenv bootargs console=ttyPS0,115200 ip=:::::eth0:dhcp nfsroot=${nfsip}:${nfsroot},${nfsargs} uio_pdrv_genirq.of_id=my-uio ro rootwait&#039;&lt;br /&gt;
 setenv stderr &#039;serial@e0000000&#039;&lt;br /&gt;
 setenv stdin &#039;serial@e0000000&#039;&lt;br /&gt;
 setenv stdout &#039;serial@e0000000&#039;&lt;br /&gt;
 setenv tftpboot_no &#039;echo Copying Linux from tftp server to RAM... &amp;amp;&amp;amp;tftpboot ${kernel_load_address} linux_vtp/${kernel_image} &amp;amp;&amp;amp;tftpboot ${devicetree_load_address} linux_vtp/${devicetree_image} &amp;amp;&amp;amp;bootm ${kernel_load_address} - ${devicetree_load_address};&#039;&lt;br /&gt;
&lt;br /&gt;
After that, customize following:&lt;br /&gt;
 ethaddr&lt;br /&gt;
 gatewayip&lt;br /&gt;
 ipaddr&lt;br /&gt;
 netmask&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Setting of the Linux server to be used for PXE and EFI boot of the VME controllers&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Login to the server as root. Copy two files to the root directory and untar them:&lt;br /&gt;
 cd /&lt;br /&gt;
 cp /usr/downloads/tftpboot.tar.gz_clondaq15 tftpboot.tar.gz&lt;br /&gt;
 cp /usr/downloads/diskless.tar.gz_clondaq15 diskless.tar.gz&lt;br /&gt;
 gunzip tftpboot.tar.gz&lt;br /&gt;
 gunzip diskless.tar.gz&lt;br /&gt;
 tar xvf tftpboot.tar&lt;br /&gt;
 tar xvf diskless.tar&lt;br /&gt;
 rm tftpboot.tar diskless.tar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure correct snapshot location in root area &#039;&#039;/diskless/CentOS7/x86_64/root/etc/sysconfig/readonly-root&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 CLIENTSTATE=192.168.10.1:/diskless/CentOS7/x86_64/snapshot&lt;br /&gt;
&lt;br /&gt;
In &#039;&#039;/diskless/CentOS7/x86_64/root&#039;&#039; area, &#039;&#039;/etc/ssh/sshd_config&#039;&#039; must have following setting (to allow remote ssh):&lt;br /&gt;
&lt;br /&gt;
 #UsePAM yes&lt;br /&gt;
&lt;br /&gt;
it will be propagated to the controller&#039;s snapshot area on the first boot when corresponding &#039;&#039;snapshot/&amp;lt;vme_controller_name&amp;gt;&#039;&#039; directory will be created. Not sure about other settings:&lt;br /&gt;
&lt;br /&gt;
 HostbasedAuthentication yes&lt;br /&gt;
 #HostbasedAuthentication no&lt;br /&gt;
&lt;br /&gt;
 IgnoreRhosts no&lt;br /&gt;
 #IgnoreRhosts yes&lt;br /&gt;
&lt;br /&gt;
 PasswordAuthentication yes&lt;br /&gt;
 #PasswordAuthentication yes&lt;br /&gt;
 PasswordAuthentication yes&lt;br /&gt;
&lt;br /&gt;
 #UsePrivilegeSeparation sandbox		# Default for new installations.&lt;br /&gt;
 UsePrivilegeSeparation sandbox		# Default for new installations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To add or remove VME controllers, modify following files:&lt;br /&gt;
 /var/named/10.168.192.in-addr.arpa.db&lt;br /&gt;
 /var/named/clontest.com&lt;br /&gt;
 /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
restart corresponding services:&lt;br /&gt;
 systemctl restart dhcpd&lt;br /&gt;
 systemctl restart named&lt;br /&gt;
&lt;br /&gt;
and check services status:&lt;br /&gt;
 systemctl status dhcpd&lt;br /&gt;
 systemctl status named&lt;br /&gt;
&lt;br /&gt;
To set gateway, add&lt;br /&gt;
 net.ipv4.ip_forward=1&lt;br /&gt;
to &#039;&#039;/etc/sysctl.conf&#039;&#039; and execute&lt;br /&gt;
 sysctl -p&lt;br /&gt;
&lt;br /&gt;
Configure [[NFS]]&lt;br /&gt;
&lt;br /&gt;
Configure [[DHCP server]]&lt;br /&gt;
&lt;br /&gt;
Configure [[DNS server]] (&#039;&#039;&#039;NOTE:&#039;&#039;&#039; resolv.conf is different for local server !)&lt;br /&gt;
&lt;br /&gt;
Configure [[Tftp]] and [[Tftpboot]]&lt;br /&gt;
&lt;br /&gt;
Configure [[Iptables]]&lt;br /&gt;
&lt;br /&gt;
Do not forget (is it for controllers ?):&lt;br /&gt;
 chattr +i /etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yum install ypbind (????)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Configuring snapshot area&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of files and directories which suppose to be in snapshot area (which has RW permissions) should be set in config file &#039;&#039;/diskless/.../snapshot/files&#039;&#039; for CentOS5, or in config file &#039;&#039;/diskless/../root/etc/statetab&#039;&#039; for CentOS7. In particular, &#039;&#039;/et&#039;&#039; has to be added there, and also directory &#039;&#039;/diskless/.../root/et&#039;&#039; should be created.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reboot server, make sure everything is running as expected.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Configuring in chroot&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: using &#039;&#039;chroot&#039;&#039; method will allow to run &#039;&#039;yum&#039;&#039;, but &#039;&#039;systemctl&#039;&#039; commands will not work. Instead of using &#039;&#039;chroot&#039;&#039;, you may boot coontroller with &#039;&#039;rw&#039;&#039; option instead of &#039;&#039;ro&#039;&#039;. For VME boot, it can be done by changing &#039;&#039;grub.cnf&#039;&#039;, while for VTP boot you have to stop boot proocess using serial connection, and then type &#039;&#039;run tftpboot_rw&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Since root area in VME controllers will be read-only, you cannot ssh to controllers as root and change anything there, only snapshot area can be modified. To make changes in root area, in particular to configure and run &#039;&#039;yum&#039;&#039;, &#039;&#039;chroot&#039; command should be used. Login to the boot server as root and do following:&lt;br /&gt;
&lt;br /&gt;
 mount -o bind /home /diskless/CentOS7/x86_64/root/home&lt;br /&gt;
 mount -o bind /usr/local /diskless/CentOS7/x86_64/root/usr/local&lt;br /&gt;
 mount -o bind /usr/clas12 /diskless/CentOS7/x86_64/root/usr/clas12&lt;br /&gt;
 chroot /diskless/CentOS7/x86_64/root&lt;br /&gt;
&lt;br /&gt;
After that you will see all root directories as if you login to VME controller, and modifications can be made.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Configure yum&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Add &#039;&#039;multilib_policy=all&#039;&#039; to &#039;&#039;/etc/yum.conf&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add (and remove the rest ?) following to &#039;&#039;/etc/yum.repos.d/CentOS-Base.repo&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 [base]&lt;br /&gt;
 name=CentOS-$releasever - Base&lt;br /&gt;
 baseurl=http://archive.kernel.org/centos-vault/centos/$releasever/os/$basearch/&lt;br /&gt;
&lt;br /&gt;
Clean yum database:&lt;br /&gt;
&lt;br /&gt;
 rm /var/lib/rpm/__db.*&lt;br /&gt;
&lt;br /&gt;
Install following using yum:&lt;br /&gt;
&lt;br /&gt;
 yum install motif-devel tcl-devel tk-devel libXpm-devel apr-devel libXaw-devel ncurses-devel libconfig-devel&lt;br /&gt;
&lt;br /&gt;
Install following for &#039;&#039;dbedit&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 yum install tix itcl itk&lt;br /&gt;
&lt;br /&gt;
Install remaining tcl stuff from &#039;&#039;/usr/local/src&#039;&#039;, mounted as &#039;&#039;/zzz&#039;&#039; above:&lt;br /&gt;
 &lt;br /&gt;
 cd /zzz/mysqltcl-3.052&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/lib/mysqltcl-3.052 /usr/lib64/tcl8.5/mysqltcl-3.052&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: Login from console may not work because of file &#039;&#039;/etc/securetty&#039;&#039; permissions, it must be 644.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: THere is a service PAM, it may prevent login from console if some required services did not start. To work around, comment out some lines in &#039;&#039;/etc/pam.d/system-auth-ac&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
 #%PAM-1.0&lt;br /&gt;
 # This file is auto-generated.&lt;br /&gt;
 # User changes will be destroyed the next time authconfig is run.&lt;br /&gt;
 #auth        required      pam_env.so&lt;br /&gt;
 auth        sufficient    pam_unix.so nullok try_first_pass&lt;br /&gt;
 #auth        requisite     pam_succeed_if.so uid &amp;gt;= 1000 quiet_success&lt;br /&gt;
 #auth        required      pam_deny.so&lt;br /&gt;
 &lt;br /&gt;
 #account     required      pam_unix.so&lt;br /&gt;
 account     sufficient    pam_localuser.so&lt;br /&gt;
 account     sufficient    pam_succeed_if.so uid &amp;lt; 1000 quiet&lt;br /&gt;
 #account     required      pam_permit.so&lt;br /&gt;
 &lt;br /&gt;
 password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=&lt;br /&gt;
 password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok&lt;br /&gt;
 #password    required      pam_deny.so&lt;br /&gt;
 &lt;br /&gt;
 session     optional      pam_keyinit.so revoke&lt;br /&gt;
 #session     required      pam_limits.so&lt;br /&gt;
 -session     optional      pam_systemd.so&lt;br /&gt;
 session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid&lt;br /&gt;
 #session     required      pam_unix.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;After Linux boot server is ready and operational, VME controllers can be booted. On the first boot, individual &#039;&#039;/diskless/.../snapshot/&amp;lt;controller name&amp;gt;&#039;&#039; directory will be created for each controller. For VME controller specific information see [[VME]]&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Abaco_XVB603&amp;diff=8728</id>
		<title>Abaco XVB603</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Abaco_XVB603&amp;diff=8728"/>
		<updated>2026-04-08T14:57:58Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;Initial setting:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Unplug ethernet cable.&lt;br /&gt;
&lt;br /&gt;
For new controller, push and hold &#039;&#039;&#039;DEL&#039;&#039;&#039; to get BIOS.&lt;br /&gt;
&lt;br /&gt;
In BIOS, go to &#039;&#039;&#039;Advanced-&amp;gt;Network Stack Configuration&#039;&#039;&#039; and enable &#039;&#039;&#039;Network Stack&#039;&#039;&#039; and &#039;&#039;&#039;Ipv4 PXE Support&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In BIOS, go to &#039;&#039;&#039;Abaco-&amp;gt;Network Boot Configuration&#039;&#039;&#039; and enable &#039;&#039;&#039;PXE ROM - ETH3&#039;&#039;&#039; and &#039;&#039;&#039;PXE ROM - ETH4&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In BIOS, go to &#039;&#039;&#039;Abaco-&amp;gt;VMEbus Configuration&#039;&#039;&#039; and set &#039;&#039;&#039;Reserve VME Space&#039;&#039;&#039; to &#039;&#039;&#039;512 MBytes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Save &amp;amp; Exit&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Connect ethernet cable to the top port. Recycle power, it should boot (if not, in BIOS, go to &#039;&#039;&#039;Boot&#039;&#039;&#039; and set appropriate network port(s) in BOOT Option #1 (and #2)).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Abaco_XVB603&amp;diff=8727</id>
		<title>Abaco XVB603</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Abaco_XVB603&amp;diff=8727"/>
		<updated>2026-04-08T14:57:46Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;Initial setting:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Unplug ethernet cable.&lt;br /&gt;
&lt;br /&gt;
For new controller, push and hold &#039;&#039;&#039;DEL&#039;&#039; to get BIOS.&lt;br /&gt;
&lt;br /&gt;
In BIOS, go to &#039;&#039;&#039;Advanced-&amp;gt;Network Stack Configuration&#039;&#039;&#039; and enable &#039;&#039;&#039;Network Stack&#039;&#039;&#039; and &#039;&#039;&#039;Ipv4 PXE Support&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In BIOS, go to &#039;&#039;&#039;Abaco-&amp;gt;Network Boot Configuration&#039;&#039;&#039; and enable &#039;&#039;&#039;PXE ROM - ETH3&#039;&#039;&#039; and &#039;&#039;&#039;PXE ROM - ETH4&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In BIOS, go to &#039;&#039;&#039;Abaco-&amp;gt;VMEbus Configuration&#039;&#039;&#039; and set &#039;&#039;&#039;Reserve VME Space&#039;&#039;&#039; to &#039;&#039;&#039;512 MBytes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Save &amp;amp; Exit&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Connect ethernet cable to the top port. Recycle power, it should boot (if not, in BIOS, go to &#039;&#039;&#039;Boot&#039;&#039;&#039; and set appropriate network port(s) in BOOT Option #1 (and #2)).&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Tftpboot&amp;diff=8726</id>
		<title>Tftpboot</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Tftpboot&amp;diff=8726"/>
		<updated>2026-04-01T19:18:43Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Tftpboot setting to boot diskless VME controllers&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;/tftpboot&#039;&#039; directory does not exist yet, copy it from &#039;&#039;/usr/downloads&#039;&#039; (it come from Bryan Moffit in April 2025).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EFI boot&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
File &#039;&#039;/tftpboot/efi/boot/grub2/grub.cfg&#039;&#039; should have following contents (to use &#039;&#039;/diskless&#039;&#039; from file server, below set &#039;&#039;...root=nfs:129.57.167.16:/vol/diskless/...&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 function load_video {&lt;br /&gt;
 insmod efi_gop&lt;br /&gt;
 insmod efi_uga&lt;br /&gt;
 insmod video_bochs&lt;br /&gt;
 insmod video_cirrus&lt;br /&gt;
 insmod all_video&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 load_video&lt;br /&gt;
 set gfxpayload=keep&lt;br /&gt;
 insmod gzio&lt;br /&gt;
 set timeout=2&lt;br /&gt;
 menuentry &#039;Diskless CentOS7 x86_64, any network device&#039;  --class redhat --class gnu-linux --class gnu --class os {&lt;br /&gt;
 linuxefi linux-install/CentOS7-x86_64-Diskless/vmlinuz-3.10.0-1062.9.1.el7.x86_64 zram=1 ip=::::::dhcp root=nfs:192.168.10.1:/diskless/CentOS7/x86_64/root ro vga=0x305 module_blacklist=ipmi_si,ipmi_msghandler,ipmi_devintf,w83977f_wdt&lt;br /&gt;
 initrdefi linux-install/CentOS7-x86_64-Diskless/initramfs-jvme-3.10.0-1062.9.1.el7.x86_64.img&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
that file will serve all EFI-bootable VME controllers, &#039;&#039;&#039;no need to set anything in &#039;&#039;/tftpboot&#039;&#039; area&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PXE boot&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In directory &#039;&#039;/tftpboot/pxelinux.cfg&#039;&#039;, PXE-bootable controllers boot files are stored. For example:&lt;br /&gt;
 C0A80A06 -&amp;gt; test6&lt;br /&gt;
 test6&lt;br /&gt;
&lt;br /&gt;
where &#039;&#039;C0A80A06&#039;&#039; is test6&#039;s IP address in hex format (192.168.10.6), and &#039;&#039;test6&#039;&#039; has following contents:&lt;br /&gt;
 default CentOS7&lt;br /&gt;
 &lt;br /&gt;
 label CentOS7&lt;br /&gt;
     kernel CentOS7-x86_64-Diskless/vmlinuz-3.10.0-1062.9.1.el7.x86_64&lt;br /&gt;
     append initrd=CentOS7-x86_64-Diskless/initramfs-jvme-3.10.0-1062.9.1.el7.x86_64.img ip=dhcp root=nfs:192.168.10.1:/diskless/CentOS7/x86_64/root,tcp ro&lt;br /&gt;
&lt;br /&gt;
# label CentOS7&lt;br /&gt;
#     kernel CentOS7-x86_64-Diskless/vmlinuz-3.10.0-1062.9.1.el7.x86_64&lt;br /&gt;
#     append initrd=CentOS7-x86_64-Diskless/initramfs-jvme-3.10.0-1062.9.1.el7.x86_64.img ip=bootdev:dhcp root=nfs:192.168.10.1:/diskless/CentOS7/x86_64/root,tcp ro ifname=bootdev:00:20:38:0A:07:D7&lt;br /&gt;
&lt;br /&gt;
It should be mentioned that in both cases VME controller&#039;s root directories will be mounted as &#039;read only&#039;. All individual controller-specific directories will be placed in &#039;snapshot&#039; area.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
</feed>