Ubuntu 12.04, CentOS 6.0 32bit ¹öÀü¿¡¼ Á¤»ó ¼³Ä¡µÇ´Â °Í È®ÀÎÇÏ¿´´Ù. ´ç¿¬ÇÑ ¸»ÀÌ°ÚÁö¸¸... ¼³Ä¡½Ã c ÄÄÆÄÀÏ·¯°¡ ÇÊ¿äÇÏ´Ù.
gcc ´Â apt-get (ubuntu) À̳ª yum (CentOS) À» ÀÌ¿ëÇÏ¿© °£ÆíÈ÷ ¼³Ä¡ÇÒ ¼ö ÀÖ´Ù.
---------------------------------------------------------------
Libpcap is a portable C/C++ library for network traffic capture.
Although libpcap is primarily a packet-capturing tool, it also can create and manipulate packets from saved files, which can then be used in the wide variety of tools that support the libpcap format.
In this article, I will show how to install libpcap on Ubuntu.
1. Download libpcap-1.0.0.tar.gz (512.0KB) from http://www.tcpdump.org and decompress it (tar zxvf libpcap-1.0.0.tar.gz) to your self-defined directory; 2. Download flex-2.5.35.tar.gz (1.40MB) from http://flex.sourceforge.net and decompress it (tar zxvf flex-2.5.35.tar.gz) to your self-defined directory; 3. Download bison-2.4.1.tar.gz (1.9MB) from http://ftp.gnu.org/gnu/bison and decompress it (tar zxvf bison-2.4.1.tar.gz) to your self-defined directory; 4. Download m4-1.4.13.tar.gz (1.2MB) from http://ftp.gnu.org/gnu/m4 and decompress it (tar zxvf m4-1.4.13.tar.gz) to your self-defined directory;
Then, enter into the directories m4-1.4.13, bison-2.4.1, flex-2.5.35, libpcap-1.0.0 in the order, and execute the following commands: (sudo) ./configure (sudo) make (sudo) make install
= libpcap Àº ./configure | make | make install ÈÄ, Á¤»óÀûÀ¸·Î ÄÄÆÄÀÏ µÇ¾ú´Ù¸é = ls -altr Çغ¸¸é libpcap.so.1.x.x ÆÄÀÏÀÌ »ý¼ºµÇ¾î ÀÖ´Â °É º¼ ¼ö ÀÖ´Ù. = sudo cp libpcap.so.1.x.x /usr/lib ¸í·É¾î·Î /usr/lib ¿¡ º¹»çÇÏ°í, = ln -s /usr/lib/libpcap.so.1.x.x libpcap.so.1 ¸í·É¾î·Î ½Éº¼¸¯ ¸µÅ©¸¦ °É¾îÁØ´Ù.
Now, everything should work well. And you can get a .c file to test your installation.
Notice: installing libpcap and running your programs should have an access to your root priority. Good Luck! ^_^
|
|
|