Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:comet:building-from-source [2017/08/18 04:30]
levhav [Configuring nginx as a reverse proxy]
en:comet:building-from-source [2019/12/18 02:05] (current)
Line 1: Line 1:
-<​rst>​EN::​004-Administration</​rst>​+<​rst>​EN::​004-Administration::​004-Install</​rst>​ 
 +<​rst>​Header:​ Install</​rst>​
  
 ====== Install ====== ====== Install ======
Line 15: Line 16:
 cmake . cmake .
 make make
 +make install
 </​code>​ </​code>​
  
Line 36: Line 38:
 </​code>​ </​code>​
    
 +===== Add to Startup =====
 + 
 +<code sh>cp ./​comet.service /​etc/​systemd/​system
 +systemctl daemon-reload
 +systemctl enable comet.service</​code>​
 +
 +After successes run server we can begin create chat. If you get error, you should create issue in [[https://​github.com/​Levhav/​comet-server/​issues|github repository]].
 +
 ====== Launch ====== ====== Launch ======
 Run in console mode Run in console mode
 <code sh> <code sh>
-./cpp_comet+./cppcomet
 </​code>​ </​code>​
 Running in daemon mode Running in daemon mode
Line 45: Line 55:
 systemctl start comet.service systemctl start comet.service
 </​code>​ </​code>​
- 
-===== Add to Startup ===== 
-  
-<code sh>cp ./​comet.service /​etc/​systemd/​system 
-systemctl daemon-reload 
-systemctl enable comet.service</​code>​ 
- 
-After successes run server we can begin create chat. If you get error create issue in [[https://​github.com/​Levhav/​comet-server/​issues|github repository]]. 
  
 ====== Configuring nginx as a reverse proxy ====== ====== Configuring nginx as a reverse proxy ======
Line 152: Line 154:
 Pay attention to what values of the port parameter are specified in the sections [ws] and [cometql] on these ports the comet server will wait for incoming connections. Pay attention to what values of the port parameter are specified in the sections [ws] and [cometql] on these ports the comet server will wait for incoming connections.
  
-In the comet.ini example in the repository, the port parameter for connections from JavaScrip api is set to 8087+In the comet.ini example in the repository, the port parameter for connections from JavaScrip api is set to 8087.
 This means that you need to connect like this: This means that you need to connect like this:
 <code JavaScript>​cometApi.start({user_id:​1,​ user_key:"​userHash",​ node:"​example.ru:​8087"​})</​code>​ <code JavaScript>​cometApi.start({user_id:​1,​ user_key:"​userHash",​ node:"​example.ru:​8087"​})</​code>​
Line 160: Line 162:
 <code PHP>​$link = mysqli_connect("​example.ru",​ "​root",​ "",​ "​CometQL_v1",​ 3300);</​code>​ <code PHP>​$link = mysqli_connect("​example.ru",​ "​root",​ "",​ "​CometQL_v1",​ 3300);</​code>​
  
 +===== Unreadable file comet.ini =====
  
 +Some text editors add unprintable simbols to the utf8 file. After that, the file may look the same but the comet server will not parse it correctly. You can try using another editor or delete the old file and create a new one with the same text.
 +
 +===== Error while assembling in CentOS =====
 +
 +<​code>​
 +CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
 +Please set them or make sure they are set and tested correctly in the CMake files:
 +MYSQL_INCLUDE_DIR (ADVANCED)
 +</​code>​
 +
 +Can not find the client'​s mysql header files. You can try installing the mysql-devel package
 +
 +<​code>​
 +yum install mysql-devel
 +</​code>​
 +
 +===== Error while assembling in CentOS =====
 +
 +<​code>​
 +/​etc/​comet-server/​comet-server/​src/​mystring.cpp:​15:​51:​ fatal error: uuid / uuid.h: No such file or directory exists
 + #include <​uuid/​uuid.h>​
 +</​code>​
 +
 +Can not find the file uuid.h. You can try installing the libuuid libuuid-devel package
 +
 +<​code>​
 +yum install libuuid libuuid-devel
 +</​code>​