下載地址: http://dev.mysql.com/downloads/mysql/5.1.html
http://www.mysql.com/
1:)在mysql解壓文件里面安裝腳本install-sh 運行腳本就可以.如果詳細知道情況直接查看里面的說明readme 和官方的說明書
#tar zxvf mysql-
#cp mysql-
#./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后只有一個超級管理權(quán)限的用戶ROOT,而且ROOT限制只能在數(shù)據(jù)庫本機上使用,如果我們要遠程管理MySql咋辦呢?那么事實上我們需要添加一個具有超級管理權(quán)限并且可能遠程訪問的超級用戶,而在MySql中有兩種方法可以實現(xiàn)這個目的,我們以增加一個超級權(quán)限管理用戶admin為例來說明。
你可以通過發(fā)出GRANT語句增加新用戶:首先在數(shù)據(jù)庫本機上用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用戶授權(quán)通過本地機(localhost)訪問,密碼“something”。第二句則是授與admin用戶從任何其它主機發(fā)起的訪問(通配符%)。 你也可以直接通過發(fā)出INSERT語句增加同樣的用戶存取信息:
mysql>INSERT INTO user VALUES(‘‘‘‘localhost‘‘‘‘,‘‘‘‘a(chǎn)dmin‘‘‘‘,PASSWORD(‘‘‘‘something‘‘‘‘), ‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘)
mysql>INSERT INTO user VALUES(‘‘‘‘%‘‘‘‘,‘‘‘‘a(chǎn)dmin‘‘‘‘,PASSWORD(‘‘‘‘something‘‘‘‘), ‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘,‘‘‘‘Y‘‘‘‘)
用文本編輯器編輯好為存為index.php,重新啟動apache,在IE中輸入
http://localhost/index.php
如果出現(xiàn)php的環(huán)境變量,說明php,安裝成功,如果不能解析<?php phpinfo(); ?>中的部分,則說明沒有成功安裝
下載http://www.apache.org
http://www.apache.org/dyn/closer.cgi
1:)
# tar zxvf http-
#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).修改默認(rèn)網(wǎng)站根目錄:
在d:\server下建立文件夾www,以此作為網(wǎng)站的根目錄
DocumentRoot "D:/server/Apache Group/Apache2/htdocs"
改為DocumentRoot "D:/server/www
(2).修改字符設(shè)置
apache解析中文網(wǎng)頁時會產(chǎn)生亂碼,修改
AddDefaultCharset ISO-8859-1為AddDefaultCharset GB2312
(3).修改默認(rèn)主頁
當(dāng)訪問目錄時,apache會自動導(dǎo)入的主頁,優(yōu)先級以先后順序為準(zhǔn)
把 DirectoryIndex index.html index.html.var 改為
DirectoryIndex index.html index.jsp index.php default.jsp default.php index.html.var
2J進行測試
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.org/
freetype-
tar -xzvffreetype-1.3.1.tar.gz
./configure
命令完成后該目錄下多了個Makefile文件。Makefile文件是許多軟件編譯、安裝的配置和過程控制文件,十分重要,應(yīng)該學(xué)會看懂它的內(nèi)容。開始編譯:
make
make install
編譯gd 的時候有error don‘t found the freetype.h 所以
cp /usr/local/include/freetype/*/usr/local/include/
3, zlib 安裝:
http://www.gzip.org/zlib/
ftp://ftp.uu.net/graphics/png/src/zlib-
./configure
make
make install
4. libpng 安裝:
http://www.libpng.org/pub/png/
libpng-
tar zxvf libpng-
不需要./configure
UNIX example:cp scripts/makefile.std makefile
/makefiel.gcmmx makefile
make
make install
5. gd-
tar zxvf gd-
./configure
make
make install
gd.h被拷到/usr/local/lib目錄下
6. XML的安裝
URL ftp://xmlsoft.org/libxml2/libxml2-
Tar zxvf libxml2-
cp
./configure
make
make install
http://www.php.net/
http://www.php.net/downloads.php
PH
tar zxvf php-
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>