12年 linux 系统运维工程师,网络架构设计、优化,故障处理。
分类: LINUX
2013-06-19 14:40:28
Download httpd-2.2.19 httpd-2.2.19
1. cd httpd-2.2.19
安装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
修改数据库用户名和密码
导入数据库。