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

RAP的war包下载:https://github.com/thx/RAP/releases

创建数据库,并创建权限用户:

mysql> create database rap_db character set utf8;
Query OK, row affected (0.06 sec)
mysql> grant all privileges on rap_db.* to 'rap'@'%' identified by '123456';
Query OK, rows affected (0.00 sec) mysql> flush privileges;
Query OK, rows affected (0.00 sec)
把 RAP-0.14.-SNAPSHOT.war 移动到 tomcat 的 webapp 目录下,删除其他多余的文件夹
解压:unzip -x RAP-0.14.-SNAPSHOT.war -d ROOT
初始化数据库:mysql -u rap -p rap_db < /usr/program/tomcat8/webapps/ROOT/WEB-INF/classes/database/initialize.sql
➜  database pwd
/app/servers/tomcat7/webapps/ROOT/WEB-INF/classes/database
➜ database mysql -urap -p rap_db < initialize.sql
mysql> select user,host,password from user;
+------+-----------+-------------------------------------------+
| user | host | password |
+------+-----------+-------------------------------------------+
| root | localhost | |
| root | ok | |
| root | 127.0.0.1 | |
| root | :: | |
| | localhost | |
| | ok | |
| rap | % | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| rap | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+------+-----------+-------------------------------------------+

修改连接数据库的配置信息:

➜  database cat /app/servers/tomcat7/webapps/ROOT/WEB-INF/classes/config.properties
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc\:mysql\://localhost\:3306/rap_db?useUnicode\=true&characterEncoding\=utf8&zeroDateTimeBehavior\=convertToNull&noAccessToProcedureBodies\=true
jdbc.username=rap
jdbc.password=
redis.host=localhost
redis.port=
http://192.168.1.10:8081/org/index.do

成功了!!!!

参照文章:https://github.com/judasn/Linux-Tutorial/blob/master/Rap-Install-And-Settings.md

注意注册账户的时候,账户必是数字字母下划线组成(并不是密码,这一点要注意)

注意记住把端口开放,由于是实验,直接把iptables关掉:/etc/init.d/iptables stop

上一篇:PHP使用UTF8编码读取ACCESS的乱码问题解决方案(转)


下一篇:在Linux平台上搭建EasyDarwin,编译代码并简单部署