Ubuntu 下安装 CCNx0.8.2

官网简介:

The CCNx architecture is based on three basic tenets:

  • Content is accessed by name, not machine address.
  • Security is applied directly to the content, not the connection.
  • Content may be cached opportunistically in the network for more efficient and scalable retrieval.

A CCNx network is populated with content producers, content publishers, and content consumers. Forwarders and in-network caches called Content Stores handle CCNx traffic. There are two types of messages in a CCNx network: a message to request data from the network is called an “Interest”.  A message to return data is called a “Content Object”.  A Content Object is said to satisfy an Interest if the names (and other optional restriction criteria) exactly match. In this network the Forwarding Information Base (FIB) tables route on names, not IP addresses. The forwarder contains a strategy layer to forward Interest messages along optimal paths. A forwarder also stores information about each Interest message in a Pending Interest Table (PIT) to identify the correct return path for Content Objects to follow and to aggregate similar Interest messages in order to avoid forwarding multiple similar messages.

最新版本下载:

http://www.ccnx.org/download/

安装过程:

1. 首先在安装ccnx时需要openjdk-6-jre-lib支持,因此需要将原来的JDK注释掉。

  下载openjdk:

sudo apt-get install openjdk-6-jdk

  因为注释掉/etc/profile中关于sunJDK部分后还是没办法自动替换,因此将/etc/profile中JAVA_HOME的路径进行了修改

  JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/
  重新载入变量后,输入java -version OpenJDK安装成功。

2.ccnx 0.8.2 的依赖包有:
ant1.8, autoconf, libssl-dev, libexpat-dev, libpcap-dev, libecryptfs0, libxml2-utils, automake, gawk, gcc, g++,
git-core, pkg-config, libpcre3-dev, openjdk-6-jre-lib
其中蓝色的是 Ubuntu 没有的安装包。可通过以下命令查询:

apt-cache pkgnames | grep ~

继续通过apt-get命令将需要的依赖包装好。

ant可以通过以下命令完成安装

sudo apt-get install ant

同理安装libexpat-dev等

安装完必要的依赖包后创建 ccnd 账户
根据项目网站 guide,需要创建 ccnd 账户,本人的实际安装中,省略了该步骤,直接使用当前用户账户即可,没有问题!

项目建议的代码如下:

> sudo useradd -m -C "CCNx User" ccnd
> sudo passwd -l ccnd
> sudo rm -f /home/ccnd/.bash*
> sudo mkdir /var/log/ccnd
> sudo chown ccnd /var/log/ccnd
#Install an init script (sample under development)
#update-rc.d ccnd defaults
>su - ccnd
#Verify you are in /home/ccnd

找到你下载的ccnx-0.8.2.tar.gz路径,在终端执行如下代码


>chmod 644 ccnx-0.8.2.tar.gz
>tar –zxvf ccnx-0.8.2.tar.gz
>cd ccnx-0.8.2

 执行配置命令

>./configure

6、 执行编译

>make


成功执行后当前目录将多出三个子目录:bin, include, lib

>make test


如果需要将代码安装到主机中,执行:

>make install

接下来就可以通过ccnd或者ccndstart启动ccnd,通过ccnr可以启动repo。在哪个目录下运行命令就会在当前目录下产生repo文件,repo文件会无限制增大,所以记得定时清理。





原文地址:https://www.cnblogs.com/xiaoxiaff/p/3969633.html