在centos上安装http服务器

来源:互联网 发布:caffe 利用fcn8s 分割 编辑:程序博客网 时间:2024/05/16 18:35

 一、安装方法
    yum install httpd
二、启动http服务器 
    service httpd start 
三、文件放在http服务器的目录。 
    /var/www/html/
可以在html目录下建一个目录,比如test。
例子:
[root@localhost html]# pwd
/var/www/html
[root@localhost html]# ls
test
[root@localhost html]# cd test
[root@localhost test]# ls
2.txt  a.out  test.c  xpsp2.rar
[root@localhost test]# 

四、访问方式:
1、直接使用浏览器去访问,如例子,http://10.8.1.86/test/ 就可以了。  
2、可以采用脚本的方式去访问,通常用来下载文件或者做网络稳定性测试或功能测试。 
0 0
原创粉丝点击