Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : linux

ºìÆìlinux7Ï°²×°postgresql8.4.1£¨Ô´Â룩

1¡£ÏÂÔØpostgresql8.4.1Ô´Âë°ü
     ÏÂÔصØÖ·£ºhttp://www.postgresql.org/ftp/source/
2¡£½âѹԴÂë°ü
3¡£±àÒë°²×°
ÃüÁîÈçÏ£º
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
¿ÉÄܳöÏֵĴíÎó£º
1¡£configure: error: readline library not found
 readine library ÏÂÔصØÖ·£ºhttp://tiswww.case.edu/php/chet/readline/rltop.html
°²×° Readline

×¼±¸±àÒë Readline £º

./configure --prefix=/usr --libdir=/lib
±àÒëÈí¼þ°ü£º
make SHLIB_XLDFLAGS=-lncurses
make Ñ¡ÏîµÄº¬Ò壺


SHLIB_XLDFLAGS=-lncurses

Õâ¸öÑ¡ÏîÇ¿ÖÆ Readline Á´½Óµ½ libncurses

¿â¡£


°²×°Èí¼þ°ü£º
make install
¸ø Readline ¶ ......

LinuxϵÄsvnÃüÁî

LinuxϵÄsvnÃüÁî svnÔÚlinuxϵÄʹÓã¨svnÃüÁ
1¡¢½«Îļþcheckoutµ½±¾µØĿ¼
svn checkout path£¨pathÊÇ·þÎñÆ÷ÉϵÄĿ¼£©
ÀýÈ磺svn checkout svn://192.168.1.1/pro/domain
¼òд£ºsvn co
2¡¢Íù°æ±¾¿âÖÐÌí¼ÓеÄÎļþ
  svn add file
ÀýÈ磺svn add test.php(Ìí¼Ótest.php)
svn add *.php(Ìí¼Óµ±Ç°Ä¿Â¼ÏÂËùÓеÄphpÎļþ)
3¡¢½«¸Ä¶¯µÄÎļþÌá½»µ½°æ±¾¿â
  svn commit -m “LogMessage“ [-N] [–no-unlock] PATH(Èç¹ûÑ¡ÔñÁ˱£³ÖËø£¬¾ÍʹÓÖno-unlock¿ª¹Ø)
ÀýÈ磺svn commit -m “add test file for my test“ test.php
¼òд£ºsvn ci
4¡¢¼ÓËø/½âËø
  svn lock -m “LockMessage“ [–force] PATH
ÀýÈ磺svn lock -m “lock test file“ test.php
svn unlock PATH
5¡¢¸üе½Ä³¸ö°æ±¾
  svn update -r m path
ÀýÈ磺
svn updateÈç¹ûºóÃæûÓÐĿ¼£¬Ä¬ÈϽ«µ±Ç°Ä¿Â¼ÒÔ¼°×ÓĿ¼ÏµÄËùÓÐÎļþ¶¼¸üе½×îа汾¡£
svn update -r 200 test.php(½«°æ±¾¿âÖеÄÎļþtest.php»¹Ô­µ½°æ±¾200)
svn update test.php(¸üУ¬ÓÚ°æ±¾¿âͬ²½¡£Èç¹ûÔÚÌá½»µÄʱºòÌáʾ¹ýÆڵĻ°£¬ÊÇÒòΪ³åÍ»£¬ÐèÒªÏÈupd ......

linux java/jsp »ñȡϵͳµ±Ç°Ê±¼äÎÊÌâ

JSPÔ´´úÂë
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
   TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8"); 
    TimeZone.setDefault(tz);
    java.util.Date date = new java.util.Date();//»ñµÃϵͳʱ¼ä.
          String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);//½«Ê±¼ä¸ñʽת»»³É·ûºÏTimestampÒªÇóµÄ¸ñʽ.
          //Timestamp goodsC_date = Timestamp.valueOf(nowTime);//°Ñʱ¼äת»»
   %>
ÔÚwindowsÏÂÔËÐпÉÒÔ
µ«ÍøÒ³´«µ½linux:CentOS5.3ϳöÎÊÌâ
²î°ËСʱ£¬ºóÀ´²é×ÊÁÏ£¬
¸ÄÓÃÒÔÏ´úÂ룺
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime()); 
   //TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8");& ......

linux java/jsp »ñȡϵͳµ±Ç°Ê±¼äÎÊÌâ

JSPÔ´´úÂë
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
   TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8"); 
    TimeZone.setDefault(tz);
    java.util.Date date = new java.util.Date();//»ñµÃϵͳʱ¼ä.
          String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);//½«Ê±¼ä¸ñʽת»»³É·ûºÏTimestampÒªÇóµÄ¸ñʽ.
          //Timestamp goodsC_date = Timestamp.valueOf(nowTime);//°Ñʱ¼äת»»
   %>
ÔÚwindowsÏÂÔËÐпÉÒÔ
µ«ÍøÒ³´«µ½linux:CentOS5.3ϳöÎÊÌâ
²î°ËСʱ£¬ºóÀ´²é×ÊÁÏ£¬
¸ÄÓÃÒÔÏ´úÂ룺
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime()); 
   //TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8");& ......

linux java/jsp »ñȡϵͳµ±Ç°Ê±¼äÎÊÌâ

JSPÔ´´úÂë
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
   TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8"); 
    TimeZone.setDefault(tz);
    java.util.Date date = new java.util.Date();//»ñµÃϵͳʱ¼ä.
          String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);//½«Ê±¼ä¸ñʽת»»³É·ûºÏTimestampÒªÇóµÄ¸ñʽ.
          //Timestamp goodsC_date = Timestamp.valueOf(nowTime);//°Ñʱ¼äת»»
   %>
ÔÚwindowsÏÂÔËÐпÉÒÔ
µ«ÍøÒ³´«µ½linux:CentOS5.3ϳöÎÊÌâ
²î°ËСʱ£¬ºóÀ´²é×ÊÁÏ£¬
¸ÄÓÃÒÔÏ´úÂ룺
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime()); 
   //TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8");& ......

linux²Ù×÷ϵͳ°²×°python3

Ê×ÏÈÊÇÏÂÔØpython3£¬ÏÖÔÚµÄ×î¸ß°æ±¾ÊÇ3.1.1
for linux¡£
ÎҵķÅÖ÷¾¶ÊÇ/home/pythonÏ·ÅÖÃPython-3.1.1.tgz,Ö´ÐÐÒÔÏÂϵÁвÙ×÷£º
1.½âѹ£ºtar zxvf Python-3.1.1.tgz----Éú³É½âѹ°üPython-3.1.1
2.ת»»µ½Python-3.1.1·¾¶Ï£¬Ö´ÐÐ./configure
3.make
4.make install
ÔÚrehl5ÖÐÒѾ­Ä¬ÈÏ°²×°ÁËpython2.4,ËùÒÔÒª×öÈçϲÙ×÷£º
#cd /usr/bin
#ll |grep python   //²é¿´¸ÃĿ¼ÏÂpython
#rm -rf python
#ln -s PREFIX/
Python-3.1.1/python ./python  //PREFIXΪÄã½âѹpythonµÄĿ¼
#python
¼ì²â¸ÄÕýÖ®ºóµÄpython°æ±¾ ......

linux²Ù×÷ϵͳ°²×°python3

Ê×ÏÈÊÇÏÂÔØpython3£¬ÏÖÔÚµÄ×î¸ß°æ±¾ÊÇ3.1.1
for linux¡£
ÎҵķÅÖ÷¾¶ÊÇ/home/pythonÏ·ÅÖÃPython-3.1.1.tgz,Ö´ÐÐÒÔÏÂϵÁвÙ×÷£º
1.½âѹ£ºtar zxvf Python-3.1.1.tgz----Éú³É½âѹ°üPython-3.1.1
2.ת»»µ½Python-3.1.1·¾¶Ï£¬Ö´ÐÐ./configure
3.make
4.make install
ÔÚrehl5ÖÐÒѾ­Ä¬ÈÏ°²×°ÁËpython2.4,ËùÒÔÒª×öÈçϲÙ×÷£º
#cd /usr/bin
#ll |grep python   //²é¿´¸ÃĿ¼ÏÂpython
#rm -rf python
#ln -s PREFIX/
Python-3.1.1/python ./python  //PREFIXΪÄã½âѹpythonµÄĿ¼
#python
¼ì²â¸ÄÕýÖ®ºóµÄpython°æ±¾ ......

linux shell pid

¼ÙÉèÊÇÆô¶¯Ò»¸ö rails ³ÌÐò£º
ruby script/server
ͨ³£»áÕâÑù£º
nohup ruby script/server &
°Ñ´íÎóÊä³öÁ÷Ò²¶¨Ïòµ½Õý³£Êä³öÁ÷ÖУº
nohup ruby script/server & 2 > 1 &
Òª¼Ç¼Ï pid £º
nohup ruby script/server & 2 > 1 & echo $! > tmp/pid &
¾­¹ý·´¸´µ÷ÊÔ£¬ÉÏÃæµÄÓï¾äËƺõ²»Í×£¬¼ÇÏ嵀 pid ×ܱÈʵ¼ÊµÄ pid ´ó 1£¬ÓÚÊǸÄΪ£º
nohup ruby script/server & echo $! > tmp/pid & 2 > 1 &
ÕâÑù¾ÍºÃÁË
ÉÏÊöµÄÎÊÌâÓ빫˾ÄÚ C++ ×éÀïµÄͬÊÂÈ·ÈϹý£¬µ«ËûÃÇÒ»ÖÂÈÏΪÌí¼Ó 2 > 1 ²»»á¸ü¸Ä½ø³ÌºÅ£¬ÓëÎÒµÄʵ¼Ê²âÊÔ²»·û¡£
kill $(cat tmp/pid)
ÉÏÃæµÄ nohup »áÊä³öÖÁµ±Ç°Ä¿Â¼Ï嵀 nohup.out Îļþ£¬¸ÄµôÒ²¿É£º
nohup ruby script/server >/dev/null & echo $! > tmp/pid & 2 > 1 & ......

linux ϵͳÏÂʹÓÃC³ÌÐòʵÏÖʱÖӵĺ¯Êý

#include "stdio.h"
#include "math.h"
#include "time.h"
#define INTERVAL 1  ¶¨ÒåºêµÄʱ¼ä¼ä¸ôΪ1Ãë
//
void On_Time()  //ÿһÃ뼤·¢µÄʼþ
{
   printf("now=%s\n","JJK"); 
}
void Timer()  //ʱÖӵĺ¯Êý
{  time_t newclk,oldclk;
   while(1)
   {
     time(&newclk);
     if(abs(difftime(newclk,oldclk))>=INTERVAL)
     {
       On_Time();
     }
     oldclk=newclk;
   }
}
int main()  //Ö÷º¯Êý
{
  Timer();
} ......

linux ϵͳÏÂʹÓÃC³ÌÐòʵÏÖʱÖӵĺ¯Êý

#include "stdio.h"
#include "math.h"
#include "time.h"
#define INTERVAL 1  ¶¨ÒåºêµÄʱ¼ä¼ä¸ôΪ1Ãë
//
void On_Time()  //ÿһÃ뼤·¢µÄʼþ
{
   printf("now=%s\n","JJK"); 
}
void Timer()  //ʱÖӵĺ¯Êý
{  time_t newclk,oldclk;
   while(1)
   {
     time(&newclk);
     if(abs(difftime(newclk,oldclk))>=INTERVAL)
     {
       On_Time();
     }
     oldclk=newclk;
   }
}
int main()  //Ö÷º¯Êý
{
  Timer();
} ......
×ܼǼÊý:5772; ×ÜÒ³Êý:962; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [947] [948] [949] [950] 951 [952] [953] [954] [955] [956]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ