现在的位置: 首页 > 综合 > 正文

ubuntu 12.04 常用配置

2018年05月08日 ⁄ 综合 ⁄ 共 1257字 ⁄ 字号 评论关闭

(一):nfs配置

1:sudo apt-get install nfs-kernel-server 

2:vim /etc/exports,编辑此文档,加入/home/helloworld/nfs *(rw,sync,no_root_squash,no_subtree_check),其中/home/helloworld/nfs是我系统里的目录,请根据情况修改。其中"*"表示所有客户机都可以访问,rw当然表示有读写权限,no_root_squash表示客户机对此目录有root操作权限

3:serviceportmap restart       //nfs is a RPC service, portmap maps its port

4:service nfs-kernel-server restart

5:验证,在开发板或者本机上使用mount -t nfs -o nolock 192.168.1.5:/home/helloworld/nfs /mnt/nfs


(二):smba配置

(1):sudo apt-get install samba
(2):sudo apt-get install smbfs

(3):添加samba用户,并添加密码

#adduser username

#smbpasswd -a username

(4):编辑sudo vi /etc/samba/smb.conf或者用图形界面修改

1.
找到[global]

workgroup = WORKGROUP
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936

2. 搜寻这一行文字代码:
#   security = user
用下面这两行取代
security = user
username map = /etc/samba/smbusers

3. 在最后一行添加:
[devshare]
comment = Shared Folder with username and password
path = /opt/smbshare
public = yes
writable = yes
valid users = dev
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
available = yes
browseable = yes
退出保存。

(3):安装Ubuntu samba图形管理界面

#sudo apt-get install system-config-samba

(4):启动samba图形管理界面
#sudo system-config-samba

(5):service smbd restart

下面只有两个参数存在差别,d与f,d表示文件夹,f表示文件。
查找当前目录下,所有的文件夹以及子文件夹,并把所有的文件夹及子文件夹设置成755,包括当前目录
find ./ -type d -exec touch {} \;
查找当前目录下,所有的文件以及子文件夹下的文件,并把所有的文件设置成644
find ./ -type f -exec touch {} \;
修改单个文件的时间为
touch 文件名

【上篇】
【下篇】

抱歉!评论已关闭.