在本文中,您将会了解到关于centos虚拟机设置共享文件夹并通过我的电脑访问的新资讯,同时我们还将为您解释虚拟机centos共享文件夹在哪的相关在本文中,我们将带你探索centos虚拟机设置共享文件夹
在本文中,您将会了解到关于centos虚拟机设置共享文件夹并通过我的电脑访问的新资讯,同时我们还将为您解释虚拟机centos共享文件夹在哪的相关在本文中,我们将带你探索centos虚拟机设置共享文件夹并通过我的电脑访问的奥秘,分析虚拟机centos共享文件夹在哪的特点,并给出一些关于centos 系统访问 windows 共享文件夹、centos 虚拟机 /mnt/hgfs 下看不到共享文件夹的解决方法.、CentOS6.5 虚拟机设置IP、centos6.6虚拟机设置的实用技巧。
本文目录一览:- centos虚拟机设置共享文件夹并通过我的电脑访问(虚拟机centos共享文件夹在哪)
- centos 系统访问 windows 共享文件夹
- centos 虚拟机 /mnt/hgfs 下看不到共享文件夹的解决方法.
- CentOS6.5 虚拟机设置IP
- centos6.6虚拟机设置
centos虚拟机设置共享文件夹并通过我的电脑访问(虚拟机centos共享文件夹在哪)
1、使用的软件叫samba,yum install samba即可
2、修改配置文件如下
setsebool -P samba_domain_controller on setsebool -P samba_enable_home_dirs on setsebool -P samba_export_all_rw on [global] workgroup = UPOA server string = Samba Server Version %v create mask = 0777 directory mask = 0777 # log files split per-machine: log file = /var/log/samba/log.%m # maximum size of 50KB per log file,then rotate: max log size = 50 security = user # the following login script name is determined by the machine name # (%m): # the following login script name is determined by the UNIX user used: # use an empty path to disable profile support: # varIoUs scripts can be used on a domain controller or a stand-alone # machine to add or delete corresponding UNIX accounts: load printers = yes cups options = raw # obtain a list of printers automatically on UNIX System V systems: [homes] comment = Home Directories browseable = no writable = yes [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = no writable = no printable = yes [public] comment = public file path = /home/xx valid users = root writable = yes browseable = yes ~注意:"#"和" ; "开头的配置文件都是注释,不同之处在于“ ; ”可要可不要,#是完全可以不要。
3、修改强制访问控制(SELinux 全称 Security Enhanced Linux (安全强化 Linux),是 MAC (Mandatory Access Control,强制访问控制系统)的一个实现,目的在于明确的指明某个进程可以访问哪些资源(文件、网络端口等)。)
setsebool -Psamba_enable_home_dirs on
setsebool -Psamba_export_all_rw on
完事儿之后再:getsebool -a | grep samba一把
4、重启smb服务service smb restart
5、在windows我的电脑里输入ip即可访问
参考链接:
http://bbs.51cto.com/thread-703270-1.html http://blog.chinaunix.net/uid-23069658-id-3142052.html http://blog.csdn.net/testcs_dn/article/details/19758163
centos 系统访问 windows 共享文件夹

一、开启 windows 文件夹共享和权限配置(以 win7 为例)
文件夹:E:\centos-share
权限操作:centos-share 文件夹上右键 - 属性,打开共享 tab 栏,点击 “共享”,选择用户 “Everyone”。
二、centos 中配置
创建映射文件夹:mkdir /mnt/centos-share
挂载 windows 共享文件夹到 centos 指定目录:mount -t cifs -o user=''Administrator'',password=''123456'' //192.168.2.188/centos-share/var/www/html/
注:如果直接挂载后不能展示 windows 共享目录文件,解决方案:先卸掉挂载(umount /var/www/html/),把它挂载到 /mnt/test 下(test 是随意新建的目录),然后在先卸掉挂载,再重新挂载我们要的目录,即 /var/www/html/,此时就可以查看到 windows 目录的文件了
验证:windows 下目录 centos-share 中新建 txt 文档,并编辑、保存、退出,然后 centos 中查看 /mnt/centos 目录下是否有这个文件,若有,则说明配置成功,vim *.txt 这个 txt 文档,编辑保存退出后,在 windows 下查看是否更新,若有更新说明 centos 下权限已够,否则需要执行上述的赋权限操作。
说明:
user=''Administrator'' ----windows 系统用户名
password=''123456'' ----windows 系统密码
//192.168.2.188/centos-share -----windows 系统共享文件夹
192.168.2.188 ----windows 系统 ip 地址
/var/www/html/centos-share->CentOS 系统挂载地方
centos 虚拟机 /mnt/hgfs 下看不到共享文件夹的解决方法.
只需重新 vmware-config-tools.pl 一下.
CentOS6.5 虚拟机设置IP
#设置固定IP, DNS、网关、保证虚拟机可以上网
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:B9:5A:7F
TYPE=Ethernet
UUID=203415d3-2f9b-48ff-80f7-30a902e52474
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
NETMASK=255.255.255.0
DNS1=114.114.114.114
IPADDR=192.168.1.35
USERTL=no
GATEWAY=192.168.1.1
~
#虚拟机设置WIFi模式
#关闭
[root@localhost ~]# /etc/init.d/NetworkManager stop
停止 NetworkManager 守护进程: [确定]
[root@localhost ~]#
## NM_CONTROLLED 实际上是network mamager的参数,而且实时生效。也就是说你改完它保存,不需要重启,它立刻生效
NM_CONTROLLED=yes
#关闭它吧,不然会冲突
[root@localhost ~]# chkconfig NetworkManager off
[root@localhost ~]# chkconfig --list | grep Net
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off
centos6.6虚拟机设置
1、vi /boot/grub/grub.conf
2、chkconfig ip6tables off
3、vi /etc/selinux/config
4、vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=c2528ed8-261d-4bad-9d80-ff4cfc53c089
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
#ifconfig -a HWADDR需要对应起来不然不能上网
HWADDR=08:00:27:23:1B:AA
IPADDR=192.168.1.110
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
PREFIX=24
GATEWAY=192.168.1.1
DEFROUTE=yes
ARPCHECK=no
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
5、vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
6、
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
上传 http://mirrors.163.com/.help/CentOS6-Base-163.repo /etc/yum.repos.d/
7
uname -r
2.6.32-504.el6.x86_64
yum clean all
yum makecache
yum update -y
8、 yum install wget gcc gcc-c++ make
9、
#关闭防火墙
service iptables stop
vi /etc/sysconfig/iptables
#添加
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
#重启防火墙
service iptables restart
今天关于centos虚拟机设置共享文件夹并通过我的电脑访问和虚拟机centos共享文件夹在哪的分享就到这里,希望大家有所收获,若想了解更多关于centos 系统访问 windows 共享文件夹、centos 虚拟机 /mnt/hgfs 下看不到共享文件夹的解决方法.、CentOS6.5 虚拟机设置IP、centos6.6虚拟机设置等相关知识,可以在本站进行查询。
本文标签: