From WolfTech
Jump to navigation Jump to search

Redirect Root Emails

change /etc/aliases, last line. change root: WHATEVER to read root:


Packages to add:

yum update 'packagename'

  • lynx (required by some of our crons)
  • libpng-devel
  • libjpeg-devel (fixed libjpeg error)
  • freetype-devel (fixed freetype2 error)
  • libxml2
  • libxml2-devel (fixed libxml / xml installation issues)
  • aspell-devel (fixed pspell issue)
  • net-snmp
  • net-snmp-devel
  • openldap
  • openldap-devel
  • openldap-clients

The linux kickstart should have these already installed/updated... but best to check.

Yum install 'packagename' these:

  • gcc
  • gcc-c++
  • xpdf
  • bzip2-devel
  • curl-devel
  • gmp-devel

Confirm that you have pdftohtml installed:

 which pdftohtml

You will need to install php-snmp (fixed snmp.h error). Make sure its the current version (RHEL might not see).

LDAP Config

Find the file /etc/openldap/ldap.conf

Add this line:


Without this, AD LDAP will fail.


  • To use the MSSQL extension on Unix/Linux, you first need to build and install the FreeTDS library. Source code and installation instructions are available at the FreeTDS home page:

Get the stable, not current version.

mkdir /opt/freetds-0.82
ln -s /opt/freetds-0.82 /opt/freetds
./configure --prefix=/opt/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld
make install



Login to chronos, su/sudo to root

cp -a /afs/bp/dist/qip62 /root
cd /root
cd qip62
cd .dist
rm -rf .sun4x_58
rm -rf .sun4x_510
cd ../
rm {classes,errors,help,_jvm,report,tmp,etc,jre,qip.pcy,sybase,usr}
mv .dist/ia32_rhel3/* /root/qip62
rm -rf .dist

Point scripts at /root/qip62/BLAH, and be sure to set environment variables as needed in the script, similar to the way their done in the test-qip-micah script, currently in the cron locker.


You'll need to install these drivers in /opt/sybase-12.5/

  • Create folder /opt/sybase-12.5
  • Unpack tar in here. Package provided by ITD - drivers (sybase125.lnx.tar) were in /afs/ when I last looked.
  • Replace the default interfaces with the one at /afs/bp/dist/sybase125/. Don't forget to replace the 'interfaces' file with the one in AFS. Otherwise SYBASE won't know where the NCSU servers are.
cp /afs/bp/dist/sybase125/interfaces /opt/sybase-12.5/interfaces
chmod 755 /opt/sybase-12.5/interfaces 

Also, add the following line to locales.dat (in the /opt/sybase-12.5/locales/ directory) under the linux/english section:

locale = en_US.UTF-8, us_english, utf8


export LANG en_US

would probably also work.


Micah has written a wrapper script (env_wrapper) to run in front of the php cmd so you can skip setting these variables. Be sure to move a copy of it local to the machine.

Just in case heres the variables:

Once unpacked, move into the OCS folder, and run to configure the env variables. OK, so running that didn't seem to work... however, setting the following manually did (use only one of these, depending on the shell you're using):
export SYBASE=/opt/sybase-12.5
export SYBASE_OCS=OCS-12_5
set SYBASE /opt/sybase-12.5


  1. Download from
  2. Install locally in /opt/sqsh/.
mkdir /opt/sqsh-2.1.4
ln -s /opt/sqsh-2.1.4 /opt/sqsh
export SYBASE=/opt/sybase-12.5
export SYBASE_OCS=OCS-12_5
./configure --prefix=/opt/sqsh
make install


Before running:

setenv LANG en_US

(or 'export LANG=en_US')

Install PHP / MySQL Client

Add in IUR Repo for PHP:

wget wget (you'll need to update these to point at the current release:


Since PHP installs no longer bundle MySQL clients, I've had to locally install MySQL clients on CHRONOS. Anyone wishing to use MYSQL support with the PHP CLI, will need to have the MySQL client locally installed on the cron server running the PHP scripts.

 yum install mysql51-devel

Will install mysql51 client, libs, and devel.

Install PHP locally

chronos% mkdir /opt/php-ver
chronos% ln -s /opt/php-ver /opt/php5

chronos% ./configure --enable-cli --disable-cgi --prefix=/opt/php5 \
--exec-prefix=/opt/php5 --with-bz2 --with-kerberos=/usr/kerberos --with-zlib \
--enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-ldap \
--with-snmp --enable-mbstring --with-gmp --enable-exif --with-jpeg-dir \
--with-png-dir --with-freetype-dir --enable-shmop \
--with-gettext --with-pear --with-pic --with-ldap-sasl \
--with-openssl --with-mysql=/usr/bin --with-mysqli=/usr/bin/mysql_config \
--enable-shared --with-sybase-ct=/opt/sybase-12.5/OCS-12_5 --with-mssql=/opt/freetds

chronos% make
chronos% make install
Now you need to create a php.ini file in the /opt/php5/lib folder with the following two lines:
memory_limit = 100M

This will allow for scripts with a much higher memory requirement than the standard 8M. Don't enter anything else as the rest of the defaults (as compiled) are fine.

1/4/2011 results

Following is the output from last reinstallation on 1/4/2011 just in case one of the scripts stopped running.

Notice: Following unknown configure options were used:

--with-ncurses --enable-gd-native-tiff --enable-yp --with-ttf --enable-memory-limit --with-pcntl

Reran without these and updated the example ./config above.

Also dropped --with-pic:

[root@chronos php-5.3.4]# make install Installing PHP CLI binary: /opt/php5/bin/ Installing PHP CLI man page: /opt/php5/man/man1/ Installing build environment: /opt/php5/lib/php/build/ Installing header files: /opt/php5/include/php/ Installing helper programs: /opt/php5/bin/

 program: phpize
 program: php-config

Installing man pages: /opt/php5/man/man1/

 page: phpize.1
 page: php-config.1

Installing PEAR environment: /opt/php5/lib/php/ [PEAR] Archive_Tar - installed: 1.3.7 [PEAR] Console_Getopt - installed: 1.2.3 [PEAR] Structures_Graph- installed: 1.0.3 [PEAR] XML_Util - installed: 1.2.1 [PEAR] PEAR - installed: 1.9.1 Wrote PEAR system config file at: /opt/php5/etc/pear.conf You may want to add: /opt/php5/lib/php to your php.ini include_path /tmp/php-5.3.4/build/shtool install -c ext/phar/phar.phar /opt/php5/bin ln -s -f /opt/php5/bin/phar.phar /opt/php5/bin/phar Installing PDO headers: /opt/php5/include/php/ext/pdo/


  • Received the following error when I tried to make install php 5.1.4. Can also reproduce by running, ./sapi/cli/php. Error caused by --with-mysql=/usr/bin --with-mysqli=/usr/bin/mysql_config.
Installing PEAR environment:      /opt/php5/lib/php/
make[1]: *** [install-pear-installer] Segmentation fault
make: *** [install-pear] Error 2


All cron files are located in /afs/eos/engrservers/cron/ece_cronjobs/

Be sure to run the CRONTAB BACKUP script (/afs/eos/engrservers/cron/ece_cronjobs/crontab/chronsave.php) so you always can restore the most recent version of the crontab.