<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>harry.blog &#187; Linux</title>
	<atom:link href="http://blog.harrspy.com/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.harrspy.com</link>
	<description>留住往昔的美丽，去开创未来的光明。</description>
	<lastBuildDate>Wed, 01 Sep 2010 14:30:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>使用apache2-mpm-itk为apache的虚拟主机指定单独的用户运行</title>
		<link>http://blog.harrspy.com/apache2-mpm-itk</link>
		<comments>http://blog.harrspy.com/apache2-mpm-itk#comments</comments>
		<pubDate>Sun, 04 Apr 2010 16:18:28 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.harrspy.com/?p=215</guid>
		<description><![CDATA[在用Python和django写一个类似github的程序，当然功能是非常少的，目前只想做到可以创建git仓库，自行管理ssh公钥还有些基本的权限控制。 在ssh公钥管理这里，其实就是管理Linux用户目录下的.ssh/authorized_keys文件，当用户提交公钥时，向这个文件里写入公钥内容。 authorized_keys的权限设置非常严格，只有当除了用户自己可以有写权限外，组权限和其他权限都不能有写入的权限才行，否则这个文件就无效，即使把公钥写入这个文件，通过ssh登录到该用户时还是需要输入密码，这是ssh出于安全的考虑，防止由于用户自己对权限设置不当而造成安全问题。 但是现在我要通过web界面管理这个文件，那么读写这个文件的用户就是运行web服务器的用户，一般来说运行apache的用户是www-data，那么就无法写入了，我本身对apache也只会一些最基本的配置，然后就搜阿搜。。。 搜到一个suexec，然后装啊，设置阿，测试阿，弄了半天不是太明白，也没成功，运行虚拟主机的用户仍旧是www-data。 然后继续搜阿搜，找到个文章： Running apache2 virtualhost with different users 然后按照里面说的装了 apache2-mpm-itk $ sudo apt-get install apache2-mpm-itk 在apache的VirtualHost里加入 &#60;IfModule mpm_itk_module&#62; AssignUserId git git &#60;/IfModule&#62; AssignUserId 后面2个参数一个是运行该虚拟主机的用户，另一个就是组。 我把所有git仓库都放在一个叫git的linux用户目录下作为git服务器，所以AssignUserId就是 git git。 最后把django项目下的所有文件的用户和组都设置为git，重启apache，测试后果然就可以了。 使用这个mpm_itk非常方便，之前搜到的suexec我虽然没弄成功过，但是了解下来似乎python程序要通过fastcgi方式运行才行。 我现在django的运行方式是，apache+mod_wsgi，用mpm_itk后同样可以达到效果了。]]></description>
			<content:encoded><![CDATA[<p>在用Python和django写一个类似<a href="http://github.com/" target="_blank">github</a>的程序，当然功能是非常少的，目前只想做到可以创建git仓库，自行管理ssh公钥还有些基本的权限控制。</p>
<p>在ssh公钥管理这里，其实就是管理Linux用户目录下的.ssh/authorized_keys文件，当用户提交公钥时，向这个文件里写入公钥内容。</p>
<p>authorized_keys的权限设置非常严格，只有当除了用户自己可以有写权限外，组权限和其他权限都不能有写入的权限才行，否则这个文件就无效，即使把公钥写入这个文件，通过ssh登录到该用户时还是需要输入密码，这是ssh出于安全的考虑，防止由于用户自己对权限设置不当而造成安全问题。</p>
<p>但是现在我要通过web界面管理这个文件，那么读写这个文件的用户就是运行web服务器的用户，一般来说运行apache的用户是www-data，那么就无法写入了，我本身对apache也只会一些最基本的配置，然后就搜阿搜。。。</p>
<p>搜到一个suexec，然后装啊，设置阿，测试阿，弄了半天不是太明白，也没成功，运行虚拟主机的用户仍旧是www-data。</p>
<p>然后继续搜阿搜，找到个文章： <a href="http://blog.andreaolivato.net/open-source/running-apache2-virtualhost-with-different-users.html" target="_blank">Running apache2 virtualhost with different users</a></p>
<p>然后按照里面说的装了 apache2-mpm-itk</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2-mpm-itk</pre></div></div>

<p>在apache的VirtualHost里加入</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;IfModule</span> mpm_itk_module<span style="color: #000000; font-weight: bold;">&gt;</span></span>
   AssignUserId git git
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>AssignUserId 后面2个参数一个是运行该虚拟主机的用户，另一个就是组。<br />
我把所有git仓库都放在一个叫git的linux用户目录下作为git服务器，所以AssignUserId就是 git git。</p>
<p>最后把django项目下的所有文件的用户和组都设置为git，重启apache，测试后果然就可以了。</p>
<p>使用这个mpm_itk非常方便，之前搜到的suexec我虽然没弄成功过，但是了解下来似乎python程序要通过fastcgi方式运行才行。</p>
<p>我现在django的运行方式是，apache+mod_wsgi，用mpm_itk后同样可以达到效果了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/apache2-mpm-itk/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Linux下使用Flash Builder</title>
		<link>http://blog.harrspy.com/flashbuilder-on-linux</link>
		<comments>http://blog.harrspy.com/flashbuilder-on-linux#comments</comments>
		<pubDate>Sun, 22 Nov 2009 08:17:16 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[FlashBuilder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.harryxu.cn/?p=207</guid>
		<description><![CDATA[Adobe官方就是不肯弄个可以在Linux下使用的FB，不过有个牛人自己移植了一下，果然能用了。 具体的可以看 http://code.google.com/p/fb4linux/ 如果是 Eclipse 3.3，安装方法可以看这篇 。 但是Eclipse 3.4开始就找不到 Add->Extension Location 了，不过方法更简单，就是下载他提供的文件解压后，放到 Eclipse目录里的 dropins 目录中就行，也可以直接做个连接放进去，重启eclipse就可以看到能用FB了。 不过那个压缩包里是没有Flex sdk的，自己去下载后配置下就能用了。]]></description>
			<content:encoded><![CDATA[<p>Adobe官方就是不肯弄个可以在Linux下使用的FB，不过有个牛人自己移植了一下，果然能用了。<br />
具体的可以看 <a href="http://code.google.com/p/fb4linux/"  target="_blank">http://code.google.com/p/fb4linux/</a></p>
<p>如果是 Eclipse 3.3，安装方法可以看<a href="http://218.65.19.25/2009/11/17/686/" target="_blank">这篇 </a>。<br />
但是Eclipse 3.4开始就找不到 Add->Extension Location 了，不过方法更简单，就是下载他提供的文件解压后，放到 Eclipse目录里的 dropins 目录中就行，也可以直接做个连接放进去，重启eclipse就可以看到能用FB了。</p>
<p>不过那个压缩包里是没有Flex sdk的，自己去下载后配置下就能用了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/flashbuilder-on-linux/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>用过腾讯官方的Linux QQ了</title>
		<link>http://blog.harrspy.com/try-tencent-qq-for-linux</link>
		<comments>http://blog.harrspy.com/try-tencent-qq-for-linux#comments</comments>
		<pubDate>Thu, 31 Jul 2008 12:03:03 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[qq]]></category>

		<guid isPermaLink="false">http://harryxu.cn/blog/?p=182</guid>
		<description><![CDATA[实在太简陋了-___-!! ，还是继续用eva，等官方的完善些再用吧&#8230;]]></description>
			<content:encoded><![CDATA[<p>实在太简陋了-___-!! ，还是继续用eva，等官方的完善些再用吧&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/try-tencent-qq-for-linux/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>试用了Adobe AIR for Linux</title>
		<link>http://blog.harrspy.com/try-adobe-air-for-linux</link>
		<comments>http://blog.harrspy.com/try-adobe-air-for-linux#comments</comments>
		<pubDate>Tue, 01 Apr 2008 12:45:13 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://harryxu.cn/blog/?p=168</guid>
		<description><![CDATA[听说Adobe AIR 发布了Linux版本，虽然还是预览版，但还是等不急下载了一个试用下。 在安装之前已经知道目前的版本还没有象Windows和mac上的完整功能，有些特性在Linux下还没有得到支持，装好Run Time后，装了一个Twhirl试用了一下，感觉基本运行没什么问题，但简单使用一下后，就能发现一些还没有支持的特性。 一个是不规则窗口，看下图，周边没有透明，而是黑色 另外输入文字的时候，似乎还不能切换输入法，还有发现没有支持系统托盘图标，点了twhirl的最小化按钮后，就不见了，没有在托盘里显示出图标，只能关进程了。 暂时就发现这些，其他程序还没尝试，虽然Linux下的AIR看上去还很不完整，但是我对他很满意，毕竟还是Alpha版本，相信正式发布后会有完整的支持。 这次Adobe还加入了Linux基金会，看来Linux是越来越受重视了，哈哈，期待。]]></description>
			<content:encoded><![CDATA[<p>听说Adobe AIR 发布了Linux版本，虽然还是预览版，但还是等不急下载了一个试用下。</p>
<p>在安装之前已经知道目前的版本还没有象Windows和mac上的完整功能，有些特性在Linux下还没有得到支持，装好Run Time后，装了一个Twhirl试用了一下，感觉基本运行没什么问题，但简单使用一下后，就能发现一些还没有支持的特性。</p>
<p>一个是不规则窗口，看下图，周边没有透明，而是黑色</p>
<p><img src="http://pic.yupoo.com/harryxu/70442555a2e0/zn50f51f.jpg" alt="" /></p>
<p>另外输入文字的时候，似乎还不能切换输入法，还有发现没有支持系统托盘图标，点了twhirl的最小化按钮后，就不见了，没有在托盘里显示出图标，只能关进程了。</p>
<p>暂时就发现这些，其他程序还没尝试，虽然Linux下的AIR看上去还很不完整，但是我对他很满意，毕竟还是Alpha版本，相信正式发布后会有完整的支持。</p>
<p>这次Adobe还加入了Linux基金会，看来Linux是越来越受重视了，哈哈，期待。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/try-adobe-air-for-linux/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>搞定portable Ubuntu 了</title>
		<link>http://blog.harrspy.com/portalbe-ubuntu-installed</link>
		<comments>http://blog.harrspy.com/portalbe-ubuntu-installed#comments</comments>
		<pubDate>Mon, 18 Feb 2008 15:40:13 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[portable]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://harryxu.cn/blog/%e6%90%9e%e5%ae%9aprotable-ubuntu-%e4%ba%86</guid>
		<description><![CDATA[用Vmware 虚拟机安装的方法分区过程中出了个问题，也不高兴折腾了，直接把台式机的硬盘全拔了，插上移动硬盘后用livecd安装，一切顺利，安装好后拔下移动硬盘，一个移动版的ubuntu就搞定了哈哈，插在笔记本上启动也非常顺利，这样随时随地都可以用了，hoho。]]></description>
			<content:encoded><![CDATA[<p>用Vmware 虚拟机安装的方法分区过程中出了个问题，也不高兴折腾了，直接把台式机的硬盘全拔了，插上移动硬盘后用livecd安装，一切顺利，安装好后拔下移动硬盘，一个移动版的ubuntu就搞定了哈哈，插在笔记本上启动也非常顺利，这样随时随地都可以用了，hoho。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/portalbe-ubuntu-installed/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu下的图形界面SVN客户端 &#8211; eSvn</title>
		<link>http://blog.harrspy.com/esvn-on-ubuntu</link>
		<comments>http://blog.harrspy.com/esvn-on-ubuntu#comments</comments>
		<pubDate>Wed, 05 Dec 2007 13:04:21 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[esvn]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://harryxu.cn/blog/esvn-on-ubuntu</guid>
		<description><![CDATA[虽然不像Windows里的乌龟svn那样直接右键文件夹就能使用，不过也很不错了，总比用命令行要方便许多。 另外一个选择就是安装Eclipse的Subclipse插件，装一个独立的客户端就是为了随时可以更新代码而不需要开Eclipse。 安装方法： sudo apt-get install esvn]]></description>
			<content:encoded><![CDATA[<p>虽然不像Windows里的乌龟svn那样直接右键文件夹就能使用，不过也很不错了，总比用命令行要方便许多。<br />
另外一个选择就是安装Eclipse的Subclipse插件，装一个独立的客户端就是为了随时可以更新代码而不需要开Eclipse。<br />
<br />
安装方法： <code>sudo apt-get install esvn</code></p>
<p><highslide image="http://photo15.yupoo.com/20071205/210236_815572749_uxlhijyw.jpg" thumbnail="http://photo15.yupoo.com/20071205/210236_815572749_m.jpg" altdesc="" captiontext="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/esvn-on-ubuntu/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>装好Flex Builder for Linux 了</title>
		<link>http://blog.harrspy.com/install-flex-builder-for-linux-alpha</link>
		<comments>http://blog.harrspy.com/install-flex-builder-for-linux-alpha#comments</comments>
		<pubDate>Fri, 30 Nov 2007 15:45:17 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[flexbuilder]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://harryxu.cn/blog/%e8%a3%85%e5%a5%bdflex-builder-for-linux-%e4%ba%86</guid>
		<description><![CDATA[用了几天Ubuntu（这几天我的笔记本还没进过Windows，哈哈），配置的差不多了，今天从Adobe下载并安装了 Flex Builder Linux，终于可以在Ubuntu下写AS了。 FB的安装过程还是挺顺利，就是之前安装Java-sdk折腾了一点时间，一开始我用的都是Ubuntu7.10默认的软件源，在apt-get中找不到Java6 sdk，然后到sun去下载最新的java sdk的bin文件，接着想照着网上的教程打包成deb安装，结果在打包成deb这一步怎么都不成功。。。。 最后还是乖乖的换了其他的源，通过apt-get顺利的安装了jre和jdk 6 照着Adobe网站上的安装说明，在终端中输入 (安装FB之前别忘了配置JAVA_HOME) sh flexbuilder_linux_install_a1_100207.bin 回车后，过不一会就会出现和Windows中差不多的安装界面了，接着一步步照着提示安装就行了，就是目前Adobe提供的Flex Builder Linux仅有Eclipse插件版本，无独立版，所以安装前要先下载好Eclipse3.3。 最后，还有一个提示，就是运行的时候，不要直接运行eclipse，而是运行 Adobe_Flex_Builder_Linux 安装目录中的 Adobe_Flex_builder.sh ，运行这个文件是因为该文件为FB配置了Flash Player的路径，这样在FB中debug的时候，如果不是运行在浏览器中，而是运行独立FlashPlayer的时候，FB不会出现找不到FlashPlayer的现象。]]></description>
			<content:encoded><![CDATA[<p>用了几天Ubuntu（这几天我的笔记本还没进过Windows，哈哈），配置的差不多了，今天从Adobe下载并安装了 <a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/" target="_blank">Flex Builder Linux</a>，终于可以在Ubuntu下写AS了。<br />
<br />
FB的安装过程还是挺顺利，就是之前安装Java-sdk折腾了一点时间，一开始我用的都是Ubuntu7.10默认的软件源，在apt-get中找不到Java6 sdk，然后到sun去下载最新的java sdk的bin文件，接着想照着网上的教程打包成deb安装，结果在打包成deb这一步怎么都不成功。。。。<br />
<br />
最后还是乖乖的换了其他的源，通过apt-get顺利的安装了jre和jdk 6<br />
照着Adobe网站上的安装说明，在终端中输入 <small>(安装FB之前别忘了配置JAVA_HOME)</small><br />
<code>sh flexbuilder_linux_install_a1_100207.bin</code><br />
回车后，过不一会就会出现和Windows中差不多的安装界面了，接着一步步照着提示安装就行了，就是目前Adobe提供的Flex Builder Linux仅有Eclipse插件版本，无独立版，所以安装前要先下载好Eclipse3.3。<br />
<br />
最后，还有一个提示，就是运行的时候，不要直接运行eclipse，而是运行 Adobe_Flex_Builder_Linux 安装目录中的 Adobe_Flex_builder.sh ，运行这个文件是因为该文件为FB配置了Flash Player的路径，这样在FB中debug的时候，如果不是运行在浏览器中，而是运行独立FlashPlayer的时候，FB不会出现找不到FlashPlayer的现象。 <img src='http://blog.harrspy.com/wp-includes/images/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/install-flex-builder-for-linux-alpha/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
