MJYUN WXMP QuickStart

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
第1行: 第1行:
== Setup Server ==
+
== Prepare Server ==
 +
 
 +
* Buy a Aliyun server as the WXMP Server
 +
* Buy a domain name, something link www.yourdomain.com
 +
* Setup the DNS to make wx.yourdomain.com point to the WXMP Server
 +
 
 +
<br><br>
 +
 
 +
== Setup  WXMP Server ==
 +
 
 +
=== Install Web Server ===
  
 
<pre>
 
<pre>
第9行: 第19行:
 
<br><br>
 
<br><br>
  
== Setup Perl tools ==
+
=== Setup Perl tools ===
  
 
<pre>
 
<pre>
第16行: 第26行:
 
</pre>
 
</pre>
  
 +
<br><br>
 +
 +
=== Clone the MJYUN WXMP Framework ===
 +
 +
<pre>
 +
$ cd /opt
 +
$ git clone git://bitbucket.org:dddmjyun/wxmp.git wxmp
 +
</pre>
 +
 +
 +
Modify the common/config.php:
 +
 +
<pre>
 +
<?php
 +
 +
define('WXMP_OPENID', 'Your_WXMP_Open_ID');
 +
define('WXMP_TOKEN', 'Your_WXMP_token');
 +
 +
define('WXMP_APPID', "Your_WXMP_appid");
 +
define('WXMP_APPSECRET', "Your_WXMP_appsecret");
 +
 +
define('WXMP_URL', "http://wx.yourdomain.cn");
 +
 +
?>
 +
</pre>
  
 
<br><br>
 
<br><br>
第21行: 第56行:
 
== WXMP Setup ==
 
== WXMP Setup ==
  
 +
=== 公众号设置 ===
 +
 +
The "原始ID" is Your_WXMP_Open_ID
 +
 +
 +
In "功能设置", Setup the "业务域名" and "JS接口安全域名" with:
 +
 +
  wx.yourdomain.cn
 +
 +
 +
<br><br>
 +
 +
=== 开发 --> 基本配置 ===
 +
 +
Get the appid and appsecret in here
 +
 +
 +
;; 服务器配置:
 +
 +
<pre>
 +
URL: http://wx.yourdomain.cn/robot.php
 +
Token(令牌): XXXXXXXXXXXX11111111                    <----------------配一个,英文或数字,长度为3-32字符 == Your_WXMP_token
 +
EncodingAESKey(消息加解密密钥): XXXXXXXXXXXXXXXXXXXXXX  <----------------随机生成
 +
消息加解密方式: 明文模式
 +
</pre>
  
 
<br><br>
 
<br><br>
 
<br><br>
 
<br><br>
 
<br><br>
 
<br><br>

2016年6月3日 (五) 15:20的版本

目录

1 Prepare Server

  • Buy a Aliyun server as the WXMP Server
  • Buy a domain name, something link www.yourdomain.com
  • Setup the DNS to make wx.yourdomain.com point to the WXMP Server



2 Setup WXMP Server

2.1 Install Web Server

$ sudo apt-get install ssh
$ sudo apt-get install apache2
$ sudo apt-get install php5 php5-curl



2.2 Setup Perl tools

$ sudo apt-get install perl perl-modules
$ sudo apt-get install libdbi-perl libjson-perl libdatetime-perl liblwp-online-perl



2.3 Clone the MJYUN WXMP Framework

$ cd /opt
$ git clone git://bitbucket.org:dddmjyun/wxmp.git wxmp


Modify the common/config.php:

<?php

define('WXMP_OPENID', 'Your_WXMP_Open_ID');
define('WXMP_TOKEN', 'Your_WXMP_token');

define('WXMP_APPID', "Your_WXMP_appid");
define('WXMP_APPSECRET', "Your_WXMP_appsecret");

define('WXMP_URL', "http://wx.yourdomain.cn");

?>



3 WXMP Setup

3.1 公众号设置

The "原始ID" is Your_WXMP_Open_ID


In "功能设置", Setup the "业务域名" and "JS接口安全域名" with:

 wx.yourdomain.cn




3.2 开发 --> 基本配置

Get the appid and appsecret in here


服务器配置
URL: http://wx.yourdomain.cn/robot.php
Token(令牌): XXXXXXXXXXXX11111111                     <----------------配一个,英文或数字,长度为3-32字符 == Your_WXMP_token
EncodingAESKey(消息加解密密钥): XXXXXXXXXXXXXXXXXXXXXX  <----------------随机生成
消息加解密方式: 明文模式







个人工具
名字空间

变换
操作
导航
工具箱