I tried so much to install new version of OpenPBS and I encountered many errors. I will tell them so you can install easily.
Section 1 — Install Packages
sudo apt-get install gcc make libtool libhwloc-dev libx11-dev libxt-dev libedit-dev libical-dev ncurses-dev perl python-dev tcl-dev tk-dev swig libexpat-dev libssl-dev libxext-dev libxft-dev autoconf automake
Section 2 — Install PostgreSQL
We have to install PostgreSQL . I recommend to install PostgreSQL seperately.
# Create the file repository configuration:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# Update the package lists:
sudo apt-get update
Install the latest version of PostgreSQL
sudo apt-get -y install postgresql
If you want another version, you can use ‘postgresql-12’ instead of postgresql like this:
sudo apt-get -y install postgresql-12
Install dependencies
sudo apt-get install postgresql-server-dev-all
sudo apt-get install postgresql-contrib
Section 3— Install the prerequisite packages for running OpenPBS
sudo apt-get install expat libedit2 python sendmail-bin sudo tcl tk
Section 4 — Upgrade python 2 to python 3
If your system has 2(or more) versions of python it can be problem. I got error when my python version was 2.7 so i changed it and vola everything works.
Probably you will encounter this problem:
shared_python_utils.c:42:10: fatal error: Python.h: No such file or directory
I searched this problem so much i didn’t find exact solution but I know this problem related with libraries. So what i did ? I changed python version 2.7 to 3.6. I didn’t checked 3.7+ versions If you test it tell me.
Solution:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
sudo apt-get install python3-dev
Note:
Actually you can ignore this section and continue to doing other steps.
But if you get this error you will have to delete extracted openPBS
folder and do these operations again. After it will work.
My advice: If it is not important change python 2 to 3 in these section and go on peacefully.
Section 5—Download OpenPBS and install
You can download with these command or you can go website and download from there. Also github release files link which you can download from there.
cd Downloads/
sudo wget https://github.com/openpbs/openpbs/archive/refs/tags/v20.0.1.tar.gz
Extract files and enter OpenPBS folder.
tar -xpvf v20.0.1.tar.gz
cd openpbs-20.0.1/
Generate the configure script and Makefiles.
./autogen.sh
Configure the build for your environment
./configure --prefix=/opt/pbs
Build OpenPBS by running “make”.
make
Install OpenPBS
sudo make install
Configure
sudo /opt/pbs/libexec/pbs_postinstallsudo chmod 4755 /opt/pbs/sbin/pbs_iff /opt/pbs/sbin/pbs_rcp
Start services
sudo /etc/init.d/pbs start
All configured. OpenPBS services should now be running
. /etc/profile.d/pbs.sh
Section 6 — Test
qstat -B
Output:
Server Max Tot Que Run Hld Wat Trn Ext Status
---- ----- ----- ----- ----- ----- ----- ----- ----- -----------
host1 0 0 0 0 0 0 0 0 Active
Create new job
echo "sleep 60" | qsub
You can see jobs via this command
qstat -a
You can see this article for Host/Nodes configuration.
https://medium.com/@anarmammadli/how-to-install-openpbs-20-0-1-on-ubuntu-b1cc62cfb0ec
Post a Comment