LinuxÏÂjavaÏà¹ØÅäÖà tomcat mysql jdk
×î½üÓиöÏîÄ¿Òª²¿Êðµ½linuxÉÏ£¬ÔÚÍøÉϲéÁËЩ×ÊÁÏ£¬¼ÇϵãÓöµ½µÄÎÊÌ⣬ÒԱ㽫À´ÔÙÓá£
Ò»£ºjdk°²×°
1.ͨ¹ýchmod a+x jdk-1_5_x-rc-linux-i586-rpm.binÃüÁîʹÆä»ñµÃ¿ÉÖ´ÐÐȨÏÞ
2.ͨ¹ý rpm –ivh jdk-1_5_x-rc-linux-i586-rpm.binÀ´½øÐа²×°
3.°²×°Íê±Ï,JDK°²×°ÔÚ/usr/java/Ŀ¼ÏÂ
4.ÉèÖû·¾³±äÁ¿(дÈëvi/etc/profileÖÐ)
ÓÃi½øÈë²åÈëģʽ
export JAVA_HOME = /usr/java/jdk1.5
export PATH = $JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=.:/usr/java/jdk1.5/lib:/usr/java/jdk1.5/jre/lib:$CLASSPATH
escÍ˳ö£¬°´Ï´óдZZ ±£´æÍ˳ö£¡
java -version ·¢ÏÖûÓгɹ¦£¬ÓÚÊǼÓÈëÏÂÃæµÄ²½Ö裺
5.ҪʹJDKÔÚËùÓеÄÓû§ÖÐʹÓ㬿ÉÒÔÕâÑù£º
vi /etc/profile.d/java.sh
ÔÚеÄjava.shÖÐÊäÈëÒÔÏÂÄÚÈÝ£º
JAVA_HOME=/usr/java/jdk1.5.0
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:/lib/dt.jar
PATH=$JAVA_HOME/bin:$PATH
JAVA_OPTS="-server -Xmx768m -XX:MaxNewSize=512m -XX:MaxPermSize=700m"
CATALINA_OPTS="-server -Xmx768m -XX:MaxNewSize=512m -XX:MaxPermSize=700m"
export JAVA_HOME CLASSPATH PATH JAVA_OPTS CATALINA_OPTS
±£´æÍ˳ö£¬È»ºó¸øjava.sh·ÖÅäȨÏÞ£ºchmod 755 /etc/profile.d/java.sh
6.ÕâÒ»²½ºÜ¹Ø¼ü£¬À§ÈÅÁËÎÒÒ»Ì죬AS4ĬÈϵÄÊÇjdk1.4.2 £¬µ±ÎÒÃÇ°²×°ÉÏjdk1.5.0µÄʱºòÈç¹û²»×öеÄÁ´½ÓjdkµÄʹÓÃÊÇ»á³öÎÊÌâµÄ£¬¾ßÌå×ö·¨ÈçÏ£º
½øÈë /usr/bin/Ŀ¼
cd /usr/bin
ln -s -f /usr/java/jdk1.5/jre/bin/java
ln -s -f /usr/java/jdk1.5/bin/javac
rebootÖØÆðlinux»úÆ÷¡£
¶þ£ºtomcat°²×°
1. #tar -zxvf apache_tomcat_5.523.tar.gz
#mv apache_tomcat_5.52.3 tomcat
OK ½øÈëTOMCAT Ŀ¼ È»ºó½øÈë BIN Ŀ¼
ÔËÐÐ ./startup.sh
2. È»ºó¼òµ¥ÅäÖÃÒ»ÏÂTOMCAT µÄÓû§ºÍ½ÇÉ«
½øÈë µ±Ç°µÄĿ¼ ϵÄCONF
vi tomcat-users.xml
ÔÚ<tomcat-users>
¼ÓÈë
<user name="admin" password="admin" roles="admin" />
3.ÅäÖÃsever.xml
<Context path="" reloadable="true" docBase="D:\web\test"></Context>
4.¿ª»ú×ÔÆô¶¯
# vi /etc/rc.d/rc.local Ìí¼Ó:
export JAVA_HOME=/usr/java/jdk1.5
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar
/usr/apache_tomcat_5.52.3/bin/startup.sh
Èý£ºmysql°²×°
1.
Ïà¹ØÎĵµ£º
mysql set names ÎÊÌâ
mysql_query("set names 'utf8'");
Ò»Ö±ÒÔÀ´×ÜÒÔΪset names ÊÇÓÃÀ´ÉèÖÃmsyql µÄ×Ö·û¼¯µÄ£¬×î½ü×÷¸ö¶«Î÷²Å·¢ÏÖ×Ô¼ºÈÏʶÉϵĴíÎó£¬
²éÒ»ÏÂÊÖ²á
SET NAMES ‘x‘Óï¾äÓëÕâÈý¸öÓï¾äµÈ¼Û£º
mysql> SET character_set_client = x;
mysql> SET character_set_results = x;
mysql> ......
ÕâÊÇÒÔ¶ÁΪÖ÷µÄÏßÉÏ¿â
root@read 02:28:07>show status like ‘Handler_read%’;
+———————–+——-+
| Variable_name | Value |
+————&m ......
Õë¶Ôselect * from table where col1 > number order by col2 desc¡£
Æäʵ°´ÕÕ³£¹æµÄ·½·¨¿ÉÒÔÕâÑùÉè¼Æ£ºkey(col1, col2)
µ«ÊÇÕâÖÖ°ì·¨ÔÚmysqlÀï²»ËãÊÇÀíÏëµÄ£¬whereÌõ¼þÀïÏÞ¶¨Ë÷ÒýÇ°²¿·ÖÊÇÒ»¸ö·¶Î§µÄÇé¿öϺóÃæµÄorder by»¹ÊÇ»áÓÐfilesort¡£Èç¹ûwhereÌõ¼þÀïÏÞ¶¨Ë÷ÒýÇ°²¿·ÖÊÇÒ»¸ö³£Á¿£¬ÄÇôorder by¾Í»áÓÐЧÀûÓÃË÷Òý¡£À ......
Àý×Ó£º½«cdb_pms±ísubject×Ö¶ÎÖеÄWelcom toÌæ»»³É »¶Ó¹âÁÙ
UPDATE `cdb_pms`
SET `subject` = REPLACE(`subject`, ¡®Welcome to¡¯, ¡®»¶Ó¹âÁÙ¡¯)
WHERE INSTR(`subject`,¡¯Welcome to¡¯) < 0 Ìæ»»cdb_posts±íµÄmessage×ֶΣ¬½«¡°viewthread.php?tid=3989¡±Ìæ»»³É¡°viewthread.php?tid=16546¡± U ......
LinuxÏÂCHM²é¿´¹¤¾ß»ã×Ü
http://www.ossw.com.cn/bbs/bencandy.php?id=2252&l_page=1
1. chmsee
homepage: http://211.92.88.40/~zhong/
requires: gtkhtml, libgnomevfs
......