LAMP(Linux+Apache+Mysql+PHP)部署手册(1)(2)
第二步:安装Apache
其实是安装Apache项目下的httpd
1、从 http://httpd.apache.org下载文件httpd-2.2.14.tar.bz2 2.
2、解压缩
$ bzip2 –d httpd-2.2.14.tar.bz2
$ tar –xvf httpd-2.2.14.tar
3、配置
$ cd httpd-2.2.14
$ ./configure --prefix=/usr/local/apache --enable-so
即将安装在路径/usr/local/apache 下。
4、编译并安装
$ make
$ make install
将会安装到--prefix指定的/usr/local/apache下面
6、定制配置文件
$ vi /usr/local/apache/conf/httpd.conf
7、测试
Start Apache HTTP Server bu running:
$ /usr/local/apache/bin/apachectl -k start
It should be able to request your first document via http://localhost. The document is located in DocumentRoot, which is set in http.conf.
Stop the server
$ /usr/local/apache/bin/apachectl -k stop
评论暂时关闭