Httpd 서버 구축

14806 단어
Httpd 서버 구축
yum는 가방 의존 문제를 자동으로 해결할 것이니 우리가 고려할 필요가 없다
[root@localhost ~]# yum -y install httpd
     :fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.shu.edu.cn
 * extras: mirrors.shu.edu.cn
 * updates: ftp.sjtu.edu.cn
        
-->       
--->     httpd.x86_64.0.2.4.6-67.el7.centos.6      
-->          httpd-tools = 2.4.6-67.el7.centos.6,      httpd-2.4.6-67.el7.centos.6.x86_64   
-->          /etc/mime.types,      httpd-2.4.6-67.el7.centos.6.x86_64   
-->          libaprutil-1.so.0()(64bit),      httpd-2.4.6-67.el7.centos.6.x86_64   
-->          libapr-1.so.0()(64bit),      httpd-2.4.6-67.el7.centos.6.x86_64   
-->       
--->     apr.x86_64.0.1.4.8-3.el7_4.1      
--->     apr-util.x86_64.0.1.5.2-6.el7      
--->     httpd-tools.x86_64.0.2.4.6-67.el7.centos.6      
--->     mailcap.noarch.0.2.1.41-2.el7      
-->         

      

===============================================================================================================================================================================================
 Package                                                                                                                                                                               
===============================================================================================================================================================================================
    :
 httpd                                        x86_64                                  2.4.6-67.el7.centos.6                                     updates                                  2.7 M
      :
 apr                                          x86_64                                  1.4.8-3.el7_4.1                                           updates                                  103 k
 apr-util                                     x86_64                                  1.5.2-6.el7                                               base                                      92 k
 httpd-tools                                  x86_64                                  2.4.6-67.el7.centos.6                                     updates                                   88 k
 mailcap                                      noarch                                  2.1.41-2.el7                                              base                                      31 k

    
===============================================================================================================================================================================================
    1     (+4      )

    :3.0 M
    :10 M
Downloading packages:
(1/5): apr-1.4.8-3.el7_4.1.x86_64.rpm                                                                                                                                   | 103 kB  00:00:00     
(2/5): httpd-tools-2.4.6-67.el7.centos.6.x86_64.rpm                                                                                                                     |  88 kB  00:00:00     
(3/5): apr-util-1.5.2-6.el7.x86_64.rpm                                                                                                                                  |  92 kB  00:00:01     
(4/5): httpd-2.4.6-67.el7.centos.6.x86_64.rpm                                                                                                                           | 2.7 MB  00:00:11     
mailcap-2.1.41-2.el7.noarch.rp FAILED                                            99% [====================================================================== ] 1.1 kB/s | 3.0 MB  00:00:22 ETA 
http://mirrors.cqu.edu.cn/CentOS/7.4.1708/os/x86_64/Packages/mailcap-2.1.41-2.el7.noarch.rpm: [Errno 12] Timeout on http://mirrors.cqu.edu.cn/CentOS/7.4.1708/os/x86_64/Packages/mailcap-2.1.41-2.el7.noarch.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
        。
(5/5): mailcap-2.1.41-2.el7.noarch.rpm                                                                                                                                  |  31 kB  00:00:00     
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                                                              86 kB/s | 3.0 MB  00:00:35     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
          : apr-1.4.8-3.el7_4.1.x86_64                                                                                                                                                 1/5 
          : apr-util-1.5.2-6.el7.x86_64                                                                                                                                                2/5 
          : httpd-tools-2.4.6-67.el7.centos.6.x86_64                                                                                                                                   3/5 
          : mailcap-2.1.41-2.el7.noarch                                                                                                                                                4/5 
          : httpd-2.4.6-67.el7.centos.6.x86_64                                                                                                                                         5/5 
           : mailcap-2.1.41-2.el7.noarch                                                                                                                                                1/5 
           : httpd-2.4.6-67.el7.centos.6.x86_64                                                                                                                                         2/5 
           : apr-util-1.5.2-6.el7.x86_64                                                                                                                                                3/5 
           : apr-1.4.8-3.el7_4.1.x86_64                                                                                                                                                 4/5 
           : httpd-tools-2.4.6-67.el7.centos.6.x86_64                                                                                                                                   5/5 

   :
  httpd.x86_64 0:2.4.6-67.el7.centos.6                                                                                                                                                         

       :
  apr.x86_64 0:1.4.8-3.el7_4.1               apr-util.x86_64 0:1.5.2-6.el7               httpd-tools.x86_64 0:2.4.6-67.el7.centos.6               mailcap.noarch 0:2.1.41-2.el7              

  !

Centos7 Firewall 닫기:
1、
systemctl stop firewalld.service #  firewall
systemctl disable firewalld.service #  firewall    
firewall-cmd --state #         (     notrunning,     running)

/var/www/html 디렉토리에서 다음 명령을 실행합니다.
    echo shabi > index.html

로컬 브라우저를 열면 주소 표시줄에 IP 주소를 입력하면 됩니다!http://192.168.248.132/

좋은 웹페이지 즐겨찾기