LDAPS authentication for GALAXY when you use self-signed certificate
The current version of GALAXY (https://usegalaxy.org/) will run into error when using ldaps authentication mechanics. The error is
Traceback (most recent call last):
File “/home/galaxy/galaxy-dist/lib/galaxy/auth/providers/ldap_ad.py”, line 117, in authenticate
ldap.set_option(_opt)
File “/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/ldap/functions.py”, line 135, in set_option
return _ldap_function_call(None,_ldap.set_option,option,invalue)
File “/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/ldap/functions.py”, line 66, in _ldap_function_call
result = func(_args,**kwargs)
ValueError: option error
The function in Python LDAP binary _ldap.so func(_args,**kwargs) does not take the option argument “OPT_X_TLS_REQUIRE_CERT” properly.
The CentOS 7 system version of python-ldap binary has the same issue.
To overcome this, you will need to download the python-ldap source from
wget https://pypi.python.org/packages/67/d9/fa0ea70d1792875745116ad62ac8d4bcb07550b15cded591bb57df6a6d9a/python-ldap-2.4.32.tar.gz#md5=7c46c8a04acc227a778c7900c87cdfc7
then install certain devel package using
yum install openldap-devel
then build the source by running
python setup.py build
Afterward, you do not need to replace the entire ldap directory, but only overwrite the _ldap.so file in your galaxy/.venv/lib/python2.7/site-packages/ by the file from your build in ./build/lib.linux-x86_64-2.7/ folder.
Then the ldaps will work.
Installing Melview on CentOS7
git clone http://users.fmrib.ox.ac.uk/~flitney/melview.git
wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora-secondary/releases/14/Everything/arm/os/Packages/python-EnthoughtBase-3.0.5-1.fc14.noarch.rpm
yum install python-EnthoughtBase-3.0.5-1.fc14.noarch.rpm
yum install python-matplotlib-qt4 python-matplotlib python-pyside python-configobj
pip install -U pip
pip install -U traits traitsui nibabel pyface
cd melview
python ./setup.py install
Linux create salted password
Method 1
openssl passwd -1 -salt xyz yourpass
Method 2
makepasswd –clearfrom=- –crypt-md5 <<< YourPass
Method 3
echo "username:password" | chpasswd
Or you can use encrypted password with chpasswd first generate it using :
perl -e 'print crypt("YourPasswd", "salt"),"\n"'
then later you can use generated password to update
echo "username:encryptedPassWd" | chpasswd -e
this encrypted password we can use to create new user with password
Ex.
useradd -p 'encryptedPassWd' username
Method 4
echo -e "md5crypt\npassword" | grub | grep -o "\$1.*"
Yum is not compatible with Matlab Runtime
So do not put matlab runtime into ld.so.conf.d.
If yum broken, remove that file and do ldconfig.
du only local files
sudo find . -maxdepth 1 -type d ! -name . -exec du -sh ‘{}’ \; | sort -h
Matlab: libGL error: dlopen /usr/lib64/dri/swrast_dri.so failed
Starting Matlab R2015a or newer in CentOS7 or recent version of Fedora, the error
libGL error: dlopen /usr/lib64/dri/swrast_dri.so failed
will rise through does not affect the normal working of Matlab.
This problem is caused by the libstdc++.so.6 coming with Matlab.
Matlab carries statically linked libstdc++.so.6.0.17 in /matlab_folder/sys/os/glnxa64. When the system version of libstdc++.so.6 is lower than the Matlab carried version, Matlab will run without rising any errors. If your system’s libstdc++.so.6 version is higher than the matlab version, you will see the above error.
The cure is to use link to your system version of libstdc++.so.6 instead of the link to libstdc++.so.6.0.17 in /matlab_folder/sys/os/glnxa64.
For example, if in CentOS7, you can do
rm -f /matlab_folder/sys/os/glnxa64/libstdc++.so.6
ln -s /usr/lib/libstdc++.so.6.0.19 /matlab_folder/sys/os/glnxa64/libstdc++.so.6
and matlab will work without this error.
htdigest
htdigest [-c for create password file] password_file_name ‘realm name’ username
it will prompt you twice for a password.
qap installation
pip install –upgrade numpy scipy && pip install –upgrade nipype nibabel nitime pyyaml pandas
cd qap
python setup.py install
Mount cifs through ssh tunnel
on local:
ssh -N -L 139:127.0.0.1:445 user@remote.host.name
on local:
mount -t cifs -o username=user,version=3 //localhost/user/ mountpoint
R update packages
install.packages(
lib = lib <- .libPaths()[1],
pkgs = as.data.frame(installed.packages(lib), stringsAsFactors=FALSE)$Package,
type = ‘source’
)
# store_packages.R
#
# stores a list of your currently installed packages
tmp = installed.packages()
installedpackages = as.vector(tmp[is.na(tmp[,"Priority"]), 1])
save(installedpackages, file="~/Desktop/installed_packages.rda")
# restore_packages.R
#
# installs each package from the stored list of packages
load("~/Desktop/installed_packages.rda")
for (count in 1:length(installedpackages)) install.packages(installedpackages[count])