1:安装mysql-5.1.11.tar.gz版本.
下载地址: http://dev./downloads/mysql/5.1.html
http://www./
1:)在mysql解压文件里面安装脚本install-sh 运行脚本就可以.如果详细知道情况直接查看里面的说明readme 和官方的说明书
#tar zxvf mysql-5.0.22,tar.gz 版本
#cp mysql-5.0.22
#./install.sh
…… 将会自动安装
2:)mysql 安装后测试
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
在安装MySql后只有一个超级管理权限的用户ROOT,而且ROOT限制只能在数据库本机上使用,如果我们要远程管理MySql咋办呢?那么事实上我们需要添加一个具有超级管理权限并且可能远程访问的超级用户,而在MySql中有两种方法可以实现这个目的,我们以增加一个超级权限管理用户admin为例来说明。
你可以通过发出GRANT语句增加新用户:首先在数据库本机上用ROOT用户登录上MySql
mysql>GRANT ALL PRIVILEGES ON *.* TO admin@localhost IDENTIFIED BY ‘‘‘‘something‘‘‘‘ WITH GRANT OPTION;
mysql>GRANT ALL PRIVILEGES ON *.* TO admin@"%" IDENTIFIED BY ‘‘‘‘something‘‘‘‘ WITH GRANT OPTION;
第一句增加了一个admin用户授权通过本地机(localhost)访问,密码“something”。第二句则是授与admin用户从任何其它主机发起的访问(通配符%)。 你也可以直接通过发出INSERT语句增加同样的用户存取信息:
mysql>INSERT INTO user VALUES(‘‘‘‘localhost‘‘‘‘,‘‘‘‘admin‘‘‘‘,PASSWORD(‘‘‘‘something‘‘‘‘), ‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘)
mysql>INSERT INTO user VALUES(‘‘‘‘%‘‘‘‘,‘‘‘‘admin‘‘‘‘,PASSWORD(‘‘‘‘something‘‘‘‘), ‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘)
用文本编辑器编辑好为存为index.php,重新启动apache,在IE中输入
http://localhost/index.php
如果出现php的环境变量,说明php,安装成功,如果不能解析<?php phpinfo(); ?>中的部分,则说明没有成功安装
2:安装httpd-2.2.2.tar.gz版本.
下载http://www.
http://www./dyn/closer.cgi
1:)
# tar zxvf http-2-2-2.tar.gz
#cd http-2.2..2
#./configure --prefix=/etc/httpd --enable-module=so
#make
#make install
#cp /etc/httpd/bin/apachect1 /usr/sbin/httpd
#cp /etc/httpd/bin/apachect1 /etc/rc.d/init.d/httpd
………说明下 上面 是启动apache 两种方式
自己可以编写启动脚本
修改httpd.conf-----配置
apache的配置文件是httpd.conf,位于apache根目录的下的conf文件夹下
(1).修改默认网站根目录:
在d:\server下建立文件夹www,以此作为网站的根目录
DocumentRoot "D:/server/Apache Group/Apache2/htdocs"
改为DocumentRoot "D:/server/www
(2).修改字符设置
apache解析中文网页时会产生乱码,修改
AddDefaultCharset ISO-8859-1为AddDefaultCharset GB2312
(3).修改默认主页
当访问目录时,apache会自动导入的主页,优先级以先后顺序为准
把 DirectoryIndex index.html index.html.var 改为
DirectoryIndex index.html index.jsp index.php default.jsp default.php index.html.var
2J进行测试
http://ip/
3:装GD库
1:安装Jpeg6b
ftp://ftp.uu.net/graphics/jpeg/
tar xzvf jpegsrc.v6b.tar.gz
令完成后多了一个子目录jpeg-6b,Jpeg的源码文件就在其中。进入该子目录:
cd jpeg-6b
./configure
make
在make之前要加上
Mkdir –p /usr/local/man/man1 修正错误
make install
make install-lib
命令完成后,jpeglib.h被拷到/usr/include目录下,libjpeg.a和libjpeg.so被拷到/usr/local/lib目录下-----就是命令 make install-lib
2. ttf 的安装和配置
http://www./
freetype-1.3.1.tar.gz
tar -xzvffreetype-1.3.1.tar.gz
./configure
命令完成后该目录下多了个Makefile文件。Makefile文件是许多软件编译、安装的配置和过程控制文件,十分重要,应该学会看懂它的内容。开始编译:
make
make install
编译gd 的时候有error don‘t found the freetype.h 所以
cp /usr/local/include/freetype/*/usr/local/include/
3, zlib 安装:
http://www./zlib/
ftp://ftp.uu.net/graphics/png/src/zlib-1.1.3.tar.gz
./configure
make
make install
4. libpng 安装:
http://www./pub/png/
libpng-1.2.10.tar.gz
tar zxvf libpng-1.2.10.tar.gz
不需要./configure
UNIX example:cp scripts/makefile.std makefile
/makefiel.gcmmx makefile
make
make install
5. gd-2.0.33.tar.gz的安装和配置
tar zxvf gd-2.0.33.tar.gz
./configure
make
make install
gd.h被拷到/usr/local/lib目录下
6. XML的安装
URL ftp://xmlsoft.org/libxml2/libxml2-2.6.16.tar.gz
Tar zxvf libxml2-2.6.16.tar.gz
cp
./configure
make
make install
4:安装php 5.0
http://www./
http://www./downloads.php
PHP 5.1.4 (tar.bz2)
tar zxvf php-5.1.4.tar.gz
cp
./configure –prefix=/usr/local/php \
--with-apx2=/etc/httpd/bin/apx \
--with-gd --with-jpeg-dir --with-ttf \
--with-zlib-dir --with-png-dir \
--with-msql=/usr/local/mysql --enable-track-vars
make
make install
cp php.ini-dist /usr/local/lib/php.ini
修改php.ini
将magic_quotes_gpc=On改为Off
将register_globals=Off改为On
最后,修改/usr/local/apache/conf/httpd.conf,确保有下面的语句:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHP的测试:
<html>
<head><title>php测试</title></head>
<?php
phpinfo(); ?>
</html>