RedHat 系列 Linux 安装后,建立嵌入式开发环境
RedHat 系列 Linux 安裝后,建立嵌入式開發環境
from:https://segmentfault.com/a/1190000005881355做開發的時候,經常為了某系列的項目,專門就搞一個虛擬機,安裝RHEL、Fedora、CentOS之類的進行開發。因為是虛擬機,也經常使用root賬戶就直接上了。
這里記錄一下使用RHEL系列虛擬機,安裝完畢后如何建立編譯環境的傻瓜過程。
本文地址:https://segmentfault.com/a/1190000005881355
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 = rootcreate mask = 0600directory mask = 0700writable = yesbrowsable = yesguest 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
總結
以上是生活随笔為你收集整理的RedHat 系列 Linux 安装后,建立嵌入式开发环境的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Ubuntu Linux 安装后,建立嵌
- 下一篇: 我加入一家硅谷骗子创业公司的奇葩经历