centos 6.3 lamp安装

 

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'

2、make

3、make 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

修改数据库用户名和密码

导入数据库。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值