Vmware设置为NAT模式,经过Minimal Installation以后,需要做的事情罗列如下。
cp -R /etc/yum.repos.d /etc/yum.repos.d.bak
sed -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://mirrors.tuna.tsinghua.edu.cn|g' -i.bak /etc/yum.repos.d/CentOS-*.repo
dnf makecache && dnf update && dnf upgrade
/etc/sysconfig/network-scripts/ifcfg-ens160
里面的内容(如果没有则新增一个条目):service NetworkManager restart
(如果可能的话,service sshd restart)/etc/resolve.conf
增加或者修改nameserver保持和主机一致dnf install vim git unzip
dnf install gcc gcc-c++ gdb make cmake
curl -O https://www.openssl.org/source/openssl-3.0.0.tar.gz
dnf install perl-IPC-Cmd perl-Pod-Html
tar xf openssl-3.0.0.tar.gz && cd openssl-3.0.0
./Configure && make -j5 && make install
cp /usr/local/lib64/libcrypto.so /usr/lib64 && cp /usr/local/lib64/libssl.so /usr/lib64
ldconfig
curl -O https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz
tar xf Python-3.10.0.tgz && cd Python-3.10.0
./configure --with-openssl=/usr/local --enable-optimizations --prefix=/usr/local/python3.10 --enable-shared CFLAGS=-fPIC
bnf install bzip2-devel ncurses-devel gdbm-devel sqlite-devel tk-devel readline-devel libffi-devel xz-devel
make -j5
(如果其中有什么错误,make clean
,然后再继续make -j5
)make install
/usr/local/python3.10
加入PATH中cp /usr/local/python3.10/lib/libpython3.10.so /usr/lib64/ && ldconfig
npm config set prefix /path/to/global
npm config set cache /path/to/cache