lamp的安装配置

2006-12-08 15:45:49

--------------------------PHPChina 开源社区门户P7X;H I+Lg&pq A
mysql 安装
-Nee.T-B!A9Qj${ K!J Z0--------------------------
iL]4Z@0安装包:mysql-5.0.22.tar.gz 路径:/home/adminPHPChina 开源社区门户 o@#`3M){A"L
# useradd mysqlPHPChina 开源社区门户q5i8R&p&@#eG
# groupadd mysqlPHPChina 开源社区门户 TeeVmy
# cd /home/adminPHPChina 开源社区门户'l5Q2]W2c|
# tar -zxvf mysql-5.0.22.tar.gz 得到mysql-5.0.22
#DC-u d nX(p0# mv mysql-5.0.22 /usr/local/src/PHPChina 开源社区门户tGr|Lx uiYe
# cd /usr/local/src/mysql-5.0.22PHPChina 开源社区门户 D"~r6ST8Y s
# ./configure --prefix=/usr/local/mysql
-kV6} C8hWi1Z0# make
;Pk QU&Gu:k!sa'_0# make installPHPChina 开源社区门户va2kL!E&S
# cp ./support-files/my-medium.cnf /etc/my.cnfPHPChina 开源社区门户?hz6Y'cV/|wb
# cd /usr/local/mysqlPHPChina 开源社区门户(MH3@o4m*x9f
# ./bin/mysql_mysql_install_db --user=mysql
,Al9ZqDTE{0# chown -R root .PHPChina 开源社区门户%l'T zYLu
# chown -R mysql varPHPChina 开源社区门户Try\ t
# chown -R mysql .
"r hh|)^rW%n UZ0# ./bin/mysqld_safe --user=mysql &

--------------------------PHPChina 开源社区门户*dT$P*OZ ?$d
webmin 的安装和设定
6H M.e,J]/^ m$M8B0--------------------------
4h*uhg}ZveG0安装包:webmin-1.270-1.noarch.rpm   路径:/home/adminPHPChina 开源社区门户2d"EfBm
# cd /home/adminPHPChina 开源社区门户`o c;py[
# rpm -ivh webmin-1.270-1.noarch.rpm
,a-v%| X+JF.n0注释:在您的浏览器输入:http://192.168.1.31:10000/
8]XV#} @+Ut0设定数据库的bin路径和打开方式:/usr/local/mysql/bin/mysqld_safe --user=mysql &

PHPChina 开源社区门户 } N}q9^ t6P
--------------------------PHPChina 开源社区门户J+e"fb!~
apache 的安装和设定PHPChina 开源社区门户L;G2vjY(k z'Ka
--------------------------
.Ce^ x-_0安装包:httpd-2.0.58.tar.gz    路径:/home/admin
AX O AQh`~ @B _3A b0# tar -zxvf httpd-2.0.58.tar.gzPHPChina 开源社区门户e1kVe1Cz"ojm
# mv httpd-2.0.58 /usr/local/src/httpd-2.0.58
"p)q[T GB0# cd /usr/local/src/httpd-2.0.58PHPChina 开源社区门户'i@@*~MG Xx P
# ./configure --prefix=/etc/httpd --enable-so --enable-module=shared --enable-mods-shared=all
p:Q]o'qz@ }0# make && make install
8h;fX8l7r4_H0# cp /etc/httpd/bin/apachectl /usr/sbin/httpdPHPChina 开源社区门户&~6a^a/|3_.EU.^
# cp /etc/httpd/bin/apachectl /etc/rc.d/init.d/httpdPHPChina 开源社区门户1G!I]5R hQ:mt
# vi ./conf/httpd.confPHPChina 开源社区门户!WN6^2i5Rc ]2g.d5E
修改ServerName 192.168.1.31:80PHPChina 开源社区门户*z%_J v`d6|
# /etc/rc.d/init.d/httpd -k start


.ZJESQ8]x(}6b"{0--------------------------
'^)TJx&Z"E-U+K!@B0jpeg包的安装和设定
_qH xjL4i0--------------------------PHPChina 开源社区门户 K_-I.j7b r#^-s+O/Y
安装包:jpegsrc.v6b.tar.gz 路径:/home/adminPHPChina 开源社区门户!f'jS i1pX9{5_
# tar -zxvf jpegsrc.v6b.tar.gz
R#H^P8{0# mv jpeg-6b /usr/local/src/
%Qp;L~1L-H\2\0# cd /usr/local/src/jpeg-6b
3Xw V?BpF0O0# ./configure
0}V d+@mH:}0# makePHPChina 开源社区门户*{k1BX$I2{W-b
# mkdir -p /usr/local/man/man1
&E0zED S!RR0# make install
#hq-vif q0# make install-lib


H8P}K`/_0--------------------------PHPChina 开源社区门户9iJ2s;tc ?m
ttf包的安装和设定PHPChina 开源社区门户 A1PI}a-[:V^|
--------------------------PHPChina 开源社区门户 tu7?m+Op3dA9~
安装包:freetype-2.2.1.tar.gz 路径:/home/admin
@G"y k&K}{6j0# tar -zxvf freetype-2.2.1.tar.gz PHPChina 开源社区门户$Ps)pV{:L1Ft
# mv freetype-2.2.1 /usr/local/src/PHPChina 开源社区门户&B5E+@| H)i,G
# cd /usr/local/src/freetype-2.2.1
p_nd2}(W3z q5O_9D0# ./configurePHPChina 开源社区门户?c!q z"k!OX
# make && make install

--------------------------
K&nJ:G:MD0zlib包的安装和设定PHPChina 开源社区门户^Og,E5\9L'~
--------------------------PHPChina 开源社区门户,j9N {;z3~Mo8LC q
安装包:zlib-1.2.3.tar.gzPHPChina 开源社区门户%`8~PY| z|7W(K6~
# tar -zxvf zlib-1.2.3.tar.gzPHPChina 开源社区门户9u{"P c l6{{
# mv zlib-1.2.3 /usr/local/src/zlib-1.2.3PHPChina 开源社区门户$Uh L#t1t
# ./configure
R/B~mK#|$ru0# make && make install

--------------------------PHPChina 开源社区门户&])y)m} w.t~7c
libpng包的安装和设定
yo Vv^0--------------------------PHPChina 开源社区门户)}PAf){
安装包:libpng-1.2.10.tar.gz
-oZ&k.O&^o/?;w_0# tar -zxvf libpng-1.2.10.tar.gzPHPChina 开源社区门户N)UF G}W3W
# mv libpng-1.2.10 /usr/local/src/libpng-1.2.10
a'j9Dk;pD6O'pZQ0# cd /usr/local/src/libpng-1.2.10PHPChina 开源社区门户^+b:j|UccY
# cp ./scrīpts/makefile.gcmmx makefilePHPChina 开源社区门户cu5C Y ^(yO dp5D
# make && make install

PHPChina 开源社区门户J%SQD$\
--------------------------
1EWPm-~*Ij&v0gd包的安装和设定PHPChina 开源社区门户`+`oT/X1_Y8N&Y
--------------------------
z5i-w q3Ys0安装包:gd-2.0.33.tar.gz
z1jKa9Sg#bh'{B3]S0# tar -zxvf gd-2.0.33.tar.gzPHPChina 开源社区门户8OH)y#n AGA
# mv gd-2.0.33 /usr/local/src/
9o roA0y)J-nI0# cd /usr/local/src/gd-2.0.33
,jp:E8?.f&m:c0# ./configure && make && make install
$y{5xAg ^+b6?0# cp gd.h /usr/local/lib/

--------------------------
8P;Re:HI)~!yi*@0xml包的安装和设定PHPChina 开源社区门户 R1B#]Q[#X8s5P*|r
--------------------------PHPChina 开源社区门户j i Y&]0cm
安装包:libxml2-2.6.11.tar.gzPHPChina 开源社区门户 H)i8_ d'F
# tar -zxvf libxml2-2.6.11.tar.gzPHPChina 开源社区门户.rQx@i1~ S
# mv libxml2-2.6.11 /usr/local/src/
zI5tKt6p N0# cd /usr/local/src/libxml2-2.6.11
RV/GyL K_jg7z0# ./configure
&X!HH t-D)s*AM)l%H'|0# make && make install

--------------------------PHPChina 开源社区门户;W)AE pk#J8g
php5的安装和设定PHPChina 开源社区门户0l {nG'|Ak
--------------------------PHPChina 开源社区门户bG[Ym#^%|)r
安装包:php-5.0.1.tar.gz
"_L+Gt;g9Fq/` e x0# tar -zxvf php-5.0.1.tar.gz
#KS'@J*X+j*?]8wIiT R0# mv php-5.0.1 /usr/local/src/PHPChina 开源社区门户^chO L f q'd
# cd /usr/local/src/php-5.0.1
r:l5T bi'Z3m)b0# ./configure --prefix=/usr/local/php --with-apxs2=/etc/httpd/bin/apxs --with-gd --with-jpeg-dir --with-ttf --with-zlib-dir --with-png-dir --with-mysql --enable-track-vars (--enable-mbstring //this is for phpmyadmin)
@&ZL5Yi0# make PHPChina 开源社区门户Vu3@],EN!Cv
# make testPHPChina 开源社区门户2Ad,x H;ZA
# make install
2|N0G,z[lB0# libtool --finish /usr/local/src/php-5.0.1/PHPChina 开源社区门户4nT!yG}C:N:P4w
# chmod 755 /etc/httpd/modules/libphp5.so
CE!_[b X8_L+N0# cp php.ini-dist /usr/local/php/lib/php.ini

--------------------------
T az*D.Kn7@hU0zend的安装和设定
i*nZ)`6@p0--------------------------
x3qQSM#_\V/Pd5F0安装包:ZendOptimizer-2.6.2-linux-glibc21-i386.tar.gz
Oj"x%ux)x9e8FHT$u0# tar -zxvf ZendOptimizer-2.6.2-linux-glibc21-i386.tar.gz
sEOQ+v9B"_dOJ0# cp ZendOptimizer-2.6.2 /usr/local/src/PHPChina 开源社区门户 A8?_'`[\R PT)Wq
# cd /usr/local/src/ZendOptimizer-2.6.2PHPChina 开源社区门户 bH3g/Y%c
# install.sh


z3|![#}[/nN4Y/g0--------------------------
qO W@)n_.zZ I;\0apache配置文件的配置httpd.confPHPChina 开源社区门户6_'a.F"a6{j
--------------------------
2YU8V'} jui!v1a0# vi /etc/httpd/conf/httpd.confPHPChina 开源社区门户SkX;J*}$~
AddType application/x-httpd-php .php   //添加PHPChina 开源社区门户$APz&y4Z
AddType application/x-httpd-php-source .phps //添加PHPChina 开源社区门户b?e7sc/R Njc
Load Module php5-module modules/libphp5.soPHPChina 开源社区门户1W9? \VeM-O
DirectoryIndex index.html index.html.var index.php  //添加index.php

# /etc/rc.d/init.d/httpd restart


d7H @7DX7?K0--------------------------
!_B$hmy#x0phpmyadmin的安装和设定
RhV U@8f;z$p0--------------------------
j'Ut#s#bU-F.hB0安装包:phpMyAdmin-2.8.1.tar.gz
-J)a:Z3lv9J%Zh `0# tar -zxvf phpMyAdmin-2.8.1PHPChina 开源社区门户;[ C C |,N9a G1Fd(L~#A7}
# mv phpMyAdmin-2.8.1 /etc/httpd/htdocs/phpmyadmin
Z z:Y]g w0# cd /etc/httpd/htdocs/phpmyadmin
&asPs/Tz0# cp ./libraries/config.default.php ../config.inc.php
*gWDB3O'ySx X7V^0# vi config.inc.php   //修改成如下:
-i5y:@0ev Gd0$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP addressPHPChina 开源社区门户4Sc(r'qJx)U
$cfg['Servers'][$i]['port']          = '3306';          // MySQL port - leave blank for default portPHPChina 开源社区门户/o1u Z&jtq
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socketPHPChina 开源社区门户*~_5wq#PP+Q
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
1egw)O,WWy0$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
:r{ mV g-}0$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
K$q5M^_y^H0                                                    // (requires PHP >= 4.3.0)PHPChina 开源社区门户L6RUy5c;N4eQ5Rm;J
$cfg['Servers'][$i]['controluser']   = 'root';          // MySQL control user settingsPHPChina 开源社区门户/@0Hfu7a9m~[
                                                    // (this user must have read-onlyPHPChina 开源社区门户d!l7_cVuE
$cfg['Servers'][$i]['controlpass']   = 'linuxx';          // access to the "mysql/user"PHPChina 开源社区门户9u6MM9w'U`8O EiXP
                                                    // and "mysql/db" tables).PHPChina 开源社区门户-D:Rm9lt.^O+W
                                                    // The controluser is alsoPHPChina 开源社区门户^'KBa0SjW.~
                                                    // used for all relationalPHPChina 开源社区门户*Zj\"h8X'J9S\H
                                                    // features (pmadb)
RYm)Y0~Nji0$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?PHPChina 开源社区门户O Nq lLYew'm
$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
:}o.?8g;dUd\t0$cfg['Servers'][$i]['password']      = 'linuxx';          // MySQL password (only neededPHPChina 开源社区门户 xjYV!{W;obr
                                                    // with 'config' auth_type)
[*x/K#j NmWEG[0$cfg['Servers'][$i]['only_db']       = '';          // If set to a db-name, only
t|/ZC~0                                                    // this db is displayed in l

 

 


.LkfF|3J0 


TAG:

timmimiboy的个人空间 删除 伙伴虚岁 发布于2007-08-01 18:56:31
谢谢你!
这正是我需要的
Open Toolbar