diff --git a/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md new file mode 100644 index 0000000000..f631477721 --- /dev/null +++ b/published/20160104 How to use KVM from the command line on Debian or Ubuntu.md @@ -0,0 +1,371 @@ +怎样在 ubuntu 和 debian 中通过命令行管理 KVM +================================================================================ + +有很多不同的方式去管理运行在 KVM 管理程序上的虚拟机。例如,virt-manager 就是一个流行的基于图形界面的前端虚拟机管理工具。然而,如果你想要在没有图形窗口的服务器环境下使用 KVM ,那么基于图形界面的解决方案显然是行不通的。事实上,你可以单纯使用包装了 kvm 命令行脚本的命令行来管理 KVM 虚拟机。作为替代方案,你可以使用 virsh 这个容易使用的命令行程序来管理客户虚拟机。在 virsh 中,它通过和 libvirtd 服务通信来达到控制虚拟机的目的,而 libvirtd 可以控制多个不同的虚拟机管理器,包括 KVM,Xen,QEMU,LXC 和 OpenVZ。 + +当你想要对虚拟机的前期准备和后期管理实现自动化操作时,像 virsh 这样的命令行管理工具是非常有用的。同样,virsh 支持多个管理器也就意味着你可以通过相同的 virsh 接口去管理不同的虚拟机管理器。 + +在这篇文章中,我会示范**怎样在 ubuntu 和 debian 上通过使用 virsh 命令行去运行 KVM**。 + +### 第一步:确认你的硬件平台支持虚拟化 ### + +第一步,首先要确认你的 CPU 支持硬件虚拟化扩展(e.g.,Intel VT 或者 AMD-V),这是 KVM 对硬件的要求。下面的命令可以检查硬件是否支持虚拟化。 + +``` + $ egrep '(vmx|svm)' --color /proc/cpuinfo +``` + +![](https://c2.staticflickr.com/2/1505/24050288606_758a44c4c6_c.jpg) + +如果在输出中不包含 vmx 或者 svm 标识,那么就意味着你的 cpu 不支持硬件虚拟化。因此你不能在你的机器上使用 KVM 。确认了 cpu 支持 vmx 或者 svm 之后,接下来开始安装 KVM。 + +对于 KVM 来说,它不要求运行在拥有 64 位内核系统的主机上,但是通常我们会推荐在 64 位系统的主机上面运行 KVM。 + +### 第二步:安装KVM ### + +使用 `apt-get` 安装 KVM 和相关的用户空间工具。 + +``` + $ sudo apt-get install qemu-kvm libvirt-bin +``` + +安装期间,libvirtd 用户组(在 debian 上是 libvirtd-qemu 用户组)将会被创建,并且你的用户 id 将会被自动添加到该组中。这样做的目的是让你可以以一个普通用户而不是 root 用户的身份去管理虚拟机。你可以使用 `id` 命令来确认这一点,下面将会告诉你怎么去显示你的组 id: + +``` + $ id +``` + +![](https://c2.staticflickr.com/6/5597/15432586092_64dfb867d3_c.jpg) + +如果因为某些原因,libvirt(在 debian 中是 libvirt-qemu)没有在你的组 id 中被找到,你也可以手动将你自己添加到对应的组中,如下所示: + +在 ubuntu 上: + +``` + $ sudo adduser [youruserID] libvirtd +``` + +在 debian 上: + +``` + $ sudo adduser [youruserID] libvirt-qemu +``` + +按照如下命令重新载入更新后的组成员关系。如果要求输入密码,那么输入你的登陆密码即可。 + +``` + $ exec su -l $USER +``` + +这时,你应该可以以普通用户的身份去执行 virsh 了。做一个如下所示的测试,这个命令将会以列表的形式列出可用的虚拟机(当前的列表是空的)。如果你没有遇到权限问题,那意味着到目前为止一切都是正常的。 + + $ virsh list + +---------- + + Id Name State +---------------------------------------------------- + +### 第三步:配置桥接网络 ### + +为了使 KVM 虚拟机能够访问外部网络,一种方法是通过在 KVM 宿主机上创建 Linux 桥来实现。创建之后的桥能够将虚拟机的虚拟网卡和宿主机的物理网卡连接起来,因此,虚拟机能够发送和接收由物理网卡传输的数据包。这种方式叫做网络桥接。 + +下面将告诉你如何创建并且配置网桥,我们创建一个网桥称它为 br0。 + +首先,安装一个必需的包,然后用命令行创建一个网桥。 + +``` + $ sudo apt-get install bridge-utils + $ sudo brctl addbr br0 +``` + +下一步就是配置已经创建好的网桥,即修改位于 `/etc/network/interfaces` 的配置文件。我们需要将该桥接网卡设置成开机启动。为了修改该配置文件,你需要关闭你的操作系统上的网络管理器(如果你在使用它的话)。跟随[操作指南][1]的说明去关闭网络管理器。 + +关闭网络管理器之后,接下来就是通过修改配置文件来配置网桥了。 + +``` + #auto eth0 + #iface eth0 inet dhcp + + auto br0 + iface br0 inet dhcp + bridge_ports eth0 + bridge_stp off + bridge_fd 0 + bridge_maxwait 0 +``` + +在上面的配置中,我假设 eth0 是主要网卡,它也是连接到外网的网卡,同样,我假设 eth0 将会通过 DHCP 协议自动获取 ip 地址。注意,之前在 `/etc/network/interfaces` 中还没有对 eth0 进行任何配置。桥接网卡 br0 引用了 eth0 的配置,而 eth0 也会受到 br0 的制约。 + +重启网络服务,并确认网桥已经被成功的配置好。如果成功的话,br0 的 ip 地址将会是 eth0 自动分配的 ip 地址,而且 eth0 不会被分配任何 ip 地址。 + +``` + $ sudo /etc/init.d/networking restart + $ ifconfig +``` + +如果因为某些原因,eth0 仍然保留了之前分配给了 br0 的 ip 地址,那么你可能必须手动删除 eth0 的 ip 地址。 + +![](https://c2.staticflickr.com/2/1698/23780708850_66cd7ba6ea_c.jpg) + +### 第四步:用命令行创建一个虚拟机 ### + +对于虚拟机来说,它的配置信息被存储在它对应的xml文件中。因此,创建一个虚拟机的第一步就是准备一个与虚拟机对应的 xml 文件。 + +下面是一个示例 xml 文件,你可以根据需要手动修改它。 + +``` + + alice + f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa + 1048576 + 1048576 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/kvm + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + +``` + +上面的主机xml配置文件定义了如下的虚拟机内容。 + +- 1GB内存,一个虚拟cpu和一个硬件驱动 + +- 磁盘镜像:`/home/dev/images/alice.img` + +- 从 CD-ROM 引导(`/home/dev/iso/CentOS-6.5-x86_64-minomal.iso`) + +- 网络:一个桥接到 br0 的虚拟网卡 + +- 通过 VNC 远程访问 + +`` 中的 UUID 字符串可以随机生成。为了得到一个随机的 uuid 字符串,你可能需要使用 uuid 命令行工具。 + +``` + $ sudo apt-get install uuid + $ uuid +``` + +生成一个主机 xml 配置文件的方式就是通过一个已经存在的虚拟机来导出它的 xml 配置文件。如下所示。 + +``` + $ virsh dumpxml alice > bob.xml +``` + +![](https://c2.staticflickr.com/6/5808/23968234602_25e8019ec8_c.jpg) + +### 第五步:使用命令行启动虚拟机 ### + +在启动虚拟机之前,我们需要创建它的初始磁盘镜像。为此,你需要使用 qemu-img 命令来生成一个 qemu-kvm 镜像。下面的命令将会创建 10 GB 大小的空磁盘,并且它是 qcow2 格式的。 + +``` + $ qemu-img create -f qcow2 /home/dev/images/alice.img 10G +``` + +使用 qcow2 格式的磁盘镜像的好处就是它在创建之初并不会给它分配全部大小磁盘容量(这里是 10 GB),而是随着虚拟机中文件的增加而逐渐增大。因此,它对空间的使用更加有效。 + +现在,你可以通过使用之前创建的 xml 配置文件启动你的虚拟机了。下面的命令将会创建一个虚拟机,然后自动启动它。 + +``` + $ virsh create alice.xml + Domain alice created from alice.xml +``` + +**注意**: 如果你对一个已经存在的虚拟机执行了了上面的命令,那么这个操作将会在没有任何警告的情况下抹去那个已经存在的虚拟机的全部信息。如果你已经创建了一个虚拟机,你可能会使用下面的命令来启动虚拟机。 + +``` + $ virsh start alice.xml +``` + +使用如下命令确认一个新的虚拟机已经被创建并成功的被启动。 + +``` + $ virsh list +``` + + Id Name State + ---------------------------------------------------- + 3 alice running + +同样,使用如下命令确认你的虚拟机的虚拟网卡已经被成功的添加到了你先前创建的 br0 网桥中。 + + $ sudo brctl show + +![](https://c2.staticflickr.com/2/1546/23449585383_a371e9e579_c.jpg) + +### 远程连接虚拟机 ### + +为了远程访问一个正在运行的虚拟机的控制台,你可以使用VNC客户端。 + +首先,你需要使用如下命令找出用于虚拟机的VNC端口号。 + +``` + $ sudo netstat -nap | egrep '(kvm|qemu)' +``` + +![](https://c2.staticflickr.com/6/5633/23448144274_49045bc868_c.jpg) + +在这个例子中,用于 alice 虚拟机的 VNC 端口号是 5900。 然后启动一个VNC客户端,连接到一个端口号为5900的VNC服务器。在我们的例子中,虚拟机支持由CentOS光盘文件启动。 + +![](https://c2.staticflickr.com/2/1533/24076369675_99408972a4_c.jpg) + +### 使用 virsh 管理虚拟机 ### + +下面列出了 virsh 命令的常规用法: + +创建客户机并且启动虚拟机: + +``` + $ virsh create alice.xml +``` + +停止虚拟机并且删除客户机: + +``` + $ virsh destroy alice +``` + +关闭虚拟机(不用删除它): + +``` + $ virsh shutdown alice +``` + +暂停虚拟机: + +``` + $ virsh suspend alice +``` + +恢复虚拟机: + +``` + $ virsh resume alice +``` + +访问正在运行的虚拟机的控制台: + +``` + $ virsh console alice +``` + +设置虚拟机开机启动: + +``` + $ virsh autostart alice +``` + +查看虚拟机的详细信息: + +``` + $ virsh dominfo alice +``` + +编辑虚拟机的配置文件: + +``` + $ virsh edit alice +``` + +上面的这个命令将会使用一个默认的编辑器来调用主机配置文件。该配置文件中的任何改变都将自动被libvirt验证其正确性。 + +你也可以在一个virsh会话中管理虚拟机。下面的命令会创建并进入到一个virsh会话中: + +``` + $ virsh +``` + +在 virsh 提示中,你可以使用任何 virsh 命令。 + +![](https://c2.staticflickr.com/6/5645/23708565129_b1ef968b30_c.jpg) + +### 问题处理 ### + +1. 我在创建虚拟机的时候遇到了一个错误: + + error: internal error: no supported architecture for os type 'hvm' + + 如果你的硬件不支持虚拟化的话你可能就会遇到这个错误。(例如,Intel VT或者AMD-V),这是运行KVM所必需的。如果你遇到了这个错误,而你的cpu支持虚拟化,那么这里可以给你一些可用的解决方案: + + 首先,检查你的内核模块是否丢失。 + + ``` + $ lsmod | grep kvm + ``` + + 如果内核模块没有加载,你必须按照如下方式加载它。 + + ``` + $ sudo modprobe kvm_intel (for Intel processor) + $ sudo modprobe kvm_amd (for AMD processor) + ``` + + 第二个解决方案就是添加 `--connect qemu:///system` 参数到 `virsh` 命令中,如下所示。当你正在你的硬件平台上使用超过一个虚拟机管理器的时候就需要添加这个参数(例如,VirtualBox,VMware)。 + + ``` + $ virsh --connect qemu:///system create alice.xml + ``` + +2. 当我试着访问我的虚拟机的登陆控制台的时候遇到了错误: + + ``` + $ virsh console alice + error: internal error: cannot find character device + ``` + + 这个错误发生的原因是你没有在你的虚拟机配置文件中定义控制台设备。在 xml 文件中加上下面的内部设备部分即可。 + + ``` + + + + ``` + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/use-kvm-command-line-debian-ubuntu.html + +作者:[Dan Nanni][a] +译者:[kylepeng93](https://github.com/kylepeng93 ) +校对:[Ezio](https://github.com/oska874) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/disable-network-manager-linux.html diff --git a/published/20160224 Can we tackle the Zika virus with rapid, open research.md b/published/20160224 Can we tackle the Zika virus with rapid, open research.md new file mode 100644 index 0000000000..54cd0fe697 --- /dev/null +++ b/published/20160224 Can we tackle the Zika virus with rapid, open research.md @@ -0,0 +1,28 @@ +我们能通过快速、开放的研究来战胜寨卡病毒吗? +============================================================ + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_LifeScience_OpenScience_520x292_12268077_0614MM.png?itok=3ZD2Mce9) + +关于寨卡病毒,最主要的问题就是我们对于它了解的太少了。这意味着我们需要尽快对它作出很多研究。 + +寨卡病毒现已严重威胁到世界人民的健康。在 2015 年爆发之后,它就成为了全球性的突发公共卫生事件,并且这个病毒也可能与儿童的出生缺陷有关。根据[维基百科][4],在这个病毒在 40 年代末期被发现以后,早在 1952 年就被观测到了对于人类的影响。 + +在 2 月 10 日,开放杂志 PLoS [发布了一个声明][1],这个是声明是关于有关公众紧急状况的信息共享。在此之后,刊登在研究期刊 F1000 的一篇文章 [对于能治疗寨卡病毒的开源药物(Open drug)的研究][2],它讨论了寨卡病毒及其开放研究的状况。那篇来自 PLoS 的声明列出了超过 30 个开放了对于寨卡病毒的研究进度的数据的重要组织。并且世界卫生组织实施了一个特别规定,以[创作共用许可证][3]公布提交到他们那里的资料。 + +快速公布,无限制的重复利用,以及强调研究结果的传播是推动开放科研社区的战略性一步。看到我们所关注的突发公共卫生事件能够以这样的方式开始是很令人受鼓舞的。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/2/how-rapid-open-science-could-change-game-zika-virus + +作者:[Marcus D. Hanwell][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mhanwell +[1]: http://blogs.plos.org/plos/2016/02/statement-on-data-sharing-in-public-health-emergencies/ +[2]: http://f1000research.com/articles/5-150/v1 +[3]: https://creativecommons.org/licenses/by/3.0/igo/ +[4]: https://en.wikipedia.org/wiki/Zika_virus \ No newline at end of file diff --git a/sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md b/sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md new file mode 100644 index 0000000000..518256d0e9 --- /dev/null +++ b/sources/news/20160227 Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news.md @@ -0,0 +1,72 @@ +Zephyr Project for Internet of Things, releases from Facebook, IBM, Yahoo, and more news +=========================================================================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/weekly_news_roundup_tv.png?itok=eqUoW1gU) + +In this week's edition of our open source news roundup, we take a look at the new IoT project from the Linux Foundation, three big corporations releasing open source, and more. + +**News roundup for February 21 - 26, 2016** + +### Linux Foundation unveils the Zephyr Project + +The Internet of Things (IoT) is shaping up to be the next big thing in consumer technology. At the moment, most IoT solutions are proprietary and closed source. Open source is making numerous in-roads into the IoT world, and that's undoubtedly going to accelerate now that the Linux Foundation has [announced the Zephyr Project][1]. + +The Zephyr Project, according to ZDNet, "hopes to bring vendors and developers together under a single operating system which could make the development of connected devices an easier, less expensive and more stable process." The Project "aims to incorporate input from the open source and embedded developer communities and to encourage collaboration on the RTOS (real-time operating system)," according to the [Linux Foundation's press release][2]. + +Currently, Intel Corporation, NXP Semiconductors N.V., Synopsys, Inc., and UbiquiOS Technology Limited are the main supporters of the project. The Linux Foundation intends to attract other IoT vendors to this effort as well. + +### Releases from Facebook, IBM, Yahoo + +As we all know, open source isn't just about individuals or small groups hacking on code and hardware. Quite a few large corporations have significant investments in open source. This past week, three of them affirmed their commitment to open source. + +Yahoo again waded into open source waters this week with the [release of CaffeOnSpark][3] artificial intelligence software under an Apache 2.0 license. CaffeOnSpark performs "a popular type of AI called 'deep learning' on the vast swaths of data kept in its Hadoop open-source file system for storing big data," according to VentureBeat. If you're curious, you can [find the source code on GitHub][4]. + +Earlier this week, Facebook "[unveiled a new project that seeks not only to accelerate the evolution of technologies that drive our mobile networks, but to freely share this work with the world’s telecoms][5]," according to Wired. The company plans to build "everything from new wireless radios to nee optical fiber equipment." The designs, according to Facebook, will be open source so any telecom firm can use them. + +As part of the [Open Mainframe Project][6], IBM has open sourced the code for its Anomaly Detection Engine (ADE) for Linux logs. [According to IBM][7], "ADE detects anomalous time slices and messages in Linux logs using statistical learning" to detect suspicious behaviour. You can grab the [source code for ADE][8] from GitHub. + +### European Union to fund research + +The European Research Council, the European Union's science and technology funding body, is [funding four open source research projects][9] to the tune of about €2 million. According to joinup.ec.europa.eu, the projects being funded are: + +- A code audit of Mozilla's open source Rust programming language + +- An initiative at INRIA (France's national computer science research center) studying secure programming + +- A project at Austria's Technische Universitat Graz testing "ways to secure code against attacks that exploit certain properties of the computer hardware" + +- The "development of techniques to prove popular cryptographic protocols and schemes" at IST Austria + +### In other news + +- [Infosys' newest weapon: open source][10] + +- [Intel demonstrates Android smartphone running a Linux desktop][11] + +- [BeeGFS file system goes open source][12] + +A big thanks, as always, to the Opensource.com moderators and staff for their help this week. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/2/weekly-news-feb-26 + +作者:[Scott Nesbitt][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/scottnesbitt +[1]: http://www.zdnet.com/article/the-linux-foundations-zephyr-project-building-an-operating-system-for-iot-devices/ +[2]: http://www.linuxfoundation.org/news-media/announcements/2016/02/linux-foundation-announces-project-build-real-time-operating-system +[3]: http://venturebeat.com/2016/02/24/yahoo-open-sources-caffeonspark-deep-learning-framework-for-hadoop/ +[4]: https://github.com/yahoo/CaffeOnSpark +[5]: http://www.wired.com/2016/02/facebook-open-source-wireless-gear-forge-5g-world/ +[6]: https://www.openmainframeproject.org/ +[7]: http://openmainframeproject.github.io/ade/ +[8]: https://github.com/openmainframeproject/ade +[9]: https://joinup.ec.europa.eu/node/149541 +[10]: http://www.businessinsider.in/Exclusive-Infosys-is-using-Open-Source-as-its-mostlethal-weapon-yet/articleshow/51109129.cms +[11]: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ +[12]: http://insidehpc.com/2016/02/beegfs-parallel-file-system-now-open-source/ diff --git a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md b/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md deleted file mode 100644 index f6a568a55f..0000000000 --- a/sources/share/20151204 Review EXT4 vs. Btrfs vs. XFS.md +++ /dev/null @@ -1,66 +0,0 @@ -ictlyh Translating -Review EXT4 vs. Btrfs vs. XFS -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/1385698302_funny_linux_wallpapers-593x445.jpg) - -To be honest, one of the things that comes last in people’s thinking is to look at which file system on their PC is being used. Windows users as well as Mac OS X users even have less reason for looking as they have really only 1 choice for their operating system which are NTFS and HFS+. Linux operating system, on the other side, has plenty of various file system options, with the current default is being widely used ext4. However, there is another push for changing the file system to something other which is called btrfs. But what makes btrfs better, what are other file systems, and when can we see the distributions making the change? - -Let’s first have a general look at file systems and what they really do, then we will make a small comparison between famous file systems. - -### So, What Do File Systems Do? ### - -Just in case if you are unfamiliar about what file systems really do, it is actually simple when it is summarized. The file systems are mainly used in order for controlling how the data is stored after any program is no longer using it, how access to the data is controlled, what other information (metadata) is attached to the data itself, etc. I know that it does not sound like an easy thing to be programmed, and it is definitely not. The file systems are continually still being revised for including more functionality while becoming more efficient in what it simply needs to do. Therefore, however, it is a basic need for all computers, it is not quite as basic as it sounds like. - -### Why Partitioning? ### - -Many people have a vague knowledge of what the partitions are since each operating system has an ability for creating or removing them. It can seem strange that Linux operating system uses more than 1 partition on the same disk, even while using the standard installation procedure, so few explanations are called for them. One of the main goals of having different partitions is achieving higher data security in the disaster case. - -By dividing your hard disk into partitions, the data may be grouped and also separated. When the accidents occur, only the data stored in the partition which got the hit will only be damaged, while data on the other partitions will survive most likely. These principles date from the days when the Linux operating system didn’t have a journaled file system and any power failure might have led to a disaster. - -The using of partitions will remain for security and the robustness reasons, then the breach on 1 part of the operating system does not automatically mean that whole computer is under risk or danger. This is currently most important factor for the partitioning process. For example, the users create scripts, the programs or web applications which start filling up the disk. If that disk contains only 1 big partition, then entire system may stop functioning if that disk is full. If the users store data on separate partitions, then only that data partition can be affected, while system partitions and the possible other data partitions will keep functioning. - -Mind that to have a journaled file system will only provide data security in case if there is a power failure as well as sudden disconnection of the storage devices. Such will not protect the data against the bad blocks and the logical errors in the file system. In such cases, the user should use a Redundant Array of Inexpensive Disks (RAID) solution. - -### Why Switch File Systems? ### - -The ext4 file system has been an improvement for the ext3 file system that was also an improvement over the ext2 file system. While the ext4 is a very solid file system which has been the default choice for almost all distributions for the past few years, it is made from an aging code base. Additionally, Linux operating system users are seeking many new different features in file systems which ext4 does not handle on its own. There is software which takes care of some of such needs, but in the performance aspect, being able to do such things on the file system level could be faster. - -### Ext4 File System ### - -The ext4 has some limits which are still a bit impressive. The maximum file size is 16 tebibytes (which is roughly 17.6 terabytes) and is much bigger than any hard drive a regular consumer can currently buy. While, the largest volume/partition you can make with ext4 is 1 exbibyte (which is roughly 1,152,921.5 terabytes). The ext4 is known to bring the speed improvements over ext3 by using multiple various techniques. Like in the most modern file systems, it is a journaling file system that means that it will keep a journal of where the files are mainly located on the disk and of any other changes that happen to the disk. Regardless all of its features, it doesn’t support the transparent compression, the data deduplication, or the transparent encryption. The snapshots are supported technically, but such feature is experimental at best. - -### Btrfs File System ### - -The btrfs, many of us pronounce it different ways, as an example, Better FS, Butter FS, or B-Tree FS. It is a file system which is completely made from scratch. The btrfs exists because its developers firstly wanted to expand the file system functionality in order to include snapshots, pooling, as well as checksums among the other things. While it is independent from the ext4, it also wants to build off the ideas present in the ext4 that are great for the consumers and the businesses alike as well as incorporate those additional features that will benefit everybody, but specifically the enterprises. For the enterprises who are using very large programs with very large databases, they are having a seemingly continuous file system across the multiple hard drives could be very beneficial as it will make a consolidation of the data much easier. The data deduplication could reduce the amount of the actual space data could occupy, and the data mirroring could become easier with the btrfs as well when there is a single and broad file system which needs to be mirrored. - -The user certainly can still choose to create multiple partitions so that he does not need to mirror everything. Considering that the btrfs will be able for spanning over the multiple hard drives, it is a very good thing that it can support 16 times more drive space than the ext4. A maximum partition size of the btrfs file system is 16 exbibytes, as well as maximum file size is 16 exbibytes too. - -### XFS File System ### - -The XFS file system is an extension of the extent file system. The XFS is a high-performance 64-bit journaling file system. The support of the XFS was merged into Linux kernel in around 2002 and In 2009 Red Hat Enterprise Linux version 5.4 usage of the XFS file system. XFS supports maximum file system size of 8 exbibytes for the 64-bit file system. There is some comparison of XFS file system is XFS file system can’t be shrunk and poor performance with deletions of the large numbers of files. Now, the RHEL 7.0 uses XFS as the default filesystem. - -### Final Thoughts ### - -Unfortunately, the arrival date for the btrfs is not quite known. But officially, the next-generation file system is still classified as “unstable”, but if the user downloads the latest version of Ubuntu, he will be able to choose to install on a btrfs partition. When the btrfs will be classified actually as “stable” is still a mystery, but users shouldn’t expect the Ubuntu to use the btrfs by default until it’s indeed considered “stable”. It has been reported that Fedora 18 will use the btrfs as its default file system as by the time of its release a file system checker for the btrfs should exist. There is a good amount of work still left for the btrfs, as not all the features are yet implemented and the performance is a little sluggish if we compare it to the ext4. - -So, which is better to use? Till now, the ext4 will be the winner despite the identical performance. But why? The answer will be the convenience as well as the ubiquity. The ext4 is still excellent file system for the desktop or workstation use. It is provided by default, so the user can install the operating system on it. Also, the ext4 supports volumes up to 1 Exabyte and files up to 16 Terabyte in size, so there’s still a plenty of room for the growth where space is concerned. - -The btrfs might offer greater volumes up to 16 Exabyte and improved fault tolerance, but, till now, it feels more as an add-on file system rather than one integrated into the Linux operating system. For example, the btrfs-tools have to be present before a drive will be formatted with the btrfs, which means that the btrfs is not an option during the Linux operating system installation though that could vary with the distribution. - -Even though the transfer rates are so important, there’s more to a just file system than speed of the file transfers. The btrfs has many useful features such as Copy-on-Write (CoW), extensive checksums, snapshots, scrubbing, self-healing data, deduplication, as well as many more good improvements that ensure the data integrity. The btrfs lacks the RAID-Z features of ZFS, so the RAID is still in an experimental state with the btrfs. For pure data storage, however, the btrfs is the winner over the ext4, but time still will tell. - -Till the moment, the ext4 seems to be a better choice on the desktop system since it is presented as a default file system, as well as it is faster than the btrfs when transferring files. The btrfs is definitely worth to look into, but to completely switch to replace the ext4 on desktop Linux might be few years later. The data farms and the large storage pools could reveal different stories and show the right differences between ext4, XCF, and btrfs. - -If you have a different or additional opinion, kindly let us know by commenting on this article. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/review-ext4-vs-btrfs-vs-xfs/ - -作者:[M.el Khamlichi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/pirat9/ diff --git a/sources/talk/20151019 Gaming On Linux--All You Need To Know.md b/sources/talk/20151019 Gaming On Linux--All You Need To Know.md deleted file mode 100644 index 332136112a..0000000000 --- a/sources/talk/20151019 Gaming On Linux--All You Need To Know.md +++ /dev/null @@ -1,203 +0,0 @@ -Gaming On Linux: All You Need To Know -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Gaming-on-Linux.jpeg) - -**Can I play games on Linux?** - -This is one of the most frequently asked questions by people who are thinking about [switching to Linux][1]. After all, gaming on Linux often termed as a distant possibility. In fact, some people even wonder if they can listen to music or watch movies on Linux. Considering that, question about native Linux games seem genuine. - -In this article, I am going to answer most of the Linux gaming questions a Linux beginner may have. For example, if it is possible to play games on Linux, if yes, what are the Linux games available, where can you **download Linux games** from or how do you get more information of gaming on Linux. - -But before I do that, let me make a confession. I am not a PC gamer or rather I should say, I am not desktop Linux gamer. I prefer to play games on my PS4 and I don’t care about PC games or even mobile games (no candy crush request sent to anyone in my friend list). This is the reason you see only a few articles in [Linux games][2] section of It’s FOSS. - -So why am I covering this topic then? - -Because I have been asked questions about playing games on Linux several times and I wanted to come up with a Linux gaming guide that could answer all those question. And remember, it’s not just gaming on Ubuntu I am talking about here. I am talking about Linux in general. - -### Can you play games on Linux? ### - -Yes and no! - -Yes, you can play games on Linux and no, you cannot play ‘all the games’ in Linux. - -Confused? Don’t be. What I meant here is that you can get plenty of popular games on Linux such as [Counter Strike, Metro Last Night][3] etc. But you might not get all the latest and popular Windows games on Linux, for e.g., [PES 2015][4]. - -The reason, in my opinion, is that Linux has less than 2% of desktop market share and these numbers are demotivating enough for most game developers to avoid working on the Linux version of their games. - -Which means that there is huge possibility that the most talked about games of the year may not be playable in Linux. Don’t despair, there are ‘other means’ to get these games on Linux and we shall see it in coming sections, but before that let’s talk about what kind of games are available for Linux. - -If I have to categorize, I’ll divide them in four categories: - -1. Native Linux Games -1. Windows games in Linux -1. Browser Games -1. Terminal Games - -Let’s start with the most important one, native Linux games, first. - ----------- - -### 1. Where to find native Linux games? ### - -Native Linux games mean those games which are officially supported in Linux. These games have native Linux client and can be installed like most other applications in Linux without requiring any additional effort (we’ll see about these in next section). - -So, as you see, there are games developed for Linux. Next question that arises is where can you find these Linux games and how can you play them. I am going to list some of the resources where you can get Linux games. - -#### Steam #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Install-Steam-Ubuntu-11.jpeg) - -“[Steam][5] is a digital distribution platform for video games. As Amazon Kindle is digital distribution platform for e-Books, iTunes for music, similarly Steam is for games. It provides you the option to buy and install games, play multiplayer and stay in touch with other games via social networking on its platform. The games are protected with [DRM][6].” - -A couple of years ago, when gaming platform Steam announced support for Linux, it was a big news. It was an indication that gaming on Linux is being taken seriously. Though Steam’s decision was more influenced with its own Linux-based gaming console and a separate [Linux distribution called Steam OS][7], it still was a reassuring move that has brought a number of games on Linux. - -I have written a detailed article about installing and using Steam. If you are getting started with Steam, do read it. - -- [Install and use Steam for gaming on Linux][8] - -#### GOG.com #### - -[GOG.com][9] is another platform similar to Steam. Like Steam, you can browse and find hundreds of native Linux games on GOG.com, purchase the games and install them. If the games support several platforms, you can download and use them across various operating systems. Your purchased games are available for you all the time in your account. You can download them anytime you wish. - -One main difference between the two is that GOG.com offers only DRM free games and movies. Also, GOG.com is entirely web based. So you don’t need to install a client like Steam. You can simply download the games from browser and install them in your system. - -#### Portable Linux Games #### - -[Portable Linux Games][10] is a website that has a collection of a number of Linux games. The unique and best thing about Portable Linux Games is that you can download and store the games for offline installation. - -The downloaded files have all the dependencies (at times Wine and Perl installation) and these are also platform independent. All you need to do is to download the files and double click to install them. Store the downloadable file on external hard disk and use them in future. Highly recommend if you don’t have continuous access to high speed internet. - -#### Game Drift Game Store #### - -[Game Drift][11] is actually a Linux distribution based on Ubuntu with sole focus on gaming. While you might not want to start using this Linux distribution for the sole purpose of gaming, you can always visit its game store online and see what games are available for Linux and install them. - -#### Linux Game Database #### - -As the name suggests, [Linux Game Database][12] is a website with a huge collection of Linux games. You can browse through various category of games and download/install them from the game developer’s website. As a member of Linux Game Database, you can even rate the games. LGDB, kind of, aims to be the IGN or IMDB for Linux games. - -#### Penguspy #### - -Created by a gamer who refused to use Windows for playing games, [Penguspy][13] showcases a collection of some of the best Linux games. You can browse games based on category and if you like the game, you’ll have to go to the respective game developer’s website. - -#### Software Repositories #### - -Look into the software repositories of your own Linux distribution. There always will be some games in it. If you are using Ubuntu, Ubuntu Software Center itself has an entire section for games. Same is true for other Linux distributions such as Linux Mint etc. - ----------- - -### 2. How to play Windows games in Linux? ### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Wine-Linux.png) - -So far we talked about native Linux games. But there are not many Linux games, or to be more precise, most popular Linux games are not available for Linux but they are available for Windows PC. So the questions arises, how to play Windows games in Linux? - -Good thing is that with the help of tools like Wine, PlayOnLinux and CrossOver, you can play a number of popular Windows games in Linux. - -#### Wine #### - -Wine is a compatibility layer which is capable of running Windows applications in systems like Linux, BSD and OS X. With the help of Wine, you can install and use a number of Windows applications in Linux. - -[Installing Wine in Ubuntu][14] or any other Linux is easy as it is available in most Linux distributions’ repository. There is a huge [database of applications and games supported by Wine][15] that you can browse. - -#### CrossOver #### - -[CrossOver][16] is an improved version of Wine that brings professional and technical support to Wine. But unlike Wine, CrossOver is not free. You’ll have to purchase the yearly license for it. Good thing about CrossOver is that every purchase contributes to Wine developers and that in fact boosts the development of Wine to support more Windows games and applications. If you can afford $48 a year, you should buy CrossOver for the support they provide. - -### PlayOnLinux ### - -PlayOnLinux too is based on Wine but implemented differently. It has different interface and slightly easier to use than Wine. Like Wine, PlayOnLinux too is free to use. You can browse the [applications and games supported by PlayOnLinux on its database][17]. - ----------- - -### 3. Browser Games ### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Chrome-Web-Store.jpeg) - -Needless to say that there are tons of browser based games that are available to play in any operating system, be it Windows or Linux or Mac OS X. Most of the addictive mobile games, such as [GoodGame Empire][18], also have their web browser counterparts. - -Apart from that, thanks to [Google Chrome Web Store][19], you can play some more games in Linux. These Chrome games are installed like a standalone app and they can be accessed from the application menu of your Linux OS. Some of these Chrome games are playable offline as well. - ----------- - -### 4. Terminal Games ### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/03/nSnake_Linux_terminal_game.jpeg) - -Added advantage of using Linux is that you can use the command line terminal to play games. I know that it’s not the best way to play games but at times, it’s fun to play games like [Snake][20] or [2048][21] in terminal. There is a good collection of Linux terminal games at [this blog][22]. You can browse through it and play the ones you want. - ----------- - -### How to stay updated about Linux games? ### - -When you have learned a lot about what kind of games are available on Linux and how could you use them, next question is how to stay updated about new games on Linux? And for that, I advise you to follow these blogs that provide you with the latest happenings of the Linux gaming world: - -- [Gaming on Linux][23]: I won’t be wrong if I call it the nest Linux gaming news portal. You get all the latest rumblings and news about Linux games. Frequently updated, Gaming on Linux has dedicated fan following which makes it a nice community of Linux game lovers. -- [Free Gamer][24]: A blog focusing on free and open source games. -- [Linux Game News][25]: A Tumbler blog that updates on various Linux games. - -#### What else? #### - -I think that’s pretty much what you need to know to get started with gaming on Linux. If you are still not convinced, I would advise you to [dual boot Linux with Windows][26]. Use Linux as your main desktop and if you want to play games, boot into Windows. This could be a compromised solution. - -I think that’s pretty much what you need to know to get started with gaming on Linux. If you are still not convinced, I would advise you to [dual boot Linux with Windows][27]. Use Linux as your main desktop and if you want to play games, boot into Windows. This could be a compromised solution. - -It’s time for you to add your inputs. Do you play games on your Linux desktop? What are your favorites? What blogs you follow to stay updated on latest Linux games? - - -投票项目: -How do you play games on Linux? - -- I use Wine and PlayOnLinux along with native Linux Games -- I am happy with Browser Games -- I prefer the Terminal Games -- I use native Linux games only -- I play it on Steam -- I dual boot and go in to Windows to play games -- I don't play games at all - -注:投票代码 -
-
- - - -注,发布时根据情况看怎么处理 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/linux-gaming-guide/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/reasons-switch-linux-windows-xp/ -[2]:http://itsfoss.com/category/games/ -[3]:http://blog.counter-strike.net/ -[4]:https://pes.konami.com/tag/pes-2015/ -[5]:http://store.steampowered.com/ -[6]:https://en.wikipedia.org/wiki/Digital_rights_management -[7]:http://itsfoss.com/valve-annouces-linux-based-gaming-operating-system-steamos/ -[8]:http://itsfoss.com/install-steam-ubuntu-linux/ -[9]:http://www.gog.com/ -[10]:http://www.portablelinuxgames.org/ -[11]:http://gamedrift.org/GameStore.html -[12]:http://www.lgdb.org/ -[13]:http://www.penguspy.com/ -[14]:http://itsfoss.com/wine-1-5-11-released-ppa-available-to-download/ -[15]:https://appdb.winehq.org/ -[16]:https://www.codeweavers.com/products/ -[17]:https://www.playonlinux.com/en/supported_apps.html -[18]:http://empire.goodgamestudios.com/ -[19]:https://chrome.google.com/webstore/category/apps -[20]:http://itsfoss.com/nsnake-play-classic-snake-game-linux-terminal/ -[21]:http://itsfoss.com/play-2048-linux-terminal/ -[22]:https://ttygames.wordpress.com/ -[23]:https://www.gamingonlinux.com/ -[24]:http://freegamer.blogspot.fr/ -[25]:http://linuxgamenews.com/ -[26]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ -[27]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ diff --git a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md index cefad8cc6b..09423a6b8d 100644 --- a/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md +++ b/sources/talk/yearbook2015/20151208 5 great Raspberry Pi projects for the classroom.md @@ -1,3 +1,5 @@ +FSSlc translating + 5 great Raspberry Pi projects for the classroom ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-open-source-yearbook-lead3.png) diff --git a/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md b/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md index 6624a3c590..49244c96d2 100644 --- a/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md +++ b/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md @@ -1,3 +1,4 @@ +translated by bestony How to Install OsTicket Ticketing System in Fedora 22 / Centos 7 ================================================================================ In this article, we'll learn how to setup help desk ticketing system with osTicket in our machine or server running Fedora 22 or CentOS 7 as operating system. osTicket is a free and open source popular customer support ticketing system developed and maintained by [Enhancesoft][1] and its contributors. osTicket is the best solution for help and support ticketing system and management for better communication and support assistance with clients and customers. It has the ability to easily integrate with inquiries created via email, phone and web based forms into a beautiful multi-user web interface. osTicket makes us easy to manage, organize and log all our support requests and responses in one single place. It is a simple, lightweight, reliable, open source, web-based and easy to setup and use help desk ticketing system. diff --git a/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md new file mode 100644 index 0000000000..1ec6ddff27 --- /dev/null +++ b/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md @@ -0,0 +1,157 @@ +【Translating by cposture 2016-02-28】 +How to send email notifications using Gmail SMTP server on Linux +================================================================================ +Suppose you want to configure a Linux app to send out email messages from your server or desktop. The email messages can be part of email newsletters, status updates (e.g., [Cachet][1]), monitoring alerts (e.g., [Monit][2]), disk events (e.g., [RAID mdadm][3]), and so on. While you can set up your [own outgoing mail server][4] to deliver messages, you can alternatively rely on a freely available public SMTP server as a maintenance-free option. + +One of the most reliable **free SMTP servers** is from Google's Gmail service. All you have to do to send email notifications within your app is to add Gmail's SMTP server address and your credentials to the app, and you are good to go. + +One catch with using Gmail's SMTP server is that there are various restrictions in place, mainly to combat spammers and email marketers who often abuse the server. For example, you can send messages to no more than 100 addresses at once, and no more than 500 recipients per day. Also, if you don't want to be flagged as a spammer, you cannot send a large number of undeliverable messages. When any of these limitations is reached, your Gmail account will temporarily be locked out for a day. In short, Gmail's SMTP server is perfectly fine for your personal use, but not meant for commercial bulk emails. + +With that being said, let me demonstrate **how to use Gmail's SMTP server in Linux environment**. + +### Google Gmail SMTP Server Setting ### + +If you want to send emails from your app using Gmail's SMTP server, remember the following details. + +- **Outgoing mail server (SMTP server)**: smtp.gmail.com +- **Use authentication**: yes +- **Use secure connection**: yes +- **Username**: your Gmail account ID (e.g., "alice" if your email is alice@gmail.com) +- **Password**: your Gmail password +- **Port**: 587 + +Exact configuration syntax may vary depending on apps. In the rest of this tutorial, I will show you several useful examples of using Gmail SMTP server in Linux. + +### Send Emails from the Command Line ### + +As the first example, let's try the most basic email functionality: send an email from the command line using Gmail SMTP server. For this, I am going to use a command-line email client called mutt. + +First, install mutt: + +For Debian-based system: + + $ sudo apt-get install mutt + +For Red Hat based system: + + $ sudo yum install mutt + +Create a mutt configuration file (~/.muttrc) and specify in the file Gmail SMTP server information as follows. Replace with your own Gmail ID. Note that this configuration is for sending emails only (not receiving emails). + + $ vi ~/.muttrc + +---------- + + set from = "@gmail.com" + set realname = "Dan Nanni" + set smtp_url = "smtp://@smtp.gmail.com:587/" + set smtp_pass = "" + +Now you are ready to send out an email using mutt: + + $ echo "This is an email body." | mutt -s "This is an email subject" alice@yahoo.com + +To attach a file in an email, use "-a" option: + + $ echo "This is an email body." | mutt -s "This is an email subject" alice@yahoo.com -a ~/test_attachment.jpg + +![](https://c1.staticflickr.com/1/770/22239850784_5fb0988075_c.jpg) + +Using Gmail SMTP server means that the emails appear as sent from your Gmail account. In other words, a recepient will see your Gmail address as the sender's address. If you want to use your domain as the email sender, you need to use Gmail SMTP relay service instead. + +### Send Email Notification When a Server is Rebooted ### + +If you are running a [virtual private server (VPS)][5] for some critical website, one recommendation is to monitor VPS reboot activities. As a more practical example, let's consider how to set up email notifications for every reboot event on your VPS. Here I assume you are using systemd on your VPS, and show you how to create a custom systemd boot-time service for automatic email notifications. + +First create the following script reboot_notify.sh which takes care of email notifications. + + $ sudo vi /usr/local/bin/reboot_notify.sh + +---------- + + #!/bin/sh + + echo "`hostname` was rebooted on `date`" | mutt -F /etc/muttrc -s "Notification on `hostname`" alice@yahoo.com + +---------- + + $ sudo chmod +x /usr/local/bin/reboot_notify.sh + +In the script, I use "-F" option to specify the location of system-wide mutt configuration file. So don't forget to create /etc/muttrc file and populate Gmail SMTP information as described earlier. + +Now let's create a custom systemd service as follows. + + $ sudo mkdir -p /usr/local/lib/systemd/system + $ sudo vi /usr/local/lib/systemd/system/reboot-task.service + +---------- + + [Unit] + Description=Send a notification email when the server gets rebooted + DefaultDependencies=no + Before=reboot.target + + [Service] + Type=oneshot + ExecStart=/usr/local/bin/reboot_notify.sh + + [Install] + WantedBy=reboot.target + +Once the service file is created, enable and start the service. + + $ sudo systemctl enable reboot-task + $ sudo systemctl start reboot-task + +From now on, you will be receiving a notification email every time the VPS gets rebooted. + +![](https://c1.staticflickr.com/1/608/22241452923_2ace9cde2e_c.jpg) + +### Send Email Notification from Server Usage Monitoring ### + +As a final example, let me present a real-world application called [Monit][6], which is a pretty useful server monitoring application. It comes with comprehensive [VPS][7] monitoring capabilities (e.g., CPU, memory, processes, file system), as well as email notification functions. + +If you want to receive email notifications for any event on your VPS (e.g., server overload) generated by Monit, you can add the following SMTP information to Monit configuration file. + + set mailserver smtp.gmail.com port 587 + username "" password "" + using tlsv12 + + set mail-format { + from: @gmail.com + subject: $SERVICE $EVENT at $DATE on $HOST + message: Monit $ACTION $SERVICE $EVENT at $DATE on $HOST : $DESCRIPTION. + + Yours sincerely, + Monit + } + + # the person who will receive notification emails + set alert alice@yahoo.com + +Here is the example email notification sent by Monit for excessive CPU load. + +![](https://c1.staticflickr.com/1/566/22873764251_8fe66bfd16_c.jpg) + +### Conclusion ### + +As you can imagine, there will be so many different ways to take advantage of free SMTP servers like Gmail. But once again, remember that the free SMTP server is not meant for commercial usage, but only for your own personal project. If you are using Gmail SMTP server inside any app, feel free to share your use case. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/send-email-notifications-gmail-smtp-server-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/setup-system-status-page.html +[2]:http://xmodulo.com/server-monitoring-system-monit.html +[3]:http://xmodulo.com/create-software-raid1-array-mdadm-linux.html +[4]:http://xmodulo.com/mail-server-ubuntu-debian.html +[5]:http://xmodulo.com/go/digitalocean +[6]:http://xmodulo.com/server-monitoring-system-monit.html +[7]:http://xmodulo.com/go/digitalocean diff --git a/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md b/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md deleted file mode 100644 index 29a5c77cd9..0000000000 --- a/sources/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md +++ /dev/null @@ -1,32 +0,0 @@ -Intel shows budget Android phone powering big-screen Linux -============================================================== - -![](https://regmedia.co.uk/2016/02/23/intel-bigscreen.jpg?x=648&y=348&crop=1) - -**MWC16** Intel is showing what it calls "Big Screen Experience" at Mobile World Congress, an Android smartphone which runs a full Linux desktop when plugged into an external display. - -The concept is broadly similar to Microsoft's Continuum for Windows 10 Mobile, but whereas Continuum devices are towards the high end, Intel's project is aimed, it says, at budget smartphones and emerging markets. - -On display in Barcelona is a prototype SoFIA (Smart or Feature Phone with Intel Architecture) smartphone with an Atom x3 processor, 2GB RAM and 16GB storage, and modified to support an external display. Attach keyboard, mouse and display, and it becomes desktop Linux, with an option to display the Android screen in a window on the large display. - -"Android is based on a Linux kernel, so we're running one kernel, we have an Android stack and a Linux stack, and we're sharing the same context, so the file system is identical. The phone stays fully functional," Intel's Nir Metzer, Path Finding Group Manager, told the Reg. - -"I have a multi-window environment. As soon as I plug in I can do spreadsheets, I can drag and drop, play video. Achieving all this on a low-end platform is a challenge," said Metzer. - -Currently the display on the device goes blank when the external display is attached, but Metzer said that the next version of the Atom X3 will support dual displays. - -The version of Linux used is maintained by Intel. "We need to align between the Linux versions and the Android," said Metzer. "The framework is pre-installed, not an app you can download." - -Intel is pitching the idea at phone manufacturers here at Mobile World Congress, but had nothing to report concerning actual customers for its device. "The chip is ready, this is production-ready. This can go into production tomorrow. It is a business decision," said Metzer.® - --------------------------------------------------------------------------------- - -via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ - -作者:[Tim Anderson][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.theregister.co.uk/Author/2878 diff --git a/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md b/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md deleted file mode 100644 index e25df9c008..0000000000 --- a/sources/tech/20160224 Can we tackle the Zika virus with rapid, open research.md +++ /dev/null @@ -1,27 +0,0 @@ -Can we tackle the Zika virus with rapid, open research? -============================================================ - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_LifeScience_OpenScience_520x292_12268077_0614MM.png?itok=3ZD2Mce9) - -One of the major issues with the Zika virus is that so little is known about it. That means that a lot of research has to be done very quickly. - -The Zika virus is at the heart of a global health emergency. It became a global health emergency after outbreaks began in 2015, and has possible links to birth defects. When the virus was first discovered in the late forties, human infections had been observed as early as 1952 according to Wikipedia. - -On February 10, the open journal [PLoS released a statement][1] on data sharing in public emergencies. Then, an article in the research journal F1000, [Open drug discovery for the Zika virus][2], discussed the status of Zika along with the need to conduct research openly. The statement from PLoS lists more than 30 important organizations who have aligned around the open dissemination of data as the virus is studied. And the World Health Organization has implemented special provisions that submissions to the WHO Bulletin now be made available under a [Creative Commons license][3]. - -Rapid publication, unrestricted reuse, and emphasizing dissemination of research are strategic steps that the open science community has been pushing for in all scientific research. Seeing a start with health emergencies that require our immediate attention is encouraging. - --------------------------------------------------------------------------------- - -via: https://opensource.com/life/16/2/how-rapid-open-science-could-change-game-zika-virus - -作者:[Marcus D. Hanwell][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mhanwell -[1]: http://blogs.plos.org/plos/2016/02/statement-on-data-sharing-in-public-health-emergencies/ -[2]: http://f1000research.com/articles/5-150/v1 -[3]: https://creativecommons.org/licenses/by/3.0/igo/ diff --git a/sources/tech/20160225 The Tao of project management.md b/sources/tech/20160225 The Tao of project management.md index 629bdaef36..a8de86ae0b 100644 --- a/sources/tech/20160225 The Tao of project management.md +++ b/sources/tech/20160225 The Tao of project management.md @@ -1,3 +1,4 @@ +(翻译中 by runningwater) The Tao of project management ================================= @@ -153,7 +154,7 @@ I encourage you to find ways to incorporate some of these ideas into your own pr via: https://opensource.com/open-organization/16/2/tao-project-management 作者:[Allison Matlack][a] -译者:[译者ID](https://github.com/译者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md b/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md new file mode 100644 index 0000000000..770c6db479 --- /dev/null +++ b/sources/tech/20160226 How to use Python to hack your Eclipse IDE.md @@ -0,0 +1,215 @@ +How to use Python to hack your Eclipse IDE +============================================== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/lightbulb_computer_person_general_.png?itok=ZY3UuQQa) + +The Eclipse Advanced Scripting Environment ([EASE][1]) project is a new but powerful set of plugins that enables you to quickly hack your Eclipse IDE. + +Eclipse is a powerful framework that can be extended in many different ways by using its built-in plugin mechanism. However, writing and deploying a new plugin can be cumbersome if all you want is a bit of additional functionality. Now, using EASE, there's a better way to do that, without having to write a single line of Java code. EASE provides a way to easily automate workbench functionality using scripting languages such as Python or Javascript. + +In this article, based on my [talk][2] at EclipseCon North America this year, I'll cover the basics of how to set up your Eclipse environment with Python and EASE and look at a few ideas to supercharge your IDE with the power of Python. + +### Setup and run "Hello World" + +The examples in this article are based on the Java-implementation of Python, Jython. You can install EASE directly into your existing Eclipse IDE. In this example we use Eclipse [Mars][3] and install EASE itself, its modules and the Jython engine. + +From within the Eclipse Install Dialog (`Help>Install New Software`...), install EASE: [http://download.eclipse.org/ease/update/nightly][4] + +And, select the following components: + +- EASE Core feature + +- EASE core UI feature + +- EASE Python Developer Resources + +- EASE modules (Incubation) + +This will give you EASE and its modules. The main one we are interested in is the Resource module that gives you access to the Eclipse workspace, projects, and files API. + +![](https://opensource.com/sites/default/files/1_installease_nightly.png) + + +After those have been successfully installed, next install the EASE Jython engine: [https://dl.bintray.com/pontesegger/ease-jython/][5]. Once the plugins are installed, test EASE out. Create a new project and add in a new file called hello.py with this content: + +``` +print "hello world" +``` + +Select the file, right click, and select 'Run as -> EASE script'. You should see "Hello World" appear in the console. + +Now you can start writing Python scripts that can access the workspace and projects. This power can be used for all sorts of hacks, below are just a few ideas. + +### Improve your code quality + +Maintaining good code quality can be a tiresome job especially when dealing with a large codebase or when lots of developers are involved. Some of this pain can be made easier with a script, such as for batch formatting for a set of files, or even fixing certain files to [remove unix line endings][6] for easy comparison in source control like git. Another nice thing to do is use a script to generate Eclipse markers to highlight code that could do with improving. Here's an example script that you could use to add task markers for all "printStackTrace" methods it detects in Java files. See the source code: [markers.py][7] + +To run, copy the file to your workspace, then right click and select 'Run as -> EASE script'. + +``` +loadModule('/System/Resources') +``` + +from org.eclipse.core.resources import IMarker + +``` +for ifile in findFiles("*.java"): + file_name = str(ifile.getLocation()) + print "Processing " + file_name + with open(file_name) as f: + for line_no, line in enumerate(f, start=1): + if "printStackTrace" in line: + marker = ifile.createMarker(IMarker.TASK) + marker.setAttribute(IMarker.TRANSIENT, True) + marker.setAttribute(IMarker.LINE_NUMBER, line_no) + marker.setAttribute(IMarker.MESSAGE, "Fix in Sprint 2: " + line.strip()) + +``` + +If you have any java files with printStackTraces you will be able to see the newly created markers in the Tasks view and in the editor margin. + +![](https://opensource.com/sites/default/files/2_codequality.png) + +### Automate tedious tasks + +When you are working with several projects you may want to automate some tedious, repetitive tasks. Perhaps you need to add in a copyright header to the beginning of each source file, or update source files when adopting a new framework. For instance, when we first switched to using Tycho and Maven, we had to add a pom.xml to each project. This is easily done using a few lines of Python. Then when Tycho provided support for pom-less builds, we wanted to remove unnecessary pom files. Again, a few lines of Python script enabled this. As an example, here is a script which adds a README.md file to every open project in your workspace, noting if they are Java or Python projects. See the source code: [add_readme.py][8]. + +To run, copy the file to your workspace, then right click and select 'Run as -> EASE script'. + +loadModule('/System/Resources') + +``` +for iproject in getWorkspace().getProjects(): + if not iproject.isOpen(): + continue + + ifile = iproject.getFile("README.md") + + if not ifile.exists(): + contents = "# " + iproject.getName() + "\n\n" + if iproject.hasNature("org.eclipse.jdt.core.javanature"): + contents += "A Java Project\n" + elif iproject.hasNature("org.python.pydev.pythonNature"): + contents += "A Python Project\n" + writeFile(ifile, contents) +``` + +The result should be that every open project will have a README.md file, with Java and Python projects having an additional descriptive line. + +![](https://opensource.com/sites/default/files/3_tedioustask.png) + +### Prototype new features + +You can also use a Python script to hack a quick-fix for some much wanted functionality, or as a prototype to help demonstrate to your team or users how you envision a feature. For instance, one feature Eclipse IDE doesn't currently support is auto-save on the current file you are working on. Although this feature is in the works for future releases, you can have a quick and dirty version that autosaves every 30 seconds or when the editor is deactivated. Below is a snippet of the main method. See the full source: [autosave.py][9] + +``` +def save_dirty_editors(): + workbench = getService(org.eclipse.ui.IWorkbench) + for window in workbench.getWorkbenchWindows(): + for page in window.getPages(): + for editor_ref in page.getEditorReferences(): + part = editor_ref.getPart(False) + if part and part.isDirty(): + print "Auto-Saving", part.getTitle() + part.doSave(None) +``` + +Before running this script you will need to turn on the 'Allow Scripts to run code in UI thread' setting by checking the box under Window > Preferences > Scripting. Then you can add the file to your workspace, right click on it and select 'Run As>EASE Script'. A save message is printed out in the Console view every time an editor is saved. To turn off the autosave just stop the script by pressing the 'Terminate' red square button in the Console view. + +![](https://opensource.com/sites/default/files/4_prototype.png) + +### Quickly extend the user interface with custom buttons, menus, etc + +One of the best things about EASE is that it allows you to take your scripts and quickly hook them into UI elements of the IDE, for example, as a new button or new menu item. No need to write Java or have a new plugin, just add a couple of lines to your script header—it's that simple. + +Here's an example for a simplistic script that creates us three new projects. + +``` +# name : Create fruit projects +# toolbar : Project Explorer +# description : Create fruit projects + +loadModule("/System/Resources") + +for name in ["banana", "pineapple", "mango"]: + createProject(name) +``` + +The comment lines specify to EASE to add a button to the Project Explorer toolbar. Here's another script that adds a button to the same toolbar to delete those three projects. See the source files: [createProjects.py][10] and [deleteProjects.py][11] + +``` +# name :Delete fruit projects +# toolbar : Project Explorer +# description : Get rid of the fruit projects + +loadModule("/System/Resources") + +for name in ["banana", "pineapple", "mango"]: + project = getProject(name) + project.delete(0, None) +``` + +To get the buttons to appear, add the two script files to a new project—let's call it 'ScriptsProject'. Then go to Windows > Preference > Scripting > Script Locations. Click on the 'Add Workspace' button and select the ScriptsProject. This project now becomes a default location for locating script files. You should see the buttons show up in the Project Explorer without needing to restart your IDE. You should be able to quickly create and delete the projects using your newly added buttons. + +![](https://opensource.com/sites/default/files/5_buttons.png) + +### Integrate with third-party tools + +Every now and then you may need to use a tool outside the Eclipse ecosystem (sad but true, it has a lot but it does not do everything). For those occasions it might be quite handy to wrap calling that call to the tool in a script. Here's an example that allows you to integrate with explorer.exe, and add it to the content menu so you could instantly open a file browser using the current selection. See the source code: [explorer.py][12] + +``` +# name : Explore from here +# popup : enableFor(org.eclipse.core.resources.IResource) +# description : Start a file browser using current selection +loadModule("/System/Platform") +loadModule('/System/UI') + +selection = getSelection() +if isinstance(selection, org.eclipse.jface.viewers.IStructuredSelection): + selection = selection.getFirstElement() + +if not isinstance(selection, org.eclipse.core.resources.IResource): + selection = adapt(selection, org.eclipse.core.resources.IResource) + +if isinstance(selection, org.eclipse.core.resources.IFile): + selection = selection.getParent() + +if isinstance(selection, org.eclipse.core.resources.IContainer): + runProcess("explorer.exe", [selection.getLocation().toFile().toString()]) +``` + +To get the menu to appear, add the script to a new project—let's call it 'ScriptsProject'. Then go to Windows > Preference > Scripting > Script Locations. Click on the 'Add Workspace' button and select the ScriptsProject. You should see the new menu item show up in the context menu when you right-click on a file. Select this action to bring up a file browser. (Note this functionality already exists in Eclipse but this example is one you could adapt to other third-party tools). + +![](https://opensource.com/sites/default/files/6_explorer.png) + +The Eclipse Advanced Scripting Environment provides a great way to get more out of your Eclipse IDE by leveraging the power of Python. It is a project in its infancy so there is so much more to come. Learn more [about the project][13] and get involved by signing up for the [forum][14]. + +I'll be talking more about EASE at [Eclipsecon North America][15] 2016. My talk [Scripting Eclipse with Python][16] will go into how you can use not just Jython, but C-Python and how this functionality can be extended specifically for scientific use-cases. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/2/how-use-python-hack-your-ide + +作者:[Tracy Miranda][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/tracymiranda +[1]: https://eclipse.org/ease/ +[2]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python +[3]: https://www.eclipse.org/downloads/packages/eclipse-ide-eclipse-committers-451/mars1 +[4]: http://download.eclipse.org/ease/update/nightly +[5]: https://dl.bintray.com/pontesegger/ease-jython/ +[6]: http://code.activestate.com/recipes/66434-change-line-endings/ +[7]: https://gist.github.com/tracymiranda/6556482e278c9afc421d +[8]: https://gist.github.com/tracymiranda/f20f233b40f1f79b1df2 +[9]: https://gist.github.com/tracymiranda/e9588d0976c46a987463 +[10]: https://gist.github.com/tracymiranda/55995daaea9a4db584dc +[11]: https://gist.github.com/tracymiranda/baa218fc2c1a8e898194 +[12]: https://gist.github.com/tracymiranda/8aa3f0fc4bf44f4a5cd3 +[13]: https://eclipse.org/ease/ +[14]: https://dev.eclipse.org/mailman/listinfo/ease-dev +[15]: https://www.eclipsecon.org/na2016 +[16]: https://www.eclipsecon.org/na2016/session/scripting-eclipse-python diff --git a/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md b/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md new file mode 100644 index 0000000000..62e903018f --- /dev/null +++ b/translated/news/20160226 Development Release: Xubuntu 16.04 Beta 1.md @@ -0,0 +1,25 @@ +Xubuntu 16.04 Beta 1 开发发布 +============================================ + +Ubuntu 发布组已经宣布为了选定的社区版本准备的最新的 beta 测试镜像已经可以使用了。新的开发发布版名称是 16.04 beta 1,这个版本只推荐给测试人员,并不适合日常使用。 + +“这个 beta 特性的镜像是为 [Lubuntu][1], Ubuntu Cloud, [Ubuntu GNOME][2], [Ubuntu MATE][3], [Ubuntu Kylin][4], [Ubuntu Studio][5] 和 [Xubuntu][6] 这几个发布版准备的。Xenial Xerus 的预发布版本并不推荐那些需要稳定版本的,或者那些不希望在系统运行中偶尔或频繁的出现 bug 的人。这个版本还是推荐给喜欢 ubuntu 的开发人员,以及那些想帮助着测试、报告和修改 bug,和我们一起工作让这个发布版本早日准备好。” 更多的信息可以从 [发布日志][7] 获取。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/software/applications/888731-development-release-xubuntu-1604-beta-1 + +作者:[DistroWatch][a] +译者:[Ezio](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/community/forums/person/284 +[1]: http://distrowatch.com/lubuntu +[2]: http://distrowatch.com/ubuntugnome +[3]: http://distrowatch.com/ubuntumate +[4]: http://distrowatch.com/ubuntukylin +[5]: http://distrowatch.com/ubuntustudio +[6]: http://distrowatch.com/xubuntu +[7]: https://lists.ubuntu.com/archives/ubuntu-devel-announce/2016-February/001173.html diff --git a/translated/talk/20151019 Gaming On Linux--All You Need To Know.md b/translated/talk/20151019 Gaming On Linux--All You Need To Know.md new file mode 100644 index 0000000000..d43b548f7c --- /dev/null +++ b/translated/talk/20151019 Gaming On Linux--All You Need To Know.md @@ -0,0 +1,200 @@ +Linux上的游戏:所有你需要知道的 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Gaming-on-Linux.jpeg) + +** 我能在 Linux 上玩游戏吗 ?** + +这是打算[投奔 Linux 阵营][1]的人最经常问的问题之一。毕竟,在 Linux 上面玩游戏经常被认为有点难以实现。事实上,一些人甚至考虑他们能不能在 Linux 上看电影或者听音乐。考虑到这些,关于 Linux 的平台的游戏的问题是很现实的。「 + +在本文中,我将解答大多数 Linux 新手关于在 Linux 打游戏的问题。例如 Linux 下能不能玩游戏,如果能的话,在**哪里下载游戏**或者如何获取有关游戏的信息。 + +但是在此之前,我需要说明一下。我不是一个 PC 上的玩家或者说我不认为我是一个在 Linux 桌面上完游玩戏的家伙。我更喜欢在 PS4 上玩游戏并且我不关心 PC 上的游戏甚至也不关心手机上的游戏(我没有给我的任何一个朋友安利糖果传奇)。这也就是你很少在 It's FOSS 上很少看见关于 [Linux 上的游戏][2]的部分。 + +所以我为什么要写这个主题? + +因为别人问过我几次有关 Linux 上的游戏的问题并且我想要写出来一个能解答这些问题的 Linux 上的游戏指南。注意,在这里我不只是讨论 Ubuntu 上的游戏。我讨论的是在所有的 Linux 上的游戏。 + +### 我能在 Linux 上玩游戏吗 ? ### + +是,但不是完全是。 + +“是”,是指你能在Linux上玩游戏;“不完全是”,是指你不能在 Linux 上玩 ’所有的游戏‘。 + +什么?你是拒绝的?不必这样。我的意思是你能在 Linux 上玩很多流行的游戏,比如[反恐精英以及地铁:最后的曙光][3]等。但是你可能不能玩到所有在 Windows 上流行的最新游戏,比如[实况足球2015][4]。 + +在我看来,造成这种情况的原因是 Linux 在桌面系统中仅占不到 2%,这占比使得大多数开发者没有在 Linux 上发布他们的游戏的打算。 + +这就意味指大多数近年来被提及的比较多的游戏很有可能不能在 Linux 上玩。不要灰心。我们能以某种方式在 Linux 上玩这些游戏,我们将在下面的章节中讨论这些方法。但是,在此之前,让我们看看在 Linux 上能玩的游戏的种类。 + +要我说的话,我会把那些游戏分为四类: + +1. Linux 原生游戏 +2. Linux 上的 Windows 游戏 +3. 浏览器里的游戏 +4. 终端里的游戏 + +让我们以最重要的 Linux 的原生游戏开始。 + +--------- + +### 1. 在哪里去找 Llinux 原生游戏 ?### + +原生游戏指的是官方支持 Linux 的游戏。这些游戏有原生的 Linux 客户端并且能像在 Linux 上的其他软件一样不需要附加的步骤就能安装在 Linux 上面(我们将在下一节讨论)。 + +所以,如你所见,这里有一些为 Linux 开发的游戏,下一个问题就是在哪能找到这些游戏以及如何安装。我将列出来一些让你玩到游戏的渠道了。 + +#### Steam #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Install-Steam-Ubuntu-11.jpeg) + +“[Steam][5] 是一个游戏的分发平台。就如同 Kindle 是电子书的分发平台,iTunes 是音乐的分发平台一样,Steam 也具有那样的功能。它给了你购买和安装游戏,玩多人游戏以及在它的平台上关注其他游戏的选项。这些游戏被[ DRM ][6]所保护。” + +两年以前,游戏平台 Steam 宣布支持 Linux,这在当时是一个大新闻。这是 Linux 上玩游戏被严肃的对待的一个迹象。尽管这个决定更多地影响了他们自己的基于 Linux 游戏平台[ Steam OS][7]。这仍然是令人欣慰的事情,因为它给 Linux 带来了一大堆游戏。 + +我已经写了一篇详细的关于安装以及使用 Steam 的文章。如果你想开始使用 Steam 的话,读读那篇文章。 + +- [在 Linux 上安装以及使用 Steam ][8] + +#### GOG.com #### + +[GOG.com][9] 失灵一个与 Steam 类似的平台。与 Steam 一样,你能在这上面找到数以百计的 Linux 游戏,你可以购买和安装它们。如果游戏支持好几个平台,尼卡一在多个操作系统上安装他们。你买到你账户的游戏你可以随时玩。捏可以在你想要下载的任何时间下载。 + +GOG.com 与 Steam 不同的是前者仅提供没有 DRM 保护的游戏以及电影。而且,GOG.com 完全是基于网页的,所以你不需要安装类似 Steam 的客户端。你只需要用浏览器下载游戏然后安装到你的系统上。 + +#### Portable Linux Games #### + +[Portable Linux Games][10] 是一个集聚了不少 Linux 游戏的网站。这家网站最特别以及最好的就是你能离线安装这些游戏。 + +你下载到的文件包含所有的依赖(仅需 Wine 以及 Perl)并且他们也是与平台无关的。你所需要的仅仅是下载文件并且双击来启动安装程序。你也可以把文件储存起来以用于将来的安装,如果你网速不够快的话我很推荐您这样做。 + +#### Game Drift 游戏商店 #### + +[Game Drift][11] 是一个只专注于游戏的基于 Ubuntu 的 Linux 发行版。但是如果你不想只为游戏就去安装这个发行版的话,你也可以经常上线看哪个游戏可以在 Linux 上运行并且安装他们。 + +#### Linux Game Database #### + +如其名字所示,[Linux Game Database][12]是一个收集了很多 Linux 游戏的网站。你能在这里浏览诸多类型的游戏并从游戏开发者的网站下载/安装这些游戏。作为这家网站的会员,你甚至可以为游戏打分。LGDB,有点像 Linux 游戏界的 IMDB 或者 IGN. + +#### Penguspy #### + +此网站由一个不想用 Windows 玩游戏的玩家创立。[Penguspy][13] 聚集了一些 Linux 下最好的游戏。在这里你也能分类浏览游戏,如果你喜欢这个游戏的话,你可以跳转到游戏开发者的网站去下载安装。 + +#### 软件源 #### + +看看你自己的发行版的软件源。那里可能有一些游戏。如果你用 Ubuntu 的话,它的软件中心里有一个游戏的分类。在一些其他的发行版里也有,比如 Liux Mint 等。 + +---------- + +### 2. 如何在 Linux 上玩 Windows 的游戏 ?### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Wine-Linux.png) + +到现在为止,我们一直在讨论 Linux 的原生游戏。但是并没有很多 Linux 上的原生游戏,或者说,火的不要不要的游戏大多不支持 Linux,但是都支持 Windows PC。所以,如何在 Linux 上玩 Wendows 的游戏? + +幸好,由于我们有 Wine, PlayOnLinux 和 CrossOver 等工具,我们能在 Linux 上玩不少的 Wendows 游戏。 + +#### Wine #### + +Wine 是一个能使 Wendows 应用在类似 Linux, BSD 和 OS X 上运行的兼容层。在 Wine 的帮助下,你可以在 Linux 下安装以及使用很多 Windows 下的应用。 + +[在 Ubuntu 上安装 Wine][14]或者在其他 Linux 上安装 Wine 是很简单的,因为大多数发行版的软件源里都有它。这里也有一个很大的[ Wine 支持的应用的数据库][15]供您浏览。 + +#### CrossOver #### + +[CrossOver][16] 是 Wine 的增强版,它给 Wine 提供了专业的技术上的支持。但是与 Wine 不同, CrossOver 不是免费的。你需要购买许可。好消息是它会把更新也贡献到 Wine 的开发者那里并且事实上加速了 Wine 的开发使得 Wine 能支持更多的 Windows 上的游戏和应用。如果你可以一年支付 48 美元,你可以购买 CrossOver 并得到他们提供的技术支持。 + +### PlayOnLinux ### + +PlayOnLinux 也基于 Wine 但是执行程序的方式略有不同。它有着更好用的,不同的界面。与 Wine 一样,PlayOnLinux 也是免费使用。你可以在[开发者自己的数据库里查看它支持的应用以及游戏][17]。 + +---------- + +### 3. 网页游戏 ### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Chrome-Web-Store.jpeg) + +不必说你也应该知道有非常多的基于网页的游戏,这些游戏都可以在任何操作系统里运行,无论是 Windows,Linux,还是 OS X。大多数让人上瘾的手机游戏,比如[帝国之战][18]就有官方的网页版。 + +除了这些,还有 [Google Chrome在线商店][19],你可以在 Linux 上玩更多的这些游戏。这些 Chrome 上的游戏可以像一个单独的应用一样安装并从应用菜单中打开,一些游戏就算是离线也能运行。 + +---------- + +### 4. 终端游戏 ### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/03/nSnake_Linux_terminal_game.jpeg) + +使用 Linux 的一个附加优势就是可以使用命令行终端玩游戏。我知道这不是最好的玩游戏的 方法,但是在终端里玩[贪吃蛇][20]或者 [2048][21] 很有趣。在[这个博客][21]中有一些好玩的的终端游戏。你可以浏览并安装你喜欢的游戏。 + +---------- + +### 如何保证游戏的版本是最新的 ?### + +当你了解了不少的在 Linux 上你可以玩到的游戏以及你如何使用他们,下一个问题就是如何保持游戏的版本是最新的。对于这件事,我建议你看看下面的博客,这些博客能告诉你 Linux 游戏世界的最新消息: + +- [Gaming on Linux][23]:我认为我把它叫做 Linux 游戏的门户并没有错误。在这你可以得到关于 Linux 的游戏的最新的传言以及新闻。最近, Gaming on Linux 有了一个由 Linux 游戏爱好者组成的漂亮的社区。 +- [Free Gamer][24]:一个专注于免费开源的游戏的博客。 +- [Linux Game News][25]:一个提供很多的 Linux 游戏的升级的 Tumbler 博客。 + +#### 还有别的要说的吗? #### + +我认为让你知道如何开始在 Linux 上的游戏人生是一个好事。如果你仍然不能被说服。我推荐你做个[双系统][26],把 Linux 作为你的主要桌面系统,当你想玩游戏时,重启到 Windows。这是一个对游戏妥协的解决办法。 + +现在,这里是你说出你自己的状况的时候了。你在 Linux 上玩游戏吗?你最喜欢什么游戏?你关注了哪些游戏博客? + + +投票项目: +你怎样在 Linux 上玩游戏? + +- 我玩原生 Linux 游戏,我也用 Wine 以及 PlayOnLinux 运行 Windows 游戏 +- 我喜欢网页游戏 +- 我喜欢终端游戏 +- 我只玩原生 Linux 游戏 +- 我用 Steam +- 我用双系统,要玩游戏时就换到 Windows +- 我不玩游戏 + +注:投票代码 +
+
+ + + +注,发布时根据情况看怎么处理 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/linux-gaming-guide/ + +作者:[Abhishek][a] +译者:[name1e5s](https://github.com/name1e5s) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/reasons-switch-linux-windows-xp/ +[2]:http://itsfoss.com/category/games/ +[3]:http://blog.counter-strike.net/ +[4]:https://pes.konami.com/tag/pes-2015/ +[5]:http://store.steampowered.com/ +[6]:https://en.wikipedia.org/wiki/Digital_rights_management +[7]:http://itsfoss.com/valve-annouces-linux-based-gaming-operating-system-steamos/ +[8]:http://itsfoss.com/install-steam-ubuntu-linux/ +[9]:http://www.gog.com/ +[10]:http://www.portablelinuxgames.org/ +[11]:http://gamedrift.org/GameStore.html +[12]:http://www.lgdb.org/ +[13]:http://www.penguspy.com/ +[14]:http://itsfoss.com/wine-1-5-11-released-ppa-available-to-download/ +[15]:https://appdb.winehq.org/ +[16]:https://www.codeweavers.com/products/ +[17]:https://www.playonlinux.com/en/supported_apps.html +[18]:http://empire.goodgamestudios.com/ +[19]:https://chrome.google.com/webstore/category/apps +[20]:http://itsfoss.com/nsnake-play-classic-snake-game-linux-terminal/ +[21]:http://itsfoss.com/play-2048-linux-terminal/ +[22]:https://ttygames.wordpress.com/ +[23]:https://www.gamingonlinux.com/ +[24]:http://freegamer.blogspot.fr/ +[25]:http://linuxgamenews.com/ +[26]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ diff --git a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md b/translated/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md similarity index 51% rename from sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md rename to translated/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md index 73d16fe1bd..6c797816f5 100644 --- a/sources/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md +++ b/translated/tech/20151215 Linux Desktop Fun--Summon Swarms Of Penguins To Waddle About The Desktop.md @@ -1,43 +1,43 @@ -Linux Desktop Fun: Summon Swarms Of Penguins To Waddle About The Desktop +Linux桌面趣闻:召唤一群企鹅在桌面上行走 ================================================================================ -XPenguins is a program for animating cute cartoons animals in your root window. By default it will be penguins they drop in from the top of the screen, walk along the tops of your windows, up the side of your windows, levitate, skateboard, and do other similarly exciting things. Now you can send an army of cute little penguins to invade the screen of someone else on your network. +XPenguins是一个在窗口播放可爱动物动画的程序。默认情况下,将会从屏幕上方掉落企鹅,沿着你的窗口顶部行走,在窗口变漂浮,滑板,和做其他类似的令人兴奋的事情。现在,你可以把这些可爱的小企鹅大军入侵别人的桌面了。 -### Install XPenguins ### +### 安装XPenguins ### -Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following commands to install XPenguins program. First, type the command apt-get update to tell apt to refresh its package information by querying the configured repositories and then install the required program: +打开终端(选择程序->附件->终端),接着输入下面的命令来安装XPenguins。首先,输入apt-get update通过请求配置的仓库刷新包的信息,接着安装需要的程序: $ sudo apt-get update $ sudo apt-get install xpenguins -### How do I Start XPenguins Locally? ### +### 我本地如何启动XPenguins? ### -Type the following command: +输入下面的命令: $ xpenguins -Sample outputs: +示例输出: ![An army of cute little penguins invading the screen](http://files.cyberciti.biz/uploads/tips/2011/07/Workspace-1_002_12_07_2011.png) -An army of cute little penguins invading the screen +一支可爱企鹅军队正在入侵屏幕。 ![Linux: Cute little penguins walking along the tops of your windows](http://files.cyberciti.biz/uploads/tips/2011/07/Workspace-1_001_12_07_2011.png) -Linux: Cute little penguins walking along the tops of your windows +Linux:可爱的小企鹅沿着窗口的顶部行走。 ![Xpenguins Screenshot](http://files.cyberciti.biz/uploads/tips/2011/07/xpenguins-screenshot.jpg) -Xpenguins Screenshot +Xpenguins截图 -Be careful when you move windows as the little guys squash easily. If you send the program an interupt signal (Ctrl-C) they will burst. +移动窗口时小心点,小家伙们很容易被压坏。如果你发送中断程序(Ctrl-C),它们会爆炸。 -### Themes ### +### 主题 ### -To list themes, enter: +要列出主题,输入: $ xpenguins -l -Sample outputs: +示例输出: Big Penguins Bill @@ -45,11 +45,11 @@ Sample outputs: Penguins Turtles -You can use alternative themes as follows: +你可以用下面的命令使用其他的主题: $ xpenguins --theme "Big Penguins" --theme "Turtles" -You can install additional themes as follows: +你可以用下面的命令安装额外的主题: $ cd /tmp $ wget http://xpenguins.seul.org/xpenguins_themes-1.0.tar.gz @@ -58,7 +58,7 @@ You can install additional themes as follows: $ mv -v themes ~/.xpenguins/ $ xpenguins -l -Sample outputs: +示例输出: Lemmings Sonic the Hedgehog @@ -71,26 +71,26 @@ Sample outputs: Penguins Turtles -To start with a random theme, enter: +已一个随机主题开始,输入: $ xpenguins --random-theme -To load all available themes and run them simultaneously, enter: +要加载所有的主题并且同时运行,输入: $ xpenguins --all -More links and information: +更多链接何信息: -- [XPenguins][1] home page. +- [XPenguins][1] 主页。 - man penguins -- More Linux / UNIX desktop fun with [Steam Locomotive][2] and [Terminal ASCII Aquarium][3]. +- 更多Linux/Unix桌面乐趣在[蒸汽火车][2]和[终端ASCII水族馆][3]。 -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/tips/linux-cute-little-xpenguins-walk-along-tops-ofyour-windows.html 作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -98,3 +98,5 @@ via: http://www.cyberciti.biz/tips/linux-cute-little-xpenguins-walk-along-tops-o [1]:http://xpenguins.seul.org/ [2]:http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html [3]:http://www.cyberciti.biz/tips/linux-unix-apple-osx-terminal-ascii-aquarium.html + + diff --git a/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md b/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md deleted file mode 100644 index 6f9f3690cb..0000000000 --- a/translated/tech/20160104 How to use KVM from the command line on Debian or Ubuntu.md +++ /dev/null @@ -1,297 +0,0 @@ - -怎样在ubuntu和debian中用命令行使用KVM -================================================================================ -有很多不同的方式去管理运行在KVM管理程序上的虚拟机。例如,virt-manager就是一个流行的基于图形用户界面的前端虚拟机管理工具。然而,如果你想要在没有图形窗口的服务器环境下使用KVM,那么基于图形用户界面的解决方案显然是行不通的。事实上,你可以纯粹的使用包装了kvm命令行脚本的命令行来管理KVM虚拟机。作为替代方案,你可以使用virsh这个容易使用的命令行用户接口来管理客户虚拟机。在virsh中,它通过和libvirtd服务通信来达到控制虚拟机的目的,而libvirtd可以控制几个不同的虚拟机管理器,包括KVM,Xen,QEMU,LXC和OpenVZ。 - 当你想要对虚拟机的前期准备和后期管理实现自动化操作时,像virsh这样的命令行管理工具是非常有用的。同样,virsh支持多个管理器的事实也意味着你可以通过相同的virsh接口去管理不同的虚拟机管理器。 - 在这篇文章中,我会示范**怎样在ubuntu和debian上通过使用virsh命令行去运行KVM**。 - -### 第一步:确认你的硬件平台支持虚拟化 ### - -作为第一步,首先要确认你的主机CPU配备了硬件虚拟化拓展(e.g.,Intel VT或者AMD-V),这是KVM对硬件的要求。下面的命令可以检查硬件是否支持虚拟化。 - - $ egrep '(vmx|svm)' --color /proc/cpuinfo - -![](https://c2.staticflickr.com/2/1505/24050288606_758a44c4c6_c.jpg) - - 如果在输出中不包含vmx或者svm标识,那么就意味着你的主机cpu不支持硬件虚拟化。因此你不能在你的机器上使用KVM。确认了主机cpu存在vmx或者svm之后,接下来开始安装KVM。 -对于KVM来说,它不要求运行在拥有64位内核系统的主机上,但是通常我们会推荐在64位系统的主机上面运行KVM。 - -### 第二步:安装KVM ### - -使用apt-get安装KVM和相关的用户空间工具。 - - $ sudo apt-get install qemu-kvm libvirt-bin - -安装期间,libvirtd组(在debian上是libvirtd-qemu组)将会被创建,并且你的用户id将会被自动添加到该组中。这样做的目的是让你可以以一个普通用户而不是root用户的身份去管理虚拟机。你可以使用id命令来确认这一点,下面将会告诉你怎么去显示你的组id: - - $ id - -![](https://c2.staticflickr.com/6/5597/15432586092_64dfb867d3_c.jpg) - -如果因为某些原因,libvirt(在debian中是libvirt-qemu)没有在你的组id中被找到,你也可以手动将你自己添加到对应的组中,如下所示: -在ubuntu上: - - $ sudo adduser [youruserID] libvirtd - -在debian上: - - $ sudo adduser [youruserID] libvirt-qemu - -按照如下形式重修载入更新后的组成员关系。如果要求输入密码,那么输入你的登陆密码即可。 - - $ exec su -l $USER - -这时,你应该可以以普通用户的身份去执行virsh了。做一个如下所示的测试,这个命令将会以列表的形式列出可用的虚拟机(当前的列表是空的)。如果你没有遇到权限问题,那意味着迄今为止一切都是正常的。 - - $ virsh list - ----------- - - Id Name State - ---------------------------------------------------- - -### 第三步:配置桥接网络 ### - -为了使KVM虚拟机能够访问外部网络,一种方法是通过在KVM宿主机上创建Linux桥来实现。创建之后的桥能够将虚拟机的虚拟网卡和宿主机的物理网卡连接起来,因此,虚拟机能够发送和接受由物理网卡发送过来的流量数据包。这种方式叫做网桥连接。 -下面将告诉你如何创建并且配置网桥,我们称它为br0. -首先,安装一个必需的包,然后用命令行创建一个网桥。 - - $ sudo apt-get install bridge-utils - $ sudo brctl addbr br0 - -下一步就是配置已经创建好的网桥,即修改位于/etc/network/interfaces的配置文件。我们需要将该桥接网卡设置成开机启动。为了修改该配置文件,你需要关闭你的操作系统上的网络管理器(如果你在使用它的话)。跟随[操作指南][1]的说明去关闭网络管理器。 - 关闭网络管理器之后,接下来就是通过修改配置文件来配置网桥了。 - - #auto eth0 - #iface eth0 inet dhcp - - auto br0 - iface br0 inet dhcp - bridge_ports eth0 - bridge_stp off - bridge_fd 0 - bridge_maxwait 0 - - -在上面的配置中,我假设eth0是主要网卡,它也是连接到外网的网卡,同样,我假设eth0将会通过DHCP得到它的ip地址。注意,之前在/etc/network/interfaces中还没有对eth0进行任何配置。桥接网卡br0引用了eth0的配置,而eth0也会受到br0的制约。 -重启网络服务,并确认网桥已经被成功的配置好。如果成功的话,br0的ip地址将会是eth0的被自动分配的ip地址,而且eth0不会被分配任何ip地址。 - - $ sudo /etc/init.d/networking restart - $ ifconfig - -如果因为某些原因,eth0仍然保留了之前分配给了br0的ip地址,那么你可能必须明确的删除eth0的ip地址。 - -![](https://c2.staticflickr.com/2/1698/23780708850_66cd7ba6ea_c.jpg) - -###第四步:用命令行创建一个虚拟机 ### - -对于虚拟机来说,它的配置信息被存储在它对应的xml文件中。因此,创建一个虚拟机的第一步就是准备一个与主机名对应的xml文件。 -下面是一个示例xml文件,你可以根据需要手动修改它。 - - - alice - f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa - 1048576 - 1048576 - 1 - - hvm - - - - - - - destroy - restart - destroy - - /usr/bin/kvm - - - - -
- - - - - - -
- - - - - - -
- - - - - - - - - -上面的主机xml配置文件定义了如下的虚拟机内容。 - -- 1GB内存,一个虚拟cpu和一个硬件驱动。 -- Disk image:/home/dev/images/alice.img。 -- Boot from CD-ROM(/home/dev/iso/CentOS-6.5-x86_64-minomal.iso)。 -- Networking:一个桥接到br0的虚拟网卡。 -- 通过VNC远程访问。 -中的UUID字符串可以随机生成。为了得到一个随机的uuid字符串,你可能需要使用uuid命令行工具。 - - $ sudo apt-get install uuid - $ uuid - -生成一个主机xml配置文件的方式就是通过一个已经存在的虚拟机来导出它的xml配置文件。如下所示。 - - $ virsh dumpxml alice > bob.xml - -![](https://c2.staticflickr.com/6/5808/23968234602_25e8019ec8_c.jpg) - -###第五步:使用命令行启动虚拟机### - -在启动虚拟机之前,我们需要创建它的初始磁盘镜像。为此,你需要使用qemu-img命令来生成一个你已经安装的qemu-kvm镜像。下面的命令将会创建10GB大小的空磁盘,并且它是qcow2格式的。 - - $ qemu-img create -f qcow2 /home/dev/images/alice.img 10G - -使用qcow2格式的磁盘镜像的好处就是它在创建之初并不会给它分配全部大小磁盘容量(这里是10GB),而是随着虚拟机中文件的增加而逐渐增大。因此,它对空间的使用更加有效。 -现在,你可以准备通过使用之前创建的xml配置文件启动你的虚拟机了。下面的命令将会创建一个虚拟机,然后自动启动它。 - - $ virsh create alice.xml - ----------- - - Domain alice created from alice.xml - -**注意**:如果你对一个已经存在的虚拟机运行了上面的命令,那么这个操作将会在没有警告信息的情况下抹去那个已经存在的虚拟机的全部信息。如果你已经创建了一个虚拟机,你可能会使用下面的命令来启动虚拟机。 - - $ virsh start alice.xml - -使用如下命令确认一个新的虚拟机已经被创建并成功的被启动。 - - $ virsh list - ----------- - - Id Name State - ---------------------------------------------------- - 3 alice running - -同样,使用如下命令确认你的虚拟机的虚拟网卡已经被成功的添加到了你先前创建的br0网桥中。 - - $ sudo brctl show - -![](https://c2.staticflickr.com/2/1546/23449585383_a371e9e579_c.jpg) - -### 远程连接虚拟机 ### - -为了远程访问一个正在运行的虚拟机的控制台,你可以使用VNC客户端。 -首先,你需要使用如下命令找出用于虚拟机的VNC端口号。 - - $ sudo netstat -nap | egrep '(kvm|qemu)' - -![](https://c2.staticflickr.com/6/5633/23448144274_49045bc868_c.jpg) - -在这个例子中,用于alice虚拟机的VNC端口号是5900 -然后启动一个VNC客户端,连接到一个端口号为5900的VNC服务器。在我们的例子中,虚拟机支持由CentOS光盘文件启动。 - -![](https://c2.staticflickr.com/2/1533/24076369675_99408972a4_c.jpg) - -### 使用virsh管理虚拟机 ### - -下面列出了virsh命令的常规用法 -创建客户机并且启动虚拟机: - - $ virsh create alice.xml - -停止虚拟机并且删除客户机 - - $ virsh destroy alice - -关闭虚拟机(不用删除它) - - $ virsh shutdown alice - -暂停虚拟机 - - $ virsh suspend alice - -恢复虚拟机 - - $ virsh resume alice - -访问正在运行的虚拟机的登陆控制台 - - $ virsh console alice - -设置虚拟机开机启动: - - $ virsh autostart alice - -查看虚拟机的详细信息 - - $ virsh dominfo alice - -编辑虚拟机的配置文件: - - $ virsh edit alice - -上面的这个命令将会使用一个默认的编辑器来调用主机配置文件。该配置文件中的任何改变都将自动被libvirt验证其正确性。 -你也可以在一个virsh会话中管理虚拟机。下面的命令会创建并进入到一个virsh会话中: - - $ virsh -在virsh提示中,你可以使用任何virsh命令。 - -![](https://c2.staticflickr.com/6/5645/23708565129_b1ef968b30_c.jpg) - -### 问题处理 ### - -1. 我在创建虚拟机的时候遇到了一个错误: - - error: internal error: no supported architecture for os type 'hvm' - - 如果你的硬件不支持虚拟化的话你可能就会遇到这个错误。(例如,Intel VT或者AMD-V),这是运行KVM所必需的。如果你遇到了这个错误,而你的cpu支持虚拟化,那么这里可以给你一些可用的解决方案: - -首先,检查你的内核模块是否丢失。 - - $ lsmod | grep kvm - -如果内核模块没有加载,你必须按照如下方式加载它。 - - $ sudo modprobe kvm_intel (for Intel processor) - $ sudo modprobe kvm_amd (for AMD processor) - -第二个解决方案就是添加“--connect qemu:///system”参数到virsh命令中,如下所示。当你正在你的硬件平台上使用超过一个虚拟机管理器的时候就需要添加这个参数(例如,VirtualBox,VMware)。 - $ virsh --connect qemu:///system create alice.xml - -2. 当我试着访问我的虚拟机的登陆控制台的时候遇到了错误: - - $ virsh console alice - ----------- - - error: internal error: cannot find character device - -这个错误发生的原因是你没有在你的虚拟机配置文件中定义控制台设备。在xml文件中加上下面的内部设备部分即可。 - - - - - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/use-kvm-command-line-debian-ubuntu.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/disable-network-manager-linux.html diff --git a/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md b/translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md similarity index 78% rename from sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md rename to translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md index ccd14d1410..8d452af0ad 100644 --- a/sources/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md +++ b/translated/tech/20160214 How to Install MariaDB 10 on CentOS 7 CPanel Server.md @@ -1,24 +1,22 @@ -translation by strugglingyouth -How to Install MariaDB 10 on CentOS 7 CPanel Server + +在 CentOS 7 CPanel 服务器上安装 MariaDB 10 ================================================================================ -MariaDB is a enhanced open source and drop-in replacement for MySQL. It is developed by MariaDB community and available under the terms of the GPL v2 license. Software Security is the main focus for the MariaDB developers. They maintain its own set of security patches for each MariaDB releases. When any critical security issues are discovered, the developers introduces a new release of MariaDB to get the fix out as soon as possible. +MariaDB 是一个增强版的,开源的并且可以直接替代 MySQL。它主要由 MariaDB 社区在维护,采用 GPL v2 授权许可。软件的安全性是 MariaDB 开发者的主要焦点。他们保持为 MariaDB 的每个版本发布安全补丁。当有任何安全问题被发现时,开发者会尽快修复并推出 MariaDB 的新版本。 -MariaDB is always up-to-date with the latest MySQL releases. It is highly compatible and works exactly like the MySQL. Almost all commands, data, table definition files, Client APIs, protocols, interfaces, structures, filenames, binaries, ports, database storage locations etc are same as the MySQL. It isn't even needed to convert databases to switch to MariaDB. +### MariaDB 的优势 ### -### Advantages of MariaDB ### +- 完全开源 +- 快速且透明的安全版本 +- 与 MySQL 高度兼容 +- 性能更好 +- 比 MySQL 的存储引擎多 -- Truly Open source -- More quicker and transparent security releases -- Highly Compatible with MySQL -- Improved Performance -- More storage engines compared to MySQL +在这篇文章中,我将谈论关于如何升级 MySQL5.5 到最新的 MariaDB 在CentOS7 CPanel 服务器上。在安装前先完成以下步骤。 -In this article, I provides guidelines on how to upgrade MySQL 5.5 to the latest MariaDB on a CentOS 7 CPanel server. Let's walk through the Pre-installation steps. +### 先决条件: ### -### Pre-requisites: ### - -#### 1. Stop current MySQL Service #### +#### 1. 停止当前 MySQL 服务 #### root@server1 [/var/# mysql Welcome to the MySQL monitor. Commands end with ; or \g. @@ -47,9 +45,9 @@ In this article, I provides guidelines on how to upgrade MySQL 5.5 to the latest Jan 31 10:00:02 server1.centos7-test.com systemd[1]: Unit mysql.service entered failed state. Jan 31 10:00:02 server1.centos7-test.com systemd[1]: mysql.service failed. -#### 2. Move all configuration files and databases prior to the upgrade #### +#### 2. 在升级之前将所有配置文件和数据库转移 #### -Move the DB storage path and MySQL configuration files +转移数据库的存储路径和 MySQL 的配置文件 root@server1 [~]# cp -Rf /var/lib/mysql /var/lib/mysql-old @@ -62,18 +60,19 @@ Move the DB storage path and MySQL configuration files root@server1 [~]#mv /etc/my.cnf /etc/my.cnf-old -#### 3. Remove and uninstall all MySQL rpms from the server #### +#### 3. 从服务器上删除和卸载 MySQL 所有的 RPM 包 #### -Run the following commands to disable the MySQL RPM targets. By running this commands, cPanel will no longer handle MySQL updates, and mark these rpm.versions as uninstalled on the system. +运行以下命令来禁用 MySQL 的 RPM 的目标。通过运行此命令,cPanel 将不再处理 MySQL 的更新,并在系统上将卸载的标记为 rpm.versions。 /scripts/update_local_rpm_versions --edit target_settings.MySQL50 uninstalled /scripts/update_local_rpm_versions --edit target_settings.MySQL51 uninstalled /scripts/update_local_rpm_versions --edit target_settings.MySQL55 uninstalled /scripts/update_local_rpm_versions --edit target_settings.MySQL56 uninstalled -Now run the this command: +现在运行以下命令: -/scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 to remove all existing MySQL rpms on the server and leave a clean environment for MariaDB installation. Please see its output below: +/scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 +移除服务器上所有已存在的 MySQL rpms 来为 MariaDB 的安装清理环境。请看下面的输出: root@server1 [/var/lib/mysql]# /scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55,MySQL56 [2016-01-31 09:53:59 +0000] @@ -98,13 +97,13 @@ Now run the this command: [2016-01-31 09:54:04 +0000] Removed symlink /etc/systemd/system/multi-user.target.wants/mysql.service. [2016-01-31 09:54:04 +0000] Restoring service monitoring. -With these steps, we've uninstalled existing MySQL RPMs, marked targets to prevent further MySQL updates and made the server ready and clean for the MariaDB installation. +通过这些步骤,我们已经卸载了现有的 MySQL RPMs,并做了标记来防止 MySQL的更新,服务器的环境已经清理然后准备安装 MariaDB。 -To startup with the installation, we need to create a yum repository for MariaDB depending on the MariaDB & CentOS versions. This is how I did it! +开始安装吧,我们需要在 CentOS 为 MariaDB 创建一个 yum 软件库。下面是我的做法! -### Installation procedures: ### +### 安装步骤: ### -#### Step 1: Creating a YUM repository. #### +#### 第1步:创建 YUM 软件库。#### root@server1 [~]# vim /etc/yum.repos.d/MariaDB.repo [mariadb] @@ -119,7 +118,7 @@ To startup with the installation, we need to create a yum repository for MariaDB gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 -#### Step 2: Open the /etc/yum.conf and modify the exclude line as below: #### +#### 第2步:打开 /etc/yum.conf 并修改如下行: #### **Remove this line** exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* @@ -127,9 +126,9 @@ To startup with the installation, we need to create a yum repository for MariaDB **\*\*\* IMPORTANT \*\*\*** -We need to make sure, we've removed the MySQL and PHP from the exclude list. +需要确保我们已经从 exclude 列表中移除了 MySQL 和 PHP。 -#### Step 3: Run the following command to install MariaDB and related packages. #### +#### 第3步:运行以下命令来安装 MariaDB 和相关的包。 #### **yum install MariaDB-server MariaDB-client MariaDB-devel php-mysql** @@ -156,7 +155,7 @@ We need to make sure, we've removed the MySQL and PHP from the exclude list. =============================================================================================================================================== Install 4 Packages (+5 Dependent package) -#### Step 4: Restart and make sure the MySQL service is up. #### +#### 第4步:重新启动,并确保 MySQL 服务已启动。#### root@server1 [~]# systemctl start mysql root@server1 [~]# @@ -173,9 +172,10 @@ We need to make sure, we've removed the MySQL and PHP from the exclude list. Jan 31 10:01:46 server1.centos7-test.com mysql[23717]: Starting MySQL SUCCESS! Jan 31 10:01:46 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. -#### Step 5: Run mysql_upgrade command #### +#### 第5步:运行 mysql_upgrade 命令。 #### + +它将检查所有数据库中的所有表与当前安装的版本是否兼容并在必要时会更新系统表采取新的特权或功能,可能会增加当前版本的性能。 -It will examine all tables in all databases for incompatibilities with the current installed version and upgrades the system tables if necessary to take advantage of new privileges or capabilities that might have added with the current version. root@server1 [~]# mysql_upgrade MySQL upgrade detected @@ -254,7 +254,7 @@ It will examine all tables in all databases for incompatibilities with the curre Phase 6/6: Running 'FLUSH PRIVILEGES' OK -#### Step 6 : Restart the MySQL service once again to ensure everything works perfect. #### +#### 第6步:再次重新启动MySQL的服务,以确保一切都运行完好。 #### root@server1 [~]# systemctl restart mysql root@server1 [~]# @@ -274,7 +274,7 @@ It will examine all tables in all databases for incompatibilities with the curre Jan 31 10:04:11 server1.centos7-test.com mysql[23854]: Starting MySQL. SUCCESS! Jan 31 10:04:11 server1.centos7-test.com systemd[1]: Started LSB: start and stop MySQL. -#### Step 7: Run EasyApache to rebuild Apache/PHP with MariaDB and ensure all PHP modules remains intact. #### +#### 第7步:运行 EasyApache 用 MariaDB 重建 Apache/PHP,并确保所有 PHP 的模块保持不变。#### root@server1 [~]#/scripts/easyapache --build @@ -284,7 +284,7 @@ It will examine all tables in all databases for incompatibilities with the curre root@server1 [/etc/my.cnf.d]# php -v php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory -#### Step 8: Now verify the installation and databases. #### +#### 第8步:现在验证安装的数据库。 #### root@server1 [/var/lib/mysql]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. @@ -312,14 +312,13 @@ It will examine all tables in all databases for incompatibilities with the curre +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ 10 rows in set (0.00 sec) -That's all :). Now we're all set to go with MariaDB with its improved and efficient features. Hope you enjoyed reading this documentation. I would recommend your valuable suggestions and feedback on this! - +就这样 :)。现在,我们该去欣赏 MariaDB 完善和高效的特点了。希望你喜欢阅读本文。希望留下您宝贵的建议和反馈! -------------------------------------------------------------------------------- via: http://linoxide.com/how-tos/install-mariadb-10-centos-7-cpanel/ 作者:[Saheetha Shameer][a] -译者:[译者ID](https://github.com/译者ID) +译者:[strugglingyouth](https://github.com/strugglingyouth) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md b/translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md new file mode 100644 index 0000000000..aedd61f966 --- /dev/null +++ b/translated/tech/20160223 Intel shows budget Android phone powering big-screen Linux.md @@ -0,0 +1,34 @@ +Intel展示了带动大屏幕Linux的便宜Android手机 +============================================================== + +![](https://regmedia.co.uk/2016/02/23/intel-bigscreen.jpg?x=648&y=348&crop=1) + +在世界移动会议**MWC16**上Intel展示了称之为“大屏体验”的一款的Android智能手机,它在插入一个外部显示后运行了一个完整的Linux桌面。 + +这个概念大体上与微软在Windows 10手机中的Continuum相似,但是Continuum面向的是高端设备,Intel的项目面向的是低端智能机何新兴市场。 + +显示上Barcelona是拥有Atom x3、2GB RAM和16GB存储以及支持外部显示的的SoFIA(Intel架构的只能或功能手机)智能机原型。插上键盘、鼠标何显示,它就变成了一台桌面Linux,可以选择在大屏幕中显示Android桌面。 + +Intel的拓荒小组经理Nir Metzer告诉Reg:“Android基于Linux内核,因此我们运行的是一个内核,我们有一个Android栈和一个Linux栈,并且我们共享一个上下文,因此文件系统是相同的。电话是全功能的。” + +Metzer说:“我有一个多窗口环境。只要我插入后就可以做电子表格,我可以拖拽、播放音频。在一个低端平台实现这一切是一个挑战。” + +现在当连上外部显示器时设备的屏幕显示的空白,但是Metzer说下个版本的Atom X3会支持双显示。 + +使用的Linux版本是由Intel维护的。Metzer说:“我们需要将Linux和Android保持一致。框架是预安装的,你不能下载任何app” + +英特尔在移动世界大会上向手机制造商们推销这一想法,但却没有实际报告购买该设备的消费者。Metzer说:“芯片已经准备好了,已经为量产准备好了。这可以明天进入生产。这是一个商业决定。” + +-------------------------------------------------------------------------------- + +via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/ + +作者:[Tim Anderson][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.theregister.co.uk/Author/2878 + + diff --git a/选题模板.txt b/选题模板.txt new file mode 100644 index 0000000000..fabd1f1dba --- /dev/null +++ b/选题模板.txt @@ -0,0 +1,41 @@ +选题标题格式: + + 原文日期 标题.md + +正文内容: + + 标题 + ======= + + ### 子一级标题 + + 正文 + + #### 子二级标题 + + 正文内容 + + ![](图片地址) + + ### 子一级标题 + + 正文内容 : I have a [dream][1]。 + + + -------------------------------------------------------------------------------- + + via: 原文地址 + + 作者:[作者名][a] + 译者:[译者ID](https://github.com/译者ID) + 校对:[校对者ID](https://github.com/校对者ID) + + 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + + [a]: 作者介绍地址 + [1]: 引文链接地址 + +说明: +1. 标题层级很多时从 “##” 开始 +2. 引文链接地址在下方集中写 +