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.*"

 
By leizhou, 21. June 2016, 17:07 hr

So do not put matlab runtime into ld.so.conf.d.
If yum broken, remove that file and do ldconfig.

 
By leizhou, 17. June 2016, 16:07 hr

sudo find . -maxdepth 1 -type d ! -name . -exec du -sh ‘{}’ \; | sort -h

 
By leizhou, 14. June 2016, 16:10 hr

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.

 
By leizhou, 1. April 2016, 18:30 hr

htdigest [-c for create password file] password_file_name ‘realm name’ username
it will prompt you twice for a password.

 
By leizhou, 12. November 2015, 16:27 hr

pip install –upgrade numpy scipy && pip install –upgrade nipype nibabel nitime pyyaml pandas
cd qap
python setup.py install

 
By leizhou, 31. August 2015, 13:33 hr

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

 
By leizhou, 13. July 2015, 17:24 hr

install.packages(
lib = lib <- .libPaths()[1],
pkgs = as.data.frame(installed.packages(lib), stringsAsFactors=FALSE)$Package,
type = 'source'
)

 
By leizhou, 28. April 2015, 18:04 hr

Estimated partition size/usage (off 223.5GB HD)
/ 63GB 18GB 28%
swap 16GB
/usr/local 127.75GB 33GB 26%
/boot 765MB 201MB 21%
/data/home0 16GB 34MB 1%

Step 1: setup nfs to export CentOS7 full package and ks.cfg file, start the NFS server, do not forget to lift the firewall so that it will be seen by the target computer.
Step 2: kickstart install base packages:
Boot into CentOS7 netinstall DVD, press tab and add option: ks=nfs:10.224.105.222:/media/1/ks.cfg
Step 3: Mount /data1
Enable node in server iptable and exportfs
Restart iptable and exportfs in server
Establish mounting line in client /etc/fstab
# mkdir /data1
# mount /data1
Step 4: Install third party repos:
adobe-linux-x86_64.repo adobe-release-x86_64-1.0-1.noarch
yum install http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
atrpms.repo atrpms-repo-7-7.el7.x86_64
yum install http://dl.atrpms.net/all/atrpms-repo-7-7.el7.x86_64.rpm
epel.repo epel-release-7-5.noarch
yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
nux-desktop.repo nux-dextop-release-0-5.el7.nux.noarch
yum install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rp
rpmforge.repo rpmforge-release-0.5.3-1.el7.rf.x86_64
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
Step 5: Install extra packages:
yum install –exclude=x264-libs –exclude=mplayer-1.2 –exclude=faad2 $(cat elsepackages.txt)
The following keys will be imported:
“Fedora EPEL (7) ” /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
“Nux.Ro (rpm builder) ” /etc/pki/rpm-gpg/RPM-GPG-KEY-nux.ro
“ATrpms.net (rpm signing key) ” /etc/pki/rpm-gpg/RPM-GPG-KEY-atrpms
“CentOS-7 Key (CentOS 7 Official Signing Key) ” /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
“Adobe Systems Incorporated (Linux RPM Signing Key) ” /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
Test 1: Check Packages:
sh rpms
Step 6: Disable atrpms.repo and nux-dextop.repo to reduce conflicts:
Disable atrpms.repo
yum erase libva-x11_1 libva-drm1 libva1 libva libdvbpsi7 libdvbpsi9 libdvdcss2 libx264_142 libxvidcore4
yum install ffmpeg ffmpeg-libs gstreamer-plugins-ugly gstreamer1-plugins-ugly libdvdcss mplayer smplayer vlc vlc-core xvidcore x264-libs
Disable nux-dextop.repo
Step 7: yum update
Step 8: House keeping:
sync user/group from /data1,
add in “Domain = cluster” in /etc/idmapd.conf
rsync debug’s folder
then reboot
Step 9: Enable rsh
set .rhosts for master node, privilege 644
systemctl enable rsh.socket
systemctl enable rlogin.socket
systemctl start rlogin.socket
systemctl start rsh.socket
append rsh and rlogin in /etc/securetty
Step 10: Add sync for cluster files
Step 11: Set up NFS maps, becareful checking for nobody:nobody and do nfsidmap -c if needed
Step 12: Disable biosdevname, to restore ethx
nano /etc/sysconfig/grub
append “net.ifnames=0 biosdevname=0” behind GRUB_CMDLINE_LINUX line inside the “”
grub2-mkconfig -o /boot/grub2/grub.cfg
rename and edit /etc/sysconfig/network-scripts/ifcfg-??? to ifcfg-eth0 and change the names inside the file
reboot
Step 13: Assign matlab license
su –
mkdir matlab.licenses
matlab
exit
Step 14: Disable root log in
edit /etc/ssh/ssh_config and /etc/ssh/sshd_config according to template
systemctl restart sshd
Step 15: Hide log in screen user list
Create a gdm database for machine-wide settings in /etc/dconf/db/gdm.d/00-login-screen
put in
[org/gnome/login-screen]
# Do not show the user list
disable-user-list=true
dconf update
reboot
Step 16: Establish /etc/host file
Step 17: Set up SGE
copy over sge folder from /data1
establish /etc/profile.d/sge.csh and /etc/profile.d/sge.sh accordingly
edit /etc/services about sge
run install_execd
Step 18: Set up openvpn (optional)
Generate key pairs on server
Copy ca.crt key pairs and client.conf to client
cd /etc/systemd/system
ln -s /lib/systemd/system/openvpn\@.service ./openvpn\@client.service
systemctl enable openvpn\@client.service
systemctl start openvpn\@client.service
Here the “client” can be the name of the server
Step 19: Establish nfs that needs to go through openvpn (optional)
Step 20: Duplicate R packages
On old master:
tmp = installed.packages()
installedpackages = as.vector(tmp[is.na(tmp[,”Priority”]), 1])
save(installedpackages, file=”/data1/installed_packages.rda”)
On new nodes:
load(“/data1/installed_packages.rda”)
for (count in 1:length(installedpackages)) install.packages(installedpackages[count])

 
By leizhou, 28. April 2015, 17:52 hr

Package required: ffmpeg, gifview, mplayer.
Randering gif:
# gifview fn.gif
Converting:
# Convert fn.gif fn.mpg
Examine result:
mplayer fn.mpg

 
By leizhou, 20. March 2015, 10:33 hr

Syndication

July 2016
M T W T F S S
« Jun    
 123
45678910
11121314151617
18192021222324
25262728293031

Linkroll