zoukankan      html  css  js  c++  java
  • 移植DNS服务bind

    移植DNS服务bind

    标签: makefile工作linuxbuildgcc工具
    先写用于DNS的bind。

    一、 移植环境

    1 、硬件环境:

    Host : X86 PC

    Target : MPC8377E 开发板

    2 、软件环境:

    Host : Red Hat 4.1.2-12 , Linux kernel 2.6.29.1

    Target : Linux kernel 2.6.25

    3 、源码包:

    openssl-0.9.8k.tar.gz

    libxml2-sources-2.7.3.tar.gz

    bind-9.6.1.tar.gz

    4 、编译工具:

    powerpc-linux-gnu-gcc

    二、 移植步骤

    实现 DNS 功能的软件 BIND 有两个依赖库,分别为: openssl 与 libxml2 ,所以我们首先需要准备好这两个库。

    、交叉编译 openssl

    a )创建工作目录

    假设我的工作目录为 /root/Aaron ,

    # cd /root/Aaron

    # mkdir openssl-0.9.8k

    # cd openssl-0.9.8k

    # mkdir compressed install source

    其中 compressed 用于存放源码包, install 为软件安装目录, source 为源码包解压目录。

    b )获取源码包

    从 http://www.openssl.org/ 上获取 openssl 的最新稳定版本,目前为 0.9.8k 。

    将源码包拷贝到 compressed 目录下,

    # cp openssl-0.9.8k.tar.gz /root/Aaron/openssl-0.9.8k/compressed

    c )解压源码包

    # cd /root/Aaron/openssl-0.9.8k/compressed

    # tar –zxvf openssl-0.9.8k.tar.gz –C ../source

    d )生产 Makefile 文件

    # cd ../source/openssl-0.9.8k

    # ./Configure –prefix=/root/Aaron/openssl-0.9.8k/install os/compiler:powerpc-linux-gnu-gcc

    e )编译并安装

    # make

    # make install

    、交叉编译 libxml2

    a )创建工作目录

    假设我的工作目录为 /root/Aaron ,

    # cd /root/Aaron

    # mkdir libxml2-2.7.3

    # cd libxml2-2.7.3

    # mkdir compressed install source

    其中 compressed 用于存放源码包, install 为软件安装目录, source 为源码包解压目录。

    b )获取源码包

    从 http://xmlsoft.org/ 上获取 libxml2 的最新稳定版本,目前为 2.7.3 。

    将源码包拷贝到 compressed 目录下,

    # cp libxml2-sources-2.7.3.tar.gz /root/Aaron/ libxml2-2.7.3/compressed

    c )解压源码包

    # cd /root/Aaron/ libxml2-2.7.3/compressed

    # tar –zxvf libxml2-sources-2.7.3.tar.gz –C ../source

    d )生产 Makefile 文件

    # cd ../source/ libxml2-2.7.3

    # CC=powerpc-linux-gnu-gcc ./configure –prefix=/root/Aaron/ libxml2-2.7.3/install –host=powerpc-linux-gnu

    e )编译并安装

    # make

    # make install

    、交叉编译 bind

    a )创建工作目录

    假设我的工作目录为 /root/Aaron ,

    # cd /root/Aaron

    # mkdir bind-9.6.1

    # cd bind-9.6.1

    # mkdir compressed install source

    其中 compressed 用于存放源码包, install 为软件安装目录, source 为源码包解压目录。

    b )获取源码包

    从 https://www.isc.org/ 上获取 bind 的最新稳定版本,目前为 9.6.1 。

    将源码包拷贝到 compressed 目录下,

    # cp bind-9.6.1.tar.gz /root/Aaron/ bind-9.6.1/compressed

    c )解压源码包

    # cd /root/Aaron/ bind-9.6.1/compressed

    # tar –zxvf bind-9.6.1.tar.gz –C ../source

    d )生产 Makefile 文件

    # cd ../source/ bind-9.6.1

    # CC=powerpc-linux-gnu-gcc   LDFLAGS=-static BUILD_CC=gcc ./configure –host=powerpc-linux-gnu –with-openssl=/root/Aaron/openssl-0.9.8k/install –enable-epoll=no –with-randomdev= --disable-linux-caps –with-libxml2=/root/Aaron/libxml2-2.7.3/install

    e )编译并安装

    # make

    # make install

    f )移植

    将 /usr/local/sbin 、 /usr/local/bin 、 /usr/local/include 、 /usr/local/lib 、 /usr/local/share/man 下新生成的与 bind 有关的文件拷贝到目标机的相同目录下。

    这样,移植工作就基本完成了,接下来就是配置了。这方面网上的文章很多,有空的话我也另开一篇写写。

  • 相关阅读:
    open stack总结
    Nginx操作命令
    Nginx 配置详解
    Linux 常用命令-- top
    CEPH 使用SSD日志盘+SATA数据盘, 随OSD数目递增对性能影响的递增测试
    MyCat水平分库
    MyCat垂直分库
    MyCat基本知识
    utf8mb4复杂昵称问题
    Power安装linux-BIG ENDIAN mysql编译安装
  • 原文地址:https://www.cnblogs.com/chencanjian/p/5997184.html
Copyright © 2011-2022 走看看