apache2.2.4+mysql5.0.77+php5.2.8安装精简

1.安装Apache    

     将httpd-2.2.4.tar.gz拷贝至/usr/local/src目录中

tar -zxvf httpd-2.2.4.tar.gz

cd httpd-2.2.4

./configure --prefix=/usr/local/apache2 --enable-so --enable-vhost-alias --enable-rewrite --enable-deflate --enable-mods-shared=all --with-mpm=worker

make && make install

 

2.安装php

 

       安装freetype-2.3.5.tar.gz

       tar zxvf freetype-2.3.5.tar.gz

cd freetype-2.3.5

./configure --prefix=/usr/local/phpsyslib/freetype-2.3.5

make && make install

mkdir /usr/local/phpsyslib/freetype-2.3.5/include/freetype2/freetype/internal(如果报错需要)

 

安装jpeg

tar zxvf jpegsrc.v6b.tar.gz

cd jpeg-6b

./configure --prefix=/usr/local/phpsyslib/jpeg-6b --enable-shared 必须加后面这个参数,不然不能生成那个共享库

根据报错信息自己创建相应目录

       cp libjpeg.a /usr/local/lib(如果安装gd不成功的话)

 

安装zlib

tar zxvf zlib-1.2.3.tar.gz

cd zlib-1.2.3

./configure --prefix=/usr/local/phpsyslib/zlib-1.2.3

 

安装openssl-0.9.8e

tar zxvf openssl-0.9.8e.tar.gz

cd openssl-0.9.8e

./config shared zlib

make

make test

make install

mv /usr/bin/openssl /usr/bin/openssl.OFF

mv /usr/include/openssl /usr/include/openssl.OFF

ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl

ln -s /usr/local/ssl/include/openssl /usr/include/openssl

配置库文件搜索路径

#echo "/usr/local/ssl/lib" >> /etc/ld.so.conf

#ldconfig -v

      

       安装libpng

       tar zxvf libpng-1.2.23.tar.gz

cd libpng-1.2.23

cp scripts/makefile.linux makefile

 

安装GD库(如果失败先安装libtoolgettext

 

tar zxvf gd-2.0.35.tar.gz

cd gd-2.0.35

./configure --prefix=/usr/local/phpsyslib/gd-2.0.35 --with-jpeg=/usr/local/phpsyslib/jpeg-6b --with-png=/usr/local/ --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --with-freetype=/usr/local/phpsyslib/freetype-2.3.5/

make && make install

 

安装gettext(如果失败先安装 libtool)

tar zxvf gettext-0.17.tar.gz

cd gettext-0.17

./configure --prefix=/usr
make && make install 

安装libtool

tar zxvf libtool-2.2.tar.gz

cd libtool-2.2

./configure --prefix=/usr
make && make install
cp /usr/lib/libattr.la /lib/ 

 

安装curl

tar zxvf curl-7.17.1.tar.gz

cd curl-7.17.1

./configure --prefix=/usr/local/phpsyslib/curl-7.17.1

make && make install

 

3.安装mysql

 

# tar zxvf mysql-5.0.77-linux-i686-icc-glibc23.tar.gz  

cp mysql-5.0.77-linux-i686-icc-glibc23 /usr/local/mysql

cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysql ---mysql自启动

cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf

groupadd mysql

useradd -g mysql mysql

 

chown -R root /usr/local/mysql

chgrp -R mysql /usr/local/mysql

上面两句可用(chown -R root:mysql /usr/local/mysql)

chown -R mysql /usr/local/mysql/data

/usr/local/mysql/scripts/mysql_install_db --user=mysql&

/usr/local/mysql/bin/safe_mysqld --user=mysql&

 

 

安装php

./configure --prefix=/usr/local/php5.2.8 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/share/doc/libxml2-2.6.16 --with-gd=/usr/local/phpsyslib/gd-2.0.35 --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg-6b --with-png-dir --with-freetype-dir=/usr/local/phpsyslib/freetype-2.3.5 --with-iconv-dir --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --enable-mbstring --disable-ipv6 --with-openssl-dir=/usr/local/ssl --with-curl=/usr/local/phpsyslib/curl-7.17.1 --with-mime-magic=/usr/share/file/magic.mime

 

Mysql日常用法

mysqldump –uXXX –hXXX -p samp_db >/usr/archives/mysql/samp_db.1999-10-02 备份

mysql 数据库名 <文件路径 用户名和密码(如果有)  导入

建立用户:

grant all on redflag.* to 用户名@"%" identified by "密码";

flush privileges;

版权所有:Robot_G(swengineer)  欢迎转载http://blog.csdn.net/swengineer/archive/2009/04/16/4084553.aspx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Apache安装与配置 打开apache官方网站 http://archive.apache.org/dist/httpd/binaries/win32/ 或者镜像网站 http://apache.mirror.phpchina.com/httpd/binaries/win32/,下载里面的apache_2.2.20-win32-x86-no_ssl.msi安装文件。其中,同一版本有两种类型:no_ssl和openssl,openssl多了个ssl安全认证模式,它的协议是HTTPS而不是HTTP,这就是带有SSL的服务器与一般网页服务器的区别了。一般情况下,我们下载no_ssl版本的就ok了。 下载好apache安装文件后,点击安装,在连续3次next后,将进入server information配置界面,要求输入network domain、server domain和网站管理员的邮箱地址,普通用户可以随便按照格式填一下就行了。再次按Next后,出现选择安装路径的界面,默认的路径比较长,pharmar把安装路径修改为:“D:\Program Files\Apache\”,继续安装,直到完成。 安装完毕,apache就自动启动,可以测试apache是否成功启动。在浏览器地址栏里输入:http://localhost/或http://127.0.0.1/,如果出现“It works.”,那么恭喜你,apache已经成功安装了;同时在电脑右下角的任务栏里有一个绿色的apache服务器运行图标。 apache还有一个配置文件:httpd:conf 需要配置,以便php运行。位置为:D:\Program Files\Apache\conf目录里。打开httpd:conf: 1)、查找“DocumentRoot”,这里是指定主页放置的目录。默认是:“D:\Program Files\Apache\htdocs”,你可以使用默认的目录,也可以自己定义一个,如:“D:/PHP”。注意:目录末尾不要加“/”。 2)、查找“DirectoryIndex”,这里是默认首页文件名,可以在index.html 的后面加入index.php等。每种类型之间都要留一个空格。 3)、查找 ...........................

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值