Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÏ php5 MySQL5 Apache2 °²×°ÓëÅäÖÃ


mkdir /downloads
chown -R root:root /downloads
chmod -R 774 /downloads
Ò»¡¢°²×°Apache2
    ÏÂÔصØÖ·£ºhttp://www.apache.org/ --> HTTP Server --> from a mirror
    1. »ñÈ¡mysqlÔ´Âë
        shell> cd /downloads
        shell> wget http://apache.etoak.com/httpd/httpd-2.2.11.tar.gz
    2. Ïë½âѹËõ°ü£¬½øÈë¸ÃĿ¼    
        shell> tar zxvf httpd-2.2.11.tar.gz
        shell> cd httpd-2.2.11/
    3. ±àÒë°²×°£¬×Ô¶¨Ò尲װĿ¼¡£    
        shell> ./configure --prefix=/usr/local/apache --enable-so --enable-rewrite  ##×¢£ºapache 1.3.* Óëapache 2.*.* ²»Í¬ ¿ÉÒÔÓÃ./configure --help²é¿´
        shell> make && make install
    4. Æô¶¯Apache2¡£
        shell> /usr/local/apache/bin/apachectl start
¶þ¡¢°²×°MySQL5
    ÏÂÔصØÖ·£ºhttp://www.mysql.com/ --> downloads --> MySQL Community Server
    1. Ìí¼ÓmysqlÓû§ºÍÓû§×飺
        shell> groupadd mysql
        shell> useradd -g mysql mysql
    2. »ñÈ¡mysqlÔ´Âë
        shell> cd /downloads 
        shell> wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.36.tar.gz/from/http://mysql.stu.edu.tw/ 
    3. Ïë½âѹËõ°ü£¬½øÈë¸ÃĿ¼
        shell> tar zxvf mysql-5.1.36.tar.gz 
        shell> cd mysql-5.1.36/
    4. ±àÒë°²×°£¬×Ô¶¨Ò尲װĿ¼¡£
        shell> ./configure --prefix=/usr/local/mysql  ##–with-charset=utf8 –with-collation=utf8_general_ci –with-extra-charsets=utf8
     &nbs


Ïà¹ØÎĵµ£º

ubuntu Ï ´î½¨ apache+php+mysql


#apt-get install apache2
//°²×°apahce2
#apt-get install php5
//°²×°php5
#apt-get install mysql-server
//°²×°mysql·þÎñ¶Ë
#apt-get install  mysql-myclient
//°²×°mysqlµÄ¿Í»§¶Ë
#apt-get install php-mysql
//°²×°php-mysqlµÄÁ¬½á
apache+php+mysql »·¾³ÒѾ­´î½¨ºÃÁË
½«ÒÔϵķþÎñÖØÆôÒ»ÏÂ
#/et ......

×î¿ìµÄMySqlÊý¾Ý¿â±¸·Ý·½·¨

ʹÓÃMYSQL½øÐÐÊý¾Ý¿â±¸·Ý£¬ÓÖºÜÕý¹æµÄÊý¾Ý¿â±¸·Ý·½·¨£¬Í¬ÆäËûµÄÊý¾Ý¿â·þÎñÆ÷ÓÐÏàͬµÄ¸ÅÄµ«ÓÐûÓÐÏë¹ý£¬MySQL»áÓиü¼ò½ÝµÄʹÓÃÎļþĿ¼µÄ±¸·Ý·½·¨£¬¶øÇÒÓÖ¿ìÓкá£
¡¡¡¡Ò»¡¢Êý¾Ý±¸·Ý½Ý¾¶
¡¡¡¡ÒòΪÕâ¸ö·½·¨Ã»Óеõ½¹Ù·½ÕýʽÎĵµµÄÑéÖ¤£¬ÎÒÃÇÔݳÆΪÊÔÑé°É¡£
¡¡¡¡Ä¿µÄ£º±¸·ÝhostAÖ÷»úÖÐÒ»¸ömysqlÊý¾Ý¿âTestA£¬²¢»Ö¸´µ½µ½h ......

mysql±íµÄ¸´ÖÆ

1.¸´ÖƱí½á¹¹¼°Êý¾Ýµ½Ð±í
CREATE TABLE бí SELECT * from ¾É±í
2.Ö»¸´ÖƱí½á¹¹µ½Ð±í
CREATE TABLE бí SELECT * from ¾É±í WHERE 1=2
»òCREATE TABLE ÐÂ±í  LIKE ¾É±í
3.¸´ÖƾɱíµÄÊý¾Ýµ½Ð±í(¼ÙÉèÁ½¸ö±í½á¹¹Ò»Ñù)
INSERT INTO бí SELECT * from ¾É±í
4.¸´ÖƾɱíµÄÊý¾Ýµ½Ð±í(¼ÙÉèÁ½¸ö±í½á¹¹²»Ò»Ñù)
IN ......

MySQLÐÞ¸ÄrootÃÜÂëµÄ¸÷ÖÖ·½·¨ÕûÀí


ÕûÀíÁËÒÔÏÂËÄÖÖÔÚMySQLÖÐÐÞ¸ÄrootÃÜÂëµÄ·½·¨,¿ÉÄܶԴó¼ÒÓÐËù°ïÖú
·½·¨1£º ÓÃSET PASSWORDÃüÁî
¡¡¡¡mysql -u root
¡¡¡¡mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
·½·¨2£ºÓÃmysqladmin
¡¡¡¡mysqladmin -u root password "newpass"
¡¡¡¡Èç¹ûrootÒѾ­ÉèÖùýÃÜÂ룬²ÉÓÃÈçÏ·½·¨
¡¡¡¡mysql ......

mysqlÈÕÆÚºÍʱ¼ä¸ñʽת»»

¶ÔÓÚÿ¸öÀàÐÍÓµÓеÄÖµ·¶Î§ÒÔ¼°²¢ÇÒÖ¸¶¨ÈÕÆÚºÎʱ¼äÖµµÄÓÐЧ¸ñʽµÄÃèÊö¼û7.3.6 ÈÕÆÚºÍʱ¼äÀàÐÍ¡£
ÕâÀïÊÇÒ»¸öʹÓÃÈÕÆÚº¯ÊýµÄÀý×Ó¡£ÏÂÃæµÄ²éѯѡÔñÁËËùÓмǼ£¬Æädate_colµÄÖµÊÇÔÚ×îºó30ÌìÒÔÄÚ£º
mysql> SELECT something from table
WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) <= 30;
DAYOFWEEK(date)
·µ»ØÈÕÆ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ