ºìÁªLinuxÃÅ»§
Linux°ïÖú

centos6 httpdµÄÎÊÌâ

·¢²¼Ê±¼ä:2011-12-16 11:54:10À´Ô´:ºìÁª×÷Õß:fengyun510
centos6°²×°µÄʱºòÑ¡ÔñÁË×îС»¯minualÀ´°²×°£¬½øÈëÎÄ×ÖÃüÁîģʽºóÅäÖÃÍøÂçÏà¹Ø£¬ÅäÖóɹ¦ºó£¬¿ÉÒÔ´ÓÍøÂçÉÏwget×ÊÔ´£¬Ò²¿ÉÒÔpingͨ¾ÖÍøÆäËû»úÆ÷¡£ÍøÂçÒ»ÇÐÕý³££¬ÓÃyum -y install httpd °²×°apacheºó£¬½øÈëÁËÅäÖÃÎļþ/etc/httpd/conf/httpd.conf ²é¿´£¬È»ºó°Ñ/var/www/htmlϵÄindex.html²é¿´ÁËÏ¡£¿´ÁËËƺõÒ»ÇÐÕý³£¡£È»ºóÅ·Żðǽ×èµ²£¬Ö´ÐÐservice iptables stop¡£ÔÚÆäËû»úÆ÷ÉϲâÊÔhttp://192.168.1.11£¬IEÌáʾÕÒ²»µ½·þÎñÆ÷´íÎó¡£ÎÞ·¨½¨Á¢µ½http://192.168.1.11µÄÁ¬½Ó¡£ÌØÇë½Ì¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 4 ÌõÆÀÂÛ

  1. ÓÚ 2013-05-06 09:13:50·¢±í:

    # service iptables stop
    # setenforce 0

  2. ×ÏÉ«ÆÏÌÑ ÓÚ 2011-12-17 01:56:24·¢±í:

    iptables -nL È·ÈÏ·À»ðǽÒѾ­¿ª·Å80¶Ë¿Ú

    service httpd restart È·ÈÏ·þÎñÕý³£ÖØÆô£¬ÎÞ±¨´í

    ´Ó¿Í»§»úping web ·þÎñÆ÷£¬ÊÇ·ñping ͨ

    È·ÈÏindex ÖÐÓÐÏàÓ¦ÄÚÈÝ¡£

    ´Ó¿Í»§¶Ë·ÃÎÊweb ·þÎñÆ÷

    ¼ì²é/etc/hosts.deny ÖÐÊÇ·ñ°üº¬Óпͻ§»úµÄºÚÃûµ¥

    Ôٴμì²éhttpd.conf Îļþ£¬ÊÇ·ñÓÐÕýÈ·µÄÅäÖÃÎļþ

    Ôٴμì²éÍøÂç

    ÒÔÉÏÈô¸É²½Ö裬½ö¹©²Î¿¼¡£

  3. alick ÓÚ 2011-12-16 17:20:23·¢±í:

    ÏÈÊÔÊÔ±¾»úÉÏÊÇ·ñok£º[code]wget http://localhost//index.html[/code]ÔÚÆäËû»úÆ÷ÉÏ ping http·þÎñÆ÷Õý³£·ñ£¿

    ¿ÉÒÔ¿¼ÂÇ°ÑSELinuxÔÝʱ¹Ø±Õ£º[code]setenforce 0[/code]

  4. fengyun510 ÓÚ 2011-12-16 14:57:00·¢±í:

    ²¹³äһϣºHTTPÆô¶¯Õý³£¡£ÎÒÊäÈëÃüÁîÐУºservice httpd restart £º
    httpd ..Ó¢ÎÄÊ¡ÂÔ .... [OK]
    httpd ..Ó¢ÎÄÊ¡ÂÔ .... [OK]
    [root@192.~]#
    ³öÏÖÕâÑùÌáʾ£¬Ò²¾ÍÊÇÍ£Ö¹ºÍ¿ªÊ¼¶¼ÊÇOKµÄ¡£¶øÇÒÉÏÍøÏÂ×ÊÔ´ºÍping¾ÖÍøÆäËû»úÆ÷¶¼ÊÇOKµÄ¡£Á¬IPTABLESÎÒ¶¼¹Ø±ÕÁË£¬¾ÍÊDz»Ã÷°×ΪʲôHTTPÔÚÍⲿÎÞ·¨·ÃÎÊ¡£ÔÎÁË¡£