¸®´ª½º¿¡ ÅÚ·¹±×·¥(Telegram) CLI ¼³Ä¡ | ÀÛ¼ºÀÏ : 2014/10/14 19:04 |
Á¶È¸¼ö : 21875 |
Á¦ ¸ñ : ¸®´ª½º¿¡ ÅÚ·¹±×·¥(Telegram) CLI ¼³Ä¡ ÀÛ¼ºÀÚ : ÁÁÀºÁøÈ£(truefeel, http://coffeenix.net/ ) ÀÛ¼ºÀÏ : 2014.9.29(¿ù) Á¤¸®ÀÏ : 2014.10.6(¿ù) 1. ÅÚ·¹±×·¥(Telegram) CLI¹öÀü ¼³Ä¡ * ÇÊ¿äÇÑ ÆÐÅ°Áö ¼³Ä¡ : libevent-devel, openssl-devel, readline-devel, libconfig-devel * lua script¸¦ »ç¿ëÇÏ·Á¸é : lua, lua-devel https://github.com/vysheng/tg ¿¡¼ ¼Ò½º¸¦ ³»·Á¹Þ´Â´Ù.
¡Ø CentOS¸¦ ±âÁØÀ¸·Î ÇßÀ¸¸ç, ´Ù¸¥ ¹èÆ÷ÆÇ¿¡¼ ÇÊ¿äÇÑ ÆÐÅ°Áö ¼³Ä¡´Â https://github.com/vysheng/tg/blob/master/README.md ¸¦ Âü°íÇÒ °Í 2. CentOS 5¿¡¼ ¼³Ä¡
LDFLAGS º¯¼ö¸¦ ÁöÁ¤Çؼ ÄÄÆÄÀÏÇÏ¸é µÈ´Ù. ±× Àü¿¡ /usr/lib/libncursesw.so ½Éº¼¸¯¸µÅ©°¡ ÀÖ´ÂÁö È®ÀÎÇÑ´Ù. ¾ø´Ù¸é ½Éº¼¸¯ ¸µÅ©¸¦ °Ç´Ù. (ncurses-devel ÆÐÅ°Áö°¡ ¼³Ä¡¾ÈµÈ °æ¿ì libncursesw.so ½Éº¼¸¯ ¸µÅ©°¡ ¾ø´Ù.)
libconfig¸¦ »ç¿ëÇÏ·Á¸é CentOS(RHEL) 5´Â ÇØ´ç ¶óÀ̺귯¸®¸¦ Á¦°øÇÏÁö ¾Ê±â ¶§¹®¿¡ º°µµ·Î ¼³Ä¡ÇؾßÇÑ´Ù. 1) x86_64 http://damsl.cs.indiana.edu/yum/centos/5/x86_64/ ¿¡¼ libconfig-1.4.8-1.x86_64.rpm °ú libconfig-devel-1.4.8-1.x86_64.rpm À» ¹Þ¾Æ ¼³Ä¡ÇÑ´Ù. 2) 32bit http://hyperrealm.com/libconfig/ ¿¡¼ ¼Ò½º¸¦ ¹Þ¾Æ ÄÄÆÄÀÏÇÑ´Ù. ¼³Ä¡µÈ libconfig ¶óÀ̺귯¸® °æ·Î°¡ /lib/ ³ª /usr/lib/ µî°ú °°ÀÌ ¾Ê´Ù¸é ÅÚ·¹±×·¥ CLI ÄÄÆÄÀϽÿ¡ LDFLAGSº¯¼ö¿¡ -L¿É¼ÇÀ¸·Î °æ·Î¸¦ ÁöÁ¤ÇØÁØ´Ù.
3. ½ÇÇà
°£´ÜÇÑ ¸í·É ¸î°¡Áö. ÀÚ¼¼ÇÑ °ÍÀº help¸í·ÉÀ¸·Î È®ÀÎ °¡´É. - msg <¹ÞÀ»»ç¶÷> <¸Þ½ÃÁö> - send_photo <¹ÞÀ»»ç¶÷> <ÆÄÀϸí> : »çÁø ÆÄÀÏÀ» »ó´ë¿¡¼ Àü¼ÛÇÑ´Ù. - send_text <¹ÞÀ»»ç¶÷> <ÆÄÀϸí> : local¿¡ ÀÖ´Â ÅؽºÆ®ÆÄÀÏ ³»¿ëÀ» ±×´ë·Î »ó´ë¿¡¼ »Ñ·ÁÁØ´Ù. - contact_list : ´ëÈ»ó´ë ¸ñ·Ï - dialog_list : ¿·ÁÀÖ´Â ´ëÈâ ¸ñ·Ï - status_online °ú status_offline : on/off »óÅ Àüȯ ¸¸¾à, ÅÚ·¹±×·¥ ¾îÇÿ¡¼ '¼³Á¤(Settings)' -> '´Ù¸¥ ¸ðµç ¼¼¼Ç Á¾·á(Terminate All Other Sessions)'À» Ŭ¸¯Çϸé, CLI ¿¬°áÀº ²÷±â°í, »õ·Î ÀÎÁõÀ» ¹Þ¾Æ¾ß ÇÑ´Ù. ÀÎÁõÁ¤º¸°¡ ÀúÀåµÈ ~/.telegram-cli/ µð·ºÅ丮¸¦ Áö¿ì°í ÀçÀÎÁõÀ» ¹ÞÀ» ¼ö ÀÖ´Ù. telegram-cli ½ÇÇà½Ã lua ½ºÅ©¸³Æ®¸¦ »ç¿ëÇؼ, - ƯÁ¤ »óȲ¿¡ µû¶ó ¸Þ½ÃÁö¸¦ ÁöÁ¤ÇÑ À¯Àú, ±×·ì¿¡°Ô º¸³¾ ¼öµµ ÀÖ°í, - ¸Þ½ÃÁö¸¦ ¼ö½Å½Ã, ¸Þ½ÃÁö¿¡ µû¶ó¼ °á°ú¸¦ »ó´ë¿¡°Ô returnÇØÁÙ ¼öµµ ÀÖ´Ù.
4. configure ÇÒ ¶§ ¿¡·¯ ¸ðÀ½ 1) yum install libevent-devel ÇÊ¿ä
2) yum install openssl-devel ÇÊ¿ä
3) yum install readline-devel ÇÊ¿ä (CentOSÀÎ °æ¿ì´Â '2. CentOS 5¿¡¼ ¼³Ä¡'¸¦ Âü°íÇÒ °Í)
5. Âü°íÀÚ·á * Compilation under CentOS5 #144 https://github.com/vysheng/tg/issues/144 |
Ä¿ÇǴнº, ½Ã½ºÅÛ ¿£Áö´Ï¾îÀÇ ½°ÅÍ / URL : http://coffeenix.net/board_view.php?bd_code=1759 |