background

For a variety of reasons, there are times when you need a completely private instant messaging system. Here’s how to deploy your own private instant messaging system.

Final preview

System requirements

  1. For Linux hosts, you need to enable ports 80, 1883, and 8888 on the firewall or security group. Port 80 is commonly used and must not be occupied by other software.
  2. JRE 1.8.x

IM deployment Server

  1. Determine the Java version to executejava -version, if outputJDK version 1.8 "x"“, the Java environment is successfully installed
  2. Download the latest releaseIM Server Software PackageTo the serverimserverdirectory
  3. Decompress and modify the configuration. 0imserverdirectory
    1. performThe tar ZXVF - distribution - 0.86 - bundle - tar. Tar. GzUnpack theIM ServerThe file name of the installation package downloaded in Step 1 May be different from that in the command. You need to modify the file name.
    2. Modify theconfig/wildfirechat.confThe file will beserver.ipChange the IP address to the public IP address of the local host
  4. Start theIM Serverperformnohup sh ./bin/wildfirechat.sh 2>&1 & Start theIM Server
  5. validationIM ServerCheck whether the deployment is successful.
    1. Server executioncurl localhost/api/versionIf you can see the outputIM ServerFor example, the deployment is successful
    2. Enter:http://${Server public IP address}/ API /versionTo see theIM ServerIf the version information is displayed, the deployment is successful. If no, the corresponding port is not opened

      Hit above the servers public IP needs to be replaced, eventually command similar to http://1.1.1.1/api/version

To deploy the App Server

  1. Download the latest releaseApp Server Software Package 到appserverdirectory
  2. Unpack the
    1. Enter theappserverdirectory
    2. performThe tar ZXVF app - server - release - 0.57. Tar. GzUnpack theApp ServerThe file name downloaded in Step 1 May be different from that in the command. You need to modify the file name accordingly.
  3. Start theApp ServerperformNohup java-jar app-0.0.1 -snapshot.jar 2> &1&Start theApp Server
  4. validation
    1. Server executioncurl localhost:8888/If you can see the outputok“, the deployment is successful
    2. Enter:http://${Server public IP address}:8888/To check whether the command output is displayedokIf yes, the deployment is successful. If no, the corresponding port is not opened

      You need to replace the public IP address of the server. The final command is similar to http://1.1.1.1:8888/

Compile the Android

  1. Download the latest Android code
  2. Decompress and modify the configuration
    1. willAppService.javaIn theAPP_SERVER_ADDRESSModified tohttp://${Server public IP address}:8888
    2. willConfig.javaIn theIM_SERVER_HOSTModified toPublic IP Address of the Server
  3. Compile and run to fill in the machine number, verification code to fill66666

further

For more gameplay, see Docs

reference

The projects mentioned in this article are all open source, and interested partners can follow them.

  1. IM Server: im-server
  2. App Sever: App server. –
  3. The Android client: Android – chat