网站推广.NET

网站推广.NET

linux搭建web服务器流程是什么

来源:互联网

  服务器是一个网站正常运行必不可少的硬性条件,然而服务器环境又windows与linux的,windows还好搭建,那liunx搭建web服务器是怎么样的呢?linux搭建web服务器流程是什么?一起来看下吧!

  1.安装Apache

  (1)在安装HTtpserver以前需安装APR(ApachePortableRuntime)和APR-util安装APR(http://apr.apache.org/)

  $tarzxvfapr-1.4.6.tar.gz

  $cdapr-1.4.6/

  $./configure

  $make

  $sudomakeinstall

  (2)安装APR-util(http://apr.apache.org/)

  $tarzxvfapr-util-1.4.1.tar.gz

  $cdapr-util-1.4.1

  $./configure–with-apr=/usr/local/apr(whereisapr)

  $make

  $sudomakeinstall

  (3)安装httpd-2.4.2.tar.bz2(http://httpd.apache.org/)默认安装部位/usr/local/apache2网页页面放到/usr/local/apache2/htdocs配置文件/usr/local/apache2/conf/httpd.conf

  $tarjxvfhttpd-2.4.2.tar.bz2

  $cdhttpd-2.4.2/

  $./configure

  $make

  $sudomakeinstall

  4

  (4)起动HTTPServer$sudo/usr/local/apache2/bin/apachectlstartAH00558:httpd:Couldnotreliablydeterminetheserver’sfullyqualifieddomainname,using127.0.1.1.Setthe‘ServerName’directivegloballytosuppressthismessage

  5

  (5)查询http是不是一切正常运作$netstat-a|grephttptcp00*:http*:*LISTEN

  6

  (6)在电脑浏览器键入127.0.0.1假如一切正常应当显示信息“Itworks!”

  好了上面就是linux搭建web服务器流程,如果有不明白的可以跟【网络推广网】交流,手把手教你搭建,必定可以让你的网站运行起来!