yum 网络库服务器基础搭建
来源:互联网 发布:linux 查看ssh 编辑:程序博客网 时间:2024/06/07 02:59
yum配置使用
网络yum库服务搭建
- 环境:把centos 7当做服务器端,centos6当做客户端
首先用镜像搭建一个本地yum
- 配置/etc/yum.repo.d/bash.repo 配置文件
[root@centos7 yum.repos.d]# lsbak base.repo
- 如果没有此文件可以创建一个后缀只要是.repo的就行
- 我们现在编辑base.repo文件
[base] 库idname=base 库名字baseurl=file:///run/media/root/CentOS\ 7\ x86_64/ rpm包路径,必须是repodata.文件的父目录路径gpgcheck=0 包检查enabled = 1 是否启用
- 现在我们安装vsftpd服务
[root@centos7 yum.repos.d]# yum install vsftpd
- ftp共享的文件路径是/var/ftp/pub ,我们进去创建centos/6/os/x86_64/
[root@centos7 pub]# mkdir -p centos/6/os/x86_64/[root@centos7 pub]# lltotal 0drwxr-xr-x. 3 root root 15 Nov 30 19:27 centos
- 上面创建的目录是共享目录,现在我们把所需要的rpm包复制到这个目录里由于我是用虚拟机做的所以就把6的光盘挂载到这个目录里
[root@centos7 pub]# mount /dev/sr0 centos/6/os/x86_64/mount: /dev/sr0 is write-protected, mounting read-only[root@centos7 pub]#
- 现在我们启动ftp服务
systemctl start vsftpd 开启服务systemctl enable vsftpd 开机启动vsftpd服务centos7关防火墙systemctl stop firewalld 关闭防火墙systemctl disable firwalld 设置开启启动中centos6 关防火墙chkconfig iptables offservice iptables top检查是不是清空了:iptables -nVL ---------------------------------[root@centos7 ~]# systemctl stop firewalld[root@centos7 ~]# systemctl disable firewalldRemoved symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.----------------------------------------我们在把selinux 文件修改一下路径 /etc/selinux/config[root@centos7 ~]# sed -i.bak 's@SELINUX=enforcing@SELINUX=permissive@' /etc/selinux/config [root@centos7 ~]# setenforce 0 这样我们可以在浏览器上访问我们centos7的地址用ftp方式ftp://172.168.1.1 就可以看见光盘里的内容。
Centos 6客户端配置
- 我们只需要配置yum仓库
[root@centos6 ~]# vim /etc/yum.repos.d/baes.repo[base]name=guobaseurl=ftp://192.168.27.129/pub/centos/$releasever/os/$basearch/gpgcheck=0
- 上面的变量代表含义
- $releasever :当前OS版本的发行主版本号
- $basearch : 基础平架构x86_64
- 现在我们用 yum repolist 查一下能看到仓库名不
[root@centos6 ~]# yum repolistLoaded plugins: fastestmirror, refresh-packagekit, securityDetermining fastest mirrorsbase | 4.0 kB 00:00 base/primary_db | 4.7 MB 00:00 repo id repo name statusbase guo 6,706repolist: 6,706
- 现在我们用yum装一个软件
[root@centos6 ~]# yum repolist这样就成功了。
关于yum排错失误
- 首先检查电脑之间是否能够互联
- 然后检查yum 配置是否正确 (可以用 yum clean all清除一下缓存)
- 看看防火墙和SELinux等配置是否关闭。
阅读全文
0 0
- yum 网络库服务器基础搭建
- 搭建多系统网络yum服务器
- Linux 搭建 YUM 服务器
- redhat yum服务器搭建
- Linux 搭建 YUM 服务器
- Linux 搭建 YUM 服务器
- 搭建yum源服务器
- Linux 搭建 YUM 服务器
- 离线yum源挂载及yum服务器搭建
- 搭建CentOS yum 源服务器
- CentOS搭建局域网yum服务器
- 搭建内网yum服务器
- CentOS搭建局域网yum服务器
- YUM搭建SVN+Apache服务器
- 基于httpd搭建yum服务器
- Linux下搭建yum服务器
- 局域网中搭建yum服务器
- CentOS 7搭建yum服务器
- Android里面常用的Drawable的使用
- Linux进程地址空间管理
- HDU 5982Relic Discovery
- python中的os.listdir()方法
- java创建线程的方式
- yum 网络库服务器基础搭建
- 计算机网络最后一次作业
- 第14周项目3- B-树的基本操作
- OpenCV学习1 Mat图像的常见读写方式
- matlab---之params.variable
- HDOJ 2562 奇偶位互换(水)
- 1.40 yum安装软件的时候,记不全包名,如何查找到完整的包名
- android平台使用Opengl实现点、线、三角形的绘制
- pokemon go 和 虚拟gps