当前位置: 技术问答>linux和unix
Linux下文件和文件夹如何共享?
来源: 互联网 发布时间:2015-04-24
本文导语: 如题 | 安裝samba (具體可能有不同,如IP 名稱...) 1. samba-2.2.8a.tar.gz傳至 /usr/src (版本可能不同,方法一樣) cd /usr/src gunzip samba-2.2.8a.tar.gz tar xvf samba-2.2.8a.tar /etc/rc.d/ini...
如题
|
安裝samba (具體可能有不同,如IP 名稱...)
1. samba-2.2.8a.tar.gz傳至 /usr/src (版本可能不同,方法一樣)
cd /usr/src
gunzip samba-2.2.8a.tar.gz
tar xvf samba-2.2.8a.tar
/etc/rc.d/init.d/smb stop (把samba停止)
cd samba-2.2.8a/source
./configure --bindir=/usr/bin --sbindir=/usr/sbin
make
make install
cd /usr/local/samba/lib
vi smb.conf加入以下內容至guest ok = no
workgroup = unima
encrypt passwords = Yes
domain logons = Yes
wins support = Yes
preferred master = yes
local master = Yes
domain master = Yes
os level = 65
smb passwd file = /usr/local/samba/private/smbpasswd
security = user
netbios name = unis1
server string = unis1
client code page = 950
valid chars = 0xb9
logon path =
logon home =
hosts allow = 127.0.0.1 168.1.1.0/255.255.255.0 (IP可能不同,下如)
hosts deny = 0.0.0.0/0
[netlogon]
comment = netlogon
path = /home/netlogon
read only = yes
guest ok = no
[user]
user admin = administrator
path = /userfile/user
writeable = yes
create mask = 0700
force create mode = 0700
guest ok = no
[public]
user admin = administrator
path = /userfile/public
writeable = yes
create mask = 0755
force create mode = 0755
guest ok = no
[ora]
path=/userfile/ora
writeable = yes
create mask = 0757
directory mask = 0757
force create mode = 0757
guest ok = No
[uni_app]
path = /userfile/uni_app
writeable = yes
create mask = 0755
force create mode = 0755
guest ok = no
=========================================================================================
cd /home
mkdir netlogon
chmod 775 netlogon
cd /usr/local/samba/private
vi smbpasswd
內容空白,儲存退出;
cd /userfile
mkdir user
cd /etc/rc.d/rc3.d
ln -s /etc/rc.d/init.d/smb S96smb
cd /etc
vi sysctl.conf
在最下方加入
fs.file-max=32768
/sbin/shutdown -y -g0 -r
這只是samba安裝...
1. samba-2.2.8a.tar.gz傳至 /usr/src (版本可能不同,方法一樣)
cd /usr/src
gunzip samba-2.2.8a.tar.gz
tar xvf samba-2.2.8a.tar
/etc/rc.d/init.d/smb stop (把samba停止)
cd samba-2.2.8a/source
./configure --bindir=/usr/bin --sbindir=/usr/sbin
make
make install
cd /usr/local/samba/lib
vi smb.conf加入以下內容至guest ok = no
workgroup = unima
encrypt passwords = Yes
domain logons = Yes
wins support = Yes
preferred master = yes
local master = Yes
domain master = Yes
os level = 65
smb passwd file = /usr/local/samba/private/smbpasswd
security = user
netbios name = unis1
server string = unis1
client code page = 950
valid chars = 0xb9
logon path =
logon home =
hosts allow = 127.0.0.1 168.1.1.0/255.255.255.0 (IP可能不同,下如)
hosts deny = 0.0.0.0/0
[netlogon]
comment = netlogon
path = /home/netlogon
read only = yes
guest ok = no
[user]
user admin = administrator
path = /userfile/user
writeable = yes
create mask = 0700
force create mode = 0700
guest ok = no
[public]
user admin = administrator
path = /userfile/public
writeable = yes
create mask = 0755
force create mode = 0755
guest ok = no
[ora]
path=/userfile/ora
writeable = yes
create mask = 0757
directory mask = 0757
force create mode = 0757
guest ok = No
[uni_app]
path = /userfile/uni_app
writeable = yes
create mask = 0755
force create mode = 0755
guest ok = no
=========================================================================================
cd /home
mkdir netlogon
chmod 775 netlogon
cd /usr/local/samba/private
vi smbpasswd
內容空白,儲存退出;
cd /userfile
mkdir user
cd /etc/rc.d/rc3.d
ln -s /etc/rc.d/init.d/smb S96smb
cd /etc
vi sysctl.conf
在最下方加入
fs.file-max=32768
/sbin/shutdown -y -g0 -r
這只是samba安裝...
|
用samba实现
|
下载samba的rpm安装包.
安装:
rpm -ivh ***.rmp(安装包的名字)
到Xwindows界面, 打开你的浏览器, 在地址栏上输入:http://你的IP地址:10000
然后Enter
再然后用root登录进行配置.
安装:
rpm -ivh ***.rmp(安装包的名字)
到Xwindows界面, 打开你的浏览器, 在地址栏上输入:http://你的IP地址:10000
然后Enter
再然后用root登录进行配置.