centos 6.3 lamp安装

890阅读 0评论2013-06-19 水中游于
分类:LINUX

 

Download  httpd-2.2.19  httpd-2.2.19

1.     cd httpd-2.2.19

  1. ./configure --prefix=/usr/local/apache --enable-vhost-alias --enable-rewrite --enable-info
  2. Make
  3. Make install
  4. cp build/rpm/httpd.init /etc/init.d/httpd
  5. chmod 755 /etc/init.d/httpd
  6. chkconfig --add httpd
  7. chkconfig --level 35 httpd on
  8. cd /etc
  9. mv httpd httpd_old
  10. ln -s /usr/local/apache/   httpd
  11. cd /usr/sbin/
  12. ln -fs /usr/local/apache/bin/httpd
  13. ln -fs /usr/local/apache/bin/apachectl
  14. cd /var/log
  15. rm -rf httpd/
  16. ln -s /usr/local/apache/logs httpd
  17. /etc/init.d/httpd start

安装php

yum install libxml2

yum install libxml2-devel –y

yum install libjpeg libpng freetype libjpeg-devel libpng-devel freetype-devel

1./configure '--with-apxs2=/usr/local/apache/bin/apxs' '--prefix=/usr/local/php' '--with-iconv' '--with-mysql' '--with-mysqli' '--with-gd' '--with-zlib' '--with-jpeg-dir=/usr/local/modules/jpeg'

2make

3make install

Mysql

Yum install mysql.x86_64  mysql.x86_64  mysql-server.x86_64 mysql-libs.x86_64 

配置Apache

Cd /etc/httpd/conf

Vim httpd.conf

添加内容

ServerName 127.0.0.1

include /etc/httpd/conf/vhost_*.conf

Addtype application/x-httpd-php .php

Addtype application/x-httpd-php-source .phps

创建配置文件

Vim vhost_5aixue.com.conf

内容为:

ServerName test1.5aixue.com

ServerAlias test1.5aixue.com

DocumentRoot /home/aixue/public_html

ErrorLog /var/log/test.5aixue.com_error_log

CustomLog /var/log/test.5aixue.com_access_log combined

#ScriptAlias /cgi-bin/ /gitecroot/aixue/cgi-bin/

DirectoryIndex index.php index.html index.htm  index.php4 index.php5

Options -Indexes +IncludesNOEXEC +FollowSymLinks

allow from all

AllowOverride All

#

#allow from all

#

aixue包解压到/home下,

Cd /home/aixue/public_html/system/config

Vim config.php

修改两项内容:

WEBROOT','/home/aixue/public_html/

LOCAL_IP','192.168.10.103

Vim  db_config.php

修改数据库用户名和密码

导入数据库。

上一篇:LAMP+Nagios+Ndoutils+Centreon 64位操作系统安装
下一篇:#vi下替换字符