操作系统:
CentOS Linux release 7.9.2009 (Core)
1.查看数据相关信息
1)查看Caché数据库实例信息
[root@TestServer /]# ccontrol list
Configuration 'CACHE' (default)
directory: /opt/cache
versionid: 2016.2.3.907.11.20719
conf file: cache.cpf (SuperServer port = 1972, WebServer = 57772)
status: running, since Tue Oct 4 12:54:05 2022
state: ok
2)查看Caché数据库私有apache版本信息
[root@TestServer /]# /opt/cache/httpd/bin/httpd -V
Server version: Apache/2.4.12 (Unix)
Server built: May 6 2015 13:42:21
Server's Module Magic Number: 20120211:41
Server loaded: APR 1.4.6, APR-UTIL 1.5.1
Compiled using: APR 1.4.6, APR-UTIL 1.5.1
Architecture: 64-bit
Server MPM: worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D BIG_SECURITY_HOLE
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/usr/cachesys/httpd"
-D SUEXEC_BIN="/usr/cachesys/httpd/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
3)查看Caché数据库私有apache模块信息
[root@TestServer /]# /opt/cache/httpd/bin/httpd -l
Compiled in modules:
core.c
mod_authz_core.c
mod_so.c
http_core.c
mod_mime.c
mod_log_config.c
worker.c
mod_unixd.c
mod_alias.c
2.下载最新的apache依赖包和安装包
依赖包下载地址:
apr下载链接:https://downloads.apache.org/apr/apr-1.7.0.tar.gz
apr-util下载链接:https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz
安装包下载地址:
httpd下载链接:https://downloads.apache.org/httpd/httpd-2.4.54.tar.gz
3.安装编译工具和依赖包
3.1安装编译工具
yum install -y expat-devel gcc openssl-devel pcre-devel libxml2-devel
3.2 安装依赖包
- apr
#解压apr-1.7.0.tar.gz文件并进到目录中
tar -xf apr-1.7.0.tar.gz
cd apr-1.7.0
#编译安装
./configure --prefix=/usr/local/apr
make && make install
- apr-util
#解压apr-util-1.6.1.tar.gz文件并进到目录中
tar -xf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1
#编译安装
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
4.编译安装apache
#停掉Caché私有apache服务。
%SYS>w ##class(Config.Startup).StopWebServer()
#备份原httpd文件,文件位于数据库安装目录下httpd/bin目录中。
cd /opt/cache/httpd/bin
cp -p httpd httpd_old
#解压httpd-2.4.54.tar.gz文件并进到目录中。
tar -xf httpd-2.4.54.tar.gz
cd httpd-2.4.54
#编译安装,模块依据原来的模块信息配置,另外,可以增加ssl模块以支持https。
./configure --prefix=/usr/cachesys/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-mpm=worker --enable-ssl=static --enable-authz_core=static --enable-mime=static --enable-log_config=static --enable-unixd=static --enable-alias=static
make && make install
#将新编译的httpd文件拷贝过来覆盖原来的httpd文件
cp /usr/cachesys/httpd/bin/httpd /opt/cache/httpd/bin
查看Caché数据库私有apache版本及模块信息:
[root@TestServer ~]# /opt/cache/httpd/bin/httpd -l
Compiled in modules:
core.c
mod_authz_core.c
mod_so.c
http_core.c
mod_mime.c
mod_log_config.c
mod_ssl.c
worker.c
mod_unixd.c
mod_alias.c
[root@TestServer ~]# /opt/cache/httpd/bin/httpd -V
Server version: Apache/2.4.54 (Unix)
Server built: Oct 5 2022 12:36:05
Server's Module Magic Number: 20120211:124
Server loaded: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.32 2012-11-30
Compiled using: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.32 2012-11-30
Architecture: 64-bit
Server MPM: worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_PROC_PTHREAD_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/usr/cachesys/httpd"
-D SUEXEC_BIN="/usr/cachesys/httpd/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
5.启动服务测试
#重新启动Caché私有apache服务
%SYS>w ##class(Config.Startup).RestartWebServer()
访问Management Portal测试,OK。
最后,删除新apache的安装目录即可。
rm -rf /usr/cachesys/httpd
Great
Great2!
棒!!!apache+https+GMSSL
谢谢曹工 精彩分享
Great👍
Great4
棒极了
nice~
Excellent !!!
赞!!
Cool !!
perfect
great!
amazing!!!!
Great3!
专业!棒!
Great
Nice!
Nice!!
nice!