centos在不联网的情况下安装yum卸载sambaa,怎么装?不联网,yum命令没用,或者是

CentOS虚拟机不能联网状况下yum方式从本地安装软件包
大家都知道yum是linux下一个非常好用的软件安装/卸载软件,它方便操作,而且最厉害的是可以解决令人头疼的包依赖关系。但是若是你的linux不能联网,若想使用yum安装软件,可以依照下面的方法。
1、挂载CentOS安装光盘
mkdir /mnt/cdrom
mount -t iso9660 /dev/cdrom /mnt/cdrom
2、修改yum配置文件
cd /etc/yum.repos.d/
会看到三个文件,第一个CentOS-Base.repo是yum网络源的配置文件,第三个CentOS-Media.repo是本地源的配置。
修改CentOS-Media.repo
在baseurl中,修改第2个路径为/mnt/cdrom(即为光盘挂载点)
将enabled=0改为1
3、将yum网络源配置文件改名为CentOS-Base.repo.bak,否在会先在网络源中寻找适合的包,改名之后直接从本地源读取。
好了,现在你可以安装你要的包了,比如你要安装gcc,输入命令yum install gcc即可!
------分隔线----------------------------当前位置: >>
centos安装配置samba服务器
Installing and configuring samba on centos 6How to install and configure samba on centos 6 :Samba is free software mainly used for file sharing between other platforms ( Windows )
using SMB/CIFS protocol .Default centos 6 installation will not include samba packages , you need install manually .Here we can see how to install and configure samba using yum.Samba installation :After installing Centos 6 (Centos 6 installation step by step screenshots ) and configuring network (How to setup network in centos 6) Step 1 ?Update yum repositories and packages by typing the below command[root@localhost ~]# yum updateStep 2 ?Install samba packages along with dependencies using yum[root@localhost ~]# yum install sambaSamba configuration :Step 3 ?Create a share username and password .[root@localhost ~]# useradd shareuser -s /sbin/nologinNow create samba password for username shareuser using smbpasswd command .[root@localhost ~]# smbpasswd -a shareuser New SMB password:**** Retype new SMB password:**** Added user shareuser.Step 4 ? Create a folder called share in the root directory .[root@localhost ~]# mkdir /shareand change the ownership for the share folder[root@localhost ~]# chown -R shareuser:root /share/Step 5 ? open the file /etc/samba/smb.conf . ( Before editing the file , please copy the file to another location for backup ) . Add the below lines at the bottom of the file .[share] comment = Share path = /share writable = yes valid users = shareuserStep 6 ?start samba service[root@localhost ~]# service smb startand type this below command to start samba service automatically while booting.[root@localhost ~]# chkconfig --levels 235 smb onSamba testing : Step 7 ?You can check your configuration by using testparm command[root@localhost ~]# testparm Load smb config files from /etc/samba/smb.conf rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) Processing section &[homes]& Processing section &[printers]& Processing section &[share]& Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions [global] workgroup = MYGROUP server string = Samba Server Version %v log file = /var/log/samba/log.%m max log size = 50 cups options = raw [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No [share] comment = Share path = /share valid users = shareuser read only = NoYou can see your share sections. Here by default home folders of users will be displayed . you can comment the unwanted section using “;” symbol . For example . you can comment homes section as below and restart the service using “service smb restart”;[homes] ;comment = Home Dread only = Nbrowseable = NoNow you can access share folder on windows machine by typing \\samba-server-ip\ on run prompt . you can see your share folder after entering username and password. Cheers ..
centos安装配置samba服务器_计算机硬件及网络_IT/计算机_专业资料。centos安装配置samba服务器Installing and configuring samba on centos 6 How to install and config...一、简介 Samba 是一个能让 Linux 系统应用 Microsoft 网络通讯协议的软件,而 SMB 是 Server Message Block 的缩写,即为服务器消息块 ,SMB 主要是作为 Microsoft...Centos5.5下的samba服务器配置方法_工学_高等教育_教育专区。Windows与Windows...五.设计过程 5.1 安装 samba 服务器 yum install cups-libs samba samba-...centos6.3配置samba服务器_计算机硬件及网络_IT/计算机_专业资料。centos6.3配置samba...http://alsww./913 一、安装前准备 操作系统:...CentOS下搭建Samba服务器_计算机硬件及网络_IT/计算机_专业资料。CentOS下搭建Samba服务器与windows共享资料 CentOS 下安装 Samba 服务器 1、 2、 在线安装 Samba ...Centos 下安装新版 samba 服务器详细过程作者:陈秋飞 本文档是本人基于 centos 下搭建 samba 服务器做的笔记,新版的 samba 已经修改了一 些功能和配置, 因为有些...CentOS 6.3 下 Samba 服务器的安装与配置 一、简介 Samba 是一个能让 Linux 系统应用 Microsoft 网络通讯协议的软件,而 SMB 是 Server Message Block 的缩写,即...CentOS安装samba服务配置匿名访问_计算机软件及应用_IT/计算机_专业资料 暂无评价|0人阅读|0次下载|举报文档CentOS安装samba服务配置匿名访问_计算机软件及应用_IT/...详细讲解 CentOS Samba 服务器的配置 11:24 来源:未知 作者:admin 点击:次 刚刚学习完 CentOS Samba 服务器的安装方法之后,我们来继续学习 CentOS Samba 服务器...CentOS 下 Samba 服务器的配置 1.安装 运行 Samba 至少需要三个文件,分别为: samba-common-2.2.7a-7.9.0.i386.rpm samba-2.2.7a-7.9.0.i386.rpm ...
All rights reserved Powered by
copyright &copyright 。文档资料库内容来自网络,如有侵犯请联系客服。关于在centos6.3 下面学习安装samba老是不成功的_linux吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:155,595贴子:
关于在centos6.3 下面学习安装samba老是不成功的收藏
我按照书上说的,一步一步走的,但是还是用windos无法连上,我还是写出来,各位帮帮忙,看下,哪里错了
东方瑞通18年rhce培训经验,2007年获得授权,正式开展红帽Linux(RHCE)认证培训RHCA专家授课,全程实验辅导,真实模拟环境, 培训+考试+复习+指导.咨询:400-652-1998.
第一步,检查是否安装 rpm -q samba
得到软件包未安装,我下载得是dvd版本,那个很大,有好多软件包,我在里面找到了7个和samba有关的包,为了以防万一,我就都安装了,我当时没截图,明天把软件包的图贴上来,大家看看
木学过,曾经照着文档做一遍就成功了,然后就没看过。
然后,我又到smb.conf下面修改了配置文件,配置文件的图我明天在贴,我的网络环境是这样,我用虚拟机搭建了一个centos ,然后由于在学校机房,没有修改ip的权限,我就禁用了本地连接,把虚拟机的网络改成 虚拟网卡8net 虚拟网卡8的ip是192.168.10.2 centos是192.168.10.3可以ping通,我自己还用putty远程登陆了,但是在用windows运行\\192.168.10.3 他提示网络名不可用, 我关闭了SElinux也没用iptables不存在因为防火墙所以无法访问的情况 我自己整了好几天,都不明白,为什么就是\\192.168.10.3连不上
_17-50 -& _18-59
安装 samba :
rpm -ivh /mnt/cdrom/Packages/libsmbclient-3.5.4-68.el6.i686.
rpm -ivh /mnt/cdrom/Packages/samba-common-3.5.4-68.el6.i686.
rpm -ivh /mnt/cdrom/Packages/samba-winbind-3.5.4-68.el6.i686.
rpm -ivh /mnt/cdrom/Packages/samba-3.5.4-68.el6.i686.
设定 samba 服务所在的运行级别:
chkconfig --level 0123456
chkconfig --level 35
服务起停成功。
安装 samba 客户端:
rpm -Uvh /mnt/cdrom/Packages/samba-client-3.5.4-68.el6.i686.
安装 cifs 支持:
rpm -ivh /mnt/cdrom/Packages/keyutils-1.4-1.el6.i686.
rpm -ivh /mnt/cdrom/Packages/cifs-utils-4.4-5.el6.i686.
挂载他机 samba 资源成功。
_18-20 -& _18-29
设置 samba 服务器:
“/etc/samba/smb.conf”:
[global] 段:
workgroup = THE-FREE-WOLVES
security = share
——无需密码的简单共享
添加两处共享:
[READ_ONLY]
path = /ext/usr/share_ro
guest ok = yes
[READ_WRITE]
path = /ext/var/share_rw
guest ok = yes
read only = no
若干时间后自动生效,共享可以访问。--------------------------------------------------------------------------------_18-30 -& _18-39
调整防火墙,开放 samba 服务:
system-config-firewall-
Samba 客户端
——实际修改了“/etc/sysconfig/iptables”文件,添加了以下行:
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
——这些行手工添加也一样生效,
但“system-config-firewall-tui”不会自动同步到显示界面中。
——实际上重新启动了防火墙
他机已可访问本机共享信息。
注意:从他机访问共享默认身份为“nobody.nobody”,
不能对本机非“nobody.nobody”所有的资源进行写操作。
调整“/etc/fstab”:
所有 vfat 分区行第五列添加“,iocharset=utf8”,以利于中文文件读写;
“/dev/sda4”行第五列添加“,uid=nobody,gid=nobody”,以利于共享。--------------------------------------------------------------------------------_18-40 -& _18-45
设置 samba 服务器:
“/etc/samba/smb.conf”:
添加一处共享:
path = /mnt/sda4
guest ok = yes
read only = no
即时自动生效,共享可以访问。
我想问大家几个问题,是不是配置文件中除了global和home段,其他的都可以注释掉,我在没配置服务器之前,想吧关于注释性描述都去掉,方便我阅读,但是用grep -V &^#& /etc/samba/smb.conf执行以后就剩下几个英文句子了,这是不是说明samba默认所有的都是注释,那到底哪些需要注释,行首没有:或者#,就算是有效行吗?
我觉得在有yum的年代,下一堆rpm包,或者tar包去装的都是..你懂的。
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或CentOS 6.5安装samba
来源:博客园
1. 安装软件

yum install samba samba-client samba-swat

2. 修改samba配置文件

vi /etc/samba/smb.conf


修改

workgroup = hitachigst.global
netbios name = hitachigst.global

[all]
comment = Public Stuff
path = /home/lbl/all
available = yes
browseable = yes
public = yes
writable = yes
printable = no
write list = lbl
guest ok = no

3. 添加samba用户

touch /etc/samba/smbpasswd
smbpasswd -a lbl


4. 修改共享目录的访问权限

chmod 777 -R /home/lbl/all
chcon -R -t samba_share_t /home/lbl/all
#编辑/etc/rc.local,末尾加入
/usr/bin/chcon -t samba_share_t /home/lbl/all

5. 修改iptables开放samba端口

vi /etc/sysconfig/iptables


在“ACCEPT”下一行加入

-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A INPUT -p udp -m udp --dport 137 -j ACCEPT
-A INPUT -p udp -m udp --dport 138 -j ACCEPT


重启服务

/etc/rc.d/init.d/iptables restart


6. 重启samba服务

/etc/init.d/smb restart
/etc/init.d/nmb restart


  
免责声明:本站部分内容、图片、文字、视频等来自于互联网,仅供大家学习与交流。相关内容如涉嫌侵犯您的知识产权或其他合法权益,请向本站发送有效通知,我们会及时处理。反馈邮箱&&&&。
学生服务号
在线咨询,奖学金返现,名师点评,等你来互动无网络情况下 如何安装GCC_Linux教程_Linux公社-Linux系统门户网站
你好,游客
无网络情况下 如何安装GCC
来源:Linux社区&
作者:jinrall
在有网络的情况下安装gcc只需一条指令:yum install gcc& 那么在没有网络的情况下该如何安装gcc呢?虽然没有网络,但是我想你应该有安装光盘或者ISO镜像了,如果这些也没有的话,那就再见。
假设你有这些吧,我们只需利用安装光盘或ISO镜像来挂载一个本地yum源,利用这个来安装gcc。
一:挂载yum源,我这里用的是ISO镜像& &
在终端输入指令:mount -o loop xxxx.iso& /media//
说明:xxxx.iso&
是你的镜像文件名(注意路径正确)
/media/Centos/& 这个是挂载后文件地址,Centos是自己建的,你也可以自己选着路径;
二:修改/etc/yum.repos.d/CentOS-Media.repo
1.首先进入文件:& vi& /etc/yum.repos.d/CentOS-Media.repo
2.修改文件如下:
[c6-media]
name=CentOS-$releasever - Media& & & & & & & & & & & & & &
baseurl=file:///media/Centos& & & & & & & & & & & & & & & & & & & & &
#还记得你刚刚挂载镜像的地址不,没错,就是它
gpgcheck=1
gpgkey=file:///etc/media/Centos/RPM-GPG-KEY-CentOS-6& & & & & &
#还是要注意路径
3. 退出保存。
4.输入指令:gcc -v& 看看有没有反应。
12.04嵌入式交叉编译环境arm-linux-GCC搭建过程图解&
Ubuntu 12.10安装交叉编译器arm-none-linux-gnueabi-GCC&
Ubuntu下Vim+GCC+GDB安装及使用&
Ubuntu下两个GCC版本切换&
GCC 的详细介绍:GCC 的下载地址:
本文永久更新链接地址:
相关资讯 & & &
& (06月05日)
& (05月06日)
& (06月14日)
& (05月23日)
& (04月28日)
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款

我要回帖

更多关于 yum y install samba 的文章

 

随机推荐