linuxÖÐpty,pts,tty½âÊÍ
LinuxÖÐtty¡¢pty¡¢ptsµÄ¸ÅÄîÇø±ð
»ù±¾¸ÅÄ
1> tty(ÖÕ¶ËÉ豸µÄͳ³Æ):
ttyÒ»´ÊÔ´ÓÚTeletypes£¬»òÕßteletypewriters£¬ÔÀ´Ö¸µÄÊǵ紫´ò×Ö»ú£¬ÊÇͨ¹ý´®ÐÐÏßÓôòÓ¡»ú¼üÅÌͨ¹ýÔĶÁºÍ·¢ËÍÐÅÏ¢µÄ¶«Î÷£¬ºóÀ´ÕⶫÎ÷±»¼üÅÌÓëÏÔʾÆ÷È¡´ú£¬ËùÒÔÏÖÔÚ½ÐÖն˱ȽϺÏÊÊ¡£
ÖÕ¶ËÊÇÒ»ÖÖ×Ö·ûÐÍÉ豸£¬ËüÓжàÖÖÀàÐÍ£¬Í¨³£Ê¹ÓÃttyÀ´¼ò³Æ¸÷ÖÖÀàÐ͵ÄÖÕ¶ËÉ豸¡£
2> pty£¨ÐéÄâÖÕ¶Ë):
µ«ÊÇÈç¹ûÎÒÃÇÔ¶³Ìtelnetµ½Ö÷»ú»òʹÓÃxtermʱ²»Ò²ÐèÒªÒ»¸öÖն˽»»¥Ã´£¿Êǵģ¬Õâ¾ÍÊÇÐéÄâÖÕ¶Ëpty(pseudo-tty)
3> pts/ptmx(pts/ptmx½áºÏʹÓ㬽ø¶øʵÏÖpty):
pts(pseudo-terminal slave)ÊÇptyµÄʵÏÖ·½·¨£¬Óëptmx(pseudo-terminal master)ÅäºÏʹÓÃʵÏÖpty¡£
LinuxÖնˣº
ÔÚLinuxϵͳµÄÉ豸ÌØÊâÎļþĿ¼/dev/Ï£¬ÖÕ¶ËÌØÊâÉ豸ÎļþÒ»°ãÓÐÒÔϼ¸ÖÖ£º
1¡¢´®Ðж˿ÚÖÕ¶Ë(/dev/ttySn)
´®
Ðж˿ÚÖÕ¶Ë(Serial Port
Terminal)ÊÇʹÓüÆËã»ú´®Ðж˿ÚÁ¬½ÓµÄÖÕ¶ËÉ豸¡£¼ÆËã»ú°Ñÿ¸ö´®Ðж˿ڶ¼¿´×÷ÊÇÒ»¸ö×Ö·ûÉ豸¡£ÓжÎʱ¼äÕâЩ´®Ðж˿ÚÉ豸ͨ³£±»³ÆΪÖÕ¶ËÉ豸£¬ÒòΪ
ÄÇʱËüµÄ×î´óÓÃ;¾ÍÊÇÓÃÀ´Á¬½ÓÖնˡ£ÕâЩ´®Ðж˿ÚËù¶ÔÓ¦µÄÉ豸Ãû³ÆÊÇ/dev/tts/0(»ò/dev/ttyS0),
/dev/tts/1(»ò/dev/ttyS1)µÈ£¬É豸ºÅ·Ö±ðÊÇ(4,0),
(4,1)µÈ£¬·Ö±ð¶ÔÓ¦ÓÚDOSϵͳϵÄCOM1¡¢COM2µÈ¡£ÈôÒªÏòÒ»¸ö¶Ë¿Ú·¢ËÍÊý¾Ý£¬¿ÉÒÔÔÚÃüÁîÐÐÉϰѱê×¼Êä³öÖض¨Ïòµ½ÕâЩÌØÊâÎļþÃûÉϼ´¿É¡£ÀýÈ磬
ÔÚÃüÁîÐÐÌáʾ·ûϼüÈ룺echo test >
/dev/ttyS1»á°Ñµ¥´Ê”test”·¢Ë͵½Á¬½ÓÔÚttyS1(COM2)¶Ë¿ÚµÄÉ豸ÉÏ¡£¿É½Ó´®¿ÚÀ´ÊµÑé¡£
2¡¢Î±ÖÕ¶Ë(/dev/pty/)
αÖÕ¶Ë(Pseudo Terminal)ÊdzɶԵÄÂß¼ÖÕ¶ËÉ豸(¼´masterºÍslaveÉ豸, ¶ÔmasterµÄ²Ù×÷»á·´Ó³µ½slaveÉÏ)¡£
Àý
Èç/dev/ptyp3ºÍ/dev/ttyp3(»òÕßÔÚÉ豸ÎļþϵͳÖзֱðÊÇ/dev/pty/m3ºÍ
/dev/pty/s3)¡£ËüÃÇÓëʵ¼ÊÎïÀíÉ豸²¢²»Ö±½ÓÏà¹Ø¡£Èç¹ûÒ»¸ö³ÌÐò°Ñptyp3(masterÉ豸)¿´×÷ÊÇÒ»¸ö´®Ðж˿ÚÉ豸£¬ÔòËü¶Ô¸Ã¶Ë¿ÚµÄ¶Á/
д²Ù×÷»á·´Ó³ÔÚ¸ÃÂß¼ÖÕ¶ËÉ豸¶ÔÓ¦µÄÁíÒ»¸öttyp3(slaveÉ豸)ÉÏÃæ¡£¶øttyp3ÔòÊÇÁíÒ»¸ö³ÌÐòÓÃÓÚ¶Áд²Ù×÷µÄÂß¼É豸¡£
ÕâÑù£¬
Á½¸ö³ÌÐò¾Í¿ÉÒÔͨ¹ýÕâÖÖÂß¼É豸½øÐл¥ÏཻÁ÷£¬¶øÆäÖÐÒ»¸öʹÓÃttyp3µÄ³ÌÐòÔòÈÏΪ×Ô¼ºÕýÔÚÓëÒ»¸ö´®Ðж˿ڽøÐÐͨÐÅ¡£ÕâºÜÏóÊÇÂß¼É豸¶ÔÖ®¼äµÄ¹ÜµÀ²Ù
×÷¡£¶ÔÓÚttyp3(s3)£¬ÈκÎÉè¼Æ³ÉʹÓÃÒ»¸ö´®Ðж˿ÚÉ豸µÄ³ÌÐò¶¼¿ÉÒÔʹÓøÃÂß¼É豸¡£µ«¶ÔÓÚʹÓÃptyp3µÄ³ÌÐò£¬ÔòÐèҪרÃÅÉè¼ÆÀ´Ê¹ÓÃ
ptyp3(m3)Âß¼É豸¡£
ÀýÈ磬Èç¹ûijÈËÔÚÍøÉÏʹÓÃtelnet
Ïà¹ØÎĵµ£º
1¡¢ÏÂÔØMySQLµÄ°²×°Îļþ
°²×°MySQLÐèÒªÏÂÃæÁ½¸öÎļþ£º
MySQL-server-5.0.46.i386.rpm¡¡¡¡¡¡
MySQL-client-5.0.46.i386.rpm
2¡¢°²×°MySQL
rpmÎļþÊÇRed Hat¹«Ë¾¿ª·¢µÄÈí¼þ°²×°°ü£¬rpm¿ÉÈÃLinuxÔÚ°²×°Èí¼þ°üʱÃâ³ýÐí¶à¸´ÔÓµÄÊÖÐø¡£¸ÃÃüÁîÔÚ°²×°Ê±³£ÓõIJÎÊýÊÇ
ivh
,ÆäÖÐi±íʾ½«°²×°Ö¸¶¨µÄrmpÈí¼þ°ü£¬V±í ......
°²×°mysql
sudo apt-get install mysql-servel-5.0 mysql-client-5.0
ÏÂÔØ°²×°¹ý³ÌÖУ¬»áÌáʾÊäÈërootÃÜÂë
°²×°CÓïÑÔ±à³Ì½Ó¿Ú£º
sudo apt-get install libmysqlclient15-dev
¸ü¶àapi ²é¿´£ºhttp://dev.mysql.com/doc/refman/5.0/en/c.html
Ïà¹ØmysqlÍ·ÎļþºÍ¿âÎļþ°²×°ÔÚ/usr/include/mysql/ºÍ/usr/lib/mysqlÄ¿ ......
Æô¶¯mysql: /etc/rc.d/init.d/mysql start
ÐÞ¸ÄÃÜÂë: ¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
ʹÓÃÃÜÂëµÇ¼: mysql -u root -p
ÏÔʾÊý¾Ý¿â: show databases;
Ñ¡ÔñÊý¾Ý¿â: use Êý¾Ý¿âÃû;
ÏÔʾ±í: show tables;
ÏÔʾ±í½á¹¹: descibe ±íÃû;
Ô¶³ÌµÇ¼mysqlÐèÒª¿ªÆôÈ ......
LinuxÍø¿¨Çý¶¯³ÌÐò±àд
[Õª×Ô LinuxAID]
¹¤×÷ÐèҪдÁËÎÒÃǹ«Ë¾Ò»¿éÍø¿¨µÄLinuxÇý¶¯³ÌÐò¡£¾ÀúÒ»¸ö´ÓÎÞµ½ÓеĹý³Ì£¬Éî¸Ð¼¼Êõ½»Á÷µÄÖØÒª¡£Linux×÷ΪÌôս΢Èí¢¶ÏµÄÇ¿ÓÐÁ¦ÎäÆ÷£¬ÈÕÒæÊܵ½´ó¼ÒµÄϲ°®¡£ÕæÏ£ÍûËýÄÜÔÚÖйúѸËٳɳ¤¡£°Ñ³ÌÐòÎĵµÌù³öÀ´£¬Ï£ÍûºÍ´ó¼Ò̽ÌÖLinux¼¼ÊõºÍÓ¦Ó㬴ٽøLinuxÔÚÖйúµÄÆÕ¼°¡£
Linux²Ù×÷ϵͳÍø ......
1 ½Ó¿Ú
ÎÒÃÇÏÈ¿´¿´i915_drv.cÀïÃæÉêÃ÷µÄdriver±äÁ¿£º
static struct drm_driver driver = {
/* don't use mtrr's here, the Xserver or user space app should
* deal with them for intel hardware.
*/
.driver_features =
DRI ......