redhat.md

00001 # Red Hat & CentOS Linux {#redhat}
00002 
00003 ##Tested versions
00004 
00005 See the \link installation \endlink page for supported versions.
00006 
00007 ##Installation
00008 On Red Hat, gclib is distributed in an RPM repository. The following steps can be performed to install gclib.
00009 
00010 ### Download Galil's repository information 
00011 
00012 This step installs Galil's RPM repositories and only needs to be done once.
00013 
00014 \attention
00015 * **Red Hat 7 and CentOS 7**
00016  * Point a browser at http://www.galil.com/sw/pub/rhel/7/galilrpm-2-1.noarch.rpm and install the rpm.
00017 
00018 * **Red Hat 6 and CentOS 6**
00019  * Point a browser at http://www.galil.com/sw/pub/rhel/6/galilrpm-2-1.noarch.rpm and install the rpm.
00020 
00021 <!--- $ sudo wget http://www.galil.com/sw/pub/rhel/galil.repo -O /etc/yum.repos.d/galil.repo -->
00022     
00023 ### Install Package
00024 Install gclib package, approve "Installed size" and "Importing GPG key", if prompted.
00025 
00026     $ sudo yum install gclib
00027 
00028 ### Uninstall Package
00029 To uninstall gclib.
00030 
00031     $ sudo yum remove gclib
00032 
00033 ##Installed files
00034 * The gclib shared object files
00035  * /usr/lib/libgclibo.so
00036  * /usr/lib/libgclib.so
00037 * The gclib header files
00038  * /usr/include/gclib_errors.h
00039  * /usr/include/gclibo.h
00040  * /usr/include/gclib.h
00041  * /usr/include/gclib_record.h
00042 * gclib documentation tarball
00043  * /usr/share/doc/gclib/gclib_129_doc.tar.gz
00044 * Example source tarball
00045  * /usr/share/doc/gclib/src/gclib_129_examples.tar.gz
00046 * Source files to modify/rebuild libgclibo.so
00047  * /usr/share/doc/gclib/src/gclibo_129_src.tar.gz
00048 * GalilTools Communication Library (gcl) wrapper
00049  * /usr/share/doc/gclib/src/gclib_129_gcl.tar.gz
00050 * PCI driver files
00051  * /usr/share/doc/gclib/src/gclib_129_pci.tar.gz
00052 
00053 ##Serial Ports and USB
00054 If access to the serial ports or USB (e.g. DMC-4103) is desired through gclib, the following will provide steps to join the correct access group. If using USB, be sure the controller is powered and the usb is plugged in before beginning.
00055 
00056 ###Determine group with access
00057 
00058     $ ls -l /dev/ttyUSB* /dev/ttyS*
00059     crw-rw----. 1 root dialout   4, 64 Mar  3 16:39 /dev/ttyS0
00060     crw-rw----. 1 root dialout   4, 65 Mar  3 16:39 /dev/ttyS1
00061     crw-rw----. 1 root dialout   4, 66 Mar  3 16:39 /dev/ttyS2
00062     crw-rw----. 1 root dialout   4, 67 Mar  3 16:39 /dev/ttyS3
00063     crw-rw----. 1 root dialout 188,  0 Mar  6 11:08 /dev/ttyUSB0
00064 
00065 In the above listing, **dialout** is the group that needs to be joined. **uucp** is another common group that may be listed. 
00066 
00067 ###Add the desired *username* to the group.
00068 
00069     $ sudo gpasswd -a username dialout
00070     [sudo] password for username: 
00071     Adding user username to group dialout
00072 
00073 Log out and back in for change to take effect.
00074 
00075     $ groups
00076     username wheel dialout
00077 
00078 gclib can now connect to serial and usb devices from user *username*.
00079 
00080 ##PCI Controllers
00081 If using a Galil PCI controller, the PCI driver must be installed.
00082 
00083 ###Install prerequisites
00084 
00085     $ sudo yum install kernel-devel-$(uname -r)
00086     $ sudo yum install kernel-headers-$(uname -r)
00087     $ sudo yum install gcc
00088   
00089 ###Extract source and build driver
00090   
00091     $ tar -xf /usr/share/doc/gclib/src/gclib_202_pci.tar.gz
00092     $ make
00093 
00094 ###Copy module and add to kernel
00095 
00096     $ sudo cp galilpci.ko /lib/modules/$(uname -r)
00097     $ sudo depmod
00098     $ sudo modprobe galilpci
00099   
00100 ###Add galil group for access to PCI
00101 
00102     $ sudo groupadd -f -K GID_MIN=100 -K GID_MAX=499 galil
00103     $ sudo cp 90-galilpci.rules /etc/udev/rules.d/
00104     $ sudo udevadm control --reload-rules
00105     $ sudo udevadm trigger
00106     $ sudo usermod -a -G galil username  #exchange "username" with actual user's name
00107 
00108 Logout and back in. The PCI hardware is now available for access.
00109 
00110     $ ls -l /dev/galil*
00111     crw-rw---- 1 root galil 10, 56 Jun  9 11:07 /dev/galilpci0
00112     $ echo -e "\x12\x16\r" > /dev/galilpci0
00113     $ cat /dev/galilpci0 
00114     DMC1846 Rev 1.1a
00115     :
00116 
00117 ##Documentation
00118 The documentation is left as a tarball to minimize disk usage. The latest release version of the user manual is available at the following link.
00119 * http://www.galil.com/sw/pub/all/doc/gclib/html/
00120 
00121 ###Offline html
00122 The following allows viewing of the html docs from the installation.
00123 
00124     $ tar -xzf /usr/share/doc/gclib/gclib_132_doc.tar.gz html
00125     $ firefox html/index.html
00126 
00127 ###Offline pdf
00128 There may be a pdf shipped in the package. The following allows viewing of the pdf docs from the installation.
00129 
00130     $ tar -xzf /usr/share/doc/gclib/gclib_132_doc.tar.gz  gclib_132.pdf
00131     $ evince gclib_132.pdf
00132 
00133