CentOS7 指定安装目录

2021-01-04  本文已影响0人  放手緣分
[root@ea364aad1bb8 ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
export softwarebin=/software/usr/bin
export softwaresbin=/software/usr/sbin
export softwarelocalbin=/software/usr/local/bin
export softwarelocalsbin=/software/usr/local/sbin
export PATH=$PATH:$softwarebin:$softwaresbin:$softwarelocalbin:$softwarelocalsbin;
[root@ea364aad1bb8 ~]# cat ~/.bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
export softwarebin=/software/usr/bin
export softwaresbin=/software/usr/sbin
export softwarelocalbin=/software/usr/local/bin
export softwarelocalsbin=/software/usr/local/sbin
export PATH=$PATH:$softwarebin:$softwaresbin:$softwarelocalbin:$softwarelocalsbin;

yum update -y
yum clean all
yum -c /etc/yum.conf clean all

yum -c /etc/yum.conf --installroot=/software --releasever=/ install python3

cp /software/usr/lib64/libpython3.6m.so.1.0 /usr/lib64/

python3 -m pip install whatever

which python3
which pip3
ln -s /software/usr/bin/python3 /usr/bin/python3
ln -s /software/bin/pip3 /usr/bin/pip3
curl -k http://rpmfind.net/linux/epel/7/x86_64/Packages/i/iftop-1.0-0.21.pre4.el7.x86_64.rpm -o iftop-1.0-0.21.pre4.el7.x86_64.rpm

yum -c /etc/yum.conf --installroot=/software --releasever=/ localinstall ./iftop-1.0-0.21.pre4.el7.x86_64.rpm -y
which iftop

ln -s /software/usr/sbin/iftop /usr/sbin/

上一篇 下一篇

猜你喜欢

热点阅读