Apache+php+MySQL安装 Step By Step
来源:互联网 发布:全景生成系统源码 编辑:程序博客网 时间:2024/05/18 02:02
1. 安装之前你需要下载如下软件包
a) Apache2
website:http://www.apache.org
Download URL:http://apache.justdn.org/httpd/httpd-2.0.55.tar.gz
b) PHP5
website:http://www.php.net
download URL: http://cn.php.net/get/php-5.1.1.tar.gz/from/this/mirror
c) MySQL 4.1
Website: http://www.mysql.org
download:http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-max-4.1.15-unknown-freebsd5.3-i386.tar.gz/from/http://mirror.vmmatrix.net/mysql/
d) MySQL 4.1 Client
Website: http://www.freebsd.org/ports
Download:ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/mysql-client-4.1.15.tbz
e) Zlib 1.2.3
Website: http://www.zlib.net
Download url: http://www.zlib.net/zlib-1.2.3.tar.gz
f) GD Library 2.033
Website: http://www.boutell.com/gd
Download URL:http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
2. 安装Mysql4.1
# tar xzfv mysql-max-4.1.15-unknown-freebsd5.3-i386.tar.gz
# cd mysql-max-4.1.15-unknown-freebsd5.3-i386
# pw groupadd mysql
# pw adduser mysql -g mysql
# mv mysql-max-4.1.15-unknown-freebsd5.3-i386/ /usr/local/mysql-max-4.1.15
# cd /usr/local
# ln -s mysql-max-4.1.15 mysql
# chown -R mysql:mysql mysql-max-4.1.15
# mysql/bin/mysqld_safe &
# /usr/local/mysql/bin/mysqladmin -u root password xxxxxx
# /usr/local/mysql/bin/mysqladmin -u root -p shutdown
# cd /usr/local/mysql/support-files
# cp my-large.cnf /etc/my.cnf
# /usr/local/mysql/bin/mysqld_safe &
3. 安装Apache2
# tar xzfv httpd-2.0.55.tar.gz
# cd httpd-2.0.55
# ./configure --prefix=/usr/local/apache2.0.55 /
--enable-so --enable-rewrite /
--enable-mime-magic /
--enable-vhost-alias /
--enable-deflate /
--enable-expires /
--with-mpm=worker
# make
# make install
# cd /usr/local
# ln -s apache2.0.55 apache
# cd apache
# bin/apachectl start
4. 安装Zlib 1.2.3
# tar xzfv zlib-1.2.3.tar.gz
# cd zlib-1.2.3
# ./configure --shared
# make
# make install
5. 安装gd-2.0.33
# tar xzfv gd-2.0.33.tar.gz
# cd gd-2.0.33
# ./configure
# make
# make install
6. 安装 MySQL 4.1 Client
由于前边安装MySQL Server时用了编译好的文件,所以这里需要安装一下 MySQL Client。为了方便直接安装了MySQL 4.1 Client的package
# pkg_add mysql-client-4.1.14.tbz
7. 安装 PHP5
#tar xzfv php-5.1.1.tar.gz
#cd php-5.1.1
#./configure --with-apxs2=/usr/local/apache/bin/apxs /
--enable-track-vars --with-zlib --with-gd /
--with-sockets --enable-sockets /
--disable-debug --with-tiff-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib /
--with-zlib-dir=/usr/local/lib --with-mysql --with-xml /
--enable-shmop /
--prefix=/usr/local/php5 /
--enable-mbstring /
--enable-sysvsem --enable-sysvshm --enable-sysvmsg /
--enable-soap
#make
#make install
l 在 apache 的配置文件httpd.conf中加入 AddType application/x-httpd-php .php
l 新建文件 test.php,内容如下: phpinfo(); ?> ,测试apache是否可以解析php
8. 优化Apache
修改apache的配置文件httpd.conf
StartServers 3
MaxClients 2000
MinSpareThreads 50
MaxSpareThreads 200
ThreadsPerChild 100
MaxRequestsPerChild 0
ThreadLimit 200
ServerLimit 25
- Apache+php+MySQL安装 Step By Step
- Apache+php+MySQL安装 Step By Step
- Apache+php+MySQL安装 Step By Step
- Apache+php+MySQL安装 Step By Step
- Apache+php+MySQL安装 Step By Step
- centos 7.2 Apache+mysql+php step by step备忘
- Step BY Step PHP----安装篇(上)
- MySQL step by step 安装实战
- Securing Apache: Step-by-Step
- Proftpd MySQL [Step by Step]
- Debian 安装--step by step
- mysql安装 一 rpm包安装(step by step)
- Securing Apache 2: Step-by-Step
- [学习] Apache + mod_python + Django Step by Step
- MySQL Cluster配置step by step
- step by step 配置mysql复制
- 深入MySQL源码—Step By Step
- MyCat1.6 Mysql集群Step by Step
- 《C++ Template Metaprogramming》附录A——预处理元编程
- FreeBSD查看即时网络流量
- 旧话重提:pImpl惯用手法的背后
- 《C++ Template Metaprogramming》译序——经典之后的经典
- 《C++ Template Metaprogramming》第三章——深度探索元函数
- Apache+php+MySQL安装 Step By Step
- C++标准库的一个有趣的小bug
- Who is const ?!铪铪铪铪铪铪
- IT知识库
- 使用Python2.4在Linux下访问SQL Server(安装篇)
- .NET Generics vs. C++ Templates铪铪
- JMS(Jboss Messaging)的一点使用心得(十一)Spring扩展应用-可自动重连的JmsMessageListenerContainer的另一种实现
- FreeBSD下 自动获取网通电信IP列表
- boost源码剖析之:泛型指针类any之海纳百川(rev#2)