Archive for the ‘Installation’ Category

I had a problem where one user could not print in BoardStation. The problem was that nothing happened when they went to print. It turned out to be a problem for me as well. I had one other user on a different computer that didn’t have this problem. So I made sure that all the same packages were installed on both computers and that the same settings were used. It didn’t matter, the ezprint window would not pop up in any BoardStation program.

After a day of messing around with things, I finally found the problem was in the setting of LD_LIBRARY_PATH. If I included the directory containing the library that specctra needed (/net/sw/cadence/spb/spb16.5/tools.lnx86/lib) then the print file wouldn’t appear. If I took that library out, the print window popped up without a problem.

Unfortunately, without that library, the specctra program would not run. And both of our engineers still use specctra for routing. So I wanted to get both programs working correctly at the same time.

The solution was to add /lib and /usr/lib to the beginning of the LD_LIBRARY_PATH environment variable. So now my LD_LIBRARY_PATH variable looks like this:

$ printenv LD_LIBRARY_PATH
/lib:/usr/lib:/net/sw/cadence/spb/spb16.5/tools.lnx86/lib:/usr/lib64/root:/net/sw/wxWidgets-2.8.12/x64/lib

and both programs work correctly.

Installed a new server with RHEL6 and was trying to get the synopsys license working on it. I kept getting this error,

[maryh@eshop bin]$ ./lmgrd
./lmgrd: Command not found.

even though that command was present in that directory.

The problem was I was missing some 32-bit packages on the system. I installed:

# yum install redhat-lsb-core.i686

which installed a bunch of packages. After that, everything worked as expected.

In order to get our lmgrd command running in 64-bit rhel6, need to install redhat-lsb.i686 package. This installs a bunch of other packages as well.

Before installing this package, the lmgrd command gave this error:

[root@server bin]# ./lmgrd
-bash: ./lmgrd: /lib/ld-lsb.so.3: bad ELF interpreter: No such file or directory

Afterwards, it worked fine.

We needed to upgrade our current trac system to RHEL6. Here’s basically how I did it.

-Install RHEL6 Workstation

-Additional packages we were going to need: mod_ssl, mod_wsgi, ImageMagick, graphviz, libpng-static

[ ~]# easy_install Trac
[ web]# pwd
/nfs/net/web
[ web]# cp -Rp lappd-trac lappd-trac-rhel6
[ conf]# tracd --port 8000 /net/web/lappd-trac-rhel6/LAPPD

Opening a browser gave this error:

(The Trac Environment needs to be upgraded. Run “trac-admin /net/web/lappd-trac-rhel6/LAPPD upgrade”)

[ conf]# trac-admin /net/web/lappd-trac-rhel6/LAPPD upgrade
[ conf]# trac-admin /net/web/lappd-trac-rhel6/LAPPD wiki upgrade

Restarting the test on port 8000, works, but got errors:

/nfs/net/web/lappd-trac-rhel6/LAPPD/plugins/graphviz-0.7.5-py2.6.egg/graphviz/graphviz.py:23: DeprecationWarning: the sha module is deprecated; use the hashlib module instead

[ plugins]# easy_install hashlib

Downloaded the graphviz source and unzipped, then ran:

[ 0.11-0.7.5]$ python setup.py bdist_egg
[ 0.11-0.7.5]$ cd dist
[ dist]$ easy_install graphviz-0.7.5dev-py2.6.egg

Other plugins that we’d need.

[ site-packages]# easy_install https://trac-hacks.org/svn/datefieldplugin/0.11/
[ site-packages]# easy_install -U -Z http://trac-hacks.org/svn/customfieldadminplugin/0.11
[ site-packages]# easy_install http://trac-hacks.org/svn/iniadminplugin/0.11
[ site-packages]# easy_install http://trac-hacks.org/svn/citemacro/0.11

We also had been using the TracMath plugin, I installed it, but as soon as it was activated, our system crashed. I looked around to see if we were perhaps missing a required package, but couldn’t find anything. So, I have disabled this plugin.

If we attempt to install this plugin, when we try to upgrade the database, we get this error:

[~]# trac-admin /net/web/lappd-trac/LAPPD upgrade
TypeError: __init__() got an unexpected keyword argument 'unique'

To fix, it depends on where the plugin was installed. For the system, delete it from /usr/local/lib/python2.6/site-packages. For the project, it will be in PROJECT_HOME/plugins. After deleting, restart the webserver.

I got some errors about latex style files missing. The ones in question were: type1ec.sty and preview.sty. I fixed this by downloading them from CTAN.org, unzipping the files, and running:

tex <filename.ins>

Then I moved the entire directory, in my case one for preview and one for type1ec to /usr/share/texmf/tex/latex. Then run texhash and things were good.

At some point, I also ran fmtutil-sys –missing, which may or may not have helped. I’m not sure.

How to authenticate against and openldap server, in Apache.

Since we’re sending credentials, we want everything to be over https, so everything here is in the /etc/httpd/conf.d/ssl.conf file. I’m calling the openldap system, liberty.example.com and the system running the webserver, wishbone.example.com. The url for the site is then https://wishbone.example.com.

Right after SSL Global Context, add this line:

LDAPTrustedGlobalCert CA_BASE64 /opt/certs/ldap-server.pem

(This file is the certificate for your openldap system. It’s self-signed and a CA as well.)

Make a self-signed certificate for wishbone that you’ll use for https. If you use the Makefile, both your certificate and key will be in the same file.

SSLCertificateFile /etc/pki/tls/certs/wishbone.pem
SSLCertificateKeyFile /etc/pki/tls/certs/wishbone.pem

At the end of the file, just before the </VirtualHost>, add the following:

LDAPTrustedClientCert CERT_BASE64 /opt/certs/ldap-server.pem
LDAPTrustedMode SSL

<Directory /var/www/html>
Order allow,deny
Allow from all
</Directory>

<Location /login>
AuthType Basic
Authname 'Account Info'
AuthBasicProvider 'ldap'
AuthLDAPURL 'ldaps://liberty.example.com:636/ou=people,dc=liberty,dc=example,dc=com?uid?one'
AuthzLDAPAuthoritative off
Require valid-user
</Location>

I needed to install Trac on an RHEL5 system. This was a bit of a problem since it needed a version of python with threads and the version from RedHat does not have threads. We also have ldap set up for authentication and I wanted Trac to be able to use it.

  1. Compile and install sqlite3.
    ./configure
    make
    make install
    (puts in under /usr/local)
  2. Compile and install subversion (it requires sqlite3, which is why I did that first)
    ./configure
    make
    make install
  3. Compile and install python2.6. RHEL uses the python installed in the system, so installing 2.6 in /usr/local solves our problem.
    ./configure –with-threads –enable-shared
    make
    Here I get these errors:

    Failed to find the necessary bits to build these modules:
    bsddb185           dl                 imageop         
    sunaudiodev     
    

    If you get errors for other packages here, you should be able to install the development package from RedHat to fix those. For the packages listed above, edit setup.py and comment out the sections having to do with these.
    make install

    • Create the file /etc/ld.so.conf.d/libpython2.6.conf and put the following line in it:
      /usr/local/lib
      

      Then run ldconfig

    • Install setuptools
      wget http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086
      [~]# sh setuptools-0.6c11-py2.6.egg
      Processing setuptools-0.6c11-py2.6.egg
      Copying setuptools-0.6c11-py2.6.egg to /usr/local/lib/python2.6/site-packages
      Adding setuptools 0.6c11 to easy-install.pth file
      Installing easy_install script to /usr/local/bin
      Installing easy_install-2.6 script to /usr/local/bin
      
      Installed /usr/local/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg
      Processing dependencies for setuptools==0.6c11
      Finished processing dependencies for setuptools==0.6c11
      
  4. mod_wsgi module
    ./configure –with-python=/usr/local/bin/python2.6
    make
    make install
    (The httpd module is installed in /usr/lib64/httpd/modules)
  5. If not installed, use yum to install httpd. And get it running.
  6. Install Trac
    • easy_install Babel==0.95
    • easy_install Trac
  7. Setup Trac
    • trac-admin /net/web/lappd-trac/LAPPD initenv
      Project name> LAPPD
      Database connection string> sqlite:db/trac.dbj
    • # trac-admin /net/web/lappd-trac/LAPPD deploy /tmp/deploy
      Copying resources from:
        trac.web.chrome.Chrome
          /root/.python-eggs/Trac-0.12.2-py2.6.egg-tmp/trac/htdocs
          /net/web/lappd-trac/LAPPD/htdocs
      Creating scripts.
      
      # pwd
      /net/web/lappd-trac/LAPPD
      # /bin/rm -r htdocs/
      # mv /tmp/deploy/* .
      

      Now we need to make sure that everything worked.

      # python
      Python 2.6.7 (r267:88850, Jan  5 2012, 08:25:37) 
      [GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import trac.web.main
      >>> (no errors, it's ok)
      
  8. Create a software repo to use
    svnadmin create /net/repos/trac/LAPPD
  9. Need to make sure the python bindings for subversion are installed. Go back to where you originally compiled subversion. Edit the Makefile so that SWIG_PY_INCLUDES includes -I/usr/local/include/Python2.6. Otherwise, the next command will give an error about finding Python.h
    make swig-py
    make install-swig-py
    touch /usr/local/lib/python2.6/site-packages/svn-python.pth
    echo /usr/local/lib/svn-python > /usr/local/lib/python2.6/site-packages/svn-python.pth
  10. Make some admin users
    trac-admin /net/web/lappd-trac/LAPPD permission add user1 TRAC_ADMIN
    trac-admin /net/web/lappd-trac/LAPPD permission add user2 TRAC_ADMIN
  11. Go into the Trac website, login (as one of the admins above) and go to admin and repository. Add the repository created. LAPPD: /net/repos/trac/LAPPD
  12. Resync the repository to Trac
    trac-admin /net/web/lappd-trac/LAPPD repository resync ‘LAPPD’
  13. Macros can be added by downloading the zipped file, unzipping it and running python setup.py install. The macros will only be recognized after restarting httpd.

When creating a deployment of Inventor, you are prompted to enter your serial number and product key. By default, the license type selected is Stand-Alone. If you use this, you will HAVE to activate the product before you can use it. And, you are only able to do this once. So, when creating a deployment, be sure to choose the Network as the license type and put in the information for the license server.

Using parted to create partitions on 3TB raid on our new server.

[root@server ~]# parted /dev/sdb
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            

Model: AMCC 9650SE-8LP DISK (scsi)
Disk /dev/sdb: 3000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

(parted) mklabel gpt                                                      
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost.
Do you want to continue?
parted: invalid token: gpt
Yes/No? Yes                                                               
New disk label type?  [gpt]?                                              
(parted) mkpart primary 0 -0                                              
(parted) print

Model: AMCC 9650SE-8LP DISK (scsi)
Disk /dev/sdb: 3000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  3000GB  3000GB               primary       

(parted) quit                                                             
Information: Don't forget to update /etc/fstab, if necessary.             

[root@server ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
366215168 inodes, 732406263 blocks
36620313 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22352 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848, 512000000, 550731776, 644972544

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

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@server ~]# tune2fs -c0 -i0 /dev/sdb1
tune2fs 1.39 (29-May-2006)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds