linux apache mysql php
rpm:
apache:httpd httpd-devel httpd-manual
mysql:mysql mysql-server mysql-devel mysql-bensh mysql-test mysqlconnector-odbc
php:php php-mysql php-devel php-common php-pdo php-odbc php-ncurses php-cli php-gd php-xml php-mbstring php-xmlrpc
php主程序 php-mysql连接mysql
libapr---->apr-devel
libpq.so.4---->postgresql-libs
libltdl.so.3 ---->libtool-ltdl libtool-ltdl-devel
rpm -qlp postgresql-libs -->查询包中所包含的库
www.rpmfind.com -->一个下载rpm包的网站,很实用
1.配置
mysql /etc/my.cnf
apache /etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/*.conf
php /etc/php.ini || /etc/php.d/*.ini
php-5.1.6-23.el5.i386.rpm <--- php 主程序
php-mysql-5.1.6-23.el5.i386.rpm <--- php 连接 mysql
php-devel-5.1.6-23.el5.i386.rpm
php-common-5.1.6-23.el5.i386.rpm
php-pdo-5.1.6-23.el5.i386.rpm
php-odbc-5.1.6-23.el5.i386.rpm
php-ncurses-5.1.6-23.el5.i386.rpm
php-cli-5.1.6-23.el5.i386.rpm
php-gd-5.1.6-23.el5.i386.rpm
php-xml-5.1.6-23.el5.i386.rpm
php-mbstring-5.1.6-23.el5.i386.rpm
php-xmlrpc-5.1.6-23.el5.i386.rpm
2.验证lamp结构
<?php
echo "aaa.com";
?>
支持中文;
httpd.conf
DefaultLanguage zh-CN
LanguagePriority zh-CN en ca
AddDefaultCharset zh-CN
测试---->浏览
========================================================
source:
lamp --> mysql || apache || php
apache source install:
---------------------------------------------------------------
包及版本:httpd-2.2.9.tar.gz
---------------------------------------------------------------
配置选项:
./configure --enable-modules=all --enable-mods-shared=all --disable-authz-user --enable-unique-id --enable-version --enable-ssl --enable-info --enable-so --with-mpm=prefork
--enable-so <- DSO 默认 API 接口 <-- php 连接
---> /usr/local/apache2/bin/apxs 可执行文件
{beos|event|worker|prefork|mpmt_os2}apache的五大模块
----------------------------------------------------------------
安装php需要xml支持,因此,需要安装libxml2
----------------------------------------------------------------
xml source install
包及版本:libxml2-2.7.3.tar.gz
----------------------------------------------------------------
配置选项:
./configure --enable-ipv6=no --with-history
----------------------------------------------------------------
php
确认已经安装 curl-devel 软件包
若编译过程中出错,删除整个目录,然后重新解压,编译
包及版本:php-5.2.10.tar.gz
配置选项:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-safe-mode --disable-ipv6 --enable-calendar --with-curl=/usr --enable-ftp --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config
--with-apxs2=/usr/local/apache2/bin/apxs --->与apache结合
--with-mysqli=/usr/local/mysql/bin/mysql_config --->mysqli相关配置,此目录为mysqli安装目录
mysql配置文件
mysql /etc/my.cnf || /usr/local/mysql/etc/my.cnf (注意)
|