ftp伺服器和http伺服器的簡單安裝測試

來源:互聯網
上載者:User

標籤:建立   實現   iptables   wal   http服務   src   img   rem   80連接埠   

    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試試!

 

ftp伺服器和http伺服器的簡單安裝測試

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.