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

Ubuntu 8.04 vsftpd mysql pamµÄftp·þÎñÆ÷¶ËÎÞ´íÅäÖÃ

ÅäÖû·¾³:UUbuntu 8.04
1.°²×°vsftpd
sudo apt-get install vsftpd
2.´´½¨guestÓû§
vsftpd°²×°µÄʱºò»á×Ô¶¯°²×ªÒ»¸öftpÓû§£¬ÔÚpasswdÖÐɾ³ý
sudo useradd virtual
ÉèÖÃvirtualµÄÃÜÂëΪwebftp
sudo passwd virtual
±à¼­virtualÓû§µÄÖ÷Ŀ¼²¢ÉèÖÃshell
sudo vim /etc/passwd
ÎÒÉèÖõÄÊÇvirtual:x:1001:1001::/var/www:/bin/false
/var/www virtualµÄÖ÷Ŀ¼
/bin/false ½ûÖ¹virtualÓû§Öն˵ǽ
3.ÉèÖÃmysqlÊý¾Ý¿âºÍÓû§È¨ÏÞ
ÔÚphpmyadminÖн¨Á¢vsftpÊý¾Ý¿â vsftpÓû§
½¨Á¢Óû§±í
create table users(name char(16) binary,passwd char(16) binary);
²¢ÊÚȨvistualÓû§users±íµÄselectȨÏÞ£¬²¢ÉèÖÃÃÜÂë¡£
4.ÉèÖÃMySQLµÄPAMÑéÖ¤
°²×°libpam-mysql
sudo apt-get install libpam-mysql
ÒªÉèÖÃvsftpdµÄPAMÑéÖ¤Îļþ
sudo cp /usr/share/doc/vsftpd/EXAMPLE/VIRTUAL_USERS/vsftpd.pam /etc/pam.d/vsftpd
°ÑÄÚÈÝÌ滻ΪÈçÏ£º
auth required/lib/security/pam_mysql.so user=virtual passwd=webftp host=localhostdb=vsftp table=users usercolumn=name passwdcolumn=passwd crypt=2
account required/lib/security/pam_mysql.so user=virtual passwd=webftp host=localhostdb=vsftp table=users usercolumn=name passwdcolumn=passwd crypt=2
5.ÉèÖÃvsftpd.conf
guest_enable=YES
guest_username=virtual
ÕâÁ½Ïî±ØÐë´ò¿ª£¬ÆäËûÅäÖÃÇë²éÔÄvsftpd.confµÄÅäÖÃÊÖ²á
6.ÐéÄâÓû§Ä¿Â¼µÄȨÏÞ¸ÄΪֻÄÜÓÉvirtual²Ù×÷£º
sudo chown virtual.virtual /var/www
sudo chmod 755 /var/www
virtual»ñµÃwwwÎļþ¼ÐµÄȨÏÞ£¬²¢ÉèÖÃwwwÎļþ¼ÐȨÏÞΪ755
ÖÁ´Ë£¬×î»ù±¾µÄÐéÄâÓû§ÒѾ­Íê³É¡£
sudo /etc/init.d/vsftpd restart
ÖØÆôvsftpd·þÎñºó¼´¿ÉÒÔÓÃusers±íÖÐÉèÖõÄÓû§ÃûÃÜÂë½øÐÐwwwÎļþ¼ÐµÄ·ÃÎÊÁË¡£


Ïà¹ØÎĵµ£º

MySql³£ÓÃÃüÁî

MySQL³£ÓòÙ×÷»ù±¾²Ù×÷£¬ÒÔ϶¼ÊÇMySQL5.0ϲâÊÔͨ¹ýÊ×ÏÈ˵Ã÷Ï£¬¼ÇסÔÚÿ¸öÃüÁî½áÊøʱ¼ÓÉÏ£»£¨·ÖºÅ£©
1.µ¼³öÕû¸öÊý¾Ý¿â
mysqldump -u Óû§Ãû -p --default-character-set=latin1 Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû(Êý¾Ý¿âĬÈϱàÂëÊÇlatin1)
mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql
2.µ¼³öÒ»¸ö±í
mysqldump -u Ó ......

ÕÒµ½MySQLµÄÓŵã

¼ÙÉèÄãÊÇÒ»¸öAccess¿ª·¢ÈËÔ±£¬¶øÄãÏëÒÆÖ²Ò»¸öAccessºǫ́µ½Ò»¸ö±¾µØµÄMySQL ·þÎñÆ÷ÓÃÓÚ¿ª·¢ºÍ²âÊÔ¡£Ä㽫ά»¤Äã×Ô¼ºµÄ½â¾ö·½°¸²¢ÀÖÓÚʹÓÃCommunity Server
¡¡¡¡µÚÒ»²½——°²×°MySQL
¡¡¡¡µ½http://dev.mysql.com/downloads/ ÏÂÔØÕâ¸ö·þÎñÆ÷¡¢MySQL GUI¹¤¾ßºÍMySQL ODBCÇý¶¯¡£Äã¿ÉÒÔÑ¡ÔñµÄ·þÎñÆ÷ÓУº5.0, 5.1»ò6.0 ......

Mysql innodb Îóɾ³ýÊý¾Ý¿âÊÇ·ñ¿É»Ö¸´

¿ÉÒÔ£¬µ«ÊÇÍêÈ«»Ö¸´ËùÓÐµÄ±í²»Ò»¶¨¿ÉÒÔ
¹¤¾ß: innodb-recovery
Official Website: http://code.google.com/p/innodb-tools/
This set of tools could be used to check InnoDB
tablespaces and to recover data from damaged tablespaces or from
dropped/truncated InnoDB tables.
Õâ¸ö¹¤¾ßÓÃÀ´¼ì²éInnoDB¿Õ¼ä±íºÍ» ......

mysqlʹÓÃrandËæ»ú²éѯ¼Ç¼ЧÂʲâÊÔ

Ò»Ö±ÒÔΪmysqlËæ»ú²éѯ¼¸ÌõÊý¾Ý£¬¾ÍÓÃ
SELECT * from `table` ORDER BY RAND() LIMIT 5
¾Í¿ÉÒÔÁË¡£
µ«ÊÇÕæÕý²âÊÔһϲŷ¢ÏÖÕâÑùЧÂʷdz£µÍ¡£Ò»¸ö15ÍòÓàÌõµÄ¿â£¬²éѯ5ÌõÊý¾Ý£¬¾ÓȻҪ8ÃëÒÔÉÏ
²é¿´¹Ù·½ÊֲᣬҲ˵rand()·ÅÔÚORDER BY ×Ó¾äÖлᱻִÐжà´Î£¬×ÔȻЧÂʼ°ºÜµÍ¡£
You cannot use a column with RAND() values i ......

ͨ¹ýrpm°ü°²×°¡¢ÅäÖü°Ð¶ÔØmysqlµÄÏêϸ¹ý³Ì


¡¡¡¡ÒÔMySQL-server-4.0.14-0.i386.rpmΪÀý£¬·ÅÔÚ/dataĿ¼Ï 
¡¡¡¡cd /data 
¡¡¡¡rpm -ivh MySQL-server-4.0.14-0.i386.rpm 
¡¡¡¡°²×°Íê³ÉºóÔÚ/usr/share/mysqlĿ¼ÖлáÓÐÒ»¸ömysqlµÄÆô¶¯½Å±¾mysql.server¼°Ê¾ÀýÅäÖÃÎļþµÈ(Èçmy-huge.cnf¡¢my-large.cnf¡¢my-medium.cnf) 
¡¡¡¡¿½±´Ò»¸öʾÀýÅäÖÃÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ