cd /usr/local/src/
wget http://mama.indstate.edu/users/ice/tree/src/tree-2.0.2.tgz
tar xf tree-2.0.2.tgz ;cd tree-2.0.2/
vim Makefile
PREFIX=/apps/tree
grep 2.0.2 *
sed -i 's/v2.0.2/v8.8.8/' tree.c
make && make install
hash -r
which tree
rm -rf /usr/local/sbin/tree
ln -s /apps/tree/bin/tree /usr/local/sbin/
[root@rocky ~]# tree --version
tree v8.8.8 (c) 1996 - 2022 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro
cmatrix源码编译
yum install ncurses-devel
wget https://jaist.dl.sourceforge.net/project/cmatrix/cmatrix/1.2a/cmatrix-1.2a.tar.gz
tar xf cmatrix-1.2a.tar.gz
cd cmatrix-1.2a
./configure && make && make install
$ cmatrix
$ cmatrix -b -u 3 -C blue
httpd源码编译
wget https://dlcdn.apache.org/httpd/httpd-2.4.54.tar.gz
tar xf httpd-2.4.54.tar.gz
cd httpd-2.4.54/
./configure --prefix=/apps/httpd --sysconfdir=/apps/httpd/etc/
dnf -y install apr-devel apr-util-devel pcre-devel redhat-rpm-config
make -j 2 && make install
#####################################################################################
一键安装
#!/bin/bash
CPUS=`grep -c process /proc/cpuinfo`
HTTPD_VERSION=2.4.54
INSTALL_DIR=/apps/httpd
yum -y install apr-devel apr-util-devel pcre-devel redhat-rpm-config gcc make openssl-devel wget
cd /usr/local/src
wget -P /usr/local/src https://dlcdn.apache.org/httpd/httpd-${HTTPD_VERSION}.tar.gz --no-check-certificat || { echo "httpd is not get" ;exit 100 ;}
tar xf httpd-${HTTPD_VERSION}.tar.gz
cd httpd-${HTTPD_VERSION}
./configure --prefix=${INSTALL_DIR} --sysconfdir=${INSTALL_DIR}/etc/
make -j $CPUS && make install
ln -s /apps/httpd/bin/apachectl /usr/local/bin/
cat > /apps/httpd/htdocs/index.html << EOF
<html><body><h1>welcome to 123</h1></body></html>
EOF
apachectl start && echo "安装成功,请访问`hostname -I`"