RedHat Enterprise Linu…
Abstract
在嵌入式开发中有宿主机和目标机之分:宿主机是执行编译、链接嵌入式软件的计算机;目标机是运行嵌入式软件的硬件平台。
TFTP服务器作为工作于宿主机的软件,主要提供对目标机的主要映像文件的下载工作。
Solution
一.TFTP服务器的安装
利用以下命令就可以看到TFTP服务器已启动,则不用安装
[root@localhost Server]# netstat -a |grep tftp
udp
0
0
*:tftp
*:*
若没有安装,在Redhat Enterprise Linux
5的安装光盘中有RPM安装包,挂在光盘后进入到文件夹,找到相应的安装包。
[root@localhost user]# cd /media/
[root@localhost media]# ls
RHEL_5.1 i386 DVD
[root@localhost media]# cd RHEL_5.1\ i386\ DVD/
[root@localhost RHEL_5.1 i386 DVD]# ls
[root@localhost RHEL_5.1 i386 DVD]# cd Server/
[root@localhost Server]# ls tftp*
tftp-0.42-3.1.i386.rpm
tftp-server-0.42-3.1.i386.rpm
执行安装命令
[root@localhost Server]# rpm -ivh
tftp-server-0.42-3.1.i386.rpm
warning: tftp-server-0.42-3.1.i386.rpm: Header V3 DSA signature:
NOKEY, key ID 37017186
error: Failed dependencies:
xinetd is needed by tftp-server-0.42-3.1.i386
提示需要安装xinetd,找到安装包并安装
[root@localhost Server]# ls xinet*
xinetd-2.3.14-10.el5.i386.rpm
[root@localhost Server]# rpm -ivh
xinetd-2.3.14-10.el5.i386.rpm
warning: xinetd-2.3.14-10.el5.i386.rpm: Header V3 DSA signature:
NOKEY, key ID 37017186
Preparing...
########################################### [100%]
1:xinetd
###########################################
[100%]
再执行安装TFTP命令
[root@localhost Server]# rpm -ivh
tftp-server-0.42-3.1.i386.rpm
warning: tftp-server-0.42-3.1.i386.rpm: Header V3 DSA signature:
NOKEY, key ID 37017186
Preparing...
########################################### [100%]
1:tftp-server
###########################################
[100%]
建立tftp的主工作目录
[root@localhost Server]# mkdir
/tftpboot
修改配置文件
[root@localhost Server]# vi
/etc/xinetd.d/tftp
主要注意修改的两个地方:
# default: off
# description: The tftp server serves files using the trivial file
transfer \
#
protocol. The tftp protocol is often used to boot
diskless \
#
workstations, download configuration files to network-aware
printers, \
#
and to start the installation process for some operating
systems.
service tftp
{
socket_type
= dgram
protocol
= udp
wait
= yes
user
= root
server
= /usr/sbin/in.tftpd
server_args
= -s /tftpboot
disable
= no
per_source
= 11
cps
= 100 2
flags
= IPv4
}
重启服务
[root@localhost Server]# /etc/init.d/xinetd
restart
Stopping
xinetd:
[FAILED]
Starting
xinetd:
[ OK ]
查看是否启动
[root@localhost Server]# netstat -a |grep tftp
udp
0
0
*:tftp
*:*
二.NFS的安装
NFS(Network File
System,网络文件系统)是一种将远程主机上的分区(目录)经网络挂在到本地的一种机制,通过对网络文件系统的支持,用户可以在本地系统上像操作本地分区一样来对远程主机的共享分区(目录)进行操作,类似于windows的共享目录。
查看安装版本
[root@localhost Server]# rpm -q
nfs-utils-1.0.9-24.el5.i386.rpm
package nfs-utils-1.0.9-24.el5.i386.rpm is not
installed
没有安装,从光盘中找到相应的RPM安装包并安装
[root@localhost Server]# rpm -ivh
nfs-utils-1.0.9-24.el5.i386.rpm
warning: nfs-utils-1.0.9-24.el5.i386.rpm: Header V3 DSA signature:
NOKEY, key ID 37017186
Preparing...
########################################### [100%]
package nfs-utils-1.0.9-24.el5 is already
installed
NFS配置,加入允许其他计算机访问的目录和访问权限
[root@localhost Server]# vi
/etc/exports
例
/home
192.168.1.*
(rw,sync,no_boot_squash)
1、home:允许其它计算机访问的目录
2、192.168.1.*:被允许访问该目录的客户端IP地址
3、Rw:可读可写
4、no_boot_squash:表示客户端root用户对该目录具备写权限
启动NFS服务器
[root@localhost Server]# /etc/init.d/nfs start
Starting NFS services: exportfs: /etc/exports:1:
unknown keyword "no_boot_squash"
[FAILED]
Starting NFS
quotas:
[ OK ]
Starting NFS
daemon:
[ OK ]
Starting NFS
mountd:
[ OK ]
重启NFS服务器
[root@localhost Server]# /etc/init.d/nfs restart
Shutting down NFS
mountd:
[ OK ]
Shutting down NFS
daemon:
[ OK ]
Shutting down NFS
quotas:
[ OK ]
Shutting down NFS
services:
[FAILED]
Starting NFS services: exportfs: /etc/exports:1:
unknown keyword "no_boot_squash"
[FAILED]
Starting NFS
quotas:
[ OK ]
Starting NFS
daemon:
[ OK ]
Starting NFS
mountd:
[ OK ]
最后,使用mount命令来挂载NFS服务器上的共享目录
#mount -t nfs servername :/shared_dir
/localdir
例如:
#mount -t
nfs 10.168.1.100 :/home
/mnt/nfs
RedHat Enterprise Linu…的更多相关文章
- redhat linux enterprise 5 输入ifconfig无效的解决方法
redhat linux enterprise 5 输入ifconfig无效的解决方法 在安装完成linux后,进入终端,输入命令行ifconfig,会提示bash: ifconfig: comm ...
- RedHat Server Enterprise 6安装G++
RedHat 6默认是安装有GCC,而没有安装G++编译 要安装G++前最好先查看下GCC的版本号,通常GCC的版本和G++的版本是相同的,知道GCC的版本再去找G++的安装文件就容易些,版本号有在安 ...
- RedHat Enterprise Linu…
RedHat Enterprise Linux 6.4 使用Centos 6 的yum 源问题 2015.04.09 一.问题描述 有时在使用RedHat 系统进行安装某些软件时,会出现如下提示: T ...
- RHEL(RedHat Enterprise Linux)5/6 ISO镜像下载
本文贴出了RHEL(RedHat Enterprise Linux)发行版本中常用的服务器版本的ISO镜像文件,供大家下载学习使用,贴出的版本有RedHat Enterprise Linux(RHEL ...
- linux -redhat rpm 和zabbix和各种rpm包下载地址
redhat ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Client/en/os/SRPMS/ zabbix https://sourcefo ...
- 菜鸟玩云计算之十五:在Ubuntu上创建和管理Redhat虚拟机
菜鸟玩云计算之十五:在Ubuntu上创建和管理Redhat虚拟机 chedou@hgdb.net 虚拟机给工作带来巨大的便利,不仅仅体现在资源的按需使用,而且配置的迁移特别方便.本文将使用Ubuntu ...
- RedHat 6.8 内核编译
/*************************************************************************** * RedHat 6.8 内核编译 * 说明: ...
- 解决安装rpm包依赖关系的烦恼 - yum工具介绍及本地源配置方法
版权声明:本文发布于http://www.cnblogs.com/yumiko/,版权由Yumiko_sunny所有,欢迎转载.转载时,请在文章明显位置注明原文链接.若在未经作者同意的情况下,将本文内 ...
- Linux yum配置文件详解
说明:经过网上抄袭和自己的总结加实验,非常详细,可留作参考. yum的配置一般有两种方式: 一种是直接配置/etc目录下的yum.conf文件, 另外一种是在/etc/yum.repos.d目录下 ...
随机推荐
- 【git】git知识梳理(一):基本操作&远程控制&分支管理
(一)基本操作: git中所有文件一共有三个状态:已提交,已暂存,已修改. 三个工作区域: git目录:.git文件夹,每次拷贝其实只拷贝git目录 工作目录:文件和目录都是从git目录中压缩对象数 ...
- Python爬虫--抓取糗事百科段子
今天使用python爬虫实现了自动抓取糗事百科的段子,因为糗事百科不需要登录,抓取比较简单.程序每按一次回车输出一条段子,代码参考了 http://cuiqingcai.com/990.html 但该 ...
- Problem: Query on the tree(二分+划分树)
题目链接: Problem: Query on the tree Time limit: 1s Mem limit: 64 MB Problem Description There ...
- 高级C/C++编译技术之读书笔记(四)之定位库文件
最近有幸阅读了<高级C/C++编译技术>深受启发,该书深入浅出地讲解了构建过程(编译.链接)中的各种细节,从多个角度展示了程序与库文件或代码的集成方法,提出了面向代码复用和系统集成的软件架 ...
- 【sqlite】判断sqlite数据库表是否存在
SQLite语句: cmd.CommandText = "SELECT count(*) from sqlite_master where type='table' and name='ta ...
- UIView+PYJExtension
UIView+PYJExtension.h: // // UIView+PYJExtension.h // 扩展 // // Created by 彭运京 on 16/6/21. // Copyrig ...
- LeetCode 616. Add Bold Tag in String
原题链接在这里:https://leetcode.com/problems/add-bold-tag-in-string/description/ 题目: Given a string s and a ...
- gradle 命令行
1. 帮助 ./gradlew -h 2. gradle 可执行tasks gradle tasks or ./gradlew tasks 3. gradle help 任务 帮助了解每个task 的 ...
- alpine docker 镜像 时区问题
1. 时区处理 RUN apk update && apk add curl bash tree tzdata \ && cp -r -f /usr/share/zon ...
- HttpContext.Current.Cache和HttpRuntime.Cache的区别,以及System.Runtime.Caching
先看MSDN上的解释: HttpContext.Current.Cache:为当前 HTTP 请求获取Cache对象. HttpRuntime.Cache:获取当前应用程序的Cac ...