Linux Ô´Âë°²×°LAMP½Ì³Ì
×÷Õß ØýÃû¼¼Êõ
À´Ô´ Linuxϵͳ
ä¯ÀÀ
·¢²¼Ê±¼ä 2012-04-04
|
zxvf mysql-5.1.45-linux-i686-glibc23.tar.gz -C /usr/local ½âѹµ½/usr/local
ln -sv mysql-5.1.45-linux-i686-glibc23.tar.gz/ mysql Á¬½Ó³ÉÒ»¸ö¼òµ¥µÄÃû×Ö
cd mysql
less INSTALL-BINARY ÏÔʾmysqlµÄ°²×°ËµÃ÷,ÏÂÃæµÄ²½ÖèÎÒÃǾÍÊÇ°´ÕÕ˵Ã÷ÖÐÈ¥×ö
groupadd -r mysql ´´½¨¹ÜÀíÔ±×émysql
useradd -g mysql -s /bin/false -M mysql ´´½¨mysql×åÖÐÓû§,¶¨ÒåÆäûÓÐshell,ʹÕâ¸öÓû§²»ÄÜʹÓÃshellÃüÁî,ÒÔÈ·±£¸ÃÓû§µÄ°²È«ÐÔ-MÊǶ¨ÒåÆäûÓмÒĿ¼
ls /home
cd /usr/local/mysql
chown -R mysql:mysql . µÝ¹é¸ü¸Äµ±Ç°Ä¿Â¼ÊôÖ÷Êô×é
script/mysqld_install_db --user=mysql ʹÓÃmysqlµÄÉí·Ý½øÐа²×°
chown -R root . µÝ¹é¸Ä»ØÊôÖ÷
chown -R mysql data µÝ¹éÐÞ¸ÄdataĿ¼µÄÊôÖ÷
bin/mysqld_safe --user=mysql & ÔËÐÐmysql,»á×Ô¶¯½øÐÐϽøÐгõʼ»¯
°²×°Íê³Éºó¿ªÊ¼¸ü¸ÄchkconfigÎļþ,¿âÎļþ,Í·Îļþ,»·¾³±äÁ¿
cd /usr/local/mysql/support_files/
cp my-large.cnf /etc/my.cnf Ö÷ÅäÖÃÎļþ
cp mysql.server /etc/init.d/mysqld ¸´ÖÆmysql.serverµ½mysqld
chkconfig --add mysqld ½«mysqld½Å±¾¼ÓÈëchkconfigÆô¶¯¶ÓÁÐ
chkconfig mysqld on ÔÚchkconfigÖпªÆômysqld
service mysqld restart ³¢ÊÔserviceÃüÁîÊÇ·ñÉúЧ
Í·Îļþ£º
ln -sv /usr/local/mysql/include /usr/include/mysql ϵͳĬÈϵÄÍ·ÎļþĿ¼ÊÇ/usr/include,ÎÒÃÇÐèÒª½«mysqlµÄincludeĿ¼¸´ÖƵ½ÄÇÀï»òÕß×ö¸öÁ´½Ó
¿âÎļþ£º
ÔÚ/etc/ld.so.confÎļþÖÐÖ»ÓÐÒ»¾ä»°include ld.so.conf.d/*.conf,±íʾ¿âÎļþ¶¨ÒåÔÚ/etc/ld.so.conf.d/Ŀ¼ÏÂÒÔ.conf½áβµÄÎļþÖÐ,ÎÒÃÇÔÚÕâÀï×Ô¼º¶¨Òå¿âÎļþ·¾¶ÒÔʹϵͳµ÷ÓÃʱ¿ÉÒÔÕÒµ½
vim /etc/ld.so.conf.d/mysql.conf дÈëÏÂÃæÓï¾ä
/usr/local/mysql/lib
ldconfig -v ÖØÐÂËÑË÷¿âÎļþ·¾¶ ÕâʱмÓÈëµÄmysql.conf²Å»áÉúЧ
»·¾³±äÁ¿£º
vim /etc/profile
½«/usr/local/mysql/binµÄ·¾¶Ìí¼Óµ½»·¾³±äÁ¿,ÎÒÃǾͿÉÒÔÖ±½ÓÖ´ÐÐmysql/binϵÄÃüÁîÁË
. /etc/profile Ï൱ÓÚsource /etc/profile ÖØÐÂÖ´ÐиÕÐ޸ĵÄÎļþ,ʹ֮Á¢¼´ÉúЧ
manÃüÁ
ʹmysqlµÄmanÃüÁî¿ÉÒÔÔÙLinuxÖÐʹÓãº
vim /etc/man.config Ìí¼ÓÏÂÃæÓï¾ä
MANPATH /usr/local/mysql/man
. /etc/man.config
µ½´ËΪֹ,ÎÒÃǵÄmysql¾ÍÅäÖÃÍê³ÉÁË,ÖÁÓÚmysqlµÄʹÓ÷½·¨,¿ÉÒԲμûÎÒµÄmysql²©ÎÄ
²¹³äС֪ʶ£º
sourceÃüÁîÒ²³ÆΪ“µãÃüÁî”,Ò²¾ÍÊÇÒ»¸öµã·ûºÅ£¨.£©.sourceÃüÁîͨ³£ÓÃÓÚÖØÐÂÖ´ÐиÕÐ޸ĵijõʼ»¯Îļþ,ʹ֮Á¢¼´ÉúЧ,¶ø²»±Ø×¢Ïú²¢ÖØеǼ.
************************************Èý¡¢°²×°php
1 tar jxvf php-5.3.5.tar.bz2
2 mv php-5.3.5 /usr/local
3 cd /usr/local/php5.3.5
4 ./configure --prefix=/usr/local/php5 --sysconfdir=/etc/php5 --enable-mbstring
--with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs
{
--prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs Ö¸¶¨ÈçºÎ½«php×ö³É¿ÉÒÔ¶¯Ì¬¼ÓÔصÄÄ£¿éÈÃ
ÏÂÃæÊÇÈÃApacheµ÷ÓõÄ
--with-mysql=/usr/local/mysql Ìí¼ÓmysqlºÍphpµÄÁ¬½ÓÄ£¿é
--with-mysqli=/usr/local/mysql/bin/mysql_config
--with-xml Ìí¼Ó´¦Àíxml¸ñʽµÄÍøÒ³ÎļþµÄ¹¦ÄÜ ÓÐpng jpeg zlib ѹËõ freetype ¸÷ÖÖͼÐÎÀàÐÍ gd ͼÐοâ
--enable-track-vars Ö§³Övars±äÁ¿
--enable-mbstring=all Ö§³Ö³¤×Ö·û´®
}
5 make
6 makeinstall
7 ln -sv /usr/local/php-5.3.5/incluse /usr/include/php
8 ÐÞ¸ÄapacheÒÔÖ§³Öphp
|
ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn
ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»!
|