µ±Ç°Î»ÖãºLinux½Ì³Ì - Linux×ÊѶ - ÖÐСÆóÒµ·þÎñÆ÷ÅäÖ÷½°¸ µÚÈýÕÂ(4)

ÖÐСÆóÒµ·þÎñÆ÷ÅäÖ÷½°¸ µÚÈýÕÂ(4)

¡¡¡¡µÚÈýÕ Web·þÎñÆ÷ µÚËÄ½Ú LinuxÏÂApache¡¢PHP3¡¢mysqlµÄÕûºÏ Ò»¡¢ËùÐèµÄ°²×°°ü ¡¡¡¡ apache_1.3.19.tar.gz ¡¡¡¡ php-4.0.4.tar.gz ¡¡¡¡ mysql-3.23.32.tar.gz ¡¡¡¡ ×¢Ò⣺ÒÔÉϾùΪԴ´úÂë¶ø·ÇRPM°ü ¶þ¡¢Èí¼þ°²×° °²×°MySQL ½â¿ªÑ¹Ëõ°ü cd /usr/local ¡¡ tar -zvxf mysql-3.23.32.tar.gz ½«²úÉúmysql-3.23.32Ŀ¼ÒƵ½/usr/local/mysql mv mysql-3.23.32 /usr/local/mysql ±àÒëMySQL cd /usr/local/mysql ./configure --prefix=/usr/local/mysql make make install °²×°Êý¾Ý¿âÎļþ /usr/local/mysql/scripts/mysql_install_db /usr/local/mysql/bin/safe_mysqld & MySQLÊÚȨ²Ù×÷ MySQLµÄ´æÈ¡¿ØÖƼ¼Êõ¹¦ÄÜÇ¿´ó£¬±ÈPostgres¸ü¼Ó¾ßÓÐÁé»îÐÔ¡£MySQL²ÉÓõÄÓû§ÃûºÍÃÜÂëµÄ¼ÓÃÜËã·¨ÓëUnixϵͳ²»¾¡Ïàͬ£¬ÆäÓû§Ãû¿ÉÒÔ³¤´ï16¸ö×Ö·û¡£ ÏÈÒÔrootµÇ½MySQl£¬È»ºóÔÚMySQLµÄÌáʾ·ûϼüÈëgrant all privileges on *.* to thj@localhost identified by 'thj' with grant option; ÕâÑù£¬ÎÞÂÛÓû§thj´ÓʲôµØ·½µÇ½µ½Õą̂·þÎñÆ÷¶¼¿ÉÒÔʹÓÃMySQL¡£ MySQLÊý¾Ý¿â¼òµ¥²Ù×÷Óï¾ä ´´½¨Êý¾Ý¿â ¡¡¡¡¡¡ ÃüÁcreate database Êý¾Ý¿âÃû£» ɾ³ýÊý¾Ý¿â ¡¡¡¡¡¡ ÃüÁdrop database Êý¾Ý¿âÃû£» ²éѯMySQLÖж¼ÓÐʲôÊý¾Ý¿â ¡¡¡¡¡¡ ÃüÁshow databases; ¸ü¸Äµ±Ç°Ê¹ÓõÄÊý¾Ý¿â ¡¡¡¡¡¡ ÃüÁuse tbl_name ´´½¨Êý¾Ý±í ¡¡¡¡¡¡ ÃüÁcreate table tbl_name ( column_specs ); ¡¡¡¡¡¡ ˵Ã÷£ºtbl_name Êý¾Ý±íÃû column_specs ±íÖÐÁеÄ˵Ã÷ ²éѯָ¶¨µÄÊý¾Ý±íµÄ½á¹¹ ¡¡¡¡¡¡ ÃüÁdescribe tbl_name; ²éѯÊý¾Ý¿âÖж¼ÓÐʲôÊý¾Ý±í ¡¡¡¡¡¡ ÃüÁshow tables; Ôö¼ÓмǼ ¡¡¡¡¡¡ ÃüÁinsert into tbl_name (col_name1,col_name2,¡­) values£¨values1£¬values2,¡­.£© ¡¡¡¡¡¡ ˵Ã÷£ºinsertÓï¾ä¼òµ¥Ò×Ó㬵«ÊÇËüÒ²ÓÐÒ»¸öȱÏÝ£¬¾ÍÊÇÿ´ÎÖ»ÄܲåÈëÒ»Ìõ¼Ç¼¡£ ÅúÁ¿×°ÔØÊý¾Ý ¡¡¡¡¡¡ ÃüÁload data local infile "filename.txt" into table tbl_name; ¡¡¡¡¡¡ ˵Ã÷£ºMySQlµÄ°æ±¾²»µÃµÍÓÚ3.22.15£¬·ñÔòload data local²»Æð×÷Ó᣸ÃÓï¾äʵ¼ÊÉÏÊǵ÷ÓÃÁË/usr/bin/mysqlimport¡£ ¼ìË÷ÐÅÏ¢ ¡¡¡¡¡¡ ÃüÁselect ҪѡÔñµÄ¶«Î÷ from Ò»¸ö»ò¶à¸ö±í where Êý¾Ý±ØÐëÂú×ãµÄÌõ¼þ ×¢£ºÔÚMySQLÖУ¬Ã¿¼üÈëÒ»ÌõÃüÁîÖ®ºó£¬ÔÚÃüÁîÐеĽáβ¶¼ÒªÇÃÈë"£»"£¬±êÖ¾ÊÇÒ»ÌõÃüÁ»òÕßÇûسµÖ®ºóÔÙÇÃgo£¬ÌáʾϵͳִÐÐÉϱߵÄÃüÁÁíÍ⣬ÔÚ¶àÊý¹ØÓÚMySQLµÄ²Î¿¼ÊéÖУ¬ÃüÁΪ´óд£¬Êµ¼ÊÉÏСдҲ¿ÉÒÔ£»»¹ÓУ¬useÓï¾ä¿ÉÒÔ²»¼Ó"£»"£¬ÕâÊÇËùÓÐMySQLÓïÑÔÖÐΨһһ¸ö²»ÐèÒª¼Ó"£»"¾Í¿ÉÒÔÖ´ÐеÄÓï¾ä¡£ ×¢£ºMySQLµÄ°²×°µ½´Ë½áÊø Apache¡¢PHP3µÄ»ìºÏ±àÒë ½â¿ªÑ¹Ëõ°ü ¡¡¡¡ cd /usr/local tar xvzf apache_1.3.19.tar.gz tar xvzf php-4.0.4.tar.gz mv apache_1.3.19.tar.gz apache mv php-4.0.4.tar.gz php °ÑApacheµÄ°²×°Ä¿Â¼¶¨Îª/usr/local/apache
[1] [2] ÏÂÒ»Ò³ 

cd apache ./configure --prefix=/usr/local/apache --with-port=8000 ÅäÖÃÖ§³ÖMySQL¡¢×÷ΪApache¹¦ÄÜÄ£¿é¡¢¸ú×Ù±äÁ¿ÓÐЧ cd ../php ./configure --with-mysql=/usr/local/mysql --with- apache=../apache --enable-track-vars -with-pgsql=/usr/lib/pgsql --prefix=/usr/local/apache/php -with-config-file-path=/usr/local/apache/php ¡¡¡¡ make make install ×¢£ºPHPµÄ°²×°µ½´Ë½áÊø ÅäÖÃApache£¬¼ÓÈëPHP4µÄÄ£¿é cd ../apache cp /usr/local/php/libs/libphp4.a \ /usr/local/apache/src/modules/php4 ./configure --prefix=/usr/local/apache --activate- module=src/modules/php4/libphp4.a --with-port=8000 make make install ×¢£ºAPACHE°²×°Íê±Ï ¸ü¸ÄÅäÖà °Ñphp.iniÎļþ¿½µ½/usr/local/apache/phpĿ¼ÏÂ. cd ../php cp php.ini-dist /usr/local/apache/php/php4.ini ¸ü¸ÄApacheµÄÅäÖÃÎļþ cd /usr/local/apache/conf vi httpd.conf ÕÒµ½ AddType application/x-httpd-php .php4 °ÑËüÇ°Í·µÄ#ºÅ¸øɾÁ˵±È»Ò²¿É¼ÓÒ»ÐÐ AddType application/x-httpd-php3.ASP ÕâÑùÓÃFrontPage±à¼­»á·½±ãÒ»µã¡£ ×îºóÔËÐÐ/usr/local/apache/bin/apachectl startÆô¶¯apache½ø³Ì

£¨³ö´¦£ºhttp://www.sheup.com£©


ÉÏÒ»Ò³ [1] [2]