编译安装cmatrix
#1安装相关包
[root@centos8 ~]#dnf install gcc make autoconf ncurses-devel
#2 下载并解压缩包
[root@centos8 ~]#cd /usr/local/src
[root@centos8 ~]#wget
https://github.com/abishekvashok/cmatrix/releases/download/v2.0/cmatrix-v2.0-
Butterscotch.tar
[root@centos8 ~]#tar xvf cmatrix-v2.0-Butterscotch.tar
#3 配置
[root@centos8 ~]#cd cmatrix
[root@centos8 cmatrix]#./configure --prefix=/apps/cmatrix ##指定安装目录
#4 编译并安装
[root@centos8 cmatrix]#make && make install
#5 配置环境
[root@centos8 ~]#echo 'PATH=/apps/cmatrix/bin:$PATH' > /etc/profile.d/cmatrix.sh
[root@centos8 ~]#. /etc/profile.d/cmatrix.sh
#或者用软链接实现
[root@centos8 ~]#ln -sv /apps/cmatrix/bin/cmatrix /usr/local/bin/
#6运行
[root@centos8 ~]#cmatrix -a -b -C yellow
7#帮助
[root@centos8 ~]#vim /etc/man_db.conf
MANDATORY_MANPATH /apps/cmatrix/share/man
[root@centos8 ~]#man cmatrix
范例:centos8 编译安装 httpd-2.4.43
#安装前准备:关闭防火墙和SELinux#1 安装包
[root@centos8 ~]#dnf install gcc make apr-devel apr-util-devel pcre-devel
openssl-devel redhat-rpm-config
#2 下载并解压缩包
[root@centos8 ~]#tar xvf httpd-2.4.43.tar.bz2 -C /usr/local/src
#3 配置
[root@centos8 ~]#cd /usr/local/src/httpd-2.4.43/
[root@centos8 httpd-2.4.43]#./configure --prefix=/apps/httpd24 --
sysconfdir=/etc/httpd24 --enable-ssl
#4 编译并安装
[root@centos8 httpd-2.4.43]#make -j 4 && make install
#5 配置环境
[root@centos8 ~]#echo 'PATH=/apps/httpd24/bin:$PATH' > /etc/profile.d/httpd24.sh
[root@centos8 ~]#. /etc/profile.d/httpd24.sh
#6运行
[root@centos8 ~]#apachectl 启动httpd,可以查看INSTALL
PREFIX/bin/apachectl start
#7 指定用apache用户运行
[root@centos8 ~]#useradd -r -s /sbin/nologin -d /var/www -c Apache -u 48 apache
[root@centos8 ~]#vim /etc/httpd24/httpd.conf //conf目录中
user apache
group apache
#8生效和验证
[root@centos8 ~]#apachectl restart
#查看
[root@centos8 ~]#ps aux
卸载软件,删除安装目录就可以