﻿<?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>IT博客-ideallorn</title><link>http://www.cnitblog.com/ideallorn/</link><description /><language>zh-cn</language><lastBuildDate>Fri, 01 May 2026 17:01:50 GMT</lastBuildDate><pubDate>Fri, 01 May 2026 17:01:50 GMT</pubDate><ttl>60</ttl><item><title>Linux加入Windows域实践</title><link>http://www.cnitblog.com/ideallorn/archive/2012/05/10/79707.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Thu, 10 May 2012 02:19:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2012/05/10/79707.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/79707.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2012/05/10/79707.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/79707.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/79707.html</trackback:ping><description><![CDATA[参考：<br />&nbsp;&nbsp;&nbsp; Joining Samba to a Windows 2008 R2 Domain (http://itscblog.tamu.edu/joining-samba-to-a-windows-2008-r2-domain/)<br />&nbsp;&nbsp;&nbsp; Linux加入Windows域之完美解决方案 (http://wenku.baidu.com/view/b680831014791711cc79179d.html)<br />&nbsp;&nbsp;&nbsp; CentOS使用Winbind与AD集成认证 (http://hi.baidu.com/jiasha2008/blog/item/0607620167d58c04738da5b7.html) <br />&nbsp;&nbsp;&nbsp; 利用Samba做Linux和Windows整合 (http://wenku.baidu.com/view/d6fa146d58fafab069dc02e2.html)<br /><br />总结：<br />&nbsp;&nbsp; 走setup, 使用winbind验证<br />&nbsp;&nbsp;&nbsp;&nbsp; 需要知道域控的机器名和有域管理员权限的帐号密码 &nbsp;&nbsp; &nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; net join -w 域名 -S 预控的全名 -U 拥有域管理员权限的帐号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; net join -w XXXMASTER -S rnop-dci03.IS.AD.XXX.COM -U xxx<br /><br />然后按照后面的命令来一遍<br /><br />kinit domainuser@DOMAIN.COM<br />klist<br />net ads join -U domainadminuser<br />    $ /etc/init.d/smb start<br />    $ /etc/init.d/winbind start<br />    $ chkconfig smb on<br />    $ chkconfig winbind on<br /><br />net ads keytab create -U domainadminuser<br />klist -ke<br /><br />    $ /etc/init.d/smb restart<br />    $ /etc/init.d/winbind restart<br /><br />net ads info<br />net ads testjoin<br /><br />wbinfo -t<br />wbinfo -u<br />wbinfo -g<br /><br />wbinfo -a domainuser<br />id domainuser<br />再加入下行自动创建啊home目录的到 /etc/pam.d/system-auth-ac<br />&nbsp;&nbsp; session     required      pam_mkhomedir.so silent skel=/etc/skel umask=0077<br />打完收工<br /><br /><img src ="http://www.cnitblog.com/ideallorn/aggbug/79707.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2012-05-10 10:19 <a href="http://www.cnitblog.com/ideallorn/archive/2012/05/10/79707.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Automated build causes ResolveKeySource failed unexpectedly.(zz)</title><link>http://www.cnitblog.com/ideallorn/archive/2012/04/17/79004.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Tue, 17 Apr 2012 08:24:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2012/04/17/79004.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/79004.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2012/04/17/79004.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/79004.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/79004.html</trackback:ping><description><![CDATA[<h3>Automated build causes ResolveKeySource failed unexpectedly.<br /></h3><div style="color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px; text-align: left; background-color: #e0e0e0; "><a href="http://codehunter-uk.blogspot.com/2009/02/automated-build-causes-resolvekeysource.html">http://codehunter-uk.blogspot.com/2009/02/automated-build-causes-resolvekeysource.html</a> </div><div entry-content"="" id="post-body-2960518277491306213" itemprop="articleBody" style="color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px; text-align: left; background-color: #e0e0e0; "><p>I came across this error the other day after updating our ClickOnce manifest to be signed with a new digital certificate with a password. After searching google I discovered that this error was down to the fact that the user account that the automated build service was running under had never come across the certificate so msbuild was attempting to prompt the service with a password dialog box, needless to say this doesn&#8217;t end well and you get &#8220;The "ResolveKeySource" task failed unexpectedly&#8221;. The solution is to import the digital certificate into the personal store of the account the service is running under.</p><p>To do this follow these simple steps.</p><ol><li style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 14px; margin-bottom: 3px; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0% 6px; background-repeat: no-repeat no-repeat; ">Logon to the machine the automated build service is running on.</li><li style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 14px; margin-bottom: 3px; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0% 6px; background-repeat: no-repeat no-repeat; ">Run the management console (start-&gt;run-&gt;mmc)</li><li style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 14px; margin-bottom: 3px; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0% 6px; background-repeat: no-repeat no-repeat; ">Add the Certificates snap-in.</li><li style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 14px; margin-bottom: 3px; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0% 6px; background-repeat: no-repeat no-repeat; ">Choose Service account, then Local computer.</li><li style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 14px; margin-bottom: 3px; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0% 6px; background-repeat: no-repeat no-repeat; ">Now you should see a list of services pick the automated build service.</li><li style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 14px; margin-bottom: 3px; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0% 6px; background-repeat: no-repeat no-repeat; ">Right click &lt;ServiceName&gt;\Personal choose All Tasks &#8211;&gt; Import</li><li style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 14px; margin-bottom: 3px; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0% 6px; background-repeat: no-repeat no-repeat; ">Navigate to the digital certificate.</li><li style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 14px; margin-bottom: 3px; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0% 6px; background-repeat: no-repeat no-repeat; ">You must&nbsp;<strong>not</strong>&nbsp;enable strong private key protection.</li><li style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 14px; margin-bottom: 3px; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 0% 6px; background-repeat: no-repeat no-repeat; ">Finish the wizard.</li></ol></div><img src ="http://www.cnitblog.com/ideallorn/aggbug/79004.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2012-04-17 16:24 <a href="http://www.cnitblog.com/ideallorn/archive/2012/04/17/79004.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MsBuild woes from http://www.elpauer.org/?p=955</title><link>http://www.cnitblog.com/ideallorn/archive/2012/02/17/77641.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Fri, 17 Feb 2012 10:07:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2012/02/17/77641.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/77641.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2012/02/17/77641.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/77641.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/77641.html</trackback:ping><description><![CDATA[<h1 class="entry-title">MsBuild woes</h1>
<div class="entry-meta"><span class="sep">Posted on </span><a title="17:10:50" href="http://www.elpauer.org/?p=955" rel="bookmark"><time class="entry-date" datetime="2011-07-16T17:10:50+00:00" pubdate=""><strong><font color="#1982d1">Saturday 16th July 2011</time></font></strong></a><span class="by-author"> <span class="sep">by </span><span class="author vcard"><a class="url fn n" title="View all posts by pgquiles" href="http://www.elpauer.org/?author=2" rel="author"><strong><font color="#1982d1">pgquiles</font></strong></a></span></span></div><!-- .entry-meta --></header><!-- .entry-header -->

<div class="entry-content">
<h2>Why</h2>
<p>Do you use <a href="http://en.wikipedia.org/wiki/Windows_Communication_Foundation"><font color="#1982d1">WCF</font></a>? Do you generate your datacontracts by means of postbuild events? Have you tried msbuild and seen a &#8220;cannot build XXXXX.csproj because DataContracts.cs was not found&#8221; error? Then keep reading.</p>
<h2>What</h2>
<p><a href="http://en.wikipedia.org/wiki/MSBuild"><font color="#1982d1">MsBuild</font></a> is the &#8220;next generation&#8221; <a href="http://en.wikipedia.org/wiki/Nmake#Modern_versions"><font color="#1982d1">nmake </font></a>for Visual Studio. It&#8217;s been available since .NET 2.0 and has been bundled with Visual Studio since MSVC2008.</p>
<h2>Same project files&#8230;</h2>
<p>You don&#8217;t need to feed msbuild special project files (such as the Makefiles nmake required), it is smart enough to understand Visual Studio solutions.</p>
<h2>&#8230; yet slightly different behavior</h2>
<p>MsBuild does not behave 100% like Visual Studio (devenv), specifically in regards to:</p>
<ol><li>Dependencies</li><li>When events are run</li><li>When byproducts and referenced projects are copied</li></ol>
<p>In general, this will affect you whenever you use postbuild events to generate source code or binaries which are required immediately.</p>
<p>In the project I am involved now, this is especially important when generating datacontracts. We use a Visual Studio post-build event.</p>
<h3>Dependencies</h3>
<p>There are two kinds of ways to express project-to-project dependencies:</p>
<ul><li>Project to project references (Add Reference-&gt;Project tab) [this mechanism also handles gathering the referenced output file as well]. For .csproj, this is persisted as a &lt;ProjectReference&gt; item in the project file.</li><li>Explicitly specified dependencies (Solution properties-&gt;Project Dependencies) [with this mechanism you would usually also add a File Reference to the referenced output yourself]. This writes the &#8220;ProjectSection(ProjectDependencies)&#8221; section in the .sln.</li></ul>
<p>There seems to be <a href="http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/80cc6447-b720-4806-8395-7c257b207613/"><font color="#1982d1">a long standing bug</font></a> which makes msbuild not take all the dependencies into account.</p>
<p>As a consequence, a solution may build fine in Visual Studio (devenv) but not build at all with msbuild. I would say this bug is fixed in VS2010SP1, but I cannot tell 100% sure because I have not performed enough testing.</p>
<p>In addition to that, never add a dependency as a reference-to-DLL if that DLL is part of of your solution (.sln). Both MsBuild and DevEnv will choke when you switch from Debug to Release, because you would be setting a reference to a Debug DLL from a Release project, or viceversa (unless you use $(ConfigurationName) in your path, of course, but people rarely remember to do that).</p>
<h3>When events are run</h3>
<p>MsBuild runs the postbuild event before copying the byproducts to the output path</p>
<p>Visual Studio (devenv) runs the postbuild event after copying the byproducts to the output path</p>
<p>This can be solved by writing an AfterBuild event manually in the .csproj, but it is quite inconvenient because there is no GUI in Visual Studio to add, edit or remove AfterBuild events. You are alone with your text editor.</p>
<h3>When byproducts and references are copied</h3>
<p>As said above, msbuild runs the postbuild event before copying the byproducts. No only that: msbuild runs the postbuild event before copying the referenced projects (DLLs) to the output path.</p>
<p>Visual Studio (devenv), on the other hand, runs the postbuild event after copying the byproduct and its referenced projects to the output path.</p>
<h2>In summary</h2>
<h3>DevEnv</h3>
<ol><li>Compile</li><li>Copy byproducts (DLLs, executables, etc)</li><li>Copy byproducts&#8217; referenced project output (DLLs, etc)</li><li>Run postbuild event</li></ol>
<h3>MsBuild</h3>
<ol><li>Compile</li><li>Run postbuild event</li><li>Copy byproducts (DLLs, executables, etc)</li><li>Copy byproducts&#8217; referenced project output (DLLs, etc)</li></ol>
<h2>Workaround</h2>
<p>If you need the compilation byproducts in the post-build event (as is generally the case when generating datacontracts in the postbuild event), you will need a workaround.</p>
<p>You would think it&#8217;d be possible to tell MsBuild to behave like devenv, right? Wrong. It is not possible.</p>
<p>The only possible workaround I have found is to manually copy the result of the compilation to the output path in the postbuild event. Something like this:</p>
<p style="font-family: Cousine, 'Courier New', sans-serif">call &#8220;%VS100COMNTOOLS%\vsvars32.bat&#8221;</p>
<p>if exist &#8220;$(ProjectDir)Temp&#8221; del /s /f /q &#8220;$(ProjectDir)Temp&#8221;</p>
<p><span style="color: rgb(255,0,0)">copy $(ProjectDir)\obj\$(ConfigurationName)\$(TargetName).dll .</span></p>
<p>svcutil /t:metadata /dataContractOnly /directory:$(ProjectDir)Temp\DataContract $(TargetName).dll</p>
<p>svcutil /t:code /dataContractOnly /r:$(ProjectDir)..\MyProject.Data.DataContract\bin\$(ConfigurationName)\MyProject.Data.dll /directory:$(ProjectDir)..\$(ProjectName).DataContract /out:DataContracts.cs $(ProjectDir)Temp\DataContract\*.xsd</p>
<p>(where &#8220;.&#8221; is the output path, the solution generally runs from there; usually you will only need to copy &amp; paste this line to your postbuild event).</p>
<p>Not nice, but it works. </p></div><img src ="http://www.cnitblog.com/ideallorn/aggbug/77641.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2012-02-17 18:07 <a href="http://www.cnitblog.com/ideallorn/archive/2012/02/17/77641.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Web2py  无耻Patch笔记之一 MSSQL Trusted_Conection</title><link>http://www.cnitblog.com/ideallorn/archive/2012/02/09/77537.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Thu, 09 Feb 2012 10:28:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2012/02/09/77537.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/77537.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2012/02/09/77537.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/77537.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/77537.html</trackback:ping><description><![CDATA[工作需要做个小网站，机缘巧合选择了web2py. 没有用Django的原因是之前三年前整过Django 但是当时没怎么整明白 有心理阴影了 ....<br /><br />Web2py上手还是比较简单的，但问题还是不少 (v1.99.4).<br />按说明上的MSSQL的设置来连接MSSQL DB 没问题， 前提是你用的是数据库用户登录。<br />但想我公司这种用windows authentication就麻烦了. 只好自己改.<br /><br />db.py里面我这么写<br />&nbsp;&nbsp; <div>msdb = DAL('mssql://user:passwd@msdbserver/msdb?Trusted_Conection=Yes')</div><br />gulon/dal.py里面的l2209行里我无耻的改动如下<br /><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if uri.find('Trusted_Conection') &gt; 0:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cnxn ='SERVER=%s;PORT=%s;DATABASE=%s;Trusted_Conection=Yes;%s' % (host, port, db, urlargs)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cnxn = 'SERVER=%s;PORT=%s;DATABASE=%s;UID=%s;PWD=%s;%s' \<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; % (host, port, db, user, password, urlargs)</div><br />总之是可以Trusted_Conection windows authentication连接操纵数据库了.<img src ="http://www.cnitblog.com/ideallorn/aggbug/77537.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2012-02-09 18:28 <a href="http://www.cnitblog.com/ideallorn/archive/2012/02/09/77537.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>svn: error while loading shared libraries: /usr/local/lib/libsvn_ra_dav-1.so.0: cannot restore segment port after reloc: Permission denied </title><link>http://www.cnitblog.com/ideallorn/archive/2009/03/04/55093.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Wed, 04 Mar 2009 05:20:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2009/03/04/55093.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/55093.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2009/03/04/55093.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/55093.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/55093.html</trackback:ping><description><![CDATA[<pre wrap="">http://wiki.yfang.cn/bin/view/MyTroubleShooting/Svn:ErrorWhileLoadingSharedLibraries:Libsvn_ra_dav-1_so_0:CannotRestoreSegmentPortAfterReloc:PermissionDenied<br><br>最简单的方法就是关闭 SELinux<br><br></pre>
<h3>问题描述 </h3>
<ul>
    <li> <code>时间</code> 2008.10.14
    </li>
    <li> <code>环境</code> <ntop>CentOS5
    </ntop></li>
    <li> <code>症状</code> 正常安装svn后执行不能
    </li>
</ul>
<div class="BeautifierPlugin">
<div class="fragment">
<pre><font color="green"># 执行svn命令，会提示</font><br>[root@localhost lib]<font color="green"># svn</font><br>svn: error <font color="brown">while</font> loading shared libraries: /usr/local/svn-1.4.0/lib/libsvn_ra_dav-1.so.0: <br>cannot restore segment prot after reloc: Permission denied</pre>
</div>
</div>
<h3><a name="问题原因和解决方案"></a> 问题原因和解决方案 </h3>
<ul>
    <li> 非常快的排除了系统文件权限（就是那个chmod能改的lrwxrwxrwx）可能，因为这是一个符号链接，一直追过去权限没有问题
    </li>
    <li> 不卖关子，这个问题的原因是因为SELinux被Enable但是没有配置过libsvn_ra_dav-1.so.0文件的security context的原因，为了检查这个问题，你可以执行下面的命令来确认
    </li>
</ul>
<div class="BeautifierPlugin">
<div class="fragment">
<pre><font color="green"># sestatus [-v] </font><br><font color="green"># 注意里面 SELinux status:         enabled 部分</font><br><br><font color="green"># 其他方法也可以查看，比如</font><br><font color="navy">cat</font> /selinux/enforce<br>1 代表 enforcing 状态, 0 代表 permissive 状态<br><br><font color="green"># 或者下面这个更直观</font><br>getenforce</pre>
</div>
</div>
<ul>
    <li> 通常有两种解决方案
    <ul>
        <li>
        方案一：避开问题，如果你提出了这个问题并为之困惑，我基本上可以判断你并不熟悉SElinux的工作性质，甚至从来没有注意过它的存在。基于这种考虑，
        如果你联系你们的服务器管理员后确认SElinux不是你们系统中必须的，那么把它干掉吧。具体方法是执行setenforce
        disabled来禁用selinux，或者至少setenforce
        permissive来用warning代替禁止你工作的error级错误，这样Selinux就不再强悍的把你挡掉了。同样的配置实现在CentOS5
        或者RHEL5中可以通过system-config-securitylevel-tui来设定，它包装了这个小功能。 </li>
        <li> 方案二：继续Enable SElinux的情况下，你需要针对这件事做的操作也很简单，执行下面的命令更改security context就可以了，问题是，你可能今后亦然遇到这种类似的问题，你需要比较了解SElinux的机制和你的应用程序的底层调用。
        </li>
    </ul>
    </li>
</ul>
<div class="BeautifierPlugin">
<div class="fragment">
<pre>chcon <font color="purple">-t</font> texrel_shlib_t /usr/local/svn-1.4.0/lib/libsvn_ra_dav-1.so.0</pre>
</div>
</div>
<p>
</p>
<h3><a name="多说两句"></a> 多说两句 </h3>
<ul>
    <li> SElinux对于Linux新手来说可能是一个比较难于理解的工具，对于一般的新手系统管理员来说，你可以先跳过这个工具，简单的disable掉它。
    </li>
    <li>
    SElinux很大程度上解决了简单的权限认证不能够保证系统真正安全的问题，是美国军方提出的。所以对于系统复杂，分工详细，安全要求比较高的系统来
    说，这是一个好东西，不过同时带来的是较为复杂的设置（一般非常强大的可定制工具都是这样），要求管理员对系统和程序比较了解，否则可能把自己希望的服务
    挡掉继而出现本文提到的类似问题。
    </li>
    <li> 感兴趣的朋友可以直接查看SElinux的官方文档，来获取更多消息。
    </li>
</ul>
<p>
</p>
<h3><a name="SElinux可能涉及到的命令"></a> SElinux可能涉及到的命令 </h3>
<div class="BeautifierPlugin">
<div class="fragment">
<pre><font color="green"># 查看SElinux Enable情况</font><br>sestatus<br>getenforce<br><br><font color="green"># 设定SElinux是否启用</font><br>setenforce<br><br><font color="green"># 防火墙管理的TUI，可以设定Selinux状态</font><br>system-config-securitylevel-tui<br><br><font color="green"># 查看当前用户security context</font><br>id -Z<br><br><font color="green"># 查看文件security context</font><br>ls -Z<br>ls --lcontext <br>ls --scontext<br><br><font color="green"># 查看运行进程的security context</font><br><font color="navy">ps</font> -eZ<br><br><font color="green"># 更改文件security context</font><br>chcon<br><br><font color="green"># 重置文件security context</font><br>restorecon<br><br><font color="green"># 根据已有的挡掉的log生成允许的规则，可以帮助你调试当前规则</font><br><font color="navy">cat</font> /var/log/message | audit2allow<br>audit2allow <font color="purple">-d</font> <font color="green">#这个是从dmesg里读</font></pre>
</div>
</div>
<pre wrap=""><br></pre><img src ="http://www.cnitblog.com/ideallorn/aggbug/55093.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2009-03-04 13:20 <a href="http://www.cnitblog.com/ideallorn/archive/2009/03/04/55093.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>RH64位系统上编译安装SVN</title><link>http://www.cnitblog.com/ideallorn/archive/2009/02/20/54758.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Fri, 20 Feb 2009 03:40:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2009/02/20/54758.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/54758.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2009/02/20/54758.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/54758.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/54758.html</trackback:ping><description><![CDATA[SVN在RH32位系统上通常按照常规的方法很容易编译通过，但到了64位系统上却经常会出现等链接错误<br><font size="3"><font face="MS Shell Dlg"><font color="#000000"><br>subversion-1.4.5/neon/src/.libs/libneon.a: could not read symbols: Bad value</font></font></font><br><font size="3"><font face="宋体">collect2: ld returned 1 exit status</font></font><br><br>Google了一下，找到如下解决方法<br><br>1. 解压<span style="font-family: MS Shell Dlg;">两个包后</span><font size="3"><font face="MS Shell Dlg"><font color="#000000"><br>$ tar jxvf subversion-1.4.5.tar.bz2 .
<br>$ tar jxvf subversion-deps-1.4.5.tar.bz2 .</font></font></font><br>2. 分别编译 apr,apr-util, neon (一样的configure 选项)<br>cd apr<br><font size="3">./configure --prefix=$HOME --without-berkeley-db      --with-editor=/usr/bin/vim --with-apr=$HOME      --with-apr-util=$HOME --with-neon=$HOME      --without-apxs --without-apache --enable-shared --with-ssl<br>make &amp;&amp; make install<br>...<br>3. 最后再编译svn<br></font><font size="3">./configure --prefix=$HOME --without-berkeley-db
--with-editor=/usr/bin/vim --with-apr=$HOME --with-apr-util=$HOME
--with-neon=$HOME --without-apxs --without-apache --enable-shared
--with-ssl<br>
make &amp;&amp; make install</font><br><br><img src ="http://www.cnitblog.com/ideallorn/aggbug/54758.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2009-02-20 11:40 <a href="http://www.cnitblog.com/ideallorn/archive/2009/02/20/54758.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Dump&amp;Load project cross repos in SVN </title><link>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54290.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Thu, 05 Feb 2009 09:01:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54290.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/54290.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54290.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/54290.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/54290.html</trackback:ping><description><![CDATA[<ul>
    <li> dump the source repos (sandbox)
    </li>
</ul>
<pre>        -bash-3.00$ sudo svnadmin dump /var/svnroot/sandbox &gt; sbdump<br>        ...<br>        * Dumped revision 1870.<br>        * Dumped revision 1871.<br>        * Dumped revision 1872.<br></pre>
<ul>
    <li> filter the specified project from source repos dump file
    </li>
</ul>
<pre>        -bash-3.00$ sudo cat sbdump | svndumpfilter include msmp &gt; msmpdump<br>        ...<br>        -bash-3.00$ ls *dump<br>        msmpdump  sbdump<br></pre>
<ul>
    <li> load the project to dest repos with specified parent path
    </li>
</ul>
<pre>        -bash-3.00$ sudo svnadmin load /var/svnroot/svn1 --parent-dir /trunk/src &lt; msmpdump<br>        ...<br></pre>
<p>
</p>
<h2><a name="Related_Topics"></a></h2><img src ="http://www.cnitblog.com/ideallorn/aggbug/54290.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2009-02-05 17:01 <a href="http://www.cnitblog.com/ideallorn/archive/2009/02/05/54290.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Add open-terminal in the right click on Fedora 6+ </title><link>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54287.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Thu, 05 Feb 2009 08:49:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54287.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/54287.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54287.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/54287.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/54287.html</trackback:ping><description><![CDATA[<ul>
    <li>yum install nautilus-open-terminal </li>
</ul><img src ="http://www.cnitblog.com/ideallorn/aggbug/54287.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2009-02-05 16:49 <a href="http://www.cnitblog.com/ideallorn/archive/2009/02/05/54287.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Solve the conflict between service 'messagebus' and 'openldap' on Fedora 9 </title><link>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54288.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Thu, 05 Feb 2009 08:49:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54288.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/54288.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54288.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/54288.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/54288.html</trackback:ping><description><![CDATA[<ul>
    <li>add 'bind_policy soft' in /etc/ldap.conf </li>
</ul><img src ="http://www.cnitblog.com/ideallorn/aggbug/54288.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2009-02-05 16:49 <a href="http://www.cnitblog.com/ideallorn/archive/2009/02/05/54288.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Print with linage on gvim </title><link>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54286.html</link><dc:creator>releng</dc:creator><author>releng</author><pubDate>Thu, 05 Feb 2009 08:48:00 GMT</pubDate><guid>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54286.html</guid><wfw:comment>http://www.cnitblog.com/ideallorn/comments/54286.html</wfw:comment><comments>http://www.cnitblog.com/ideallorn/archive/2009/02/05/54286.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/ideallorn/comments/commentRss/54286.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/ideallorn/services/trackbacks/54286.html</trackback:ping><description><![CDATA[<ul>
    <li>set printoptions=number:y </li>
</ul>
<img src ="http://www.cnitblog.com/ideallorn/aggbug/54286.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/ideallorn/" target="_blank">releng</a> 2009-02-05 16:48 <a href="http://www.cnitblog.com/ideallorn/archive/2009/02/05/54286.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>