Centos5.8常用命令
config network
https://webhostinggeeks.com/howto/how-to-configure-static-ip-address-on-centos-5-8-x86/
iso
http://iso.linuxquestions.org/centos/centos-5.8/
yum source
shell
# /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-5
failovermethod=priority
baseurl=https://vault.centos.org/5.8/os/x86_64/
gpgcheck=0
golang
shell
wget https://dl.google.com/go/go1.9.linux-amd64.tar.gz
tar -zxf go1.9.linux-amd64.tar.gz -C /usr/local/ && rm -rf go1.9.linux-amd64.tar.gz
echo -e "\nexport GOPATH=\$HOME/go\nexport PATH=\$PATH:/usr/local/go/bin:\$GOPATH/bin\n" | tee -a ~/.profile
source ~/.profile
go version
mysql
shell
yum install mysql-server -y
service mysqld start
service mysqld status
git
shell
## git reference
yum install zlib-devel -y
yum install openssl-devel -y
yum install perl -y
yum install cpio -y
yum install expat-devel -y
yum install gettext-devel -y
yum install autoconf -y
yum install gcc -y
yum install curl-devel -y
## install git
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.32.0.tar.gz
tar xzvf git-2.32.0.tar.gz
cd git-2.32.0
make prefix=/usr/local all
make prefix=/usr/local install
echo -e "\nexport PATH=/usr/bin:\$PATH\n" | tee -a /etc/profile
source /etc/profile
upx
shell
wget https://github.com/upx/upx/releases/download/v3.93/upx-3.93-amd64_linux.tar.xz
yum install xz -y
xz -d upx-3.93-amd64_linux.tar.xz && tar xvf upx-3.93-amd64_linux.tar
rm -rf upx-3.93-amd64_linux.tar
mv upx-3.93-amd64_linux/ /usr/local/upx/
ln -s /usr/local/upx/upx /bin/upx
upx -v
# x86
wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-i386_linux.tar.xz
yum install xz -y
xz -d upx-3.96-i386_linux.tar.xz && tar xvf upx-3.96-i386_linux.tar
rm -rf upx-3.96-i386_linux.tar
mv upx-3.96-i386_linux/ /usr/local/upx86/
ln -s /usr/local/upx86/upx /bin/upx86
upx86 -v
git ssl
shell
mkdir ~/tools/https-ca
cd ~/tools/https-ca
curl http://curl.haxx.se/ca/cacert.pem -o cacert.pem
git config --global http.sslCAInfo /home/slvher/tools/https-ca/cacert.pem
cat ~/.gitconfig
git clone https://github.com/git/git.git
openssl
shell
perl-5.10.0.tar.gz
openssl-1.1.1l.tar.gz
# /usr/local/openssl/openssl-1.1.1l
ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1
ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
curl-7.78.0.tar.gz
./configure --with-ssl=/usr/local/openssl/openssl-1.1.1l
make && make install
time
shell
date -s "27 MAY 2022 11:40:00
hwclock -w
hwclock -r