步骤 | FTP服务 | SAMBA服务 | Web服务 |
---|---|---|---|
(1) 查询 | rpm -qa | grep ftpd | rpm -qa | grep samba | rpm -qa | grep httpd |
(2) 修改yum源/挂载及安装 | cd /etc/yum.repos.d/ vi rhel7.repo name=rhel7.0 baseurl=file:///mnt enabled=1 gpgcheck=0 mount /dev/sr0 /mnt cd /mnt/Packages/ yum install vsftpd-3.0.2-22.el7.x86_64.rpm | vi /etc/yum.repos.d/rhel7.repo name=rhel7.0 baseurl=file:///mnt enabled=1 gpgcheck=0 mount /dev/sr0 /mnt cd /mnt/Packages/ yum install samba* | vi /etc/yum.repos.d/rhel7.repo name=rhel7.0 baseurl=file:///mnt enabled=1 gpgcheck=0 mount /dev/sr0 /mnt cd /mnt/Packages/ yum install httpd-2.4* |
(3) 配置 | cd /var/ftp/pub touch file1 file2 | mkdir /test cd /test touch file1 file2 chmod -R 777 /test chcon -t samba_share_t /test vi /etc/samba/smb.conf [test] comment=this is a test path=/test writable=yes browseable=yes guest ok=yes | cd /var/www/html vi index.html <html><br><head><title>myweb</title></head><br><body>hello zhangkui<br>hello ksu!<br>hello jkxy</body><br></html> |
(4) 启动 | systemctl restart vsftpd.service systemctl stop firewalld.service | setenforce 0 systemctl restart smb.service systemctl restart nmb.service systemctl stop firewalld.service | systemctl restart httpd.service systemctl stop firewalld.service setenforce 0 |
(5) 测试 | Windows文件管理器访问: ftp://192.168.10.3/pub/ 看到file1/file2 | Windows文件管理器访问: \192.168.10.3\test 看到file1/file2 | 浏览器访问: http://192.168.10.3 显示自定义网页 |
FTP SAMBA Web
于 2025-06-29 00:37:47 首次发布