東川印記

一本東川,笑看爭龍斗虎;寰茫兦者,度橫佰昧人生。

使用openfire+jitsi搭建视频聊天08之PC客户端

2015年4月19日星期日



PC客户端,先把汉化搞完
代码,界面清一色的awt,swt,swing........
我屮,改了一会就晕了......
安装了WB,一样是打不开。。。。



修改openfire目录名跟服务名
对openfire进行压力测试。。。。
闲着蛋疼把openfire name跟服务名改了。。。。。
  1. [root@senrsl ~]# rpm -ivh tools/vber4im-3.9.3-6.noarch.rpm
  2. Preparing...                ########################################### [100%]
  3.    1:vber4im                ########################################### [100%]
  4. [root@senrsl ~]# service openfire status
  5. openfire: unrecognized service
  6. [root@senrsl ~]# service vber4im status
  7. openfire is not running
  8. [root@senrsl ~]# service vber4im start
  9. Starting vber4im:
  10. [root@senrsl ~]# service vber4im status
  11. openfire is running
  12. [root@senrsl ~]# service vber4im stop
  13. Shutting down openfire:                                    [  OK  ]
  14. [root@senrsl ~]# service vber4im status
  15. openfire is not running
  16. [root@senrsl ~]#
怎么干的。
/home/senrsl/test/jisti/openfire_src/build/rpm/openfire.spec 打rpm包
改成这样
  1. Summary: SENRSL IM Server
  2. Name: vber4im
  3. Version: %{OPENFIRE_VERSION}
  4. Release: 6
  5. BuildRoot: %{_builddir}/%{name}-root
  6. Source0: %{OPENFIRE_SOURCE}
  7. %ifnarch noarch
  8. Source1: %{JRE_BUNDLE}
  9. %endif
  10. Group: Applications/Communications
  11. Vendor: SENRSL Ltd
  12. Packager: SENRSL Ltd
  13. License: Apache license v2.0
  14. AutoReqProv: no
  15. URL: http://www.senrsl.com/
  16. %define prefix /opt
  17. %define homedir %{prefix}/vber4im
  18. # couldn't find another way to disable the brp-java-repack-jars which was called in __os_install_post
  19. %define __os_install_post %{nil}
  20. %define debug_package %{nil}
  21. %description
  22. Openfire is a leading Open Source, cross-platform IM server based on the
  23. XMPP (Jabber) protocol. It has great performance, is easy to setup and use,
  24. and delivers an innovative feature set.
  25. The above said is nonsense.
  26. The following is said.
  27. This particular release includes a bundled JRE.
  28. %prep
  29. %setup -q -n openfire_src
  30. %build
  31. cd build
  32. ant openfire
  33. ant -Dplugin=search plugin
  34. cd ..
  35. %install
  36. # Prep the install location.
  37. rm -rf $RPM_BUILD_ROOT
  38. mkdir -p $RPM_BUILD_ROOT%{prefix}
  39. # Copy over the main install tree.
  40. cp -R target/openfire $RPM_BUILD_ROOT%{homedir}
  41. %ifnarch noarch
  42. # Set up distributed JRE
  43. pushd $RPM_BUILD_ROOT%{homedir}
  44. gzip -cd %{SOURCE1} | tar xvf -
  45. popd
  46. %endif
  47. # Set up the init script.
  48. mkdir -p $RPM_BUILD_ROOT/etc/init.d
  49. cp $RPM_BUILD_ROOT%{homedir}/bin/extra/redhat/openfire $RPM_BUILD_ROOT/etc/init.d/vber4im
  50. chmod 755 $RPM_BUILD_ROOT/etc/init.d/vber4im
  51. # Make the startup script executable.
  52. chmod 755 $RPM_BUILD_ROOT%{homedir}/bin/openfire.sh
  53. # Set up the sysconfig file.
  54. mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
  55. cp $RPM_BUILD_ROOT%{homedir}/bin/extra/redhat/openfire-sysconfig $RPM_BUILD_ROOT/etc/sysconfig/vber4im
  56. # Copy over the documentation
  57. cp -R documentation $RPM_BUILD_ROOT%{homedir}/documentation
  58. cp changelog.html $RPM_BUILD_ROOT%{homedir}/
  59. cp LICENSE.html $RPM_BUILD_ROOT%{homedir}/
  60. cp README.html $RPM_BUILD_ROOT%{homedir}/
  61. # Copy over the i18n files
  62. cp -R resources/i18n $RPM_BUILD_ROOT%{homedir}/resources/i18n
  63. # Make sure scripts are executable
  64. chmod 755 $RPM_BUILD_ROOT%{homedir}/bin/extra/openfired
  65. chmod 755 $RPM_BUILD_ROOT%{homedir}/bin/extra/redhat-postinstall.sh
  66. # Move over the embedded db viewer pieces
  67. mv $RPM_BUILD_ROOT%{homedir}/bin/extra/embedded-db.rc $RPM_BUILD_ROOT%{homedir}/bin
  68. mv $RPM_BUILD_ROOT%{homedir}/bin/extra/embedded-db-viewer.sh $RPM_BUILD_ROOT%{homedir}/bin
  69. # We don't really need any of these things.
  70. rm -rf $RPM_BUILD_ROOT%{homedir}/bin/extra
  71. rm -f $RPM_BUILD_ROOT%{homedir}/bin/*.bat
  72. rm -rf $RPM_BUILD_ROOT%{homedir}/resources/nativeAuth/osx-ppc
  73. rm -rf $RPM_BUILD_ROOT%{homedir}/resources/nativeAuth/solaris-sparc
  74. rm -rf $RPM_BUILD_ROOT%{homedir}/resources/nativeAuth/win32-x86
  75. rm -f $RPM_BUILD_ROOT%{homedir}/lib/*.dll
  76. %clean
  77. rm -rf $RPM_BUILD_ROOT
  78. %preun
  79. if [ "$1" == "0" ]; then
  80.     # This is an uninstall, instead of an upgrade.
  81.     /sbin/chkconfig --del vber4im
  82.     [ -x "/etc/init.d/vber4im" ] && /etc/init.d/vber4im stop
  83. fi
  84. # Force a happy exit even if openfire shutdown script didn't exit cleanly.
  85. exit 0
  86. %post
  87. chown -R daemon:daemon %{homedir}
  88. if [ "$1" == "1" ]; then
  89.     # This is a fresh install, instead of an upgrade.
  90.     /sbin/chkconfig --add vber4im
  91. fi
  92. # Trigger a restart.
  93. [ -x "/etc/init.d/vber4im" ] && /etc/init.d/vber4im condrestart
  94. # Force a happy exit even if openfire condrestart script didn't exit cleanly.
  95. exit 0
  96. %files
  97. %defattr(-,daemon,daemon)
  98. %attr(750, daemon, daemon) %dir %{homedir}
  99. %dir %{homedir}/bin
  100. %{homedir}/bin/openfire.sh
  101. %{homedir}/bin/openfirectl
  102. %config(noreplace) %{homedir}/bin/embedded-db.rc
  103. %{homedir}/bin/embedded-db-viewer.sh
  104. %dir %{homedir}/conf
  105. %config(noreplace) %{homedir}/conf/openfire.xml
  106. %config(noreplace) %{homedir}/conf/security.xml
  107. %config(noreplace) %{homedir}/conf/crowd.properties
  108. %dir %{homedir}/lib
  109. %{homedir}/lib/*.jar
  110. %{homedir}/lib/log4j.xml
  111. %dir %{homedir}/logs
  112. %dir %{homedir}/plugins
  113. %{homedir}/plugins/search.jar
  114. %dir %{homedir}/plugins/admin
  115. %{homedir}/plugins/admin/*
  116. %dir %{homedir}/resources
  117. %dir %{homedir}/resources/database
  118. %{homedir}/resources/database/*.sql
  119. %dir %{homedir}/resources/database/upgrade
  120. %dir %{homedir}/resources/database/upgrade/*
  121. %{homedir}/resources/database/upgrade/*/*
  122. %dir %{homedir}/resources/i18n
  123. %{homedir}/resources/i18n/*
  124. %dir %{homedir}/resources/nativeAuth
  125. %dir %{homedir}/resources/nativeAuth/linux-i386
  126. %{homedir}/resources/nativeAuth/linux-i386/*
  127. %dir %{homedir}/resources/security
  128. %dir %{homedir}/resources/spank
  129. %{homedir}/resources/spank/index.html
  130. %dir %{homedir}/resources/spank/WEB-INF
  131. %{homedir}/resources/spank/WEB-INF/web.xml
  132. %config(noreplace) %{homedir}/resources/security/keystore
  133. %config(noreplace) %{homedir}/resources/security/truststore
  134. %config(noreplace) %{homedir}/resources/security/client.truststore
  135. %doc %{homedir}/documentation
  136. %doc %{homedir}/LICENSE.html
  137. %doc %{homedir}/README.html
  138. %doc %{homedir}/changelog.html
  139. %{_sysconfdir}/init.d/vber4im
  140. %config(noreplace) %{_sysconfdir}/sysconfig/vber4im
  141. %ifnarch noarch
  142. %{homedir}/jre
  143. %endif
  144. %changelog
  145. * %{OPENFIRE_BUILDDATE} SENRSL Ltc <senRsl@126.com> %{OPENFIRE_VERSION}-1
  146. - Automatic RPM build.
改/home/senrsl/test/jisti/openfire_src/src/bin/extra/redhat
里面


/home/senrsl/test/jisti/openfire_src/src/bin/extra这个没执行


执行installer rpm

安装即上面那个。。。。


临时增大术
  1. [root@senrsl ~]# ulimit -a
  2. core file size          (blocks, -c) 0
  3. data seg size           (kbytes, -d) unlimited
  4. scheduling priority             (-e) 0
  5. file size               (blocks, -f) unlimited
  6. pending signals                 (-i) 127456
  7. max locked memory       (kbytes, -l) 64
  8. max memory size         (kbytes, -m) unlimited
  9. open files                      (-n) 1024
  10. pipe size            (512 bytes, -p) 8
  11. POSIX message queues     (bytes, -q) 819200
  12. real-time priority              (-r) 0
  13. stack size              (kbytes, -s) 10240
  14. cpu time               (seconds, -t) unlimited
  15. max user processes              (-u) 127456
  16. virtual memory          (kbytes, -v) unlimited
  17. file locks                      (-x) unlimited
  18. [root@senrsl ~]# ulimit -n 265535
  19. [root@senrsl ~]# ulimit -a
  20. core file size          (blocks, -c) 0
  21. data seg size           (kbytes, -d) unlimited
  22. scheduling priority             (-e) 0
  23. file size               (blocks, -f) unlimited
  24. pending signals                 (-i) 127456
  25. max locked memory       (kbytes, -l) 64
  26. max memory size         (kbytes, -m) unlimited
  27. open files                      (-n) 265535
  28. pipe size            (512 bytes, -p) 8
  29. POSIX message queues     (bytes, -q) 819200
  30. real-time priority              (-r) 0
  31. stack size              (kbytes, -s) 10240
  32. cpu time               (seconds, -t) unlimited
  33. max user processes              (-u) 127456
  34. virtual memory          (kbytes, -v) unlimited
  35. file locks                      (-x) unlimited
  36. [root@senrsl ~]#
jabber状态
从原有6个状态的基础上,又发现俩状态
  1. 返回类型    返回值    返回值说明
  2. AVAILABLE    65    在线
  3. AVAILABLE_CHAT    85    空闲
  4. BUSY    40    忙碌
  5. AWAY    35    离开
  6. ON_THE_PHONE    31    手机在线(隐)
  7. DND    30    请勿打扰
  8. UNKNOWN    1    未知状态(隐)
  9. OFFLINE    0    离线
31跟1看起来中间协议并不支持,于是便在pc版上屏蔽掉。
net.java.sip.communicator.service.protocol.jabberconstants.JabberStatusEnum



启动入口 ant run.
  1.  <!-- forking prevents from debugging -->
  2.         <java classname="net.java.sip.communicator.launcher.SIPCommunicator"
  3.             fork="true"
  4.             failonerror="true"
  5.             classpathref="project.class.path">
  6.             <!-- Sets the charset for the messages -->
  7.             <!--sysproperty key="icq.custom.message.charset" value="windows-1252"/-->
  8.             <!-- Tell felix to run Jitsi -->
  9.             <sysproperty key="felix.config.properties"
  10.                 value="file:${lib}/felix.client.run.properties"/>
  11.         ....
  12. </java>
即/home/senrsl/test/jisti/jitsi/src/net/java/sip/communicator/launcher/SIPCommunicator.java
顺着这个找到了初始化时的很多信息,然后到了最后一句
  1.         //there was no error, continue;
  2.         System.setOut(new ScStdOut(System.out));
  3.         Main.main(new String[0]);//程序窗口由此启动
跳进了felex....

从做android端的时候便已知代码使用OSGI定义框架,然后PC版发现了felex,
目前有三个已知的 OSGi 实现:
Equinox
Knopflerfish
Felix









openjdk编译补充

与ubuntu14.04LTS编译android5.0补充
默认编译出来的openjdk是1.7.0-internal,但是我需要的是The required version is: "1.7.x".
怎么改....
看官方文档,有这么个东西

Environment/Make Variables

Some of the environment or make variables (just called variables in this document) that can impact the build are:

PATH
Typically you want to set the PATH to include:
  • The location of the GNU make binary
  • The location of the Bootstrap JDK java (see Bootstrap JDK)
  • The location of the C/C++ compilers (see compilers)
  • The location or locations for the Unix command utilities (e.g. /usr/bin)
MILESTONE
The milestone name for the build (e.g."beta"). The default value is "internal".

然后
  1. senrsl@senrsl-ubuntu:~/java/openjdk7u$ export MILESTONE=fuck
  2. senrsl@senrsl-ubuntu:~/java/openjdk7u$ make sanity
  3. Target Build Versions:
  4.   JDK_VERSION = 1.7.0
  5.   MILESTONE = fuck
  6.   RELEASE = 1.7.0-fuck
  7.   FULL_VERSION = 1.7.0-fuck-senrsl_2015_01_22_20_18-b00
  8.   BUILD_NUMBER = b00
怎么把它取消掉....
export 那个里程碑是null,会自动设置默认值为internal.

我屮,这不科学......
openjdk里的make文件挨个翻了那么久,然后找到了环境变量读取
/home/senrsl/java/openjdk7u/make/Defs-internal.gmk
+313行,    MILESTONE=$(MILESTONE) \
然后继续,在/home/senrsl/java/openjdk7u/make/README.pre-components
16行开始发现了命令的解释
  1.  Variables:
  2.   ALT_BOOTDIR           The jdk home to use to build, if provided
  3.   ALT_LANGTOOLS_DIST    The dist area from a langtools build to use, if provided
  4.   ALT_OUTPUTDIR         Parent dir of build and dist directories, if provided
  5.   VARIANT               If DBG, debug build, if OPT, optimized build
  6.   TARGET_CLASS_VERSION  The classfile version number (currently 7)
  7.   ANT_HOME              Home of ant to use, if provided
  8.   QUIET                 If defined, be quiet
  9.   VERBOSE               If defined, be verbose
  10.   JDK_VERSION           Version being built
  11.   FULL_VERSION          Full version string for this jdk build
  12.   MILESTONE             fcs, beta, internal or empty
  13.   BUILD_NUMBER          Number of the jdk build
  14.   JPRT_ARCHIVE_BUNDLE   Path to zip bundle to create for JPRT
也就是说MILESTONE             fcs, beta, internal or empty有这几个选项.
设置了empty,生成的是RELEASE = 1.7.0-empty
不报希望之际,尝试了下fcs...
  1. Target Build Versions:
  2.   JDK_VERSION = 1.7.0
  3.   MILESTONE = fcs
  4.   RELEASE = 1.7.0
  5.   FULL_VERSION = 1.7.0-senrsl_2015_01_23_10_34-b00
  6.   BUILD_NUMBER = b00
这样竟然就行了.....
然后编译

  1. #-- Build times ----------
  2. Target all_product_build
  3. Start 2015-01-23 10:39:31
  4. End   2015-01-23 10:51:10
  5. 00:01:28 corba
  6. 00:02:57 hotspot
  7. 00:00:11 jaxp
  8. 00:00:16 jaxws
  9. 00:06:27 jdk
  10. 00:00:19 langtools
  11. 00:11:39 TOTAL
  12. -------------------------
  13. make[1]: Leaving directory `/home/senrsl/java/openjdk7u'
  14. senrsl@senrsl-ubuntu:~/java/openjdk7u$ /home/senrsl/java/openjdk7u/build/j2sdk-image/bin/java -version
  15. openjdk version "1.7.0"
  16. OpenJDK Runtime Environment (build 1.7.0-senrsl_2015_01_23_10_39-b00)
  17. OpenJDK 64-Bit Server VM (build 24.80-b07, mixed mode)
  18. senrsl@senrsl-ubuntu:~/java/openjdk7u$
这样竟然就行了....

配置编译环境
  1. senrsl@senrsl-ubuntu:~$ source ~/.bashrc
  2. senrsl@senrsl-ubuntu:~$ java -version
  3. openjdk version "1.7.0"
  4. OpenJDK Runtime Environment (build 1.7.0-senrsl_2015_01_23_10_39-b00)
  5. OpenJDK 64-Bit Server VM (build 24.80-b07, mixed mode)
  6. senrsl@senrsl-ubuntu:~$ echo $JAVA_HOME
  7. /home/senrsl/java/openjdk7u/build/j2sdk-image
  8. senrsl@senrsl-ubuntu:~$ export USE_CCACHE=1
  9. senrsl@senrsl-ubuntu:~$ cd android/source/WORKING_DIRECTORY/
  10. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ export CCACHE_DIR=/home/senrsl/android/source/.ccache
  11. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ prebuilts/misc/linux-x86/ccache/ccache -M 50G
  12. Set cache size limit to 50.0 Gbytes
  13. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ source build/envsetup.sh
  14. including device/moto/shamu/vendorsetup.sh
  15. including device/samsung/manta/vendorsetup.sh
  16. including device/htc/flounder/vendorsetup.sh
  17. including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
  18. including device/generic/mini-emulator-arm64/vendorsetup.sh
  19. including device/generic/mini-emulator-mips/vendorsetup.sh
  20. including device/generic/mini-emulator-x86_64/vendorsetup.sh
  21. including device/generic/mini-emulator-x86/vendorsetup.sh
  22. including device/asus/tilapia/vendorsetup.sh
  23. including device/asus/grouper/vendorsetup.sh
  24. including device/asus/flo/vendorsetup.sh
  25. including device/asus/deb/vendorsetup.sh
  26. including device/asus/fugu/vendorsetup.sh
  27. including device/lge/hammerhead/vendorsetup.sh
  28. including device/lge/mako/vendorsetup.sh
  29. including sdk/bash_completion/adb.bash
  30. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ lunch aosp_arm-eng
  31. ============================================
  32. PLATFORM_VERSION_CODENAME=REL
  33. PLATFORM_VERSION=5.0.50.50.50.50
  34. TARGET_PRODUCT=aosp_arm
  35. TARGET_BUILD_VARIANT=eng
  36. TARGET_BUILD_TYPE=release
  37. TARGET_BUILD_APPS=
  38. TARGET_ARCH=arm
  39. TARGET_ARCH_VARIANT=armv7-a
  40. TARGET_CPU_VARIANT=generic
  41. TARGET_2ND_ARCH=
  42. TARGET_2ND_ARCH_VARIANT=
  43. TARGET_2ND_CPU_VARIANT=
  44. HOST_ARCH=x86_64
  45. HOST_OS=linux
  46. HOST_OS_EXTRA=Linux-3.13.0-37-generic-x86_64-with-Ubuntu-14.04-trusty
  47. HOST_BUILD_TYPE=release
  48. BUILD_ID=AOSP
  49. OUT_DIR=out
  50. ============================================
  51. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$
执行编译make -j16


然后,又是错误版本
  1. Checking build tools versions...
  2. ************************************************************
  3. You are attempting to build with the incorrect version
  4. of java.
  5.  
  6. Your version is: openjdk version "1.7.0" OpenJDK Runtime Environment (build 1.7.0-senrsl_2015_01_23_10_39-b00) OpenJDK 64-Bit Server VM (build 24.80-b07, mixed mode).
  7. The required version is: "1.7.x"
  8.  
  9. Please follow the machine setup instructions at
  10.     https://source.android.com/source/initializing.html
  11. ************************************************************
  12. build/core/main.mk:167: *** stop。 停止。
  13. #### make failed to build some targets (33 seconds) ####
需要的是 1.7.x跟当前版本1.7.0有区别吗......
跑到安装openjdk的系统上看看

  1. [senrsl@senrsl-centos7 ~]$ java -version
  2. java version "1.7.0_51"
  3. OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31)
  4. OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
  5. [senrsl@senrsl-centos7 ~]$
好吧,就按这种改
就这样,又是半天.
好吧,不管编成什么样,就是报版本不对.
然后,只好senrsl@senrsl-ubuntu:~$ sudo aptitude install openjdk-7-jdk
然后是改环境~/.bashrc
#java path
#export JAVA_HOME=/home/senrsl/java/jdk1.7.0_71
#export JAVA_HOME=/home/senrsl/java/openjdk7u/build/j2sdk-image
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
source,然后 make -j16,就跑起来了.....
make的时候机器超级卡
然后make完了
  1. Creating filesystem with parameters:
  2.     Size: 576716800
  3.     Block size: 4096
  4.     Blocks per group: 32768
  5.     Inodes per group: 7040
  6.     Inode size: 256
  7.     Journal blocks: 2200
  8.     Label:
  9.     Blocks: 140800
  10.     Block groups: 5
  11.     Reserved block group size: 39
  12. Created filesystem with 1528/35200 inodes and 109037/140800 blocks
  13. Install system fs image: out/target/product/generic/system.img
  14. out/target/product/generic/system.img+ maxsize=588791808 blocksize=2112 total=576716800 reserve=5947392
  15. #### make completed successfully (01:45:36 (hh:mm:ss)) ####
  16. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$
make完以后直接emulator就可以跑默认的模拟器
senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ emulator

查看当前目录大小
  1. senrsl@senrsl-ubuntu:~/android/source$ du -h --max-depth=0
  2. 75G    .
  3. senrsl@senrsl-ubuntu:~/android/source$ ll
  4. 总用量 20
  5. drwxrwxr-x  5 senrsl senrsl 4096  1月  8 10:36 ./
  6. drwxrwxr-x 11 senrsl senrsl 4096 12月 30 21:12 ../
  7. drwxrwxr-x  2 senrsl senrsl 4096 12月 30 21:13 bin/
  8. drwxrwxr-x 19 senrsl senrsl 4096  1月 23 15:14 .ccache/
  9. drwxrwxr-x 28 senrsl senrsl 4096  1月  8 10:41 WORKING_DIRECTORY/
  10. senrsl@senrsl-ubuntu:~/android/source$
CentOS修改密码
发现服务器上的内容会被改,修改个新密码试试
  1. Last login: Sun Feb 15 06:49:40 2015 from 192.168.21.120
  2. [root@senrsl ~]# passwd root
  3. Changing password for user root.
  4. New password:
然后发现JDK变成1.5了。。。。
查看公共的环境变量[root@senrsl ~]# vi /etc/profile
发现了有意思的事情

gij的java环境
启动项目启动不了,java环境报错,查看java环境变量变成了gij的java1.5
  1. [root@senrsl java]# java -version
  2. java version "1.5.0"
  3. gij (GNU libgcj) version 4.4.7 20120313 (Red Hat 4.4.7-11)
  4. Copyright (C) 2007 Free Software Foundation, Inc.
  5. This is free software; see the source for copying conditions.  There is NO
  6. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  7. [root@senrsl java]#
然后google了下,发现linux默认的java指向不是自己安的。
  1. //找PATH变量里的java
  2. [root@senrsl ~]# which java
  3. /usr/bin/java
  4. //查看java的指向
  5. [root@senrsl ~]# ls /usr/bin/java -l
  6. lrwxrwxrwx 1 root root 22 Feb  4 13:23 /usr/bin/java -> /etc/alternatives/java
  7. //发现他指向了这里
  8. [root@senrsl ~]# ll /etc/alternatives/java
  9. lrwxrwxrwx 1 root root 35 Feb  4 13:23 /etc/alternatives/java -> /usr/lib/jvm/jre-1.5.0-gcj/bin/java
  10. //所以当前java的版本就是指向的这个
  11. [root@senrsl ~]# java -version
  12. java version "1.5.0"
  13. gij (GNU libgcj) version 4.4.7 20120313 (Red Hat 4.4.7-11)
  14. Copyright (C) 2007 Free Software Foundation, Inc.
  15. This is free software; see the source for copying conditions.  There is NO
  16. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. //使用alternatives工具安装指向我们自己的路径
  18. [root@senrsl ~]# alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_71/bin/java 300
  19. //看当前的还是以前的
  20. [root@senrsl ~]# java -version
  21. java version "1.5.0"
  22. gij (GNU libgcj) version 4.4.7 20120313 (Red Hat 4.4.7-11)
  23. Copyright (C) 2007 Free Software Foundation, Inc.
  24. This is free software; see the source for copying conditions.  There is NO
  25. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  26. //使用alternatives工具配置一下
  27. [root@senrsl ~]#  alternatives --config java
  28. There are 2 programs which provide 'java'.
  29.   Selection    Command
  30. -----------------------------------------------
  31. *+ 1           /usr/lib/jvm/jre-1.5.0-gcj/bin/java
  32.    2           /usr/java/jdk1.7.0_71/bin/java
  33. Enter to keep the current selection[+], or type selection number: 2
  34. //成功更改
  35. [root@senrsl ~]# java -version
  36. java version "1.7.0_71"
  37. Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
  38. Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
  39. [root@senrsl ~]#
然后去调程序
  1. [root@senrsl ~]# rpm -qi v4im
  2. Name        : v4im                         Relocations: (not relocatable)
  3. Version     : 3.9.3                             Vendor: SENRSL Ltd
  4. Release     : 7                             Build Date: Sun 15 Feb 2015 01:49:30 PM CST
  5. Install Date: Sun 15 Feb 2015 06:51:37 AM CST      Build Host: senrsl-ubuntu
  6. Group       : Applications/Communications   Source RPM: v4im-3.9.3-7.src.rpm
  7. Size        : 43172600                         License: Apache license v2.0
  8. Signature   : (none)
  9. Packager    : SENRSL Ltd
  10. URL         : http://www.senrsl.com/
  11. Summary     : SENRSL IM Server
  12. Description :
  13. Openfire is a leading Open Source, cross-platform IM server based on the
  14. XMPP (Jabber) protocol. It has great performance, is easy to setup and use,
  15. and delivers an innovative feature set.
  16. The above said is nonsense.
  17. The following is said.
  18. This particular release includes a bundled JRE.
  19. [root@senrsl ~]# service v4im status
  20. openfire is not running
  21. [root@senrsl ~]# service v4im start
  22. Starting v4im:
  23. [root@senrsl ~]# service v4im status
  24. openfire is running
启动成功,网页输入地址,就发现正常运行。
然后重新配置,再改conf下的数据库连接字符串,运行。

自动创建用户及好友关系的插件

前缀,开始,截止,关系。
1000 % (49+1) = 0
必须按这个mod规则填,否则会报
Number of users per roster should be greater than total number of users. Number of users per roster plus one should also be a multiple of total number of users



年后此项目暂停,搞android OS开始。
2015年04月19日14:40:44

--
senRsl
2015年01月22日20:19:00

没有评论 :

发表评论