按照官方文档一步步整
先是按照说明搭建网站
打开Powershell
先来安装Apache
yum -y install httpd httpd-manual mod_ssl mod_perl mod_auth_mysql
直接失败,上网找了一下,我的这个问题用这位的方法就可以解决
No match for argument: mod_auth-mysql,Error: Unable to find a match: mod_auth-mysql
解决办法:
1. yum -y install httpd httpd-manual mod_ssl mod_perl
2. yum -y install httpd httpd-devel
执行完上述代码即可成功安装Apache及其扩展包。
可以执行 httpd -v进行检验,若返回版本号即为安装成功,如下:
[root@iZ0jlefpaeqcxkwjw3gw21Z ~]# httpd -v
Server version: Apache/2.4.37 ()
ok了,下一步安装MySQL
执行
yum -y install mysql-community-server 时报错
Failing package is: mysql-community. The GPG keys listed for the "MySQL 8.0 Community Server" repository are already installed but they are not correct for this package.
解决方法:
先加入一个key
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
然后再执行就可以了
然后mysql剩下的就没什么问题了,再搞PHP
ok又报错了
No match for argument: php-mysql centos无法安装php-mysql模块
解决方法
(10条消息) No match for argument: php-mysql centos无法安装php-mysql模块_魏少-CSDN博客
先加了俩这个再安装,OK了
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装git,竟然没有问题
tomcat启动
https://blog.csdn.net/ligh_sqh/article/details/79497595