如何通过源码安装nfs,求指点

编译打包和其他
kerrysu
帖子: 25
注册时间: 2016-03-29 9:56
系统: ubuntu

如何通过源码安装nfs,求指点

#1

帖子 kerrysu » 2016-08-02 14:44

如何通过源码安装nfs,求具体教程,谢谢!
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 如何通过源码安装nfs,求指点

#2

帖子 vickycq » 2016-08-02 15:21

kerrysu 写了:通过源码安装nfs!求具体教程!
从源码编译 nfs-utils
参考 http://git.linux-nfs.org/?p=steved/nfs- ... e9;hb=HEAD

设定 nfs 服务/客户端
参考 https://help.ubuntu.com/community/SettingUpNFSHowTo
https://help.ubuntu.com/lts/serverguide ... ystem.html
https://www.digitalocean.com/community/ ... untu-14-04
https://www.howtoforge.com/how-to-confi ... untu-14.04
kerrysu 写了:通过源码安装nfs!
通过哪里的源码安装 nfs?
可直接说明最终目的

nfs 分为若干部分
1. 内核支持
2. nfs-utils
3. 其它相关部分

1.
检查内核相关支持情况

代码: 全选

grep -Ri 'config_nfs' /boot
2.
nfs-utils 1.3.3 源码下载地址 https://sourceforge.net/projects/nfs/files/nfs-utils/
nfs-utils 上游代码仓库地址 http://git.linux-nfs.org/?p=steved/nfs- ... ;a=summary

3.
参考
http://linux-nfs.org/wiki/index.php/Main_Page
http://nfs.sourceforge.net/
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
kerrysu
帖子: 25
注册时间: 2016-03-29 9:56
系统: ubuntu

Re: 如何通过源码安装nfs,求指点

#3

帖子 kerrysu » 2016-08-02 17:05

你好,我主要想表达的是在不用apt-get的情况下如何自己下载组件安装NFS,求指导!谢谢
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 如何通过源码安装nfs,求指点

#4

帖子 vickycq » 2016-08-02 17:22

kerrysu 写了:在不用apt-get的情况下如何自己下载组件安装NFS
为何不使用 apt-get?

根据所使用的 Ubuntu 版本从 http://packages.ubuntu.com/ 下载 nfs-common nfs-kernel-server 及其依赖手动安装

不用 apt-get 的情况下为 Ubuntu 16.04(xenial) 下载组件安装 nfs-utils
下载以下文件
http://packages.ubuntu.com/xenial/nfs-kernel-server
http://packages.ubuntu.com/xenial/nfs-common
对于 amd64 架构为
nfs-kernel-server_1.2.8-9ubuntu12_amd64.deb
nfs-common_1.2.8-9ubuntu12_amd64.deb
下载后用 dpkg -i 安装

附1 如何从 http://packages.ubuntu.com/xenial/nfs-kernel-server 下载 deb 文件
滚动到页面底部,点击表格第一列 "Architecture" 下方对应的架构。例如 amd64 架构点击 'amd64'
进入下载页面后任意选择镜像即可。例如选择韩国镜像 kr.archive.ubuntu.com/ubuntu

附2 如何满足依赖
用 dpkg -i 安装 nfs-common nfs-kernel-server 时,凡是提示依赖不满足的,按上文叙述的方法手工下载安装
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 如何通过源码安装nfs,求指点

#5

帖子 vickycq » 2016-08-03 9:30

kerrysu 写了:最近在搭建NFS,但是在装NFS的时候老师让我自己尝试用源码安装,配置文件,到现在一头雾水,以前从来没有用源码安装过,能不能详细的给我介绍一下,怎么用源码编译安装
参考 http://git.linux-nfs.org/?p=steved/nfs- ... e9;hb=HEAD

1. 从 sourceforge 项目主页下载 1.3.3 源代码 解压
2. ./configure; make
3. sudo make install


1) 以上第2步需先安装必要的工具 如 build-essectial
2) 以上第2步需先安装必要的依赖。具体参考上文参考链接 "PROJECT RESOURCES" 一节,以及 http://archive.ubuntu.com/ubuntu/pool/m ... untu12.dsc 中 "Build-Depends" 一节中的描述安装必要的依赖。或根据 configure 的输出有针对性地安装缺失依赖;
3) 以上第3步安装完成后,需注意到用此法安装的 nfs-utils 不包含可靠的启动脚本。可根据上文参考链接 "DAEMON STARTUP ORDER" 一节自行撰写,或直接借用 Ubuntu 对应软件包中提供的 systemd 服务/init 脚本,如 nfs-kernel-server 中的 /lib/systemd/system/*.service,/etc/init.d/nfs-kernel-server
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
kerrysu
帖子: 25
注册时间: 2016-03-29 9:56
系统: ubuntu

Re: 如何通过源码安装nfs,求指点

#6

帖子 kerrysu » 2016-08-03 14:28

root@ubuntu:/home/ks/share/nfs-utils-1.3.3# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using