修改本地 yum 源
这里直接参考这个文章就行了:CentOS 7下配置本地yum源及yum客户端,看小节 “二、配置本地yum源” 即可。

TFTP
安装xinetd和tftp-server
在/etc/xinetd.d/tftp中,指定tftp的目录,并且将"disable"置为“no”
关闭iptables(如果你会设置的话那就进行相关设置,无需关闭)。可以使用ntsysv来设置开机关闭
关闭selinux:

vi /etx/sysconfig/selinux,将type改为disabled

setenforce 0

启动xinetd(会同时启动 tftp server)

sevice xinetd restart

vi /etc/selinux/config,设置为SELINUX=disabled

Samba
(1) 编辑/etc/samba/smb.conf,添加以下内容:

[root]

path = /
valid users = root
create mask = 0600
directory mask = 0700
writable = yes
browsable = yes
guest ok = no

另外,找到security=user,添加/修改以下内容:

smb passwd file = /etc/samba/smbpasswd
passdb backend = smbpasswd
(2) # service smb restart
(3) # passwd root修改root的密码。注意这个会同时修改系统root的密码。如果你要添加账户,则使用

useradd -s /sbin/nologin xxx

(4) # smbpasswd -a root
(5) 在Windows中清除保存的密码:control keymgr.dll
(6) 在客户端:
  # mount -t cifs //192.168.1.100/root /mnt -o username=root

NFS
网上的办法多是基于portmap的,但是在CentOS中,portmap被rpcbind取代了,因此配置的方法也不一样。

需要安装的rpm文件有:libgssglue, libtirpc, rpcbind, nfs

安装之后配置顺序为:

vi /etc/exports

  添加一行/tftpboot/rootfs (rw, no_root_squash),其中 表示允许任意的IP地址

service nfs restart; export fs

在客户端:# mount -t nfs -o nolock 192.168.1.100:/tftpboot/rootfs /mnt
设置 shell 不显示完整路径
BASH不显示全路径的方法

姐妹篇
Ubuntu Linux 安装后,建立嵌入式开发环境


已注销
1 声望1 粉丝

引用和评论

0 条评论