Linux FTP YUM源搭建简单记录
1. 挂载iso镜像,进入Packages目录下安装FTP服务
#rpm -ivh vsftpd-3.0.2-10.el7.x86_64.rpm
2. 修改vsftpd配置文件如下
[root@rusky Packages]# cat /etc/vsftpd/vsftpd.conf | grep -v "#"
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ftpd_banner=Welcome to blah FTP service.
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=NO
listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
anon_root=/yum_repo/rhel7.2 #匿名用户默认目录为/var/ftp/pub,此外修改为/yum_repo/rhel7.2
local_root=/yum_repo
创建匿名用户目录:mkdir -p /yum_repo/rhel7.2
3. 拷贝操作系统iso镜像中的Packages,repodata,RPM-GPG-KEY-redhat-release到/yum_repo/rhel7.2目录下
#cp -rf Packages repodata RPM-GPG-KEY-redhat-release /yum_repo/rhel7.2
[root@rusky rhel7.2]# pwd
/yum_repo/rhel7.2
[root@rusky rhel7.2]# ls
Packages repodata RPM-GPG-KEY-redhat-release
4. 停止防火墙、修改selinux为disabled
# systemctl start firewalld
#chkconfig firewalld off
#vi /etc/selinux/config
SELINUX=disabled
5. 创建repo库
# createrepo -g /yum_repo/rhel7.2/repodata/81c149ffb2267c59a3e6405766b5ff3dc78e0637033e9f5aef564538359ff281-comps-Server.x86_64.xml /yum_repo/rhel7.2/Packages/
6. 创建local.repo文件
[root@rhel7Oracle yum.repos.d]# vi /etc/yum.repos.d/local.repo [RHEL7.2]
name=rhel7_repo
baseurl=ftp://192.168.1.202/Packages
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.1.202/RPM-GPG-KEY-redhat-release
7. 启动vsftpd服务
#systemctl start vsftpd
#chkconfig vsftpd on --开机启动
8. 测试
ftp匿名访问

yum命令测试
[root@rusky rhel7.2]# yum list gcc
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
gcc.x86_64 4.8.5-4.el7 @RHEL7.2
[root@rusky rhel7.2]# yum groups list
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Available Environment Groups:
Minimal Install
Infrastructure Server
File and Print Server
Basic Web Server
Virtualization Host
Server with GUI
Available Groups:
Compatibility Libraries
Console Internet Tools
Development Tools
Graphical Administration Tools
Legacy UNIX Compatibility
Scientific Support
Security Tools
Smart Card Support
System Administration Tools
System Management
Done
[root@rusky rhel7.2]#
Linux FTP YUM源搭建简单记录的更多相关文章
- 【Linux】YUM源搭建
YUM是什么? YUM是什么 基于rpm但更胜于rpm的软件管理工具: YUM有服务端和客户端: 如果服务端和客户端在同一台机器,这是本地YUM: 如果服务端和客户端不在同一台机器,这是网络YUM. ...
- Linux 本地yum源搭建和网络yum源搭建
一.本地yum源搭建 首先挂载上光盘 [root@www /]# mount /dev/cdrom /media/cdrom/ 系统默认已经安装了可使用yum的软件包,所以可以直接配置: [root@ ...
- linux服务搭建----ftp与ftp yum源搭建
ftp服务 如果没有ftp yum -y install vsftpd (前提是你在有yum源的情况下才可以使用这条命令) service vsftpd resta ...
- linux 光盘yum源搭建
1.挂载光盘 2.进入 /etc/yum.repos.d 目录,修改其它配置文件后缀名 mv CentOS-Base.repo CentOS-Base.repo.bakmv CentOS-CR.rep ...
- linux shell 自动判断操作系统release 然后连接FTP yum源的脚本
如何搭建本地yum源见附录① 如何搭建FTP yum源见附录② 脚本正文: #!/bin/sh# CenterOS config yumOSV=`rpm -q --qf %{version} cent ...
- Linux光盘yum源软件安装
关于Linux中的软件安装,有三种方法,个人认为比较方便的就是yum安装,有网的话比较简单,暂且不提.本文主要记录在没有外网的情况下,如何以本地光盘搭建yum源来实现yum安装. 主要包括以下几步: ...
- linux配置yum源
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...
- 基于VSFTP的本地YUM源及光盘YUM源搭建
基于VSFTP的本地YUM源及光盘YUM源搭建 一.yum环境的本地源搭建(基于VSFTP): 1)安装vsftp; *********************************** ...
- linux替换yum源及配置本地源
linux系统安装后自带的bash源由于在国外,安装软件包的时候会非常慢,最好替换一下yum源. 关于yum源的简单介绍 yum的主要功能是更方便地添加,删除和更新rpmba ...
随机推荐
- A Script Pro nginx URL重写规则无法播放MP4解决方法
I am using nginx and I have already add the line location /file/ { rewrite ^/-]+)/([-]+)/([^/]*)/([- ...
- Leetcode: Reverse Integer 正确的思路下-要考虑代码简化
题目: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Have ...
- 转:Java程序员最常用的8个Java日志框架
作为一名Java程序员,我们开发了很多Java应用程序,包括桌面应用.WEB应用以及移动应用.然而日志系统是一个成熟Java应用所必不可少的,在开发和调试阶段,日志可以帮助我们更好更快地定位bug:在 ...
- A Statistical View of Deep Learning (II): Auto-encoders and Free Energy
A Statistical View of Deep Learning (II): Auto-encoders and Free Energy With the success of discrimi ...
- 想做Android Wear开发?你得先搞明白这四件事
手环和手表的腕上穿戴之争,随着Apple Watch发布和Android Wear不断完善而告一段落.尽管续航上略有缺陷,但手表以其类似手机可扩展的生态环境赢得了众多巨头的支持. Google曾透露, ...
- 在浏览器控制台调试php程序
jsp中用system.out.print如果是在eclipse中调试的话,eclipse会自动拦截系统输出流, 然后输出在控制台中,而http输出流则不受影响,php好像无此功能, PHP是一种服务 ...
- ASP.NET服务器推送及前后台实时交互
一:项目需求 页面需要做一个上传Excel功能,并处理Excel中的数据到数据库中 这是一个较为漫长的过程 这时我需要在页面上显示处理进度的提示,给用户一个良好的体验 比如给用户提示“正在上传文档”, ...
- 「Poetize9」升降梯口
3056: 升降梯口 Time Limit: 2 Sec Memory Limit: 128 MBSubmit: 43 Solved: 42[Submit][Status] Description ...
- appendGrid
appendGrid appendGrid的使用
- 【模拟】Codeforces 711A Bus to Udayland
题目链接: http://codeforces.com/problemset/problem/711/A 题目大意: N个字符串,每个字符串5位,找到第一个出现两个OO的并改成++输出YES和改后字符 ...