bft安装log(2)

1.安装redhat7.2

2.修改开机等待时间(/etc/grub.conf)

3.配置网络:使用netconfig命令配置,把ip地址和网桥同一个网段即可,修改主机名( /etc/sysconfig/network)

4.传输bft_source.tar.gz到guest上,记得要使用非root用户进行操作(创建文件夹,传输文件)这样非root用户才有使用文件的权限

5.配置redhat上的ssh,没有c编译器!!!!!!,重装系统

6.发现groupadd所在文件夹没有加入环境变量中, 这是因为提权(su)进入root时不会有/sbin路径.使用su -就可以了

7.先安装gmp,很顺利

8.再安装sfs-0.5,error: Could not find NFS mount argument structure!

8.5.创建sfs组和用户:groupadd sfs;useradd -g sfs sfs

9.安装sfs-0.6,顺利configure,make顺利!make install顺利

10.进入top-dir,为sfs-0.6和gmp5.0.5创建链接(ln -s sfs-0.6 sfs;ln -s gmp-5.0.5 gmp)

11.修改sfs/crypt/rabin.h(为两个类分别加一个函数)

-- Patch the file sfs/crypt/rabin.h to add the following method
to rabin_pub:

 bool verify (const char *msg, const unsigned sz, const bigint &s) const {
    bigint m;
    E2 (m, s);
    D1 (m, m);
    sha1ctx sc;
    sc.update (msg, sz);
    return post_verify (&sc, m, nbits);
  }

and the following method to rabin_priv:

bigint sign (const char *msg, unsigned len) const {
    sha1ctx sc;
    sc.update(msg, len);
    bigint m = pre_sign (&sc, nbits);
    E1 (m, m);
    D2 (m, m, rnd.getword ());
    return m;
  }

 

 

12.修改libbyz的makefile:把INCS一行改成INCS:=-I../gmp -I../sfs/crypt

13.修改simple中的makefile:把LIBDIR一行改成:LIBDIRS:=-L../gmp -L../sfs/async -L../sfs/crypt -L../libbyz -L../sfs/async/.libs

  把INCS一行改成:INCS:=-I../gmp -I../libbyz -I../sfs/crypt

14.进入libbyz,make,出错

In file included from State.cc:9:
/usr/local/include/gmp.h:2229: declaration of C function `ostream
&operator<< (ostream &, const __mpq_struct *)' conflicts with
/usr/local/include/gmp.h:2228: previous declaration `ostream
&operator<< (ostream &, const __mpz_struct *)' here
/usr/local/include/gmp.h:2230: declaration of C function `ostream
&operator<< (ostream &, const __mpf_struct *)' conflicts with
/usr/local/include/gmp.h:2229: previous declaration `ostream
&operator<< (ostream &, const __mpq_struct *)' here
/usr/local/include/gmp.h:2232: declaration of C function `istream
&operator>> (istream &, __mpq_struct *)' conflicts with
/usr/local/include/gmp.h:2231: previous declaration `istream
&operator>> (istream &, __mpz_struct *)' here
/usr/local/include/gmp.h:2233: declaration of C function `istream
&operator>> (istream &, __mpf_struct *)' conflicts with
/usr/local/include/gmp.h:2232: previous declaration `istream
&operator>> (istream &, __mpq_struct *)' here
make: *** [State.o] Error 1

进入/usr/local/include/gmp.h 把多余的行(2229.2230.2232.2233)注释,再make成功!

15.进入difs,make,出错,修改makefile:

LIBDIR一行改成:LIBDIRS:=-L../gmp -L../sfs/async -L../sfs/crypt -L../libbyz -L../sfs/async/.libs

  把INCS一行改成:INCS:=-I../gmp -I../libbyz -I../sfs/crypt

16.在编译difs和simple时还是出错,找不到lsfscrypt,然而libsfscrypt是存在的,于是把两个文件中的LIBDIR一行改成:

LIBDIRS:=-L../gmp -L../sfs/async -L../sfs/crypt -L../libbyz -L/usr/local/lib/sfs-0.6/

make difs文件夹和simple文件夹

17.修改bft/config_private中的config文件,做链接(ln -s ../config_private/config .);把config_private中的文件改名为hostname;在simple中做config_private的链接(ln -s ../config_private .)

18.运行./server & 返回错误:

server: Node.cc:121: Assertion `FATAL ERROR

Could not find my principal' failed.

你可能感兴趣的:(log)