Chinaunix首页 | 论坛 | 博客
  • 博客访问: 394057
  • 博文数量: 89
  • 博客积分: 1386
  • 博客等级: 中尉
  • 技术积分: 827
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-20 10:32
个人简介

12年 linux 系统运维工程师,网络架构设计、优化,故障处理。

文章分类

全部博文(89)

文章存档

2019年(1)

2015年(2)

2014年(11)

2013年(14)

2012年(2)

2011年(59)

分类: LINUX

2013-06-19 14:40:28

 

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

修改数据库用户名和密码

导入数据库。

阅读(775) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~