一、准备工作
二、安装apache2
三、安装mysql
四、安装php
五、安装depress
准备工作
配置虚拟机安装ubuntu20.04
配置环境及相关设置(配置中文及防火墙等)
安装apache2
Apache HTTP服务器是世界上使用最广泛的Web服务器。它提供了许多强大的功能,包括可动态加载的模块,强大的媒体支持以及与其他流行软件的广泛集成。
开始安装
打开终端,进入根目录
`renxiaoxu@ubuntu:~$` sudo su
更新环境
renxiaoxu@ubuntu:~$ apt-get upgrade
安装apache环境
renxiaoxu@ubuntu:~$ sudo apt-get install apache
确认安装后, apt将安装Apache和所有必需的依赖项
安装完成之后我们可以在浏览器中输入localhost进行访问
也可以查看apache
renxiaoxu@ubuntu:~$ service apache2 status
看到runing说明成功
**
安装mysql 数据库
安装mysql
renxiaoxu@ubuntu:~$sudo apt-get install my-server
验证 MySQL
renxiaoxu@ubuntu:~$sudo apt-get install my-server
mysql.service - MySQL Community Server
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:>
Active: active (running) since Thu 2022-03-10 20:07:08 CST; 1 day 1h ago
Main PID: 1024 (mysqld)
Status: "Server is operational"
Tasks: 43 (limit: 9419)
Memory: 474.9M
CGroup: /system.slice/mysql.service
└─1024 /usr/sbin/mysqld
保护加固 MySQL
renxiaoxu@ubuntu:~$ mysql_secure_installation
●Error: Access denied for user 'root'@'localhost'
mysql需要测试 MySQL 用户密码的强度,并且提高安全性
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?
Press y|Y for Yes, any other key for No:
三个级别的密码验证策略,低级,中级,高级
There are three levels of password validation policy:
LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case,