MySQL已经安装
Apache是yum安装的
查看httpd包是否可用:
yum list | grep httpd
安装Apache
yum install httpd
开启Apache
systemctl start httpd
测试Apache启动成功

文件路径说明:
服务目录 /etc/httpd
主配置文件 /etc/httpd/conf/httpd.conf
网站数据目录 /var/www/html
配置存储在的/etc/httpd/conf.d/目录
访问日志 /var/log/httpd/access_log
错误日志 /var/log/httpd/error_log

将sqlilab从github下载到本地
cd /var/www/html
git clone https://github.com/Audi-1/sqli-labs.git
[root@zh html]# ls -al
total 8
drwxr-xr-x. 3 root root 39 Nov 14 23:36 .
drwxr-xr-x. 4 root root 33 Nov 14 23:36 ..
-rw-r--r--. 1 root root 20 Nov 14 23:35 info.php
drwxr-xr-x. 78 root root 4096 Nov 14 21:46 sqli-labs
[root@zh html]#
根据https://github.com/Audi-1/sqli-labs 中的Install Instructions:
Open the file "db-creds.inc" which is under sql-connections folder inside the sql-labs folder.
Update your MYSQL database username and password.(default for Backtrack are used root:toor)
并且通过访问下面的路径进一步设置:
http://10.211.55.15/sqli-labs/
Click on the link setup/resetDB to create database, create tables and populate Data.

如果出现如下情况:
SETTING UP THE DATABASE SCHEMA AND POPULATING DATA IN TABLES:

[*]...................Could not connect to DB, check the creds in db-creds.inc: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

管理员权限运行命令提示符,登陆MySQL
mysql -u root -p

修改账户密码加密规则并更新用户密码
Alter user 'root'@'localhost' identified by 'root@123' password expire never;
Alter user 'root'@'localhost' identified with mysql_native_password by 'root@123';
刷新权限并重置密码
flush privileges;
alter user 'root'@'localhost' identified by '111111';

再次访问http://10.211.55.15/sqli-labs/
Click on the link setup/resetDB to create database, create tables and populate Data.
部署sqlilab_第1张图片

接着就可以开始学习了

例如:
部署sqlilab_第2张图片

部署sqlilab_第3张图片