Rap 安装和配置
本机环境
- 系统:CentOS 6.7 64 位
- MySQL 5.6
- JDK 1.8
- Tomcat 8
- Redis 3.0.7
- Rap 0.14.1
Rap 说明
下载
安装 MySQL、JDK、Tomcat、Redis
安装 Rap
CREATE DATABASE `rap_db` CHARACTER SET utf8;
CREATE USER 'rap'@'%' IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON rap_db.* TO 'rap'@'%';
FLUSH PRIVILEGES;
- 把 RAP-0.14.1-SNAPSHOT.war 移动到 tomcat 的 webapp 目录下,删除其他多余的文件夹
- 解压:
unzip -x RAP-0.14.1-SNAPSHOT.war -d ROOT
- 初始化数据库:
mysql -u rap -p rap_db < /usr/program/tomcat8/webapps/ROOT/WEB-INF/classes/database/initialize.sql
- 修改连接数据库的配置信息:
vim /usr/program/tomcat8/webapps/ROOT/WEB-INF/classes/config.properties
- 停掉防火墙:
service iptables stop
- 启动 Redis:
/usr/local/bin/redis-server /etc/redis.conf
- 启动 Tomcat:
sh /usr/program/tomcat8/bin/startup.sh ; tail -200f /usr/program/tomcat8/logs/catalina.out