Merge branch 'LCTT/master'

This commit is contained in:
linuhap
2014-05-20 08:14:09 +08:00
22 changed files with 1687 additions and 320 deletions

View File

@@ -19,7 +19,7 @@
#### 2.运行 uname -m 命令 ####
一个很相似但是略有不同的方法是执行 uname -m 命令
上面的命令内涵太多了,可以用这个参数直指人心:uname -m
例如,在我的系统里,它显示了以下信息:
@@ -30,7 +30,7 @@
#### 3.使用 file 命令####
尽管这像是一种黑客行为,但是仍然不失为一种达到目的的方法。使用这个方法,需要你运行 file 命令并带上 **/sbin/init** 作为参数。
尽管这样做纯粹是炫耀技巧,但是仍然不失为一种达到目的的方法。使用这个方法,需要你运行 file 命令并带上 **/sbin/init** 作为参数。
举个例子:
@@ -41,7 +41,7 @@
#### 4. 使用 arch 命令 ####
另外一个可以选择的方法是使用 arch 命令,这个命令用于打印机器的硬件名称。
另外一个可以选择的方法是使用 arch 命令这个命令用于输出机器的硬件名称。
这里有一个示例:
@@ -52,7 +52,7 @@
#### 5. 通过系统设置的方法 ####
如果你使用的是 Ubuntu 12.04 或更高, 你可以很简单地在** AllSettings -> Details**里查看你的系统结构。
如果你使用的是 Ubuntu 12.04 或更高, 你可以很简单地在** All Settings -> Details**里查看你的系统结构。
![details](http://mylinuxbook.com/wp-content/uploads/2014/04/details.png)

View File

@@ -0,0 +1,78 @@
Ubuntu每日小技巧-Ubuntu One关闭后如何切换到Dropbox或Box云服务
==============================================================
Canonical公司决定关闭Ubuntu One的云服务你可能正在寻找备份你主机的其他服务器尽管现在有很多云服务的提供商但是大服务商中仅有小部分支持包括Ubuntu在内的linux。
Dropbox全面支持Ubuntu它有一个很好的整合了ubuntu桌面系统和其他通知栏的客户端。Box官方的Box.net也可以通过WebDav协议支持linux。
这里有一段来自Canonical公司关于Ubuntu One的摘录
> 从4月2日开始就不能访问Ubuntu One中的存储或音乐了。Ubuntu One服务也不会再包含在Ubuntu 14.04 LTS中而Ubuntu One的应用也将从Ubuntu、Google和Apple的应用商店移除。
也就是说我们在ubuntu中失去了这项有用的服务。另一方面把你的数据移动到一个更稳定、更好信誉的网盘提供商是一个比较好的选择。
这里简要的说明一下怎样在ubuntu中运行DropBox或者Box云服务。
###在ubuntu中安装DropBox云盘
关于这个话题我们已经写了很多为了在ubuntu中安装DropBox云盘你需要按照以下步骤去做这里提供了一个在ubuntu中一步步安装和使用DropBox的步骤。
查看完整步骤,点这里,或者下面的链接:
http://www.liberiangeek.net/2013/03/how-to-install-dropbox-in-ubuntu-13-04-raring-ringtail/
###在Ubuntu中使用Box网盘
自从Box不再提供给包括ubuntu在内的linux一个全功能客户端你就必须使用WebDav协议来访问和存储你账户的东西。
按Ctrl Alt T来打开终端终端被打开后执行下面的命令来安装包
sudo apt-get install davfs2
接下来执行下面的命令来配置davfs2选择Yes来允许没有权限的用户来挂载WebDav资源。
sudo dpkg-reconfigure davfs2
接下来通过执行下面的命令把davfs2目录复制到你的home目录
sudo cp -r /etc/davfs2/ $HOME/.davfs2
然后执行下面命令获取文件夹的所有权:
sudo chown -R username $HOME/.davfs2/
用你的用户名代替username
接下来打开密码文件输入你的登录凭证:
gedit ~/.davfs2/secrets
然后键入你的用户名email地址和密码在文件末尾添加下面的行并保存。
https://dav.box.com/dav richard@liberiangeek.net <box_password>
用你的账户信息替换上面的email地址和password。
接下来用下面的命令添加你的账户到davfs2组中
sudo adduser <username> davfs2
然后用sudo gedit /etc/fstab 打开/etc/fstab在后面添加下面一行并保存
https://dav.box.com/dav/ /home/<username>/box davfs _netdev,rw,user 0 0
最后创建一个挂载点并挂载Box
mkdir ~/box
重启你的电脑Box能开机自动挂载了
享受下吧!
------------------
via: http://www.liberiangeek.net/2014/04/daily-ubuntu-tips-ubuntu-one-shuts-down-switch-to-dropbox-or-box-cloud-services/
译者:[yujianxuechuan ](https://github.com/yujianxuechuan ) 校对:[wxy](https://github.com/校wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@@ -1,25 +1,25 @@
极限理论游戏开发者转到Linux开发原因是Windows很烦人
Limit Theory游戏开发者转到Linux开发原因是Windows很烦人
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/Limit-Theory-Developer-Switches-to-Linux-Because-Windows-is-Annoying-441642-3.jpg)
极限理论一个无限的程序性的空间模拟游戏这个游戏的开发者仅一个人游戏将会发布Linux、Windows和Mac OS X版本。开发者宣布从Windows平台转到Linux上主要是因为他不耐烦了。
极限理论Limit Theory,一个无限的程序性的空间模拟游戏,这个游戏的开发者仅一个人,游戏将会发布Linux、Windows和Mac OS X。开发者宣布从Windows平台转到Linux上主要是因为他不耐烦了。
极限理论听起来像一个不可能的项目特别是对于它是由一个人开发。游戏的开发者Josh Parnell自己已经努力建立一个美丽的宇宙并提供对三个不同平台的支持。
他能够这样做是因为这个游戏用C++和OpenGL写的这使游戏可以轻易地转移到任何平台开发。在最近的关于极限理论的更新中他解释说他不再使用Winsows平台因为它很“讨厌”,不能进入任何具体细节
他能够这样做是因为这个游戏用C++和OpenGL写的这使游戏可以轻易地转移到任何平台开发。在最近的关于极限理论的更新中他解释说他不再使用Winsows平台因为它很“烦人”,但是没有提供具体原因
甚至Linux基金会也已经注意他而且决定推动他正在做的工作特别是因为他是一个人表演,他要做从核心程序到环境音乐的任何事。
甚至Linux基金会也已经注意他而且决定推动他正在做的工作特别是因为他是一个人搞定了所有事情,他要做从核心程序到环境音乐的任何事。
“游戏开发者Josh Parnell已经发布了关于他的开放空间模拟和策略游戏——极限理论的开发更新。”图形很漂亮但这次发布更是值得注意因为Parnell已经从Windows转到本地Linux客户版本上开发他说Windows很烦人。"
“游戏开发者Josh Parnell已经发布了关于他的开放空间模拟和策略游戏——极限理论的开发更新。”图形很漂亮但这次发布更是值得注意因为Parnell已经从放弃Windows而转为开放原生的Linux客户他说Windows很烦人。"
“极限理论是在2012年12在Kickstarter筹到资的计划的发布日期是2014年初。当它完成时游戏者将能够探索空间在小行星上斟探和开采指挥一队或更多的星舰。”Linux基金会在其[网站][1]上这样描述。"
“极限理论是在2012年12在Kickstarter筹到资的计划的发布日期是2014年初。当它完成时游戏者将能够探索星际空间在小行星上斟探和开采指挥一队或更多的星舰。”Linux基金会在其[网站][1]上这样描述。
极限理论最有趣的方面是无限的宇宙,这起初听起来可能会感觉很奇怪或者像是一个营销策略。实际上Josh Parnell 制作了一个很智能的引擎当玩家在宇宙中发展时这个引擎产生系统星球NPC几乎所有的东西。
极限理论最有趣的方面是无限的宇宙,这起初听起来可能会感觉很奇怪或者像是一个营销噱头。实际上Josh Parnell 制作了一个很智能的引擎当玩家在宇宙中发展时这个引擎产生系统星球NPC几乎所有的东西。
这些元素在游戏开始时不存在,他们在玩家游戏运行时产生。这也意味着没有两个玩家的游戏过程是相同的。
极限理论在Kickstarter筹到了需要的资金开发者正在全力以赴地开发但是这是一个艰巨的任务完成需要一些时间。即使拟议的发布时间2014年1月了,粉丝们都愿意等待,特别是看到游戏将能够做什么之后。
极限理论在Kickstarter筹到了需要的资金开发者正在全力以赴地开发但是这是一个艰巨的任务完成需要一些时间。即使原计划的发布时间2014年1月已经过了,粉丝们都愿意等待,特别是看到游戏将能够做什么之后。
期待它吧!
@@ -27,7 +27,7 @@
via: http://news.softpedia.com/news/Limit-Theory-Developer-Switches-to-Linux-Because-Windows-is-Annoying-441642.shtml
译者:[linuhap](https://github.com/linuhap) 校对:[校对者ID](https://github.com/校对者ID)
译者:[linuhap](https://github.com/linuhap) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@@ -0,0 +1,29 @@
Linux Mint以后将只基于Ubuntu LTS进行开发
================================================================================
![Linux Mint 17](http://i1-news.softpedia-static.com/images/news2/Linux-Mint-Will-Only-Used-Ubuntu-LTS-Releases-From-Now-On-442225-2.jpg)
最新的 Linux Mint 17 “Qiana” RC 版本已经释出,本版本基于 Ubuntu 14.04 LTS(长期支持版本)。一个有趣的变化是,将来的数个版本都会基于长期支持版本。
Linux Mint的开发者已经决定只使用Ubuntu的LTS版本作为基础版本这就意味着之后几年的新版本将会始终基于同一个发行版。
“这样的决定将让Minit固定在LTS主干上。换句话说我们的开发团队会在未来两年内基于基本差不多的底包用作Mint 17的开发这会使得从17到17.1、17.2以及后续版本的升级过程变得更加平滑。”
“重要的应用程序将会以反向移植的形式进行发布我们希望这个改变能够加快我们开发的步伐并且减少新本版本开发时的回归成本”Clement Lefebvre在Linux Mint的[博客][1]说到。
这听起来或许并不会让你惊讶,不过此举意味着 Linux Mint 逐渐成为注重稳定的发行版,同时也意味着将会和 Ubuntu 14.04 LTS 一样能够得到长达 5 年(到 2019年)的技术支持。
你现在就可以从 Softpedia 下载 [Linux Mint 17 RC “Qiana” Cinnamon][2] 和 [Linux Mint 17 RC “Qiana” MATE][3] 。
注意这是一个开发版本,不应该使用在生产环境中,只用于测试用途。
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Linux-Mint-Will-Only-Used-Ubuntu-LTS-Releases-From-Now-On-442225.shtml
译者:[jiajia9linuxer](https://github.com/jiajia9linuxer) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://blog.linuxmint.com/?p=2613
[2]:http://linux.softpedia.com/get/System/Operating-Systems/Linux-Distributions/Linux-Mint-17252.shtml
[3]:http://linux.softpedia.com/get/System/Operating-Systems/Linux-Distributions/Linux-Mint-Gloria-31769.shtml

View File

@@ -1,17 +1,17 @@
Ubuntu 14.04 LTS中OpenVPN导入被破坏
Ubuntu 14.04 LTS中OpenVPN导入功能被破坏
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/OpenVPN-Import-Broken-in-Ubuntu-14-04-LTS-441601-2.jpg)
**几周前Canonical公司发布了 Ubuntu 14.04 LTS版本新的操作系统做了很大的变化但仍有些问题
需要解决,比如:openVPN 的导入功能**。
需要解决,比如openVPN 的导入功能**。
如果你曾在Ubuntu系统上使用过VPN连接你应该知道为了实现VPN连接不得不去官方软件包管理中心下载 network-manager-openvpn 软件包其允许用户导入openVPN文件和所有的设置以及证书。
在ubuntu 14.04 LTS之前的版本openVPN 导入功能能够正常使用,但在此之前发布的network-manager-openvpn软件包某些文件被破坏当导入时将导致整个网络管理功能崩溃。
在ubuntu 14.04 LTS之前的版本openVPN 导入功能能够正常使用,但是此前发布的network-manager-openvpn软件包某些文件被破坏当导入时将导致整个网络管理功能崩溃。
在 [Launchpad][1] 上已有匿名用户上报了这个问题, 但到目前为止该问题依然没有被修复。在3月份首次提交了该bug的报告意味着最新的发行版本忽略了该问题。
随着异常的事实,该问题已经被确认,似乎没有人去修复它,或者最近将不会出现在Lanchpad上.
异常的问题已经被确认,但是似乎没有人去修复它,至少没有出现在Lanchpad上.
事实证明通过众多人的留下的评论来判断bug并首次上报很值得广泛使用, 但如果没有发布修复bug的方法那是很烦人的。
@@ -21,7 +21,7 @@ Ubuntu 14.04 LTS中OpenVPN导入被破坏
via: http://news.softpedia.com/news/OpenVPN-Import-Broken-in-Ubuntu-14-04-LTS-441601.shtml
译者:[hunanchenxingyu](https://github.com/hunanchenxingyu) 校对:[校对者ID](https://github.com/校对者ID)
译者:[hunanchenxingyu](https://github.com/hunanchenxingyu) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@@ -0,0 +1,30 @@
开源赛车游戏 StuntRally 的新的 2.3 版本看起来棒极了
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/The-new-Open-Source-StuntRally-2-3-Racing-Game-Looks-Great-441726-2.jpg)
StuntRally是一个有着多达150条特色赛道和大量汽车模型的免费赛车游戏它刚刚发布了最新的2.3版本,新版本的画质有了很大的提高。
该游戏是建立在大量的开源技术上的如VdriftbulletOGREPagedGeometry和MyGUI虽然在此仅仅举了这几个例子但是这个游戏绝对不是一个简单的项目。 仅仅从他的特点描述中就能看出StuntRally大概是在Linux平台上最有前景的开源街机赛车游戏之一。
玩家可以从153条赛车轨道和24个关卡中感受到游戏的魅力并且这款游戏超过四个小时的游戏时间真是业界良心啊。 StuntRally特色功能有幽灵驾驶模式在比赛中最接近你的赛车的视角赛道幽灵车每条赛道上都有一个绿色的幽灵记录车当然还有回放保存你得驾驶记录并且你可以从其他的摄像头视角观看。当然游戏中也有教程锦标赛挑战赛以及多人比赛等。但是这些功能都仅仅只是表面的特点。
如果我们注意到这是一个免费的游戏仅仅是开发人员在业余时所做的Stuntrally的图形效果就已经相当不错了。游戏中玩家需要设定八个的图形参数包裹地形的视差三维映射汽车和水中的倒影水的折射开花运动模糊SSAO景深日光和HDR。其中一些最新的功能将需要玩家重新购买一个新的显卡才行。
除此之外,开发商还开发了赛道编辑器,允许用户实时编辑比赛道路和它们的参数,通过改变赛道的参数、调整地形,甚至修改自己的赛车,从而让驾驶乐趣倍增。
这次的变更说明显示所有的赛道都被重新制作了所有的纹理地形贴图已经升级到1K像素背景噪音目前也有了很多的变化不再是单一的一种声音光线现在也有了多个照射路径更加真实草的密度现在已经渲染到了一个极致动态摄像机也已经添加并且游戏开始的燃料现在取决于轨道长度。
此外,用户现在可以选择的地形纹理、草和植被模型窗口,地形编辑,现在按键比之前方便了很多,新版本的编辑器中有大量的修改,比如,图层按钮已被调换,赛道编辑器的起始位置也已经改变,图层,草和植被按钮上的已被更新,对地形和路面参数的表面标签已被添加,等等。
关于StuntRally的这一新版本的更多详情可在[公告][1]中找到。你现在可以从官方[网站][2]下载StuntRally2.3。
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/The-new-Open-Source-StuntRally-2-3-Racing-Game-Looks-Great-441726.shtml
译者:[MikeCoder](https://github.com/MikeCoder) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://code.google.com/p/vdrift-ogre/wiki/VersionHistory
[2]:http://sourceforge.net/projects/stuntrally/files/

View File

@@ -0,0 +1,56 @@
BattleBlock Theater Now Rules the Steam for Linux Best-Selling List
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/BattleBlock-Theater-Now-Rules-the-Steam-for-Linux-Best-Selling-List-442722-2.jpg)
**The Steam for Linux platform has been receiving some new titles in the past couple of weeks and a few of them managed to get pretty high up in the best-selling list.**
**Small World 2** take the tenth place and its a new entry in this exclusive list. This is a title based on the fantasy board game with the same name and its probably the only one in this genre that has a Linux version.
**Football Manager 2014** fell into the ninth position, but given the fact that its one of the most expensive games on the Steam for Linux, we can safely say that its still doing quite well. This is a game that needs no introduction and that is regarded as the best of its kind.
**Counter-Strike: Source**, a game that combines the gameplay from the original Counter-Strike with the power of the Source engine, has managed to get back in the best-selling top on Steam for Linux, in place number eight.
**Guns of Icarus Online**, a multiplayer first-person shooter developed by Muse Games for multiple platforms, including Linux, is now in the seventh place and it even comes with a 75% discount.
**Left 4 Dead 2**, the cooperative FPS developed by Valve, is still one of the best games on the Linux platform and the sixth place is a just one.
**Starbound**, a procedurally generated adventure game developed by Chucklefish Ltd. in which the player takes on the role of a character whos just fled from their home planet, only to crash-land on another, is in the fifth position. This is still under development and the fact that people are buying it before its even finished says a lot about the quality.
**Kerbal Space Program**, a multi-genre game in which the players have to create their own space project and make a successful launch without killing the astronauts, is now in the fourth position.
**Garry's Mod**, a physics sandbox thats not even a game per say, is really hanging on and it remains in the third place, which is weird if we thing about it. It doesnt have a single player campaign, but promise complete freedom to its users.
**Rust**, a first-person survival game that takes place in a persistent universe, is no longer in the first place, but the second one is not all that bad. Its still in development and there is no indication when the final version will be released.
The first place in the best-selling list of games on Steam for Linux is a new entry called **BattleBlock Theater**. This is a 2D action platformer developed and published by The Behemoth studio that features an interesting level design and beautiful graphics.
Enjoy!
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/BattleBlock-Theater-Now-Rules-the-Steam-for-Linux-Best-Selling-List-442722.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:
[2]:
[3]:
[4]:
[5]:
[6]:
[7]:
[8]:
[9]:
[10]:
[11]:
[12]:
[13]:
[14]:
[15]:
[16]:
[17]:
[18]:
[19]:
[20]:

View File

@@ -1,3 +1,5 @@
Translating by GoLinux!
Git 1.9.3 Version Control System Officially Released
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/Git-1-9-3-Version-Control-System-Officially-Released-441600-2.jpg)
@@ -29,4 +31,4 @@ via: http://news.softpedia.com/news/Git-1-9-3-Version-Control-System-Officially-
[1]:https://github.com/git/git/blob/master/Documentation/RelNotes/1.9.3.txt
[2]:https://github.com/git/git/archive/v1.9.3.tar.gz
[3]:http://git-scm.com/download/linux
[4]:http://git-scm.com/download/linux
[4]:http://git-scm.com/download/linux

View File

@@ -1,24 +0,0 @@
【小冰占了】
Linux Mint Will Only Use Ubuntu LTS Releases from Now On
================================================================================
![Linux Mint 17](http://i1-news.softpedia-static.com/images/news2/Linux-Mint-Will-Only-Used-Ubuntu-LTS-Releases-From-Now-On-442225-2.jpg)
**The new Linux Mint 17 “Qiana” Release Candidate is out and its based on Ubuntu 14.04 LTS. The interesting fact is that the next few versions will also use the same release as a base.**
The Linux Mint developers have decided to use only Ubuntu LTS releases, which means that through the next couple of years all the new Mint versions will be based on the same operating system.
“The decision was made to stick to LTS bases. In other words the development team will be focused on the very same package base used by Linux Mint 17 for the next 2 years. It will also be trivial to upgrade from version 17 to 17.1, then 17.2 and so on.”
“Important applications will be backported and we expect this change to boost the pace of our development and reduce the amount of regressions in each new Linux Mint release,” said Clement Lefebvre on the Linux Mint [blog][1].
This not exactly surprising, but it means that Linux Mint will become a distribution that is much more oriented towards stability. It also means that it will benefit from the same extended support as Ubuntu 14.04 LTS, until 2019.
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Linux-Mint-Will-Only-Used-Ubuntu-LTS-Releases-From-Now-On-442225.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://blog.linuxmint.com/?p=2613

View File

@@ -0,0 +1,23 @@
Ubuntu Is Now Running on World's Fastest Supercomputer
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-Is-Now-Running-on-World-s-Fastest-Supercomputer-442733-2.jpg)
**Canonical is building the most used Linux distribution for the desktop, but its also making one of the most successful operating systems for servers. The fact that Ubuntu Server, Ubuntu Openstack and Ubuntus orchestration tool, Juju, is running the most powerful supercomputer in the world.**
Right now, the most powerful supercomputer in the world is called Tienhe2 and its in the Guangdong province in China. According to its makers, the servers use Intel Xeon processors, Intel Xeon Phi co-processors and a 160Gb per second interconnect for super-fast data transfer between nodes. It hold the record since 2013.
“Ubuntu OpenStack is running on 256 high performance nodes and this will grow to over 6400 nodes in the coming months. The nodes will be available to Government departments in Guangdong province as well as other NUDT partners for analysis, census, and eGovernment applications.”
“Both OpenStack and Ubuntus orchestration tool, Juju, will run on Tianhe-2 to enable NUDT partners and affiliate to rapidly deploy and manage very high performance cloud environments” reads the official [announcement][1].
Canonical is making a push on the Chinese market and the company is already trying to cover as the desktop ecosystem with Ubuntu Kylin, which has arrived at a very opportune time, at the same time with Microsofts announcement regarding the end of life for Windows XP.
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Ubuntu-Is-Now-Running-on-World-s-Fastest-Supercomputer-442733.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://insights.ubuntu.com/2014/05/14/nudt-and-canonical-bring-openstack-to-worlds-fastest-supercomputer/

View File

@@ -1,186 +0,0 @@
disylee20140516的翻译这年头我先占个坑第一次
[sailing]
5 Pointers To Supercharge Your Raspberry Pi Projects
================================================================================
> From SSH to port forwarding, these advanced techniques will ease Raspberry Pi development.
Youre in command of the command line. Youre not a noob at setting up NOOBS. Slowly but surely, youre learning your way around the affordable, credit card-size computer for DIY tinkering, Raspberry Pi.
> See also: [The Quantified Fish: How My Aquarium Uses Raspberry Pi][1]
However, theres a steep jump-off point between the basics and the intermediate stuff. When you move from “setting up your Pi” tutorials to stuff like “building a media server,” the pre-project requirements start to get a little dicey. Many intermediate Pi tutorials, including some of the ones here on ReadWrite, assume a few things about your Raspberry Pi setup.
Not every project will require all of the techniques suggested here, but knowing these procedures will make projects that do require them go much more smoothly later.
When youre ready to go beyond the basics, here are some things you can do to prepare your Raspberry Pi for any pre-requirements that a tutorial could throw at you.
### 1) Using SSH ###
SSH, which stands for [Secure Shell][2], is a cryptographic network protocol that lets you securely transfer data between your computer and your Raspberry Pi. Projects might require it so you can control your Raspberry Pi from your computer's command line without hooking it up to a monitor or keyboard.
SSH now comes pre-installed in Raspberry Pi operating system [Raspbian][3], so if you have installed the latest or close-to-latest version of NOOBS, you already have it.
To use SSH, first you need your Pis IP address. Boot your Pi to the command line and type:
sudo ifconfig
[Three paragraphs will appear][4]. Your IP address will show up in either the first or the third line, depending on whether your Raspberry Pi is hooked up to an ethernet cable or via a wifi adaptor. If it's ethernet, look in the first paragraph, which starts with "eth0." If it's wifi, look in the third paragraph, which starts with "wlan0."
Either way, you'll see the words “inet addr” followed by an IP—something like 192.168.2.2, a pretty common default IP address that well use for the duration of this article.
Now you have the address that'll allow you to access the Pi from your computer. If youre on a Mac, you already have built-in SSH. Launch the Terminal application and type:
ssh pi@192.168.2.2
Itll ask for your password. By default, this is always "raspberry." If youve changed it to something else, use that instead. Now, youre in!
If youre on a PC, theres an extra step.
![](http://readwrite.com/files/putty2.jpg)
Download and run [PuTTY][5] or another SSH client for Windows. Enter your IP address in the field, as shown in the above screenshot. Keep the default port at 22. Hit enter, and PuTTY will open a terminal window which will prompt you for your username and password. Fill those in, and begin working remotely on your Pi.
### 2) Remote Desktop Your Raspberry Pi ###
SSH is great for remote controlling your Pi from the command line. But what if youd like to work off of its Graphical User Interface (GUI)? Fortunately, this is already built in for Macs and PCs.
On your Raspberry Pis command line, (and yes, you can do this with SSH), type:
sudo apt-get install xrdp
Xrdp is a [daemon][6], a computer process that runs in the background that can support Microsoft Remote Desktop Client on both Mac and PC. Once it's installed on your Raspberry Pi, your Mac or PC will be able to access it through the client.
Search your computer for a program called Remote Desktop Client. Its not exactly hidden per se, but its not stored in your application folder.
![](http://readwrite.com/files/Screen%20Shot%202014-04-07%20at%2010.14.13%20PM.png)
Input the IP address when prompted. Next, an xrdp window will pop up, prompting you for your username and password.
![](http://readwrite.com/files/Screen%20Shot%202014-04-07%20at%2010.14.31%20PM.png)
If all goes well, youll see your Raspberry Pis desktop in a window on your computer screen.
![](http://readwrite.com/files/Screen%20Shot%202014-04-07%20at%2010.14.48%20PM.png)
### 3) Static IP For Your Pi On The Home Network ###
That Raspberry Pi IP we found earlier (in Step 1) may work for now, but theres no guarantee your router will keep assigning the same IP address to your Pi forever. That means the other computers on your network wont know which IP address the Pi lives at. So how do you assign it a static IP instead of having to use the “sudo ifconfig” command every few days, or worse, hours?
Predictably, we begin with "ifconfig." So type:
sudo ifconfig
Get a pen and paper ready, and record the following three addresses [listed after eth0][7] (The comments after the hashes are my descriptions. They won't show up in the code.):
inet addr: 192.168.2.2 # Pi's Current IP Address
Bcast: 192.168.0.255 # The Broadcast IP Range
Mask: 255.255.255.0 # Subnet Mask Address
You still need two more pieces of information. So type the following line to get the Gateway and Destination addresses:
netstat -nr
Next, go to your routers configuration. (How you do this is dependent on which router you have, so check the manual.) Find out which addresses the Dynamic Host Configuration Protocol (DHCP) is giving out to your devices. These are off-limits addresses, since the protocol is already using them. So pick one that isnt being used—for example, 192.168.2.2. Your router may allow you to reserve an unused IP address and assign it to a local device like the Raspberry Pi. (If you have a Belkin router, this is probably the case.) **If so, you can stop here**.
If not, you need to let the Raspberry Pi know what its new IP address is. Well do this by editing a configuration file on the Pi in the nano text editor:
sudo nano /etc/network/interfaces
Change the line “iface eth0 inet dhcp” to “iface eth0 inet static” to inform it that its now static.
Then enter the following, but replace the X's with the addresses you copied down earlier! The top address is the one weve decided to assign after looking at what our DHCP wasnt already using.
address 192.168.2.2
netmask XXX.XXX.XXX.X
network XXX.XXX.X.X
broadcast XXX.XXX.X.X
gateway XXX.XXX.X.X
Reboot the Raspberry Pi with “sudo reboot” and run “ifconfig” one more time. Your new static settings should appear!
### 4) Forwarding Ports To Raspberry Pi ###
Some Pi projects may require you forward a specific Internet port to your Raspberry Pi. Ports are virtual pathways where information travels on the Internet. You sometimes need to forward a port in order to make a computer, like the Raspberry Pi, accessible to the Internet even if its behind a router. It's kind of like dialing an extension on a phone network.
Port forwarding can be used for projects like a [Raspberry Pi web server][8], Voice Over IP on the Pi, or simply for peer-to-peer downloading. There are 65,000+ ports to choose from, so you can assign a different port for traffic for every Raspberry Pi project you do.
Some ports are default for certain things. Port 80 is default for HTML pages. Port 21 is default for FTP (File Transfer Protocol) transferring. Port 1194 is default for setting up a VPN server. So a lot of the time, you can just go with whichever port is set as the default.
The way to set up port forwarding is entirely dependent on your router, so its difficult to create a tutorial for port forwarding beyond [what it actually does][9]. Read the documentation that comes with your router in order to customize and define ports to forward.
Here are some port forwarding tutorials for major router manufacturers:
- [Belkin][10]
- [Netgear][11]
- [Linksys][12]
### 5) Static IP For Your Pi On The Internet ###
Once again, if your ISP already gives you a static IP address, you don't need to worry about this section.
Weve already set up a static internal IP address for the Raspberry Pi, which means computers inside your local network will always know where to find your Pi. But what about projects that require Raspberry Pi to be connected to the Internet? If you want to build a Web server with your Raspberry Pi, people outside your network need to know where your Pi lives, which means setting a public IP that always looks the same.
I say “looks the same” because were really setting up a pseudo-static IP. Your ISP will continue to change the address as usual. So every time somebody connects to your Pi, the script were about to write will say, “Looks like the Pi has moved! Let me redirect you to the new address."
We do this with a [Dynamic DNS][13] (DDNS), which maintains a name server that gets updated in real-time, and [DDClient][14], a program that will correspond with DDNS directly from your Pi.
First sign up for a free dynamic host service like [DNS Dynamic][15]. Follow the instructions and create a new nameserver like Yourserver.dnsdynamic.com.
Now go to the command line on your Raspberry Pi and install DDClient with the following line:
sudo apt-get install ddclient
We need to edit the DDClient configuration with our DDNS's new name server:
sudo nano /etc/ddclient/ddclient.conf
Every service will have slightly different configuration, but the DDNS website should tell you what you need to do to configure this file. A standard configuration for DNS Dynamic, for example, [goes like this][16]. Copy and paste it in.
Your ISP isnt going to just stop updating the Raspberry Pis IP address because of this file, however, so we need to put a daemon at the very top of this script to tell it to continually check whether or not the IP address has changed.
daemon=600
# check every 600 seconds
This one checks every 10 minutes, which is just good practice. If you set it up to check every second, your dynamic service may not appreciate it because you'll be literally spamming their servers. Press Control + X to save and exit this configuration file.
After this, type:
ddclient
> See also: [12 Cool Projects For Your Raspberry Pi][17]
Simply typing the name of the program will run it. Itll continue to run as long as your Raspberry Pi is turned on. If you reboot your Pi, write “ddclient” to start running it again.
Now your Raspberry Pi is tricked out and ready for more advanced tutorials. Have fun and learn lots!
--------------------------------------------------------------------------------
via: http://readwrite.com/2014/04/09/raspberry-pi-projects-ssh-remote-desktop-static-ip-tutorial#feed=/hack&awesm=~oB1b7zvteUQGOV
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://readwrite.com/2014/03/04/raspberry-pi-quantified-fish-acquarium#awesm=~oAWz5ZbkX6w7ZL
[2]:http://en.wikipedia.org/wiki/Secure_Shell
[3]:http://www.raspbian.org/
[4]:https://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/finding-your-pis-ip-address
[5]:http://www.chiark.greenend.org.uk/~sgtatham/putty/
[6]:http://en.wikipedia.org/wiki/Daemon_(computing)
[7]:https://www.modmypi.com/blog/tutorial-how-to-give-your-raspberry-pi-a-static-ip-address
[8]:http://raspberrywebserver.com/serveradmin/get-your-raspberry-pi-web-site-on-line.html
[9]:http://portforward.com/help/portforwarding.htm
[10]:http://www.belkin.com/us/support-article?articleNum=10790
[11]:http://kb.netgear.com/app/answers/detail/a_id/24046/~/how-do-i-configure-port-forwarding-on-routers-with-the-netgear-genie-interface%3F
[12]:http://kb.linksys.com/Linksys/ukp.aspx?pid=80&vw=1&articleid=21470
[13]:http://en.wikipedia.org/wiki/Dynamic_DNS
[14]:http://sourceforge.net/p/ddclient/wiki/Home/
[15]:https://www.dnsdynamic.org/
[16]:http://dnsdynamic.blog.com/2011/06/26/using-ddclient-with-dnsdynamic/
[17]:http://readwrite.com/2014/01/21/raspberry-pi-great-projects#feed=/search?keyword=raspberry+pi&awesm=~oAWzuuuChYu9vm

View File

@@ -0,0 +1,243 @@
Arduino Vs. Raspberry Pi: Which Is The Right DIY Platform For You?
================================================================================
![](http://readwrite.com/files/styles/1400_0/public/fields/arduinopi.jpg)
If youre at all familiar with do-it-yourself (DIY) electronics, youve probably heard about the comparable merits of [Arduino][1] and [Raspberry Pi][2]. You may have even, [like I did][3], assumed they were competing hardware platforms solving similar problems.
Actually, Arduino and Raspberry Pi are quite different. For starters, Raspberry Pi is a fully functional computer, while Arduino is a microcontroller, which is just a single component of a computer.
Heres a primer to differentiating Arduino and Raspberry Pi, and to determining which of the two DIY hacking devices best fits your needs as a maker.
### Overview ###
Raspberry Pi and Arduino were both originally designed to be teaching tools, which is why theyve become so popular—both devices are very easy to learn to use.
Raspberry Pi hails from the United Kingdom. Inventor Eben Upton and his colleagues at the University of Cambridges Computer Laboratory were frustrated by the dwindling number of students, and the poor skill levels of those students, entering the program. Raspberry Pi was designed to be a cheap, hackable computer for improving tinkering skills. While Upton worked on prototypes from 2006 onward, the first shipment of Pis became available in [April 2012][4].
Arduino, on the other hand, was born in Italy. It was named after the bar where inventor Massimo Banzi and his cofounders first forged the idea. Banzi, a teacher at the Interaction Design Institute Ivrea, wanted a simple hardware prototyping tool for his design students.
As teaching tools, both Arduino and Raspberry Pi suitable for beginners. Its only when examining their hardware and software that it becomes apparent theyre used for very different types of projects.
### Hardware And Software ###
Heres an overview of some of the specs that show the biggest differences between the two:
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<p>&nbsp;</p>
</td>
<td>
<p><strong>Arduino Uno</strong></p>
</td>
<td>
<p><strong>Raspberry Pi Model B</strong></p>
</td>
</tr>
<tr>
<td>
<p><strong>Price</strong></p>
</td>
<td>
<p>$30</p>
</td>
<td>
<p>$35</p>
</td>
</tr>
<tr>
<td>
<p><strong>Size</strong></p>
</td>
<td>
<p>7.6 x 1.9 x 6.4 cm</p>
</td>
<td>
<p>8.6cm x 5.4cm x 1.7cm</p>
</td>
</tr>
<tr>
<td>
<p><strong>Memory&nbsp;</strong></p>
</td>
<td>
<p>0.002MB</p>
</td>
<td>
<p>512MB</p>
</td>
</tr>
<tr>
<td>
<p><strong>Clock Speed</strong></p>
</td>
<td>
<p>16 MHz</p>
</td>
<td>
<p>700 MHz</p>
</td>
</tr>
<tr>
<td>
<p><strong>On Board Network</strong></p>
</td>
<td>
<p>None</p>
</td>
<td>
<p>10/100 wired Ethernet RJ45</p>
</td>
</tr>
<tr>
<td>
<p><strong>Multitasking</strong></p>
</td>
<td>
<p>No</p>
</td>
<td>
<p>Yes</p>
</td>
</tr>
<tr>
<td>
<p><strong>Input voltage</strong></p>
</td>
<td>
<p>7 to 12 V</p>
</td>
<td>
<p>5 V</p>
</td>
</tr>
<tr>
<td>
<p><strong>Flash</strong></p>
</td>
<td>
<p>32KB</p>
</td>
<td>
<p>SD Card (2 to 16G)&nbsp;</p>
</td>
</tr>
<tr>
<td>
<p><strong>USB&nbsp;</strong></p>
</td>
<td>
<p>One, input only</p>
</td>
<td>
<p>Two, peripherals OK</p>
</td>
</tr>
<tr>
<td>
<p><strong>Operating System</strong></p>
</td>
<td>
<p>None</p>
</td>
<td>
<p>Linux distributions</p>
</td>
</tr>
<tr>
<td>
<p><strong>Integrated Development Environment</strong></p>
</td>
<td>
<p>Arduino</p>
</td>
<td>
<p>Scratch, IDLE, anything with Linux support</p>
</td>
</tr>
</tbody>
</table>
The price and size of the two devices are comparable; we already knew Raspberry Pi and Arduino were tiny and cheap. Its the stuff inside that sets them apart.
The Raspberry Pi is 40 times faster than an Arduino when it comes to clock speed. Even more seemingly damning for Arduino, Pi has 128,000 times more RAM. The Raspberry Pi is an independent computer that can run an actual operating system in Linux. It can multitask, support two USB ports, and connect wirelessly to the Internet. In short, its powerful enough to function as a personal computer (though not powerful enough to compete with your Mac or PC).
It might sound like Raspberry Pi is superior to Arduino, but that's only when it comes to software applications. Arduinos simplicity makes it a much better bet for pure hardware projects.
I asked Limor Fried, the founder of [Adafruit][5], a DIY electronics store that offers parts and kits for both Arduino and Pi projects, about her expert opinion on their differences. An MIT educated engineer whose mission in life is to teach electronics to people of all skill levels, Fried knows both platforms better than most.
“Arduino does have a 'real-time' and 'analog' capability that the Pi does not: This flexibility allows it to work with just about any kind of sensor or chips,” Fried said. “The Pi is not as flexible; for example, reading analog sensors requires extra hardware assistance. There are also thousands of tutorials on hooking an Arduino into just about every kind of part. On the other hand, the Pi benefits from decades of Linux software, so they're both great choices.”
The Arduino IDE is significantly easier to use than Linux. For example, if you wanted to write a program to blink an LED with Raspberry Pi, youd need to install an operating system and some code libraries—and thats just to start. On Arduino, you can get an LED light to blink in just eight lines of code. Since Arduino isnt designed to run an OS or a lot of software, you can just plug it in and get started.
Raspberry Pi can multitask processes—it can run multiple programs in the background while activated. For example, I have a Raspberry Pi that is serving as both a print server and a [VPN server][6] at the same time.
On the other hand, you can leave an Arduino plugged in as it conducts a single process for a long time, and just unplug it when youre not using it. This is why Fried would recommend the Arduino for beginners before she would the Pi:
“The Arduino is simpler, harder to 'break' or 'damage' and has much more learning resources at this time for beginners,” Fried said. “With the Pi you have to learn some Linux as well as programming—such as Python. The Arduino works with any computer and can run off of a battery. You can also turn it on and off safely at any time. The Pi setup can be damaged by unplugging it without a proper shutdown.”
While the Raspberry Pi shines in software application, the Arduino makes hardware projects very simple. Its simply a matter of figuring out what you want to do.
### Working Together ###
The ultimate answer when deciding between the Pi and Arduino is, “Why choose?” If youre looking to learn about electronics, each one will teach you something different.
According to Fried, Raspberry Pi and Arduino are complementary. She suggested a scenario where the Arduino is the sensory workhouse, while the Pi doles out directions:
“They work great together,” Fried said. “The Arduino is best for motor driving, sensor reading, LED driving, etc while you can have an Internet-connected Pi drive it, a mini computer that can play videos, music or send emails with ease.”
Author Simon Monk, who has written dozens of books on both Pi and Arduino, blogged a tutorial for [getting Raspberry Pi to talk to Arduino][7] in just a few lines of code. It makes use of a Python library, [PySerial][8], that the Arduino foundation recommends as the easiest way to get computers to talk to Arduino.
Once youve got that down, the possibilities are infinite. You could [homebrew beer][9], with the Arduino controlling the sensors and the Pi managing the brains of the operation. You could also create a [platform for making robots][10] that are much more capable than plain Arduino or Raspberry Pi bots.
### Community ###
Both Raspberry Pi and Arduino have large, active communities surrounding them. Not only are they used in schools and universities, but also in hackerspaces worldwide.
Here are some of the places you can visit to get Raspberry Pi support and project ideas:
- [The Raspberry Pi Foundation — FAQs][10]
- [The Raspberry Pi Foundation — Project Forums][11]
- [Learn Raspberry Pi with Adafruit][12]
- [Element 14 (Pis manufacturer) Raspberry Pi Community][13]
- [The Raspberry Pi Wiki][14]
Here are some of the places you can visit to get the same for Arduino:
- [Arduinos Official Getting Started Guide][15]
- [Arduino Playground][16]
- [Arduino Official Forums][17]
- [Learn Arduino with Adafruit][18]
- [r/arduino on Reddit][19]
Photo by [Simon Monk][20]
--------------------------------------------------------------------------------
via: http://readwrite.com/2014/05/07/arduino-vs-raspberry-pi-projects-diy-platform#feed=/hack&awesm=~oEFMq68riarQK2
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://readwrite.com/2014/04/21/easy-arduino-projects-basics-tutorials-diy-hardware
[2]:http://readwrite.com/2014/01/20/raspberry-pi-everything-you-need-to-know
[3]:http://readwrite.com/2014/04/16/arduino-raspberry-pi-connected-home-tutorials-projects
[4]:http://www.raspberrypi.org/archives/1081
[5]:http://www.adafruit.com/
[6]:http://readwrite.com/2014/04/10/raspberry-pi-vpn-tutorial-server-secure-web-browsing
[7]:http://www.doctormonk.com/2012/04/raspberry-pi-and-arduino.html
[8]:http://playground.arduino.cc/Interfacing/Python
[9]:http://www.brewpi.com/
[10]:http://www.raspberrypi.org/help/faqs/
[11]:http://www.raspberrypi.org/forums/viewforum.php?f=15
[12]:https://learn.adafruit.com/category/learn-raspberry-pi
[13]:http://www.element14.com/community/community/raspberry-pi
[14]:http://elinux.org/RPi_Hub
[15]:http://arduino.cc/en/Guide/HomePage
[16]:http://playground.arduino.cc/Projects/ArduinoUsers
[17]:http://forum.arduino.cc/
[18]:https://learn.adafruit.com/category/learn-arduino
[19]:http://www.reddit.com/r/Arduino
[20]:http://www.doctormonk.com/2012/04/raspberry-pi-and-arduino.html

View File

@@ -0,0 +1,69 @@
How To Install California Calendar App in Ubuntu 14.04
================================================================================
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/05/california-calendar.jpg)
**When non-profit software outfit Yorba revealed that it had [begun work on a new desktop calendar app][1] called California last month plenty of us were duly excited — “About time!“, we declared in our own headline. **
And for good reason as Yorba are the hands behind the user-friendly e-mail client Geary and slick photo management software Shotwell. Expectations for their foray into Linux productivity software are, naturally, rather high.
Although **California is not yet stable** enough to warrant a formal release it is now available to install on Ubuntu through the companys daily development PPA.
### Progress So Far ###
“*Neeeeeyaaaaaaaawwnnn!*” — thats the sound of the caveats plane coming in to land at San Francisco International Airport.
Yes, California is in active development; its not finished nor is it stable enough for everyday use by everyday folk who might want to use it. But, if youre clever enough to deal with a few bugs you can install the app on Ubuntu 14.04.
Whether you should will depend on your needs.
Current builds (i.e., at the time of writing) offers local management and basic support for Google Calendar and web cal (.ics). Events even show up in the GNOME Date/Time applet.
#### Natural Language Input ####
When first launching California you are presented with an overview of the current month. There is not yet — at least that I could find — a way to view by week, by year or by agenda. You can cycle though months using the navigation buttons, however.
New calendars (*e.g., work, pet schedule*) can be created and toggled on/off by clicking the Calendar icon in the toolbar. Each calendar can be assigned a different colour to help visually differentiate between items when all are shown in the main overview.
To create a new event click the + icon and, using **natural language input** in the input box that appears, enter a description of the event you want to file. For example, enter the text “*Bake Sansa Stark A Lemon Cake on Wednesday 2.45 PM*” will lodge a new entry for the following Wednesday at the relevant time (14:45).
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/05/Screen-Shot-2014-05-15-at-21.26.20.png)
I cant wait for this feature to become a bit more refined. Right now, while it accurately pinpoints dates (give or take) it doesnt support creation of recurring events (e.g., via “*Skype chat with Sam every Tuesday at 7 AM*“) nor does it fill in locations or people (e.g., “*Coffee with Penelope on Monday 12 PM at Boston Tea Party*“).
For greater control you can also refine and edit entries created by double-clicking on them in the grid view. This will open up a window with additional fields, time pickers, date forms and so on.
#### Lacking In Radiance ####
If there is a drawback to be found (bugs and missing options should be overlooked at this stage) it is appearance. While it looks fantastic under Adwaita, under Ubuntus default theme it looks atrocious.
This is not the fault of Yorba (or GNOME) but Ubuntus design team who has yet to add theming support for GNOMEs new GTK Header Bars and its modal dialogs to its light themes.
California is fully useable on Ubuntu it just happens to resemble software run in the aftermath of a failed distribution upgrade. This issue wont affect those running Ubuntu GNOME or rocking modern third-party GTK3 themes.
### Install California in Ubuntu 14.04 ###
If you glossed over the warning earlier, Ill repeat: California is unstable and in active development.
The [Yorba Daily PPA][2] also contains newer (unstable) versions of Shotwell and Geary. Adding this PPA to your system will also see these upgraded.
sudo add-apt-repository ppa:yorba/daily-builds
sudo apt-get update && sudo apt-get install california
A safer way to try the app out is to [download the .deb installers from the PPA directly][3]:
- [Download California for Ubuntu 14.04 (64bit)][4]
- [Download California for Ubuntu 14.04 (32bit)][5]
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2014/05/california-calendar-app-hits-yorba-daily-ppa
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.omgubuntu.co.uk/2014/04/yorba-california-calendar-app-linux
[2]:https://launchpad.net/~yorba/+archive/daily-builds/
[3]:https://launchpad.net/~yorba/+archive/daily-builds/+packages
[4]:https://launchpad.net/~yorba/+archive/daily-builds/+files/california_0.1.0-0%7E188%7Eubuntu14.04.1_amd64.deb
[5]:https://launchpad.net/~yorba/+archive/daily-builds/+files/california_0.1.0-0%7E188%7Eubuntu14.04.1_i386.deb

View File

@@ -1,36 +0,0 @@
CHINAANSHE翻译
How to Install Windows 8.1 and Ubuntu 14.04 LTS on the Same Computer
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/How-to-Install-Windows-8-1-and-Ubuntu-14-04-LTS-on-the-Same-Computer-440356-2.jpg)
**Numerous Windows users are looking to also try a Linux operating system without deleting the one they are already using. They will be happy to know that this can be done quite easily and that Linux OSes are usually more friendly towards other operating systems that share the same computer.**
If you are a Windows user and you want to give Ubuntu a go, for example, the procedure is actually quite simple and involves very little effort from the user, who only has to pay a little attention to the procedures.
A normal installation of a new operating system on a PC is not complicated, not even with Linux and Ubuntu. For the most part, users only click next in the dialogs and everything is taken care of by the scripts. When you want to preserve an operating system that is also present on the same PC (it doesn't have to be a Windows one specifically), a little more work is required, but that can be handled very easily.
Writing an Ubuntu image from Linux is easy and it can be done with a number of applications. On Windows you will need to get Ubuntu either on a DVD or on a USB (which is preferable). In order to get Ubuntu properly copied to a USB device, you will need to download a handy little tool called [Win32 Disk Imager 0.9.5][1]. It features a simple interface and it's fully automated.
Now, before rebooting to get Ubuntu installed, you might want to set some free space aside that will be available for Ubuntu, but a partition will not be enough. You will need two of them, one for Ubuntu itself (10GB should suffice if you don't plan to get too many applications) and a second partition for the Swap (the pagefile equivalent for Windows), which has to be double the amount of you RAM memory. You don't need to format them, just make sure they are free. If you install Ubuntu on a second HDD, that's even better.
Plug the USB in and reboot. You will get a prompt to Try or Install. Choose Install and read the options you are given: Install Ubuntu Alongside Windows 8 (or whatever version you have), Replace Windows 8 with Ubuntu, or Something Else.
You can choose to install alongside Windows 8, but you might not like what the installer will choose for you. It's better to hit Something Else and install it manually.
Spot the free partition that you set aside for Ubuntu (the installer doesn't read volume names from Windows), double click on it, select EXT4 as the filesystem, and “/” as the default mount point.
Now select the smaller partition and choose SWAP as the filesystem. That is all. Once you hit Next, the installation will start and you will have to choose the name, password, and other such details.
The next time you boot you will get a simple list of operating systems that will allow you to choose whichever OS you prefer.
Enjoy!
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/How-to-Install-Windows-8-1-and-Ubuntu-14-04-LTS-on-the-Same-Computer-440356.shtml
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.softpedia.com/get/CD-DVD-Tools/Data-CD-DVD-Burning/Win32-Disk-Imager.shtml

View File

@@ -0,0 +1,354 @@
Translating by GOLinux ...
How to set up a primary DNS server using CentOS
================================================================================
Any operational domain has at least two DNS servers, one being called a primary name server (ns1), and the other a secondary name server (ns2). These servers are typically operated for DNS failover: If one server goes down, the other server becomes an active DNS server. More sophisticated failover mechanisms involving load balancers, firewalls and clusters are also possible.
All DNS entries for a particular domain are added in the primary name server. The secondary server will simply sync all the information from the primary name server based on counter type parameter set on the primary server.
This tutorial will describe **how to create a primary DNS server running on CentOS**. Please note that the DNS server presented in this tutorial will be public DNS, meaning that the server will respond to queries from any IP address. Limiting access to the server is discussed in [this tutorial][].
Before we start, I would like to mention that DNS can be set up with or without chroot jail environment. The chroot jail environment confines the DNS server to a certain directory in the system, as opposed to allow the server system-wide access. That way, any vulnerability of the DNS server would not compromise the entire system. Chrooting a DNS server is also useful for a test deployment.
### Objective ###
We will be setting up a DNS server in a test environment for the domain example.tst, which is a hypothetical (non-existing) domain. That way, we will not accidentally interfere with any other live domain.
In this domain, there are the following three servers.
注:表格代码,只需要翻译尖括号中间的文字即可
<table>
<tbody><tr>
<td>Server</td>
<td>IP address</td>
<td>Hosted services</td>
<td>FQDN</td>
</tr>
<tr>
<td>Server A</td>
<td>172.16.1.1</td>
<td>Mail</td>
<td>mail.example.tst</td>
</tr>
<tr>
<td>Server B</td>
<td>172.16.1.2</td>
<td>Web, FTP</td>
<td>www.example.tst<br>ftp.example.tst</td>
</tr>
<tr>
<td>Server C</td>
<td>172.16.1.3</td>
<td>Primary DNS server</td>
<td>ns1.example.tst</td>
</tr>
</tbody></table>
We will be setting up a primary DNS server, and add necessary domain and DNS records as shown in the table.
### Setting up hostnames ###
All the hostnames should be defined as FQDN correctly. This can be done using the following method.
# vim /etc/sysconfig/network
> HOSTNAME=ns1.example.tst
Note: The hostname parameter specified in this file is used while the server is booting up. Therefore, the change does not take effect immediately. The following command can be used to temporarily change the hostname of a server immediately.
# hostname ns1.example.tst
Once set, hostname can be verified using the following command.
# hostname
> ns1.example.tst
Before proceeding to the next step, make sure that the hostname of all three servers are set properly.
### Installing Packages ###
We will be using bind for DNS, which can be easily installed using yum.
To set up DNS without `chroot`:
# yum install bind bind-chroot
### Preparing a Configuration File ###
As mentioned earlier, bind can be set up with or without chroot. The paths vary a little depending on whether chroot has been installed.
注:表格代码,只需要翻译尖括号中间的文字即可
<table>
<tbody><tr>
<td></td>
<td>Path to configuration file</td>
<td>Path to zone files</td>
</tr>
<tr>
<td>
With <tt>chroot</tt>
</td>
<td>
/etc/
</td>
<td>
/var/named/
</td>
</tr>
<tr>
<td>
Without <tt>chroot</tt>
</td>
<td>
/var/named/chroot/etc/
</td>
<td>
/var/named/chroot/var/named/
</td>
</tr>
</tbody></table>
The configuration file named.conf provided by default can be used. However, we will be using another sample configuration file for ease of use.
Without `chroot`:
# cp /usr/share/doc/bind-9.8.2/sample/etc/named.rfc1912.zones /etc/named.conf
With `chroot`:
# cp /usr/share/doc/bind-9.8.2/sample/etc/named.rfc1912.zones /var/named/chroot/etc/named.conf
Now, the configuration file is backed up and modified.
Without `chroot`:
# vim /etc/named.conf
With `chroot`:
# vim /var/named/chroot/etc/named.conf
The following lines are added/modified.
options {
## path to zone files ##
directory "/var/named";
## forwarding the query to Google public DNS server for non-local domains ##
forwarders { 8.8.8.8; };
};
## declaration of the forward zone for example.tst ##
zone "example.tst" IN {
type master;
file "example-fz"; ## filename for the forward zone stored in /var/named ##
allow-update { none; };
};
## declaration of reverse zone for network 172.16.1.0 ##
zone "1.16.172.in-addr.arpa" IN {
type master;
file "rz-172-16-1"; ## filename for the reverse zone stored in /var/named ##
allow-update { none; };
};
### Preparing Zone Files ###
The default zone files are automatically created under `/var/named or /var/named/chroot/var/named` (for `chroot`). If they are not available there, sample files are provided in `/usr/share/doc/bind` folder, and can be copied from there.
Assuming that the default zone files are not present, we can copy the sample files from `/usr`.
Without `chroot`:
# cp /usr/share/doc/bind-9.8.2/sample/var/named/named.* /var/named/
With `chroot`:
# cp /usr/share/doc/bind-9.8.2/sample/var/named/named.* /var/named/chroot/var/named
Great. Now that the default zone files are ready, we create our own zone file for example.tst and network 172.16.1.0. While we create the zone files, the following should be kept in mind.
- The characted @ means NULL within the zone files.
- Every FQDN is to end with a dot . i.e. mail.example.tst. Without it, youll be in trouble.
#### 1. Forward Zone ####
The forward zone contains mapping from names to IP addresses. For public domains, the DNS of the domain hosting provider stores the forward zone file.
Without `chroot`:
# vim /var/named/example-fz
With `chroot`:
# vim /var/named/chroot/var/named/example-fz
----------
$TTL 1D
@ IN SOA ns1.example.tst. sarmed.example.tst. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns1.example.tst.
IN A 172.16.1.3
mail IN A 172.16.1.1
IN MX 10 mail.example.tst.
www IN A 172.16.1.2
ns1 IN A 172.16.1.3
ftp IN CNAME www.example.tst.
**Explanation**: Within the zone file, SOA means start of authority. This is the FQDN of the authoritative name server. The FQDN is followed by the contact email address. Since we cannot use @ in sarmed@example.tst, we rewrite the email address as sarmed.example.tst.
- **NS**: Name Server
- **A**: A record or the address record is an IP address
- **MX**: Mail Exchanger record. Here we are using only one MX with priority of 10. In case of multiple MX, we can use multiple numeric priorities. The lowest number wins. For example, MX 0 is better than MX 1.
- **CNAME**: Canonical Name. If multiple services are hosted in a single server, it is very likely that multiple names would be resolved to that single server as well. CNAME indicates the other names a server may have and points to the name that actually has an A record.
#### 2. Reverse Zone ####
The reverse zone contains mapping from IP address to names. Here, we create the reverse zone for the network 172.16.1.0. In production domains, the DNS server of the owner of the public IP block stores the reverse zone file.
Without `chroot`:
# vim /var/named/rz-172-16-1
With `chroot`
# vim /var/named/chroot/var/named/rz-172-16-1
----------
$TTL 1D
@ IN SOA ns1.example.tst. sarmed.example.tst. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns1.example.tst.
1 IN PTR mail.example.tst.
2 IN PTR www.example.tst.
3 IN PTR ns1.example.tst.
**Explanation**: Most parameters used in the reverse zone file are identical to the forward zone, except the following.
- PTR: PTR or pointer record points to a FQDN`
### Finalizing ###
Now that the zone files are ready, we adjust the permission of the zone files.
Without `chroot`:
# chgrp named /var/named/*
With `chroot`:
# chgrp named /var/named/chroot/var/named/*
Now we set the IP address of the DNS server.
# vim /etc/resolv.conf
----------
nameserver 172.16.1.3
Finally, we can start the DNS service and make sure it is added to startup.
# service named restart
# chkconfig named on
While the DNS is firing up, it is advisable to keep an eye on the log file /var/log/messages as it contains useful information about what is going on behind the scenes. If there is no error, we can start testing the DNS server.
### Testing DNS ###
We can use dig or nslookup for testing DNS. First, we set up necessary package(s).
# yum install bind-utils
#### 1. Testing Forward Zone using dig ####
When you are using dig for testing, you should always look for the status: "NOERROR". Any other value means that there is something wrong.
# dig example.tst
----------
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31184
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 86400 IN A 172.16.1.3
;; AUTHORITY SECTION:
example.com. 86400 IN NS ns1.example.com.
;; ADDITIONAL SECTION:
ns1.example.com. 86400 IN A 172.16.1.3
#### 2. Testing PTR using dig ####
When using dig for testing, you should always look for the status: "NOERROR". Any other value means that there is something wrong.
# dig -x 172.16.1.1
----------
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27415
;; QUESTION SECTION:
;1.1.17.172.in-addr.arpa. IN PTR
;; ANSWER SECTION:
1.1.16.172.in-addr.arpa. 86400 IN PTR mail.example.tst.
;; AUTHORITY SECTION:
1.16.172.in-addr.arpa. 86400 IN NS ns1.example.tst.
;; ADDITIONAL SECTION:
ns1.example.tst. 86400 IN A 172.16.1.3
#### 3. Testing MX using dig ####
# dig example.tst mx
----------
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35405
;; QUESTION SECTION:
;example.tst. IN MX
;; ANSWER SECTION:
example.tst. 14366 IN MX 10 mail.example.tst.
### Troubleshooting Tips ###
1. I have SELinux turned off.
1. Make sure that your firewall is not blocking UDP port 53
1. /var/log/messages should contain useful information in case anything goes wrong
1. Make sure that the zone files are owned by user named
1. Make sure that the IP address of the DNS server is the first entry in /etc/resolv.conf
1. If you are using example.tst in a lab environment, make sure to disconnect the server from the Intenet since example.tst is a non-existent domain.
To sum up, this tutorial focuses on hosting a domain example.tst in a lab environment for demonstration purposes. Please note that this tutorial creates a public DNS server, i.e., a DNS server that will respond to queries from any source IP address. If you are configuring a production DNS server, make sure to check what the policies regarding public DNS are. Other tutorials cover [pcreating a secondary DNS][2], [limiting access to a DNS server][3], and implementing DNSSEC.
Hope this helps.
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/04/primary-dns-server-using-centos.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://xmodulo.com/2014/04/close-open-dns-resolver.html
[2]:http://xmodulo.com/2014/04/secondary-dns-server-centos.html
[3]:http://xmodulo.com/2014/04/close-open-dns-resolver.html

View File

@@ -0,0 +1,185 @@
How to set up a web-based lightweight system monitor on Linux
================================================================================
Sometimes we, as a normal user or a system admin, need to know how well our system is running. Many questions related to system status can be answered by checking log files generated by active services. However, inspecting every bit of log files is not easy even for seasoned system admins. That is why they rely on monitoring software which is capable of gathering information from different sources, and reporting analysis result in easy to understand formats, such as graphs, visualization, statistics, etc.
There are many sophisticated monitoring system software such as [Cacti][1], [Nagios][2], Zabbix, Munin, etc. In this article, we pick a lightweight monitoring tool called Monitorix, which is designed to monitor system resources and many well-known third-party applications on Linux/BSD servers. Optimized to run on resource-limited embedded systems, Monitorix boasts of simplicity and small memory footprint. It comes with a built-in HTTP server for web-based interface, and stores time series statistics with RRDtool which is easy to combine with any scripting language such as Perl, Python, shell script, Ruby, etc.
### Main Features ###
Here is a list of Monitorix's main features. For a complete list, refer to the [official site][3].
- System load and system service demand
- CPU/GPU temperature sensors
- Disk temperature and health
- Network/port traffic and netstat statistics
- Mail statistics
- Web server statistics (Apache, Nginx, Lighttpd)
- MySQL load and statistics
- Squid proxy statistics
- NFS server/client statistics
- Raspberry Pi sensor statistics
- Memcached statistics
### Install and Configure Monitorix on Fedora, CentOS or RHEL ###
First, install required packages as follows. Note that on CentOS, you need to set up [EPEL][4] and [Repoforge][5] repositories first.
$ sudo yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple perl-IO-Socket-SSL
After this, Monitorix can be installed with this command:
$ sudo yum install monitorix
To configure Monitorix, open the configuration file in /etc/monitorix/monitorix.conf, and change the options. The details on Monitorix configuration file can be found at [http://www.monitorix.org/documentation.html][6]
By default, the built-in HTTP server listens on port 8080. Thus, make sure that your firewall does not block TCP port 8080.
To start Monitorix, simply type the following.
$ sudo service monitorix start
Start your favorite web browser, and then go to http://<host-ip-address>:8080/monitorix to access Monitorix's web interface.
### Install and Configure Monitorix on Archlinux ###
On Archlinux, the Monitorix package can be downloaded from [AUR][7].
By default, the built-in HTTP server is disabled on Archlinux. To enable built-in HTTP server, edit <httpd_builtin> section in /etc/monitorix.conf as follows.
<httpd_builtin>
enabled = y
host =
port = 8080
user = nobody
group = nobody
log_file = /var/log/monitorix-httpd
hosts_deny =
hosts_allow =
<auth>
enabled = n
msg = Monitorix: Restricted access
htpasswd = /var/lib/monitorix/htpasswd
</auth>
</httpd_builtin>
Finally, start Monitorix service.
Open your favorite web browser, and go to http://<host-ip-address>:8080/monitorix to access Monitorix.
### Install and Configure Monitorix on Debian and Ubuntu ###
For Debian family, Monitorix can be installed in two ways: manually or through a third party repository.
#### Manual installation (for Debian) ####
Install all dependent packages first.
$ sudo apt-get install rrdtool perl libwww-perl libmailtools-perl libmime-lite-perl librrds-perl libdbi-perl libxml-simple-perl libhttp-server-simple-perl libconfig-general-perl libio-socket-ssl-perl
Download Monitorix package from [http://www.monitorix.org/downloads.html][8], and install it.
$ sudo dpkg -i monitorix*.deb
During installation, you might be asked to configure a backend web server. If you using Apache, make sure to reload Apache configuration by restarting Apache service.
$ sudo service apache2 reload
#### nstallation through repositories (for Ubuntu) ####
Enable Izzysoft repository by appending the following line in /etc/apt/source.list.
deb http://apt.izzysoft.de/ubuntu generic universe
Download and add a GPG key for the repository.
$ wget http://apt.izzysoft.de/izzysoft.asc
$ sudo apt-key add izzysoft.asc
Install Monitorix with apt-get. All its dependent packages will automatically be installed as well.
$ sudo apt-get update
$ sudo apt-get install monitorix
Finally, start Monitorix service.
$ sudo service monitorix start
To configure Monitorix, edit /etc/monitorix/monitorix.conf with a text editor, and restart Monitorix service.
$ sudo service monitorix restart
The built-in web server of Monitorix for Ubuntu is enabled by default. To access web-based monitoring result, go to http://<host-ip-address>8080/monitorix on your favorite web browser.
### Install and Configure Monitorix on Raspberry Pi ###
If you want to install Monitorix on Raspberry Pi (which is Debian-based), you cannot use the Izzysoft repository mentioned above because it does not provide an ARM port of Monitorix. Instead, follow Debian-based manual installation as follows.
First, install required packages.
$ sudo apt-get install rrdtool perl libwww-perl libmailtools-perl libmime-lite-perl librrds-perl libdbi-perl libxml-simple-perl libhttp-server-simple-perl libconfig-general-perl libio-socket-ssl-perl
If some of the required packages are not be installed, we need to force install with this command.
$ sudo apt-get -f install
Download Monitorix package (monitorix_x.x.x-izzy1_all.deb) from [http://www.monitorix.org/downloads.html][9].
Install Monitorix package with the command below.
$ sudo dpkg -i monitorix_x.x.x-izzy1_all.deb
After installation is finished, we need to change a small thing in Monitorix configuration as follows.
Open /etc/monitorix/monitorix.conf with your favorite text editor. Scroll down until you find <graphs enable>. Search for "raspberrypi = n", and replace 'n' with 'y'. This will enable monitoring of Raspberry Pi clock frequency, temperatures and voltages.
After editing is done, restart Monitorix service.
$ sudo service monitorix restart
By default, Monitorix's built-in HTTP web server is enabled. To access Monitorix's web interface, go to http://<raspberrypi-ip-address>:8080/monitorix
### Monitorix Screenshots (on Raspberry Pi) ###
Monitorix home screen:
[![](https://farm6.staticflickr.com/5558/14215953893_69b546c473_z.jpg)][10]
System load average and usage in graph option:
[![](https://farm6.staticflickr.com/5239/14009175290_6c5f9542b9_z.jpg)][11]
Active process graph option:
[![](https://farm3.staticflickr.com/2933/14195746084_1364bd1721_z.jpg)][12]
Choose "Clock Frequency" under "Raspberry Pi" section in the home screen, and you will see clock frequency, temperature, and voltage graphs for [Raspberry Pi][13].
[![](https://farm8.staticflickr.com/7330/14009143189_aeeee6a0e3_z.jpg)][14]
All monitoring graphs:
[![](https://farm3.staticflickr.com/2908/14192525721_d002b4e621_k.jpg)][15]
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/05/web-based-lightweight-system-monitor-linux.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://xmodulo.com/2013/11/install-configure-cacti-linux.html
[2]:http://xmodulo.com/tag/nagios
[3]:http://www.monitorix.org/features.html
[4]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html
[5]:http://xmodulo.com/2013/01/how-to-set-up-rpmforge-repoforge-repository-on-centos.html
[6]:http://www.monitorix.org/documentation.html
[7]:http://aur.archlinux.org/packages.php?ID=33911
[8]:http://www.monitorix.org/downloads.html
[9]:http://www.monitorix.org/downloads.html
[10]:https://www.flickr.com/photos/xmodulo/14215953893/
[11]:https://www.flickr.com/photos/xmodulo/14009175290/
[12]:https://www.flickr.com/photos/xmodulo/14195746084/
[13]:http://xmodulo.com/go/raspberrypi
[14]:https://www.flickr.com/photos/xmodulo/14009143189/
[15]:https://www.flickr.com/photos/xmodulo/14192525721/

View File

@@ -0,0 +1,40 @@
Install SoundCloud In Ubuntu 14.04
================================================================================
[SoundCloud][1] is a great platform to discover alternate or indi music. If you are a fan of SoundCloud, you may want to try it as a desktop app for Ubuntu 14.04, earlier versions and other Linux distributions such as Linux Mint, Elementary OS etc.
To **install SoundCloud in Ubuntu 14.04**, we shall use the same trick which we used to [install Google Keep in Ubuntu][2]. We used Google Chrome to install Google Keep and this time well use Firefox to install SoundCloud.
### Install SoundCloud in Ubuntu 14.04 and Linux Mint: ###
Since Ubuntu (and most other Linux distributions) come pre-installed with Ubuntu, just open Firefox and go to the following address: [https://marketplace.firefox.com/][3]
Firefox Marketplace is Firefox alternative of Chrome store and provides several apps meant for Firefox smartphone OS, as well as Firefox web browser. Search for SoundCloud in Firefox Marketplace. Click on install to install it and add is as a web app in Ubuntu.
![](http://itsfoss.com/wp-content/uploads/2014/05/Firefox_SoundClud.jpeg)
Once its done, you can start the SoundCloud desktop app by searching for it in Unity Dash. Here is how the app looks like in Ubuntu 14.04 Unity:
![](http://itsfoss.com/wp-content/uploads/2014/05/SoundCloud_Ubuntu.jpeg)
### Uninstall SoundCloud app installed from Firefox Marketplace ###
Dont be over excited. This desktop doesnt have sound menu integration and I cannot say the same about desktop notification but it is still better than the web one, at least I think so. But if you are disappointed with it and uninstall it, its very easy to do so in Ubuntu.
Run SoundCloud, **right click** on its icon in Unity Launcher and click **unintsall app**.
![](http://itsfoss.com/wp-content/uploads/2014/05/Uninstall_SoundCloud_Ubuntu.jpeg)
I am not much of a SoundCloud fan. I prefer [installing Spotify in Ubuntu][4] over any other streaming music app. What about you?
--------------------------------------------------------------------------------
via: http://itsfoss.com/install-soundcloud-ubuntu-1404/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://soundcloud.com/
[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/
[3]:https://marketplace.firefox.com/
[4]:http://itsfoss.com/install-spotify-ubuntu-1404/

View File

@@ -0,0 +1,348 @@
Ubuntu Touch and Android Dual Boot Installation
===================================
Ubuntu Dual Boot Installer is provided as a tech preview for developers who want to run Ubuntu and Android on a single device. It is not intended to be used by regular users, neither at this point nor as its ultimate goal. Those developers installing it should be familiar with the Ubuntu and Android partition layouts and should also feel at home with manually flashing partitions in case something goes wrong.
Ubuntu Dual Boot Installer was born as an internal skunkworks project some Canonical Engineers dedicated a limited amount of their time to. Seeing the good progress, it was decided to release this preview for the developer community to test, study and contribute to.
Dual boot is not part of the regular Ubuntu release.
## What to expect after installation
- A single device with the ability to switch between fully functional Android and Ubuntu images
- On Android: an Ubuntu Installer app to install Ubuntu, as well as to boot into Ubuntu
- On Android: the SuperUser app to grant permissions to the Ubuntu Installer app
- On Ubuntu: an Ubuntu Dual Boot app to boot into Android
- Ubuntu system updates are not yet supported from the Ubuntu side, but they can be done via the Android app
## Requirements
To install dual-boot, you'll need:
- **A Nexus 4 device** (other [supported Nexus devices][1] should in theory work but have not been tested at the time)
- **Android 4.4.2 or higher** running on the device, either stock firmware or based on CyanogenMod or AOSP.
- **2.7GB of free storage** on the device to install Ubuntu
- **ADB tools** running on your desktop computer
- The device needs its **bootloader to be unlocked and USB debugging enabled**. Follow steps 1 to 3 below to do this, or alternatively, if your device is already unlocked and has USB debugging enabled, you can [skip to the installation process >][2]
### Step 1 - Desktop Setup
The following steps are required on your desktop system that you'll need in order to flash and communicate with the device.
**Set up the Touch Developer Preview Tools PPA**
The PPA is a small mini repository which contains additional software required by this install process. The following section details how to enable and use it.
The PPA has the tools and dependencies to support Ubuntu releases including 12.04, 12.10, 13.04, 13.10 and 14.04. Add the Ubuntu Touch PPA by adding the following custom source list entry to your `/etc/apt/sources.list` file.
On your computer, press `Ctrl+Alt+T` to start a terminal.
sudo add-apt-repository ppa:phablet-team/tools
On Ubuntu 12.04, you will also need to run:
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
Then do the following:
sudo apt-get update
sudo apt-get install ubuntu-device-flash
### Step 1.5 - Optional Android Backup
- If not enabled, enable developer mode, by tapping `Settings -> About phone -> Build number` (x 7 times)
- If not enabled, enable usb debugging in `Settings -> Developer options -> USB debugging`
- Execute on your computer
$ adb backup -apk -shared -all
This should hopefully create backup.ab with all of your apps, OS, and data. Later, after reflashing with android (or rooting / unlocking) you will be able to use $ adb restore backup.ab to restore all of your data.
### Step 2 - Device unlock
If the device is already unlocked, skip to Step 3. These steps will wipe all personal data from the device.
1. With the device powered off, power on the device by holding the `Power button` + `volume up` + `volume down`.
2. The device will boot into the bootloader.
3. Plug the device into the computer via the USB cable.
4. On your computer, press `Ctrl+Alt+T` to start a terminal. Type sudo fastboot oem unlock, followed by Enter
5. On the device screen, accept the terms of unlocking.
6. Boot the device by pressing the `power button` (pointed by an arrow with Start on the screen).
**Device factory reset**
If you get stuck in a bootloop rebooting the tablet after unlocking the bootloader... Here's what you do:
1. During the bootloop.. hold the `power button` + `volume up` + `volume down` button simultaneously to get yourself back into fastboot mode as you were previously.
2. In fastboot mode.. use the volume keys to scroll to Recovery and the power button to select it.
3. In Recovery (Android robot on his back with a red triangle)... tap the volume up button and the power button simultaneously which will bring you into stock recovery. Again.. Don't hold the buttons, just tap them simultaneously. Also make sure you're holding the correct volume button. Up will be the volume key on the right.
4. Once you're in Recovery.. perform a factory reset/data wipe and then reboot your tablet... you should now be back to the Welcome Screen.
### Step 3 - Initial Device Setup
Follow these initial steps on your device:
1. If not booted, boot the device into Android
2. Enable USB debugging on the device
- on Ice Cream Sandwich (version 4.0) go to Settings and turn on USB Debugging (`Settings > System > Developer options > USB debugging`).
- on Jelly Bean (versions 4.1 and 4.2) you need to enter `Settings, About [Phone|Tablet]` and tap the Build number 7 times to see the Developer Options.
- on 4.2.2, (`settings > about` > tap on build number 7 times to activate the developer options menu item).
- On either Android version you must then enable USB debugging via `Settings > Developer options > USB debugging`. You will also need to accept a host key on the device.
- On the workstation-> `adb kill-server; adb start-server`
3. Plug the device into the computer via the USB cable.
- Depending on the installed Android version, a popup will show up on the device with the host key that needs to be accepted for the device to communicate with the workstation.
- Note, 'adb devices' should not show the device as 'offline'. If it does, unplug the device, run adb under sudo on the workstation (`sudo adb kill-server; sudo adb start-server`), then plug the device back in.
- In some cases, the device will continue to show offline, and the host key popup will not appear if the USB connection method is 'MTP' (default for some devices and versions of Android). Unchecking all options in the USB connection method (`Settings -> Storage -> Menu -> USB computer connection -> MTP, PTP`) seems to resolve this adb connection issue for some users.
4. Save the version of the current image on the device, if on Android, to use as a reference to revert back to. The version can be found by going to `Settings > About Phone > Build Number`.
Newer Nexus 10s have not booted fully after developer mode was enabled. If this occurs boot into the bootloader and do "`fastboot -w`", then proceed to the next step.
## Dual boot installation or upgrade instructions
The procedure at this point is effectively the same for both new installations and upgrades of an existing dual boot installation.
### Installing the Ubuntu Installer app in Android
Ubuntu Note: if you had installed a previous version of Ubuntu dual boot, please make sure to uninstall Ubuntu from the Android app before upgrading to the new Ubuntu dual boot. You can keep the user data, only uninstallation of the base system is recommended.
1. On your computer, download the dual boot installation script into your home directory from: http://humpolec.ubuntu.com/latest/dualboot.sh
2. Open a terminal on your computer pressing the `Ctrl+Alt+T` key combination
3. Make the installation script executable by running this command:
chmod +x dualboot.sh
4. Ensure that your device:
- has booted normally into the Android user interface
- has USB debugging enabled
- has an unlocked bootloader
5. Connect your device via USB to your computer
6. Install dual-boot by running this command on a terminal:
./dualboot.sh
After installation, the phone will reboot several times. Once finished, it will boot into Android and you will find the dual boot app as “Ubuntu Dual Boot” in the Apps section.
Optionally, for alternative ways of using the installer script, [check out the installer reference >][3].
Now follow the instructions below to install Ubuntu from Android.
## Installing Ubuntu from Android
Note: 2.7GB of free memory space is required on your device for the Ubuntu installation.
1. Optionally, on your desktop, and while your device is still connected via USB, issue the following command on the terminal to free up space (say "Yes" if you are asked to grant permissions on the device):
adb shell "su sh rm -rf /cache/*"
2. On the device, press the apps button in Android to bring up the list of apps
3. Browse the apps to find the **Ubuntu Dual Boot** icon and press it to start the app
4. When the app launches, press on **Choose channel to install** and choose a channel to download from (the recommended channel is **utopic**)
5. Once download is completed you need to Grant SU permissions to the application for the install to be successful. Press the **Grant** button, when prompted.
6. Press the **Reboot to Ubuntu** button to boot to Ubuntu.
7. A standard phone reboot with the hard key will always boot to Android.
Notes:
- All channels supported by the phablet-flash tool are also supported by the Ubuntu Installer on Android
- When selecting an Ubuntu channel, the **bootstrap** checkbox lets you wipe user data from Ubuntu, otherwise it is kept between installations. Since you're installing for the first time now, it won't make a difference
- When selecting an Ubuntu channel, unticking the **latest version** checkbox will let you select a particular image number. Otherwise, if checked it will default to the latest image.
- If during installation the Ubuntu download finished while the phone was locked or when the Ubuntu Installer app was not on the foreground, the installation button will change to **Resume install**. This will resume installation to the point where SuperUser permissions are requested.
## Additional notes
### Updating to a new Ubuntu image
The rule of thumb for dual boot is:
- Installation of a new Ubuntu version needs to be done from the Android side via the Dualboot app
- Download of a new Ubuntu version can happen on either the Ubuntu or Android side
This effectively means there are two possible ways to upgrade your Ubuntu image:
- **If you are running Android**, use the Dualboot app to check and install new versions of Ubuntu by selecting "Uninstall Ubuntu" from the menu options. Next you will be asked if you want to keep the user data from Ubuntu. If you do want to keep the data, contacts, installed applications, pictures, background settings and such will be kept across Ubuntu installations. Additionally, every time there is a new Ubuntu version available, you'll get an Android notification:
- For stable channels, the app polls for new versions every 2 days
- For proposed channels, the app polls for new versions every 10 hours
- **If you are running Ubuntu**, use the standard upgrade mechanism to download new images via System Settings, but do not choose to install the image after having downloaded it. Instead, once the dowload has finished, reboot to Android and the Dualboot app there will resume the installation. Once finished, you can then reboot to Ubuntu.
To update Ubuntu to a newer version, On the android Ubuntu dual boot application, Once Ubuntu has been uninstalled, follow the same installation step to download a newer version of Ubuntu.
### Dual boot installer command reference
For the majority of cases, running the installer script in auto mode with no arguments will suffice. For more advanced usage, additional commands can be used.
dualboot.sh
- Auto mode: it detects if the SuperUser app installation is required and instals or updates the Dualboot application on Android
dualboot.sh full
- Full mode: it installs the SuperUser and Dualboot apps on Android
dualboot.sh update
- Update mode: it installs or updates the Dualboot app on Android
dualboot.sh channel $CHANNEL
- Sideload mode: it downloads the latest from the specified Ubuntu $CHANNEL and sideloads the files to the phone. It then starts the Dualboot app on Android to resume the Ubuntu installation with the sideloaded files.
dualboot.sh push ubuntu.tar.xz device.tar.xz version.tar.xz
- Sideload push mode: it sideloads the downloaded files passed as a parameter and it starts the Dualboot app to resume installation with them on the Android side.
The script also takes a device ID in case there are more devices connected to the computer. The device ID is the first parameter passed to the script. If it is not provided first connected device is used. E.g.
dualboot.sh <device-id> channel devel-customized
### Using a custom image server
If you need to use a custom image server that provides ported images for those devices outside of the officially supported, you can use a custom image server with the Dualboot app. To do so, open a terminal, and with your device connected over USB, issue the following command (replacing $CUSTOM\_SERVER\_URL with the URL or your custom server):
adb shell "su sh 'cd /data/data/com.canonical.ubuntu.installer/files/ && echo $CUSTOM_SERVER_URL > custom_server && chmod 777 custom_server'"
The next time you start the Dualboot app on Android, it will use that server to fetch and install images instead of the official Ubuntu one.
## If something goes wrong
If something goes wrong after the dual boot installation and you cannot boot either into Ubuntu or Android, you can revert the Android installation to the status it was before dual boot by reflashing the original boot and recovery images. Only the recovery partition is actually modified by dual boot, but you can choose to reflash the boot partition just in case.
1. Download the Android firmware you are running on your device onto your PC.
2. Open a terminal with `Ctrl+Alt+T`
3. Extract the firmware tarball and cd to its directory.
4. Run the following command to reboot into the bootloader
adb reboot bootloader
5. Once in the bootloader, run this command to reflash the boot partition:
fastboot flash boot boot.img
6. Without exiting the bootloader, run this command to reflash the recovery partition:
fastboot flash recovery recovery.img
7. After flashing, reboot and your phone should start into Android:
fastboot reboot
## Contributing
The dual boot project, as with the rest of Ubuntu is open source and open for participation, you can help making it better too!
- [Report bugs >][4]
- [Contribute code >][5]
## FAQ
### How does dual boot work?
An Android-based phone has multiple partitions which serve different purposes. Those relevant for dual booting are **/boot**, **/recovery**, **/system** and **/data**.
- The **boot** partition is loaded by the bootloader during a normal boot. The boot image in that partition is a combination of the kernel and a ramdisk. In short, the bootloader unpacks the boot image, creates a ramdisk and copies the content of the boot image's ramdisk into it. Then the kernel is started by executing the **init process** from ramdisk.
- The **recovery partition** contains the recovery image, which is just a different kind of boot image. It also includes a kernel and a ramdisk, where the init binary is replaced by a recovery binary inside the ramdisk.
- The **system partition** holds all the read-only system files (except the ones in ramdisk), and it is mounted by the init process.
- The **data partition** is then a writable partition used by the system for user data.
Ubuntu uses partitions in a slightly different way:
- The **boot** and **recovery** partitions have the same functionality as in Android
- The **system image** holds the Android part of the system which is executed inside the LXC.
- The **data partition** contains the Ubuntu system under **/data/ubuntu/**
In order to enable the user to choose their own flavour of Android, the Android boot image cannot be modified, as the original kernel needs to be preserved. **Thus the recovery partition is used to boot into Ubuntu.**
### Which versions of Android does dual-boot work with?
- Stock Android or AOSP 4.4.2 or higher.
- CyanogenMod (based on Android 4.4.2 or higher).
### Which devices does dual-boot work for?
Dual boot has been tested to work with the following devices:
- Nexus 4
- Nexus 7
- Nexus 10
### Which Ubuntu releases does dual-boot support?
Dual boot supports the same channels that phablet-flash supports.
### How is the user data partition shared between Android and Ubuntu?
The user data partition hosts also the Ubuntu system image at /data/system.img which is around 2 GB.
The Ubuntu swap file is also present in the data partition at /data/SWAP.img (around (540 MB)
The Ubuntu user and system data are also present at:
- /data/user-data
- /data/system-data
The Android data partition usage is unchanged.
### Is booting into recovery no longer possible when dual-booting?
The recovery partition when dual booting is currently used by the Ubuntu boot image. This means that when booting into recovery mode, Ubuntu will boot.
Access of the recovery will be resolved in future releases. However when the Ubuntu image is uninstalled, the original (Android stock or CWM) recovery is restored by the Ubuntu Install android app.
### If dual boot replaces the recovery partition, can I do an Android upgrade with dual boot installed?
Yes. Use the "Prepare for Android update" option in the Dual boot app menu on Android. This will recover your original Android recovery partition, ready for the Android upgrade. This will obviously delete the Ubuntu installation in the recovery partition, but you can easily reinstall it after the Android upgrade from the Dual boot app.
In any case, you can always uninstall dual boot, which will restore your original recovery partition.
### Can I uninstall dual boot?
Yes, when Ubuntu is uninstalled from the Android side via the dual boot app, the original Android recovery partition is restored to the original state before dual boot was installed.
Uninstalling Ubuntu also deletes the Ubuntu system image and swap file. Optionally, also the Ubuntu user data can be deleted.
### The dual boot app installs a copy of the the SuperUser app. Can I use another SuperUser app instead?
Yes indeed! The supplied [SuperUser][6] app is only for those who don't have it installed yet.
However, one word of caution: tests were only performed only with the SuperUser app version from the [CyanogenMod][7] build and with the one installed by dualboot.sh script. But as long as you own SuperUser app behaves in similar way of those two tested, you should be fine.
### When installing Ubuntu, can I switch channels without deleting user data?
Yes you can, but this is something that hasn't been thoroughly tested. Therefore some applications might not function properly. The same applies for switching between different versions.
### Can I make boot to Ubuntu the default and move the Android boot to the recovery partition?
Right now swapping the default boot OS is not possible. However, this is something we might look to support if there is demand for it.
### Why do you use the recovery partition to boot Ubuntu, rather than a combined boot image for Android and Ubuntu?
One of the initial principles when designing dual boot was not to tie it to a particular Android flavour and version and leave the user the flexibility to use their own choice. Thus the Android boot image and the kernel it contains are left untouched.
The choice was then to reuse the recovery partition, and instead focus on restoring it back to its original state if it's necessary to go back to single boot with Android.
### I already have CWM recovery installed and know how to use it, can I use a zip file and flash manually instead?
Absolutely, we provide dualboot.sh to make it easy to install the apps and the custom recovery. If you prefer to install the recovery manually yourself, it's also possible. Check out the source code for the dualboot.sh script to see exactly what it's doing.
### Why does the Ubuntu Installer app need to be installed to the system partition via recovery?
The Ubuntu Installer app needs to be installed as an Android (preinstalled) system app. Unlike use-installed apps, which live in the data partition, system apps always live in system partition and are granted additional privileges on top of the standard permissions set available to 3rd party applications.
The extra permissions that the Ubuntu installer app needs are just two: **cache partition write access** to store the downloaded files for Ubuntu installation and **power management** capability to reboot the system.
--------------------------------------------------------------------------------
via: https://wiki.ubuntu.com/Touch/DualBootInstallation
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://wiki.ubuntu.com/Touch/Devices#Working_with_phablet-flash
[2]:https://wiki.ubuntu.com/Touch/DualBootInstallation#Installation
[3]:https://wiki.ubuntu.com/Touch/DualBootInstallation#DualBootInstallerReference
[4]:https://bugs.launchpad.net/humpolec/+filebug
[5]:https://code.launchpad.net/humpolec
[6]:https://wiki.ubuntu.com/SuperUser
[7]:https://wiki.ubuntu.com/CyanogenMod

View File

@@ -0,0 +1,138 @@
5个指引提升你的树莓派项目
> 从SSH到端口转发这些先进技术将使树莓派的发展轻松前进。
当你命令行输入命令时你将不再是一个新手在做一些陌生的设置了。虽然进度缓慢但是你正在通过你的方式去学习使用这廉价的信用卡尺寸的大计算机去满足一些DIY想法这就是树莓派。
> 然而在基础和中间的东西之间还是存在较大差距。当你从“设置你的派”的教程例如“创建一个媒体服务器”前期项目的需求就变得有点冒险了。许多中级的Pi教程包括其中的一些读写操作例如一些关于树莓派的安装设置。 并非每一个项目都需要教程里的所有建议,但是知道这些步骤可以使项目更顺利地贴合需求。当你准备超越基础知识时,这里有一些关于树莓派的教程将提前为你准备。
### 1) Using SSH ###
使用SSH登录
SSH代表Secure Shell是一种加密网络协议用于安全地传输你的计算机与树莓派之间的数据。项目中也许需要你通过计算机的命令行而不是直接通过链接显示器和键盘来实现。如今SSH已经提前安装在树莓派系统中所以如果你安装的是最新版本或者接近最新版本的树莓派都是支持SSH使用的。
如何使用SSH第一你需要知道你的派的IP地址在你的派中输入一下命令
sudo ifconfig
你的IP地址将会在第一段或者第三段显示这主要看你的树莓派是通过线缆还是通过WIFI适配器连接网络的。如果是通过线缆连接那请查看第一段在“eth0”那行开始显示。如果是通过wifi链接将在第三段“wlan0”开头的地方显示。
无论通过哪种方式你将会看到以“inet addr”开头后面跟着像192.168.2.2这样类型的IP地址这是我们在这篇文章中经常引用到的一种默认IP地址格式。
现在你有一个可以链接树莓派与你的电脑的IP地址了如果你使用的是Mac你已经建立了SSH链接启动你的终端应用并输入
ssh pi@192.168.2.2
连接之后将会要求输入密码默认情况下密码一般是“respberry”.如果你修改了默认密码,请输入新的密码取而代之。这样,您将进入树莓派系统。
如果你在一台PC那这是一个多余的步骤。
下载并运行PuTTY或者另一种支持Windows系统的SSH客户端。输入你的IP地址在空格 中如一下截图所示。将默认端口设置成22.点击enterPuTTY将会提示你输入用户名和密码。填完之后将可以开始在你的Pi里远程工作了。
### 2) Remote Desktop Your Raspberry Pi ###
使用远程桌面工具到你的树莓派
使用SSH去从命令行远程控制你的Pi是极好的但是如果你想通过图形界面去管理你的Pi。幸运的是MAC和PC都已经建立了这种接口。
在你的树莓派中的命令行当然你也可以通过SSH来操作输入
sudo apt-get install xrdp
Xdrp是一种在可以在后台运行的计算机守护进程并可以在Mac和PC中支持微软远程桌面客户端。通过一旦在树莓派中安装了你的MAC或者PC将可以通过客户端登录到Pi中。
找到你电脑中一个叫远程桌面的客户端。它本身是不完全隐藏起来的,但不会隐藏在应用程序的文件夹中。
出现提示时输入你的IP地址。接下来会弹出xrdp窗口提示你输入用户名和密码。
如果进展顺利,你的树莓派桌面就会在你的窗口或者在电脑屏幕上显示。
### 3) Static IP For Your Pi On The Home Network ###
在您的同网段给树莓派设置静态IP地址
我们发现如第一步所说很容易就可以管理树莓派但是不能保证你的路由器会一直给你的树莓派分配一个永久固定的IP地址。这意味着在你网段中的计算机无法知道树莓派被分配了什么IP地址。那么如何来给树莓派分配静态的IP地址而不是每隔几天就在树莓派上执行“sudo ifconfig”命令有时候情况糟糕几个小时就更变了一次IP。
可想而知我们从“ifconfig”命令开始所以输入
sudo ifconfig
拿出笔和纸做准备记录下面的三个IP地址。#后面的代码是注释,不会在显示.
inet addr: 192.168.2.2 # Pi's Current IP Address
Bcast: 192.168.0.255 # The Broadcast IP Range
Mask: 255.255.255.0 # Subnet Mask Address
此外你还需要知道另外2个信息。请输入一下命令获取网关和目的地址。
netstat -nr
接下来去查看你路由器上的配置。如何进行这一步主要取决于你用什么路由器所以还是查看下说明书吧找出你的设备通过DHCP设置了哪段ip地址。有些地址是被禁止使用的因为有些协议中已经使用了。所以要选择没有被使用过的例如192.168.2.2.你的路由器会保留一个未使用的IP地址分配给想树莓派这样的设备。如果你的路由器是Belkin那大概就是这样
如果不是你需要让树莓派知道它的新的ip地址。我们通过nano编辑器来编辑树莓派中相关的文件。
sudo nano /etc/network/interfaces
将“iface eth0 inet dhcp”这一段修改成“iface eth0 inet static”也就是将动态获取IP修改成静态IP。
接下来输入如下将下列X取代成你之前所复制的IP地址。最上面的地址是我们将要把DHCP中没有使用的IP地址分配作为树莓派的静态IP地址。
address 192.168.2.2
netmask XXX.XXX.XXX.X
network XXX.XXX.X.X
broadcast XXX.XXX.X.X
gateway XXX.XXX.X.X
使用“sudo reboot”的命令重启树莓派系统后再命令行在再输入“ifconfig”我们刚刚新设置的静态IP设置就会呈现。
### 4) Forwarding Ports To Raspberry Pi ###
端口转发至树莓派
一些Pi程序可能需要你转发一个特定的网络端口号到你的树莓派。端口是信息在互联网传送的虚拟路径。有时候你需要转发一个端口来使像树莓派的计算机可以访问互联网即使绕过了路由器。这种情况有点像拨电话在网络上的延升。
端口转发能够用于像树莓派网页服务器树莓派的IP语音服务器或者简单的点对点下载。奖金65000个端口可供选择你可以分配不同的端口给不同的树莓派项目用来进行通信。
默认情况下某些端口代表着特定的应用。例如80端口默认为HTML页面21端口默认代表文件传输协议1194端口默认为设置VPN服务器。所以大多情况下你需要选择一些没有被默认制定的端口号来设置。
设置端口转发的方法完全取决于你的路由器,于是很难创建一个固定的关于设置端口转发教程。你只能阅读你路由器的说明书来定义端口和转发了。
下面链接了几个主流路由器厂商的端口转发教程。
- [Belkin][10]
- [Netgear][11]
- [Linksys][12]
### 5) Static IP For Your Pi On The Internet ###
在网络中给你的Pi设置静态IP
再次声明如果你的运营商给了你一个静态IP你就不需要担心这个部分了。
我们已经给树莓派设置了一个静态的内部IP地址这意味着在你的内部网络中总是能够连到你的树莓派。但是如果程序需要树莓派连接到互联网呢如果你想要在你的树莓派上搭建一个Web服务器在你网络之外的人们需要知道你的Pi在哪里这意味着我们要来设置一个像静态IP的公有IP地址。
我之所以说“看起来像”是因为我们已经设置了一个伪静态IP地址。通常你所在的运营商将会继续更变。所以每一次有人连接到你的树莓派时将要重新写脚本时都会发现得树莓派已经移动我们需要重新更改新的IP地址。
我们是可以通过DDNS即动态DNS,这可以保持一个名称服务器得到实时更新相关程序和树莓派就通过DDNS保持相对应。
首先需要注册一个动态的主机服务。根据指示并创建新的名称服务器类似Yourserver.dnsdynamic.com.
接下来进入树莓派中的命令行根据下面命令来安装DDNS客户端
sudo apt-get install ddclient
我们需要编辑DDNS客户端配置更改新的名称服务器
sudo nano /etc/ddclient/ddclient.conf
每种服务配置都会有略微的不同但是DDNS网址会告诉你需要配置相关文件中的内容。一个标准的DDNS配置将会举例可以从中复制和粘贴。
由于这个文件的存在你所在的运营商将不会停止更新树莓派的IP地址因此我们需要设置一个守护进程在脚本的最前面以确保检查IP地址是否已经更改。
daemon=600
# check every 600 seconds
这里设置的是每10分钟检查一次这里只是一个练习。如果你设置成每秒钟检查一次你的动态服务器应该不会接受因为这样就像扔垃圾邮件到服务器。同事按下ctrl+x保存并退出配置文件。
接下来,输入:
ddclient
只需要输入程序的名称就可以运行了。当你的树莓派开着的时候就会持续运行了。如果你重启树莓派,键入 “ddclient”就会重新开始运行了。
现在你的树莓派已经被装修一番和准备了更高级的教程了,请从中获得更多乐趣吧!
--------------------------------------------------------------------------------
via: http://readwrite.com/2014/04/09/raspberry-pi-projects-ssh-remote-desktop-static-ip-tutorial#feed=/hack&awesm=~oB1b7zvteUQGOV
译者disylee(https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://readwrite.com/2014/03/04/raspberry-pi-quantified-fish-acquarium#awesm=~oAWz5ZbkX6w7ZL
[2]:http://en.wikipedia.org/wiki/Secure_Shell
[3]:http://www.raspbian.org/
[4]:https://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/finding-your-pis-ip-address
[5]:http://www.chiark.greenend.org.uk/~sgtatham/putty/
[6]:http://en.wikipedia.org/wiki/Daemon_(computing)
[7]:https://www.modmypi.com/blog/tutorial-how-to-give-your-raspberry-pi-a-static-ip-address
[8]:http://raspberrywebserver.com/serveradmin/get-your-raspberry-pi-web-site-on-line.html
[9]:http://portforward.com/help/portforwarding.htm
[10]:http://www.belkin.com/us/support-article?articleNum=10790
[11]:http://kb.netgear.com/app/answers/detail/a_id/24046/~/how-do-i-configure-port-forwarding-on-routers-with-the-netgear-genie-interface%3F
[12]:http://kb.linksys.com/Linksys/ukp.aspx?pid=80&vw=1&articleid=21470
[13]:http://en.wikipedia.org/wiki/Dynamic_DNS
[14]:http://sourceforge.net/p/ddclient/wiki/Home/
[15]:https://www.dnsdynamic.org/
[16]:http://dnsdynamic.blog.com/2011/06/26/using-ddclient-with-dnsdynamic/
[17]:http://readwrite.com/2014/01/21/raspberry-pi-great-projects#feed=/search?keyword=raspberry+pi&awesm=~oAWzuuuChYu9vm

View File

@@ -1,37 +0,0 @@
Ubuntu每日贴士-Ubuntu One系统关闭如何切换到Dropbox或者Box云服务
Canonical公司决定关闭Ubuntu One的云服务你可能正在寻找备份你主机的其他服务器尽管现在有很多云服务的提供商但是仅有小部分支持linux,包括Ubuntu。
Dropbox全面支持Ubuntu它有一个很好的整合了ubuntu桌面系统和其他通知栏的客户端。Box官方的Box.net也可以通过WebDav协议支持linux。
这里有一段来自Canonical公司关于Ubuntu One的摘录
As of today (April 2), it will no longer be possible to purchase storage or music from the Ubuntu One store. The Ubuntu One file services will not be included in the upcoming Ubuntu 14.04 LTS release, and the Ubuntu One apps in older version of Ubuntu and in the Ubuntu, Google and Apple stores will be updated appropriately.
也就是说我们在ubuntu中失去了这项有用的服务。另一方面把你的数据移动到一个更稳定、更好信誉的网盘提供商是一个比较好的选择。
这里简要的说明一下怎样在ubuntu中运行DropBox或者Box云服务。
在ubuntu中安装DropBox云盘
关于这个话题我们已经写了很多为了在ubuntu中安装DropBox云盘你需要按照以下步骤去做这里提供了一个在ubuntu中一步步安装和使用DropBox的步骤。
查看完整步骤,点这里,或者下面的链接:
http://www.liberiangeek.net/2013/03/how-to-install-dropbox-in-ubuntu-13-04-raring-ringtail/
在Ubuntu中使用Box网盘
自从Box不再提供给linux一个全功能的客户端包括ubuntu你必须使用WebDav协议来访问和存储你账户的东西。
按Ctrl Alt T来打开终端终端被打开后执行下面的命令来安装包
sudo apt-get install davfs2
接下来执行下面的命令来配置davfs2选择Yes来允许没有权限的用户来挂载WebDav资源。
sudo dpkg-reconfigure davfs2
接下来通过执行下面的命令把davfs2目录复制到你的home目录
sudo cp -r /etc/davfs2/ $HOME/.davfs2
然后执行下面命令获取文件夹的所有权:
sudo chown -R username $HOME/.davfs2/
用你的用户名代替username
接下来打开密码文件输入你的登录凭证:
gedit ~/.davfs2/secrets
然后键入你的用户名email地址和密码在文件末尾添加下面的行并保存。
https://dav.box.com/dav richard@liberiangeek.net <box_password>
用你的账户信息替换上面的email地址和password。
接下来用下面的命令添加你的账户到davfs2组中
sudo adduser <username> davfs2
然后用sudo gedit /etc/fstab 打开/etc/fstab在后面添加下面一行并保存
https://dav.box.com/dav/ /home/<username>/box davfs _netdev,rw,user 0 0
最后创建一个挂载点并挂载Box
mkdir ~/box
重启你的电脑Box能开机自动挂载了
享受下吧!

View File

@@ -0,0 +1,36 @@
如何在同一台计算机上安装Windows 8.1和Ubuntu 14.04 LTS
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/How-to-Install-Windows-8-1-and-Ubuntu-14-04-LTS-on-the-Same-Computer-440356-2.jpg)
**许多Windows用户正在去尝试使用Linux操作系统并且不用删除其它正在使用的系统。他们知道Linux操作系统很容易更好的对待共享的同一台计算机上的其他操作系统会很高兴的。**
如果你是Wi如果你是Windows用户你想去安装Ubuntu。例如程序实际上是相当简单的需要一点小小的努力来自用户他们只需要关注一下本程序。
一种新的基于PC操作系统正常的安装并不复杂Ubuntu和Linux同样也是。在大多数情况下用户单击“下一步”对话框中所有的都是按照这个脚本。当你想保存也存在于相同的PC操作系统不一定是Windows专门更多的工作是必需的但可以很容易。
从Ubuntu Linux编写一个图像是容易的这是可以做到的一些应用程序。在Windows你将需要Ubuntu任何一个dvd上或USB最好是。为了让Ubuntu正确复制到一个USB设备你将需要下载一个小巧的工具称为Win32 Disk Imager 0.9.5。它具有一个简单的界面,它是完全自动的。
现在把Ubuntu安装重启之前你可能要设置一些自由的空间将用于Ubuntu但一个分区是不够的。您将需要两个一个Ubuntu本身的大约10GB如果你不想安装太多的应用的话就足够了和第二分区Windows,pagefile等这是増加你的内存。你不需要的他们但他们都是免费的。如果你在第二HDD安装Ubuntu那就更好了。
插上USB和重新启动。你会得到一个提示试用或安装。选择安装并给你选择安装Ubuntu和Windows 8或任何你拥有版本替换Windows 8与Ubuntu或者别的什么。
你可以选择安装在Windows 8但你也许不喜欢安装程序将为你选择。这是更好地打击其他手动安装。
发现你放置Ubuntu空闲分区安装程序无法读取Windows卷名称双击它选择ext4文件系统和“/”作为默认的安装点。
现在选择较小的分区和选择交换文件。就这些了。当你点击下一步,安装程序将启动,你将要选择的名称,密码,和其他细节。
下次当你启动你时将得到一个简单的操作系统,将让你选择你喜欢的操作系统列表。
尽情享受!
------------------
via: http://news.softpedia.com/news/How-to-Install-Windows-8-1-and-Ubuntu-14-04-LTS-on-the-Same-Computer-440356.shtml
译者:[CHINAANSHE](https://github.com/CHINAANSHE) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.softpedia.com/get/CD-DVD-Tools/Data-CD-DVD-Burning/Win32-Disk-Imager.shtml

View File

@@ -1,66 +1,76 @@
GOLinux翻译中
How to manage passwords from the command line on Linux
如何在Linux上使用命令行管理密码
================================================================================
With password-based authentication so prevalent online these days, you may need or already use some sort of password management tool to keep track of all the passwords you are using. There are various online or offline services or software tools for that matter, and they vary in terms of their sophistication, user interface or target environments (e.g., enterprises or end users). For example, there are a few GUI-based password managers for end users, such as [KeePass(X)][1].
在基于密码的认证在网络盛行的今天,你可能需要或者已经使用了某种密码管理工具来跟踪管理你正在使用的所有密码。有各种各样的在线或离线服务或者软件工具用于完成此类事情,而这些工具因复杂程度、用户界面或者目标环境(如企业或终端用户)的不同而各不相同。例如,有一些是为终端用户开发基于图形化的密码管理器,如[KeePass(X)][1]。
For those of you who do not want any kind of GUI dependency for password management, I will describe how to manage passwords from the command line by using [pass][2], **a simple command-line utility for password management**.
对于那些不想要依赖图形化进行密码管理的用户,笔者将会讲述如何在命令行下使用 [pass][2]来管理密码,**这是一个简单的用于命令行管理密码的工具**。
The pass utility is in fact a shell script frontend which uses several other tools (e.g., gpg, pwgen, git, xsel) to manage user's password info using OpenPGP. Each password is encrypted with gpg utility, and stored in a local password store. Password info can be retrieved either via terminal or self-clearing clipboard interface.
该密码工具实际上是一个shell脚本编写的前端其中调用了几个其它工具如gpgpwgengitxsel来使用OpenGPG管理用户的密码信息。各个密码使用gpg工具进行加密并存储到本地密码仓库中。密码信息可以通过终端或者自清除的剪贴板工具取回。
The pass utility is quite flexible and extremely simple to use. You can store each password info in an OpenPGP-protected plain text file, and group different password files into multiple categories. It supports bash auto completion feature, so it is very convenient to fill in commands or long password names using TAB key.
该密码工具相当灵活并且使用起来及其简单。你可以将各个密码信息存储到一个OpenGPG保护的普通文本文件并且将密码文件分组放到多个类目中。它支持bash自动补全特性因此可以很方便地使用TAB键来补全命令或者很长的秘密名称。
### Install pass on Linux ###
### 在Linux上安装pass ###
To install pass on Debian, Ubuntu or Linux Mint:
在DebianUbuntu或者Linux Mint上安装pass
$ sudo apt-get install pass
$ echo "source /etc/bash_completion.d/password-store" >> ~/.bashrc
To install pass on Fedora:
在Fedora上安装pass
$ sudo yum install pass
$ echo "source /etc/bash_completion.d/password-store" >> ~/.bashrc
To install pass on CentOS, first [enable EPEL repository][3] and then run:
在CentOS上安装pass首先[启用EPEL仓库][3],然后执行以下命令:
$ sudo yum install pass
$ echo "source /etc/bash_completion.d/password-store" >> ~/.bashrc
To install pass on Archlinux:
在Archlinux上安装pass
$ sudo pac -S pass
$ echo "source /etc/bash_completion.d/password-store" >> ~/.bashrc
### Initialize Local Password Store ###
### 初始化本地密码仓库 ###
Before using pass utility, you need to do one-time initialization step which involves creating a GPG key pair (if you don't have one) and a local password store.
在使用密码工具之前你需要执行一次初始化步骤该步骤包括创建一个GPG密钥对如果你还没有以及一个本地密码仓库。
First, create a GPG key pair (i.e., public/private keys) as follows. If you already have your own GPG key pair, you can skip this step.
首先通过以下步骤创建一个GPG密钥对公钥/私钥。如果已经创建了自己的GPG密钥对可以跳过此步骤。
$ gpg --gen-key
It will ask you a series of questions as shown below. If you are not sure, you can accept default answers. As part of key generation, you will set a passphrase for your secret key, which is essentially the master password required to access any password info stored in local password store. A successfully generated key pair will be stored in ~/.gnupg
执行该步骤,会询问你如下问题。如果你不确定,可以选择接受默认回答。作为密钥生成部分,你将要为你的密钥创建一个加密口令,这个口令本质上是你访问存储在本地密码仓库中的任何密码信息时的主密码。成功创建密钥对后,创建的密钥对会存储在~/.gnupg目录中。
![](https://farm3.staticflickr.com/2922/13965806430_a19596da60_z.jpg)
Next, initialize the local password store by running the following command. For <gpg-id>, enter the email address associated your GPG key created above.
Next, initialize the local password store by running the following command. For <gpg-id>, enter the email address associated your GPG key created above.接下来,运行以下命令来初始化本地密码仓库。对于<gpg-id>,输入上面创建密钥对时的关联电子邮件地址。
$ pass init <gpg-id>
This command will create a password store under ~/.password-store directory.
该命令会在~/.password-store目录中创建一个密码仓库。
### Manage Passwords from a Terminal with pass ###
### 在终端使用pass管理密码 ###
#### Insert new password info ####
### 插入新密码信息 ###
To insert new password info into local password store, use the following format.
要将新的密码信息插入到本地密码仓库中,请遵循以下命令格式:
$ pass insert <password-name>
<password-name> is an arbitrary name you define, and can be hierarchical (e.g., "finance/tdbank", "online/gmail.com"), in which case the password info will be created in corresponding sub-directories under ~/.password-store
<password-name>是你定义的专有名称,并且可以分级(如 "finance/tdbank", "online/gmail.com")。在这种情况下,密码信息可以存储到~/.password-store目录下对应的子目录中。
If you want to insert password info as multi-lines, use "-m" option as follows. Type in password info in any format as you like, and press Ctrl+D to finish.
如果你想要分多行插入密码信息,请像以下命令一样使用"-m"选项。以你自己喜欢的任何格式来输入密码信息然后按Ctrl+D来结束。
$ pass insert <password-name> -m
@@ -68,52 +78,61 @@ If you want to insert password info as multi-lines, use "-m" option as follows.
此图片暂时无法访问不过可以直接访问flickr地址https://www.flickr.com/photos/xmodulo/14129264286/ 文章发布的时候注意此处
#### View a list of all password names ####
#### 查看所有密码名称列表 ####
To view the list of all stored password names, simply type "pass":
要查看所有存储的密码名称列表,只需输入"pass"命令:
$ pass
![](https://farm3.staticflickr.com/2905/13965804498_92b0af83cf_o.jpg)
#### Retrieve password info from password store ####
#### 从密码仓库中取回密码信息 ####
To access the content of a particular password listing, simply use the command below:
要访问特定密码列表中的内容,只需使用以下命令:
$ pass <password-name>
For example:
例如:
$ pass email/gmail.com
You will be asked to enter the passphrase to unlock the secret key.
会要求你输入密码口令来解锁密钥。
If you want the password to be copied to the clipboard, instead of appearing in the terminal screen, use this command instead:
如果你想要将密码复制到剪贴板,而不是显示到终端屏幕上,使用以下命令:
$ pass -c email/gmail.com
Once copied to the clipboard, the password will automatically be cleared from the clipboard after 45 seconds.
一旦密码被复制到剪贴板剪贴板在45秒后会被自动清空。
#### Generate and store a new password in password store ####
#### 在密码仓库中生成并存储新密码 ####
With `pass`, you can also generate a new random password which you can use for any purpose. pass will use pwgen utility to generate a good random password. You can specify the length of a password, or generate a password with or without symbols.
使用`pass`命令你也可以生成一个新的随机密码该密码可用于任何目的。pass工具将会使用pwgen工具来生成一个好的随机密码。你可以指定密码的长度或者生成是否带有符号的密码。
For example, to generate a 10-character password with no symbol, and store it under "email/new_service.com" listing:
例如要生成一个具有10个字符不带符号的密码并将它存储到 "email/new_service.com"列表中:
$ pass generate email/new_service.com 10 -n
#### Remove password info ####
#### 移除密码信息 ####
Removing existing password info is easy:
要移除现存的密码信息是很容易的:
$ pass rm email/gmail.com
To summarize, pass is extremely flexible, portable, and more importantly, easy to use. I highly recommend pass to anyone looking for a simple means to organize any kind of private info in a secure fashion, without relying on GUI dependency.
针对以上小结pass是及其灵活便于携带并且更为重要的是易于使用的一个工具。对于正在寻找能简单而行之有效地安全地并且不依赖图形化管理任何私人信息的工具的人笔者强烈推荐pass。
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/05/manage-passwords-command-line-linux.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
译者:[GOLinux](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出