2020年11月30日 星期一

DReichLab / EIG 安裝摘要(debian 10)

target=/opt
src=https://github.com/DReichLab/EIG/archive/v7.2.1.tar.gz

apt-get install -y libgsl0-dev libopenblas-dev gfortran liblapacke-dev
pwd=$(pwd)
cd $target
wget -O- $src |tar zxv
cd EIG-7.2.1/src
sed  -i 's/# override LDLIBS += -llapacke/override LDLIBS += -llapacke/g' Makefile
make
make install
cd $pwd
for i in $(find ${target}/EIG-7.2.1/bin/ -type f  -perm /a=x);do ln -s $i /usr/local/bin/$(basename $i);done;

Python pip 常用指令

pip list    列出安裝清單
pip install :pacakagename:    安裝    
pip install -v :packagename:==1.0 安裝指定版本
pip install -U :pacakagename:    更新
pip uninstall :pacakagename:    移除
pip install -r :requirements.txt:    安裝清單
pip freeze > :requirements.txt:        輸出清單

EIGENSOFT 安裝摘要

apt-get install -y libgsl0-dev libopenblas-dev gfortran liblapacke-dev
wget https://storage.googleapis.com/broad-alkesgroup-public/EIGENSOFT/EIG-6.1.4.tar.gz

安裝 RTG Tools

#!/bin/bash
# RTG Tools
# https://github.com/RealTimeGenomics/rtg-tools

apt install -y ant
target=/opt
cd $target
git clone https://github.com/RealTimeGenomics/rtg-tools.git
cd rtg-tools
ant runalltests
ant zip-nojre
cd $target
unzip ${target}/rtg-tools/dist/*
                              

安裝 vcflib

Debian/Ubuntu
apt-get install libvcflib-tools libvcflib-dev

by source
#!/bin/bash
#https://github.com/vcflib/vcflib

target=/opt
pwd=$(pwd)
apt install -y git make cmake libbz2-dev liblzma-dev libc6-dev
cd $target
git clone --recursive https://github.com/vcflib/vcflib.git
cd vcflib
make -j
cd bin
for i in $(find ${target}/vcflib/bin/ -type f  -perm /a=x);do ln -s $i /usr/local/bin/$(basename $i);done;
cd $pwd

安裝 vcftools

 #!/bin/bash
# http://vcftools.sourceforge.net/

src=https://nchc.dl.sourceforge.net/project/vcftools/vcftools_0.1.13.tar.gz?viasf=1
target=/opt
pwd=$(pwd)
mkdir -p ${target}
cd $target
wget -O- $src |tar zx
cd vcftools_0.1.13
make
cd bin
for i in $(find ${target}/vcftools_0.1.13/bin/ -type f  -perm /a=x);do ln -s $i /usr/local/bin/$(basename $i);done;
cd $pwd

安裝 bcftools

 #!/bin/bash
# install  bcftools
# https://samtools.github.io/bcftools/

pwd=$(pwd);
target=/opt/
cd ${target};
apt install -y git automake libgsl-dev libcurl4-openssl-dev
git clone --recurse-submodules git://github.com/samtools/htslib.git

git clone git://github.com/samtools/bcftools.git
cd bcftools
# The following is optional:
#autoheader && autoconf && ./configure --enable-libgsl --enable-perl-filters
make
ln -s ${target}/bcftools/bcftools /usr/local/bin/bcftools
cd ${pwd};

安裝 plink 2

 #!/bin/bash
# install PLINK 2.00 alpha
# https://www.cog-genomics.org/plink/2.0/

src=http://s3.amazonaws.com/plink2-assets/alpha2/plink2_linux_x86_64.zip
src=https://s3.amazonaws.com/plink2-assets/plink2_linux_x86_64_20211125.zip
target=/opt/PLINK2a


[ $(which busybox) ]&& { for i in wget unzip;do [ -f "/usr/local/bin/${i}" ] || ln -s $(which busybox) /usr/local/bin/${i}; done; };
for i in unzip wget;do [ $(which ${i}) ]&& : || { echo check ${i}: not found ${i}! &&exit 1; } ;done;
[ -d "$target" ]&&mv ${target} ${target}.$(date +%Y-%m-%d-%H-%M);
mkdir -p $target;cd $target;
echo $target >readme.txt;echo $src >>readme.txt
wget -q -O- $src | unzip -;
chmod a+x plink2;cd -;
for i in plink2;do [ -f "/usr/local/bin/${i}" ]&&mv /usr/local/bin/${i} /usr/local/bin/${i}.$(date +%Y-%m-%d-%H-%M);   ln -s ${target}/${i} /usr/local/bin/${i};done;
~      

Debian 10 安裝 Java

OpenJDK 11
apt update;apt install default-jdk

2020年11月24日 星期二

Proxmox backup server 指令摘要

 proxmox-backup-manager datastore remove datastore01

Proxmox backup Server 安裝 OpenMediaVault 摘要

apt-get install --yes gnupg
wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key
apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc"

cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
deb https://packages.openmediavault.org/public usul main
# deb https://downloads.sourceforge.net/project/openmediavault/packages usul main
## Uncomment the following line to add software from the proposed repository.
# deb https://packages.openmediavault.org/public usul-proposed main
# deb https://downloads.sourceforge.net/project/openmediavault/packages usul-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
# deb https://packages.openmediavault.org/public usul partner
# deb https://downloads.sourceforge.net/project/openmediavault/packages usul partner
EOF

export LANG=C.UTF-8
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key
apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc"
apt-get update
apt-get --yes --auto-remove --show-upgraded \
    --allow-downgrades --allow-change-held-packages \
    --no-install-recommends \
    --option Dpkg::Options::="--force-confdef" \
    --option DPkg::Options::="--force-confold" \
    install openmediavault-keyring openmediavault

omv-confdbadm populate

wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash

2020年11月13日 星期五

Debian 10 R 3 升級 R 4

apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'

echo "deb https://cloud.r-project.org/bin/linux/debian buster-cran40/" >/etc/apt/sources.list.d/r.list

apt update
apt upgrade

2020年11月11日 星期三

2020年11月9日 星期一

Windows 10 系統發生 1272 錯誤

regedit.msc

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] , 修改或新增[AllowInsecureGuestAuth] = 1 (DWORD)

2020年11月3日 星期二

LEAF 使用 TFTP 備份設定檔

TFTP_SERVER="192.168.1.1"
HOST=`hostname`

TMP_DIR="/tmp"
CFG_FILE=`echo $TMP_DIR"/configdb.lrp"`

APKG="/usr/sbin/apkg"
TFTP="/usr/bin/tftp"

OUTFILE=`date +%Y-%m-%d_%k_%M_%S`
OUTFILE=`echo $HOST-$OUTFILE-configdb.lrp`

CMD="put $CFG_FILE  $OUTFILE"


echo "tftp file"
$APKG -o $TMP_DIR
$TFTP $TFTP_SERVER -c $CMD


OUTFILE=`echo $OUTFILE-list`
CMD="put $TMP_DIR/list $OUTFILE"
$APKG -l >$TMP_DIR/list
$TFTP $TFTP_SERVER -c $CMD