Author Archives: amida168

How to Install Debian Packages on Scientific Linux 6

I have been asked to install quite a few programs on a machine running Scientific Linux 6. Some of the programs do not offer rpm package or source code. The only way to install them is through apt-get. In order for me to install these programs on Scientific Linux, I need to convert the deb packages to rpm format. Before you follow the following procedures, note that this is not supported and it could break your system. Use it as the last resort and test them in a testing environment first. I will use a package called libgtkglext1 as an example.

  1. You will need a Debian based distribution to get the packages. You can install one using VitrualBox if you do not have access to a new machine.
  2. On the Debian box, install the alien package.
    sudo apt-get install alien
  3. We first need to get the deb package without installing it. Note that there might be other packages needed. Make a note of the supporting package names.
    sudo apt-get --download-only install libgtkglext1
  4. Find out the file name of the deb package. Do this for all the packages needed.
    ls /var/cache/apt/archives/libgtkglext1*
  5. Convert the deb file to rpm file. The last argument is from the output of step 4. Remember to convert the supporting packages too.
    alien --to-rpm --scripts /var/cache/apt/archives/libgtkglext1_1.2.0-2_amd64.deb
  6. Transfer the rpm file to the machine and install it.
    sudo rpm -Uvh libgtkglext1-1.2.0-3.x86_64.rpm


How to Setup AFP Service on Scientific Linux 6

I setup Samba service for a group of Mac users for file sharing. After a couple of months, the users are not satisfied with the performance and constant problems with permissions. I then setup AFP service and see if it works better. The setup did not take long and the users are happy with it so far. This is the first time I setup AFP service. I just want to write down the steps I used to install it so I can refer to them later.

  1. The service is provided by netatalk package. The first step is to install it if it’s not already installed.
    sudo yum install netatalk
  2. Edit netatalk.conf. On Scientific Linux 6, the configuration files are in /etc/netatalk. Make sure you have these lines.
  3. Edit afpd.conf in the same directory. Note that I want to use Kerberos, so I included them in here. Otherwise, you can remove and the second line.
     - -tcp -noddp -uamlist,, -nosavepassword \
    -k5service afpserver -k5keytab /etc/krb5.keytab -k5realm MYCOMPANY.COM
  4. Edit AppleVolumes.default and have this line at the end.
    /path_to_afp_share allow:@groupname options:usedots,upriv

    replace the path_to_afp_share with the path of the directory you want to share. Replace the groupname with your group.

  5. Start the netatalk service
    sudo service netatalk start
  6. Test the AFP service. If it runs OK, type this command to set it to run at boot.
    sudo chkconfig netatalk on

How to Stop systemd-tty-ask-password-agent Wall Message on Scientific Linux 7

I was trying a new way to setup my Linux machine for Enterprise authentication. I got it to work partially. There is a message which keeps popping up in terminal window:

Broadcast message from [email protected] (Tue 2015-01-06 10:39:34 EST):

Password entry required for 'Password for user@//' (PID 9943).
Please enter password with the systemd-tty-ask-password-agent tool!

To turn off this message, type this command in a terminal:

sudo systemctl stop systemd-ask-password-wall.service

How to Enable the On-Board Video Card and PCIe Video Card Simultaneously on a Gigabyte 78LMT-USB3 Motherboard

I recently built a computer using a Gigabyte 78LMT-USB3 motherboard. The board has an on-board graphic card. I also installed an additional AMD/ATI HD 3400 card to connect the computer to two monitors using HDMI ports. After I’ve done assembling the computer, I found that only one video card is enabled at any given time. If I specify the on-board video card as the primary display, the PCIe AMD/ATI HD3400 is disabled. If I specify the PCIe video card as the primiary display, the on-board video card is disabled.

I contacted Gigabyte support hoping to find a way to enable both the on-board video card and the PCIe AMD/ATI HD3400 card. Surprisingly, I got the answer pretty quickly. The tick is to enable Surround View. Here are the steps:

  1. Reboot the machine.
  2. Immediately press DEL key to enter BIOS when the machine boots up.
  3. Select MB Intelligent Tweaker (M.I.T.) and press Enter.
  4. Select IGX Configuration and press Enter.
  5. Select Surround View and change it to Enabled.

Note that this option is only available for ATI video cards.

How to Install Numpy and Scipy on Rocks Cluster 6.1.1

I recently installed Numpy and Scipy on a cluster built with Rocks 6.1.1. The guide I used was based upon this wiki page. Python was installed under this directory: /share/apps/python . Here are the steps I took.
Python installation

tar zxvf Python-2.7.8.tgz
cd Python-2.7.8
./configure --prefix=/share/apps/python --with-readline=gnu
make -j30
make install
cd ..

Lapack installation

tar zxvf lapack-3.5.0.tgz
cd lapack-3.5.0

Edit and change OPTS and NOOPT

OPTS = -O2 -fPIC

make -j20
make blaslib lapacklib tmglib lapack_testing
cd ..

Atlas installation

tar -jxvf atlas3.10.2.tar.bz2
../configure -Fa alg -fPIC --prefix=/share/apps/python --with-netlib-lapack-tarfile=/root/lapack-3.5.0.tgz
cd lib
make shared
make ptshared
cd ..
make install
cd ../..

UMFPACK UFconfig AMD installation


mkdir sparse
tar zxvf UMFPACK.tar.gz
tar zxvf SuiteSparse_config.tar.gz
tar zxvf AMD.tar.gz
mv AMD SuiteSparse_config UMFPACK sparse
cd sparse/SuiteSparse_config

Modify this file . Note that the following listing is for the file content, not commands to input.

CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -m64
F77 = gfortran
F77FLAGS = $(FFLAGS) -O -m64 -fPIC
INSTALL_LIB = /share/apps/python/lib
INSTALL_INCLUDE = /share/apps/python/include
BLAS = -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/share/apps/python/lib -llapack -lf77blas -lcblas -latlas -lgfortran
LAPACK = -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/share/apps/python/lib -llapack -lf77blas -lcblas -latlas -lgfortran

Now, it’s ready for compiling.

make -j20 library
make install

cd ../AMD
make install

cd ..
cp SuiteSparse_config/SuiteSparse_config.h /share/apps/python/include/
cd ..

Fftw installation

tar zxvf ffw-3.3.4.tar.gz
cd ffw-3.3.4
./configure --enable-sse2 --enable-threads --with-combined-threads CFLAGS="-O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -pthread -fPIC -m64" FFLAGS="-g -O2 -fPIC -m64" CXXFLAGS="-g -O2 -fPIC -m64" --prefix=/share/apps/python
make -j20
make install
cd ..

Numpy installation

tar zxvf numpy-1.8.1.tar.gz
cd numpy-1.8.1

Create a site.cfg file. Again, the following is the file content.

library_dirs = /share/apps/python/lib
include_dirs = /share/apps/python/include
atlas_libs = lapack, f77blas, cblas, atlas
amd_libs = amd
umfpack_libs = umfpack, gfortran
libraries = fftw3

Now, let’s build it.

/share/apps/python/bin/python build
/share/apps/python/bin/python install --prefix=/share/apps/python
cd ..

Scipy installation

tar zxvf scipy-0.14.0.tar.gz
cd scipy-0.14.0
/share/apps/python/bin/python build
/share/apps/python/bin/python install --prefix=/share/apps/python
cd ..

HP Printer Smart Install Problem

Printer installation is usually a trivial job that only takes about five to ten minutes. It took me two hours to finally get one installed today! This printer is called a HP Color LaserJet M451dn. The printer is equipped with Smart Install, which is supposed to simplify printer installation. However, it ended up causing major problems for me.

Traditionally, you connect the printer to the computer and then you specify a driver during printer installation. That’s it. It’s very straightforward. The Smart Install is different. When you connect a printer with Smart Install, the printer connects as a CD drive with the installation software. I tried this route and ran the installation software. It did not work. I then followed the second method in the installation guide that came with the printer. The second method requires you to put the driver CD in the CD drive, run the installation software first, and then connect the printer. Not only did it not work, it also took about 20 minutes each time I tried it.

I found out that I was not alone. A lot of people online reported the same problem.

HP LaserJet Pro 400 Color M451dn : problem installing driver

I tried some of the suggestions, but they did not work either. I finally managed to get it working. Here are the steps.

  1. Make sure the printer is not connected to the computer.
  2. Disable Smart Install on the printer. This is done by using the panel on the printer. It’s under Setup Menu -> Service -> Smart Install
  3. Download the latest universal print driver from HP and install it. Enter your model number in this site to find the driver.
  4. Reboot the computer after you install the latest universal print driver.
  5. Connect the printer to your computer using a USB cable.

This should fix it. Otherwise, the other method to try is to connect the printer to the network and install it as a network printer.

How to Override Group ID for LDAP in Enterprise Linux 6.5

I recently set up a Linux server with LDAP user information. The group id (gid) from LDAP is not useful on this server. It took me a while to figure out how to override the group id. The trick is to modify this file /etc/nslcd.conf . Add this line to the file.

map passwd gidNumber "gid_number"

Replace the gid_number with the number you want. Save the file and restart the service.

sudo /sbin/service nslcd restart