LINUX上搭建HTTP服务器

转载自:http://wenwen.soso.com/z/q236309262.htm?w=freetype2&spi=1&sr=7&w8=freetype2&qf=20&rn=66&qs=4&sid=ac1b180b0001191550b584596e2b9bf7&uid=9867772572&ch=w.search.7

下面给个在CentOS上的安装过程(仅供参考)

首先,我们要删除CentOS自带的Apache服务,因为CentOS5已经默认给你安装了Apache。
(不论你用哪种方式都必须先升级和安装以下的程序库和先卸载系统自带的Apache):
卸载Apache,命令:

yum remove httpd

升级,命令:

yum -y update

安装程序库,命令:

yum -y install yum-fastestmirror
yum -y install patch make gcc gcc-c++ gcc-g77 flex bison
yum -y install libtool libtool-libs kernel-devel autoconf
yum -y install libjpeg libjpeg-devel libpng libpng-devel
yum -y install freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel
yum -y install glib2 glib2-devel bzip2 diff*
yum -y install bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs
yum -y install e2fsprogs-devel krb5 krb5-devel libidn libidn-devel
yum -y install openssl openssl-devel vim-minimal
yum -y install fonts-chinese scim-chewing scim-pinyin scim-tables-chinese

然后开始安装LAMP一键安装包,命令:

mkdir -p tmpInstall
cd tmpInstall
wget http://www.01on.com/down/lamp.tar.gz
tar zxvf lamp.tar.gz
cd lamp
chmod +x install.sh
./install.sh

输入之后,稍等一下会让你设置域名、mysql密码、ftp密码,设置完成后开始安装。



你可能感兴趣的:(C/C++基础学习)