2019独角兽企业重金招聘Python工程师标准>>>
SLES修改本地FTP安装源
一、配置本机FTP............................................................................................................. 1
1.1、安装................................................................................................................. 1
1.2、建立普通用户(test)..................................................................................... 1
1.3、配置................................................................................................................. 1
1.4、创建/etc/vsftpd.chroot_list 目录................................................................ 2
1.5重启ftp服务...................................................................................................... 2
1.6、ftp开机自启.................................................................................................... 2
1.7、开启root用户FTP权限.................................................................................... 2
二、ftp服务端配置......................................................................................................... 3
2.1、上传操作系统镜像以及所需软件包.................................................................... 3
2.2、登陆ftp://192.168.1.188验证:.................................................................... 3
三、ftp客户机配置......................................................................................................... 3
四、验证:...................................................................................................................... 7
五、 添加额外rpm包....................................................................................................... 8
在安装系统的过程中,选择安装vsftpd。
#useradd –m ftpuser //(创建ftpuser用户同时,在home下创建ftpuser目录)
#passwd ftpuser //修改ftpuser用户密码
# vim /etc/vsftpd.conf
在默认配置上打开以下行(去掉注释#号)
write_enable=YES
local_enable=YES
local_umask=022
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
anonymous_enable=YES //是否允许匿名访问
anon_world_readable_only=YES
anon_upload_enable=YES
anon_umask=022
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
#vim /etc/vsftpd.conf 添加
anon_root=/opt/file //表示匿名用户登录到ftp时的默认目录
local_root=/opt/file //表示使用本地用户登录到ftp时的默认目录
1.4、创建/etc/vsftpd.chroot_list 目录
# touch /etc/vsftpd.chroot_list
# rcv、sftpd restart
# chkconfig vsftpd on
# vim /etc/ftpuser 找到root前加上#号注释掉
#root
# cd /opt/
上传SLES-11-SP3-DVD-x86_64-GM-DVD1.iso
# mkdir /mnt/cdrom
# mount -o loop /opt/SLES-11-SP3-DVD-x86_64-GM-DVD1.iso /mnt/cdrom
#cp -R /mnt/cdrom/* /opt/file/
#zypper install sysstat
# cd /opt/file/suse/x86_64/
上传所需RPM包至当前目录
# rcvsftpd restart