AmazingCounters.com

ftp服务器和http服务器的简单安装测试

0.【 安装前的准备工作:】

1)chkconfig iptables off或service iptables stop 禁防火墙(centos6)

      systemctl  disable firewalld.service 或systemctl  stop firewalld.services(centos7)

2)关闭selinux

    vim /etc/selinux/config  中selinux=permisssive

    setenforce   0                          

 

    getenforce 验证是否有效

3)去掉所有与http有关的包:yum remove httpd

     去掉所有ftp有关的包:yum remove vsftpd

    可用  rpm -qa filename 查询确保服务器没装包

1 【实现多系统yum服务器(vsftpd版)】

服务器端配置:

1) rpm -ivh /misc/cd/Packages/vsftpd-2.2.2-24.el6.x86_64装vsftpd服务器

2)rpm -qa vsftpd确认是否安装,如安装,用service vsftpd start开启服务(centos6)systemctl  start vsftpd(centos7)

3)ss -ntl 查看21端口是否打开,vsftpd默认21端口

4)创建yum仓库目录madir -p /var/ftp/pub/centos/{6,7}

复制到ftp服务器

到此,服务器端配置完成!

客户端配置:

1)vim /etc/yum.repo.d/base.repo

     修改为[base]

      name=centos 

      baseurl=ftp://192.168.75.196/pub/centos/$releasever/

      gpgcheck=0

      enable=1 (同时将其他URL改为0禁用)

  

   至此ftp服务器测试配置成功!

2 .【yum仓库httpd配置】

 服务器端配置:

1)rpm -ivh /misc/cd/Packages/httpd-2.2.15-59.el6.centos.x86_64.rpm 

有依赖性则用yum安装yum -y install httpd

2)启动httpd服务service httpd start(centos6),用ss -ntl检验是否打开80端口;systemctl start httpd(centos7)

3)创建httpd工作目录mkdir -p /var/www/html/app

  复制rpm包到app目录里

 

4)创建元数据repodate包,createrepo /var/www/html/app

 

到此,服务器端配置完成

客户端配置:

 1)vim /etc/yum.repo.d/base.repo

     修改为[app]

               name=app 

               baseurl=ftp://192.168.75.196/app

               gpgcheck=0

               enable=1 (同时将其他URL改为0禁用)

2)vim  /var/www/html/index.html编辑网页内容

 

到此httpd服务器测试成功!可以试试用配置好的yum源装一些rpm包,如tree,screen试试

 

posted @ 2017-08-05 22:37  黑夜繁星  阅读(1861)  评论(0编辑  收藏  举报
AmazingCounters.com