User Tools

Site Tools


linux:telegram

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
linux:telegram [2015/07/02 00:13]
rlunaro
linux:telegram [2015/07/05 00:02] (current)
rlunaro
Line 54: Line 54:
 ===== Step 4: a basic test ===== ===== Step 4: a basic test =====
  
-Make a simple confirmation that the program is working. The program is called ''​telegram-cli''​ and it's under the ''​bin''​ directory. Go there, and execute: ​+Make a simple confirmation that the program is working. ​You can skip this test because we will have to create another user --telegramd-- to run the service and we will have to do it again.  
 + 
 +The program is called ''​telegram-cli''​ and it's under the ''​bin''​ directory. Go there, and execute: ​
  
 <​code>​ <​code>​
Line 63: Line 65:
  
 <​code>​ <​code>​
-rluna@gamora:​~/​tg-1.0.5.1/​bin$ ./​telegram-cli ../​tg-server.pub -k ../​tg-server.pub ​+$:​~/​tg-1.0.5.1/​bin$ ./​telegram-cli ../​tg-server.pub -k ../​tg-server.pub ​
 Telegram-cli version 1.0.5, Copyright (C) 2013-2014 Vitaly Valtman Telegram-cli version 1.0.5, Copyright (C) 2013-2014 Vitaly Valtman
 Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type `show_license'​. Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type `show_license'​.
Line 85: Line 87:
 ===== Step 5: install the client ===== ===== Step 5: install the client =====
  
-I've opted for manually install the client. I've copied the ''​telegram-cli''​ program under ''/​usr/​local/​bin/​telegram''​ and the public key of the server under /etc, with very restricted permissions for reading. ​+I've opted for manually install the client. I've copied the ''​telegram-cli''​ program under ''/​usr/​local/​share/​telegram''​ and the public key of the server under /etc, with very restricted permissions for reading. ​
  
 <​code>​ <​code>​
-# mkdir /usr/local/bin/​share/​telegram+# mkdir /​usr/​local/​share/​telegram
 # cp telegram-cli /​usr/​local/​share/​telegram # cp telegram-cli /​usr/​local/​share/​telegram
 </​code>​ </​code>​
Line 99: Line 101:
 # cp tg-server.pub /​etc/​telegram # cp tg-server.pub /​etc/​telegram
 # chmod g=r,o=r,u=r /​etc/​telegram/​tg-server.pub # chmod g=r,o=r,u=r /​etc/​telegram/​tg-server.pub
-</​code>​ 
- 
-And finnally, copy the configuration information. The configuration information is in your home directory under the folder ''​.telegram-cli'':​ 
- 
-<​code>​ 
-# mv /​home/​YOUR-USER/​.telegram-cli/​* /​etc/​telegram 
 </​code>​ </​code>​
  
Line 117: Line 113:
 </​code>​ </​code>​
  
- 
-**And give permissions into /​etc/​telegram:​** 
- 
-<​code>​ 
-chown telegramd:​telegramd /​etc/​telegram/​* 
-</​code>​ 
  
 Impersonate this user and run the telegram-cli program again, to create a proper configuration file:  Impersonate this user and run the telegram-cli program again, to create a proper configuration file: 
Line 163: Line 153:
 TELEGRAM_BIN="/​usr/​local/​share/​telegram/​telegram-cli"​ TELEGRAM_BIN="/​usr/​local/​share/​telegram/​telegram-cli"​
 TELEGRAM_PORT=1234 TELEGRAM_PORT=1234
-TELEGRAM_ARGS="​-/etc/telegram/config ​-k /​etc/​telegram/​tg-server.pub -d -P $TELEGRAM_PORT"​+TELEGRAM_ARGS="​-/home/telegramd/.telegram-cli ​-k /​etc/​telegram/​tg-server.pub -d -P $TELEGRAM_PORT"​
 PID_FILE=/​var/​run/​telegram.pidfile PID_FILE=/​var/​run/​telegram.pidfile
  
linux/telegram.txt · Last modified: 2015/07/05 00:02 by rlunaro