<?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-07-08T14:47:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<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>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Tftpboot&amp;diff=8725</id>
		<title>Tftpboot</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Tftpboot&amp;diff=8725"/>
		<updated>2026-04-01T19:18:26Z</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;
&#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;
&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>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Tftpboot&amp;diff=8724</id>
		<title>Tftpboot</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Tftpboot&amp;diff=8724"/>
		<updated>2026-04-01T19:18:11Z</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;
&#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;
&#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>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Raid&amp;diff=8723</id>
		<title>Raid</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Raid&amp;diff=8723"/>
		<updated>2026-03-25T14:48:59Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* perccli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== storcli ==&lt;br /&gt;
&lt;br /&gt;
On clondaq7, it is installed to &#039;&#039;/opt/MegaRAID/storcli&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/eall/sall show&#039;&#039;&#039;&lt;br /&gt;
 CLI Version = 007.3405.0000.0000 May 15, 2025&lt;br /&gt;
 Operating system = Linux 5.14.0-611.7.1.el9_7.x86_64&lt;br /&gt;
 Controller = 0&lt;br /&gt;
 Status = Success&lt;br /&gt;
 Description = Show Drive Information Succeeded.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Drive Information :&lt;br /&gt;
 =================&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 EID:Slt DID State DG     Size Intf Med SED PI SeSz Model            Sp Type &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 9:0      10 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:1      18 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:2      14 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:3      20 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:4      23 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:5      32 Onln   0 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  U  -    &lt;br /&gt;
 9:6      28 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:7      25 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:8      11 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:9      13 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:10     31 GHS    - 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:11     16 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:12     24 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:13     26 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:14     15 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:15     19 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:16     22 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:17     29 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:18     27 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:19     21 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:20     33 Onln   - 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  U  -    &lt;br /&gt;
 9:21     34 UGood  - 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  D  -    &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/v0 start migrate type=r6 option=add drives=9:21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/v0 show&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== perccli ==&lt;br /&gt;
&lt;br /&gt;
On clondaq6, it is installed in &#039;&#039;/opt/MegaRAID/perccli&#039;&#039; (from rpm inside &#039;&#039;/usr/downloads/PERCCLI_7.1910.00_A12_Linux.tar.gz&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Commands similar to storcli, for example:&lt;br /&gt;
&lt;br /&gt;
 [root@clondaq6 perccli]# &#039;&#039;&#039;./perccli64 /c0/eall/sall show&#039;&#039;&#039;&lt;br /&gt;
 CLI Version = 007.1910.0000.0000 Oct 08, 2021&lt;br /&gt;
 Operating system = Linux 5.14.0-611.7.1.el9_7.x86_64&lt;br /&gt;
 Controller = 0&lt;br /&gt;
 Status = Success&lt;br /&gt;
 Description = Show Drive Information Succeeded.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Drive Information :&lt;br /&gt;
 =================&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 EID:Slt DID State DG     Size Intf Med SED PI SeSz Model            Sp Type &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 32:0      0 Onln   0 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:1      1 Onln   0 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:2      2 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:3      3 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:4      4 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:5      5 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:6      6 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:7      7 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:8      8 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:9      9 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:10    10 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:11    11 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:12    12 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:13    13 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:14    14 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:15    15 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:16    16 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:17    17 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:18    18 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:19    19 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:20    20 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:21    21 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:22    22 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:23    23 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 &lt;br /&gt;
 EID=Enclosure Device ID|Slt=Slot No|DID=Device ID|DG=DriveGroup&lt;br /&gt;
 DHS=Dedicated Hot Spare|UGood=Unconfigured Good|GHS=Global Hotspare&lt;br /&gt;
 UBad=Unconfigured Bad|Sntze=Sanitize|Onln=Online|Offln=Offline|Intf=Interface&lt;br /&gt;
 Med=Media Type|SED=Self Encryptive Drive|PI=Protection Info&lt;br /&gt;
 SeSz=Sector Size|Sp=Spun|U=Up|D=Down|T=Transition|F=Foreign&lt;br /&gt;
 UGUnsp=UGood Unsupported|UGShld=UGood shielded|HSPShld=Hotspare shielded&lt;br /&gt;
 CFShld=Configured shielded|Cpybck=CopyBack|CBShld=Copyback Shielded&lt;br /&gt;
 UBUnsp=UBad Unsupported|Rbld=Rebuild&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Raid&amp;diff=8722</id>
		<title>Raid</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Raid&amp;diff=8722"/>
		<updated>2026-03-25T14:48:16Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* perccli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== storcli ==&lt;br /&gt;
&lt;br /&gt;
On clondaq7, it is installed to &#039;&#039;/opt/MegaRAID/storcli&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/eall/sall show&#039;&#039;&#039;&lt;br /&gt;
 CLI Version = 007.3405.0000.0000 May 15, 2025&lt;br /&gt;
 Operating system = Linux 5.14.0-611.7.1.el9_7.x86_64&lt;br /&gt;
 Controller = 0&lt;br /&gt;
 Status = Success&lt;br /&gt;
 Description = Show Drive Information Succeeded.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Drive Information :&lt;br /&gt;
 =================&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 EID:Slt DID State DG     Size Intf Med SED PI SeSz Model            Sp Type &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 9:0      10 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:1      18 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:2      14 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:3      20 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:4      23 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:5      32 Onln   0 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  U  -    &lt;br /&gt;
 9:6      28 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:7      25 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:8      11 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:9      13 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:10     31 GHS    - 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:11     16 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:12     24 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:13     26 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:14     15 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:15     19 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:16     22 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:17     29 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:18     27 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:19     21 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:20     33 Onln   - 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  U  -    &lt;br /&gt;
 9:21     34 UGood  - 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  D  -    &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/v0 start migrate type=r6 option=add drives=9:21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/v0 show&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== perccli ==&lt;br /&gt;
&lt;br /&gt;
Installed from rpm inside &#039;&#039;/usr/downloads/PERCCLI_7.1910.00_A12_Linux.tar.gz&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
On clondaq6, it is installed in &#039;&#039;/opt/MegaRAID/perccli&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Commands similar to storcli, for example:&lt;br /&gt;
&lt;br /&gt;
 [root@clondaq6 perccli]# &#039;&#039;&#039;./perccli64 /c0/eall/sall show&#039;&#039;&#039;&lt;br /&gt;
 CLI Version = 007.1910.0000.0000 Oct 08, 2021&lt;br /&gt;
 Operating system = Linux 5.14.0-611.7.1.el9_7.x86_64&lt;br /&gt;
 Controller = 0&lt;br /&gt;
 Status = Success&lt;br /&gt;
 Description = Show Drive Information Succeeded.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Drive Information :&lt;br /&gt;
 =================&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 EID:Slt DID State DG     Size Intf Med SED PI SeSz Model            Sp Type &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 32:0      0 Onln   0 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:1      1 Onln   0 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:2      2 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:3      3 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:4      4 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:5      5 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:6      6 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:7      7 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:8      8 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:9      9 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:10    10 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:11    11 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:12    12 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:13    13 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:14    14 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:15    15 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:16    16 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:17    17 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:18    18 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:19    19 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:20    20 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:21    21 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:22    22 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:23    23 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 &lt;br /&gt;
 EID=Enclosure Device ID|Slt=Slot No|DID=Device ID|DG=DriveGroup&lt;br /&gt;
 DHS=Dedicated Hot Spare|UGood=Unconfigured Good|GHS=Global Hotspare&lt;br /&gt;
 UBad=Unconfigured Bad|Sntze=Sanitize|Onln=Online|Offln=Offline|Intf=Interface&lt;br /&gt;
 Med=Media Type|SED=Self Encryptive Drive|PI=Protection Info&lt;br /&gt;
 SeSz=Sector Size|Sp=Spun|U=Up|D=Down|T=Transition|F=Foreign&lt;br /&gt;
 UGUnsp=UGood Unsupported|UGShld=UGood shielded|HSPShld=Hotspare shielded&lt;br /&gt;
 CFShld=Configured shielded|Cpybck=CopyBack|CBShld=Copyback Shielded&lt;br /&gt;
 UBUnsp=UBad Unsupported|Rbld=Rebuild&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Raid&amp;diff=8721</id>
		<title>Raid</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Raid&amp;diff=8721"/>
		<updated>2026-03-25T14:45:47Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* perccli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== storcli ==&lt;br /&gt;
&lt;br /&gt;
On clondaq7, it is installed to &#039;&#039;/opt/MegaRAID/storcli&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/eall/sall show&#039;&#039;&#039;&lt;br /&gt;
 CLI Version = 007.3405.0000.0000 May 15, 2025&lt;br /&gt;
 Operating system = Linux 5.14.0-611.7.1.el9_7.x86_64&lt;br /&gt;
 Controller = 0&lt;br /&gt;
 Status = Success&lt;br /&gt;
 Description = Show Drive Information Succeeded.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Drive Information :&lt;br /&gt;
 =================&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 EID:Slt DID State DG     Size Intf Med SED PI SeSz Model            Sp Type &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 9:0      10 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:1      18 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:2      14 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:3      20 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:4      23 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:5      32 Onln   0 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  U  -    &lt;br /&gt;
 9:6      28 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:7      25 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:8      11 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:9      13 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:10     31 GHS    - 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:11     16 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:12     24 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:13     26 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:14     15 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:15     19 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:16     22 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:17     29 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:18     27 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:19     21 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:20     33 Onln   - 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  U  -    &lt;br /&gt;
 9:21     34 UGood  - 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  D  -    &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/v0 start migrate type=r6 option=add drives=9:21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/v0 show&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== perccli ==&lt;br /&gt;
&lt;br /&gt;
On clondaq6, it is installed in &#039;&#039;/opt/MegaRAID/perccli&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Commands similar to storcli, for example:&lt;br /&gt;
&lt;br /&gt;
 [root@clondaq6 perccli]# &#039;&#039;&#039;./perccli64 /c0/eall/sall show&#039;&#039;&#039;&lt;br /&gt;
 CLI Version = 007.1910.0000.0000 Oct 08, 2021&lt;br /&gt;
 Operating system = Linux 5.14.0-611.7.1.el9_7.x86_64&lt;br /&gt;
 Controller = 0&lt;br /&gt;
 Status = Success&lt;br /&gt;
 Description = Show Drive Information Succeeded.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Drive Information :&lt;br /&gt;
 =================&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 EID:Slt DID State DG     Size Intf Med SED PI SeSz Model            Sp Type &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 32:0      0 Onln   0 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:1      1 Onln   0 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:2      2 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:3      3 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:4      4 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:5      5 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:6      6 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:7      7 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:8      8 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:9      9 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:10    10 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:11    11 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:12    12 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:13    13 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:14    14 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:15    15 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:16    16 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:17    17 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:18    18 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:19    19 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:20    20 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:21    21 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:22    22 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:23    23 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 &lt;br /&gt;
 EID=Enclosure Device ID|Slt=Slot No|DID=Device ID|DG=DriveGroup&lt;br /&gt;
 DHS=Dedicated Hot Spare|UGood=Unconfigured Good|GHS=Global Hotspare&lt;br /&gt;
 UBad=Unconfigured Bad|Sntze=Sanitize|Onln=Online|Offln=Offline|Intf=Interface&lt;br /&gt;
 Med=Media Type|SED=Self Encryptive Drive|PI=Protection Info&lt;br /&gt;
 SeSz=Sector Size|Sp=Spun|U=Up|D=Down|T=Transition|F=Foreign&lt;br /&gt;
 UGUnsp=UGood Unsupported|UGShld=UGood shielded|HSPShld=Hotspare shielded&lt;br /&gt;
 CFShld=Configured shielded|Cpybck=CopyBack|CBShld=Copyback Shielded&lt;br /&gt;
 UBUnsp=UBad Unsupported|Rbld=Rebuild&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Raid&amp;diff=8720</id>
		<title>Raid</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Raid&amp;diff=8720"/>
		<updated>2026-03-25T14:45:15Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== storcli ==&lt;br /&gt;
&lt;br /&gt;
On clondaq7, it is installed to &#039;&#039;/opt/MegaRAID/storcli&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/eall/sall show&#039;&#039;&#039;&lt;br /&gt;
 CLI Version = 007.3405.0000.0000 May 15, 2025&lt;br /&gt;
 Operating system = Linux 5.14.0-611.7.1.el9_7.x86_64&lt;br /&gt;
 Controller = 0&lt;br /&gt;
 Status = Success&lt;br /&gt;
 Description = Show Drive Information Succeeded.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Drive Information :&lt;br /&gt;
 =================&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 EID:Slt DID State DG     Size Intf Med SED PI SeSz Model            Sp Type &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 9:0      10 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:1      18 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:2      14 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:3      20 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:4      23 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:5      32 Onln   0 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  U  -    &lt;br /&gt;
 9:6      28 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:7      25 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:8      11 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:9      13 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:10     31 GHS    - 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:11     16 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:12     24 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:13     26 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:14     15 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:15     19 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:16     22 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:17     29 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:18     27 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:19     21 Onln   0 7.276 TB SAS  HDD N   N  512B HUH721008AL5200  U  -    &lt;br /&gt;
 9:20     33 Onln   - 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  U  -    &lt;br /&gt;
 9:21     34 UGood  - 7.276 TB SAS  HDD N   N  512B HUH728080AL5204  D  -    &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/v0 start migrate type=r6 option=add drives=9:21&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;./storcli64 /c0/v0 show&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== perccli ==&lt;br /&gt;
&lt;br /&gt;
On clondaq6, it is installed in &#039;&#039;/opt/MegaRAID/perccli&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Commands similar to storcli, for example:&lt;br /&gt;
&lt;br /&gt;
 [root@clondaq6 perccli]# ./perccli64 /c0/eall/sall show&lt;br /&gt;
 CLI Version = 007.1910.0000.0000 Oct 08, 2021&lt;br /&gt;
 Operating system = Linux 5.14.0-611.7.1.el9_7.x86_64&lt;br /&gt;
 Controller = 0&lt;br /&gt;
 Status = Success&lt;br /&gt;
 Description = Show Drive Information Succeeded.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Drive Information :&lt;br /&gt;
 =================&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 EID:Slt DID State DG     Size Intf Med SED PI SeSz Model            Sp Type &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 32:0      0 Onln   0 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:1      1 Onln   0 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:2      2 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:3      3 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:4      4 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:5      5 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:6      6 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:7      7 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:8      8 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:9      9 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:10    10 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:11    11 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:12    12 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:13    13 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:14    14 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:15    15 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:16    16 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:17    17 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:18    18 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:19    19 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:20    20 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:21    21 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:22    22 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 32:23    23 Onln   1 1.090 TB SAS  HDD N   N  512B HUC101212CSS600  U  -    &lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
 &lt;br /&gt;
 EID=Enclosure Device ID|Slt=Slot No|DID=Device ID|DG=DriveGroup&lt;br /&gt;
 DHS=Dedicated Hot Spare|UGood=Unconfigured Good|GHS=Global Hotspare&lt;br /&gt;
 UBad=Unconfigured Bad|Sntze=Sanitize|Onln=Online|Offln=Offline|Intf=Interface&lt;br /&gt;
 Med=Media Type|SED=Self Encryptive Drive|PI=Protection Info&lt;br /&gt;
 SeSz=Sector Size|Sp=Spun|U=Up|D=Down|T=Transition|F=Foreign&lt;br /&gt;
 UGUnsp=UGood Unsupported|UGShld=UGood shielded|HSPShld=Hotspare shielded&lt;br /&gt;
 CFShld=Configured shielded|Cpybck=CopyBack|CBShld=Copyback Shielded&lt;br /&gt;
 UBUnsp=UBad Unsupported|Rbld=Rebuild&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Tcl/Tk&amp;diff=8719</id>
		<title>Tcl/Tk</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Tcl/Tk&amp;diff=8719"/>
		<updated>2026-03-24T13:21:01Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL7 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
Install following using &#039;&#039;yum&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 yum install tcl-devel tk-devel tix-devel expect&lt;br /&gt;
&lt;br /&gt;
Install the rest from local sources:&lt;br /&gt;
 &lt;br /&gt;
 cd /usr/local/src/itcl4.2.3&lt;br /&gt;
 #./configure&lt;br /&gt;
 #make all&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/lib/itcl4.2.3 /usr/lib64/tcl8.6/itcl4.2.3&lt;br /&gt;
 cd /usr/local/src/itk4.1.0&lt;br /&gt;
 #./configure&lt;br /&gt;
 #make&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/lib/itk4.1.0 /usr/lib64/tcl8.6/itk4.1.0&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.052&lt;br /&gt;
 #./configure --prefix=/usr --with-tcl=/usr/lib64 --with-mysql-lib=/usr/lib64/mysql&lt;br /&gt;
 #make&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/lib64/mysqltcl-3.052 /usr/lib64/tcl8.6/mysqltcl-3.052&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
Install following using &#039;&#039;yum&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 yum install tix itcl itk expect&lt;br /&gt;
&lt;br /&gt;
Install the rest from local sources:&lt;br /&gt;
 &lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.052&lt;br /&gt;
 ./configure --prefix=/usr --with-tcl=/usr/lib64 --with-mysql-lib=/usr/lib64/mysql&lt;br /&gt;
 make&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;
== General Info ==&lt;br /&gt;
&lt;br /&gt;
Basic Tcl/Tk must be installed to satisfy CODA references. Following packages were downloaded to &#039;&#039;/usr/local/downloads&#039;&#039; from the web:&lt;br /&gt;
 tcl8.4.13&lt;br /&gt;
 tk8.4.13&lt;br /&gt;
 tix-8.4.0&lt;br /&gt;
 expect-5.43&lt;br /&gt;
 blt2.4z&lt;br /&gt;
 itcl&lt;br /&gt;
 itk&lt;br /&gt;
 &amp;lt;&amp;lt;&amp;lt; DO NOT DO IT !!! tcl-dp &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
 &amp;lt;&amp;lt;&amp;lt; DO NOT DO IT !!! tcl-debug &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
 mysqltcl&lt;br /&gt;
&lt;br /&gt;
Installation instructions:&lt;br /&gt;
&lt;br /&gt;
* tcl&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tcl8.4.13/unix&lt;br /&gt;
 ./configure --prefix=/usr --enable-shared&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
* tk&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tk8.4.13/unix&lt;br /&gt;
 ./configure --prefix=/usr --enable-shared&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
* tix&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tix-8.4.0&lt;br /&gt;
&lt;br /&gt;
In file Makefile.in:&lt;br /&gt;
&lt;br /&gt;
1. Replace &#039;pkglibdir&#039; by &#039;libdir&#039; in 4 places in following fragment:&lt;br /&gt;
&lt;br /&gt;
 install-lib-binaries:&lt;br /&gt;
        @mkdir -p $(DESTDIR)$(pkglibdir)&lt;br /&gt;
        @list=&#039;$(lib_BINARIES)&#039;; for p in $$list; do \&lt;br /&gt;
          if test -f $$p; then \&lt;br /&gt;
            echo &amp;quot; $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p&amp;quot;; \&lt;br /&gt;
            $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \&lt;br /&gt;
            echo &amp;quot; $(RANLIB) $(DESTDIR)$(libdir)/$$p&amp;quot;; \&lt;br /&gt;
            $(RANLIB) $(DESTDIR)$(libdir)/$$p; \&lt;br /&gt;
            ....................................&lt;br /&gt;
&lt;br /&gt;
to enforce libTix8.4.so installation into ${exec_prefix}/lib/,&lt;br /&gt;
not into ${exec_prefix}/lib/Tix8.4/&lt;br /&gt;
&lt;br /&gt;
2. Add following fragment to enforce &#039;tixwish&#039; building:&lt;br /&gt;
&lt;br /&gt;
 WISH_OBJS = tixAppInit.o&lt;br /&gt;
 tixwish: $(WISH_OBJS) $(PKG_LIB_FILE)&lt;br /&gt;
        ${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) -L./ -lTix8.4 -ltk8.4 -ltcl8.4 \&lt;br /&gt;
                $(CC_SEARCH_FLAGS) -o tixwish&lt;br /&gt;
&lt;br /&gt;
3. Add &#039;tixwish&#039; target to the following line:&lt;br /&gt;
&lt;br /&gt;
 binaries: $(BINARIES) pkgIndex.tcl tixwish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Add &#039;tixwish&#039; line in following fragment:&lt;br /&gt;
&lt;br /&gt;
 install-binaries: binaries install-lib-binaries install-bin-binaries&lt;br /&gt;
        @mkdir -p $(DESTDIR)$(pkglibdir)&lt;br /&gt;
        $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)&lt;br /&gt;
        $(INSTALL_PROGRAM) tixwish $(DESTDIR)$(bindir)&lt;br /&gt;
        ...........................................&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/usr --enable-shared&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
 cp demos/bitmaps/about.xpm /usr/lib/Tix8.4/bitmaps/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* expect&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/expect-5.43&lt;br /&gt;
 ./configure --prefix=/usr --with-tcl=/usr/lib --with-tclinclude=/usr/local/src/tcl8.4.13/generic --enable-shared&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
* blt&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/blt2.4z&lt;br /&gt;
 ./configure \--with-tcl=/usr/local/src/tcl8.4.13/unix \&lt;br /&gt;
   --with-tk=/usr/local/src/tk8.4.13/unix \&lt;br /&gt;
   --with-tclincls=/usr/local/src/tcl8.4.13/generic \&lt;br /&gt;
   --with-tkincls=/usr/local/src/tk8.4.13/generic \&lt;br /&gt;
   --prefix=/usr&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* symbolic links&lt;br /&gt;
&lt;br /&gt;
 cd /usr/bin&lt;br /&gt;
 ln -s wish8.4 wish&lt;br /&gt;
&lt;br /&gt;
* itcl&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itcl3.3&lt;br /&gt;
 ./configure --with-tcl=/usr/local/src/tcl8.4.13/unix --prefix=/usr &lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
 #test&lt;br /&gt;
 clon10:itcl3.3&amp;gt; /usr/bin/tclsh8.4 &lt;br /&gt;
 % package require Itcl&lt;br /&gt;
 3.3&lt;br /&gt;
 % exit&lt;br /&gt;
&lt;br /&gt;
* itk&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itk3.3&lt;br /&gt;
 ./configure --with-tcl=/usr/local/src/tcl8.4.13/unix \&lt;br /&gt;
  --with-tk=/usr/local/src/tk8.4.13/unix \&lt;br /&gt;
  --with-itcl=/usr/local/src/itcl3.3 \&lt;br /&gt;
  --prefix=/usr&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
 #test&lt;br /&gt;
 clon10:src&amp;gt; /usr/bin/tclsh8.4&lt;br /&gt;
 % package require Itk&lt;br /&gt;
 3.3&lt;br /&gt;
 % exit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;&amp;lt; DO NOT DO IT !!! * tcl-dp&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tcl-dp.4.0.b2/unix&lt;br /&gt;
 ./configure --with-tcl=/usr/local/src/tcl8.4.13/unix --prefix=/usr&lt;br /&gt;
 in generic/dpInit.c:&lt;br /&gt;
   /*sergey&lt;br /&gt;
   if (TclHasSockets(interp) != TCL_OK) {&lt;br /&gt;
   return TCL_ERROR;&lt;br /&gt;
   }&lt;br /&gt;
   */&lt;br /&gt;
 gmake&lt;br /&gt;
 ###gmake tests&lt;br /&gt;
 cd ..&lt;br /&gt;
 /usr/bin/wish teki.tcl&lt;br /&gt;
 ###&#039;File | Install&#039;.  Select dp.tek, click &#039;Open&#039;, select &#039;Custom&#039;,&lt;br /&gt;
 choose &#039;Solaris&#039; (or whatever), root directory for code files &#039;/usr/lib/tcl8.4&#039;&lt;br /&gt;
 cd /usr/lib/tcl8.4/dp4.0/library/&lt;br /&gt;
 chmod 755 *&lt;br /&gt;
 All DP scripts&lt;br /&gt;
 should have &amp;quot;package require dp&amp;quot; as their first line which will&lt;br /&gt;
 automatically load the DP module if it has not been loaded already.&lt;br /&gt;
 #test&lt;br /&gt;
 /usr/bin/tclsh8.4&lt;br /&gt;
 %  package require dp&lt;br /&gt;
 4.0&lt;br /&gt;
 % exit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;&amp;lt; DO NOT DO IT !!! * tcl-debug&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tcl-debug-2.0&lt;br /&gt;
 ./configure --prefix=/usr --enable-shared --with-tcl=/usr/local/src/tcl8.4.13/unix&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
* mysqltcl&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.05&lt;br /&gt;
 ./configure --with-tcl=/usr/local/src/tcl8.4.13/unix \&lt;br /&gt;
   --with-tclinclude=/usr/local/src/tcl8.4.13/generic \&lt;br /&gt;
   --with-mysql-include=/usr/include/mysql \&lt;br /&gt;
   --with-mysql-lib=/usr/lib/mysql \&lt;br /&gt;
   --prefix=/usr&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
 #test&lt;br /&gt;
 clon10&amp;gt; /usr/bin/tclsh8.4&lt;br /&gt;
 % package require mysqltcl&lt;br /&gt;
 3.05&lt;br /&gt;
 % exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When everything is compiled on one machine of particular flavor, run following commands on other machines of the same flavor:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tcl8.4.13/unix&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/tk8.4.13/unix&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/tix-8.4.0&lt;br /&gt;
 gmake install&lt;br /&gt;
 cp demos/bitmaps/about.xpm /usr/lib/Tix8.4/bitmaps/&lt;br /&gt;
 cd /usr/local/src/expect-5.43&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/blt2.4z&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/itcl3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/itk3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.05&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/bin&lt;br /&gt;
 ln -s wish8.4 wish&lt;br /&gt;
&lt;br /&gt;
== RHEL5 ==&lt;br /&gt;
&lt;br /&gt;
Install following using &#039;&#039;yum&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 yum install tcl-devel tk-devel tix tix-devel expect expect-devel&lt;br /&gt;
&lt;br /&gt;
Install the rest from local sources:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tix-8.4.0&lt;br /&gt;
 cp demos/bitmaps/about.xpm /usr/lib/Tix8.4/bitmaps/&lt;br /&gt;
 cp tixwish /usr/bin&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/blt2.4z &lt;br /&gt;
 gmake install&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itcl3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itk3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.05&lt;br /&gt;
 gmake install&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RHEL6 ==&lt;br /&gt;
&lt;br /&gt;
Install following using &#039;&#039;yum&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 yum install tcl-devel tk-devel tix tix-devel expect expect-devel&lt;br /&gt;
&lt;br /&gt;
Install the rest from local sources:&lt;br /&gt;
&lt;br /&gt;
 ##cd /usr/local/src/tix-8.4.0&lt;br /&gt;
 ##cp demos/bitmaps/about.xpm /usr/lib64/tcl8.5/Tix8.4.3/bitmaps/&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itcl3.4&lt;br /&gt;
 gmake install&lt;br /&gt;
 ln -s /usr/lib/itcl3.4 /usr/lib64/tcl8.5/itcl3.4&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itk3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
 ln -s /usr/lib/itk3.3 /usr/lib64/tcl8.5/itk3.3&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.05&lt;br /&gt;
 gmake install&lt;br /&gt;
 ln -s /usr/lib/mysqltcl-3.05 /usr/lib64/tcl8.5/mysqltcl-3.05&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Tcl/Tk&amp;diff=8718</id>
		<title>Tcl/Tk</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Tcl/Tk&amp;diff=8718"/>
		<updated>2026-03-23T14:53:49Z</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;
Install following using &#039;&#039;yum&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 yum install tcl-devel tk-devel tix-devel expect&lt;br /&gt;
&lt;br /&gt;
Install the rest from local sources:&lt;br /&gt;
 &lt;br /&gt;
 cd /usr/local/src/itcl4.2.3&lt;br /&gt;
 #./configure&lt;br /&gt;
 #make all&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/lib/itcl4.2.3 /usr/lib64/tcl8.6/itcl4.2.3&lt;br /&gt;
 cd /usr/local/src/itk4.1.0&lt;br /&gt;
 #./configure&lt;br /&gt;
 #make&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/lib/itk4.1.0 /usr/lib64/tcl8.6/itk4.1.0&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.052&lt;br /&gt;
 #./configure --prefix=/usr --with-tcl=/usr/lib64 --with-mysql-lib=/usr/lib64/mysql&lt;br /&gt;
 #make&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/lib64/mysqltcl-3.052 /usr/lib64/tcl8.6/mysqltcl-3.052&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
Install following using &#039;&#039;yum&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 yum install tix itcl itk&lt;br /&gt;
&lt;br /&gt;
Install the rest from local sources:&lt;br /&gt;
 &lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.052&lt;br /&gt;
 ./configure --prefix=/usr --with-tcl=/usr/lib64 --with-mysql-lib=/usr/lib64/mysql&lt;br /&gt;
 make&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;
== General Info ==&lt;br /&gt;
&lt;br /&gt;
Basic Tcl/Tk must be installed to satisfy CODA references. Following packages were downloaded to &#039;&#039;/usr/local/downloads&#039;&#039; from the web:&lt;br /&gt;
 tcl8.4.13&lt;br /&gt;
 tk8.4.13&lt;br /&gt;
 tix-8.4.0&lt;br /&gt;
 expect-5.43&lt;br /&gt;
 blt2.4z&lt;br /&gt;
 itcl&lt;br /&gt;
 itk&lt;br /&gt;
 &amp;lt;&amp;lt;&amp;lt; DO NOT DO IT !!! tcl-dp &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
 &amp;lt;&amp;lt;&amp;lt; DO NOT DO IT !!! tcl-debug &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
 mysqltcl&lt;br /&gt;
&lt;br /&gt;
Installation instructions:&lt;br /&gt;
&lt;br /&gt;
* tcl&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tcl8.4.13/unix&lt;br /&gt;
 ./configure --prefix=/usr --enable-shared&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
* tk&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tk8.4.13/unix&lt;br /&gt;
 ./configure --prefix=/usr --enable-shared&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
* tix&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tix-8.4.0&lt;br /&gt;
&lt;br /&gt;
In file Makefile.in:&lt;br /&gt;
&lt;br /&gt;
1. Replace &#039;pkglibdir&#039; by &#039;libdir&#039; in 4 places in following fragment:&lt;br /&gt;
&lt;br /&gt;
 install-lib-binaries:&lt;br /&gt;
        @mkdir -p $(DESTDIR)$(pkglibdir)&lt;br /&gt;
        @list=&#039;$(lib_BINARIES)&#039;; for p in $$list; do \&lt;br /&gt;
          if test -f $$p; then \&lt;br /&gt;
            echo &amp;quot; $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p&amp;quot;; \&lt;br /&gt;
            $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \&lt;br /&gt;
            echo &amp;quot; $(RANLIB) $(DESTDIR)$(libdir)/$$p&amp;quot;; \&lt;br /&gt;
            $(RANLIB) $(DESTDIR)$(libdir)/$$p; \&lt;br /&gt;
            ....................................&lt;br /&gt;
&lt;br /&gt;
to enforce libTix8.4.so installation into ${exec_prefix}/lib/,&lt;br /&gt;
not into ${exec_prefix}/lib/Tix8.4/&lt;br /&gt;
&lt;br /&gt;
2. Add following fragment to enforce &#039;tixwish&#039; building:&lt;br /&gt;
&lt;br /&gt;
 WISH_OBJS = tixAppInit.o&lt;br /&gt;
 tixwish: $(WISH_OBJS) $(PKG_LIB_FILE)&lt;br /&gt;
        ${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) -L./ -lTix8.4 -ltk8.4 -ltcl8.4 \&lt;br /&gt;
                $(CC_SEARCH_FLAGS) -o tixwish&lt;br /&gt;
&lt;br /&gt;
3. Add &#039;tixwish&#039; target to the following line:&lt;br /&gt;
&lt;br /&gt;
 binaries: $(BINARIES) pkgIndex.tcl tixwish&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Add &#039;tixwish&#039; line in following fragment:&lt;br /&gt;
&lt;br /&gt;
 install-binaries: binaries install-lib-binaries install-bin-binaries&lt;br /&gt;
        @mkdir -p $(DESTDIR)$(pkglibdir)&lt;br /&gt;
        $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)&lt;br /&gt;
        $(INSTALL_PROGRAM) tixwish $(DESTDIR)$(bindir)&lt;br /&gt;
        ...........................................&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/usr --enable-shared&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
 cp demos/bitmaps/about.xpm /usr/lib/Tix8.4/bitmaps/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* expect&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/expect-5.43&lt;br /&gt;
 ./configure --prefix=/usr --with-tcl=/usr/lib --with-tclinclude=/usr/local/src/tcl8.4.13/generic --enable-shared&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
* blt&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/blt2.4z&lt;br /&gt;
 ./configure \--with-tcl=/usr/local/src/tcl8.4.13/unix \&lt;br /&gt;
   --with-tk=/usr/local/src/tk8.4.13/unix \&lt;br /&gt;
   --with-tclincls=/usr/local/src/tcl8.4.13/generic \&lt;br /&gt;
   --with-tkincls=/usr/local/src/tk8.4.13/generic \&lt;br /&gt;
   --prefix=/usr&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* symbolic links&lt;br /&gt;
&lt;br /&gt;
 cd /usr/bin&lt;br /&gt;
 ln -s wish8.4 wish&lt;br /&gt;
&lt;br /&gt;
* itcl&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itcl3.3&lt;br /&gt;
 ./configure --with-tcl=/usr/local/src/tcl8.4.13/unix --prefix=/usr &lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
 #test&lt;br /&gt;
 clon10:itcl3.3&amp;gt; /usr/bin/tclsh8.4 &lt;br /&gt;
 % package require Itcl&lt;br /&gt;
 3.3&lt;br /&gt;
 % exit&lt;br /&gt;
&lt;br /&gt;
* itk&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itk3.3&lt;br /&gt;
 ./configure --with-tcl=/usr/local/src/tcl8.4.13/unix \&lt;br /&gt;
  --with-tk=/usr/local/src/tk8.4.13/unix \&lt;br /&gt;
  --with-itcl=/usr/local/src/itcl3.3 \&lt;br /&gt;
  --prefix=/usr&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
 #test&lt;br /&gt;
 clon10:src&amp;gt; /usr/bin/tclsh8.4&lt;br /&gt;
 % package require Itk&lt;br /&gt;
 3.3&lt;br /&gt;
 % exit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;&amp;lt; DO NOT DO IT !!! * tcl-dp&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tcl-dp.4.0.b2/unix&lt;br /&gt;
 ./configure --with-tcl=/usr/local/src/tcl8.4.13/unix --prefix=/usr&lt;br /&gt;
 in generic/dpInit.c:&lt;br /&gt;
   /*sergey&lt;br /&gt;
   if (TclHasSockets(interp) != TCL_OK) {&lt;br /&gt;
   return TCL_ERROR;&lt;br /&gt;
   }&lt;br /&gt;
   */&lt;br /&gt;
 gmake&lt;br /&gt;
 ###gmake tests&lt;br /&gt;
 cd ..&lt;br /&gt;
 /usr/bin/wish teki.tcl&lt;br /&gt;
 ###&#039;File | Install&#039;.  Select dp.tek, click &#039;Open&#039;, select &#039;Custom&#039;,&lt;br /&gt;
 choose &#039;Solaris&#039; (or whatever), root directory for code files &#039;/usr/lib/tcl8.4&#039;&lt;br /&gt;
 cd /usr/lib/tcl8.4/dp4.0/library/&lt;br /&gt;
 chmod 755 *&lt;br /&gt;
 All DP scripts&lt;br /&gt;
 should have &amp;quot;package require dp&amp;quot; as their first line which will&lt;br /&gt;
 automatically load the DP module if it has not been loaded already.&lt;br /&gt;
 #test&lt;br /&gt;
 /usr/bin/tclsh8.4&lt;br /&gt;
 %  package require dp&lt;br /&gt;
 4.0&lt;br /&gt;
 % exit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;&amp;lt; DO NOT DO IT !!! * tcl-debug&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tcl-debug-2.0&lt;br /&gt;
 ./configure --prefix=/usr --enable-shared --with-tcl=/usr/local/src/tcl8.4.13/unix&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
&lt;br /&gt;
* mysqltcl&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.05&lt;br /&gt;
 ./configure --with-tcl=/usr/local/src/tcl8.4.13/unix \&lt;br /&gt;
   --with-tclinclude=/usr/local/src/tcl8.4.13/generic \&lt;br /&gt;
   --with-mysql-include=/usr/include/mysql \&lt;br /&gt;
   --with-mysql-lib=/usr/lib/mysql \&lt;br /&gt;
   --prefix=/usr&lt;br /&gt;
 gmake&lt;br /&gt;
 gmake install&lt;br /&gt;
 #test&lt;br /&gt;
 clon10&amp;gt; /usr/bin/tclsh8.4&lt;br /&gt;
 % package require mysqltcl&lt;br /&gt;
 3.05&lt;br /&gt;
 % exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;When everything is compiled on one machine of particular flavor, run following commands on other machines of the same flavor:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tcl8.4.13/unix&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/tk8.4.13/unix&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/tix-8.4.0&lt;br /&gt;
 gmake install&lt;br /&gt;
 cp demos/bitmaps/about.xpm /usr/lib/Tix8.4/bitmaps/&lt;br /&gt;
 cd /usr/local/src/expect-5.43&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/blt2.4z&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/itcl3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/itk3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.05&lt;br /&gt;
 gmake install&lt;br /&gt;
 cd /usr/bin&lt;br /&gt;
 ln -s wish8.4 wish&lt;br /&gt;
&lt;br /&gt;
== RHEL5 ==&lt;br /&gt;
&lt;br /&gt;
Install following using &#039;&#039;yum&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 yum install tcl-devel tk-devel tix tix-devel expect expect-devel&lt;br /&gt;
&lt;br /&gt;
Install the rest from local sources:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/tix-8.4.0&lt;br /&gt;
 cp demos/bitmaps/about.xpm /usr/lib/Tix8.4/bitmaps/&lt;br /&gt;
 cp tixwish /usr/bin&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/blt2.4z &lt;br /&gt;
 gmake install&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itcl3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itk3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.05&lt;br /&gt;
 gmake install&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RHEL6 ==&lt;br /&gt;
&lt;br /&gt;
Install following using &#039;&#039;yum&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 yum install tcl-devel tk-devel tix tix-devel expect expect-devel&lt;br /&gt;
&lt;br /&gt;
Install the rest from local sources:&lt;br /&gt;
&lt;br /&gt;
 ##cd /usr/local/src/tix-8.4.0&lt;br /&gt;
 ##cp demos/bitmaps/about.xpm /usr/lib64/tcl8.5/Tix8.4.3/bitmaps/&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itcl3.4&lt;br /&gt;
 gmake install&lt;br /&gt;
 ln -s /usr/lib/itcl3.4 /usr/lib64/tcl8.5/itcl3.4&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/itk3.3&lt;br /&gt;
 gmake install&lt;br /&gt;
 ln -s /usr/lib/itk3.3 /usr/lib64/tcl8.5/itk3.3&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src/mysqltcl-3.05&lt;br /&gt;
 gmake install&lt;br /&gt;
 ln -s /usr/lib/mysqltcl-3.05 /usr/lib64/tcl8.5/mysqltcl-3.05&lt;br /&gt;
    ./configure --prefix=/usr&lt;br /&gt;
    gmake&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Nagios&amp;diff=8717</id>
		<title>Nagios</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Nagios&amp;diff=8717"/>
		<updated>2026-03-21T13:51:24Z</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;
 yum install nagios&lt;br /&gt;
&lt;br /&gt;
 systemctl start httpd&lt;br /&gt;
 systemctl start nagios&lt;br /&gt;
&lt;br /&gt;
Config file is &#039;&#039;/etc/nagios/nagios.cfg&#039;&#039; and underlyiong directories.&lt;br /&gt;
&lt;br /&gt;
Access from web browser:&lt;br /&gt;
&lt;br /&gt;
 http://&amp;lt;machine_name&amp;gt;.jlab.org/nagios&lt;br /&gt;
 default user/pass: nagiosadmin/nagiosadmin&lt;br /&gt;
&lt;br /&gt;
== old stuff ==&lt;br /&gt;
&lt;br /&gt;
Nagios is main monitoring tool for CLON cluster.&lt;br /&gt;
&lt;br /&gt;
Download from web following files and place them to &#039;/usr/local/downloads&#039;:&lt;br /&gt;
&lt;br /&gt;
  nagios-2.6.tar.gz&lt;br /&gt;
  nagios-images_0.3.tar.gz&lt;br /&gt;
  nagios-plugins-1.4.5.tar.gz&lt;br /&gt;
  nagiosmib-1.0.0.tar.gz (?????????)&lt;br /&gt;
&lt;br /&gt;
  create user &#039;nagios&#039;, private group &#039;nagios&#039;&lt;br /&gt;
  mkdir /www/nagios2.6&lt;br /&gt;
  chown nagios.nagios /www/nagios2.6&lt;br /&gt;
&lt;br /&gt;
Add command file group and put appropriate users in (we assume that apache is running as user &#039;apache&#039;):&lt;br /&gt;
&lt;br /&gt;
  /usr/sbin/groupadd nagcmd&lt;br /&gt;
  /usr/sbin/usermod -G nagcmd apache&lt;br /&gt;
  /usr/sbin/usermod -G nagcmd nagios&lt;br /&gt;
  to check, see file /etc/group&lt;br /&gt;
&lt;br /&gt;
Build and install:&lt;br /&gt;
&lt;br /&gt;
  cp /usr/local/downloads/nagios-2.6.tar.gz /usr/local/src&lt;br /&gt;
  cd /usr/local/src&lt;br /&gt;
  gunzip nagios-2.6.tar.gz&lt;br /&gt;
  tar xvf nagios-2.6.tar&lt;br /&gt;
  cd &#039;/usr/local/src/nagios-2.6&#039;&lt;br /&gt;
                   NO !!! su nagios&lt;br /&gt;
  ./configure --prefix=/www/nagios2.6 --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd&lt;br /&gt;
      ??did on RHEL6:  ./configure --prefix=/www/nagios-3.4.1 --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagcmd --with-command-group=nagcmd&lt;br /&gt;
  make all&lt;br /&gt;
  make install&lt;br /&gt;
&lt;br /&gt;
Install init script /etc/init.d/nagios:&lt;br /&gt;
&lt;br /&gt;
  make install-init (as &#039;root&#039; !!!)&lt;br /&gt;
&lt;br /&gt;
Modify /etc/init.d/nagios script as following (bug ?):&lt;br /&gt;
&lt;br /&gt;
  ###NagiosRunFile=${prefix}/var/nagios.lock&lt;br /&gt;
  NagiosRunFile=${prefix}/var/run/nagios.pid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  #to install sample /etc directory&lt;br /&gt;
  make install-config&lt;br /&gt;
&lt;br /&gt;
  #???This installs and configures permissions on the&lt;br /&gt;
  #???directory for holding the external command file&lt;br /&gt;
  make install-commandmode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install plugins and nrpe -  see corresponding sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fix apache configuration file:&lt;br /&gt;
&lt;br /&gt;
  add contents of /usr/local/src/nagios-2.6/sample-config/httpd.conf&lt;br /&gt;
  to /www/apache2.2.3/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
Copy &#039;etc&#039; directory from old Nagios (if any) to /www/nagios2.6. Go through files cgi.cfg, nagios.cfg and private/*&lt;br /&gt;
and fix pathes making them point to /www/nagios2.6.&lt;br /&gt;
&lt;br /&gt;
Add several directories for output files:&lt;br /&gt;
&lt;br /&gt;
  mkdir /www/nagios2.6/var/log&lt;br /&gt;
  mkdir /www/nagios2.6/var/run&lt;br /&gt;
  mkdir /www/nagios2.6/var/rw (?????)&lt;br /&gt;
&lt;br /&gt;
Install icons:&lt;br /&gt;
&lt;br /&gt;
  cd /usr/local/src/nagios-images-0.3/base&lt;br /&gt;
  cp * /www/nagios2.6/share/images/logos&lt;br /&gt;
&lt;br /&gt;
To check configuration run following commands:&lt;br /&gt;
&lt;br /&gt;
  /www/nagios2.6/bin/nagios -v /www/nagios2.6/etc/nagios.cfg&lt;br /&gt;
&lt;br /&gt;
To start/stop (restart need to be fixed ..):&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/nagios start/stop&lt;br /&gt;
&lt;br /&gt;
Add Nagios to services:&lt;br /&gt;
&lt;br /&gt;
  chkconfig --add nagios&lt;br /&gt;
  chkconfig --level 3 nagios off&lt;br /&gt;
  chkconfig --level 4 nagios off&lt;br /&gt;
  chkconfig --list nagios&lt;br /&gt;
&lt;br /&gt;
NOTE: following command was executed to let browser to disable host checks; it should be investigated ...&lt;br /&gt;
&lt;br /&gt;
  chown nagios:nagcmd /www/nagios2.6/var/log/nagios.cmd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ADDITIONAL INFO (COPIED FROM http://klickitat.ee.washington.edu/medg/software/nagios-install-notes.txt):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
some notes on installing nagios - these are a supplement to the basic&lt;br /&gt;
nagios documentation that comes with the software:&lt;br /&gt;
&lt;br /&gt;
Download and install the nagios and nagios-plugin packages. For whatever reason&lt;br /&gt;
www.nagios.org seems to be hosed now (7/23/2004), but look on google. There&lt;br /&gt;
is also sourceforge.nagios.net, which seems to be another nagios homepage.&lt;br /&gt;
&lt;br /&gt;
Create a nagios user.  Compile and install the packages as described in the &lt;br /&gt;
documentation.  Redhat&lt;br /&gt;
has all necessary libraries already installed.  I just went with the defaults&lt;br /&gt;
in the compilation.  The default is for nagios to install itself in &lt;br /&gt;
/usr/local/nagios; everything should be owned by user nagios. &lt;br /&gt;
&lt;br /&gt;
To enable the web interface, edit httpd.conf to add the Alias and &lt;br /&gt;
ScriptAlias directives as &lt;br /&gt;
described in the nagios documentation.  This works for both apache 1.3 and&lt;br /&gt;
apache 2.0.  Restart apache.  At this point you should be able to go to &lt;br /&gt;
http://www.whatever/nagios/ and see the nagios page and access the&lt;br /&gt;
documentation.  CGIs probably won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
You need to set up the config files; this is the real heart of installing &lt;br /&gt;
nagios and unfortunately is much easier to show than to describe.  The first&lt;br /&gt;
step is to copy the *.cfg-sample files that should be in /usr/local/nagios/etc&lt;br /&gt;
to *.cfg.  Then you need to edit these files to describe your setup.&lt;br /&gt;
&lt;br /&gt;
Basically, hosts.cfg describes the hosts you want to monitor, services.cfg &lt;br /&gt;
describes the services you want to monitor on each host, checkcommands.cfg&lt;br /&gt;
is the check commands used by services.cfg to check the services; if you want&lt;br /&gt;
to check a service you probably have to add a command to do so; contacts.cfg&lt;br /&gt;
is the people who will be contacted in case of a problem, contactgroups&lt;br /&gt;
is the groups of people, hostgroups.cfg is the groups of hosts (rrsl-machines,&lt;br /&gt;
for example).  nagios.cfg is the master config file.  Probably you can get&lt;br /&gt;
by just by copying and pasting the stuff already in these files and tweaking&lt;br /&gt;
it.&lt;br /&gt;
&lt;br /&gt;
To add a new machine you will need to edit hosts.cfg (add the machine),&lt;br /&gt;
hostgroups.cfg (put it in a hostgroup), services.cfg (add the services to&lt;br /&gt;
be checked on the machine).&lt;br /&gt;
&lt;br /&gt;
To add a new administrator, you will need to edit contacts.cfg (add the new &lt;br /&gt;
person) and contactgroups.cfg (put them in a contact group or create one).&lt;br /&gt;
&lt;br /&gt;
In misccommands.cfg I needed to change /usr/bin/mail to /bin/mail on redhat&lt;br /&gt;
-- but not on slackware!  Otherwise it was not able to mail messages.&lt;br /&gt;
&lt;br /&gt;
At this point you can check your config using the &lt;br /&gt;
&#039;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&#039; command,&lt;br /&gt;
which does a check of the configuration and will warn if there are errors.&lt;br /&gt;
Fix the errors and repeat until it is happy.&lt;br /&gt;
&lt;br /&gt;
Now you need to enable authorization so that the cgi scripts will work.  To&lt;br /&gt;
do this first create the &lt;br /&gt;
.htaccess file in the nagios/sbin directory as described in the &lt;br /&gt;
documentation - it must be world-readable.&lt;br /&gt;
&lt;br /&gt;
Next create the htpasswd.users file in the nagios/etc directory as described in&lt;br /&gt;
the documentation - it must be world-readable!  I added only one user: rrsl&lt;br /&gt;
&lt;br /&gt;
At this point you should be able to start nagios using:&lt;br /&gt;
/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg&lt;br /&gt;
&lt;br /&gt;
After nagios is started you should be able to go to the web page and &lt;br /&gt;
use the cgis to display info.  The final step is enabling the external command&lt;br /&gt;
cgis, which let you change the behavior of nagios from the web.  To do this&lt;br /&gt;
you have to follow the steps in the documentation to enable external commands&lt;br /&gt;
This involves enabling external commands in the config file and specifying&lt;br /&gt;
an external commands file....&lt;br /&gt;
&lt;br /&gt;
The permissions on the file seem to be a source of problems.&lt;br /&gt;
To enable external commands you have to first create a group containing &lt;br /&gt;
the nagios user and the user httpd runs as (apache for us).  Then you create&lt;br /&gt;
the directory /usr/local/nagios/var/rw with permissions:&lt;br /&gt;
drwxrwsr-x    2 nagios   nagioscmd     4096 Aug  3 13:55 rw&lt;br /&gt;
&lt;br /&gt;
That&#039;s rwx permissions for the user and rws permissions for the group&lt;br /&gt;
chmod gu+rwx nagios.nagioscmd rw&lt;br /&gt;
chmod g+s rw&lt;br /&gt;
Then you have to restart both apache and nagios, or it doesn&#039;t work!&lt;br /&gt;
&lt;br /&gt;
The documentation describes some other gotchas..&lt;br /&gt;
&lt;br /&gt;
To run checks for services on remote machines, you need to set up ssh to&lt;br /&gt;
log in without a password.  To do this run &lt;br /&gt;
$ ssh-keygen -t rsa&lt;br /&gt;
to create a public/private key pair.  copy the public key into the &lt;br /&gt;
~/.ssh/authorized_keys file of the user nagios on the remote host.  This file&lt;br /&gt;
must only be rw by nagios or ssh will not work.  The directory .ssh must also&lt;br /&gt;
be only rwx by nagios.  Then you should be able &lt;br /&gt;
to ssh to the remote host as nagios without giving a password.&lt;br /&gt;
&lt;br /&gt;
Copy the plugins you want to run on the remote host to the remote host, &lt;br /&gt;
and then set up checks in checkcommands.cfg, and services.cfg.  See the &lt;br /&gt;
check-host-radar command for an example.  The plugins can be any kind of&lt;br /&gt;
program.&lt;br /&gt;
&lt;br /&gt;
Many plugins were timing out after ten seconds when checking on heimdal and&lt;br /&gt;
umtanum.  Although there claimed to be a command line option to change this,&lt;br /&gt;
in practice there was not.  Therefore, I changed the source to set the timeout&lt;br /&gt;
to 30sec and recompiled the plugins.  This appears to work. (7/26/04)&lt;br /&gt;
&lt;br /&gt;
nagios comes with the file /etc/rc.d/init.d/nagios, which is a script for&lt;br /&gt;
starting nagios from rc.local or from the command line as root (or by&lt;br /&gt;
sudo).  This seems to be the best way of starting or stopping the program.&lt;br /&gt;
&lt;br /&gt;
sudo /etc/rc.d/init.d/nagios start&lt;br /&gt;
sudo /etc/rc.d/init.d/nagios stop&lt;br /&gt;
etc.&lt;br /&gt;
&lt;br /&gt;
nagios has the ability to acknowledge a host condition, so if a host&lt;br /&gt;
is down, you can &amp;quot;acknowledge&amp;quot; through the web interface, and it will&lt;br /&gt;
stop sending email unless the host changes state.  This is useful.&lt;br /&gt;
You can also disable notification for a service, which is handy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Adding a user to the web interface:&lt;br /&gt;
&lt;br /&gt;
 1) edit cgi.cfg to add the user to the actions that you want them to do&lt;br /&gt;
 2) edit sbin/.htaccess to add the user to the list of ok users, eg:&lt;br /&gt;
    require user rrsl radar&lt;br /&gt;
    for users rrsl and radar being able to access the web interface&lt;br /&gt;
    Keep in mind this file must be world readable...&lt;br /&gt;
 3) issue htpasswd /usr/local/nagios/etc/htpasswd.users &amp;lt;new user&amp;gt; as root, to&lt;br /&gt;
    create the new user and password&lt;br /&gt;
 4) stop nagios&lt;br /&gt;
 5) restart the web server&lt;br /&gt;
 6  start nagios&lt;br /&gt;
&lt;br /&gt;
It should work, you should be able to log in and do stuff.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Nagios&amp;diff=8716</id>
		<title>Nagios</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Nagios&amp;diff=8716"/>
		<updated>2026-03-21T13:42:45Z</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;
 yum install nagios&lt;br /&gt;
&lt;br /&gt;
 systemctl start httpd&lt;br /&gt;
 systemctl start nagios&lt;br /&gt;
&lt;br /&gt;
Config file is &#039;&#039;/etc/nagios/nagios.cfg&#039;&#039; and underlyiong directories.&lt;br /&gt;
&lt;br /&gt;
== old stuff ==&lt;br /&gt;
&lt;br /&gt;
Nagios is main monitoring tool for CLON cluster.&lt;br /&gt;
&lt;br /&gt;
Download from web following files and place them to &#039;/usr/local/downloads&#039;:&lt;br /&gt;
&lt;br /&gt;
  nagios-2.6.tar.gz&lt;br /&gt;
  nagios-images_0.3.tar.gz&lt;br /&gt;
  nagios-plugins-1.4.5.tar.gz&lt;br /&gt;
  nagiosmib-1.0.0.tar.gz (?????????)&lt;br /&gt;
&lt;br /&gt;
  create user &#039;nagios&#039;, private group &#039;nagios&#039;&lt;br /&gt;
  mkdir /www/nagios2.6&lt;br /&gt;
  chown nagios.nagios /www/nagios2.6&lt;br /&gt;
&lt;br /&gt;
Add command file group and put appropriate users in (we assume that apache is running as user &#039;apache&#039;):&lt;br /&gt;
&lt;br /&gt;
  /usr/sbin/groupadd nagcmd&lt;br /&gt;
  /usr/sbin/usermod -G nagcmd apache&lt;br /&gt;
  /usr/sbin/usermod -G nagcmd nagios&lt;br /&gt;
  to check, see file /etc/group&lt;br /&gt;
&lt;br /&gt;
Build and install:&lt;br /&gt;
&lt;br /&gt;
  cp /usr/local/downloads/nagios-2.6.tar.gz /usr/local/src&lt;br /&gt;
  cd /usr/local/src&lt;br /&gt;
  gunzip nagios-2.6.tar.gz&lt;br /&gt;
  tar xvf nagios-2.6.tar&lt;br /&gt;
  cd &#039;/usr/local/src/nagios-2.6&#039;&lt;br /&gt;
                   NO !!! su nagios&lt;br /&gt;
  ./configure --prefix=/www/nagios2.6 --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd&lt;br /&gt;
      ??did on RHEL6:  ./configure --prefix=/www/nagios-3.4.1 --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagcmd --with-command-group=nagcmd&lt;br /&gt;
  make all&lt;br /&gt;
  make install&lt;br /&gt;
&lt;br /&gt;
Install init script /etc/init.d/nagios:&lt;br /&gt;
&lt;br /&gt;
  make install-init (as &#039;root&#039; !!!)&lt;br /&gt;
&lt;br /&gt;
Modify /etc/init.d/nagios script as following (bug ?):&lt;br /&gt;
&lt;br /&gt;
  ###NagiosRunFile=${prefix}/var/nagios.lock&lt;br /&gt;
  NagiosRunFile=${prefix}/var/run/nagios.pid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  #to install sample /etc directory&lt;br /&gt;
  make install-config&lt;br /&gt;
&lt;br /&gt;
  #???This installs and configures permissions on the&lt;br /&gt;
  #???directory for holding the external command file&lt;br /&gt;
  make install-commandmode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install plugins and nrpe -  see corresponding sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fix apache configuration file:&lt;br /&gt;
&lt;br /&gt;
  add contents of /usr/local/src/nagios-2.6/sample-config/httpd.conf&lt;br /&gt;
  to /www/apache2.2.3/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
Copy &#039;etc&#039; directory from old Nagios (if any) to /www/nagios2.6. Go through files cgi.cfg, nagios.cfg and private/*&lt;br /&gt;
and fix pathes making them point to /www/nagios2.6.&lt;br /&gt;
&lt;br /&gt;
Add several directories for output files:&lt;br /&gt;
&lt;br /&gt;
  mkdir /www/nagios2.6/var/log&lt;br /&gt;
  mkdir /www/nagios2.6/var/run&lt;br /&gt;
  mkdir /www/nagios2.6/var/rw (?????)&lt;br /&gt;
&lt;br /&gt;
Install icons:&lt;br /&gt;
&lt;br /&gt;
  cd /usr/local/src/nagios-images-0.3/base&lt;br /&gt;
  cp * /www/nagios2.6/share/images/logos&lt;br /&gt;
&lt;br /&gt;
To check configuration run following commands:&lt;br /&gt;
&lt;br /&gt;
  /www/nagios2.6/bin/nagios -v /www/nagios2.6/etc/nagios.cfg&lt;br /&gt;
&lt;br /&gt;
To start/stop (restart need to be fixed ..):&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/nagios start/stop&lt;br /&gt;
&lt;br /&gt;
Add Nagios to services:&lt;br /&gt;
&lt;br /&gt;
  chkconfig --add nagios&lt;br /&gt;
  chkconfig --level 3 nagios off&lt;br /&gt;
  chkconfig --level 4 nagios off&lt;br /&gt;
  chkconfig --list nagios&lt;br /&gt;
&lt;br /&gt;
NOTE: following command was executed to let browser to disable host checks; it should be investigated ...&lt;br /&gt;
&lt;br /&gt;
  chown nagios:nagcmd /www/nagios2.6/var/log/nagios.cmd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ADDITIONAL INFO (COPIED FROM http://klickitat.ee.washington.edu/medg/software/nagios-install-notes.txt):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
some notes on installing nagios - these are a supplement to the basic&lt;br /&gt;
nagios documentation that comes with the software:&lt;br /&gt;
&lt;br /&gt;
Download and install the nagios and nagios-plugin packages. For whatever reason&lt;br /&gt;
www.nagios.org seems to be hosed now (7/23/2004), but look on google. There&lt;br /&gt;
is also sourceforge.nagios.net, which seems to be another nagios homepage.&lt;br /&gt;
&lt;br /&gt;
Create a nagios user.  Compile and install the packages as described in the &lt;br /&gt;
documentation.  Redhat&lt;br /&gt;
has all necessary libraries already installed.  I just went with the defaults&lt;br /&gt;
in the compilation.  The default is for nagios to install itself in &lt;br /&gt;
/usr/local/nagios; everything should be owned by user nagios. &lt;br /&gt;
&lt;br /&gt;
To enable the web interface, edit httpd.conf to add the Alias and &lt;br /&gt;
ScriptAlias directives as &lt;br /&gt;
described in the nagios documentation.  This works for both apache 1.3 and&lt;br /&gt;
apache 2.0.  Restart apache.  At this point you should be able to go to &lt;br /&gt;
http://www.whatever/nagios/ and see the nagios page and access the&lt;br /&gt;
documentation.  CGIs probably won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
You need to set up the config files; this is the real heart of installing &lt;br /&gt;
nagios and unfortunately is much easier to show than to describe.  The first&lt;br /&gt;
step is to copy the *.cfg-sample files that should be in /usr/local/nagios/etc&lt;br /&gt;
to *.cfg.  Then you need to edit these files to describe your setup.&lt;br /&gt;
&lt;br /&gt;
Basically, hosts.cfg describes the hosts you want to monitor, services.cfg &lt;br /&gt;
describes the services you want to monitor on each host, checkcommands.cfg&lt;br /&gt;
is the check commands used by services.cfg to check the services; if you want&lt;br /&gt;
to check a service you probably have to add a command to do so; contacts.cfg&lt;br /&gt;
is the people who will be contacted in case of a problem, contactgroups&lt;br /&gt;
is the groups of people, hostgroups.cfg is the groups of hosts (rrsl-machines,&lt;br /&gt;
for example).  nagios.cfg is the master config file.  Probably you can get&lt;br /&gt;
by just by copying and pasting the stuff already in these files and tweaking&lt;br /&gt;
it.&lt;br /&gt;
&lt;br /&gt;
To add a new machine you will need to edit hosts.cfg (add the machine),&lt;br /&gt;
hostgroups.cfg (put it in a hostgroup), services.cfg (add the services to&lt;br /&gt;
be checked on the machine).&lt;br /&gt;
&lt;br /&gt;
To add a new administrator, you will need to edit contacts.cfg (add the new &lt;br /&gt;
person) and contactgroups.cfg (put them in a contact group or create one).&lt;br /&gt;
&lt;br /&gt;
In misccommands.cfg I needed to change /usr/bin/mail to /bin/mail on redhat&lt;br /&gt;
-- but not on slackware!  Otherwise it was not able to mail messages.&lt;br /&gt;
&lt;br /&gt;
At this point you can check your config using the &lt;br /&gt;
&#039;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&#039; command,&lt;br /&gt;
which does a check of the configuration and will warn if there are errors.&lt;br /&gt;
Fix the errors and repeat until it is happy.&lt;br /&gt;
&lt;br /&gt;
Now you need to enable authorization so that the cgi scripts will work.  To&lt;br /&gt;
do this first create the &lt;br /&gt;
.htaccess file in the nagios/sbin directory as described in the &lt;br /&gt;
documentation - it must be world-readable.&lt;br /&gt;
&lt;br /&gt;
Next create the htpasswd.users file in the nagios/etc directory as described in&lt;br /&gt;
the documentation - it must be world-readable!  I added only one user: rrsl&lt;br /&gt;
&lt;br /&gt;
At this point you should be able to start nagios using:&lt;br /&gt;
/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg&lt;br /&gt;
&lt;br /&gt;
After nagios is started you should be able to go to the web page and &lt;br /&gt;
use the cgis to display info.  The final step is enabling the external command&lt;br /&gt;
cgis, which let you change the behavior of nagios from the web.  To do this&lt;br /&gt;
you have to follow the steps in the documentation to enable external commands&lt;br /&gt;
This involves enabling external commands in the config file and specifying&lt;br /&gt;
an external commands file....&lt;br /&gt;
&lt;br /&gt;
The permissions on the file seem to be a source of problems.&lt;br /&gt;
To enable external commands you have to first create a group containing &lt;br /&gt;
the nagios user and the user httpd runs as (apache for us).  Then you create&lt;br /&gt;
the directory /usr/local/nagios/var/rw with permissions:&lt;br /&gt;
drwxrwsr-x    2 nagios   nagioscmd     4096 Aug  3 13:55 rw&lt;br /&gt;
&lt;br /&gt;
That&#039;s rwx permissions for the user and rws permissions for the group&lt;br /&gt;
chmod gu+rwx nagios.nagioscmd rw&lt;br /&gt;
chmod g+s rw&lt;br /&gt;
Then you have to restart both apache and nagios, or it doesn&#039;t work!&lt;br /&gt;
&lt;br /&gt;
The documentation describes some other gotchas..&lt;br /&gt;
&lt;br /&gt;
To run checks for services on remote machines, you need to set up ssh to&lt;br /&gt;
log in without a password.  To do this run &lt;br /&gt;
$ ssh-keygen -t rsa&lt;br /&gt;
to create a public/private key pair.  copy the public key into the &lt;br /&gt;
~/.ssh/authorized_keys file of the user nagios on the remote host.  This file&lt;br /&gt;
must only be rw by nagios or ssh will not work.  The directory .ssh must also&lt;br /&gt;
be only rwx by nagios.  Then you should be able &lt;br /&gt;
to ssh to the remote host as nagios without giving a password.&lt;br /&gt;
&lt;br /&gt;
Copy the plugins you want to run on the remote host to the remote host, &lt;br /&gt;
and then set up checks in checkcommands.cfg, and services.cfg.  See the &lt;br /&gt;
check-host-radar command for an example.  The plugins can be any kind of&lt;br /&gt;
program.&lt;br /&gt;
&lt;br /&gt;
Many plugins were timing out after ten seconds when checking on heimdal and&lt;br /&gt;
umtanum.  Although there claimed to be a command line option to change this,&lt;br /&gt;
in practice there was not.  Therefore, I changed the source to set the timeout&lt;br /&gt;
to 30sec and recompiled the plugins.  This appears to work. (7/26/04)&lt;br /&gt;
&lt;br /&gt;
nagios comes with the file /etc/rc.d/init.d/nagios, which is a script for&lt;br /&gt;
starting nagios from rc.local or from the command line as root (or by&lt;br /&gt;
sudo).  This seems to be the best way of starting or stopping the program.&lt;br /&gt;
&lt;br /&gt;
sudo /etc/rc.d/init.d/nagios start&lt;br /&gt;
sudo /etc/rc.d/init.d/nagios stop&lt;br /&gt;
etc.&lt;br /&gt;
&lt;br /&gt;
nagios has the ability to acknowledge a host condition, so if a host&lt;br /&gt;
is down, you can &amp;quot;acknowledge&amp;quot; through the web interface, and it will&lt;br /&gt;
stop sending email unless the host changes state.  This is useful.&lt;br /&gt;
You can also disable notification for a service, which is handy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Adding a user to the web interface:&lt;br /&gt;
&lt;br /&gt;
 1) edit cgi.cfg to add the user to the actions that you want them to do&lt;br /&gt;
 2) edit sbin/.htaccess to add the user to the list of ok users, eg:&lt;br /&gt;
    require user rrsl radar&lt;br /&gt;
    for users rrsl and radar being able to access the web interface&lt;br /&gt;
    Keep in mind this file must be world readable...&lt;br /&gt;
 3) issue htpasswd /usr/local/nagios/etc/htpasswd.users &amp;lt;new user&amp;gt; as root, to&lt;br /&gt;
    create the new user and password&lt;br /&gt;
 4) stop nagios&lt;br /&gt;
 5) restart the web server&lt;br /&gt;
 6  start nagios&lt;br /&gt;
&lt;br /&gt;
It should work, you should be able to log in and do stuff.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Nagios&amp;diff=8715</id>
		<title>Nagios</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Nagios&amp;diff=8715"/>
		<updated>2026-03-21T13:39:33Z</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;
 yum install nagios&lt;br /&gt;
&lt;br /&gt;
 systemctl start httpd&lt;br /&gt;
 systemctl start nagios&lt;br /&gt;
&lt;br /&gt;
== old stuff ==&lt;br /&gt;
&lt;br /&gt;
Nagios is main monitoring tool for CLON cluster.&lt;br /&gt;
&lt;br /&gt;
Download from web following files and place them to &#039;/usr/local/downloads&#039;:&lt;br /&gt;
&lt;br /&gt;
  nagios-2.6.tar.gz&lt;br /&gt;
  nagios-images_0.3.tar.gz&lt;br /&gt;
  nagios-plugins-1.4.5.tar.gz&lt;br /&gt;
  nagiosmib-1.0.0.tar.gz (?????????)&lt;br /&gt;
&lt;br /&gt;
  create user &#039;nagios&#039;, private group &#039;nagios&#039;&lt;br /&gt;
  mkdir /www/nagios2.6&lt;br /&gt;
  chown nagios.nagios /www/nagios2.6&lt;br /&gt;
&lt;br /&gt;
Add command file group and put appropriate users in (we assume that apache is running as user &#039;apache&#039;):&lt;br /&gt;
&lt;br /&gt;
  /usr/sbin/groupadd nagcmd&lt;br /&gt;
  /usr/sbin/usermod -G nagcmd apache&lt;br /&gt;
  /usr/sbin/usermod -G nagcmd nagios&lt;br /&gt;
  to check, see file /etc/group&lt;br /&gt;
&lt;br /&gt;
Build and install:&lt;br /&gt;
&lt;br /&gt;
  cp /usr/local/downloads/nagios-2.6.tar.gz /usr/local/src&lt;br /&gt;
  cd /usr/local/src&lt;br /&gt;
  gunzip nagios-2.6.tar.gz&lt;br /&gt;
  tar xvf nagios-2.6.tar&lt;br /&gt;
  cd &#039;/usr/local/src/nagios-2.6&#039;&lt;br /&gt;
                   NO !!! su nagios&lt;br /&gt;
  ./configure --prefix=/www/nagios2.6 --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd&lt;br /&gt;
      ??did on RHEL6:  ./configure --prefix=/www/nagios-3.4.1 --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagcmd --with-command-group=nagcmd&lt;br /&gt;
  make all&lt;br /&gt;
  make install&lt;br /&gt;
&lt;br /&gt;
Install init script /etc/init.d/nagios:&lt;br /&gt;
&lt;br /&gt;
  make install-init (as &#039;root&#039; !!!)&lt;br /&gt;
&lt;br /&gt;
Modify /etc/init.d/nagios script as following (bug ?):&lt;br /&gt;
&lt;br /&gt;
  ###NagiosRunFile=${prefix}/var/nagios.lock&lt;br /&gt;
  NagiosRunFile=${prefix}/var/run/nagios.pid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  #to install sample /etc directory&lt;br /&gt;
  make install-config&lt;br /&gt;
&lt;br /&gt;
  #???This installs and configures permissions on the&lt;br /&gt;
  #???directory for holding the external command file&lt;br /&gt;
  make install-commandmode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install plugins and nrpe -  see corresponding sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fix apache configuration file:&lt;br /&gt;
&lt;br /&gt;
  add contents of /usr/local/src/nagios-2.6/sample-config/httpd.conf&lt;br /&gt;
  to /www/apache2.2.3/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
Copy &#039;etc&#039; directory from old Nagios (if any) to /www/nagios2.6. Go through files cgi.cfg, nagios.cfg and private/*&lt;br /&gt;
and fix pathes making them point to /www/nagios2.6.&lt;br /&gt;
&lt;br /&gt;
Add several directories for output files:&lt;br /&gt;
&lt;br /&gt;
  mkdir /www/nagios2.6/var/log&lt;br /&gt;
  mkdir /www/nagios2.6/var/run&lt;br /&gt;
  mkdir /www/nagios2.6/var/rw (?????)&lt;br /&gt;
&lt;br /&gt;
Install icons:&lt;br /&gt;
&lt;br /&gt;
  cd /usr/local/src/nagios-images-0.3/base&lt;br /&gt;
  cp * /www/nagios2.6/share/images/logos&lt;br /&gt;
&lt;br /&gt;
To check configuration run following commands:&lt;br /&gt;
&lt;br /&gt;
  /www/nagios2.6/bin/nagios -v /www/nagios2.6/etc/nagios.cfg&lt;br /&gt;
&lt;br /&gt;
To start/stop (restart need to be fixed ..):&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/nagios start/stop&lt;br /&gt;
&lt;br /&gt;
Add Nagios to services:&lt;br /&gt;
&lt;br /&gt;
  chkconfig --add nagios&lt;br /&gt;
  chkconfig --level 3 nagios off&lt;br /&gt;
  chkconfig --level 4 nagios off&lt;br /&gt;
  chkconfig --list nagios&lt;br /&gt;
&lt;br /&gt;
NOTE: following command was executed to let browser to disable host checks; it should be investigated ...&lt;br /&gt;
&lt;br /&gt;
  chown nagios:nagcmd /www/nagios2.6/var/log/nagios.cmd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ADDITIONAL INFO (COPIED FROM http://klickitat.ee.washington.edu/medg/software/nagios-install-notes.txt):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
some notes on installing nagios - these are a supplement to the basic&lt;br /&gt;
nagios documentation that comes with the software:&lt;br /&gt;
&lt;br /&gt;
Download and install the nagios and nagios-plugin packages. For whatever reason&lt;br /&gt;
www.nagios.org seems to be hosed now (7/23/2004), but look on google. There&lt;br /&gt;
is also sourceforge.nagios.net, which seems to be another nagios homepage.&lt;br /&gt;
&lt;br /&gt;
Create a nagios user.  Compile and install the packages as described in the &lt;br /&gt;
documentation.  Redhat&lt;br /&gt;
has all necessary libraries already installed.  I just went with the defaults&lt;br /&gt;
in the compilation.  The default is for nagios to install itself in &lt;br /&gt;
/usr/local/nagios; everything should be owned by user nagios. &lt;br /&gt;
&lt;br /&gt;
To enable the web interface, edit httpd.conf to add the Alias and &lt;br /&gt;
ScriptAlias directives as &lt;br /&gt;
described in the nagios documentation.  This works for both apache 1.3 and&lt;br /&gt;
apache 2.0.  Restart apache.  At this point you should be able to go to &lt;br /&gt;
http://www.whatever/nagios/ and see the nagios page and access the&lt;br /&gt;
documentation.  CGIs probably won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
You need to set up the config files; this is the real heart of installing &lt;br /&gt;
nagios and unfortunately is much easier to show than to describe.  The first&lt;br /&gt;
step is to copy the *.cfg-sample files that should be in /usr/local/nagios/etc&lt;br /&gt;
to *.cfg.  Then you need to edit these files to describe your setup.&lt;br /&gt;
&lt;br /&gt;
Basically, hosts.cfg describes the hosts you want to monitor, services.cfg &lt;br /&gt;
describes the services you want to monitor on each host, checkcommands.cfg&lt;br /&gt;
is the check commands used by services.cfg to check the services; if you want&lt;br /&gt;
to check a service you probably have to add a command to do so; contacts.cfg&lt;br /&gt;
is the people who will be contacted in case of a problem, contactgroups&lt;br /&gt;
is the groups of people, hostgroups.cfg is the groups of hosts (rrsl-machines,&lt;br /&gt;
for example).  nagios.cfg is the master config file.  Probably you can get&lt;br /&gt;
by just by copying and pasting the stuff already in these files and tweaking&lt;br /&gt;
it.&lt;br /&gt;
&lt;br /&gt;
To add a new machine you will need to edit hosts.cfg (add the machine),&lt;br /&gt;
hostgroups.cfg (put it in a hostgroup), services.cfg (add the services to&lt;br /&gt;
be checked on the machine).&lt;br /&gt;
&lt;br /&gt;
To add a new administrator, you will need to edit contacts.cfg (add the new &lt;br /&gt;
person) and contactgroups.cfg (put them in a contact group or create one).&lt;br /&gt;
&lt;br /&gt;
In misccommands.cfg I needed to change /usr/bin/mail to /bin/mail on redhat&lt;br /&gt;
-- but not on slackware!  Otherwise it was not able to mail messages.&lt;br /&gt;
&lt;br /&gt;
At this point you can check your config using the &lt;br /&gt;
&#039;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&#039; command,&lt;br /&gt;
which does a check of the configuration and will warn if there are errors.&lt;br /&gt;
Fix the errors and repeat until it is happy.&lt;br /&gt;
&lt;br /&gt;
Now you need to enable authorization so that the cgi scripts will work.  To&lt;br /&gt;
do this first create the &lt;br /&gt;
.htaccess file in the nagios/sbin directory as described in the &lt;br /&gt;
documentation - it must be world-readable.&lt;br /&gt;
&lt;br /&gt;
Next create the htpasswd.users file in the nagios/etc directory as described in&lt;br /&gt;
the documentation - it must be world-readable!  I added only one user: rrsl&lt;br /&gt;
&lt;br /&gt;
At this point you should be able to start nagios using:&lt;br /&gt;
/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg&lt;br /&gt;
&lt;br /&gt;
After nagios is started you should be able to go to the web page and &lt;br /&gt;
use the cgis to display info.  The final step is enabling the external command&lt;br /&gt;
cgis, which let you change the behavior of nagios from the web.  To do this&lt;br /&gt;
you have to follow the steps in the documentation to enable external commands&lt;br /&gt;
This involves enabling external commands in the config file and specifying&lt;br /&gt;
an external commands file....&lt;br /&gt;
&lt;br /&gt;
The permissions on the file seem to be a source of problems.&lt;br /&gt;
To enable external commands you have to first create a group containing &lt;br /&gt;
the nagios user and the user httpd runs as (apache for us).  Then you create&lt;br /&gt;
the directory /usr/local/nagios/var/rw with permissions:&lt;br /&gt;
drwxrwsr-x    2 nagios   nagioscmd     4096 Aug  3 13:55 rw&lt;br /&gt;
&lt;br /&gt;
That&#039;s rwx permissions for the user and rws permissions for the group&lt;br /&gt;
chmod gu+rwx nagios.nagioscmd rw&lt;br /&gt;
chmod g+s rw&lt;br /&gt;
Then you have to restart both apache and nagios, or it doesn&#039;t work!&lt;br /&gt;
&lt;br /&gt;
The documentation describes some other gotchas..&lt;br /&gt;
&lt;br /&gt;
To run checks for services on remote machines, you need to set up ssh to&lt;br /&gt;
log in without a password.  To do this run &lt;br /&gt;
$ ssh-keygen -t rsa&lt;br /&gt;
to create a public/private key pair.  copy the public key into the &lt;br /&gt;
~/.ssh/authorized_keys file of the user nagios on the remote host.  This file&lt;br /&gt;
must only be rw by nagios or ssh will not work.  The directory .ssh must also&lt;br /&gt;
be only rwx by nagios.  Then you should be able &lt;br /&gt;
to ssh to the remote host as nagios without giving a password.&lt;br /&gt;
&lt;br /&gt;
Copy the plugins you want to run on the remote host to the remote host, &lt;br /&gt;
and then set up checks in checkcommands.cfg, and services.cfg.  See the &lt;br /&gt;
check-host-radar command for an example.  The plugins can be any kind of&lt;br /&gt;
program.&lt;br /&gt;
&lt;br /&gt;
Many plugins were timing out after ten seconds when checking on heimdal and&lt;br /&gt;
umtanum.  Although there claimed to be a command line option to change this,&lt;br /&gt;
in practice there was not.  Therefore, I changed the source to set the timeout&lt;br /&gt;
to 30sec and recompiled the plugins.  This appears to work. (7/26/04)&lt;br /&gt;
&lt;br /&gt;
nagios comes with the file /etc/rc.d/init.d/nagios, which is a script for&lt;br /&gt;
starting nagios from rc.local or from the command line as root (or by&lt;br /&gt;
sudo).  This seems to be the best way of starting or stopping the program.&lt;br /&gt;
&lt;br /&gt;
sudo /etc/rc.d/init.d/nagios start&lt;br /&gt;
sudo /etc/rc.d/init.d/nagios stop&lt;br /&gt;
etc.&lt;br /&gt;
&lt;br /&gt;
nagios has the ability to acknowledge a host condition, so if a host&lt;br /&gt;
is down, you can &amp;quot;acknowledge&amp;quot; through the web interface, and it will&lt;br /&gt;
stop sending email unless the host changes state.  This is useful.&lt;br /&gt;
You can also disable notification for a service, which is handy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Adding a user to the web interface:&lt;br /&gt;
&lt;br /&gt;
 1) edit cgi.cfg to add the user to the actions that you want them to do&lt;br /&gt;
 2) edit sbin/.htaccess to add the user to the list of ok users, eg:&lt;br /&gt;
    require user rrsl radar&lt;br /&gt;
    for users rrsl and radar being able to access the web interface&lt;br /&gt;
    Keep in mind this file must be world readable...&lt;br /&gt;
 3) issue htpasswd /usr/local/nagios/etc/htpasswd.users &amp;lt;new user&amp;gt; as root, to&lt;br /&gt;
    create the new user and password&lt;br /&gt;
 4) stop nagios&lt;br /&gt;
 5) restart the web server&lt;br /&gt;
 6  start nagios&lt;br /&gt;
&lt;br /&gt;
It should work, you should be able to log in and do stuff.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Nagios&amp;diff=8714</id>
		<title>Nagios</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Nagios&amp;diff=8714"/>
		<updated>2026-03-21T13:35:07Z</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 nagios&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== old stuff ==&lt;br /&gt;
&lt;br /&gt;
Nagios is main monitoring tool for CLON cluster.&lt;br /&gt;
&lt;br /&gt;
Download from web following files and place them to &#039;/usr/local/downloads&#039;:&lt;br /&gt;
&lt;br /&gt;
  nagios-2.6.tar.gz&lt;br /&gt;
  nagios-images_0.3.tar.gz&lt;br /&gt;
  nagios-plugins-1.4.5.tar.gz&lt;br /&gt;
  nagiosmib-1.0.0.tar.gz (?????????)&lt;br /&gt;
&lt;br /&gt;
  create user &#039;nagios&#039;, private group &#039;nagios&#039;&lt;br /&gt;
  mkdir /www/nagios2.6&lt;br /&gt;
  chown nagios.nagios /www/nagios2.6&lt;br /&gt;
&lt;br /&gt;
Add command file group and put appropriate users in (we assume that apache is running as user &#039;apache&#039;):&lt;br /&gt;
&lt;br /&gt;
  /usr/sbin/groupadd nagcmd&lt;br /&gt;
  /usr/sbin/usermod -G nagcmd apache&lt;br /&gt;
  /usr/sbin/usermod -G nagcmd nagios&lt;br /&gt;
  to check, see file /etc/group&lt;br /&gt;
&lt;br /&gt;
Build and install:&lt;br /&gt;
&lt;br /&gt;
  cp /usr/local/downloads/nagios-2.6.tar.gz /usr/local/src&lt;br /&gt;
  cd /usr/local/src&lt;br /&gt;
  gunzip nagios-2.6.tar.gz&lt;br /&gt;
  tar xvf nagios-2.6.tar&lt;br /&gt;
  cd &#039;/usr/local/src/nagios-2.6&#039;&lt;br /&gt;
                   NO !!! su nagios&lt;br /&gt;
  ./configure --prefix=/www/nagios2.6 --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd&lt;br /&gt;
      ??did on RHEL6:  ./configure --prefix=/www/nagios-3.4.1 --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagcmd --with-command-group=nagcmd&lt;br /&gt;
  make all&lt;br /&gt;
  make install&lt;br /&gt;
&lt;br /&gt;
Install init script /etc/init.d/nagios:&lt;br /&gt;
&lt;br /&gt;
  make install-init (as &#039;root&#039; !!!)&lt;br /&gt;
&lt;br /&gt;
Modify /etc/init.d/nagios script as following (bug ?):&lt;br /&gt;
&lt;br /&gt;
  ###NagiosRunFile=${prefix}/var/nagios.lock&lt;br /&gt;
  NagiosRunFile=${prefix}/var/run/nagios.pid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  #to install sample /etc directory&lt;br /&gt;
  make install-config&lt;br /&gt;
&lt;br /&gt;
  #???This installs and configures permissions on the&lt;br /&gt;
  #???directory for holding the external command file&lt;br /&gt;
  make install-commandmode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install plugins and nrpe -  see corresponding sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fix apache configuration file:&lt;br /&gt;
&lt;br /&gt;
  add contents of /usr/local/src/nagios-2.6/sample-config/httpd.conf&lt;br /&gt;
  to /www/apache2.2.3/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
Copy &#039;etc&#039; directory from old Nagios (if any) to /www/nagios2.6. Go through files cgi.cfg, nagios.cfg and private/*&lt;br /&gt;
and fix pathes making them point to /www/nagios2.6.&lt;br /&gt;
&lt;br /&gt;
Add several directories for output files:&lt;br /&gt;
&lt;br /&gt;
  mkdir /www/nagios2.6/var/log&lt;br /&gt;
  mkdir /www/nagios2.6/var/run&lt;br /&gt;
  mkdir /www/nagios2.6/var/rw (?????)&lt;br /&gt;
&lt;br /&gt;
Install icons:&lt;br /&gt;
&lt;br /&gt;
  cd /usr/local/src/nagios-images-0.3/base&lt;br /&gt;
  cp * /www/nagios2.6/share/images/logos&lt;br /&gt;
&lt;br /&gt;
To check configuration run following commands:&lt;br /&gt;
&lt;br /&gt;
  /www/nagios2.6/bin/nagios -v /www/nagios2.6/etc/nagios.cfg&lt;br /&gt;
&lt;br /&gt;
To start/stop (restart need to be fixed ..):&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/nagios start/stop&lt;br /&gt;
&lt;br /&gt;
Add Nagios to services:&lt;br /&gt;
&lt;br /&gt;
  chkconfig --add nagios&lt;br /&gt;
  chkconfig --level 3 nagios off&lt;br /&gt;
  chkconfig --level 4 nagios off&lt;br /&gt;
  chkconfig --list nagios&lt;br /&gt;
&lt;br /&gt;
NOTE: following command was executed to let browser to disable host checks; it should be investigated ...&lt;br /&gt;
&lt;br /&gt;
  chown nagios:nagcmd /www/nagios2.6/var/log/nagios.cmd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ADDITIONAL INFO (COPIED FROM http://klickitat.ee.washington.edu/medg/software/nagios-install-notes.txt):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
some notes on installing nagios - these are a supplement to the basic&lt;br /&gt;
nagios documentation that comes with the software:&lt;br /&gt;
&lt;br /&gt;
Download and install the nagios and nagios-plugin packages. For whatever reason&lt;br /&gt;
www.nagios.org seems to be hosed now (7/23/2004), but look on google. There&lt;br /&gt;
is also sourceforge.nagios.net, which seems to be another nagios homepage.&lt;br /&gt;
&lt;br /&gt;
Create a nagios user.  Compile and install the packages as described in the &lt;br /&gt;
documentation.  Redhat&lt;br /&gt;
has all necessary libraries already installed.  I just went with the defaults&lt;br /&gt;
in the compilation.  The default is for nagios to install itself in &lt;br /&gt;
/usr/local/nagios; everything should be owned by user nagios. &lt;br /&gt;
&lt;br /&gt;
To enable the web interface, edit httpd.conf to add the Alias and &lt;br /&gt;
ScriptAlias directives as &lt;br /&gt;
described in the nagios documentation.  This works for both apache 1.3 and&lt;br /&gt;
apache 2.0.  Restart apache.  At this point you should be able to go to &lt;br /&gt;
http://www.whatever/nagios/ and see the nagios page and access the&lt;br /&gt;
documentation.  CGIs probably won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
You need to set up the config files; this is the real heart of installing &lt;br /&gt;
nagios and unfortunately is much easier to show than to describe.  The first&lt;br /&gt;
step is to copy the *.cfg-sample files that should be in /usr/local/nagios/etc&lt;br /&gt;
to *.cfg.  Then you need to edit these files to describe your setup.&lt;br /&gt;
&lt;br /&gt;
Basically, hosts.cfg describes the hosts you want to monitor, services.cfg &lt;br /&gt;
describes the services you want to monitor on each host, checkcommands.cfg&lt;br /&gt;
is the check commands used by services.cfg to check the services; if you want&lt;br /&gt;
to check a service you probably have to add a command to do so; contacts.cfg&lt;br /&gt;
is the people who will be contacted in case of a problem, contactgroups&lt;br /&gt;
is the groups of people, hostgroups.cfg is the groups of hosts (rrsl-machines,&lt;br /&gt;
for example).  nagios.cfg is the master config file.  Probably you can get&lt;br /&gt;
by just by copying and pasting the stuff already in these files and tweaking&lt;br /&gt;
it.&lt;br /&gt;
&lt;br /&gt;
To add a new machine you will need to edit hosts.cfg (add the machine),&lt;br /&gt;
hostgroups.cfg (put it in a hostgroup), services.cfg (add the services to&lt;br /&gt;
be checked on the machine).&lt;br /&gt;
&lt;br /&gt;
To add a new administrator, you will need to edit contacts.cfg (add the new &lt;br /&gt;
person) and contactgroups.cfg (put them in a contact group or create one).&lt;br /&gt;
&lt;br /&gt;
In misccommands.cfg I needed to change /usr/bin/mail to /bin/mail on redhat&lt;br /&gt;
-- but not on slackware!  Otherwise it was not able to mail messages.&lt;br /&gt;
&lt;br /&gt;
At this point you can check your config using the &lt;br /&gt;
&#039;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&#039; command,&lt;br /&gt;
which does a check of the configuration and will warn if there are errors.&lt;br /&gt;
Fix the errors and repeat until it is happy.&lt;br /&gt;
&lt;br /&gt;
Now you need to enable authorization so that the cgi scripts will work.  To&lt;br /&gt;
do this first create the &lt;br /&gt;
.htaccess file in the nagios/sbin directory as described in the &lt;br /&gt;
documentation - it must be world-readable.&lt;br /&gt;
&lt;br /&gt;
Next create the htpasswd.users file in the nagios/etc directory as described in&lt;br /&gt;
the documentation - it must be world-readable!  I added only one user: rrsl&lt;br /&gt;
&lt;br /&gt;
At this point you should be able to start nagios using:&lt;br /&gt;
/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg&lt;br /&gt;
&lt;br /&gt;
After nagios is started you should be able to go to the web page and &lt;br /&gt;
use the cgis to display info.  The final step is enabling the external command&lt;br /&gt;
cgis, which let you change the behavior of nagios from the web.  To do this&lt;br /&gt;
you have to follow the steps in the documentation to enable external commands&lt;br /&gt;
This involves enabling external commands in the config file and specifying&lt;br /&gt;
an external commands file....&lt;br /&gt;
&lt;br /&gt;
The permissions on the file seem to be a source of problems.&lt;br /&gt;
To enable external commands you have to first create a group containing &lt;br /&gt;
the nagios user and the user httpd runs as (apache for us).  Then you create&lt;br /&gt;
the directory /usr/local/nagios/var/rw with permissions:&lt;br /&gt;
drwxrwsr-x    2 nagios   nagioscmd     4096 Aug  3 13:55 rw&lt;br /&gt;
&lt;br /&gt;
That&#039;s rwx permissions for the user and rws permissions for the group&lt;br /&gt;
chmod gu+rwx nagios.nagioscmd rw&lt;br /&gt;
chmod g+s rw&lt;br /&gt;
Then you have to restart both apache and nagios, or it doesn&#039;t work!&lt;br /&gt;
&lt;br /&gt;
The documentation describes some other gotchas..&lt;br /&gt;
&lt;br /&gt;
To run checks for services on remote machines, you need to set up ssh to&lt;br /&gt;
log in without a password.  To do this run &lt;br /&gt;
$ ssh-keygen -t rsa&lt;br /&gt;
to create a public/private key pair.  copy the public key into the &lt;br /&gt;
~/.ssh/authorized_keys file of the user nagios on the remote host.  This file&lt;br /&gt;
must only be rw by nagios or ssh will not work.  The directory .ssh must also&lt;br /&gt;
be only rwx by nagios.  Then you should be able &lt;br /&gt;
to ssh to the remote host as nagios without giving a password.&lt;br /&gt;
&lt;br /&gt;
Copy the plugins you want to run on the remote host to the remote host, &lt;br /&gt;
and then set up checks in checkcommands.cfg, and services.cfg.  See the &lt;br /&gt;
check-host-radar command for an example.  The plugins can be any kind of&lt;br /&gt;
program.&lt;br /&gt;
&lt;br /&gt;
Many plugins were timing out after ten seconds when checking on heimdal and&lt;br /&gt;
umtanum.  Although there claimed to be a command line option to change this,&lt;br /&gt;
in practice there was not.  Therefore, I changed the source to set the timeout&lt;br /&gt;
to 30sec and recompiled the plugins.  This appears to work. (7/26/04)&lt;br /&gt;
&lt;br /&gt;
nagios comes with the file /etc/rc.d/init.d/nagios, which is a script for&lt;br /&gt;
starting nagios from rc.local or from the command line as root (or by&lt;br /&gt;
sudo).  This seems to be the best way of starting or stopping the program.&lt;br /&gt;
&lt;br /&gt;
sudo /etc/rc.d/init.d/nagios start&lt;br /&gt;
sudo /etc/rc.d/init.d/nagios stop&lt;br /&gt;
etc.&lt;br /&gt;
&lt;br /&gt;
nagios has the ability to acknowledge a host condition, so if a host&lt;br /&gt;
is down, you can &amp;quot;acknowledge&amp;quot; through the web interface, and it will&lt;br /&gt;
stop sending email unless the host changes state.  This is useful.&lt;br /&gt;
You can also disable notification for a service, which is handy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Adding a user to the web interface:&lt;br /&gt;
&lt;br /&gt;
 1) edit cgi.cfg to add the user to the actions that you want them to do&lt;br /&gt;
 2) edit sbin/.htaccess to add the user to the list of ok users, eg:&lt;br /&gt;
    require user rrsl radar&lt;br /&gt;
    for users rrsl and radar being able to access the web interface&lt;br /&gt;
    Keep in mind this file must be world readable...&lt;br /&gt;
 3) issue htpasswd /usr/local/nagios/etc/htpasswd.users &amp;lt;new user&amp;gt; as root, to&lt;br /&gt;
    create the new user and password&lt;br /&gt;
 4) stop nagios&lt;br /&gt;
 5) restart the web server&lt;br /&gt;
 6  start nagios&lt;br /&gt;
&lt;br /&gt;
It should work, you should be able to log in and do stuff.&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=ROOT&amp;diff=8713</id>
		<title>ROOT</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=ROOT&amp;diff=8713"/>
		<updated>2026-03-20T02:40:33Z</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;
yum install libuuid-devel xrootd xrootd-devel xrootd-client-devel python3 python3-devel z3 z3-devel&lt;br /&gt;
&lt;br /&gt;
yum install gcc-fortran imake xbae-devel libnsl libnsl2-devel glibc-devel freetype-devel libgfortran libX11-devel libXpm-devel libXt-devel motif-devel (for cernlib)&lt;br /&gt;
&lt;br /&gt;
yum install boost boost-devel lz4 lz4-devel doxygen (for evio)&lt;br /&gt;
&lt;br /&gt;
yum install libtirpc-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If Git does not work, download source to /usr/downloads manually and do following:&lt;br /&gt;
&lt;br /&gt;
 cd /apps/root&lt;br /&gt;
 cp /usr/downloads/root_v6.24.08.source.tar.gz .&lt;br /&gt;
 gunzip root_v6.24.08.source.tar.gz&lt;br /&gt;
 tar xvf root_v6.24.08.source.tar&lt;br /&gt;
 rm root_v6.24.08.source.tar.gz&lt;br /&gt;
 mv root_v6.24.08 root_v6.24.08_source&lt;br /&gt;
 mkdir 6.24.08&lt;br /&gt;
 cd 6.24.08&lt;br /&gt;
 cmake ../root-6.24.08_source -Dbuiltin_xrootd=OFF -Dclad=OFF&lt;br /&gt;
 cmake --build . -- -j32&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
Installation from source (replace root_install with for example 6.24.06):&lt;br /&gt;
&lt;br /&gt;
 # The latest stable branch gets updated automatically on each release. &lt;br /&gt;
 # You may update your local copy by issuing a `git pull` command from within `root_src/`.&lt;br /&gt;
 git clone --branch latest-stable https://github.com/root-project/root.git root_src&lt;br /&gt;
 mkdir root_build root_install &amp;amp;&amp;amp; cd root_build&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src # &amp;amp;&amp;amp; check cmake configuration output for warnings or errors&lt;br /&gt;
 cmake --build . -- install -j4 # if you have 4 cores available for compilation&lt;br /&gt;
 source ../root_install/bin/thisroot.sh # or thisroot.{fish,csh}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation (version 6.16.0 and GCC 8.3.0 in this example):&lt;br /&gt;
&lt;br /&gt;
* cd /apps/root&lt;br /&gt;
&lt;br /&gt;
* git clone http://github.com/root-project/root.git 6.16.0&lt;br /&gt;
&lt;br /&gt;
* cd 6.16.0&lt;br /&gt;
&lt;br /&gt;
* git checkout -b v6-16-00 v6-16-00&lt;br /&gt;
&lt;br /&gt;
* cd build&lt;br /&gt;
&lt;br /&gt;
* setenv CC /apps/gcc/8.3.0/bin/gcc&lt;br /&gt;
&lt;br /&gt;
* setenv CXX /apps/gcc/8.3.0/bin/g++&lt;br /&gt;
&lt;br /&gt;
* cmake /apps/root/6.16.0&lt;br /&gt;
&lt;br /&gt;
* cmake --build . -- -j32&lt;br /&gt;
&lt;br /&gt;
Everything is ready. Setup environment:&lt;br /&gt;
&lt;br /&gt;
* source /apps/root/6.16.0/build/bin/thisroot.csh&lt;br /&gt;
&lt;br /&gt;
Now it can be run:&lt;br /&gt;
&lt;br /&gt;
* root&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=8712</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=8712"/>
		<updated>2026-03-18T15:18:59Z</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 useful pachages:&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=8711</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=8711"/>
		<updated>2026-03-18T15:18:36Z</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 pachages:&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&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_Boot_Server&amp;diff=8710</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=8710"/>
		<updated>2026-03-15T16:59:13Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* Setting of the Linux server to be used for PXE and EFI boot of the VME controllers */&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;
&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=Linux_Tricks&amp;diff=8709</id>
		<title>Linux Tricks</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Linux_Tricks&amp;diff=8709"/>
		<updated>2026-03-05T16:20:26Z</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;
Do following:&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=Gnome&amp;diff=8708</id>
		<title>Gnome</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Gnome&amp;diff=8708"/>
		<updated>2026-03-05T16:19:12Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
When switching workspaces, only first screen switches. To make all screens switched:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using command line&#039;&#039;&#039; (DOES NOT WORK ON RHEL9...)&lt;br /&gt;
&lt;br /&gt;
  gsettings set org.gnome.shell.extensions.classic-overrides workspaces-only-on-primary false&lt;br /&gt;
&lt;br /&gt;
Graphical tool &amp;quot;dconf-editor&amp;quot; can be used as well. Expand the path &amp;quot;org.gnome.shell.extensions.classic-overrides&amp;quot; and highlight the setting for &amp;quot;workspaces-only-on-primary&amp;quot;. Turn off &amp;quot;Use default value&amp;quot; then click on False in the &amp;quot;Custom value&amp;quot; setting.  Click the &amp;quot;Apply&amp;quot; button at the top.&lt;br /&gt;
&lt;br /&gt;
To change the number of workspaces: &amp;quot;org.gnome.desktop.wm.preferences.num-workspaces&amp;quot;. Set &amp;quot;Use default value&amp;quot; = OFF, than type the value you want.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using GUI&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 yum install gnome-tweaks&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;&#039;Applications-&amp;gt;Utilities-&amp;gt;Tweaks-&amp;gt;Workspaces&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;Workspaces span displays&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Gnome&amp;diff=8707</id>
		<title>Gnome</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Gnome&amp;diff=8707"/>
		<updated>2026-03-05T16:18:44Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
When switching workspaces, only first screen switches. To make all screens switched:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DOES NOT WORK ON RHEL9&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
  gsettings set org.gnome.shell.extensions.classic-overrides workspaces-only-on-primary false&lt;br /&gt;
&lt;br /&gt;
Graphical tool &amp;quot;dconf-editor&amp;quot; can be used as well. Expand the path &amp;quot;org.gnome.shell.extensions.classic-overrides&amp;quot; and highlight the setting for &amp;quot;workspaces-only-on-primary&amp;quot;. Turn off &amp;quot;Use default value&amp;quot; then click on False in the &amp;quot;Custom value&amp;quot; setting.  Click the &amp;quot;Apply&amp;quot; button at the top.&lt;br /&gt;
&lt;br /&gt;
To change the number of workspaces: &amp;quot;org.gnome.desktop.wm.preferences.num-workspaces&amp;quot;. Set &amp;quot;Use default value&amp;quot; = OFF, than type the value you want.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using GUI&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 yum install gnome-tweaks&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;&#039;Applications-&amp;gt;Utilities-&amp;gt;Tweaks-&amp;gt;Workspaces&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;Workspaces span displays&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Boiarino</name></author>
	</entry>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=EtherLite32&amp;diff=8706</id>
		<title>EtherLite32</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=EtherLite32&amp;diff=8706"/>
		<updated>2026-02-12T22:38:16Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The number of EtherLite32 terminal servers are installed to provide serial connections to ROCs, IOCs, network switches and other devices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if &#039;&#039;softioc_console&#039;&#039; in use, tsconnect command will not work, use following command to communicate to Etherlite ports:&lt;br /&gt;
&lt;br /&gt;
 &#039;softioc_console -p&#039; shows list of device names&lt;br /&gt;
 &#039;softioc_console &amp;lt;device_name&amp;gt;&#039; connects to the device&lt;br /&gt;
&lt;br /&gt;
To exit connection, do &#039;^]&#039; to jump to telnet prompt and type &#039;quit&#039; to exit.&lt;br /&gt;
&lt;br /&gt;
While in session, ^T will toggle auto restart ON/OFF. Normally it is ON. If OFF, then ^X will kill connection and do not restart it, then tsconnect method can be used.&lt;br /&gt;
&lt;br /&gt;
To exit &#039;&#039;tsconnect&#039;&#039;, type ~x.&lt;br /&gt;
&lt;br /&gt;
== RHEL9 ==&lt;br /&gt;
&lt;br /&gt;
Install Realport software:&lt;br /&gt;
&lt;br /&gt;
 su&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 cp /usr/downloads/40002086_AD.tgz .&lt;br /&gt;
 tar -xzvf 40002086_AD.tgz&lt;br /&gt;
 rm -f 40002086_AD.tgz&lt;br /&gt;
 cd dgrp-1.9&lt;br /&gt;
 ./configure&lt;br /&gt;
 make all&lt;br /&gt;
 make install&lt;br /&gt;
 make postinstall&lt;br /&gt;
&lt;br /&gt;
At that point service should be started by legacy startup script &#039;&#039;/etc/rc.d/init.d/dgrp_daemon&#039;&#039;, check it with command&lt;br /&gt;
&lt;br /&gt;
 systemctl status dgrp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; if after installation you see&lt;br /&gt;
 [root@clondb2 ~]# insmod /lib/modules/5.14.0-611.13.1.el9_7.x86_64/misc/dgrp.ko&lt;br /&gt;
 insmod: ERROR: could not insert module /lib/modules/5.14.0-611.13.1.el9_7.x86_64/misc/dgrp.ko: Key was rejected by service&lt;br /&gt;
&lt;br /&gt;
then most likely SecureBoot is enabled in BIOS. It can be check by command:&lt;br /&gt;
 [root@clondb2 dgrp-1.9]# mokutil --sb-state&lt;br /&gt;
 SecureBoot enabled&lt;br /&gt;
&lt;br /&gt;
In that case, reboot machine, goto BIOS and disable &#039;SecureBoot&#039; in UEFI setup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DID NOT DO IT&#039;&#039;&#039; Alternatively, you can generate keys and register module:&lt;br /&gt;
&lt;br /&gt;
 tail -c 100 $(modinfo -n dgrp) | od -c # This should now report &amp;quot;Module signature appended&amp;quot;; if not, do following:&lt;br /&gt;
 cd /root&lt;br /&gt;
 openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj &amp;quot;/CN=My_Own_MOK/&amp;quot;&lt;br /&gt;
 mokutil --list-enrolled | grep &amp;quot;Subject.*CN&amp;quot;&lt;br /&gt;
 mokutil --import MOK.der&lt;br /&gt;
 reboot #have to watch screen and do something !!!???&lt;br /&gt;
 mokutil --list-enrolled | grep &amp;quot;Subject.*CN&amp;quot;&lt;br /&gt;
 /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n dgrp)&lt;br /&gt;
 tail -c 100 $(modinfo -n dgrp) | od -c # This should now report &amp;quot;Module signature appended&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wrap legacy startup scripts with modern one. Create systemd config file &#039;&#039;/etc/systemd/system/dgrp.service&#039;&#039; with following contents:&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Digi RealPort Daemon&lt;br /&gt;
 After=network.target syslog.target&lt;br /&gt;
 # Add After= to specify any services that must be running before dgrp starts&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=forking&lt;br /&gt;
 # Use &#039;forking&#039; because dgrp_daemon typically runs in the background as a daemon&lt;br /&gt;
 ExecStart=/etc/rc.d/init.d/dgrp_daemon start&lt;br /&gt;
 ExecStop=/etc/rc.d/init.d/dgrp_daemon stop&lt;br /&gt;
 # Ensure the paths above are absolute paths to your dgrp start/stop scripts/executables&lt;br /&gt;
 ###sergey: who create that file ??? PIDFile=/var/run/dgrp_daemon.pid&lt;br /&gt;
 # Specify the PID file location if the daemon creates one&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 # Restarts the service if it fails&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
 # This ensures the service is part of the normal multi-user boot process&lt;br /&gt;
&lt;br /&gt;
Reload and restart:&lt;br /&gt;
&lt;br /&gt;
 systemctl daemon-reload&lt;br /&gt;
 systemctl enable dgrp&lt;br /&gt;
 systemctl start dgrp&lt;br /&gt;
 systemctl status dgrp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/sudoers.d/onliners&#039;&#039; and add following line (if file and line exist, add to existing line):&lt;br /&gt;
&lt;br /&gt;
 %onliners ALL=NOPASSWD:/usr/bin/dinc,NOPASSWD:/usr/bin/ditty,NOPASSWD:/sbin/fuser,NOPASSWD:/usr/clas12/release/pro/epics/tools/caenhvReset/caenhvReset&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;onliners&#039;&#039; in the sudo, command &#039;&#039;tsconnect&#039;&#039; will work without password for the user &#039;&#039;clasrun&#039;&#039; who is in &#039;&#039;onliners&#039;&#039; group. Command &#039;&#039;tsconnect&#039;&#039; is in &#039;&#039;$CODA/src/scripts/&#039;&#039; directory, and config file for &#039;&#039;tsconnect&#039;&#039; is &#039;&#039;$CLON_PARMS/tsconnect/tsconnect.conf&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can register Digi devices (Etherlite32 etc) using command &#039;&#039;dgrp_gui&#039;&#039;, one by one. Alternatively, you can create file &#039;&#039;/etc/dgrp.backing.store&#039;&#039; by hands and restart service by command&lt;br /&gt;
&lt;br /&gt;
 systemctl restart dgrp&lt;br /&gt;
&lt;br /&gt;
This is an example of the file &#039;&#039;/etc/dgrp.backing.store&#039;&#039; as it was in January 2026:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # Format:&lt;br /&gt;
 #&lt;br /&gt;
 #   ID IP PortCount SpeedString IPPort Mode Owner Group Encrypt EncryptPort IPFamily TCPUserTimeout AuthMethod Password&lt;br /&gt;
 #&lt;br /&gt;
 # If any of the last 10 options should use the default, the&lt;br /&gt;
 # string &amp;quot;default&amp;quot; appears instead.&lt;br /&gt;
 #&lt;br /&gt;
 01 etherlite11 32 auto default default default default never default default default none&lt;br /&gt;
 02 etherlite13 32 auto default default default default never default default default none&lt;br /&gt;
 03 etherlite3 32 auto default default default default never default default default none&lt;br /&gt;
 04 etherlite12 32 auto default default default default never default default default none&lt;br /&gt;
 05 etherlite2 32 auto default default default default never default default default none&lt;br /&gt;
 06 etherlite5 32 auto default default default default never default default default none&lt;br /&gt;
 07 etherlite14 32 auto default default default default never default default default none&lt;br /&gt;
 08 etherlite15 32 auto default default default default never default default default none&lt;br /&gt;
 09 etherlite4 32 auto default default default default never default default default none&lt;br /&gt;
 0a etherlite9 32 auto default default default default never default default default none&lt;br /&gt;
 0d etherlite10 32 auto default default default default never default default default none&lt;br /&gt;
 0e etherlite17 32 auto default default default default never default default default none&lt;br /&gt;
 11 rs422a 2 auto default default default default never default default default none&lt;br /&gt;
 14 rs422e 2 auto default default default default never default default default none&lt;br /&gt;
 15 rs422c 2 auto default default default default never default default default none&lt;br /&gt;
&lt;br /&gt;
== RHEL7 ==&lt;br /&gt;
&lt;br /&gt;
 su&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 cp /usr/downloads/realport1.9-36_81000137_X.tgz .&lt;br /&gt;
 tar xvfz realport1.9-36_81000137_X.tgz&lt;br /&gt;
 cd dgrp-1.9&lt;br /&gt;
 ./configure&lt;br /&gt;
 make all&lt;br /&gt;
 make install&lt;br /&gt;
 make postinstall&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: to fix compiling error on RHEL7, add following to the file &#039;&#039;driver/build/include/dgrp_net_ops.h&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 #define TTY_CLOSING (7)&lt;br /&gt;
&lt;br /&gt;
* add following line to &#039;&#039;/etc/sudoers&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 %onliners ALL=NOPASSWD:/usr/bin/dinc,NOPASSWD:/usr/bin/ditty,NOPASSWD:/sbin/fuser&lt;br /&gt;
&lt;br /&gt;
* Run &#039;&#039;/usr/bin/dgrp/config/dgrp_gui&#039;&#039; to add terminal servers to the list of active devices: click &#039;Add&#039; and fill in &#039;RealPort ID&#039;. &#039;IP Address or Name&#039; and &#039;Number of Ports&#039; fields, for example type &#039;0d&#039;, &#039;etherlite10&#039;, &#039;32&#039;. Click &#039;Commit&#039;, &#039;Run it&#039; and &#039;Exit&#039;. New line with shows up, status must be &#039;Ready&#039; if terminal server is active.&lt;br /&gt;
&lt;br /&gt;
* Run &#039;&#039;/etc/init.d/dgrp_daemon status&#039;&#039; to see daemons running. To make it run on startup use &#039;&#039;chkconfig&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTES FROM DIGI&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
* This package includes several support utilites:&lt;br /&gt;
 ditty                 - an stty replacement.&lt;br /&gt;
 dinc                  - a cu/tip replacement.&lt;br /&gt;
&lt;br /&gt;
* There is a package of configuration tools provided that are, by default, located in the /usr/bin/dgrp/config directory. There are scripts for using the command line to add and remove products, as well as the RealPort Manager. This is essentially a graphical front end for the scripts and a visual tool for monitoring individual serial ports.&lt;br /&gt;
&lt;br /&gt;
* The software package includes two startup scripts in either the &#039;&#039;/etc/rc.d/init.d&#039;&#039; or &#039;&#039;/etc/init.d&#039;&#039; directories named &amp;quot;dgrp_daemon&amp;quot; and &amp;quot;dgrp_ditty&amp;quot;. These scripts will be executed at startup automatically if the &amp;quot;chkconfig&amp;quot; tool is present on the system during the post installation phase of the driver install.  Otherwise, these scripts must be manually added to the system startup.&lt;br /&gt;
&lt;br /&gt;
* To load and initialize the driver by hand, execute &amp;quot;dgrp_daemon start&amp;quot;. To stop the driver daemons and unload the driver, execute &amp;quot;dgrp_daemon stop&amp;quot; followed by &amp;quot;rmmod dgrp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: if terminal server does not boot on power recycle, use command &#039;dgipserv&#039; as described below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;tsconnect&#039; and &#039;dflush&#039; scripts from $CODA are used to access devices, config file is $CLON_PARMS/tsconnect/tsconnect.conf, command is &#039;tsconnect &amp;lt;dev&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Solaris era info ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
RealPort software must be installed to communicate with EtherLite terminal servers. Do following as &#039;root&#039; (tar file contains files downloaded from http://www.digi.com):&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 cp ../downloads/EtherLite32.tar .&lt;br /&gt;
 tar xvf EtherLite32.tar&lt;br /&gt;
 rm EtherLite32.tar&lt;br /&gt;
 cd EtherLite32&lt;br /&gt;
 pkgadd -d realport_2.8.3.pkg&lt;br /&gt;
Last command will initiate following dialog and output (empty lines removed):&lt;br /&gt;
 The following packages are available:&lt;br /&gt;
   1  realport     Digi RealPort Driver&lt;br /&gt;
                   (sparc/i386) 2.8.3&lt;br /&gt;
 Select package(s) you wish to process (or &#039;all&#039; to process&lt;br /&gt;
 all packages). (default: all) [?,??,q]: &lt;br /&gt;
 Processing package instance &amp;lt;realport&amp;gt; from &amp;lt;/usr/local/src/EtherLite32/realport_2.8.3.pkg&amp;gt; &lt;br /&gt;
 Digi RealPort Driver(sparc/i386) 2.8.3&lt;br /&gt;
 --------------------------------------------------------------------&lt;br /&gt;
 Copyright (c) 1996-2005 Digi International Inc. All Rights Reserved.&lt;br /&gt;
 This software contains proprietary and confidential information &lt;br /&gt;
 of Digi International Inc.  By accepting transfer of this copy, &lt;br /&gt;
 Recipient agrees to retain this software in confidence, to prevent &lt;br /&gt;
 disclosure to others, and to make no use of this software other &lt;br /&gt;
 than that for which it was delivered.  This is an unpublished &lt;br /&gt;
 copyrighted work of Digi International Inc.  Except as permitted &lt;br /&gt;
 by federal law, 17 USC 117, copying is strictly prohibited.&lt;br /&gt;
 --------------------------------------------------------------------&lt;br /&gt;
 Using &amp;lt;/&amp;gt; as the package base directory.&lt;br /&gt;
 ## Processing package information.&lt;br /&gt;
 ## Processing system information. &lt;br /&gt;
 WARNING: setting mode of &amp;lt;/dev/dpr&amp;gt; to default mode (755) &lt;br /&gt;
 WARNING: setting mode of &amp;lt;/dev/dty&amp;gt; to default mode (755)&lt;br /&gt;
 WARNING: setting mode of &amp;lt;/opt/realport&amp;gt; to default mode (755)&lt;br /&gt;
 WARNING: setting mode of &amp;lt;/opt/realport/amd64&amp;gt; to default mode (755)&lt;br /&gt;
 WARNING: setting mode of &amp;lt;/opt/realport/i386&amp;gt; to default mode (755)&lt;br /&gt;
 WARNING: setting mode of &amp;lt;/opt/realport/include&amp;gt; to default mode (755)&lt;br /&gt;
 WARNING: setting mode of &amp;lt;/opt/realport/sparc32&amp;gt; to default mode (755)&lt;br /&gt;
 WARNING: setting mode of &amp;lt;/opt/realport/sparc64&amp;gt; to default mode (755)&lt;br /&gt;
 WARNING: setting mode of &amp;lt;/opt/realport/utils&amp;gt; to default mode (755)&lt;br /&gt;
    9 package pathnames are already properly installed.&lt;br /&gt;
 ## Verifying disk space requirements.&lt;br /&gt;
 ## Checking for conflicts with packages already installed.&lt;br /&gt;
 ## Checking for setuid/setgid programs.&lt;br /&gt;
 This package contains scripts which will be executed with super-user&lt;br /&gt;
 permission during the process of installing this package. &lt;br /&gt;
 Do you want to continue with the installation of &amp;lt;realport&amp;gt; [y,n,?] y&lt;br /&gt;
 Installing Digi RealPort Driver as &amp;lt;realport&amp;gt;&lt;br /&gt;
 ## Installing part 1 of 1.&lt;br /&gt;
 /etc/rc2.d/S76realport &amp;lt;symbolic link&amp;gt;&lt;br /&gt;
 /opt/realport/S76realport&lt;br /&gt;
 /opt/realport/amd64/dgipserv&lt;br /&gt;
 /opt/realport/amd64/digi_realport&lt;br /&gt;
 /opt/realport/amd64/ditty&lt;br /&gt;
 /opt/realport/amd64/dpa-rp&lt;br /&gt;
 /opt/realport/amd64/ncx_debug&lt;br /&gt;
 /opt/realport/amd64/ncx_devices_exist&lt;br /&gt;
 /opt/realport/amd64/ncx_make_links&lt;br /&gt;
 /opt/realport/amd64/ncx_mknod&lt;br /&gt;
 /opt/realport/amd64/ncxd.Z&lt;br /&gt;
 /opt/realport/dgipserv.1&lt;br /&gt;
 /opt/realport/ditty&lt;br /&gt;
 /opt/realport/dpa-rp&lt;br /&gt;
 /opt/realport/drpadmin&lt;br /&gt;
 /opt/realport/i386/dgipserv&lt;br /&gt;
 /opt/realport/i386/digi_realport&lt;br /&gt;
 /opt/realport/i386/ditty&lt;br /&gt;
 /opt/realport/i386/dpa-rp&lt;br /&gt;
 /opt/realport/i386/ncx_debug&lt;br /&gt;
 /opt/realport/i386/ncx_devices_exist&lt;br /&gt;
 /opt/realport/i386/ncx_make_links&lt;br /&gt;
 /opt/realport/i386/ncx_mknod&lt;br /&gt;
 /opt/realport/i386/ncxd.Z&lt;br /&gt;
 /opt/realport/include/stdigi.h&lt;br /&gt;
 /opt/realport/install_notes.txt&lt;br /&gt;
 /opt/realport/ncxd&lt;br /&gt;
 /opt/realport/release_notes.txt&lt;br /&gt;
 /opt/realport/sparc32/dgipserv&lt;br /&gt;
 /opt/realport/sparc32/digi_realport&lt;br /&gt;
 /opt/realport/sparc32/ditty&lt;br /&gt;
 /opt/realport/sparc32/dpa-rp&lt;br /&gt;
 /opt/realport/sparc32/ncx_debug&lt;br /&gt;
 /opt/realport/sparc32/ncx_devices_exist&lt;br /&gt;
 /opt/realport/sparc32/ncx_make_links&lt;br /&gt;
 /opt/realport/sparc32/ncx_mknod&lt;br /&gt;
 /opt/realport/sparc32/ncxd.Z&lt;br /&gt;
 /opt/realport/sparc64/dgipserv&lt;br /&gt;
 /opt/realport/sparc64/digi_realport&lt;br /&gt;
 /opt/realport/sparc64/ditty&lt;br /&gt;
 /opt/realport/sparc64/dpa-rp&lt;br /&gt;
 /opt/realport/sparc64/ncx_debug&lt;br /&gt;
 /opt/realport/sparc64/ncx_devices_exist&lt;br /&gt;
 /opt/realport/sparc64/ncx_make_links&lt;br /&gt;
 /opt/realport/sparc64/ncx_mknod&lt;br /&gt;
 /opt/realport/sparc64/ncxd.Z&lt;br /&gt;
 /opt/realport/utils/dgipserv&lt;br /&gt;
 /opt/realport/utils/ncx_debug&lt;br /&gt;
 /opt/realport/utils/ncx_devices_exist&lt;br /&gt;
 /opt/realport/utils/ncx_make_links&lt;br /&gt;
 /opt/realport/utils/ncx_mknod&lt;br /&gt;
 /opt/realport/utils/ncx_verify_conf&lt;br /&gt;
 /usr/sbin/dgipserv &amp;lt;symbolic link&amp;gt;&lt;br /&gt;
 /usr/sbin/ditty &amp;lt;symbolic link&amp;gt;&lt;br /&gt;
 /usr/sbin/dpa-rp &amp;lt;symbolic link&amp;gt;&lt;br /&gt;
 /usr/sbin/drpadmin &amp;lt;symbolic link&amp;gt;&lt;br /&gt;
 /usr/share/man/man1/dgipserv.1&lt;br /&gt;
 /usr/share/man/man1/ditty.1&lt;br /&gt;
 /usr/share/man/man7/realport.7&lt;br /&gt;
 [ verifying class &amp;lt;none&amp;gt; ]&lt;br /&gt;
 ## Executing postinstall script.&lt;br /&gt;
 Using / as package base directory...&lt;br /&gt;
 Unloading previous versions of drivers, if any....      Done&lt;br /&gt;
 Loading new drivers...Nov 22 14:53:37 clon10 digi_realport: Digi RealPort Driver (Instance 0) Ver 2.8.3&lt;br /&gt;
         Done&lt;br /&gt;
 Run the drpadmin tool to add realport devices&lt;br /&gt;
 Installation of &amp;lt;realport&amp;gt; was successful.&lt;br /&gt;
&lt;br /&gt;
Copy several files to &#039;&#039;/opt/realport&#039;&#039;:&lt;br /&gt;
 cp dflush /opt/realport&lt;br /&gt;
 cp dinc /opt/realport&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: &#039;dinc&#039; was copied from old CDsts driver, it seems digi does not have it any more, but we found it useful: &#039;tsconnect&#039; will use it. &#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: make sure that &#039;dinc&#039; is &#039;-rwsr-xr-x&#039;, it can be set by &#039;chmod 4755 dinc&#039;; otherwise &#039;Permission denied&#039; message will be generated by &#039;&#039;tsconnect&#039;&#039; (something related to the &#039;&#039;uucp&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
To configure EtherLite devices, run &#039;drpadmin&#039; command and specify devices one by one, for example:&lt;br /&gt;
 clon10:EtherLite32&amp;gt; /opt/realport/drpadmin &lt;br /&gt;
 Please select an option (a)dd (d)elete (s)how (r)eset (q)uit : a&lt;br /&gt;
 Enter the IP address or network name of the unit: 129.57.167.208&lt;br /&gt;
 Enter the number of ports: 32&lt;br /&gt;
 Enter the tty device ID (only 2 chars allowed) : 0 &lt;br /&gt;
 Would you like this RealPort session to be encrypted?&lt;br /&gt;
 NOTE: Not all RealPort products support encrypted RealPort sessions.&lt;br /&gt;
 Please check your RealPort product&#039;s firmware release notes&lt;br /&gt;
 or product literature before selecting &amp;quot;always&amp;quot;.&lt;br /&gt;
 If in doubt, select &amp;quot;never&amp;quot;.&lt;br /&gt;
 (always/never) : (never): &lt;br /&gt;
 The following device will be configured,&lt;br /&gt;
 0       129.57.167.208  32      0       secure (never)&lt;br /&gt;
 Is this correct (y to add or x to abort) ? y&lt;br /&gt;
 Please select an option (a)dd (d)elete (s)how (r)eset (q)uit : q&lt;br /&gt;
 clon10:EtherLite32&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Results will be saved in &#039;&#039;/opt/realport/drp.conf&#039;&#039; file. After all devices configured this file will contains something like following:&lt;br /&gt;
 clon10:realport&amp;gt; more drp.conf&lt;br /&gt;
 0       129.57.167.208  32      0       771     never   1027&lt;br /&gt;
 1       129.57.167.215  2       1       771     never   1027&lt;br /&gt;
 2       129.57.167.209  32      2       771     never   1027&lt;br /&gt;
 3       129.57.167.216  2       3       771     never   1027&lt;br /&gt;
 4       129.57.167.217  2       4       771     never   1027&lt;br /&gt;
 5       129.57.167.218  2       5       771     never   1027&lt;br /&gt;
 6       129.57.167.219  2       6       771     never   1027&lt;br /&gt;
 7       129.57.160.20   2       7       771     never   1027&lt;br /&gt;
 8       129.57.167.210  32      8       771     never   1027&lt;br /&gt;
 9       129.57.167.211  32      9       771     never   1027&lt;br /&gt;
 10      129.57.160.50   2       a       771     never   1027&lt;br /&gt;
 11      129.57.68.95    32      b       771     never   1027&lt;br /&gt;
 12      129.57.167.212  32      c       771     never   1027&lt;br /&gt;
 13      129.57.167.220  32      d       771     never   1027&lt;br /&gt;
 14      129.57.167.228  32      e       771     never   1027&lt;br /&gt;
 15      129.57.167.229  32      f       771     never   1027&lt;br /&gt;
 16      129.57.167.204  32      10      771     never   1027&lt;br /&gt;
 17      129.57.86.201   32      11      771     never   1027&lt;br /&gt;
&lt;br /&gt;
If adding new device, repeat the procedure on clon00, clon10 and clon20.&lt;br /&gt;
&lt;br /&gt;
Now copy our clon script into some directory included into PATH, for example:&lt;br /&gt;
 cp tsconnect /usr/local/bin&lt;br /&gt;
&lt;br /&gt;
Copy &#039;&#039;tsconnect.conf&#039;&#039; from previous location to &#039;&#039;/opt/realport&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Include command &#039;&#039;/opt/realport/dflush&#039;&#039; into &#039;&#039;sudoers&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
Now everything should be ready. Try to type something like&lt;br /&gt;
 tsconnect croctest1&lt;br /&gt;
and see if communication established. To end session, type &#039;~&#039; and &#039;x&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Booting EtherLite devices&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
EtherLite terminal server is using [[Bootp]]. Process controlled by &#039;&#039;/etc/bootptab&#039;&#039; file, example is here:&lt;br /&gt;
&lt;br /&gt;
 # @(#) $Header: /users/hpnp/odyssey/repository/examples/bootptab,v 1.2 1997/06/26 21:23:33 hpnp Exp $&lt;br /&gt;
 # Example /etc/bootptab: database for bootp server (/etc/bootpd).&lt;br /&gt;
 # Blank lines and lines beginning with &#039;#&#039; are ignored.&lt;br /&gt;
 #&lt;br /&gt;
 # Legend:&lt;br /&gt;
 #&lt;br /&gt;
 #       first field -- hostname&lt;br /&gt;
 #                       (may be full domain name)&lt;br /&gt;
 #&lt;br /&gt;
 #       hd -- home directory&lt;br /&gt;
 #       bf -- bootfile&lt;br /&gt;
 #       cs -- cookie servers&lt;br /&gt;
 #       ds -- domain name servers&lt;br /&gt;
 #       gw -- gateways&lt;br /&gt;
 #       ha -- hardware address&lt;br /&gt;
 #       ht -- hardware type&lt;br /&gt;
 #       im -- impress servers&lt;br /&gt;
 #       ip -- host IP address&lt;br /&gt;
 #       lg -- log servers&lt;br /&gt;
 #       lp -- LPR servers&lt;br /&gt;
 #       ns -- IEN-116 name servers&lt;br /&gt;
 #       rl -- resource location protocol servers&lt;br /&gt;
 #       sm -- subnet mask&lt;br /&gt;
 #       tc -- template host (points to similar host entry)&lt;br /&gt;
 #       to -- time offset (seconds)&lt;br /&gt;
 #       ts -- time servers&lt;br /&gt;
 #&lt;br /&gt;
 # Be careful about including backslashes where they&#039;re needed.  Weird (bad)&lt;br /&gt;
 # things can happen when a backslash is omitted where one is intended.&lt;br /&gt;
 #&lt;br /&gt;
 #peripheral1:\&lt;br /&gt;
 #	:hn:ht=ether:vm=rfc1048:\&lt;br /&gt;
 #	:ha=08000903212F:\&lt;br /&gt;
 #	:ip=190.40.101.22:\&lt;br /&gt;
 #	:sm=255.255.255.0:\&lt;br /&gt;
 #	:gw=190.40.101.1:\&lt;br /&gt;
 #	:lg=190.40.101.3:\&lt;br /&gt;
 #	:T144=&amp;quot;hpnp/peripheral1.cfg&amp;quot;:&lt;br /&gt;
 ########## Etherlite 32 RS232, Forward Carriage 1st Level, etherlite1&lt;br /&gt;
 els0:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e7008569:ip=129.57.167.208:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 ########## Etherlite 2 RS422 (EIA422), Forward Carriage 2nd Level, rs422a (reset1)&lt;br /&gt;
 els1:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e721288b:ip=129.57.167.215:&lt;br /&gt;
 ###	bf=el2_realport.bin:&lt;br /&gt;
 ########## Etherlite 32 RS232, Space Frame 1st Level South, etherlite2&lt;br /&gt;
 els2:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e7213b9f:ip=129.57.167.209:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 ########## Etherlite 2 RS422 (EIA422), South Claim Shelf, rs422b (reset3)&lt;br /&gt;
 els3:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e72141bd:ip=129.57.167.216:&lt;br /&gt;
 ###	bf=el2_realport.bin:&lt;br /&gt;
 ########## Etherlite 2 RS422 (EIA422), Space Frame 1st Level South, rs422c (reset5)&lt;br /&gt;
 els4:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e72141b9:ip=129.57.167.217:&lt;br /&gt;
 ###	bf=el2_realport.bin:&lt;br /&gt;
 ########## Etherlite 2 RS422 (EIA422), Space Frame 1st Level North, rs422d (reset2)&lt;br /&gt;
 els5:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e72141ae:ip=129.57.167.218:&lt;br /&gt;
 ###	bf=el2_realport.bin:&lt;br /&gt;
 ########## Etherlite 2 RS422 (EIA422), Space Frame 2nd Level North (behind dc11), rs422e (reset4)&lt;br /&gt;
 els6:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e72141c4:ip=129.57.167.219:&lt;br /&gt;
 ###	bf=el2_realport.bin:&lt;br /&gt;
 ########## Etherlite 2 RS422 (EIA422), Hall B Gas Shed, rs422f (reset6)&lt;br /&gt;
 els7:sm=255.255.255.0:gw=129.57.160.1:ht=ether:ha=00a0e72141b1:ip=129.57.160.20:&lt;br /&gt;
 ###	bf=el2_realport.bin:&lt;br /&gt;
 ########## Etherlite 32 RS232, Space Frame 1st Level North, etherlite3&lt;br /&gt;
 els8:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e7214019:ip=129.57.167.210:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 ########## Etherlite 32 RS232, South Claim Shellf, etherlite4&lt;br /&gt;
 els9:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e7214003:ip=129.57.167.211:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 ########## Etherlite 2 RS232, Hall B Gas Shed (2-port !), etherlite8 (clasgas)&lt;br /&gt;
 elsa:sm=255.255.255.0:gw=129.57.160.1:ht=ether:ha=00a0e7214e24:ip=129.57.160.50:&lt;br /&gt;
 ###	bf=el2_realport.bin:&lt;br /&gt;
 ########## Etherlite 32 RS232, Counting Room, etherlite9&lt;br /&gt;
 elsb:sm=255.255.255.0:gw=129.57.68.100:ht=ethernet:ha=00a0e72331b2:ip=129.57.68.95:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 ########## Etherlite 32 RS232, Forward Carriage 1st Level, etherlite5&lt;br /&gt;
 elsc:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e721402e:ip=129.57.167.212:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 ########## Etherlite 32 RS232, Pie Tower, etherlite10&lt;br /&gt;
 elsd:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e721401a:ip=129.57.167.220:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 ########## Etherlite 32 RS232, Forward Carriage, 2nd Level, etherlite11&lt;br /&gt;
 else:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e723764c:ip=129.57.167.228:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 ########## Etherlite 32 RS232, ... , etherlite12&lt;br /&gt;
 elsf:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e7237a08:ip=129.57.167.229:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 ########## Etherlite 32 RS232, ... , etherlite13&lt;br /&gt;
 elsg:sm=255.255.255.0:gw=129.57.167.99:ht=ether:ha=00a0e7237a8f:ip=129.57.167.204:&lt;br /&gt;
 ###	bf=el32_realport.bin:&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
Every terminal server has two lines in &#039;&#039;/etc/bootptab&#039;&#039; file. Normally on power recycle terminal server will obtain IP address and related information from &#039;&#039;/etc/bootptab&#039;&#039; file. Terminal server remember firmware, so only first line must be uncommented. If want to upgrade firmware, new firmware file must be placed in &#039;&#039;/tftpboot&#039;&#039;, backslash have to be placed at the end of the first line, and second line must be uncommented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Wiring&#039;&#039;&#039; (old info, maybe uncorrect, see [[Wiring]] for recent info)&lt;br /&gt;
&lt;br /&gt;
The terminal server cables are cat 5 cables with 4 twisted pairs of conductors. Each conductor is fed into an RJ45 connector, which is numbered from right to left, looking at the front of the plug with the tab down. Using Hall B&#039;s convention, this table describes which wire colors should be fed to which RJ45 conductors at either end of the connection. The wiring will be different at the terminal server and the device. This wiring scheme will allow a connection to be made directly to a Motorola computer with an RJ45 console connector. For devices with a DSUB connector, there are converters available at the lab, and they rely on this wiring configuration as well.&lt;br /&gt;
 |Server Wire Color|RJ45 Pin|Device Wire Color|Signal (Server end)|&lt;br /&gt;
 |Brown            |  1     | Orange          |       RTS         |&lt;br /&gt;
 |Blue             |  2     | Orange Stripe   |       DSR         |&lt;br /&gt;
 |Brown Stripe     |  3     | Blue            |       DCD         |&lt;br /&gt;
 |Blue Stripe      |  4     | Blue Stripe     |      !RxD         |&lt;br /&gt;
 |Green            |  5     | Green           |      !TxD         |&lt;br /&gt;
 |Green Stripe     |  6     | Green Stripe    |       SG          |&lt;br /&gt;
 |Orange           |  7     | Brown           |       DTR         |&lt;br /&gt;
 |Orange Stripe    |  8     | Brown Stripe    |       CTS         |&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other information&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* To assign IP address to device using &#039;bootp&#039; (have to disable bootp server first by &#039;&#039;svcadm disable network/bootps/udp&#039;&#039;, do not forget to enable it afterwards):&lt;br /&gt;
 dgipserv -store 00:a0:e7:00:85:69 129.57.167.208&lt;br /&gt;
 dgipserv -store 00:a0:e7:23:31:b2 129.57.68.95&lt;br /&gt;
 dgipserv -store 00:a0:e7:23:10:79 129.57.167.251&lt;br /&gt;
After running &#039;dgipserv&#039; command recycle power on terminal server and watch messages, it should set everything and ask you to wait&lt;br /&gt;
certain time before terminal server will become active.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* It is possible to &#039;rlogin&#039; to terminal server, for example:&lt;br /&gt;
&lt;br /&gt;
 rlogin 129.57.167.208&lt;br /&gt;
 EL-32 Terminal Server&lt;br /&gt;
 ? &lt;br /&gt;
 ? ver&lt;br /&gt;
 Product:  EL-32 &lt;br /&gt;
 FW Ver:   V6.6&lt;br /&gt;
 Ethernet:  00:A0:E7:00:85:69&lt;br /&gt;
 IP:        129.57.167.208 &lt;br /&gt;
 GW IP:     129.57.167.99&lt;br /&gt;
 SN Mask:   255.255.255.0&lt;br /&gt;
 Lease:     0xFFFFFFFF&lt;br /&gt;
 Boot Host: 129.57.167.5&lt;br /&gt;
 Bootfile:  el32.prm&lt;br /&gt;
 ICMP error (303) getting Bootfile: destination unreachable&lt;br /&gt;
 ? &lt;br /&gt;
&lt;br /&gt;
 rlogin 129.57.68.95&lt;br /&gt;
 ? ver&lt;br /&gt;
 Product:  EL-32 &lt;br /&gt;
 FW Ver:   V7.9&lt;br /&gt;
 Ethernet:  00:A0:E7:23:31:B2&lt;br /&gt;
 IP:        129.57.68.95&lt;br /&gt;
 GW IP:     129.57.68.100&lt;br /&gt;
 SN Mask:   255.255.255.0&lt;br /&gt;
 Lease:     0xFFFFFFFF&lt;br /&gt;
 Boot Host: 129.57.68.21&lt;br /&gt;
 Bootfile:  el32.prm&lt;br /&gt;
 TFTP error (2) getting Bootfile: Access violation&lt;br /&gt;
 ? &lt;br /&gt;
&lt;br /&gt;
 after boot from clon00&lt;br /&gt;
 ? ver&lt;br /&gt;
 Product:  EL-32 &lt;br /&gt;
 FW Ver:   V7.9&lt;br /&gt;
 Ethernet:  00:A0:E7:23:31:B2&lt;br /&gt;
 IP:        129.57.68.95 &lt;br /&gt;
 GW IP:     129.57.68.100&lt;br /&gt;
 SN Mask:   255.255.255.0&lt;br /&gt;
 Lease:     0xFFFFFFFF&lt;br /&gt;
 Boot Host: 129.57.68.1&lt;br /&gt;
 Bootfile:  el32.prm&lt;br /&gt;
 ICMP error (303) getting Bootfile: destination unreachable&lt;br /&gt;
 ? sockets&lt;br /&gt;
               remote local&lt;br /&gt;
   remote ip     port  port    state       sRTT   sMDEV  max rtt&lt;br /&gt;
 --------------- ----- ----- ------------ ------- ------- -------&lt;br /&gt;
 129.57.167.3    01015 00513 ESTABLISHED  00000ms 00160ms 00112ms&lt;br /&gt;
 0.0.0.0         00000 10001 LISTEN       00000ms 02880ms 00000ms&lt;br /&gt;
 ? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* boot messages on clon00/clon10 reboot:&lt;br /&gt;
 ...........&lt;br /&gt;
 Copyright 1983-2003 Sun Microsystems, Inc.  All rights reserved.&lt;br /&gt;
 Digi EtherLite(R)/SCSI Terminal Server(TM) Module Driver R3.015 &lt;br /&gt;
      for 64-bit Solaris 7 and 8 (SPARC) configured.&lt;br /&gt;
 Digi EL-32 (els0) at IP address 129.57.167.208&lt;br /&gt;
 Digi EL-2.2 (els1) at IP address 129.57.167.215&lt;br /&gt;
 Digi EL-32 (els2) at IP address 129.57.167.209&lt;br /&gt;
 Digi EL-2.2 (els3) at IP address 129.57.167.216&lt;br /&gt;
 Digi EL-2.2 (els4) at IP address 129.57.167.217&lt;br /&gt;
 Digi EL-2.2 (els5) at IP address 129.57.167.218&lt;br /&gt;
 Digi EL-2.2 (els6) at IP address 129.57.167.219&lt;br /&gt;
 Digi EL-2.2 (els7) at IP address 129.57.160.20&lt;br /&gt;
 Digi EL-32 (els8) at IP address 129.57.167.210&lt;br /&gt;
 Digi EL-32 (els9) at IP address 129.57.167.211&lt;br /&gt;
 Digi EL-2 (elsa) at IP address 129.57.160.50&lt;br /&gt;
 Digi EL-32 (elsb) at IP address 129.57.68.95&lt;br /&gt;
 Digi EL-32 (elsc) at IP address 129.57.167.212&lt;br /&gt;
 VxVM sysboot INFO V-5-2-3244 Starting restore daemon...&lt;br /&gt;
 VxVM sysboot INFO V-5-2-3445 starting in boot mode...&lt;br /&gt;
 NOTICE: VxVM vxdmp V-5-0-34 added disk array DISKS, datype = Disk&lt;br /&gt;
 NOTICE: VxVM vxdmp V-5-0-34 added disk array 508002000005e930, datype = SENA&lt;br /&gt;
 ...........&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=8705</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=8705"/>
		<updated>2026-02-12T02:56:39Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* Dell servers hardware trick(s) */&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 pachages:&lt;br /&gt;
 yum install ncdu mysql&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&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=8704</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=8704"/>
		<updated>2026-02-11T05:41:31Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* RHEL9 (64 bit) */&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 !!!&#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 pachages:&lt;br /&gt;
 yum install ncdu mysql&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&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=8703</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=8703"/>
		<updated>2026-02-10T22:33:13Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &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 !!!&#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) ==&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;
Set root password (see instractions below), if you want to become superuser by typing just &#039;&#039;su&#039;&#039;. If becoming superuser by typing &#039;&#039;sudo su&#039;&#039; is good enough, do nothing (in that case graphics will not work in superuser mode).&lt;br /&gt;
&lt;br /&gt;
Install useful pachages:&lt;br /&gt;
 yum install ncdu mysql&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&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=8702</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=8702"/>
		<updated>2026-02-10T22:32:09Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: &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. If BIOS does not remember time setting after power unplugged, on-board battery may need to be replaced&#039;&#039;&#039;&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) ==&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;
Set root password (see instractions below), if you want to become superuser by typing just &#039;&#039;su&#039;&#039;. If becoming superuser by typing &#039;&#039;sudo su&#039;&#039; is good enough, do nothing (in that case graphics will not work in superuser mode).&lt;br /&gt;
&lt;br /&gt;
Install useful pachages:&lt;br /&gt;
 yum install ncdu mysql&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&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=8701</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=8701"/>
		<updated>2026-02-10T22:31:31Z</updated>

		<summary type="html">&lt;p&gt;Boiarino: /* Dell servers hardware trick(s) */&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 to work. If BIOS does not remember time setting after power unplugged, on-board battery may need to be replaced&#039;&#039;&#039;&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) ==&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;
Set root password (see instractions below), if you want to become superuser by typing just &#039;&#039;su&#039;&#039;. If becoming superuser by typing &#039;&#039;sudo su&#039;&#039; is good enough, do nothing (in that case graphics will not work in superuser mode).&lt;br /&gt;
&lt;br /&gt;
Install useful pachages:&lt;br /&gt;
 yum install ncdu mysql&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&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>
</feed>