Linux samba搭建
来源:互联网 发布:舜德数据怎么样 编辑:程序博客网 时间:2024/06/05 15:44
1.环境:windows与linux能够互ping,关闭windows和Linux防火墙,关闭安全linux
防火墙设置命令
1) 重启后生效
开启: chkconfig iptables on
关闭: chkconfig iptables off
2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop
临时关闭安全selinux命令
setenforce 0
setenforce 1
永久关闭安全selinux
彻底禁用selinux:
使用root用户,vim /etc/sysconfig/selinux,将SELINUX=enforcing修改成SELINUX=disabled。
2.检查是否有samba环境
rpm -qa samba
rpm -q sam*
若有则可直接搭建,若没有则需要安装samba
3.安装samba(虚拟机演示)
卸载samba 命令 rpm -e samba 若卸载时出错表示samba被其他文件使用,则可使用 rpm -e --nodeps samba 不到万不得已不要使用--nodeps 可能破坏系统文件
1)将安装文件下挂载到linux上
虚拟机添加镜像文件iso到cdrom上 使用mount命令挂载 # mount /dev/cdrom /mnt
2)将samba安装文件复制到/home下,准备安装
cp /mnt/cdrom/samba* /home
3)安装samba(.rpm文件安装)
rpm -ivh 安装文件名称
4)检查是否安装成功 rpm -qa samba
安装samba(.tar.gz文件安装)
[root@heliy /home/fukeyun/Desktop/download/temp]#ls ../samba-3.6.0.tar.gz
../samba-3.6.0.tar.gz
解压缩
tar -xvzf samba-3.6.0.tar.gz
[root@heliy /home/fukeyun/Desktop/download/temp]#ls
samba-3.6.0
2 、安装
#cd ./samba-3.6.0
[root@heliy /home/fukeyun/Desktop/download/temp/samba-3.6.0]#find . -name 'configure'
./lib/tdb/configure
./lib/replace/configure
./lib/talloc/configure
./lib/tevent/configure
./source4/lib/ldb/configure
./source3/configure
[root@heliy /home/fukeyun/Desktop/download/temp/samba-3.6.0]#cd ./source3
[root@heliy /home/fukeyun/Desktop/download/temp/samba-3.6.0/source3]#./autogen.sh
[root@heliy /home/fukeyun/Desktop/download/temp/samba-3.6.0/source3]#./autogen.sh
./autogen.sh: running script/mkversion.sh
./script/mkversion.sh: 'include/version.h' created for Samba("3.6.0")
./autogen.sh: running autoheader -Im4 -I../m4 -I../lib/replace
./autogen.sh: running autoconf -Im4 -I../m4 -I../lib/replace
Now run ./configure (or ./configure.developer) and then make.
安装完后提示你./configure
#./configure ##默认安装到/usr/local/samba ,如果想安装到其他path,加--prefix=/path.. 或--help查看详细信息
#make
#make install
需要几分钟时间。
配置
4.提供一个用户,作为外部访问的账号
1)创建用户xiaoxin
useradd xiaoxin
2)设置密码
passwd xiaoxin
2)给xiaoxin设置samba密码
把linux下的用户设置samba用户
cat /etc/passwd |mksambapasswd >/etc/samba/smbpasswd
设置samba密码
smbpasswd xiaoxin 若设置报错 则使用 smbpasswd -a xiaoxin
5.service smb start 启动smb 服务
设置完成
- Linux Samba服务器搭建
- linux搭建samba服务器
- linux samba搭建
- linux搭建samba服务器
- linux-samba服务搭建
- Linux samba搭建
- Linux samba服务器搭建
- Linux-samba搭建
- Linux Samba服务搭建
- LINUX上SAMBA服务器搭建
- Linux下搭建Samba服务器
- linux之samba服务器搭建
- [Linux]Samba服务器的搭建
- Linux下Samba服务器搭建
- Linux SAMBA 共享服务器搭建
- linux下Samba服务器搭建
- Samba服务器搭建(Linux)
- SUSE linux下搭建samba共享服务器
- 题
- 时间复杂度计算
- Android AP 热点 使用经验
- CAS4.0 4.1 服务器端搭建(二)
- 北邮校园网自服务IP地址
- Linux samba搭建
- SugarORM的操作
- SVN服务器客户端输入输出乱码的bug(解决方案)
- 以最快的方式生成大量的测试数据
- 键盘虚拟码
- Android TextView 横竖排切换(字方向不变)
- ios获取设备信息总结
- delegate解决绑定click事件和省份地址连级
- 排序之冒泡排序