forked from FriendSoftwareLabs/presence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.txt
37 lines (28 loc) · 1.29 KB
/
install.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
How to Presence server
0.a: This is an ubuntu server.
0.b: mySQL is installed.
You can copy this folder to the appropriate place in the the friendup filestructure
by running update_to_fup.sh, after adjusting the path defined in the script as necessary.
1: copy example.config.js to config.js
2: set database host, port, user, pass and name in config.js.
'user' can be a new user name, different from the mysql admin user name
or an existing user.
3: Feel free to set other relevant values in config.js while you are in there,
but it is not critical to the install process.
4: TLS : set the proper paths in server.tls. Using FriendCores key and certificate
should be fine: you can find them in friendup/cfg/crt
5: > bash install.sh
bash, not sh.
This will check for node and npm, install nodejs packages and set up the database/user
6: starting the server:
> phoenix_presence.sh
will start, and respawn the server if it crashes.
It also writes to error.log and restart.log.
To stop it, kill the phoenix_hello.sh process first, then the server.
OR
start the server directly with
> node presence.js
For starting from terminal and leaving it in the background, so it doesnt stop when
the terminal is closed, use 'nohup <command> &' and hit enter a few times.
feks:
> nohup sh phoenix_hello.sh &