1. 下载 kbengine 源码 https://github.com/kbengine/kbengine
2. 在win10打开项目 kbengine\kbe\src
发现 无法查找到 头文件 stdio.h等 解决方案 http://blog.csdn.net/sinat_17196995/article/details/52456901?locationNum=10 注意 点选所有的项目,目前是如此,如果有更好的方法请介绍
3. 编译时报 MSB802 无法找到v140的生成工具
visual studio installer 选择组件, 找到vs2015 v140工具 进行 修改
4. 修改 目标平台 为 当前已有的 比如 8.1
5. vs2017 中生成项目,编译成功
6. 安装 mysql, 参照 http://kbengine.org/cn/docs/installation.html
不能访问参照
Linux:
安装
[root @ localhost ~]# yum install mysql-server
设定为开机自动启动
[root @ localhost ~]# chkconfig mysqld on
启动mysql服务
[root @ localhost ~]# /etc/init.d/mysqld start
检查是否启动成功
[root@localhost ~]# /etc/init.d/mysqld status
mysqld (pid 9234) is running...
Windows:
下载并安装最新版本:
https://dev.mysql.com/downloads/mysql/
选择zip方式下载
完成的命令使用 管理者方式打开cmd,进入 mysql下载文件的bin下
G:\database\mysql\bin>mysqld --initialize --user=mysql --console
G:\database\mysql\bin>mysqld -install
G:\database\mysql\bin>net start mysql
G:\database\mysql\bin>mysql -u root -pEnter password: ************
mysql> alter user root@localhost identified by "12345";
mysql> show variables like 'character%';
Windows环境,Mysql默认是忽略大小写的,请在my.ini添加如下命令设置大小写敏感
在命令行使用(sc qc MySQL|find ".ini")查看my.ini文件所在目录
如果文件不存在,自己创建 my.ini
现在列出我创建的文件内容:
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]
port=3306
default-character-set=utf8
[mysql]
[mysqld]
lower_case_table_names = 2
(重启Mysql, CMD输入如下命令:)
net stop mysql
net start mysql
检查Mysql大小写是否敏感:
mysql> create database NEWTEST;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| NEWTEST |
| mysql |
| test |
+--------------------+
4 row in set (0.00 sec)
测试成功后, 需要做进一步的处理
mysql> create database keb;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| HelloWorld |
| kbe |
| keb |
| mysql |
| newtest |
| performance_schema |
| sys |
+--------------------+
8 rows in set (0.00 sec)
mysql> create user kbe identified by 'kbe';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on kbe.* to 'kbe'@'%';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
接下来需要对kbengine 的 默认配置文件进行修改
kbengine\kbe\res\server\kbengine_defaults.xml
内容如下:
<host> localhost </host> <!-- Type: String -->
<!--<port> 0 </port> --> <!-- Type: Integer -->
<port> 3306 </port> <!-- Type: Integer -->
<!-- 数据库账号验证
(Database auth)
-->
<auth>
<username> kbe </username> <!-- Type: String -->
<!--<password> pwd123456 </password> --> <!-- Type: String -->
<password> kbe </password> <!-- Type: String -->
<!-- 为true则表示password是加密(rsa)的, 可防止明文配置
(is true, password is RSA)
-->
<encrypt> true </encrypt>
<encrypt> false </encrypt>
7. 运行kbengine
kbengine\assets\start_server.bat 一切正常,没有报错