LinuxÖÐBash»·¾³±äÁ¿µÄÉ趨˳Ðò
ºÍBashµÄ»·¾³É趨ÓйصÄÎļþÓÐ
/etc/profile (Ö÷Òª)
$HOME/.bash_profile (Ö÷Òª)
$HOME/.bash_login
$HOME/.profile
$HOME/.bash_logout (Ö÷Òª)
$HOME/.bashrc (Ö÷Òª)
/etc/bashrc
˵Ã÷ÈçÏ£º
µÇÈë(login)ʱ
ÏÈÖ´ÐÐ /etc/profile
½Ó×Åbash»á¼ì²éʹÓÃÕßµÄ×Ô¼ÒĿ¼ÖУ¬ÊÇ·ñÓÐ .bash_profile »òÕß .bash_login»òÕß .profile£¬ÈôÓУ¬Ôò»áÖ´ÐÐÆäÖÐÒ»¸ö£¬Ö´ÐÐ˳ÐòΪ£º
.bash_profile ×îÓÅÏÈ
.bash_loginÆä´Î
.profile ×îºó
ÕâÈý¸öµµ°¸Ö»ÓÐÔÚµÇÈëʱ£¬²Å»á±»bash¶ÁÈ¡
µÇ³ö(exit/logout)ʱ
bash»á¼ì²éʹÓÃÕß×Ô¼ÒĿ¼ÖÐÊÇ·ñÓÐ .bash_logout£¬ÈôÓУ¬Ôòbash»áÖ´ÐÐÆäÖеÄÖ¸Áî
µÇÈëºóÆô¶¯Ò»¸öÐ嵀 shell :
´ËʱÎÒÃdzÆ֮Ϊһ¸ö subshell, Ò²¾ÍÊÇ˵ÔÚÃüÁîÁÐÖмüÈë bash, ³ýÁËÔÏȵÇÈëʱµÄbashÖ®Íâ, ÓÖÁíÍâÆô¶¯ÁËÒ»¸öÐ嵀 bash shell.
bash »á¼ì²éʹÓÃÕßµÄ×Ô¼ÒĿ¼ÖÐÊÇ·ñÓÐ .bashrc£¬ÈôÓÐÔòÓèÒÔÖ´ÐÐ
²âÊÔ:
ÔÚ¸÷µµÖмÓÈë echo Ö¸Áî, ÒÔ¹Û²ìÆäÖ´ÐÐ˳Ðò.
¸÷ÎļþÓÃ;˵Ã÷
/etc/profile ÓÉ root Ëù¿ØÖÆ, ÓÃÀ´É趨ÊʺÏÈ«ÌåʹÓÃÕßµÄshell»·¾³
ÈôʹÓÃÕß×Ô¼º¾õµÃ /etc/profile µÄÉ趨, ²¢²»ºÏÒâ, ¿ÉÒÔÐÞ¸Ä×Ô¼ÒĿ¼ÖÐµÄ .bash_profile
¼ÈÈ»ÓÐÁË .bash_profile, ΪºÎÒªÓÐ .bash_login ¼° .profile ?ÕâÊÇÒòΪÓÐЩÈË¿ÉÄÜÊÇ´Ó Bourne shell ÒÆת¹ýÀ´µÄ, ÄÇô, Ö»Òª½« Bourne shell Ö÷ÒªµÄÆ𶯵µ .profile ÒƵ½×Ô¼ÒĿ¼ÖÐ, ·ÅÆúʹÓà .bash_profile ¼° .bash_login ¼´¿É¼ÌÐøÑØÓÃÒÔÇ°µÄÉ趨»·¾³
.bash_login ´æÔÚÀíÓÉ»òÐíºÍ c shell ÓйØ, µ«ÒòΪ bash ºÍ c shell ¶þÕßÓï·¨²¢²»ÍêÈ«ÏàÈÝ, Òò´Ë, ²¢²»½¨Ò齫 c shell µÄÆô¶¯µµÖ±½ÓÒƹýÀ´Ê¹ÓÃ.
.bashrc ÔòÊÇÓÃÀ´É趨 subshell µÄ»·¾³µÄ, Ö®ËùÒÔÒªÓÐÕâ¸ö .bashrc ÊÇΪÃâ subshell²úÉúʱ, ÓÖÖظ²½« /etc/profile Ö´ÐÐÒ»´Î. ÎÒÃÇ·¢ÏÖ .bashrc ÖÐÒÑÔ¤ÏÈ»áÈ¥Ö´ÐÐ /etc/bashrcµÄÖ¸Áî, Õâ±íʾ, »òÐí root »á½«²úÉú subshell ʱµÄ»·¾³ÉèºÃÁË,ʹÓÃÕßÖ»ÒªÑØÓà /etc/bashrcµÄÄÚÈÝ, Ó¦¸Ã²»»áÓÐÈκÎÎÊÌâ.
.bash_logout ÊÇʹÓÃÕߵdzöÖ÷»ú֮ǰ, »áÈ¥Ö´ÐеÄÉ趨µµ, Èç¹ûʹÓÃÕßÏ£ÍûÔÚËûµÇ³öϵͳ֮ºó, ÄÜ°ïËû×Ô¶¯´¦ÀíһЩËöÊÂ, ±ÈÈç: Çå³ýÁÙʱÎļþ, Çå³ýÆÁÄ»µÈ, ¿ÉÒÔÔÚÕâ¸öµµ°¸ÖмÓÒÔÉ趨.
Ïà¹ØÎĵµ£º
²»Í¬Ö®´¦Ö÷ÒªÌåÏÖÔÚ×ÅÑ۵㣺
£¨1£©UbuntuÊÇΪÁËÌá¸ßͼÐνçÃæϵÄÓû§ÌåÑé
ËùÒÔ¹¦·ò¶¼×öÔÚ¼ÒÓûúÉÏÓ²¼þ¼æÈÝÐÔ
³õ¼¶Óû§µÄÒ×ÓÃÐÔ
£¨2£©SuseÊÇΪÁËÌá¸ßÆóÒµÓû§µÄÈÏ¿É
ÐèÒª×î¸ßµÄÎȶ¨ÐÔ£¬ÈÝÒ×µÄÅäÖ÷þÎñ
¿ÉÒÔºÜÈÝÒ×ʹÓÃSuseºÍRethat´î½¨Ò»¸ö¿É¿¿µÄÍøÕ¾
£¨3£©ArchlinuxÊÇΪÁ˼ò»¯Öм¶Ó ......
bashrcÓëprofileµÄÇø±ð
Òª¸ãÇåbashrcÓëprofileµÄÇø±ð£¬Ê×ÏÈҪŪÃ÷°×ʲôÊǽ»»¥Ê½shellºÍ·Ç½»»¥Ê½shell£¬Ê²Ã´ÊÇlogin shell ºÍnon-login shell¡£
½»»¥Ê½Ä£Ê½¾ÍÊÇshellµÈ´ýÄãµÄÊäÈ룬²¢ÇÒÖ´ÐÐÄãÌá½»µÄÃüÁî¡£ÕâÖÖģʽ±»³Æ×÷½»»¥Ê½ÊÇÒòΪshellÓëÓû§½øÐн»»¥¡£ÕâÖÖģʽҲÊÇ´ó¶àÊýÓû§·Ç³£ÊìϤµÄ£ºµÇ¼¡¢Ö´ÐÐһЩÃüÁǩÍË¡ ......
1¡¢RootµÇ¼
2¡¢²éip:ifcongfig
3¡¢ÐÞ¸ÄÍøÂçÉèÖÃ
vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=VirtualBox
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
4¡¢Ìí¼ÓÐÂÓû§º ......
linux coredumpÅäÖÃÓëµ÷ÊÔ
À´Ô´:
ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º
2009.02.09 17:11¡¡(¹²ÓÐ0
ÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
linux coredumpÅäÖÃÓëµ÷ÊÔ
&nb ......
1¡¢°²×°°ü
ÏÂÔØÍøÖ·£ºhttp://dev.mysql.com/downloads/mysql/
mysql-5.1.38.tar.gz£¨°æ±¾£º5.1.38£©
2¡¢Ìí¼ÓmysqlÓû§ÓëȺ
groupadd mysql
useradd -g mysql -s /sbin/nologin mysql
3¡¢½âѹÓë±àÒë
tar zxvf mysql-5.1.38.tar.gz
cd mysql-5.1.38/
./configure --prefix=/usr/local/mysql/ --enable-assembler --w ......