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ÃüÁî 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 ......
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");& ......
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");& ......
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");& ......
Ê×ÏÈÊÇÏÂÔØ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°æ±¾ ......
Ê×ÏÈÊÇÏÂÔØ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°æ±¾ ......
¼ÙÉèÊÇÆô¶¯Ò»¸ö 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 & ......
#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();
} ......
#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();
} ......