阿里云centos7.0服务器配置apache+mysql8.0+php7.0环境

    xiaoxiao2025-05-04  17

    阿里云centos7.0服务器配置apache+mysql8.0+php7.0

    apache安装与配置安装与配置安装一些可能的错误 mysql8.0的安装与配置一些可能的错误 PHP7.0的安装与配置

    apache安装与配置

    详细步骤参考:小左先森的博客

    安装与配置

    安装

    centos7.0在命令上与之前大不一样,现在码写常用的操作httpd的命令 第一、启动、终止、重启

    systemctl start httpd.service #启动 systemctl stop httpd.service #停止 systemctl restart httpd.service #重启

    第二、设置开机启动/关闭

    systemctl enable httpd.service #开机启动 systemctl disable httpd.service #开机不启动

    第三、检查httpd状态

    systemctl status httpd.service

    一些可能的错误

    1、 在启动apache 时出现

    Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details …

    解决:首先 systemctl status httpd查看下状态,然后根据状态显示,解决问题,一般要么是配置文件有语法错误,要么就是端口问题没解决等等。

    检查配置文件出错的方法: 首先找到 检查程序的位置 :

    find / -name apachectl

    结果如下,一般默认的都是这个位置:

    /usr/sbin/apachectl

    然后运行:

    /usr/sbin/apachectl -t

    我在配置虚拟主机时,配置文件出现如下错误:

    AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 172.17.15.244 Set the ‘ServerName’ directive globally to suppress this message

    解决:在httpd.conf文件里面将下面这句的注释去掉

    #ServerName www.example.com:80

    mysql8.0的安装与配置

    一些可能的错误

    1、设置简单密码时发生的错误

    ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    解决:修改两个全局参数: 先执行

    set global validate_password.policy=0;

    再执行

    set global validate_password.length=1;

    更详细的解释参见:~~ 搞定!

    PHP7.0的安装与配置

    后面继续更新。。。。。

    最新回复(0)