﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-JAVA学习笔记</title><link>http://www.blogjava.net/lingy/</link><description /><language>zh-cn</language><lastBuildDate>Sat, 06 Jun 2026 04:09:23 GMT</lastBuildDate><pubDate>Sat, 06 Jun 2026 04:09:23 GMT</pubDate><ttl>60</ttl><item><title>vim 替换</title><link>http://www.blogjava.net/lingy/archive/2012/05/09/377726.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Wed, 09 May 2012 09:28:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2012/05/09/377726.html</guid><description><![CDATA[<div>:%s/143250/143120/g<br /><br /><a href="http://www.linux521.com/2009/system/201106/15135_2.html">http://www.linux521.com/2009/system/201106/15135_2.html</a>&nbsp;</div><img src ="http://www.blogjava.net/lingy/aggbug/377726.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2012-05-09 17:28 <a href="http://www.blogjava.net/lingy/archive/2012/05/09/377726.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[端口被占用,环境起不来]常见测试环境问题解决</title><link>http://www.blogjava.net/lingy/archive/2012/01/31/369065.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Tue, 31 Jan 2012 03:29:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2012/01/31/369065.html</guid><description><![CDATA[<span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">大家是否遇到部署环境的时候,端口被占用,环境起不来的问题呢？遇到这个情况,我们该如何解决呢？</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">下面我把我遇到这个问题解决的方法总结下：</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">现象是这样的:</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">1. 页面访问出现: Http 500</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2. 后台启动日志提示:<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">vodka init successfully!!! ...</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">start apache ......</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">(98)Address already in use: make_sock: could not bind to address [::]:5071</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">no listening sockets available, shutting down</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">Unable to open logs</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">解决方法: 杀掉占用的进程</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">首先,需要用root账号登陆,登陆后,输入: netstat -plan |grep 5070</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">出现如下:</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">[Intranet root@qa-kernal-143-41 /root]</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">#netstat -plan |grep 5070</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp 0 0 :::5070 :::* LISTEN 28002/httpd<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp 1 0 ::ffff:10.20.143.41:5070 ::ffff:10.16.46.75:4654 CLOSE_WAIT 28406/httpd<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">最后杀掉占用的进程,输入:&nbsp;&nbsp; lsof -i:5070 即可 (注5070是端口号)</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">[Intranet root@qa-kernal-143-41 /root]</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">#lsof -i:5070</span><img src ="http://www.blogjava.net/lingy/aggbug/369065.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2012-01-31 11:29 <a href="http://www.blogjava.net/lingy/archive/2012/01/31/369065.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux用户组相关知识</title><link>http://www.blogjava.net/lingy/archive/2012/01/31/369064.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Tue, 31 Jan 2012 03:28:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2012/01/31/369064.html</guid><description><![CDATA[<span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">用root用户登陆输入命令cd /home，再用ll查看发现drwxr-xr-x 12 622&nbsp;&nbsp; 622&nbsp;&nbsp;&nbsp;&nbsp;4096 Apr 18 19:21 aurora&nbsp;&nbsp;aurora用户属主不正确</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">用命令chown aurora.aurora aurora修改用户属主</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">知识点：</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">1.查看用户组信息#cat /etc/passwd</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">/etc/passwd中一行记录对应着一个用户，每行用冒号隔开分为7个字段，具体字段说明如下：</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(255,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">name:password:uid:gid:comment:home:shell<br style="outline-style: none" />用户名:口令:用户标识号:组标识号:注释性描述:主目录:登录Shell</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">home: 指定用户的主目录的绝对路径</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">shell: 用户登陆后启动的一个进程，这个进程是用户登录到系统后运行的命令解释器或某个特定的程序，即Shell。</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">例子：</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">aurora:x:707:707::/home/aurora:/bin/bash</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp; 系统首先会查阅 /etc/passwd 文件，看是否有aurora 这个账号，然后确定aurora的UID，通过UID 来确认用户和身份，</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp; 如果存在则读取/etc/shadow 影子文件中所对应的aurora的密码；&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp; 用户名：x：uid：gid：用户名全称：用户的家：用户所用的shell类型</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;x指向映射</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">uid为0 则为root&nbsp;&nbsp;</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2.aurora:$1$nC4FzXJz$OP5LS0Evj4uMsLvMHP1eZ/:15082:0:99999:7:::</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">etc/shadow文件是/etc/passwd 的影子文件，这个文件并不由/etc/passwd 而产生的，这两个文件是应该是对应互补的；</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">shadow内容包括用户及被加密的密码及其他/etc/passwd 不能包括的信息。</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">用户：密码：上次修改密码的时间 ：两次修改口令间隔最少的天数：两次修改口令间隔最多的天数</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">3.aurora:x:707:</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">用户名：用户组密码：GID :用户列表</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">第四字段：用户列表，每个用户之间用,号分割；本字段能为空；</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">如果字段为空表示用户组为GID的用户名</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">4.chown 修改文件和文件夹的用户和用户组属性</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; outline-style: none; font: 14px/24px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/24px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">5.passwd aurora 修改密码</span><img src ="http://www.blogjava.net/lingy/aggbug/369064.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2012-01-31 11:28 <a href="http://www.blogjava.net/lingy/archive/2012/01/31/369064.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux之用户登录环境变量分析</title><link>http://www.blogjava.net/lingy/archive/2012/01/31/369057.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Tue, 31 Jan 2012 02:53:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2012/01/31/369057.html</guid><description><![CDATA[<strong>昨天遇见一个问题，与大家分享一下。现象如下，当从一个用户切换到另外一个用户。或者直接登录的时候会出现如错误：bash-3.2</strong>&nbsp; 
<p><strong>分析：</strong></p>
<p><strong>而且bpm这个用户以前都是好的，为什么呢？我们来分析一下用户的登录的一些原理就明白了：</strong></p>
<p><strong>用户在刚登录Linux时，步骤如下：</strong></p>
<p><strong>1</strong><strong>、首先启动 /etc/profile 文件，</strong></p>
<p><strong>2</strong><strong>、然后再启动用户目录下的 ~/.bash_profile、 ~/.bash_login或 ~/.profile文件中的其中一个，</strong></p>
<p><strong>执行的顺序为：~/.bash_profile、 ~/.bash_login、 ~/.profile。 如果 ~/.bash_profile文件存在的话，一般还会执行 ~/.bashrc文件。</strong></p>
<p><strong>因为在 ~/.bash_profile文件中一般会有下面的代码:</strong></p>
<p>if [ -f ~/.bashrc ] ; then</p>
<p>　. ./bashrc</p>
<p>fi</p>
<p>&nbsp;因为在 ~/.bash_profile文件中一般会有下面的代码：<br />if [ -f ~/.bashrc ] ; then<br />. ./bashrc<br />fi<br />所以，~/.bashrc会调用 /etc/bashrc文件。</p>
<p><strong>3</strong><strong>、最后，在退出shell时，还会执行 ~/.bash_logout文件。</strong></p>
<p><strong>所以一个用户从登录到登出的执行顺序为：/etc/profile -&gt; (~/.bash_profile | ~/.bash_login | ~/.profile) -&gt; ~/.bashrc -&gt;/etc/bashrc -&gt; ~/.bash_logout</strong></p>
<p><strong>当我们查看当前用户的隐藏文件【ls -al】是否有这些文件的时候，这些文件都丢失了，所以就会出现bash-3.2的错误。也就是取不到当前登录用户的变量导致。</strong></p>
<p><strong>备注：关于各个文件的作用域，在网上找到了以下说明：</strong></p>
<p><strong>（1）/etc/profile： 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行. 并从/etc/profile.d目录的配置文件中搜集shell的设置。</strong></p>
<p><strong>（2）/etc/bashrc: 为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取。</strong></p>
<p><strong>（3）~/.bash_profile: 每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件。</strong></p>
<p><strong>（4）~/.bashrc: 该文件包含专用于你的bash shell的bash信息,当登录时以及每次打开新的shell时,该该文件被读取。</strong></p>
<p><strong>（5）</strong><strong><sub>/.bash_logout:当每次退出系统(退出bash shell)时,执行该文件. 另外,/etc/profile中设定的变量(全局)的可以作用于任何用户,而</sub></strong><strong>/.bashrc等中设定的变量(局部)只能继承/etc/profile中的变量,他们是"父子"关系。</strong></p>
<p><strong>（6）</strong><strong><sub>/.bash_profile 是交互式、login 方式进入 bash 运行的</sub></strong><strong>/.bashrc 是交互式 non-login 方式进入 bash 运行的通常二者设置大致相同，所以通常前者会调用后者。</strong></p>
<p><strong>&nbsp;</strong></p>
<p><strong>解决方案：</strong></p>
<p><strong>&nbsp;</strong> <strong>从正确的环境copy这</strong><strong>.bash_profile</strong><strong>、.bashrc、.bash_logout</strong><strong>三个文件中任一丢失的文件到当前目录下面。让其生效即可。</strong></p>
<p><strong>但为什么这三个文件丢失我没有找到其丢失的原因，最根本的猜测就是大家不小心删除了。另外linux的问题我个人的经验就是顺藤摸瓜、掌握原理之后就很多解决了！</strong></p><img src ="http://www.blogjava.net/lingy/aggbug/369057.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2012-01-31 10:53 <a href="http://www.blogjava.net/lingy/archive/2012/01/31/369057.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Oracle DDL,DML,DCL,TCL 基础概念 </title><link>http://www.blogjava.net/lingy/archive/2010/08/17/329116.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Tue, 17 Aug 2010 08:50:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2010/08/17/329116.html</guid><description><![CDATA[<h5><a name="DDL">DDL</a></h5>
<br />
Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:
<ul>
    <li>CREATE - to create objects in the database
    <li>ALTER - alters the structure of the database
    <li>DROP - delete objects from the database
    <li>TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
    <li>COMMENT - add comments to the data dictionary
    <li>RENAME - rename an object</li>
</ul>
<h5><a name="DML"><br />
DML</a></h5>
<br />
Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:
<ul>
    <li>SELECT - retrieve data from the a database
    <li>INSERT - insert data into a table
    <li>UPDATE - updates existing data within a table
    <li>DELETE - deletes all records from a table, the space for the records remain
    <li>MERGE - UPSERT operation (insert or update)
    <li>CALL - call a PL/SQL or Java subprogram
    <li>EXPLAIN PLAN - explain access path to data
    <li>LOCK TABLE - control concurrency</li>
</ul>
<h5><a name="DCL"><br />
DCL</a></h5>
<br />
Data Control Language (DCL) statements. Some examples:
<ul>
    <li>GRANT - gives user's access privileges to database
    <li>REVOKE - withdraw access privileges given with the GRANT command</li>
</ul>
<h5><a name="TCL"><br />
TCL</a></h5>
<br />
Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
<ul>
    <li>COMMIT - save work done
    <li>SAVEPOINT - identify a point in a transaction to which you can later roll back
    <li>ROLLBACK - restore database to original since the last COMMIT
    <li>SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use</li>
</ul>
<p><br />
作者：李敬然（Gnie）<br />
出处：<a href="http://www.cnblogs.com/gnielee/">{GnieTech}</a> （http://www.cnblogs.com/gnielee/）<br />
版权声明：本文的版权归作者与博客园共有。转载时须注明本文的详细链接，否则作者将保留追究其法律责任。</p>
<img src ="http://www.blogjava.net/lingy/aggbug/329116.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2010-08-17 16:50 <a href="http://www.blogjava.net/lingy/archive/2010/08/17/329116.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux 命令</title><link>http://www.blogjava.net/lingy/archive/2010/08/17/329113.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Tue, 17 Aug 2010 08:28:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2010/08/17/329113.html</guid><description><![CDATA[<p>&nbsp;</p>
<p>insert into ali_zeus_access_area<br />
select * from ali_zeus_access_area@zeus_dev;</p>
<p>script -q tty.log</p>
<p>sqlplus /nolog <br />
conn rnd/mCQe88il@crmintsb<br />
conn rnd/mCQe88il@crmint</p>
<p><br />
scp tty.log guangyan.lingy@10.20.130.14:/home/guangyan.lingy/tty0601.log</p>
<p>export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK<br />
sqlplus rnd/mCQe88il@crmg</p>
<p>for remote in \<br />
172.16.131.47 172.16.131.48 172.16.131.49 172.16.131.50 172.16.131.51 172.16.131.52 172.16.131.53 172.16.131.54 172.16.131.55 172.16.131.2 172.16.131.3 172.16.131.4 172.16.131.5 172.16.131.6 172.16.131.7 172.16.131.41 172.16.131.42 172.16.131.56 172.16.131.57 172.16.131.58 \<br />
;do echo $remote; ssh $remote "grep 'sms webService visitor IP is' output/logs/user/martini_sales_tool.log"; done</p>
<p>&nbsp;</p>
<p>daisy.louy<br />
&nbsp;louying<br />
&nbsp;<br />
&nbsp;<br />
carvin hello123<br />
http://svn.alibaba-inc.com/repos/crm/martini/branches/20091209_dcs_guangyan.lingy_dev</p>
<p>weiming.shi<br />
jinbo.yu<br />
1234567890 alibaba-guest<br />
我刚又试了</p>
<p><br />
中国的十大宜居小城,中午的时候看的<br />
http://focus.news.163.com/10/0531/09/680LGN5L00011SM9.html<br />
有泉州:)</p>
<p>数据模型资源手册</p>
<p>需要低烟无卤阻燃电缆料的电缆企业</p>
<img src ="http://www.blogjava.net/lingy/aggbug/329113.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2010-08-17 16:28 <a href="http://www.blogjava.net/lingy/archive/2010/08/17/329113.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>《设计模式》之Java解读--桥接Bridge </title><link>http://www.blogjava.net/lingy/archive/2010/07/29/327422.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Thu, 29 Jul 2010 05:56:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2010/07/29/327422.html</guid><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1、核心意图： 将抽象部分和实现部分分离，使它们都可以独立的变化。该模式的目标是通过把高层的抽象和底层的实现分开，分别构建自己的类层次结构，并通过实现部分的接口将两部分进行桥接，从而达到高层抽象和底层实现可以独立的方便扩展的目的。其核心是分离，和委托。&nbsp;2、身边实例： Java语言的一个非常重要的特点是平台的无关性，对于一般的高级语言所编写的程序，如果要在不同的平台上...&nbsp;&nbsp;<a href='http://www.blogjava.net/lingy/archive/2010/07/29/327422.html'>阅读全文</a><img src ="http://www.blogjava.net/lingy/aggbug/327422.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2010-07-29 13:56 <a href="http://www.blogjava.net/lingy/archive/2010/07/29/327422.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>无法定位程序输入点_except_handler4_common于动态链接库msvcrt.dll上</title><link>http://www.blogjava.net/lingy/archive/2010/07/05/325279.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Mon, 05 Jul 2010 06:12:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2010/07/05/325279.html</guid><description><![CDATA[<p>最近，多种软件都出现了一个启动时的错误提示 &#8220;无法定位程序输入点_except_handler4_common于动态链接库msvcrt.dll上&#8221;。</p>
<p>出现这个提示情况是：Windows Xp 系统； 软件包括：window live writer 2009, windows messenger 2009, firefox 3.5 等非常新的版本。</p>
<p>这个提示出现后，点击确定，并不影响程序的使用。这个问题出现的原因，其实微软自己的问题。可谓是微软的Vista 后遗症吧。</p>
<p>在 Vista 系统里，有个挺酷的功能，就是&#8220;程序缩略图&#8221;，有点3D效果，这个功能，调用了 dwmapi.dll 这个库，而 dwmapi.dll 又引用了 msvcrt.dll 中的 _except_handler4_common 功能。</p>
<p>然而，在XP系统中，系统自带的 msvcrt.dll&nbsp; 和 Vista 中的 msvcrt.dll 版本不同， 并没有这个 _except_handler4_common ，结果就出现了启动程序时，遇到的 &#8220;无法定位程序输入点_except_handler4_common于动态链接库msvcrt.dll上&#8221;的错误提示。</p>
<p><strong>解决方法</strong>：</p>
<div class="content-sub-title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 将 c:\windows\system32 下的 dwmapi.dll 改名，例如：改为 dwmapi.dll.bak。</div>
<img src ="http://www.blogjava.net/lingy/aggbug/325279.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2010-07-05 14:12 <a href="http://www.blogjava.net/lingy/archive/2010/07/05/325279.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle 回滚 sql操作</title><link>http://www.blogjava.net/lingy/archive/2010/06/02/322585.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Wed, 02 Jun 2010 08:31:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2010/06/02/322585.html</guid><description><![CDATA[select * from ali_zeus_opportunity as of timestamp to_timestamp('2010-6-2 12:00:00','yyyy-mm-dd hh24:mi:ss');<br />
<img src ="http://www.blogjava.net/lingy/aggbug/322585.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2010-06-02 16:31 <a href="http://www.blogjava.net/lingy/archive/2010/06/02/322585.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Eclipse 启动运行速度调优 </title><link>http://www.blogjava.net/lingy/archive/2009/10/01/297077.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Thu, 01 Oct 2009 03:24:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2009/10/01/297077.html</guid><description><![CDATA[<div class="content">
<p>JVM 提供了各种用于调整内存分配和垃圾回收行为的标准开关和非标准开关。其中一些设置可以提高 JAVA IDE 的性能。 <br />
注意，由于 -X （尤其是 -XX JVM）开关通常是 JVM 或 JVM 供应商特定的，本部分介绍的开关可用于 Sun Microsystems J2SE 1.4.2。</p>
<p>以下设置在大多数系统上将产生比工厂更好的设置性能。 <br />
-vmargs - 表示将后面的所有参数直接传递到所指示的 Java VM。</p>
<p>-Xverify:none - 此开关关闭Java字节码验证，从而加快了类装入的速度，并使得在仅为验证目的而启动的过程中无需装入类。此开关缩短了启动时间，因此没有理由不使用它。 </p>
<p>-Xms24m - 此设置指示 Java 虚拟机将其初始堆大小设置为 24 MB。通过指示 JVM 最初应分配给堆的内存数量，可以使 JVM 不必在 IDE 占用较多内存时增加堆大小。 </p>
<p>-Xmx96m - 此设置指定 Java 虚拟机应对堆使用的最大内存数量。为此数量设置上限表示 Java 进程消耗的内存数量不得超过可用的物理内存数量。对于具有更多内存的系统可以增加此限制，96 MB 设置有助于确保 IDE 在内存量为 128MB 到 256MB 的系统上能够可靠地执行操作。注意：不要将该值设置为接近或大于系统的物理内存量，否则将在主要回收过程中导致频繁的交换操作。 </p>
<p>-XX:PermSize=20m - 此 JVM 开关不仅功能更为强大，而且能够缩短启动时间。该设置用于调整内存"永久区域"（类保存在该区域中）的大小。因此我们向 JVM 提示它将需要的内存量。该设置消除了许多系统启动过程中的主要垃圾收集事件。SunONE Studio 或其它包含更多模块的 IDE 的用户可能希望将该数值设置得更高。 <br />
下面列出了其它一些可能对 ECLIPSE 在某些系统（不是所有系统）上的性能产生轻微或明显影响的 JVM 开关。尽管使用它们会产生一定的影响，但仍值得一试。 </p>
<p>-XX:CompileThreshold=100 - 此开关将降低启动速度，原因是与不使用此开关相比，HotSpot 能够更快地将更多的方法编译为本地代码。其结果是提高了 IDE 运行时的性能，这是因为更多的 UI 代码将被编译而不是被解释。该值表示方法在被编译前必须被调用的次数。 </p>
<p>-XX:+UseConcMarkSweepGC -XX:+UseParNewGC - 如果垃圾回收频繁中断，则请尝试使用这些开关。此开关导致 JVM 对主要垃圾回收事件（如果在多处理器工作站上运行，则也适用于次要回收事件）使用不同的算法，这些算法不会影响整个垃圾回收进程。注意：目前尚不确定此收集器是提高还是降低单处理器计算机的性能。 </p>
<p>-XX:+UseParallelGC - 某些测试表明，至少在内存配置相当良好的单处理器系统中，使用此回收算法可以将次要垃圾回收的持续时间减半。注意，这是一个矛盾的问题，事实上此回收器主要适用于具有千兆字节堆的多处理器。尚无可用数据表明它对主要垃圾回收的影响。注意：此回收器与 -XX:+UseConcMarkSweepGC 是互斥的。</p>
<p>我的机器是512MB的内存<br />
下面是我的eclipse启动参数：eclipse.exe -vmargs -Xverify:none -Xms64M -Xmx256M -XX:PermSize=20M&nbsp; -XX:+UseParallelGC</p>
<p>-----</p>
<p>我的电脑是1G内存, 有一次内存不足了... MyEclipse 就推荐我使用一个启动参数, 现在我的启动参数是:</p>
<p><br />
eclipse.exe -vmargs -Xverify:none -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M -XX:+UseParallelGC</p>
</div>
<img src ="http://www.blogjava.net/lingy/aggbug/297077.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lingy/" target="_blank">林光炎</a> 2009-10-01 11:24 <a href="http://www.blogjava.net/lingy/archive/2009/10/01/297077.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>树结构和它的专用函数SYS_CONNECT_BY_PATH</title><link>http://www.blogjava.net/lingy/archive/2009/09/20/295773.html</link><dc:creator>林光炎</dc:creator><author>林光炎</author><pubDate>Sun, 20 Sep 2009 13:32:00 GMT</pubDate><guid>http://www.blogjava.net/lingy/archive/2009/09/20/295773.html</guid><description><![CDATA[简单的树型结构<br />
关于树的普通应用<br />
学习了下这个函数, 用ORGINDUSTRIES的表做了个测试:<br />
正常的树型结构<br />
select lpad(' ',6*(level-1))||industry,indlevel,indid,pindid<br />
from ORGINDUSTRIES<br />
start with indid=1<br />
connect by pindid=prior indid<br />
结果显示如下<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Indlevel&nbsp;&nbsp;indid&nbsp; &nbsp; pindid<br />
&nbsp; &nbsp; &nbsp; &nbsp; 服装与服饰&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;1&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 0<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 服装&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;2&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;2&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;1<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 女装&nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;3&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;2<br />
<br />
倒型树<br />
下面这个例子是个&#8221;倒数&#8221;—倒过来的树型结构<br />
select lpad(' ',6*(level-1))||industry,indlevel,indid,pindid<br />
from ORGINDUSTRIES<br />
start with indid=20<br />
connect by indid=prior pindid;<br />
这是标准结果:<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Indlevel indid&nbsp; &nbsp; pindid<br />
二手服装&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 3&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;20&nbsp; &nbsp;&nbsp; &nbsp; 2<br />
&nbsp; &nbsp;&nbsp; &nbsp;服装&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;2&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;2&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;1<br />
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;服装与服饰&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;1&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;1&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;0<br />
结论<br />
无论正树还是倒树, 关键就在于connect by的条件. <br />
正树:&nbsp;&nbsp;必须是&nbsp;&nbsp;&#8216;父&#8217;= prior &#8216;子&#8217;<br />
倒树:&nbsp;&nbsp;必须是&nbsp;&nbsp;&#8216;子&#8217;= prior &#8216;父&#8217;<br />
<br />
树型结构的条件过滤<br />
采用树型结构的话, 如果我们想将树上的一个分支砍掉.&nbsp;&nbsp;将分支后面的结构都抛弃掉, 这个可以实现麽？当然可以。 但是不是用where， where条件只能去除单一的条件。<br />
所以， 这种树型的过滤条件就需要加在connect by上面。<br />
<br />
测试如下：由于用真实环境比较贴近实际，所以提前用下SYS_CONNECT_BY_PATH函数来显示下环境<br />
<br />
不加任何条件的环境：<br />
select areaname,sys_connect_by_path(areaname,',')<br />
from areas bb<br />
start with areaname='中国大陆'<br />
connect by parentareaid=prior areaid&nbsp;&nbsp;<br />
<br />
结果：<br />
1&nbsp; &nbsp; &nbsp; &nbsp; 中国大陆,中国大陆<br />
2&nbsp; &nbsp; &nbsp; &nbsp; 北京&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,北京<br />
3&nbsp; &nbsp; &nbsp; &nbsp; 北京&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,北京,北京<br />
4&nbsp; &nbsp; &nbsp; &nbsp; 东城区&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,北京,东城区<br />
5&nbsp; &nbsp; &nbsp; &nbsp; 西城区&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,北京,西城区<br />
22&nbsp; &nbsp; &nbsp; &nbsp; 广东&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,广东<br />
23&nbsp; &nbsp; &nbsp; &nbsp; 广州&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,广东,广州<br />
24&nbsp; &nbsp; &nbsp; &nbsp; 汕尾&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,广东,汕尾<br />
25&nbsp; &nbsp; &nbsp; &nbsp; 潮阳&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,广东,潮阳<br />
46&nbsp; &nbsp; &nbsp; &nbsp; 上海&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,上海<br />
47&nbsp; &nbsp; &nbsp; &nbsp; 上海&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,上海,上海<br />
48&nbsp; &nbsp; &nbsp; &nbsp; 黄浦区&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆,上海,黄浦区<br />
49&nbsp; &nbsp; &nbsp; &nbsp; 闸北区&nbsp; &nbsp; &nbsp; &nbsp; ,中国大陆