1.下载并安装Tomcat,(官网:http://tomcat.apache.org/)
注:tomcat下载直接解压到相关目录就可以了!
2.下载Quercus:
注:网页最下面downloads,有历史版本,最好下载最新的;
3.开始部署
1)把下载的Quercus.war放入Tomcat的webapps目录下;
2)运行Tomcat会自动在webapps解压出一个Quercus的项目,也可直接用解压工具进行解压;
注:因为下载的war名称包含有版本号,最好把项目名称修改为quercus,这样在后门访问比较方便;
3)进入Quercus项目的WEB-INF目录下;
4)打开web.xml文件,看welcome-file是否配置的是Quercus项目中的index.php
http://localhost:8080/quercus-4.0.39/
4.下载wordpress并解压到tomcat安装目录\webapps\quercus下
http://localhost/quercus-4.0.39/wordpress/wp-admin/setup-config.php
5.下载mysql与mysql-connector-java-版本号-bin.jar,并把mysql-connector-java-版本号-bin.jar放到tomcat安装目录\webapps\quercus\WEB-INF\lib下
6.mysql官网:http://www.mysql.com/
进入官网Download->Community->MySQL Connectors->Connector J->选择操作系统 Platform Independent
7.mariadb安装
yum install -y mariadb-server
2.启动maria DB服务:
systemctl start mariadb.service
yum install mariadb mariadb-server
mariadb安装成功后,需要配置mysql的root密码,先备注一下常用命令:
systemctl start mariadb //启动MariaDB
systemctl stop mariadb //停止MariaDB
systemctl restart mariadb //重启MariaDB
systemctl enable mariadb //设置开机启动
设置root账户密码
mysql_secure_installation
Enter current password for root (enter for none):
Set root password? [Y/n]
点击回车然后提示是否设置root账号密码,输入y
New password:
Re-enter new password:
Password updated successfully!
提示输入新密码和重复输入新密码,重复输入两次后,出现更新密码成功提示。
然后一路输入y就可以
Remove anonymous users? [Y/n] y
… Success!
Disallow root login remotely? [Y/n] y
… Success!
Remove test database and access to it? [Y/n] y
- Dropping test database…
… Success! - Removing privileges on test database…
… Success!
Reload privilege tables now? [Y/n] y
… Success!
Thanks for using MariaDB!
设置root密码后,重启mariadb生效
systemctl restart mariadb.service
测试访问数据库:
mysql -uroot -p
然后输入密码,登录成功后显示如下:
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 2
Server version: 5.5.44-MariaDB MariaDB Server
Copyright © 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.
MariaDB [(none)]>
输入如下命令,查看数据库服务器的数据库
show databases;
退出命令
exit;
创建数据库 创建用户
mysql -u root -p
MariaDB [(none)]> create database wordpress;
MariaDB [(none)]> grant all on wordpress.* to wordpress@‘localhost’ (自己的地址)identified by ‘wordpress’;
MariaDB [(none)]> grant all on wordpress.* to wordpress@’%’ identified by ‘wordpress’;
MariaDB [(none)]> exit;
访问wordpress填写数据库名称