(3)查看服务的的端口是否启动
ss -tnl
nestal -tan
ss -tunlp
netstal -tanl 等
备注:http默认的端口是80; 数据库的默认端口是3306 dns 的默认端口号是53;
(4)进行数据库的配置工作
使用命令mysql 进入数据库模式;
GRANT ALL ON .* rootdb TO root@'192.168.1.%' IDENTIFIED BY 'root';(创建授权的网 段)
创建数据库 CREATE DATABASE rootdb;
执行生效权限 FLUSH PRIVILEGES;
查看数据库 SHOW DATABASES;
(5)对/etc/my.cnf进行配置工作
[mysqld]
skip_name_resolve=ON 添加这条记录可以不用基于主机名的解析(备注:CentOS6不能添加,7 可以添加,6添加之后重新启动数据库,启动会失败)
(6)查看一下MPM的机制
[iyunv@mageedu conf.modules.d]# vim /etc/httpd/conf.modules.d/00-mpm.conf
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so (这行开启)
备注:数据库可以这样测试一下是否可以链接上,例如 mysql -uroot -h127.0.0.1 -p 默认本地测试;
[iyunv@mageedu wordpress]# mysql -uroot -h127.0.0.1 -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 5.5.47-MariaDB MariaDB Server
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.