mpush 服务端配置 for windows 服务自动运行
以下安装部分是参照官方的步骤,
示例: http://www.cnblogs.com/endv/p/6439860.html
二、Windows安装Redis
下载地址Github (https://github.com/MSOpenTech/redis/releases),
Redis-x64-3.2.100.zip
1.下载并解压,解压后如下
2.使用cmd进入到Redis解压目录中,并使用脚本(redis-server.exe redis.windows.conf)执行即可,默认配置文件不需要修改
Microsoft Windows [版本 10.0.]
(c) Microsoft Corporation. All rights reserved. C:\Users\endv>d: D:\>cd D:\Redis-x64-3.2.100 D:\Redis-x64-3.2.>redis-server.exe redis.windows.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.2. (/) bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port:
| `-._ `._ / _.-' | PID: 12096
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-' [] Feb ::09.347 # Server started, Redis version 3.2.
[] Feb ::09.347 * The server is now ready to accept connections on port
从官网直接下载Zookeeper最新版本(Zookeeper支持Windows和Linux)
1.下载并解压,解压后如下
2.提供配置文件
将conf目录下的zoo_sample.conf重命名为zoo.conf
3.到bin目录下,双击zkServer.bat即可
Microsoft Windows [版本 10.0.]
(c) Microsoft Corporation. All rights reserved. C:\Users\endv>d: D:\>cd D:\zookeeper-3.5.-alpha\bin D:\zookeeper-3.5.-alpha\bin>zkServer.cmd
Microsoft Windows [版本 10.0.]
(c) Microsoft Corporation. All rights reserved. C:\Users\endv>d: D:\>cd D:\zookeeper-3.5.-alpha\bin D:\zookeeper-3.5.-alpha\bin>zkServer.cmd D:\zookeeper-3.5.-alpha\bin>call "C:\Program Files\Java\jdk1.8.0_121"\bin\java "-Dzookeeper.log.dir=D:\zookeeper-3.5.2-alpha\bin\..\logs" "-Dzookeeper.root.logger=INFO,CONSOLE" "-Dzookeeper.log.file=zookeeper-endv-server-DESKTOP-3ML7R0C.log" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /t /f" -cp "D:\zookeeper-3.5.2-alpha\bin\..\build\classes;D:\zookeeper-3.5.2-alpha\bin\..\build\lib\*;D:\zookeeper-3.5.2-alpha\bin\..\*;D:\zookeeper-3.5.2-alpha\bin\..\lib\*;D:\zookeeper-3.5.2-alpha\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "D:\zookeeper-3.5.2-alpha\bin\..\conf\zoo.cfg"
-- ::, [myid:] - INFO [main:QuorumPeerConfig@] - Reading configuration from: D:\zookeeper-3.5.-alpha\bin\..\conf\zoo.cfg
-- ::, [myid:] - WARN [main:VerifyingFileFactory@] - \tmp\zookeeper is relative. Prepend .\ to indicate that you're sure!
-- ::, [myid:] - INFO [main:QuorumPeerConfig@] - clientPortAddress is 0.0.0.0/0.0.0.0:
-- ::, [myid:] - INFO [main:QuorumPeerConfig@] - secureClientPort is not set
-- ::, [myid:] - INFO [main:DatadirCleanupManager@] - autopurge.snapRetainCount set to
-- ::, [myid:] - INFO [main:DatadirCleanupManager@] - autopurge.purgeInterval set to
-- ::, [myid:] - INFO [main:DatadirCleanupManager@] - Purge task is not scheduled.
-- ::, [myid:] - WARN [main:QuorumPeerMain@] - Either no config or no quorum defined in config, running in standalone mode
-- ::, [myid:] - INFO [main:ManagedUtil@] - Log4j found with jmx enabled.
-- ::, [myid:] - INFO [main:QuorumPeerConfig@] - Reading configuration from: D:\zookeeper-3.5.-alpha\bin\..\conf\zoo.cfg
-- ::, [myid:] - WARN [main:VerifyingFileFactory@] - \tmp\zookeeper is relative. Prepend .\ to indicate that you're sure!
-- ::, [myid:] - INFO [main:QuorumPeerConfig@] - clientPortAddress is 0.0.0.0/0.0.0.0:
-- ::, [myid:] - INFO [main:QuorumPeerConfig@] - secureClientPort is not set
-- ::, [myid:] - INFO [main:ZooKeeperServerMain@] - Starting server
-- ::, [myid:] - INFO [main:Environment@] - Server environment:zookeeper.version=3.5.-alpha-, built on // : GMT
-- ::, [myid:] - INFO [main:Environment@] - Server environment:host.name=DESKTOP-3ML7R0C
-- ::, [myid:] - INFO [main:Environment@] - Server environment:java.version=1.8.0_121
-- ::, [myid:] - INFO [main:Environment@] - Server environment:java.vendor=Oracle Corporation
-- ::, [myid:] - INFO [main:Environment@] - Server environment:java.home=C:\Program Files\Java\jdk1..0_121\jre
-- ::, [myid:] - INFO [main:Environment@] - Server environment:java.class.path=D:\zookeeper-3.5.-alpha\bin\..\build\classes;D:\zookeeper-3.5.-alpha\bin\..\build\lib\*;D:\zookeeper-3.5.-alpha\bin\..\zookeeper-3.5.-alpha.jar;D:\zookeeper-3.5.-alpha\bin\..\lib\commons-cli-1.2.jar;D:\zookeeper-3.5.-alpha\bin\..\lib\jackson-core-asl-1.9..jar;D:\zookeeper-3.5.-alpha\bin\..\lib\jackson-mapper-asl-1.9..jar;D:\zookeeper-3.5.-alpha\bin\..\lib\javacc.jar;D:\zookeeper-3.5.-alpha\bin\..\lib\jetty-6.1..jar;D:\zookeeper-3.5.-alpha\bin\..\lib\jetty-util-6.1..jar;D:\zookeeper-3.5.-alpha\bin\..\lib\jline-2.11.jar;D:\zookeeper-3.5.-alpha\bin\..\lib\log4j-1.2..jar;D:\zookeeper-3.5.-alpha\bin\..\lib\netty-3.10..Final.jar;D:\zookeeper-3.5.-alpha\bin\..\lib\servlet-api-2.5-.jar;D:\zookeeper-3.5.-alpha\bin\..\lib\slf4j-api-1.7..jar;D:\zookeeper-3.5.-alpha\bin\..\lib\slf4j-log4j12-1.7..jar;D:\zookeeper-3.5.-alpha\bin\..\conf
-- ::, [myid:] - INFO [main:Environment@] - Server environment:java.library.path=C:\Program Files\Java\jdk1..0_121\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1..0_121\Bin;C:\Program Files\Java\jdk1..0_121\jre\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.\;.
-- ::, [myid:] - INFO [main:Environment@] - Server environment:java.io.tmpdir=C:\Users\endv\AppData\Local\Temp\
-- ::, [myid:] - INFO [main:Environment@] - Server environment:java.compiler=<NA>
-- ::, [myid:] - INFO [main:Environment@] - Server environment:os.name=Windows
-- ::, [myid:] - INFO [main:Environment@] - Server environment:os.arch=amd64
-- ::, [myid:] - INFO [main:Environment@] - Server environment:os.version=10.0
-- ::, [myid:] - INFO [main:Environment@] - Server environment:user.name=endv
-- ::, [myid:] - INFO [main:Environment@] - Server environment:user.home=C:\Users\endv
-- ::, [myid:] - INFO [main:Environment@] - Server environment:user.dir=D:\zookeeper-3.5.-alpha\bin
-- ::, [myid:] - INFO [main:Environment@] - Server environment:os.memory.free=116MB
-- ::, [myid:] - INFO [main:Environment@] - Server environment:os.memory.max=1803MB
-- ::, [myid:] - INFO [main:Environment@] - Server environment:os.memory.total=123MB
-- ::, [myid:] - INFO [main:ZooKeeperServer@] - minSessionTimeout set to
-- ::, [myid:] - INFO [main:ZooKeeperServer@] - maxSessionTimeout set to
-- ::, [myid:] - INFO [main:ZooKeeperServer@] - Created server with tickTime minSessionTimeout maxSessionTimeout datadir \tmp\zookeeper\version- snapdir \tmp\zookeeper\version-
-- ::, [myid:] - INFO [main:Slf4jLog@] - Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
-- ::, [myid:] - INFO [main:Slf4jLog@] - jetty-6.1.
-- ::, [myid:] - INFO [main:Slf4jLog@] - Started SelectChannelConnector@0.0.0.0:
-- ::, [myid:] - INFO [main:JettyAdminServer@] - Started AdminServer on address 0.0.0.0, port and command URL /commands
-- ::, [myid:] - INFO [main:NIOServerCnxnFactory@] - Configuring NIO connection handler with 10s sessionless connection timeout, selector thread(s), worker threads, and kB direct buffers.
-- ::, [myid:] - INFO [main:NIOServerCnxnFactory@] - binding to port 0.0.0.0/0.0.0.0:
-- ::, [myid:] - INFO [main:FileTxnSnapLog@] - Snapshotting: 0x0 to \tmp\zookeeper\version-\snapshot.
-- ::, [myid:] - INFO [main:ContainerManager@] - Using checkIntervalMs= maxPerMinute=
四、安装mpush
1.解压mpush-release-0.7.1.tar.gz
2.编辑Mpush配置文件(注意,只需要修改mpush.conf配置文件即可,不需要修改reference.conf),修改默认提供的Redis、Zookeeper服务器地址和端口信息(因为我redis和zookeeper直接部署在本机,所以不用修改)。
3.使用cmd进入到bin目录,启动Mpush(使用如下脚本java -Dmp.conf=D:\mpush-0.7.1\conf\mpush.conf -jar bootstrap.jar)
Microsoft Windows [版本 10.0.]
(c) Microsoft Corporation. All rights reserved. C:\Users\endv>d: D:\>cd D:\mpush-0.7.\bin D:\mpush-0.7.\bin>java -Dmp.conf=D:\mpush-0.7.\conf\mpush.conf -jar bootstrap.jar
Microsoft Windows [版本 10.0.]
(c) Microsoft Corporation. All rights reserved. C:\Users\endv>d: D:\>cd D:\mpush-0.7.\bin D:\mpush-0.7.\bin>java -Dmp.conf=D:\mpush-0.7.\conf\mpush.conf -jar bootstrap.jar
::05.468 - {
"conf" : "D:\\mpush-0.7.1\\conf\\mpush.conf",
"core" : {
"compress-threshold" : "10k",
"epoll-provider" : "netty",
"max-hb-timeout-times" : ,
"max-heartbeat" : "3m",
"max-packet-size" : "10k",
"min-heartbeat" : "3m",
"session-expired-time" : "1d"
},
"home" : "D:\\mpush-0.7.1\\bin",
"http" : {
"default-read-timeout" : "10s",
"dns-mapping" : {},
"max-conn-per-host" : ,
"max-content-length" : "5m",
"proxy-enabled" : true
},
"log-conf-path" : "D:\\mpush-0.7.1\\bin/conf/logback.xml",
"log-dir" : "D:\\mpush-0.7.1\\bin/logs",
"log-level" : "warn",
"monitor" : {
"dump-dir" : "D:\\mpush-0.7.1\\bin/tmp",
"dump-period" : "1m",
"dump-stack" : false,
"print-log" : true,
"profile-enabled" : false,
"profile-slowly-duration" : "10ms"
},
"net" : {
"admin-server-port" : ,
"connect-server-port" : ,
"gateway-client-multicast" : "239.239.239.99",
"gateway-client-num" : ,
"gateway-client-port" : ,
"gateway-server-multicast" : "239.239.239.88",
"gateway-server-net" : "tcp",
"gateway-server-port" : ,
"public-host-mapping" : {},
"rcv_buf" : {
"connect-server" : "32k",
"gateway-client" : ,
"gateway-server" :
},
"snd_buf" : {
"connect-server" : "32k",
"gateway-client" : ,
"gateway-server" :
},
"traffic-shaping" : {
"connect-server" : {
"check-interval" : "100ms",
"enabled" : false,
"read-channel-limit" : "3k",
"read-global-limit" : "100k",
"write-channel-limit" : "3k",
"write-global-limit" :
},
"gateway-client" : {
"check-interval" : "100ms",
"enabled" : false,
"read-channel-limit" : ,
"read-global-limit" : ,
"write-channel-limit" : "3k",
"write-global-limit" : "30k"
},
"gateway-server" : {
"check-interval" : "100ms",
"enabled" : false,
"read-channel-limit" : "3k",
"read-global-limit" : "30k",
"write-channel-limit" : ,
"write-global-limit" :
}
},
"write-buffer-water-mark" : {
"connect-server-high" : "64k",
"connect-server-low" : "32k",
"gateway-server-high" : "20m",
"gateway-server-low" : "10m"
},
"ws-path" : "/",
"ws-server-port" :
},
"push" : {
"flow-control" : {
"broadcast" : {
"duration" : "1s",
"limit" : ,
"max" :
},
"global" : {
"duration" : "1s",
"limit" : ,
"max" :
}
}
},
"redis" : {
"cluster-model" : "single",
"config" : {
"blockWhenExhausted" : true,
"fairness" : false,
"jmxEnabled" : false,
"jmxNameBase" : "pool",
"jmxNamePrefix" : "pool",
"lifo" : true,
"maxIdle" : ,
"maxTotal" : ,
"maxWaitMillis" : ,
"minEvictableIdleTimeMillis" : ,
"minIdle" : ,
"numTestsPerEvictionRun" : ,
"softMinEvictableIdleTimeMillis" : ,
"testOnBorrow" : false,
"testOnCreate" : false,
"testOnReturn" : false,
"testWhileIdle" : false,
"timeBetweenEvictionRunsMillis" :
},
"nodes" : [
"127.0.0.1:6379"
],
"password" : "",
"write-to-zk" : false
},
"security" : {
"aes-key-length" : ,
"private-key" : "MIIBNgIBADANBgkqhkiG9w0BAQEFAASCASAwggEcAgEAAoGBAKCE8JYKhsbydMPbiO7BJVq1pbuJWJHFxOR7L8Hv3ZVkSG4eNC8DdwAmDHYu/wadfw0ihKFm2gKDcLHp5yz5UQ8PZ8FyDYvgkrvGV0ak4nc40QDJWws621dm01e/INlGKOIStAAsxOityCLv0zm5Vf3+My/YaBvZcB5mGUsPbx8fAgEAAoGAAy0+WanRqwRHXUzt89OsupPXuNNqBlCEqgTqGAt4Nimq6Ur9u2R1KXKXUotxjp71Ubw6JbuUWvJg+5Rmd9RjT0HOUEQF3rvzEepKtaraPhV5ejEIrB+nJWNfGye4yzLdfEXJBGUQzrG+wNe13izfRNXI4dN/6Q5npzqaqv0E1CkCAQACAQACAQACAQACAQA=",
"public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCghPCWCobG8nTD24juwSVataW7iViRxcTkey/B792VZEhuHjQvA3cAJgx2Lv8GnX8NIoShZtoCg3Cx6ecs+VEPD2fBcg2L4JK7xldGpOJ3ONEAyVsLOttXZtNXvyDZRijiErQALMTorcgi79M5uVX9/jMv2Ggb2XAeZhlLD28fHwIDAQAB"
},
"spi" : {
"dns-mapping-manager" : "com.mpush.common.net.HttpProxyDnsMappingManager",
"thread-pool-factory" : "com.mpush.tools.thread.pool.DefaultThreadPoolFactory"
},
"thread" : {
"pool" : {
"ack-timer" : ,
"conn-work" : ,
"event-bus" : {
"max" : ,
"min" : ,
"queue-size" :
},
"gateway-client-work" : ,
"gateway-server-work" : ,
"http-work" : ,
"mq" : {
"max" : ,
"min" : ,
"queue-size" :
},
"push-client" : ,
"push-task" :
}
},
"zk" : {
"connectionTimeoutMs" : "5s",
"digest" : "mpush",
"namespace" : "mpush",
"retry" : {
"baseSleepTimeMs" : "3s",
"maxRetries" : ,
"maxSleepMs" : "5s"
},
"server-address" : "127.0.0.1:2181",
"sessionTimeoutMs" : "5s",
"watch-path" : "/"
}
} ::05.548 - launch mpush server...
::05.749 - bootstrap chain starting...
::05.750 - start bootstrap job [CacheManagerBoot]
::05.958 - start bootstrap job [ServiceRegistryBoot]
::05.958 - init service registry waiting for connected...
::06.508 - start bootstrap job [ServerBoot(ConnectionServer)]
::07.100 - start ConnectionServer success on:
::07.317 - start bootstrap job [ServerBoot(GatewayServer)]
::07.363 - start GatewayServer success on:
::07.517 - start bootstrap job [ServerBoot(AdminServer)]
::07.571 - start AdminServer success on:
::07.572 - start bootstrap job [PushCenterBoot]
::07.663 - start bootstrap job [HttpProxyBoot]
::07.680 - start bootstrap job [MonitorBoot]
::07.681 - start bootstrap job [LastBoot]
::07.761 - bootstrap chain started.
::07.761 - ===================================================================
::07.762 - ====================MPUSH SERVER START SUCCESS=====================
::07.766 - ===================================================================
五、Windows安装Mpush-Alloc
1.解压alloc-release-0.7.1.tar.gz
2.修改配置文件(注意,这里不需要修改,如果分布式部署,修改zookeeper地址信息即可)。
3.使用cmd进入到alloc的bin目录,使用如下命令启动(java -Dmp.conf=D:\mpush-alloc-0.7.1\conf\mpush.conf -jar bootstrap.jar)
Microsoft Windows [版本 10.0.]
(c) Microsoft Corporation. All rights reserved. C:\Users\endv>d: D:\>cd D:\mpush-alloc-0.7.\bin D:\mpush-alloc-0.7.\bin>java -Dmp.conf=D:\mpush-alloc-0.7.\conf\mpush.conf -jar bootstrap.jar
Microsoft Windows [版本 10.0.]
(c) Microsoft Corporation. All rights reserved. C:\Users\endv>d: D:\>cd D:\mpush-alloc-0.7.\bin D:\mpush-alloc-0.7.\bin>java -Dmp.conf=D:\mpush-alloc-0.7.\conf\mpush.conf -jar bootstrap.jar
::42.425 - {
"conf" : "D:\\mpush-alloc-0.7.1\\conf\\mpush.conf",
"core" : {
"compress-threshold" : "10k",
"epoll-provider" : "netty",
"max-hb-timeout-times" : ,
"max-heartbeat" : "3m",
"max-packet-size" : "10k",
"min-heartbeat" : "3m",
"session-expired-time" : "1d"
},
"home" : "D:\\mpush-alloc-0.7.1\\bin",
"http" : {
"default-read-timeout" : "10s",
"dns-mapping" : {},
"max-conn-per-host" : ,
"max-content-length" : "5m",
"proxy-enabled" : false
},
"log-conf-path" : "D:\\mpush-alloc-0.7.1\\bin/conf/logback.xml",
"log-dir" : "D:\\mpush-alloc-0.7.1\\bin/logs",
"log-level" : "warn",
"monitor" : {
"dump-dir" : "D:\\mpush-alloc-0.7.1\\bin/tmp",
"dump-period" : "1m",
"dump-stack" : false,
"print-log" : true,
"profile-enabled" : false,
"profile-slowly-duration" : "10ms"
},
"net" : {
"admin-server-port" : ,
"alloc-server-port" : ,
"connect-server-port" : ,
"gateway-client-multicast" : "239.239.239.99",
"gateway-client-num" : ,
"gateway-client-port" : ,
"gateway-server-multicast" : "239.239.239.88",
"gateway-server-net" : "tcp",
"gateway-server-port" : ,
"public-host-mapping" : {},
"rcv_buf" : {
"connect-server" : "32k",
"gateway-client" : ,
"gateway-server" :
},
"snd_buf" : {
"connect-server" : "32k",
"gateway-client" : ,
"gateway-server" :
},
"traffic-shaping" : {
"connect-server" : {
"check-interval" : "100ms",
"enabled" : false,
"read-channel-limit" : "3k",
"read-global-limit" : "100k",
"write-channel-limit" : "3k",
"write-global-limit" :
},
"gateway-client" : {
"check-interval" : "100ms",
"enabled" : false,
"read-channel-limit" : ,
"read-global-limit" : ,
"write-channel-limit" : "3k",
"write-global-limit" : "30k"
},
"gateway-server" : {
"check-interval" : "100ms",
"enabled" : false,
"read-channel-limit" : "3k",
"read-global-limit" : "30k",
"write-channel-limit" : ,
"write-global-limit" :
}
},
"write-buffer-water-mark" : {
"connect-server-high" : "64k",
"connect-server-low" : "32k",
"gateway-server-high" : "20m",
"gateway-server-low" : "10m"
},
"ws-path" : "/",
"ws-server-port" :
},
"push" : {
"flow-control" : {
"broadcast" : {
"duration" : "1s",
"limit" : ,
"max" :
},
"global" : {
"duration" : "1s",
"limit" : ,
"max" :
}
}
},
"redis" : {
"cluster-model" : "single",
"config" : {
"blockWhenExhausted" : true,
"fairness" : false,
"jmxEnabled" : false,
"jmxNameBase" : "pool",
"jmxNamePrefix" : "pool",
"lifo" : true,
"maxIdle" : ,
"maxTotal" : ,
"maxWaitMillis" : ,
"minEvictableIdleTimeMillis" : ,
"minIdle" : ,
"numTestsPerEvictionRun" : ,
"softMinEvictableIdleTimeMillis" : ,
"testOnBorrow" : false,
"testOnCreate" : false,
"testOnReturn" : false,
"testWhileIdle" : false,
"timeBetweenEvictionRunsMillis" :
},
"nodes" : [
"127.0.0.1:6379"
],
"password" : "",
"write-to-zk" : false
},
"security" : {
"aes-key-length" : ,
"private-key" : "MIIBNgIBADANBgkqhkiG9w0BAQEFAASCASAwggEcAgEAAoGBAKCE8JYKhsbydMPbiO7BJVq1pbuJWJHFxOR7L8Hv3ZVkSG4eNC8DdwAmDHYu/wadfw0ihKFm2gKDcLHp5yz5UQ8PZ8FyDYvgkrvGV0ak4nc40QDJWws621dm01e/INlGKOIStAAsxOityCLv0zm5Vf3+My/YaBvZcB5mGUsPbx8fAgEAAoGAAy0+WanRqwRHXUzt89OsupPXuNNqBlCEqgTqGAt4Nimq6Ur9u2R1KXKXUotxjp71Ubw6JbuUWvJg+5Rmd9RjT0HOUEQF3rvzEepKtaraPhV5ejEIrB+nJWNfGye4yzLdfEXJBGUQzrG+wNe13izfRNXI4dN/6Q5npzqaqv0E1CkCAQACAQACAQACAQACAQA=",
"public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCghPCWCobG8nTD24juwSVataW7iViRxcTkey/B792VZEhuHjQvA3cAJgx2Lv8GnX8NIoShZtoCg3Cx6ecs+VEPD2fBcg2L4JK7xldGpOJ3ONEAyVsLOttXZtNXvyDZRijiErQALMTorcgi79M5uVX9/jMv2Ggb2XAeZhlLD28fHwIDAQAB"
},
"spi" : {
"dns-mapping-manager" : "com.mpush.common.net.HttpProxyDnsMappingManager",
"thread-pool-factory" : "com.mpush.tools.thread.pool.DefaultThreadPoolFactory"
},
"thread" : {
"pool" : {
"ack-timer" : ,
"conn-work" : ,
"event-bus" : {
"max" : ,
"min" : ,
"queue-size" :
},
"gateway-client-work" : ,
"gateway-server-work" : ,
"http-work" : ,
"mq" : {
"max" : ,
"min" : ,
"queue-size" :
},
"push-client" : ,
"push-task" :
}
},
"zk" : {
"connectionTimeoutMs" : "5s",
"digest" : "mpush",
"namespace" : "mpush",
"retry" : {
"baseSleepTimeMs" : "3s",
"maxRetries" : ,
"maxSleepMs" : "5s"
},
"server-address" : "127.0.0.1:2181",
"sessionTimeoutMs" : "5s",
"watch-path" : "/"
}
} ::42.456 - launch alloc server...
::43.322 - ===================================================================
::43.322 - ====================ALLOC SERVER START SUCCESS=====================
::43.322 - ===================================================================
六、Android测试
note:测试时候,要确保Android和Alloc、MPush在同一个局域网内,能相互访问,或者Alloc、MPush部署在公网外。
1) 填写Alloc服务器地址(http:\/\/192.168.1.102:9999\/),注意以http:\/\/开头,且加端口号
2)点击BIND按钮
3)填写发送的消息
4)点击Start Push
5)点击Send Push
正常情况,客户端会受到由服务器端推送过来的消息
2、模拟IM
客户端1使用Android手机,客户端2使用浏览器模拟,客户端2给客户端1发送消息。如果有两个手机也可以,将界面的to:填写为对方的userid即可。
手机端操作如下
1) 填写Alloc服务器地址(http:\/\/192.168.1.102:9999\/),注意以http:\/\/开头,且加端口号
2)点击BIND按钮
3)在from输入自己的用户ID,user-0
4)点击Start Push
浏览器端打开测试地址(http:\/\/192.168.1.102:9999\/index.html)
http://192.168.1.102:9999/index.html
手机浏览:
输入手机端设置的用户ID(from位置),输入推送消息,点击send即可
手机端提示消息
七、注册 windows 服务 (未成功,有空再试)
以上虽然可以正常运行,在windows 窗口下,容易手痒X掉窗口,作为windows 服务来运行或许会比较好点
下面就将上面4个窗口注册到windows 服务中去。当然,也可以增加到系统的开机启动里,这样,重启系统后就可以自动运行了。
将下面代码修改相对应的路径后保存为:AutoStart.bat
sc delete "Endv Redis"
sc delete "Endv zookeeper"
sc delete "Endv mpush"
sc delete "Endv mpush-alloc" sc create "Endv Redis" binPath= "cmd.exe /c start D:\Redis-x64-3.2.100/redis-server.exe redis.windows.conf" start= auto displayname= "AutoStart Endv Redis"
sc create "Endv zookeeper" binPath= "cmd.exe /c start D:\zookeeper-3.5.2-alpha\bin/zkServer.cmd" start= auto displayname= "AutoStart Endv zookeeper"
sc create "Endv mpush" binPath= "cmd.exe /c start java -Dmp.conf=D:\mpush-0.7.1\conf\mpush.conf -jar bootstrap.jar" start= auto displayname= "AutoStart Endv mpush"
sc create "Endv mpush-alloc" binPath= "cmd.exe /c start java -Dmp.conf=D:\mpush-alloc-0.7.1\conf\mpush.conf -jar bootstrap.jar" start= auto displayname= "AutoStart Endv mpush-alloc"
以管理员身份运行,
mpush 服务端配置 for windows 服务自动运行的更多相关文章
- git的CentOS服务端安装和windows客户端的使用
git的CentOS服务端安装和windows客户端的使用 此教程以 搬瓦工vps CentOS 6 x64 的系统为环境,搭建 git 服务端.windows 7 系统为客户端. git客户端 在W ...
- Orleans[NET Core 3.1] 学习笔记(三)( 3 )服务端配置
服务端配置 Silo通过SiloHostBuilder和许多补充选项类以编程方式进行配置. Silo配置有几个关键方面: Orleans集群信息 集群提供程序(不知道咋翻译) Silo到Silo和Cl ...
- Rsync同步部署web服务端配置
Rsync同步部署web服务端配置 1,参数详解: -v, --verbose 详细模式输出. -q, --quiet 精简输出模式. -c, --checksum 打开校验开关,强制对文件传输进行校 ...
- nginx配置为windows服务中的坑
网上搜索“nginx 配置为windows服务”,很容易搜索到使用windows server warpper来配置,于是按照网上的方法我从github上的链接下载了1.17版本,前面都很顺利,很容易 ...
- [转]安装openoffice,并且配置为windows服务
[转]安装openoffice,并且配置为windows服务 http://blog.csdn.net/zzzz3621/article/details/18400277 下载windows reso ...
- Windows Server 2008R2配置MySQL Cluster并将管理节点和数据节点配置成windows服务
说明:将mysql的管理节点和数据节点配置成windows服务是为了防止有人手误关闭管理节点或数据节点的dos命令窗口,管理节点或数据节点的命令窗口误关闭可能会造成mysql某台或某几台mysql不能 ...
- Oracle10g客户端链接服务端配置
Oracle10g客户端工具plsql链接服务端配置 Oracle10g客户端工具比如plsql,在网络中链接服务端问题比较多中国菜刀,经常出现很多莫名其妙的问题.实际上不是plsql的配置,问题还是 ...
- 【试水CAS-4.0.3】第06节_CAS服务端配置HTTPS
完整版见https://jadyer.github.io/2012/05/30/tomcat-https/ /** * @see CAS服务端配置HTTPS * @see -------------- ...
- day28 rsync服务端配置和客户端
2. rsync守护进程部署方式 客户端---服务端 上厕所 4 rsync守护进程服务端配置: 第一个历程: 下载安装软件 rpm -qa|grep rsync yum install -y rsy ...
随机推荐
- ACdream 1023 抑或
Xor Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) Submit Statisti ...
- python登录qq
登录qq的用的是get方法, 首先抓login_sig(某个包中的cookie),接着验证码的包(包含对验证码的校验),,最后计算一个p的加密算法,接着再get请求一个链接 https://ssl.p ...
- 如何在Windows2008中禁用IPv6
我自己修复此问题 更改 DisabledComponents 注册表值 您可以通过将DisabledComponents注册表值的主机上禁用 IPv6.DisabledComponents注册表值会影 ...
- java爬虫--使用正则表达式获取网页中的email
package com.enation.newtest; import java.io.*; import java.util.regex.*; import java.net.*; public c ...
- forEach循环dom元素
//让ie8支持foreach if (typeof Array.prototype.forEach != 'function') { Array.prototype.forEach = functi ...
- "todoList妙味"学习总结
1.v-bind 主要用于属性绑定 :class="{completed: item.isChecked}",它会将{}里面的内容解析为js表达式 2.vue提供了一组方法, ...
- 汕头市队赛 SRM1X T2 ——扫描线
绵津见-终 SRM 13 背景 “西瓜也是可以种在海上的!”——绵津见 然而种在海上的西瓜最需要防范的,是时不时会涌向瓜田的阵阵海浪. 幸好,身为海神的绵津见可以释放魔法“水平如镜”来阻止海浪拍打西瓜 ...
- 洛谷 P1463 [SDOI2005]反素数ant && codevs2912反素数
题目描述 对于任何正整数x,其约数的个数记作g(x).例如g(1)=1.g(6)=4. 如果某个正整数x满足:g(x)>g(i) 0<i<x,则称x为反质数.例如,整数1,2,4,6 ...
- android 图片凸出
转自 http://blog.csdn.net/hupei/article/details/52064946 概述 今天有个群友问 Android图片凸出 效果怎么弄,早以前有过类似的需求,整个项目的 ...
- 求LCA最近公共祖先的在线ST算法_C++
ST算法是求最近公共祖先的一种 在线 算法,基于RMQ算法,本代码用双链树存树 预处理的时间复杂度是 O(nlog2n) 查询时间是 O(1) 的 另附上离线算法 Tarjan 的链接: http ...