tomcat 安装 wordpres

1.下载并安装Tomcat,(官网:http://tomcat.apache.org/)

注:tomcat下载直接解压到相关目录就可以了!

2.下载Quercus:

官网:http://quercus.caucho.com/

注:网页最下面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填写数据库名称
在这里插入图片描述
在这里插入图片描述

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值