Merge pull request #23 from LCTT/master

Update Repository
This commit is contained in:
joeren
2014-09-29 15:04:26 +08:00
18 changed files with 940 additions and 367 deletions

View File

@@ -1,12 +1,12 @@
Jelly Conky你的Linux桌面加入了简约、时尚的状态
Jelly Conky你的Linux桌面带来简约、时尚的状态信息
================================================================================
**我把Conky设置成有点像壁纸:我会找出一我喜欢的,只在下一周更换因为我厌倦了并且想要一点改变。**
**我把Conky当成壁纸一样使用:我会找出一我喜欢的样式,下一周当我厌烦了想要一点改变时我就更换另外一个样式。**
耐烦的一部分原因是由于日益增长的设计目录。我最近最喜欢的是Jelly Conky。
断更换样式的部分原因是由于日益增多的样式目录。我最近最喜欢的样式是Jelly Conky。
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/jelly-conky.png)
我们最近强调的许多Conky所夸耀的最小设计都遵循了。它并不想成为一个厨房水槽。它不会被那些需要一眼需要看到他们硬盘温度和IP地址的人所青睐
Jelly Conky遵循了许多我们推荐的Conky风格采用的最小设计原则。它并不想成为一个大杂烩。它不会被那些喜欢一眼就能看到他们硬盘温度和IP地址的人所青睐
它配备了三种不同的模式,它们都可以添加个性的或者静态背景图像:
@@ -16,9 +16,9 @@ Jelly Conky给你的Linux桌面加入了简约、时尚的状态
一些人不理解为什么要在桌面上拥有重复的时钟。这是很好理解的。对于我而言这不仅仅是功能虽然个人而言Conky的时钟比挤在上部面板上那渺小的数字要更容易看清
机会是如果你的Android主屏幕有一个时间小部件的话你不会介意在你的桌面上也有这么一个
我想如果你的Android主屏幕有一个时间小部件的话你不会介意在你的桌面上也有这么一个的,对吧?
你可以从下述链接下载Jelly Conkyzip 包里面有一个说明如何安装的 readme 文件。如果希望看到完整的教程,可以[参考我们的前一篇文章][3]。
- [从Deviant Art上下载 Jelly Conky][2]
--------------------------------------------------------------------------------
@@ -27,10 +27,11 @@ via: http://www.omgubuntu.co.uk/2014/09/jelly-conky-for-linux-desktop
作者:[Joey-Elijah Sneddon][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://plus.google.com/117485690627814051450/?rel=author
[1]:http://www.omgubuntu.co.uk/2014/07/conky-circle-theme-nod-lg-quick-cover
[2]:http://zagortenay333.deviantart.com/art/Jelly-Conky-442559003
[2]:http://zagortenay333.deviantart.com/art/Jelly-Conky-442559003
[3]:http://www.omgubuntu.co.uk/2014/07/conky-circle-theme-nod-lg-quick-cover

View File

@@ -1,26 +1,26 @@
Red Hat公司8200万美元收购FeedHenry来推动手机开发
Red Hat公司8200万美元收购FeedHenry来推动移动开发
================================================================================
> 这是Red Hat公司进入手机开发领域的一次关键收获。
> 这是Red Hat公司进入移动开发领域的一次关键收获。
Red Hat公司的JBoss开发者工具事业部一直注重于企业开发而忽略了手机方面。而如今这一切将随着Red Hat公司宣布用8200万美元收购手机开发供应商 [FeedHenry][1] 开始发生改变。这笔交易将在Red Hat公司2015财年的第三季度结束。Red Hat公司已经在美国东部时间9月18号的4点公布它2015财年第二季度的收入。
Red Hat公司的JBoss开发者工具事业部一直注重于企业开发而忽略了移动方面。而如今这一切将随着Red Hat公司宣布用8200万美元收购移动开发供应商 [FeedHenry][1] 开始发生改变。这笔交易将在Red Hat公司2015财年的第三季度结束。
Red Hat公司的中间件总经理Mike Piech说当交易结束后FeedHenry公司的员工将会变成Red Hat公司的员工。
FeedHenry公司的开发平台能让应用开发者快速地开发出Android、IOS、Windows Phone以及黑莓的手机应用。FeedHenry的平台Node.js的编程结构有着深远影响而那不是过去JBoss所涉及的领域。
FeedHenry公司的开发平台能让应用开发者快速地开发出Android、IOS、Windows Phone以及黑莓的移动应用。FeedHenry的平台Node.js的编程结构有着深远影响而那不是过去JBoss所涉及的领域。
"FeedHenry公司的这次收购显著地提高了我们对于Node.js的支持与衔接。" Piech说。
"这次对FeedHenry公司的收购显著地提高了我们对于Node.js的支持与衔接。" Piech说。
Red Hat公司的平台即服务(PaaS)技术OpenShift已经有了一个Node.js的cartridge组件。此外Red Hat公司的企业版Linux把Node.js的技术预览来作为Red Hat公司软件包的一部分。
尽管Node.js本身就是开源的但不是所有FeedHenry公司的技术能在近期符合开源许可证的要求。作为Red Hat纵历史的政策, 现在也是致力于让FeedHenry开源的时候了。
尽管Node.js本身就是开源的但不是所有FeedHenry公司的技术能在近期符合开源许可证的要求。作为Red Hat纵历史的政策, 现在也是致力于让FeedHenry开源的时候了。
"我们完成了收购,那么开源我们收购的技术就是公司的首要任务,并且我们没有理由去期待改变Feedhenry。"Piech说。
"我们完成了收购,那么开源我们收购的技术就是公司的首要任务,并且我们没有理由Feedhenry而例外。"Piech说。
Red Hat公司最后一次主要的非开源性公司的收购是在2012年用104万美元收购 [ManageIQ][2] 公司。在今年的5月份Red Hat公司成立了ManageIQ公司的开源项目开放之前闭源的云管理技术代码。
从整合的角度来看Red Hat公司还尚未精确地提供FeedHenry公司适应它的完整细节
从整合的角度来看Red Hat公司还尚未精确地提供FeedHenry公司如何融入它的完整信息
"我们已经认出了一些FeedHenry公司和我们已经存在的技术和产品能很好地相互融合和集成" Piech说"我们会在接下来的90天内分享更多我们发展蓝图的细节。"
"我们已经确定了一些FeedHenry公司和我们已经存在的技术和产品能很好地相互融合和集成的范围" Piech说"我们会在接下来的90天内分享更多我们发展蓝图的细节。"
--------------------------------------------------------------------------------

View File

@@ -1,15 +1,14 @@
CanonicalUbuntu 14.04 LTS中关闭了一个nginx漏洞
Canonical解决了一个Ubuntu 14.04 LTS中nginx漏洞
================================================================================
> 用户不得不升级他们的系统来修复这个漏洞
> 用户应该更新他们的系统来修复这个漏洞
![Ubuntu 14.04 LTS](http://i1-news.softpedia-static.com/images/news2/Canonical-Closes-Nginx-Exploit-in-Ubuntu-14-04-LTS-459677-2.jpg)
<center>![Ubuntu 14.04 LTS](http://i1-news.softpedia-static.com/images/news2/Canonical-Closes-Nginx-Exploit-in-Ubuntu-14-04-LTS-459677-2.jpg)</center>
Ubuntu 14.04 LTS
<center>*Ubuntu 14.04 LTS*</center>
**Canonical已经在安全公告中公布了这个影响到Ubuntu 14.04 LTS (Trusty Tahr)的nginx漏洞的细节。这个问题已经被确定并被修复了**
Ubuntu的开发者已经修复了nginx的一个小漏洞。他们解释nginx可能已经被用来暴露网络上的敏感信息。
Ubuntu的开发者已经修复了nginx的一个小漏洞。他们解释nginx可能已经被用来暴露网络上的敏感信息。
根据安全公告“Antoine Delignat-Lavaud和Karthikeyan Bhargavan发现nginx错误地重复使用了缓存的SSL会话。攻击者可能利用此问题在特定的配置下可以从不同的虚拟主机获得信息“。
@@ -23,13 +22,14 @@ Ubuntu的开发者已经修复了nginx的一个小漏洞。他们解释nginx可
sudo apt-get dist-upgrade
在一般情况下,一个标准的系统更新将会进行必要的更改。要应用此修补程序您不必重新启动计算机。
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Canonical-Closes-Nginx-Exploit-in-Ubuntu-14-04-LTS-459677.shtml
作者:[Silviu Stahie][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@@ -1,15 +1,20 @@
Wal Commander 0.17 Github版发布了
文件管理器 Wal Commander Github 0.17版发布了
================================================================================
![](http://wcm.linderdaum.com/wp-content/uploads/2014/09/wc21.png)
> ### 描述 ###
>
> Wal Commander GitHub 版是一款多平台的开源文件管理器。适用于Windows、Linux、FreeBSD、和OSX。
> Wal Commander GitHub 版是一款多平台的开源文件管理器。适用于Windows、Linux、FreeBSD、和OSX。
>
> 这个从项目的目的是创建一个模仿Far管理器外观和感觉的便携式文件管理器。
The next stable version of our Wal Commander GitHub Edition 0.17 is out. Major features include command line autocomplete using the commands history; file associations to bind custom commands to different actions on files; and experimental support of OS X using XQuartz. A lot of new hotkeys were added in this release. Precompiled binaries are available for Windows x64. Linux, FreeBSD and OS X versions can be built directly from the [GitHub source code][1].
Wal Commander 的下一个Github稳定版本0.17 已经出来了。主要功能包括:使用命令历史自动补全;文件关联绑定自定义命令对文件的各种操作;和用XQuartz实验性地支持OS X。很多新的快捷键添加在此版本中。预编译二进制文件适用于Windows64、LinuxFreeBSD和OS X版本这些可以直接从[GitHub中的源代码][1]编译。
Wal Commander 的下一个Github稳定版本0.17 已经出来了。主要功能包括:
- 使用命令历史自动补全;
- 文件关联绑定自定义命令对文件的各种操作;
- 和用XQuartz实验性地支持OS X。
很多新的快捷键添加在此版本中。预编译二进制文件适用于Windows64、LinuxFreeBSD和OS X版本这些可以直接从[GitHub中的源代码][1]编译。
### 主要特性 ###
@@ -17,8 +22,9 @@ Wal Commander 的下一个Github稳定版本0.17 已经出来了。主要功能
- 文件关联 (主菜单 -> 命令 -> 文件关联)
- XQuartz上实验性地支持OS X ([https://github.com/corporateshark/WalCommander/issues/5][2])
### [下载][3] ###.
### 下载 ###
下载:[http://wcm.linderdaum.com/downloads/][3]
源代码: [https://github.com/corporateshark/WalCommander][4]
@@ -27,7 +33,7 @@ Wal Commander 的下一个Github稳定版本0.17 已经出来了。主要功能
via: http://wcm.linderdaum.com/release-0-17-0/
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@@ -0,0 +1,52 @@
Oracle Linux 5.11 Features Updated Unbreakable Linux Kernel
================================================================================
> A lot of packages have been updated in this release
![This is the last release for this branch](http://i1-news.softpedia-static.com/images/news2/Oracle-Linux-5-11-Features-Updated-Unbreakable-Linux-Kernel-460129-2.jpg)
This is the last release for this branch
> **Oracle has announced that Oracle Linux Release 5.11 has been made available for download, but this is the enterprise version, so users will have to register in order to get the download.**
The new Oracle Linux update is probably the last one in the series. This operating system is based on Red Hat and the company has just pushed out the last update for the RHEL 5x branch, which means that this is the end of the line for the Oracle version as well.
Oracle Linux also comes with a series of features that make it very interesting, like zero-downtime kernel updates with the help of a tool called Ksplice that was originally developed for OpenSUSE, inclusion of the Oracle Database and Oracle Applications, and it's used in all x86-based Oracle Engineered Systems.
### What's so special about Oracle Linux ###
Despite the fact that Oracle Linux is based on Red Hat, its developers have actually made a list of reasons why you shouldn't use RHEL. There are quite a lot of them, but the main one is that anyone can download Oracle Linux (after registering) and RHEL is actually off limits for non-paying members.
"Providing advanced scalability and reliability for enterprise applications and systems, Oracle Linux delivers extreme performance and is used in all x86-based Oracle Engineered Systems. Oracle Linux is free to use, free to distribute, free to update, and easy to download. It is the only Linux distribution with production support for zero-downtime kernel updates with Oracle Ksplice, allowing customers the ability to apply patches for security and other updates without a reboot, as well as providing diagnostic features for debugging kernel issues on production systems," say the developers on their website.
One of the most interesting features for Oracle Linux and unique for this distribution is its unbreakable kernel. This is the actual name used by the developers. It's based on an older Linux kernel from the 3.0.36 branch. Users also have access to a Red Hat-compatible Kernel (kernel-2.6.18-398.el5), which is provided by default in the distro.
Also, the Unbreakable Enterprise Kernel available in the Oracle Linux Release 5.11 features a ton of drivers for hardware and devices, but this latest update brought even better support.
You can check the comprehensive [release notes][1] for Oracle Linux 5.11, which will probably take you the rest of the day.
You can also download Oracle Linux 5.11:
- [Oracle Enterprise Linux 6.5 (ISO) 64-bit][2]
- [Oracle Enterprise Linux 6.5 (ISO) 32-bit][3]
- [Oracle Enterprise Linux 7.0 (ISO) 64-bit][4]
- [Oracle Enterprise Linux 5.11 (ISO) 64-bit][5]
- [Oracle Enterprise Linux 5.11 (ISO) 32-bit][6]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Oracle-Linux-5-11-Features-Updated-Unbreakable-Linux-Kernel-460129.shtml
作者:[Silviu Stahie][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://news.softpedia.com/editors/browse/silviu-stahie
[1]:https://oss.oracle.com/ol5/docs/RELEASE-NOTES-U11-en.html#Kernel_and_Driver_Updates
[2]:http://mirrors.dotsrc.org/oracle-linux/OL6/U5/i386/OracleLinux-R6-U5-Server-i386-dvd.iso
[3]:http://mirrors.dotsrc.org/oracle-linux/OL6/U5/x86_64/OracleLinux-R6-U5-Server-x86_64-dvd.iso
[4]:https://edelivery.oracle.com/linux/
[5]:http://ftp5.gwdg.de/pub/linux/oracle/EL5/U11/x86_64/Enterprise-R5-U11-Server-x86_64-dvd.iso
[6]:http://ftp5.gwdg.de/pub/linux/oracle/EL5/U11/i386/Enterprise-R5-U11-Server-i386-dvd.iso

View File

@@ -1,3 +1,4 @@
[bazz2 is here]
Whats wrong with IPv4 and Why we are moving to IPv6
================================================================================
For the past 10 years or so, this has been the year that IPv6 will become wide spread. It hasnt happened yet. Consequently, there is little widespread knowledge of what IPv6 is, how to use it, or why it is inevitable.
@@ -83,4 +84,4 @@ via: http://www.tecmint.com/ipv4-and-ipv6-comparison/
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/jeffsilverm/
[a]:http://www.tecmint.com/author/jeffsilverm/

View File

@@ -0,0 +1,64 @@
What is a good subtitle editor on Linux
================================================================================
If you watch foreign movies regularly, chances are you prefer having subtitles rather than the dub. Grown up in France, I know that most Disney movies during my childhood sounded weird because of the French dub. If now I have the chance to be able to watch them in their original version, I know that for a lot of people subtitles are still required. And I surprise myself sometimes making subtitles for my family. Hopefully for me, Linux is not devoid of fancy and open source subtitle editors. In short, this is the non-exhaustive list of open source subtitle editors for Linux. Share your opinion on what you think of the best subtitle editor.
### 1. Gnome Subtitles ###
![](https://farm6.staticflickr.com/5596/15323769611_59bc5fb4b7_z.jpg)
[Gnome Subtitles][2] is a bit my go to when it comes to quickly editing some existing subtitles. You can load the video, load the subtitle text files and instantly get going. I appreciate its balance between ease of use and advanced features. It comes with a synchronization tool as well as a spell check. Finally, last but not least, the shortcuts are what makes it good in the end: when you edit a lot of lines, you prefer to keep your hands on the keyboard, and use the built in shortcuts to move around.
### 2. Aegisub ###
![](https://farm3.staticflickr.com/2944/15323964121_59e9b26ba5_z.jpg)
[Aegisub][2] is already one level of complexity higher. Just the interface reflects a learning curve. But besides its intimidating aspect, Aegisub is very complete software, providing tools beyond anything I could have imagined before. Like Gnome Subtitles, Aegisub has a WYSIWYG approach, but to a whole new level: it is possible to drag and drop the subtitles on the screen, see the audio spectrum on the side, and do everything with shortcuts. In addition to that, it comes with a Kanji tool, a karaoke mode, and the possibility to import lua script to automate some tasks. I really invite you to go read the [manual page][3] before starting using it.
### 3. Gaupol ###
![](https://farm3.staticflickr.com/2942/15326817292_6702cc63fc_z.jpg)
At the other end of the complexity spectrum is [Gaupol][4]. Unlike Aegisub, Gaupol is quick to pick up and adopts an interface very close to Gnome Subtitles. But behind this relative simplicity, it comes with all the necessary tools: shortcuts, third party extension, spell checking, and even speech recognition (courtesy of [CMU Sphinx][5]). As a downside, however, I did notice some slow-downs while testing it, nothing too serious, but just enough to make me prefer Gnome Subtitles still.
### 4. Subtitle Editor ###
![](https://farm4.staticflickr.com/3914/15323911521_8e33126610_z.jpg)
[Subtitle Editor][6] is very close to Gaupol. However, the interface is a little bit less intuitive, and the features are slightly more advanced. I appreciate the possibility to define "key frames" and all the given synchronization options. However, maybe more icons and less text would enhance the interface. As a goodie, Subtitle Editor can simulate a "type writer" effect, while I am not sure if it is extremely useful. And last but not least, the possibility to redefine the shortcuts is always handy.
### 5. Jubler ###
![](https://farm4.staticflickr.com/3912/15323769701_3d94ca8884_z.jpg)
Written in Java, [Jubler][7] is a multi-platform subtitle editor. I was actually very impressed by its interface. I definitely see the Java-ish aspect of it, but it remains well conceived and clear. Like Aegisub, you can drag and drop the subtitles on the image, making the experience far more pleasant than just typing. It is also possible to define a style for subtitles, play sound from another track, translate the subtitles, or use the spell checker. However, be careful as you will need MPlayer installed and correctly configured beforehand if you want to use Jubler fully. Oh and I give it a special credit for its easy installation process after downloading the script from the [official page][8].
### 6. Subtitle Composer ###
![](https://farm6.staticflickr.com/5578/15323769711_6c6dfbe405_z.jpg)
Defined as a "KDE subtitle composer," [Subtitle Composer][9] comes with most of the traditional features evoked previously, but with the KDE interface that we expect. This comes naturally with the option to redefine the shortcuts, which is very dear to me. But beyond all of this, what differentiates Subtitle Composer from all the previously mentioned programs is its ability to follow scripts written in JavaScript, Python, and even Ruby. A few examples are packaged with the software, and will definitely help you pick up the syntax and the usefulness of such feature.
To conclude, whether you, like me, just edit a few subtitles for your family, re-synchronize the entire track, or write everything from scratch, Linux has the tools for you. For me in the end, the shortcuts and the ease-of-use make all the difference, but for any higher usage, scripting or speech recognition can become super handy.
Which subtitle editor do you use and why? Or is there another one that you prefer not mentioned here? Let us know in the comments.
--------------------------------------------------------------------------------
via: http://xmodulo.com/good-subtitle-editor-linux.html
作者:[Adrien Brochard][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/adrien
[1]:http://gnomesubtitles.org/
[2]:http://www.aegisub.org/
[3]:http://docs.aegisub.org/3.2/Main_Page/
[4]:http://home.gna.org/gaupol/
[5]:http://cmusphinx.sourceforge.net/
[6]:http://home.gna.org/subtitleeditor/
[7]:http://www.jubler.org/
[8]:http://www.jubler.org/download.html
[9]:http://sourceforge.net/projects/subcomposer/

View File

@@ -1,107 +0,0 @@
[bazz2 hehe]
How to use systemd for system administration on Debian
================================================================================
Soon enough, hardly any Linux user will be able to escape the ever growing grasp that systemd imposes on Linux, unless they manually opt out. systemd has created more technical, emotional, and social issues than any other piece of software as of late. This predominantly came to show in the [heated discussions][1] also dubbed as the 'Init Wars', that occupied parts of the Debian developer body for months. While the Debian Technical Comittee finally decided to include systemd in Debian 8 "Jessie", there were efforts to [supersede the decision][2] by a General Resolution, and even threats to the health of developers in favor of systemd.
This goes to show how deep systemd interferes with the way of handling Linux systems that has, in large parts, been passed down to us from the Unix days. Theorems like "one tool for the job" are overthrown by the new kid in town. Besides substituting sysvinit as init system, it digs deep into system administration. For right now a lot of the commands you are used to will keep on working due to the compatibility layer provided by the package systemd-sysv. That might change as soon as systemd 214 is uploaded to Debian, destined to be released in the stable branch with Debian 8 "Jessie". From thereon, users need to utilize the new commands that come with systemd for managing services, processes, switching run levels, and querying the logging system. A workaround is to set up aliases in .bashrc.
So let's have a look at how systemd will change your habits of administrating your computers and the pros and cons involved. Before making the switch to systemd, it is a good security measure to save the old sysvinit to be able to still boot, should systemd fail. This will only work as long as systemd-sysv is not yet installed, and can be easily obtained by running:
# cp -av /sbin/init /sbin/init.sysvinit
Thusly prepared, in case of emergency, just append:
init=/sbin/init.sysvinit
to the kernel boot-time parameters.
### Basic Usage of systemctl ###
systemctl is the command that substitutes the old "/etc/init.d/foo start/stop", but also does a lot more, as you can learn from its man page.
Some basic use-cases are:
- systemctl - list all loaded units and their state (where unit is the term for a job/service)
- systemctl list-units - list all units
- systemctl start [NAME...] - start (activate) one or more units
- systemctl stop [NAME...] - stop (deactivate) one or more units
- systemctl disable [NAME...] - disable one or more unit files
- systemctl list-unit-files - show all installed unit files and their state
- systemctl --failed - show which units failed during boot
- systemctl --type=mount - filter for types; types could be: service, mount, device, socket, target
- systemctl enable debug-shell.service - start a root shell on TTY 9 for debugging
For more convinience in handling units, there is the package systemd-ui, which is started as user with the command systemadm.
Switching runlevels, reboot and shutdown are also handled by systemctl:
- systemctl isolate graphical.target - take you to what you know as init 5, where your X-server runs
- systemctl isolate multi-user.target - take you to what you know as init 3, TTY, no X
- systemctl reboot - shut down and reboot the system
- systemctl poweroff - shut down the system
All these commands, other than the ones for switching runlevels, can be executed as normal user.
### Basic Usage of journalctl ###
systemd does not only boot machines faster than the old init system, it also starts logging much earlier, including messages from the kernel initialization phase, the initial RAM disk, the early boot logic, and the main system runtime. So the days where you needed to use a camera to provide the output of a kernel panic or otherwise stalled system for debugging are mostly over.
With systemd, logs are aggregated in the journal which resides in /var/log/. To be able to make full use of the journal, we first need to set it up, as Debian does not do that for you yet:
# addgroup --system systemd-journal
# mkdir -p /var/log/journal
# chown root:systemd-journal /var/log/journal
# gpasswd -a $user systemd-journal
That will set up the journal in a way where you can query it as normal user. Querying the journal with journalctl offers some advantages over the way syslog works:
- journalctl --all - show the full journal of the system and all its users
- journalctl -f - show a live view of the journal (equivalent to "tail -f /var/log/messages")
- journalctl -b - show the log since the last boot
- journalctl -k -b -1 - show all kernel logs from the boot before last (-b -1)
- journalctl -b -p err - shows the log of the last boot, limited to the priority "ERROR"
- journalctl --since=yesterday - since Linux people normally do not often reboot, this limits the size more than -b would
- journalctl -u cron.service --since='2014-07-06 07:00' --until='2014-07-06 08:23' - show the log for cron for a defined timeframe
- journalctl -p 2 --since=today - show the log for priority 2, which covers emerg, alert and crit; resembles syslog priorities emerg (0), alert (1), crit (2), err (3), warning (4), notice (5), info (6), debug (7)
- journalctl > yourlog.log - copy the binary journal as text into your current directory
Journal and syslog can work side-by-side. On the other hand, you can remove any syslog packages like rsyslog or syslog-ng once you are satisfied with the way the journal works.
For very detailed output, append "systemd.log_level=debug" to the kernel boot-time parameter list, and then run:
# journalctl -alb
Log levels can also be edited in /etc/systemd/system.conf.
### Analyzing the Boot Process with systemd ###
systemd allows you to effectively analyze and optimize your boot process:
- systemd-analyze - show how long the last boot took for kernel and userspace
- systemd-analyze blame - show details of how long each service took to start
- systemd-analyze critical-chain - print a tree of the time-critical chain of units
- systemd-analyze dot | dot -Tsvg > systemd.svg - put a vector graphic of your boot process (requires graphviz package)
- systemd-analyze plot > bootplot.svg - generate a graphical timechart of the boot process
![](https://farm6.staticflickr.com/5559/14607588994_38543638b3_z.jpg)
![](https://farm6.staticflickr.com/5565/14423020978_14b21402c8_z.jpg)
systemd has pretty good documentation for such a young project under heavy developement. First of all, there is the [0pointer series by Lennart Poettering][3]. The series is highly technical and quite verbose, and holds a wealth of information. Another good source is the distro agnostic [Freedesktop info page][4] with the largest collection of links to systemd resources, distro specific pages, bugtrackers and documentation. A quick glance at:
# man systemd.index
will give you an overview of all systemd man pages. The command structure for systemd for various distributions is pretty much the same, differences are found mainly in the packaging.
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/07/use-systemd-system-administration-debian.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://lists.debian.org/debian-devel/2013/10/msg00444.html
[2]:https://lists.debian.org/debian-devel/2014/02/msg00316.html
[3]:http://0pointer.de/blog/projects/systemd.html
[4]:http://www.freedesktop.org/wiki/Software/systemd/

View File

@@ -1,136 +0,0 @@
zpl1025
Build a Raspberry Pi Arcade Machine
================================================================================
**Relive the golden majesty of the 80s with a little help from a marvel of the current decade.**
### WHAT YOULL NEED ###
- Raspberry Pi w/4GB SD-CARD.
- HDMI LCD monitor.
- Games controller or…
- A JAMMA arcade cabinet.
- J-Pac or I-Pac.
The 1980s were memorable for many things; the end of the cold war, a carbonated drink called Quatro, the Korg Polysix synthesiser and the Commodore 64. But to a certain teenager, none of these were as potent, or as perhaps familiarly illicit, as the games arcade. Enveloped by cigarette smoke and a barrage of 8-bit sound effects, they were caverns you visited only on borrowed time: 50 pence and a portion of chips to see you through lunchtime while you honed your skills at Galaga, Rampage, Centipede, Asteroids, Ms Pacman, Phoenix, R-Rype, Donkey Kong, Rolling Thunder, Gauntlet, Street Fighter, Outrun, Defender… The list is endless.
These games, and the arcade machine form factor that held them, are just as compelling today as they were 30 years ago. And unlike the teenage version of yourself, you can now play many of them without needing a pocket full of change, finally giving you an edge over the rich kids and their endless Continues. Its time to build your own Linux-based arcade machine and beat that old high score.
Were going to cover all the steps required to turn a cheap shell of an arcade machine into a Linux-powered multi-platform retro games system. But that doesnt mean youve got to build the whole system at the same scale. You could, for example, forgo the large, heavy and potentially carcinogenic hulk of the cabinet itself and stuff the controlling innards into an old games console or an even smaller case. Or you could just as easily forgo the diminutive Raspberry Pi and replace the brains of your system with a much more capable Linux machine. This might make an ideal platform for SteamOS, for example, and for playing some of its excellent modern arcade games.
Over the next few pages well construct a Raspberry Pi-based arcade machine, but you should be able to see plenty of ideas for your own projects, even if they dont look just like ours. And because were building it on the staggeringly powerful MAME, youll be able to get it running on almost anything.
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade3.png)
We did this project before the model B+ came out. It should all work exactly the same on the newer board, and you should be able to get by without a powered USB Hub (click for larger).
### Disclaimer ###
One again were messing with electrical components that could cause you a shock. Make sure you get any modifications you make checked by a qualified electrician. We dont go into any details on how to obtain games, but there are legal sources such as old games releases and newer commercial titles based on the MAME emulator.
#### Step1: The Cabinet ####
The cabinet itself is the biggest challenge. We bought an old two-player Bubble Bobble machine from the early 90s from eBay. It cost £220 delivered in the back of an old estate car. The prices for cabinets like these can vary. Weve seen many for less than £100. At the other end of the scale, people pay thousands for machines with original decals on the side.
There are two major considerations when it comes to buying a cabinet. The first is the size: These things are big and heavy. They take up a lot of space and it takes at least two people to move them around. If youve got the money, you can buy DIY cabinets or new smaller form-factors, such as cabinets that fit on tables. And cocktail cabinets can be easier to fit, too.
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade4.jpg)
Cabinets can be cheap, but theyre heavy. Dont lift them on your own. Older ones may need some TLC, such as are-spray and some repair work(click for larger).
One of the best reasons for buying an original cabinet, apart from getting a much more authentic gaming experience, is being able to use the original controls. Many machines you can buy on eBay will be for two concurrent players, with two joysticks and a variety of buttons for each player, plus the player one and player two controls. For compatibility with the widest number of games, wed recommend finding a machine with six buttons for each player, which is a common configuration. You might also want to look into a panel with more than two players, or one with space for other input controllers, such as an arcade trackball (for games like Marble Madness), or a spinner (Arkanoid). These can be added without too much difficulty later, as modern USB devices exist.
Controls are the second, and wed say most important consideration, because its these that transfer your twitches and tweaks into game movement. What you need to consider for when buying a cabinet is something called JAMMA, an acronym for Japan Amusement Machinery Manufacturers. JAMMA is a standard in arcade machines that defines how the circuit board containing the game chips connects to the game controllers and the coin mechanism. Its an interface conduit for all the cables coming from the buttons and the joysticks, for two players, bringing them into a standard edge connector. The JAMMA part is the size and layout of this connector, as it means the buttons and controls will be connected to the same functions on whichever board you install so that the arcade owner would only have to change the cabinet artwork to bring in new players.
But first, a word of warning: the JAMMA connector also carries the 12V power supply, usually from a power unit installed in most arcade machines. We disconnecting the power supply completely to avoid damaging anything with a wayward short-circuit or dropped screwdriver. We dont use any of the power connectors in any further stage of the tutorial.
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade2.png)
#### Step 2: J-PAC ####
Whats brilliant is that you can buy a device that connects to the JAMMA connector inside your cabinet and a USB port on your computer, transforming all the buttons presses and keyboard movements into (configurable) keyboard commands that you can use from Linux to control any game you wish. This device is called the J-Pac ([www.ultimarc.com/jpac.html][1] approximately £54).
Its best feature isnt the connectivity; its the way it handles and converts the input signals, because its vastly superior to a standard USB joystick. Every input generates its own interrupt, and theres no limit to the number of simultaneous buttons and directions you can press or hold down. This is vital for games like Street Fighter, because they rely on chords of buttons being pressed simultaneously and quickly, but its also essential when delivering the killing blow to cheating players who sulk and hold down all their own buttons. Many other controllers, especially those that create keyboard inputs, are restricted by their USB keyboard controllers to six inputs and a variety of Alt, Shift and Ctrl hacks. The J-Pac can also be connected to a tilt sensor and even some coin mechanisms, and it works in Linux without any pre-configuration.
Another option is a similar device called an I-Pac. It does the same thing as the J-Pac, only without the JAMMA connector. That means you cant connect your JAMMA controls, but it does mean you can design your own controller layout and wire each control to the I-Pac yourself. This might be a little ambitious for a first project, but its a route that many arcade aficionados take, especially when they want to design a panel for four players, or one that incorporates many different kinds of controls. Our approach isnt necessarily one wed recommend, but we re-wired an old X-Arcade Tankstick control panel that suffered from input contention, replaced the joysticks and buttons with new units and connected it to a new JAMMA harness, which is an excellent way of buying all the cables you need plus the edge connector for a low price (£8).
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade5.jpg)
Our J-Pac in situ. The blue and red wires on the right connect to the extra 1- and 2-player buttons on our cabinet (click for larger).
Whether you choose an I-Pac or a J-Pac, all the keys generated by both devices are the default values for MAME. That means you wont have to make any manual input changes when you start to run the emulator. Player 1, for example, creates cursor up, down, left and right as well as left Ctrl, left ALT, Space and left Shift for fire buttons 14. But the really useful feature, for us, is the two-button shortcuts. While holding down the player 1 button, you can generate the P key to pause the game by pulling down on the player 1 joystick, adjust the volume by pressing up and enter MAMEs own configuration menu by pushing right. These escape codes are cleverly engineered to not get in the way of playing games, as theyre only activated when holding down the Player 1 button, and they enable you to do almost anything you need to from within a running game. You can completely reconfigure MAME, for example, using its own menus, and change input assignments and sensitivity while playing the game itself.
Finally, holding down Player 1 and then pressing Player 2 will quit MAME, which is useful if youre using a launch menu or MAME manager, as these manage launching games automatically, and let you get on with playing another game as quickly as possible.
We took a rather cowardly route with the screen, removing the original, bulky and broken CRT that came with the cabinet and replacing it with a low-cost LCD monitor. This approach has many advantages. First, the screen has HDMI, so it will interface with a Raspberry Pi or a modern graphics card without any difficulty. Second, you dont have to configure the low-frequency update modes required to drive an arcade machines screen, nor do you need the specific graphics hardware that drives it. And third, this is the safest option because an arcade machines screen is often unprotected from the rear of a case, leaving very high voltages inches away from your hands. Thats not to say you shouldnt use a CRT if thats the experience youre after its the most authentic way to get the gaming experience youre after, but weve fined-tuned the CRT emulation enough in software that were happy with the output, and were definitely happier not to be using an ageing CRT.
You might also want to look into using an older LCD with a 4:3 aspect ratio, rather than the widescreen modern options, because 4:3 is more practical for playing both vertical and horizontal games. A vertical shooter such as Raiden, for example, will have black bars on either side of the gaming area if you use a widescreen monitor. Those black bars can be used to display the game instructions, or you could rotate the screen 90 degrees so that every pixel is used, but this is impractical unless youre only going to play vertical games or have easy access to a rotating mount.
Mounting a screen is also important. If youve removed a CRT, theres nowhere for an LCD to go. Our solution was to buy some MDF cut to fit the space where the CRT was. This was then screwed into position and we fitted a cheap VESA mounting plate into the centre of the new MDF. VESA mounts can be used by the vast majority of screens, big and small. Finally, because our cabinet was fronted with smoked glass, we had to be sure both the brightness and contrast were set high enough.
### Step 3: Installation ###
With the large hardware choices now made, and presumably the cabinet close to where you finally want to install it, putting the physical pieces together isnt that difficult. We safely split the power input from the rear of the cabinet and wired a multiple socket into the space at the back. We did this to the cable after it connects to the power switch.
Nearly all arcade cabinets have a power switch on the top-right surface, but theres usually plenty of cable to splice into this at a lower point in the cabinet, and it meant we could use normal power connectors for our equipment. Our cabinet has a fluorescent tube, used to backlight the top marquee on the machine, connected directly to the power, and we were able to keep this connected by attaching a regular plug. When you turn the power on from the cabinet switch, power flows to the components inside the case your Raspberry Pi and screen will come on, and all will be well with the world.
The J-Pac slides straight into the JAMMA interface, but you may also have to do a little manual wiring. The JAMMA standard only supports up to three buttons for each player (although many unofficially support four), while the J-Pac can handle up to six buttons. To get those extra buttons connected, you need to connect one side of the buttons switch to GND fed from the J-Pac with the other side of the switch going into one of the screw-mounted inputs in the side of the J-Pac. These are labelled 1SW4, 1SW5, 1SW6, 2SW4, 2SW5 and 2SW6. The J-Pac also includes passthrough connections for audio, but weve found this to be incredibly noisy. Instead, we wired the speaker in our cabinet to an old SoundBlaster amplifier and connected this to the audio outputs on the Raspberry Pi. You dont want audio to be pristine, but you do want it to be loud enough.
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade6.jpg)
Our Raspberry Pi is now connected to the J-Pac on the left and both the screen and the USB hub (click for larger).
The J-Pac or I-Pac then connects to your PC or Raspberry Pi using a PS2-to-USB cable, which should also be used to connect to a PS2 port on your PC directly. There is an additional option to use an old PS2 connector, if your PC is old enough to have one, but we found in testing that the USB performance is identical. This wont apply to the PS2-less Raspberry Pi, of course, and dont forget that the Pi will also need powering. We always recommend doing so from a compatible powered hub, as a lack of power is the most common source of Raspberry Pi errors. Youll also need to get networking to your Raspberry Pi, either through the Ethernet port (perhaps using a powerline adaptor hidden in the cabinet), or by using a wireless USB device. Networking is essential because it enables you to reconfigure your PI while its tucked away within the cabinet, and it also enables you to change settings and perform administration tasks without having to connect a keyboard or mouse.
> ### Coin Mechanism ###
> In the emulation community, getting your coin mechanism to work with your emulator was often considered a step too close to commercial production. It meant you could potential charge people to use your machine. Not only would this be wrong, but considering the provenance of many of the games you run on your own arcade machine, it could also be illegal. And its definitely against the spirit of emulation. However, we and many other devotees thinking that a working coin mechanism is another step closer to the realism of an arcade machine, and is worth the effort in recreating the nostalgia of an old arcade. Theres nothing like dropping a 10p piece into the coin tray and to hear the sound of the credits being added to the machine.
> Its not actually that difficult. It depends on the coin mechanism in your arcade machine and how it sends a signal to say how many credits had been inserted. Most coin mechanisms come in two parts. The large part is the coin acceptor/validator. This is the physical side of the process that detects whether a coin is authentic, and determines its value. It does this with the help of a credit/logic board, usually attached via a ribbon cable and featuring lots of DIP switches. These switches are used to change which coins are accepted and how many credits they generate. Its then usually as simple as finding the output switch, which is triggered with a credit, and connecting this to the coin input on your JAMMA connector, or directly onto the J-Pac. Our coin mechanism is a Mars MS111, common in the UK in the early 90s, and theres plenty of information online about what each of the DIP switches do, as well as how to programme the controller for newer coins. We were also able to wire the 12V connector from the mechanism to a small light for behind the coin entry slot.
#### Step 4: Software ####
MAME is the only viable emulator for a project of this scale, and it now supports many thousands of different games running on countless different platforms, from the first arcade machines through to some more recent ones. Its a project that has also spawned MESS, the multi-emulator super system, which targets platforms such as home computers and consoles from the 80s and 90s.
Configuring MAME could take a six-page article in itself. Its a complex, sprawling, magnificent piece of software that emulates so many CPUs, so many sound devices, chips, controllers with so many options, that like MythTV, you never really stop configuring it.
But theres an easier option, and one thats purpose-built for the Raspberry Pi. Its called PiMAME. This is both a distribution download and a script you can run on top of Raspbian, the Pis default distribution. Not only does it install MAME on your Raspberry Pi (which is useful because its not part of any of the default repositories), it also installs a selection of other emulators along with front-ends to manage them. MAME, for example, is a command-line utility with dozens of options. But PiMAME has another clever trick up its sleeve it installs a simple web server that enables you to install new games through a browser connected to your network. This is a great advantage, because getting games into the correct folders is one of the trials of dealing with MAME, and it also enables you to make best use of whatever storage youve got connected to your Pi. Plus, PiMAME will update itself from the same script you use to install it, so keeping on top of updates couldnt be easier. This could be especially useful at the moment, as at the time of writing the project was on the cusp of a major upgrade in the form of the 0.8 release. We found it slightly unstable in early March, but were sure everything will be sorted by the time you read this.
The best way to install PiMAME is to install Raspbian first. You can do this either through NOOBS, using a graphical tool from your desktop, or by using the dd command to copy the contents of the Raspbian image directly onto your SD card. As we mentioned in last months BrewPi tutorial, this process has been documented many times before, so we wont waste the space here. Just install NOOBS if you want the easy option, following the instructions on the Raspberry Pi site. With Raspbian installed and running, make sure you use the configuration tool to free the space on your SD card, and that the system is up to date (sudo apt-get update; sudo apt-get upgrade). You then need to make sure youve got the git package already installed. Any recent version of Raspbian will have installed git already, but you can check by typing sudo apt-get install git just to check.
You then have to type the following command to clone the PiMAME installer from the projects GitHub repository:
git clone https://github.com/ssilverm/pimame_installer
After that, you should get the following feedback if the command works:
Cloning into pimame_installer...
remote: Reusing existing pack: 2306, done.
remote: Total 2306 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2306/2306), 4.61 MiB | 11 KiB/s, done.
Resolving deltas: 100% (823/823), done.
This command will create a new folder called pimame_installer, and the next step is to switch into this and run the script it contains:
cd pimame_installer/
sudo ./install.sh
This command installs and configures a lot of software. The length of time it takes will depend on your internet connection, as a lot of extra packages are downloaded. Our humble Pi with a 15Mb internet connection took around 45 minutes to complete the script, after which youre invited to restart the machine. You can do this safely by typing sudo shutdown -r now, as this command will automatically handle any remaining write operations to the SD card.
And thats all there is to the installation. After rebooting your Pi, you will be automatically logged in and the PiMAME launch menu will appear. Its a great-looking interface in version 0.8, with photos of each of the platforms supported, plus small red icons to indicate how many games youve got installed.This should now be navigable through your controller. If you want to make sure the controller is correctly detected, use SSH to connect to your Pi and check for the existence of **/dev/input/by-id/usb-Ultimarc_I-PAC_Ultimarc_I-PAC-event-kbd**.
The default keyboard controls will enable you to select what kind of emulator you want to run on your arcade machine. The option were most interested in is the first, labelled AdvMAME, but you might also be surprised to see another MAME on offer, MAME4ALL. MAME4ALL is built specifically for the Raspberry Pi, and takes an old version of the MAME source code so that the performance of the ROMS that it does support is optimal. This makes a lot of sense, because theres no way your Pi is going to be able to play anything too demanding, so theres no reason to belabour the emulator with unneeded compatibility. All thats left to do now is get some games onto your system (see the boxout below), and have fun!
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade1.png)
--------------------------------------------------------------------------------
via: http://www.linuxvoice.com/arcade-machine/
作者:[Ben Everard][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.linuxvoice.com/author/ben_everard/
[1]:http://www.ultimarc.com/jpac.html

View File

@@ -1,53 +0,0 @@
[su-kaiyao]翻译中
How To Reset Root Password On CentOS 7
================================================================================
The way to reset the root password on centos7 is totally different to Centos 6. Let me show you how to reset root password in CentOS 7.
1 In the boot grub menu select option to edit.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/09/Selection_003.png)
2 Select Option to edit (e).
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/09/Selection_005.png)
3 Go to the line of Linux 16 and change ro with rw init=/sysroot/bin/sh.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/09/Selection_006.png)
4 Now press Control+x to start on single user mode.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/09/Selection_007.png)
5 Now access the system with this command.
chroot /sysroot
6 Reset the password.
passwd root
7 Update selinux information
touch /.autorelabel
8 Exit chroot
exit
9 Reboot your system
reboot
Thats it. Enjoy.
--------------------------------------------------------------------------------
via: http://www.unixmen.com/reset-root-password-centos-7/
作者M.el Khamlichi
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@@ -0,0 +1,112 @@
Translating by johnhoow...
How to Use Systemd Timers
================================================================================
I was setting up some scripts to run backups recently, and decided I would try to set them up to use [systemd timers][1] rather than the more familiar to me [cron jobs][2].
As I went about trying to set them up, I had the hardest time, since it seems like the required information is spread around in various places. I wanted to record what I did so firstly, I can remember, but also so that others dont have to go searching as far and wide as I did.
There are additional options associated with the each step I mention below, but this is the bare minimum to get started. Look at the man pages for **systemd.service**, **systemd.timer**, and **systemd.target** for all that you can do with them.
### Running a Single Script ###
Lets say you have a script **/usr/local/bin/myscript** that you want to run every hour.
#### Service File ####
First, create a service file, and put it wherever it goes on your Linux distribution (on Arch, it is either **/etc/systemd/system/** or **/usr/lib/systemd/system**).
myscript.service
[Unit]
Description=MyScript
[Service]
Type=simple
ExecStart=/usr/local/bin/myscript
Note that it is important to set the **Type** variable to be “simple”, not “oneshot”. Using “oneshot” makes it so that the script will be run the first time, and then systemd thinks that you dont want to run it again, and will turn off the timer we make next.
#### Timer File ####
Next, create a timer file, and put it also in the same directory as the service file above.
myscript.timer
[Unit]
Description=Runs myscript every hour
[Timer]
# Time to wait after booting before we run first time
OnBootSec=10min
# Time between running each consecutive time
OnUnitActiveSec=1h
Unit=myscript.service
[Install]
WantedBy=multi-user.target
#### Enable / Start ####
Rather than starting / enabling the service file, you use the timer.
# Start timer, as root
systemctl start myscript.timer
# Enable timer to start at boot
systemctl enable myscript.timer
### Running Multiple Scripts on the Same Timer ###
Now lets say there a bunch of scripts you want to run all at the same time. In this case, you will want make a couple changes on the above formula.
#### Service Files ####
Create the service files to run your scripts as I [showed previously][3], but include the following section at the end of each service file.
[Install]
WantedBy=mytimer.target
If there is any ordering dependency in your service files, be sure you specify it with the **After=something.service** and/or **Before=whatever.service** parameters within the **Description** section.
Alternatively (and perhaps more simply), create a wrapper script that runs the appropriate commands in the correct order, and use the wrapper in your service file.
#### Timer File ####
You only need a single timer file. Create **mytimer.timer**, as I [outlined above][4].
#### Target File ####
You can create the target that all these scripts depend upon.
mytimer.target
[Unit]
Description=Mytimer
# Lots more stuff could go here, but it's situational.
# Look at systemd.unit man page.
#### Enable / Start ####
You need to enable each of the service files, as well as the timer.
systemctl enable script1.service
systemctl enable script2.service
...
systemctl enable mytimer.timer
systemctl start mytimer.service
Good luck.
--------------------------------------------------------------------------------
via: http://jason.the-graham.com/2013/03/06/how-to-use-systemd-timers/#enable--start-1
作者Jason Graham
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://fedoraproject.org/wiki/User:Johannbg/QA/Systemd/Systemd.timer
[2]:https://en.wikipedia.org/wiki/Cron
[3]:http://jason.the-graham.com/2013/03/06/how-to-use-systemd-timers/#service-file
[4]:http://jason.the-graham.com/2013/03/06/how-to-use-systemd-timers/#timer-file-1

View File

@@ -0,0 +1,223 @@
How to turn your CentOS box into an OSPF router using Quagga
================================================================================
[Quagga][1] is an open source routing software suite that can be used to turn your Linux box into a fully-fledged router that supports major routing protocols like RIP, OSPF, BGP or ISIS router. It has full provisions for IPv4 and IPv6, and supports route/prefix filtering. Quagga can be a life saver in case your production router is down, and you don't have a spare one at your disposal, so are waiting for a replacement. With proper configurations, Quagga can even be provisioned as a production router.
In this tutorial, we will connect two hypothetical branch office networks (e.g., 192.168.1.0/24 and 172.17.1.0/24) that have a dedicated link between them.
![](https://farm4.staticflickr.com/3861/15172727969_13cb7f037f_b.jpg)
Our CentOS boxes are located at both ends of the dedicated link. The hostnames of the two boxes are set as 'site-A-RTR' and 'site-B-RTR' respectively. IP address details are provided below.
- **Site-A**: 192.168.1.0/24
- **Site-B**: 172.16.1.0/24
- **Peering between 2 Linux boxes**: 10.10.10.0/30
The Quagga package consists of several daemons that work together. In this tutorial, we will focus on setting up the following daemons.
1. **Zebra**: a core daemon, responsible for kernel interfaces and static routes.
1. **Ospfd**: an IPv4 OSPF daemon.
### Install Quagga on CentOS ###
We start the process by installing Quagga using yum.
# yum install quagga
On CentOS 7, SELinux prevents /usr/sbin/zebra from writing to its configuration directory by default. This SELinux policy interferes with the setup procedure we are going to describe, so we want to disable this policy. For that, either [turn off SELinux][2] (which is not recommended), or enable the 'zebra_write_config' boolean as follows. Skip this step if you are using CentOS 6.
# setsebool -P zebra_write_config 1
Without this change, we will see the following error when attempting to save Zebra configuration from inside Quagga's command shell.
Can't open configuration file /etc/quagga/zebra.conf.OS1Uu5.
After Quagga is installed, we configure necessary peering IP addresses, and update OSPF settings. Quagga comes with a command line shell called vtysh. The Quagga commands used inside vtysh are similar to those of major router vendors such as Cisco or Juniper.
### Phase 1: Configuring Zebra ###
We start by creating a Zebra configuration file, and launching Zebra daemon.
# cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf
# service zebra start
# chkconfig zebra on
Launch vtysh command shell:
# vtysh
First, we configure the log file for Zebra. For that, enter the global configuration mode in vtysh by typing:
site-A-RTR# configure terminal
and specify log file location, then exit the mode:
site-A-RTR(config)# log file /var/log/quagga/quagga.log
site-A-RTR(config)# exit
Save configuration permanently:
site-A-RTR# write
Next, we identify available interfaces and configure their IP addresses as necessary.
site-A-RTR# show interface
----------
Interface eth0 is up, line protocol detection is disabled
. . . . .
Interface eth1 is up, line protocol detection is disabled
. . . . .
Configure eth0 parameters:
site-A-RTR# configure terminal
site-A-RTR(config)# interface eth0
site-A-RTR(config-if)# ip address 10.10.10.1/30
site-A-RTR(config-if)# description to-site-B
site-A-RTR(config-if)# no shutdown
Go ahead and configure eth1 parameters:
site-A-RTR(config)# interface eth1
site-A-RTR(config-if)# ip address 192.168.1.1/24
site-A-RTR(config-if)# description to-site-A-LAN
site-A-RTR(config-if)# no shutdown
Now verify configuration:
site-A-RTR(config-if)# do show interface
----------
Interface eth0 is up, line protocol detection is disabled
. . . . .
inet 10.10.10.1/30 broadcast 10.10.10.3
. . . . .
Interface eth1 is up, line protocol detection is disabled
. . . . .
inet 192.168.1.1/24 broadcast 192.168.1.255
. . . . .
----------
site-A-RTR(config-if)# do show interface description
----------
Interface Status Protocol Description
eth0 up unknown to-site-B
eth1 up unknown to-site-A-LAN
Save configuration permanently:
site-A-RTR(config-if)# do write
Repeat the IP address configuration step on site-B server as well.
If all goes well, you should be able to ping site-B's peering IP 10.10.10.2 from site-A server.
Note that once Zebra daemon has started, any change made with vtysh's command line interface takes effect immediately. There is no need to restart Zebra daemon after configuration change.
### Phase 2: Configuring OSPF ###
We start by creating an OSPF configuration file, and starting the OSPF daemon:
# cp /usr/share/doc/quagga-XXXXX/ospfd.conf.sample /etc/quagga/ospfd.conf
# service ospfd start
# chkconfig ospfd on
Now launch vtysh shell to continue with OSPF configuration:
# vtysh
Enter router configuration mode:
site-A-RTR# configure terminal
site-A-RTR(config)# router ospf
Optionally, set the router-id manually:
site-A-RTR(config-router)# router-id 10.10.10.1
Add the networks that will participate in OSPF:
site-A-RTR(config-router)# network 10.10.10.0/30 area 0
site-A-RTR(config-router)# network 192.168.1.0/24 area 0
Save configuration permanently:
site-A-RTR(config-router)# do write
Repeat the similar OSPF configuration on site-B as well:
site-B-RTR(config-router)# network 10.10.10.0/30 area 0
site-B-RTR(config-router)# network 172.16.1.0/24 area 0
site-B-RTR(config-router)# do write
The OSPF neighbors should come up now. As long as ospfd is running, any OSPF related configuration change made via vtysh shell takes effect immediately without having to restart ospfd.
In the next section, we are going to verify our Quagga setup.
### Verification ###
#### 1. Test with ping ####
To begin with, you should be able to ping the LAN subnet of site-B from site-A. Make sure that your firewall does not block ping traffic.
[root@site-A-RTR ~]# ping 172.16.1.1 -c 2
#### 2. Check routing tables ####
Necessary routes should be present in both kernel and Quagga routing tables.
[root@site-A-RTR ~]# ip route
----------
10.10.10.0/30 dev eth0 proto kernel scope link src 10.10.10.1
172.16.1.0/30 via 10.10.10.2 dev eth0 proto zebra metric 20
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.1
----------
[root@site-A-RTR ~]# vtysh
site-A-RTR# show ip route
----------
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
O 10.10.10.0/30 [110/10] is directly connected, eth0, 00:14:29
C>* 10.10.10.0/30 is directly connected, eth0
C>* 127.0.0.0/8 is directly connected, lo
O>* 172.16.1.0/30 [110/20] via 10.10.10.2, eth0, 00:14:14
C>* 192.168.1.0/24 is directly connected, eth1
#### 3. Verifying OSPF neighbors and routes ####
Inside vtysh shell, you can check if necessary neighbors are up, and proper routes are being learnt.
[root@site-A-RTR ~]# vtysh
site-A-RTR# show ip ospf neighbor
![](https://farm3.staticflickr.com/2943/15160942468_d348241bd5_z.jpg)
In this tutorial, we focused on configuring basic OSPF using Quagga. In general, Quagga allows us to easily configure a regular Linux box to speak dynamic routing protocols such as OSPF, RIP or BGP. Quagga-enabled boxes will be able to communicate and exchange routes with any other router that you may have in your network. Since it supports major open standard routing protocols, it may be a preferred choice in many scenarios. Better yet, Quagga's command line interface is almost identical to that of major router vendors like Cisco or Juniper, which makes deploying and maintaining Quagga boxes very easy.
Hope this helps.
--------------------------------------------------------------------------------
via: http://xmodulo.com/turn-centos-box-into-ospf-router-quagga.html
作者:[Sarmed Rahman][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/sarmed
[1]:http://www.nongnu.org/quagga/
[2]:http://xmodulo.com/how-to-disable-selinux.html

View File

@@ -0,0 +1,117 @@
zpl1025
How to use xargs command in Linux
================================================================================
Have you ever been in the situation where you are running the same command over and over again for multiple files? If so, you know how tedious and inefficient this can feel. The good news is that there is an easier way, made possible through the xargs command in Unix-based operating systems. With this command you can process multiple files efficiently, saving you time and energy. In this tutorial, you will learn how to execute a command or script for multiple files at once, avoiding the daunting task of processing numerous log files or data files individually.
There are two ingredients for the xargs command. First, you must specify the files of interest. Second, you must indicate which command or script will be executed for each of the files you specified.
This tutorial will cover three scenarios in which the xargs command can be used to process files located within several different directories:
1. Count the number of lines in all files
1. Print the first line of specific files
1. Process each file using a custom script
Consider the following directory named xargstest (the directory tree can be displayed using the tree command with the combined -i and -f options, which print the results without indentation and with the full path prefix for each file):
$ tree -if xargstest/
![](https://farm3.staticflickr.com/2942/15334985981_ce1a192def.jpg)
The contents of each of the six files are as follows:
![](https://farm4.staticflickr.com/3882/15346287662_a3084a8e4f_o.png)
The **xargstest** directory, its subdirectories and files will be used in the following examples.
### Scenario 1: Count the number of lines in all files ###
As mentioned earlier, the first ingredient for the xargs command is a list of files for which the command or script will be run. We can use the find command to identify and list the files that we are interested in. The **-name 'file??'** option specifies that only files with names beginning with "file" followed by any two characters will be matched within the xargstest directory. This search is recursive by default, which means that the find command will search for matching files within xargstest and all of its sub-directories.
$ find xargstest/ -name 'file??'
----------
xargstest/dir3/file3B
xargstest/dir3/file3A
xargstest/dir1/file1A
xargstest/dir1/file1B
xargstest/dir2/file2B
xargstest/dir2/file2A
We can pipe the results to the sort command to order the filenames sequentially:
$ find xargstest/ -name 'file??' | sort
----------
xargstest/dir1/file1A
xargstest/dir1/file1B
xargstest/dir2/file2A
xargstest/dir2/file2B
xargstest/dir3/file3A
xargstest/dir3/file3B
We now need the second ingredient, which is the command to execute. We use the wc command with the -l option to count the number of newlines in each file (printed at the beginning of each output line):
$ find xargstest/ -name 'file??' | sort | xargs wc -l
----------
1 xargstest/dir1/file1A
2 xargstest/dir1/file1B
3 xargstest/dir2/file2A
4 xargstest/dir2/file2B
5 xargstest/dir3/file3A
6 xargstest/dir3/file3B
21 total
You'll see that instead of manually running the wc -l command for each of these files, the xargs command allows you to complete this operation in a single step. Tasks that may have previously seemed unmanageable, such as processing hundreds of files individually, can now be performed quite easily.
### Scenario 2: Print the first line of specific files ###
Now that you know the basics of how to use the xargs command, you have the freedom to choose which command you want to execute. Sometimes, you may want to run commands for only a subset of files and ignore others. In this case, you can use the find command with the -name option and the ? globbing character (matches any single character) to select specific files to pipe into the xargs command. For example, if you want to print the first line of all files that end with a "B" character and ignore the files that end with an "A" character, use the following combination of the find, xargs, and head commands (head -n1 will print the first line in a file):
$ find xargstest/ -name 'file?B' | sort | xargs head -n1
----------
==> xargstest/dir1/file1B <==
one
==> xargstest/dir2/file2B <==
one
==> xargstest/dir3/file3B <==
one
You'll see that only the files with names that end with a "B" character were processed, and all files that end with an "A" character were ignored.
### Scenario 3: Process each file using a custom script ###
Finally, you may want to run a custom script (in Bash, Python, or Perl for example) for the files. To do this, simply substitute the name of your custom script in place of the wc and head commands shown previously:
$ find xargstest/ -name 'file??' | xargs myscript.sh
The custom script **myscript.sh** needs to be written to take a file name as an argument and process the file. The above command will then invoke the script for every file found by find command.
Note that the above examples include file names that do not contain spaces. Generally speaking, life in a Linux environment is much more pleasant when using file names without spaces. If you do need to handle file names with spaces, the above commands will not work, and should be tweaked to accommodate them. This is accomplished with the -print0 option for find command (which prints the full file name to stdout, followed by a null character), and -0 option for xargs command (which interprets a null character as the end of a string), as shown below:
$ find xargstest/ -name 'file*' -print0 | xargs -0 myscript.sh
Note that the argument for the -name option has been changed to 'file*', which means any files with names beginning with "file" and trailed by any number of characters will be matched.
### Summary ###
After reading this tutorial you will understand the capabilities of the xargs command and how you can implement this into your workflow. Soon you'll be spending more time enjoying the efficiency offered by this command, and less time doing repetitive tasks. For more details and additional options you can read the xargs documentation by entering the 'man xargs' command in your terminal.
--------------------------------------------------------------------------------
via: http://xmodulo.com/xargs-command-linux.html
作者:[Joshua Reed][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/joshua

View File

@@ -1,6 +1,6 @@
优化 GitHub 服务器上的 MySQL 数据库性能
================================================================================
> 在 GitHub 我们总是说“如果网站响应速度不够快,说明我们的工作没完成”。我们之前在[前端的体验速度][1]这篇文章中介绍了一些提高网站响应速率的方法,但这只是故事的一部分。真正影响到 GitHub.com 性能的因素是 MySQL 数据库架构。让我们来瞧瞧我们的基础架构团队是如何无缝升级了 MySQL 架构吧这事儿发生在去年8月份成果就是大大提高了 GitHub 网站的速度。
> 在 GitHub 我们总是说“如果网站响应速度不够快,我们就不应该让它上线运营”。我们之前在[前端的体验速度][1]这篇文章中介绍了一些提高网站响应速率的方法,但这只是故事的一部分。真正影响到 GitHub.com 性能的因素是 MySQL 数据库架构。让我们来瞧瞧我们的基础架构团队是如何无缝升级了 MySQL 架构吧这事儿发生在去年8月份成果就是大大提高了 GitHub 网站的速度。
### 任务 ###

View File

@@ -6,13 +6,13 @@
<blockquote><em>通过入会声明,任何人都能轻易加入“匿名者”组织。某人类学家称,组织成员会“根据影响程度对重大事件保持着不同关注,特别是那些能挑起强烈争端的事件”。</em></blockquote>
<small>布景Jeff Nishinaka / 摄影Scott Dunbar</small>
<small>纸雕作品Jeff Nishinaka / 摄影Scott Dunbar</small>
<h2>1</h2>
<p>上世纪七十年代中期,当 Christopher Doyon 还是一个生活在缅因州乡村的孩童时,就终日泡在 CB radio 上与各种陌生人聊天。他的昵称是“大红因为他有一头红色的头发。Christopher Doyon 把发射机挂在了卧室的墙壁上并且说服了父亲在自家屋顶安装了两根天线。CB radio 主要用于卡车司机间的联络,但 Doyon 和一些人却将之用于不久后出现在 Internet 上的虚拟社交——自定义昵称、成员间才懂的笑话,以及施行变革的强烈愿望。</p>
<p>上世纪七十年代中期,当 Christopher Doyon 还是一个生活在缅因州乡村的孩童时,就终日泡在 CB radio 上与各种陌生人聊天。他的昵称是“Big red”(大红)因为他有一头红色的头发。Christopher Doyon 把发射机挂在了卧室的墙壁上并且说服了父亲在自家屋顶安装了两根天线。CB radio 主要用于卡车司机间的联络,但 Doyon 和一些人却将之用于不久后出现在 Internet 上的虚拟社交——自定义昵称、成员间才懂的笑话,以及施行变革的强烈愿望。</p>
<p>Doyon 很小的时候母亲就去世了,兄妹二人由父亲抚养长大,他俩都说受到过父亲的虐待。由此 Doyon 在 CB radio 社区中找到了慰藉和归属感。他和他的朋友们轮流监听当地紧急事件频道。其中一个朋友的父亲买了一个气泡灯并安装在了他的车顶上;每当这个孩子收听到来自孤立无援的乘车人的求助后,都会开车载着所有人到求助者所在的公路旁。除了拨打 911 外他们基本没有什么可做的,但这足以让他们感觉自己成为了英雄。</p>
<p>Doyon 很小的时候母亲就去世了,兄妹二人由父亲抚养长大,他俩都说受到过父亲的虐待。由此 Doyon 在 CB radio 社区中找到了慰藉和目标感。他和他的朋友们轮流监听当地紧急事件频道。其中一个朋友的父亲买了一个气泡灯并安装在了他的车顶上;每当这个孩子收听到来自孤立无援的乘车人的求助后,都会开车载着所有人到求助者所在的公路旁。除了拨打 911 外他们基本没有什么可做的,但这足以让他们感觉自己成为了英雄。</p>
<p>短小精悍的 Doyon 有着一口浓厚的新英格兰口音,并且非常喜欢《星际迷航》和阿西莫夫的小说。当他在《大众机械》上看到一则“组装你的专属个人计算机”构件广告时,就央求祖父给他买一套,接下来 Doyon 花了数月的时间把计算机组装起来并连接到 Internet 上去。与鲜为人知的 CB 电波相比,在线聊天室确实不可同日而语。“我只需要点一下按钮,再选中某个家伙的名字,然后我就可以和他聊天了,” Doyon 在最近回忆时说道,“这真的很惊人。”</p>
@@ -22,11 +22,11 @@
<p>Doyon 深深地沉溺于计算机中,虽然他并不是一位专业的程序员。在过去一年的几次谈话中,他告诉我他将自己视为激进主义分子,继承了 Abbie Hoffman 和 Eldridge Cleaver 的激进传统技术不过是他抗议的工具。八十年代哈佛大学和麻省理工学院的学生们举行集会强烈抗议他们的学校从南非撤资。为了帮助抗议者通过安全渠道进行交流PLF 制作了无线电套装移动调频发射器、伸缩式天线还有麦克风所有部件都内置于背包内。Willard Johnson麻省理工学院的一位激进分子和政治学家表示黑客们出席集会并不意味着一次变革。“我们的大部分工作仍然是通过扩音器来完成的”他解释道。</p>
<p>1992 年,在 Grateful Dead 的一场印第安纳的演唱会上Doyon 秘密地向一位瘾君子出售了 300 粒药。由此他被判决在印第安纳州立监狱服役十二年,后来改为五年。服役期间,他对宗教和哲学产生了浓厚的兴趣,并于鲍尔州立大学学习了相应课程。</p>
<p>1992 年,在印第安纳的一场 Grateful Dead 的演唱会上Doyon 秘密地向一位瘾君子出售了 300 粒药。由此他被判决在印第安纳州立监狱服役十二年,后来改为五年。服役期间,他对宗教和哲学产生了浓厚的兴趣,并于鲍尔州立大学学习了相应课程。</p>
<p>1994 年,第一款商业 Web 浏览器网景领航员正式发布,同一年 Doyon 被捕入狱。当他出狱并再次回到剑桥后PLF 依然活跃着并且他们的工具有了实质性的飞跃。Doyon 回忆起他入狱之前的变化“非常巨大——好比是烽火狼烟电报传信之间那么大的差距。”黑客们入侵了一个印度的军事网站并修改其首页文字为“拯救克什米尔”。在塞尔维亚黑客们攻陷了一个阿尔巴尼亚网站。Stefan Wray一位早期网络激进主义分子为一次纽约“反哥伦布日”集会上的黑客行径辩护。“我们视之为电子形式的公众抗议”他告诉大家。</p>
<p>1994 年,第一款商业 Web 浏览器 Netscape Navigator网景领航员正式发布,同一年 Doyon 被捕入狱。当他出狱并再次回到剑桥后PLF 依然活跃着并且他们的工具有了实质性的飞跃。Doyon 回忆起他入狱之前对比的变化“非常巨大——好比是烽火狼烟电报传信之间那么大的差距。”黑客们入侵了一个印度的军事网站并修改其首页文字为“拯救克什米尔”。在塞尔维亚黑客们攻陷了一个阿尔巴尼亚网站。Stefan Wray一位早期网络激进主义分子为一次纽约“反哥伦布日”集会上的黑客行径辩护。“我们视之为电子形式的公众抗议”他告诉大家。</p>
<p>1999 年,美国唱片业协会因为版权侵犯问题起诉了 Napster一款文件共享软件。最终Napster 于 2001 年关闭。Doyon 与其他黑客使用分布式拒绝服务Distributed Denial of ServiceDDoS使大量数据涌入网站导致其响应速度减缓直至奔溃的手段攻击了美国唱片业协会的网站使之停运时间长达一星期之久。Doyon为自己的行为进行了辩解并高度赞扬了其他的“黑客主义者”。“我们很快意识到保卫 Napster 的战争象征着保卫 Internet 自由的战争,”他在后来写道。</p>
<p>1999 年,美国唱片业协会因为版权侵犯问题起诉了 Napster一款文件共享服务。最终Napster 于 2001 年关闭。Doyon 与其他黑客使用分布式拒绝服务Distributed Denial of ServiceDDoS使大量数据涌入网站导致其响应速度减缓直至奔溃的手段攻击了美国唱片业协会的网站使之停运时间长达一星期之久。Doyon为自己的行为进行了辩解并高度赞扬了其他的“黑客主义者”。“我们很快意识到保卫 Napster 的战争象征着保卫 Internet 自由的战争,”他在后来写道。</p>
<p>2008 年的一天Doyon 和 “Commander Adama” 在剑桥的 PLE 地下公寓相遇。Adama 当着 Doyon 的面点击了癫痫基金会的一个链接,与意料中将要打开的论坛不同,出现的是一连串闪烁的彩光。有些癫痫病患者对闪光灯非常敏感——这完全是出于恶意,有人想要在无辜群众中诱发癫痫病。已经出现了至少一名受害者。</p>
@@ -42,69 +42,69 @@
<center><small>“我得谈谈我的感受。”</small></center>
<p>Poole 希望匿名这一举措可以延续社区的尖锐性因素。“我们无意参与理智的涉外事件讨论”他在网站上写道。4chan 社区里最具价值的事之一便是寻求“挑起强烈的争端”lulz这个词源自缩写 LOL。Lulz 经常是通过分享充满孩子气的笑话或图片来实现的,它们中的大部分不是色情的就是下流的。其中最令人震惊的部分被贴在了网站的“/b/”版块上,这里的用户们称呼自己为“/b/tards”。Doyon 知道 4chan 这个社区,但他认为那些用户是“一群愚昧无知的顽童”。2004 年前后,/b/ 上的部分用户开始把“匿名者”视为一个独立的实体。</p>
<p>Poole 希望匿名这一举措可以延续社区的尖锐性因素。“我们无意参与理智的涉外事件讨论”他在网站上写道。4chan 社区里最具价值的事之一便是寻求“挑起强烈的争端”lulz这个词源自缩写 LOL。Lulz 经常是通过分享幼稚的笑话或图片来实现的,其中大部分不是色情的就是下流的。其中最令人震惊的部分被贴在了网站的“/b/”版块上,这里的用户们称呼自己为“/b/tards”。Doyon 知道 4chan 这个社区,但他认为它的用户是“一群愚昧无知的顽童”。2004 年前后,/b/ 上的部分用户开始把“匿名者”视为一个独立的实体。</p>
<p>这是一个全新的黑客团体。“这不是一个传统意义上的组织,”一位领导计算机安全工作的研究员 Mikko Hypponen 告诉我——倒不如视之为一个非传统的亚文化群体。Barrett Brown德克萨斯州的一名记者,同时也是众所周知的“匿名者”高层领导把“匿名者”描述为“一连串前仆后继的伟大友谊”。无需任何会费或者入会仪式。任何想要加入“匿名者”组织成为一名匿名者Anon的人都可以通过简短的象征性的宣誓加入。</p>
<p>尽管 4chan 的关注焦点是一些琐碎的话题,但许多匿名者认为自己就是“正义的十字军”。如果网上有不良迹象出现,他们就会发起具有针对性的治安维护行动。不止一次,他们以未成年少女的身份套取恋童癖的私人信息,然后把这些信息交给警察局。其他匿名者则是政治的厌恶者,为了挑起争端想方设法散布混乱的信息。他们中的一些人在 /b/ 上发布看着像是雷管炸弹的图片另一些则叫嚣着要炸毁足球场并因此被联邦调查局逮捕。2007 年,一家洛杉矶当地的新闻联盟机构称呼“匿名者”组织为“互联网负能量制造机”。</p>
<p>尽管 4chan 的关注焦点是一些琐碎的话题,但许多匿名者认为自己就是“正义的十字军”。如果网上有不良迹象出现,他们就会发起具有针对性的治安维护行动。不止一次,他们以未成年少女的身份使恋童癖陷入圈套,然后把他们的个人信息交给警察局。其他匿名者则是政治的厌恶者,为了挑起争端想方设法散布混乱的信息。他们中的一些人在 /b/ 上发布看着像是雷管炸弹的图片另一些则叫嚣着要炸毁足球场并因此被联邦调查局逮捕。2007 年,一家洛杉矶当地的新闻联盟机构称呼“匿名者”组织为“互联网负能量制造机”。</p>
<p>2008 年 1 月Gawker Media 上传了一段关于汤姆克鲁斯大力吹捧山达基优点的视频。这段视频是受版权保护的,山达基教会致信 Gawker勒令其删除这段视频。“匿名者”组织认为教会企图控制网络信息。“是时候让 /b/ 来干票大的了,”有人在 4chan 上写道。“我说的是‘入侵’或者‘攻陷’山达基官方网站。”一位匿名者使用 YouTube 放出一段“新闻稿”,其中包括暴雨云视频和经过计算机处理的语音。“我们要立刻把你们从 Internet 上赶出去,并且在现有规模上逐渐瓦解山达基教会,”那个声音说,“你们无处可躲。”不到一个星期,这段 YouTube 视频的点击率就超过了两百万次。</p>
<p>“匿名者”组织已经不仅限于 4chan 社区。黑客们在专用的互联网中继聊天Internet Relay Chat channelsIRC 聊天室)频道内进行交流,协商策略。通过 DDoS 攻击手段,他们使山达基的主网站间歇性崩溃了好几天。匿名者们制造了“谷歌炸弹”,由此导致 “dangerous cult” 的搜索结果中的第一条结果就是山达基主网站。其余的匿名者向山达基的欧洲总部寄送了数以百计的披萨,并用大量全黑的传真单耗干了洛杉矶教会总部的传真机墨盒。山达基教会,据报道拥有超过十亿美元资产的组织,当然能经得起墨盒耗尽的考验。但山达基教会的高层可不这么认为,他们还收到了严厉的恐吓,由此他们不得不向 FBI 申请逮捕“匿名者”组织的成员。</p>
<p>“匿名者”组织已经不仅限于 4chan 社区。黑客们在专用的互联网中继聊天Internet Relay Chat channelsIRC 聊天室)频道内进行交流,协商策略。通过 DDoS 攻击手段,他们使山达基的主网站间歇性崩溃了好几天。匿名者们制造了“谷歌炸弹”,由此导致 “dangerous cult” 的搜索结果中的第一条结果就是山达基主网站。其余的匿名者向山达基的欧洲总部寄送了数以百计的披萨,并用大量全黑的传真单耗干了洛杉矶教会总部的传真机墨盒。山达基教会,据报道是一个拥有超过十亿美元资产的组织,当然能经得起墨盒耗尽的考验。但山达基教会的高层可不这么认为,他们还收到了死亡恐吓,由此他们不得不向 FBI 申请调查“匿名者”组织的成员。</p>
<p>2008 年 3 月 15 日,在从伦敦到悉尼的一百多个城市里,数以千计匿名者们游行示威山达基教会。为了切合“匿名”这个主题,组织者下令所有的抗议者都应该佩戴相同的面具。深思熟虑过蝙蝠侠后,他们选定了 2005 年上映的反乌托邦电影《 V 字仇杀队》中 Guy Fawkes 的面具。“在每个大城市里都能以很便宜的价格大量购买,”广为人知的匿名者、游行组织者之一 Gregg Housh 告诉我说道。漫画式的面具上是一个的脸颊红润的男人,八字胡,有着灿烂的笑容。</p>
<p>匿名者们并未“瓦解”山达基教会。并且汤姆克鲁斯的那段视频任然保留在网络上。匿名者们证明了自己的顽强。组织选择了一个相当浮夸的口号:“我们是一体。绝不宽恕。永不遗忘。相信我们。”We are Legion. We do not forgive. We do not forget. Expect us.</p>
<p>匿名者们并未“瓦解”山达基教会。并且汤姆克鲁斯的那段视频任然保留在网络上。匿名者们证明了自己的顽强。组织选择了一个相当浮夸的口号:“我们是军团。绝不宽恕。永不遗忘。等待我们。”We are Legion. We do not forgive. We do not forget. Expect us.</p>
<h2>3</h2>
<p>2010 年Doyon 搬到了加利福尼亚州的圣克鲁斯,并加入了当地的“和平阵营”组织。利用从木材堆置场偷来的木头,他在山上盖起了一间简陋的小屋,“借用”附近住宅的 WiFi使用太阳能电池板发电并通过贩卖种植的大麻换取现金。</p>
<p>与此同时“和平阵营”维权者们每天晚上开始在公共场所休息以此抗议圣克鲁斯政府此前颁布的“流浪者管理法案”他们认为这项法案严重侵犯了流浪者的生存权。Doyon 出席了“和平阵营”的会议,并在网上发起了抗议活动。他留着蓬乱的红色山羊胡,戴一顶米黄色软呢帽,像军人那样不知疲倦。因此维权者们送给了他“罪恶制裁克里斯”的称呼。</p>
<p>与此同时“和平阵营”维权者们每天晚上开始在公共场所休息以此抗议圣克鲁斯政府此前颁布的“流浪者管理法案”他们认为这项法案严重侵犯了流浪者的生存权。Doyon 出席了“和平阵营”的会议,并在网上发起了抗议活动。他留着蓬乱的红色山羊胡,戴一顶米黄色软呢帽,类似军服的服装。因此维权者们送给了他“罪恶制裁克里斯”的称呼。</p>
<p>“和平阵营”的成员之一 Kelley Landaker 曾几次和 Doyong 讨论入侵事宜。Doyon 有时会吹嘘自己的技术是多么的厉害,但作为一名资深程序员的 Landaker 却不为所动。“他说得很棒,但却不是行动派”Landaker 告诉我。不过在那种场合下,的确更需要一位富有激情的领导者,而不是埋头苦干的技术员。“他非常热情并且坦率,”另一位成员 Robert Norse 如是对我说。“他创造出了大量的能够吸引媒体眼球的话题。我从事这行已经二十年了,在这一点上他比我见过的任何人都要厉害。”</p>
<p>“和平阵营”的成员之一 Kelley Landaker 曾几次和 Doyong 讨论入侵事宜。Doyon 有时会吹嘘自己的技术是多么的厉害,但作为一名资深程序员的 Landaker 却不为所动。“他说得很棒但却不是行动派”Landaker 告诉我。不过在那种场合下,的确更需要一位富有激情的领导者,而不是埋头苦干的技术员。“他非常热情并且坦率,”另一位成员 Robert Norse 如是对我说。“他创造出了大量的能够吸引媒体眼球的话题。我从事这行已经二十年了,在这一点上他比我见过的任何人都要厉害。”</p>
<p>Doyon 在 PLF 的上司Commander Adama 仍然住在剑桥,并且通过电子邮件和 Doyon 保持着联络,他下令让 Doyon 潜入“匿名者”组织以此获知其运作方式,并伺机为 PLF 招募新成员。因为癫痫基金会网站入侵事件的那段不愉快回忆Doyon 拒绝了 Adama。Adama 给 Doyon 解释说在“匿名者”组织里不怀好意的黑客只占极少数与此相反这个组织经常会有一些的轰动世界举动。Doyon 对这点表示怀疑。“4chan 怎么可能会轰动世界?”他质问道。但出于对 PLF 的忠诚,他还是答应了 Adama 的请求。</p>
<p>Doyon 在 PLF 的上司Commander Adama 仍然住在剑桥,并且通过电子邮件和 Doyon 保持着联络,他下令让 Doyon 监视“匿名者”组织以此获知其运作方式,并伺机为 PLF 招募新成员。因为癫痫基金会网站入侵事件的那段不愉快回忆Doyon 拒绝了 Adama。Adama 给 Doyon 解释说在“匿名者”组织里不怀好意的黑客只占极少数与此相反这个组织经常会有一些的轰动世界举动。Doyon 对这点表示怀疑。“4chan 怎么可能会轰动世界的大举动?”他质问道。但出于对 PLF 的忠诚,他还是答应了 Adama 的请求。</p>
<p>Doyon 经常带着一台宏基笔记本电脑出入于圣克鲁斯的一家名为 Coffee Roasting Company 的咖啡厅。“匿名者”组织的 IRC 聊天室主频道无需密码就能进入。Doyon 使用 PLF 的昵称进行登录并加入了聊天室。一段时间后,他发现了组织内大量的专用匿名者行动聊天频道,这些频道的规模更小,相互重复。要想参与行动,你必须知道行动的专用聊天频道名称,并且聊天频道随时会因为陌生的闯入者而进行变更。这套交流系统并不具备较高的安全系数,但它的确很凑效。“这些专用行动聊天频道确保了行动机密的高度集中”麦吉尔大学的人类学家 Gabriella Coleman 告诉我。</p>
<p>Doyon 经常带着一台宏基笔记本电脑出入于圣克鲁斯的一家名为 Coffee Roasting Company 的咖啡厅。“匿名者”组织的 IRC 聊天室主频道无需密码就能进入。Doyon 使用 PLF 的昵称进行登录并加入了聊天室。一段时间后,他发现了组织内大量的专用匿名者行动聊天频道,这些频道的规模更小,更多专门的组内匿名者间对话相互重复。要想参与行动,你必须知道行动的专用聊天频道名称,并且聊天频道随时会因为陌生的闯入者而进行变更。这套交流系统并不具备较高的安全系数,但它的确很凑效。“这些专用行动聊天频道确保了行动机密的高度集中”麦吉尔大学的人类学家 Gabriella Coleman 告诉我。</p>
<p>有些匿名者提议了一项行动,名为“反击行动”。如同新闻记者 Parmy Olson 于 2012 年在书中写道的,“我们是匿名者,”这项行动成为了又一次支文件共享网站,如 Napster 的后继者海盗湾Pirate Bay的行动的前奏,但随后其目标却扩展到了政治领域。2010 年末在美国国务院的要求下包括万事达、Visa、PayPal 在内的几家公司终止了对维基解密一家公布了成百上千份外交文件的民间组织,的捐助。在一段网络视频中“匿名者”组织扬言要进行报复发誓会对那些阻碍维基解密发展的公司进行惩罚。Doyon 被这种抗议企业的精神所吸引,决定参加这次行动。</p>
<p>有些匿名者提议了一项行动,名为“反击行动”。如同新闻记者 Parmy Olson 于 2012 年在书中写道的,“我们是匿名者,” 这项行动是以又一次支文件共享网站而创立,如 Napster 的后继者海盗湾Pirate Bay但随后其目标却扩展到了政治领域。2010 年末在美国国务院的要求下包括万事达、Visa、PayPal 在内的几家公司终止了对维基解密的捐助,维基解密是一家公布了成百上千份外交文件的自发性组织。在一段在线视频中“匿名者”组织扬言要进行报复发誓会对那些阻碍维基解密发展的公司进行惩罚。Doyon 被这种抗议企业的精神所吸引,决定参加这次行动。</p>
<center><img src="http://www.newyorker.com/wp-content/uploads/2014/09/140908_a18473-600.jpg" /></center>
<center><small>潘多拉的魔盒</small></center>
<p>在十二月初的“反击行动”中,“匿名者”组织指导那些新成员,或者说新兵,关于“如何他【哔~】加入组织”,教程中提到“首先配置【哔~】的网络,这【哔~】的很重要。”同时他们被要求下载“低轨道离子炮”一款易于使用的开源软件。Doyon 下载了软件并在聊天室内等待着下一步指示。当开始的指令发出后数千名匿名者将同时发动进攻。Doyon 收到了含有目标网址的指令——目标是,www.visa.com——同时在软件的右上角有个按钮上面写着“IMMA CHARGIN MAH LAZER.”“反击行动”同时也发动了大量的复杂精密的入侵进攻。几天后“反击行动”攻陷了万事达、Visa、PayPal 公司的主页。在法院的控告单上PayPal 称这次攻击给公司造成了 550 万美元的损失。</p>
<p>在十二月初的“反击行动”中,“匿名者”组织指导那些新成员,或者说新兵,去看标题为“如何加入那个【哔~】的Hive”参与者被要求“首先配置他们【哔~】的网络,这【哔~】的很重要。”同时他们被要求下载“低轨道离子炮”一款易于使用的开源软件。Doyon 下载了软件并在聊天室内等待着下一步指示。当开始的指令发出后数千名匿名者将同时发动进攻。Doyon 进入了目标网址——www.visa.com——同时在软件的右上角有个按钮上面写着“IMMA CHARGIN MAH LAZER.”“反击行动”同时也发动了大量的复杂精密的入侵进攻。几天后“反击行动”攻陷了万事达、Visa、PayPal 公司的主页。在法院的控告单上PayPal 称这次攻击给公司造成了 550 万美元的损失。</p>
<p>但对 Doyon 来说,这是切实的激进主义体现。在剑桥反对种族隔离的行动中,他不能立即看到结果;而现在,只需指尖轻轻一点,就可以在攻陷大公司网站的行动中做出自己的贡献。隔天,赫芬顿邮报上出现了“万事达沦陷”的醒目标题。一位得意洋洋的匿名者发推特道:“有些事情维基解密是无能为力的。但这些事情却可以由‘反击行动’来完成。”</p>
<p>但对 Doyon 来说,这是切实的激进主义体现。在剑桥反对种族隔离的行动中,他不能即可见效;而现在,只需指尖轻轻一点,就可以在攻陷大公司网站的行动中做出自己的贡献。隔天,赫芬顿邮报上出现了“万事达沦陷”的醒目标题。一位得意洋洋的匿名者发推特道:“有些事情维基解密是无能为力的。但这些事情却可以由‘反击行动’来完成。”</p>
<h2>4</h2>
<p>2010 年的秋天,“和平阵营”的抗议活动终止,政府只做出了轻微的让步“流浪者管理法案”仍然有效。Doyon 希望通过借助“匿名者”组织的方略扭转局势。他回忆当时自己的想法,“也许我可以发动‘匿名者’组织来教训这种看似不堪一击的市政府网站,这些人绝对会【哔~】地赞同我的提议。最终我们使得市政府永久性废除‘流浪者管理法案’。”</p>
<p>2010 年的秋天,“和平阵营”的抗议活动终止,政府只做出了略微让步“流浪者管理法案”仍然有效。Doyon 希望通过借助“匿名者”组织的方略扭转局势。他回忆当时自己的想法,“也许我可以发动‘匿名者’组织来教训这种看似不堪一击的市政府网站,它们绝对会【哔~】地沦陷。最终我们使得市政府永久性废除‘流浪者管理法案’。”</p>
<p>Joshua Covelli 是一位 25 岁的匿名者他的昵称是“Absolem”他非常钦佩 Doyon 的果敢。“现在我们的组织完全是他【哔~】各种混乱的一盘散沙”Covelli 告诉我。在“Commander X”加入之后“组织似乎开始变得有模有样了。”Covelli 的工作是俄亥俄州费尔伯恩的一所大学接待员,他从不了解任何有关圣克鲁斯的政治。但是当 Doyon 提及帮助“和平阵营”抗击活动的计划后Covelli 立即回复了一封表示赞同的电子邮件:“我期待这样的行动很久了。”</p>
<p>Joshua Covelli 是一位 25 岁的匿名者他的昵称是“Absolem”他非常钦佩 Doyon 的果敢。“过去我们的组织完全是各种混乱的一盘散沙”Covelli 告诉我。在“Commander X”加入之后“组织似乎开始变得有模有样了。”Covelli 的工作是俄亥俄州费尔伯恩的一所大学接待员,他从不了解任何有关圣克鲁斯的政治。但是当 Doyon 提及帮助“和平阵营”抗击活动的计划后Covelli 立即回复了一封表示赞同的电子邮件:“我期待参加这样的行动已经很久了。”</p>
<p>Doyon 使用 PLF 的昵称邀请 Covelli 在 IRC 聊天室进行了一次秘密谈话:</p>
<blockquote>Absolem抱歉有个比较冒犯的问题...请问 PLF 是组织的一员吗</blockquote>
<blockquote>Absolem抱歉有个比较冒犯的问题...请问 PLF 是组织的一部分还是分开的</blockquote>
<blockquote>Absolem我会这么问是因为我在频道里看过你的聊天记录,你像是一名训练有素的黑客,不太像是来自组织里的成员。</blockquote>
<blockquote>Absolem我会这么问是因为看你们聊天,觉得你们都是非常有组织的。</blockquote>
<blockquote>PLF不不不你的问题一点也不冒犯。很高兴遇到你。PLF 是一个来自波士顿的黑客组织,已经成立 22 年了。我在 1981 年就开始了我的黑客生涯,但那时我并没有使用计算机,而是使用的 PBXPrivate Branch Exchange电话交换机。</blockquote>
<blockquote>PLF我们组织内所有成员的年龄都超过了 40 岁。我们当中有退伍士兵和学者。并且我们的成员“Commander Adama”正在躲避一大帮警察还有间谍的追捕。</blockquote>
<blockquote>Absolem听起来很棒我对这次行动很感兴趣不知道我是否可以提供一些帮助,我们的组织实在是太混乱了。我的电脑技术还不错,但我在入侵技术上还完全是一个新手。我有一些小工具,但不知道怎么去使用它们。</blockquote>
<blockquote>Absolem听起来很棒我对这次行动很感兴趣过“匿名者”组织看起来太混乱无序,不知道我是否可以提供一些帮助。我的电脑技术还不错,但我在入侵技术上还完全是一个新手。我有一些小工具,但不知道怎么去使用它们。</blockquote>
<p>庄重的入会仪式后Doyon 正式接纳 Covelli 加入 PLF</p>
<blockquote>PLF把所有可能对你不利的【哔~】敏感文件加密。</blockquote>
<blockquote>PLF把所有可能使你受牵连的敏感文件加密。</blockquote>
<blockquote>PLF还有想要联系任何一位 PLF 成员的话,给我发消息就行。从现在起,请叫我... Commander X。</blockquote>
<p>2012 年,美联社称“匿名者”组织为“一伙训练有素的黑客”Quinn Norton 在《连线》杂志上发文称“‘匿名者’组织可以入侵任何坚不可摧的网站”,并在文末赞扬他们为“一群卓越的民间黑客”。事实上,有些匿名者的确是很有天赋的程序员,但绝大部分成员根本不懂任何技术。人类学家 Coleman 告诉我只有大约五分之一的匿名者是真正的黑客——其他匿名者则是“极客与抗议者”。</p>
<p>2012 年,美联社称“匿名者”组织为“一帮专家级的黑客”Quinn Norton 在《连线》杂志上发文称“‘匿名者’组织可以入侵任何坚不可摧的网站”,并在文末赞扬他们为“一群卓越的民间黑客”。事实上,有些匿名者的确是很有天赋的程序员,但绝大部分成员根本不懂任何技术。人类学家 Coleman 告诉我只有大约五分之一的匿名者是真正的黑客——其他匿名者则是“极客与抗议者”。</p>
<p>2010 年 12 月 16 日Doyon 以 Commander X 的身份向几名记者发送了电子邮件。“明天当地时间 1200 的时候,‘人民解放阵线’组织与‘匿名者’组织将大举进攻圣克鲁斯政府网站”他在邮件中写道“12:30 之后我们将恢复网站的正常运行。”</p>
<p>2010 年 12 月 16 日Doyon 以 Commander X 的身份向几名记者发送了电子邮件。“明天当地时间 1200 的时候,‘人民解放阵线’组织与‘匿名者’组织将从互联网中删除圣克鲁斯政府网站”他在邮件中写道“12:30 之后我们将恢复网站的正常运行。”</p>
<p>圣克鲁斯数据中心的工作人员收到了警告,匆忙地准备应对攻击。他们在服务器上运行起安全扫描软件,并向当地的互联网供应商 AT & T 求助,后者建议他们向 FBI 报警。</p>
@@ -132,7 +132,7 @@
<center><small>“Zach 很聪明... 并且... 是一个天才... 但.. 你们... 不在一个班。”</small></center>
<p>Doyon 引用了一句电影台词。“拼命地跑,”他说。“我会躲起来,尽可能保持我的行动自由,用尽全力和这帮杂种们作斗争。”Frey 给了他两张 20 美元的钞票并祝他好运。</p>
<p>Doyon 引用了一句电影台词。“拼命地跑,”他说。“我会躲起来,尽可能保持我的行动自由,用尽全力和这帮混蛋们作斗争。”Frey 给了他两张 20 美元的钞票并祝他好运。</p>
<h2>5</h2>
@@ -142,35 +142,35 @@
<p>“突尼斯,” Brown 答道。</p>
<p>“我知道,那是中东地区的一个国家,” Doyon 继续问,“然后呢?”</p>
<p>“我知道,那是中东地区的一个国家,” Doyon 继续问,“具体任务是什么呢?”</p>
<p>“我们准备打倒那里的独裁者,” Brown 再次答道。</p>
<p>“啊?!那里有一位独裁者吗?” Doyon 有点惊讶。</p>
<p>几天后“突尼斯行动”正式展开。Doyon 作为参与者向突尼斯政府域名下的电子邮箱发送了大量的垃圾邮件,以此阻塞其服务器。“我会提前写好关于那次行动邮件,接着一次又一次地把它们发送出去,” Doyon 说,“有时候实在没有时间,我就只简短的写上一句问候对方母亲的话,然后发送出去。”短短一天时间里,匿名者们就攻陷了包括突尼斯证券交易所、工业部、总统办公室、总办公室在内的多个网站。他们把总统办公室网站的首页替换成了一艘海盗船的图片,并配以文字“‘报复’是个贱人,不是吗?”</p>
<p>几天后“突尼斯行动”正式展开。Doyon 作为参与者向突尼斯政府域名下的电子邮箱发送了大量的垃圾邮件,以此阻塞其服务器。“我会提前写好关于那次行动邮件,接着一次又一次地把它们发送出去,” Doyon 说,“有时候实在没有时间,我就只简短的写上一句问候对方母亲的话,然后发送出去。”短短一天时间里,匿名者们就攻陷了包括突尼斯证券交易所、工业部、总统办公室、总办公室在内的多个网站。他们把总统办公室网站的首页替换成了一艘海盗船的图片,并配以文字“恶有恶报,不是吗?”</p>
<p>Doyon 不时会谈起他的网上“战斗”经历似乎他刚从弹坑里爬出来一样。“伙计自从干了这行我就变黑了”他向我诉苦道。“你看我的脸全是抽烟的时候熏的——而且可能已经粘在我的脸上了。我仔细地照过镜子毫不夸张地说我简直就是一头棕熊。”很多个夜晚Doyon 都是在 Golden Gate 公园里露营过夜的。“我就那样干了四天,我看了看镜子里的‘我’,感觉还可以——但其实我觉得‘我’也许应该去吃点东西、洗个澡了。”</p>
<p>“匿名者”组织接着又在 YouTube 上声明了将要进行的一系列行动“利比亚行动”、“巴林行动”、“摩洛哥行动”。作为解放广场事件的抗议者Doyon 参与了“埃及行动”。在 Facebook 针对这次行动的宣传专页中,有一个为当地示威者准备的“行动套装”链接。“行动套装”通过文件共享网站 Megaupload 进行分发,其中含有一份加密软件以及应对瓦斯袭击的保护措施。并且在不久后,埃及政府关闭了埃及的所有互联网及子网络的时候继续向当地抗议者们提供连接网络的方法。</p>
<p>“匿名者”组织接着又在 YouTube 上声明了将要进行的一系列行动“利比亚行动”、“巴林行动”、“摩洛哥行动”。作为解放广场事件的抗议者Doyon 参与了“埃及行动”。在 Facebook 针对这次行动的宣传专页中,有一个为当地示威者准备的“行动套装”链接。“行动套装”通过文件共享网站 Megaupload 进行分发,其中含有一份加密软件以及应对瓦斯袭击的保护措施。埃及政府关闭了埃及的所有互联网及子网络的时候不久后,“匿名者”组织继续向当地抗议者们提供连接网络的方法。</p>
<p>2011 年夏季Doyon 接替 Adama 成为 PLF 的最高指挥官。Doyon 招募了六个新成员,并力图发展 PLF 成为“匿名者”组织的中坚力量。Covelli 成为了他的其中一位术顾问。另一名黑客 Crypt0nymous 负责在 YouTube 上发布视频其余的人负责研究以及组装电子设备。与松散的“匿名者”组织不同PLF 内部有一套极其严格的管理体系。“Commander X 事必躬亲”Covelli 说。“这是他的行事风格,也许不能称之为一种风格。”一位创立了 AnonInsiders 博客的黑客通过加密聊天告诉我,他认为 Doyon 总是一意孤行——这在“匿名者”组织中是很罕见的现象。“当我们策划发起一项行动时,他并不在乎其他人是否同意,”这位黑客补充道,“他会一个人列出行动方案,确定攻击目标,登录 IRC 聊天室,接着告诉所有人在哪里‘碰头’,然后发起 DDoS 攻击。”</p>
<p>2011 年夏季Doyon 接替 Adama 成为 PLF 的最高指挥官。Doyon 招募了六个新成员,并力图发展 PLF 成为“匿名者”组织的中坚力量。Covelli 成为了他的其中一位术顾问。另一名黑客 Crypt0nymous 负责在 YouTube 上发布视频其余的人负责研究以及组装电子设备。与松散的“匿名者”组织不同PLF 内部有一套极其严格的管理体系。“Commander X 事必躬亲”Covelli 说。“这是他的行事风格,要么不做,要么做好。”一位创立了 AnonInsiders 博客的黑客通过加密聊天告诉我,他认为 Doyon 总是一意孤行——这在“匿名者”组织中是很罕见的现象。“当我们策划发起一项行动时,他并不在乎其他人是否同意,”这位黑客补充道,“他会一个人列出行动方案,确定攻击目标,登录 IRC 聊天室,接着告诉所有人在哪里‘碰头’,然后发起 DDoS 攻击。”</p>
<p>一些匿名者把 PLF 视为可有可无的部分,认为 Doyon 的所作所为完全是个天大的笑柄。“他是因为吹牛出名的,”另一名昵称为 Tflow 的匿名者 Mustafa Al-Bassam 告诉我。不过,即使是那些极度反感 Doyon 的狂妄自大的人,也不得不承认他在“匿名者”组织发展过程中的重要性。“他所倡导的强硬路线有时很凑效,有时则完全不起作用,” Gregg Housh 说,并且补充道自己和其他优秀的匿名者都曾遇到过相同的问题。</p>
<p>一些匿名者把 PLF 视为“面子项目”,认为 Doyon 的所作所为完全是个笑柄。“他是因为吹牛出名的,”另一名昵称为 Tflow 的匿名者 Mustafa Al-Bassam 告诉我。不过,即使是那些极度反感 Doyon 的狂妄自大的人,也不得不承认他在“匿名者”组织发展过程中的重要性。“他所倡导的强硬路线有时很凑效,有时则是碍事,” Gregg Housh 说,并且补充道自己和其他优秀的匿名者都曾遇到过相同的问题。</p>
<p>“匿名者”组织对外坚持声称自己是不分层次的平等组织。在由 Brian Knappenberger 制作的一部纪录片,《我们是一个团体》中一名成员使用“一群鸟”来比喻组织它们轮流领飞带动整个组织不断前行。Gabriella Coleman 告诉我,这个比喻不太切合实际,“匿名者”组织内实际上早就出现了一个非正式的领导阶层。“领导者非常重要,”她说。“有四五个人可以看做是我们的领头羊。”她把 Doyon 也算在了其中。但是匿名者们仍然倾向于反抗这种具有体系的组织结构。在一本即将出版的关于“匿名者”组织的书《黑客、骗子、告密者、间谍》中Coleman 这么写道,在匿名者中,“成员个体以及那些特立独行的人依然在一些重大事件上保持着服从的态度,优先考虑集体——特别是那些能引发强烈争端的事件。”</p>
<p>“匿名者”组织对外坚持声称自己是不分层次的平等组织。在由 Brian Knappenberger 制作的一部纪录片,《我们是军团》中一名成员使用“一群鸟”来比喻组织它们轮流领飞带动整个组织不断前行。Gabriella Coleman 告诉我,这个比喻不太切合实际,“匿名者”组织内实际上早就出现了一个非正式的领导阶层。“领导者非常重要,”她说。“有四五个人可以看做是我们的领头羊。”她把 Doyon 也算在了其中。但是匿名者们仍然倾向于反抗这种体制结构。在一本即将出版的关于“匿名者”组织的书《黑客、骗子、告密者、间谍》中Coleman 这么写道,在匿名者中,“成员个体以及那些特立独行的人依然在一些重大事件上保持着服从的态度,优先考虑集体——特别是那些能引发强烈争端的事件。”</p>
<p>匿名者们谑称那些特立独行的成员为“自尊心超强的疯子”和“想让自己出名的疯子”。不过许多匿名者已经不会再随便给他人取那种具有冒犯性的称号了。“但还是有令人惊讶的极少数成员违反规则”打破传统上的看法Coleman 说。“这么做的人,像 Commander X 这样的,都会在组织里受到排斥。”去年,在一家网络论坛上,有人写道,“当他开始把自己比作‘蝙蝠侠’的时候我就不想理他了。”</p>
<p>Peter Fein是一位以 n0pants 为昵称而出名的网络激进分子,也是众多反对 Doyon 的浮夸行为的众多匿名者之一。Fein 浏览了 PLF 的网站其封面上有一个徽章还有关于组织的宣言——“为了解放众多人类的灵魂而不断战斗”。Fein 沮丧的发现 Doyon 早就使用真名为这家网站注册过了,使他这种,以及其他想要找事的匿名者们无机可乘。“如果有人要对我的网站进行 DDoS 攻击,那完全可以,” Fein 回想起通过私密聊天告诉 Doyon 时的情景,“但如果你要这么做了的话,我会揍扁你的屁股。”</p>
<p>2011 年 2 月 5 日,《金融时报》报道了在一家名为 HBGary Federal 的网络安全公司,首席执行官 HBGary Federal 已经得到了“匿名者”组织骨干成员名单的消息。Barr 的调查结果表明,三位最高领导人其中之一就是‘ Commander X位潜伏在加利福尼亚州的黑客有能力“策划一些大型网络攻击事件”。Barr 联系了 FBI 并提交了自己的调查结果。</p>
<p>2011 年 2 月 5 日,《金融时报》报道了在一家名为 HBGary Federal 的网络安全公司,首席执行官 HBGary Federal 已经得到了“匿名者”组织骨干成员名单的消息。Barr 的调查结果表明,三位最高领导人其中之一就是‘ Commander X是一位潜伏在加利福尼亚州的黑客而且有能力“策划一些大型网络攻击事件”。Barr 联系了 FBI 并提交了自己的调查结果。</p>
<p>和 Fein 一样Barr 也发现了 PLF 网站的注册法人名为 Christopher Doyon地址是 Haight 大街。基于 Facebook 和 IRC 聊天室的调查Barr 断定‘ Commander X的真实身份是一名家庭住址在 Haight 大街附近的网络激进分子 Benjamin Spock de Vries。Barr 通过 Facebook 和 de Vries 取得了联系。“请告诉组织里的普通阶层,我并不是来抓你们的,” Barr 留言道,“只是想让‘领导阶层’知晓我的意图。”</p>
<p>和 Fein 一样Barr 也发现了 PLF 网站的注册法人名为 Christopher Doyon地址是 Haight 大街。基于 Facebook 和 IRC 聊天室的调查Barr 断定‘ Commander X的真实身份是一名家庭住址在 Haight 大街附近的网络激进分子 Benjamin Spock de Vries。Barr 通过 Facebook 和 de Vries 取得了联系。“请告诉组织里的其他人,我并不是来抓你们的,” Barr 留言道,“只是想让‘领导阶层’知晓我的意图。”</p>
<p>“‘领导阶层’? 2333笑死我了” de Vries 回复道。</p>
<p>《金融时报》发布报道的第二天“匿名者”组织就进行了反击。HBGary Federal 的网站被进行了恶意篡改。Barr 的私人 Twitter 账户被盗取,他的上千封电子邮件被泄漏到了网上,同时匿名者们还公布了他的住址以及其他私人信息——这是一系列被称作“doxing”的惩罚。不到一个月后Barr 就从 HBGary Federal 辞职了。</p>
<p>《金融时报》发布报道的第二天“匿名者”组织就进行了反击。HBGary Federal 的网站被进行了恶意篡改。Barr 的私人 Twitter 账户被盗取,他的上千封电子邮件被泄漏到了网上,同时匿名者们还公布了他的住址以及其他私人信息——这就是“冲动的惩罚。不到一个月后Barr 就从 HBGary Federal 辞职了。</p>
<h2>6</h2>
@@ -180,11 +180,11 @@
<center><small>“这是我在 TED 夏令营里学到的东西。”</small></center>
<p>他时刻关注着“匿名者”组织的内部消息。那年春季,在 Barr 调查报告中提到的六位匿名者精锐成员组建了“LulzSec 安全”组织Lulz Security简称 LulzSec。这个组织正如其名这些成员认为“匿名者”组织已经变得太过严肃他们的目标是重新引发起那些“能挑起强烈争端”的事件。当“匿名者”组织还在继续支持“阿拉伯之春”的抗议者的时候LulzSec 入侵了公共电视网Public Broadcasting ServicePBS网站并发布了一则虚假声明称已故说唱歌手 Tupac Shakur 仍然生活在新西兰。</p>
<p>他时刻关注着“匿名者”组织的内部消息。那年春季,在 Barr 调查报告中提到的六位匿名者精锐成员组建了“LulzSec 安全”组织Lulz Security简称 LulzSec。这个组织正如其名这些成员认为“匿名者”组织已经变得太过严肃他们的目标是重新引发起那些“能挑起强烈争端”的事件。当“匿名者”组织还在继续支持“阿拉伯之春”的抗议者LulzSec 入侵了公共电视网Public Broadcasting ServicePBS网站并发布了一则虚假声明称已故说唱歌手 Tupac Shakur 仍然生活在新西兰。</p>
<p>匿名者之间会通过 Pastebin.com 网站来共享文。在这个网站上LulzSec 发表了一则声明,称“很不幸,我们注意到北约和我们的好总统巴拉克奥萨马·本·美洲驼(拉登同学)的好朋友,来自 24 世纪的奥巴马,最近明显提高了对我们这些黑客的关注程度。他们把黑客入侵行为视作一种战争的表现。”目标越高远挑起的纷争就越大。6 月 15 日LulzSec 表示对 CIA 网站受到的袭击行为负责他们发表了一条推特上面写道“目标击毙Tango down亦即target down—— cia.gov ——这是起挑衅行为。”</p>
<p>匿名者之间会通过 Pastebin.com 网站来共享文。在这个网站上LulzSec 发表了一则声明,称“很不幸,我们注意到北约和我们的好朋友巴拉克奥萨马——来自24世纪的奥巴马 已经提升了关于黑客的筹码,他们把黑客入侵行为视作一种战争的表现。”目标越高远挑起的纷争就越大。6 月 15 日LulzSec 表示对 CIA 网站受到的袭击行为负责他们发表了一条推特上面写道“目标击毙Tango down亦即target down—— cia.gov ——这是起挑衅行为。”</p>
<p>2011 年 6 月 20 日LulzSec 的一名十九岁的成员 Ryan Cleary 因为对 CIA 的网站进行了 DDoS 攻击而被捕。7 月FBI 探员逮捕了七个月前对 PayPal 进行 DDoS 攻击的其他十四名黑客。这十四名黑客,每人都面临着 15 年的牢狱之灾以及 500 万美元的罚款。他们因为图谋不轨以及故意破坏互联网而被控违反了计算机欺诈与滥用处理条例。(该法案允许检察官进行酌情处置,并在去年网络激进分子 Aaron Swartz 因为被判处 35 年牢狱之灾而自杀身亡之后,受到了广泛的质疑和批评。)</p>
<p>2011 年 6 月 20 日LulzSec 的一名十九岁的成员 Ryan Cleary 因为对 CIA 的网站进行了 DDoS 攻击而被捕。7 月FBI 探员逮捕了七个月前对 PayPal 进行 DDoS 攻击的其他十四名黑客。这十四名黑客,每人都面临着 15 年的牢狱之灾以及 50 万美元的罚款。他们因为图谋不轨以及故意破坏互联网而被控违反了计算机欺诈与滥用法案。Computer Fraud and Abuse Act该法案允许检察官拥有宽泛的起诉裁量权,并在去年网络激进分子 Aaron Swartz 因为被判处 35 年牢狱之灾而自杀身亡之后,受到了广泛的质疑和批评。)</p>
<p>LulzSec 的成员之一 Jake (Topiary) Davis 因为付不起法律诉讼费给组织的成员们写了一封请求帮助的信件。Doyon 进入了 IRC 聊天室把 Davis 需要帮助的消息进行了扩散:</p>
@@ -198,7 +198,7 @@
<blockquote>Katanon唉...</blockquote>
<p>Doyon 越来越大胆。在佛罗里达州当局逮捕了支持流浪者的激进分子后,就 DDoS 了奥兰多商务部商会网站。他使用个人笔记本电脑通过公用无线网络实施了攻击,并且没有花费太多精力来隐藏自己的网络行踪。“这种做法很勇敢,但也很愚蠢,”一位自称 Kalli 的 PLF 的资深成员告诉我。“他看起来并不在乎是否会被抓。他完全是一名自杀式黑客。”</p>
<p>Doyon 越来越大胆。在佛罗里达州当局逮捕了支持流浪者的激进分子后,他就攻击 了奥兰多商务部商会网站。他使用个人笔记本电脑通过公用无线网络实施了攻击,并且没有花费太多精力来隐藏自己的网络行踪。“这种做法很勇敢,但也很愚蠢,”一位自称 Kalli 的 PLF 的资深成员告诉我。“他看起来并不在乎是否会被抓。他完全是一名自杀式黑客。”</p>
<p>两个月后Doyon 参与了针对旧金山湾区快速交通系统Bay Area Rapid Transit的 DDoS 攻击,以此抗议一名 BART 的警官杀害一名叫做 Charles Hill 的流浪者的事件。随后 Doyon 现身“CBS 晚间新闻”为这次行动辩护,当然,他处理了自己的声音,把自己的脸用香蕉进行替代。他把 DDoS 攻击比作为公民的抗议行为。“与占用 Woolworth 午餐柜台的座位相比这真的没什么不同真的”他说道。CBS 的主播 Bob Schieffer 笑称:“就我所见,它并不完全是一项民权运动。”</p>

View File

@@ -0,0 +1,106 @@
在 Debian 上使用 systemd 管理系统
================================================================================
人类已经无法阻止 systemd 占领全世界的 Linux 系统了唯一阻止它的方法是在你自己的机器上手动卸载它。到目前为止systemd 已经创建了比任何软件都多的技术问题、感情问题和社会问题。这一点从[热议][1](也称 Linux 初始化软件之战)上就能看出,这场争论在 Debian 开发者之间持续了好几个月。当 Debian 技术委员会最终决定将 systemd 放到 Debian 8代号 Jessie的发行版里面时其反对者试图通过多种努力来[取代这项决议][2],甚至有人扬言要威胁那些支持 systemd 的开发者的生命安全。
这也说明了 systemd 对 Unix 传承下来的系统处理方式有很大的干扰。“一个软件只做一件事情”的哲学思想已经被这个新来者彻底颠覆。除了取代了 sysvinit 成为新的系统初始化工具外systemd 还是一个系统管理工具。目前为止,由于 systemd-sysv 这个软件包提供的兼容性,那些我们使用惯了的工具还能继续工作。但是当 Debian 将 systemd 升级到214版本后这种兼容性就不复存在了。升级措施预计会在 Debian 8 "Jessie" 的稳定分支上进行。从此以后用户必须使用新的命令来管理系统、执行任务、变换运行级别、查询系统日志等等。不过这里有一个应对方案,那就是在 .bashrc 文件里面添加一些别名。
现在就让我们来看看 systemd 是怎么改变你管理系统的习惯的。在使用 systemd 之前,你得先把 sysvinit 保存起来,以防 systemd 出错的时候还能用 sysvinit 启动系统。这种方法只有在没安装 systemd-sysv 的情况下才能生效,具体操作方法如下:
# cp -av /sbin/init /sbin/init.sysvinit
在紧急情况下,可以把下面的文本:
init=/sbin/init.sysvinit
添加到内核启动参数项那里。
### systemctl 的基本用法 ###
systemctl 的功能是替代“/etc/init.d/foo start/stop”这类命令另外其实它还能做其他的事情这点你可以参考 man 文档。
一些基本用法:
- systemctl - 列出所有单元UNIT以及它们的状态这里的 UNIT 指的就是系统上的 job 和 service
- systemctl list-units - 列出所有 UNIT
- systemctl start [NAME...] - 启动一项或多项 UNIT
- systemctl stop [NAME...] - 停止一项或多项 UNIT
- systemctl disable [NAME...] - 将 UNIT 设置为开机不启动
- systemctl list-unit-files - 列出所有已安装的 UNIT以及它们的状态
- systemctl --failed - 列出开机启动失败的 UNIT
- systemctl --type=mount - 列出某种类型的 UNIT类型包含service, mount, device, socket, target
- systemctl enable debug-shell.service - 将一个 shell 脚本设置为开机启动,用于调试
为了更方便处理这些 UNIT你可以使用 systemd-ui 软件包,你只要输入 systemadm 命令就可以使用这个软件。
你同样可以使用 systemctl 实现转换运行级别、重启系统和关闭系统的功能:
- systemctl isolate graphical.target - 切换到运行级别5就是有桌面的级别
- systemctl isolate multi-user.target - 切换到运行级别3没有桌面的级别
- systemctl reboot - 重启系统
- systemctl poweroff - 关机
所有命令,包括切换到其他运行级别的命令,都可以在普通用户的权限下执行。
### journalctl 的基本用法 ###
systemd 不仅提供了比 sysvinit 更快的启动速度,还让日志系统在更早的时候启动起来,可以记录内核初始化阶段、内存初始化阶段、前期启动步骤以及主要的系统执行过程的日志。所以以前那种需要通过对显示屏拍照或者暂停系统来调试程序的日子已经一去不复返啦。
systemd 的日志文件都被放在 /var/log 目录。如果你想使用它的日志功能,需要执行一些命令,因为 Debian 没有打开日志功能。命令如下:
# addgroup --system systemd-journal
# mkdir -p /var/log/journal
# chown root:systemd-journal /var/log/journal
# gpasswd -a $user systemd-journal
通过上面的设置,你就可以以普通用户权限使用 journal 软件查看日志。使用 journalctl 查询日志可以获得一些比 syslog 软件更方便的玩法:
- journalctl --all - 显示系统上所有日志,以及它的用户
- journalctl -f - 监视系统日志的变化(类似 tail -f /var/log/messages 的效果)
- journalctl -b - 显示系统启动以后的日志
- journalctl -k -b -1 - 显示上一次(-b -1系统启动前产生的内核日志
- journalctl -b -p err - 显示系统启动后产生的“ERROR”日志
- journalctl --since=yesterday - 当系统不会经常重启的时候,这条命令能提供比 -b 更短的日志记录
- journalctl -u cron.service --since='2014-07-06 07:00' --until='2014-07-06 08:23' - 显示 cron 服务在某个时间段内打印出来的日志
- journalctl -p 2 --since=today - 显示优先级别为2以内的日志包含 emerg、alert、crit三个级别。所有日志级别有 emerg (0), alert (1), crit (2), err (3), warning (4), notice (5), info (6), debug (7)
- journalctl > yourlog.log - 将二进制日志文件复制成文本文件并保存到当前目录
Journal 和 syslog 可以很好的共存。而另一方面,一旦你习惯了操作 journal你也可以卸载掉所有 syslog 的软件,比如 rsyslog 或 syslog-ng。
如果想要得到更详细的日志信息你可以在内核启动参数上添加“systemd.log_level=debug”然后运行下面的命令
# journalctl -alb
你也可以编辑 /etc/systemd/system.conf 文件来修改日志级别。
### 利用 systemd 分析系统启动过程 ###
systemd 可以让你能更有效地分析和优化你的系统启动过程:
- systemd-analyze - 显示本次启动系统过程中用户态和内核态所花的时间
- systemd-analyze blame - 显示每个启动项所花费的时间明细
- systemd-analyze critical-chain - 按时间顺序打印 UNIT 树
- systemd-analyze dot | dot -Tsvg > systemd.svg - 为开机启动过程生成向量图(需要安装 graphviz 软件包)
- systemd-analyze plot > bootplot.svg - 产生开机启动过程的时间图表
![](https://farm6.staticflickr.com/5559/14607588994_38543638b3_z.jpg)
![](https://farm6.staticflickr.com/5565/14423020978_14b21402c8_z.jpg)
systemd 虽然是个年轻的项目,但存在大量文档。首先要介绍的是[Lennart Poettering 的 0pointer 系列][3]。这个系列非常详细,非常有技术含量。另外一个是[免费桌面信息文档][4],它包含了最详细的关于 systemd 的链接发行版特性文件、bug 跟踪系统和说明文档。你可以使用下面的命令来查询 systemd 都提供了哪些文档:
# man systemd.index
不同发行版之间的 systemd 提供的命令基本一样,最大的不同之处就是打包方式。
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/07/use-systemd-system-administration-debian.html
译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://lists.debian.org/debian-devel/2013/10/msg00444.html
[2]:https://lists.debian.org/debian-devel/2014/02/msg00316.html
[3]:http://0pointer.de/blog/projects/systemd.html
[4]:http://www.freedesktop.org/wiki/Software/systemd/

View File

@@ -0,0 +1,135 @@
自制一台树莓派街机
================================================================================
**利用当代神奇设备来重温80年代的黄金威严。**
### 你需要以下硬件 ###
- 一台树莓派以及一张4GBSD卡
- 一台支持HDMI的LCD显示屏
- 游戏手柄或者...
- 一个JAMMA街机游戏机外壳机箱
- J-Pac或者I-Pac
80年代有太多难忘的记忆冷战结束Quatro碳酸饮料Korg Polysix合成器以及Commodore 64家用电脑。但对于某些年轻人来说这些都没有街机游戏机那样有说服力或那种甜蜜的叛逆。笼罩着烟味和此起彼伏的8比特音效它们就是在挤出来的时间里去探索的洞穴50分钱和一份代币能让你消耗整个午餐时间在这些游戏上磨练着你的技能小蜜蜂城市大金刚蜈蚣行星射击吃豆小姐火凤凰R-Rype大金刚雷霆计划铁手套街头霸王超越赛车防卫者争战...这个列表太长了。
这些游戏以及玩这些游戏的街机机器仍然像30年前那样有吸引力。不像年轻时候那样现在可以不用装一兜零钱就能玩了最终让你超越那些有钱的孩子以及他们无休止的继续游戏。所以是时候打造一个你自己的基于Linux的街机游戏机了然后挑战一下过去的最高分。
我们将会覆盖所有的步骤来将一个便宜的街机游戏机器外壳变成一台Linux驱动的多平台复古游戏系统。但是这并不意味着你就一定要搭建一个同样的系统。比如说你可以放弃那个又大又重还有潜在致癌性外壳的箱子本身而是将内部控制核心装进一个旧游戏主机或同等大小的盒子里。或者说你也可以简单地放弃小巧的树莓派而将系统的大脑换成一台更强劲的Linux主机。举个例子它可以作为运行SteamOS的一个理想平台用来玩那些更优秀的现代街机游戏。
在之后的几个页面里我们将搭建一台基于树莓派的街机游戏机你应该也能从其中发现很多点子应用到你自己的项目上即使它们和我们这个项目不太一样。然后因为我们是用无比强大的MAME来做这件事情你几乎可以让它在任意平台上运行。
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade3.png)
我们在B+型号出来以前完成的这个项目。它应该也可以同样工作在更新的主板上你应该不用一个带电源的USB Hub也可以点击看大图
### 声明 ###
强调一下我们捣腾的电子器件可能会让你受到电击。请确保你做的任何改动都是有资质的电子工程师帮你检查过的。我们也不会深入讨论如何获取游戏但是有很多合法的资源例如基于MAME模拟器的老游戏以及较新的商业游戏。
#### 第一步:街机机柜 ####
街机机柜本身就是最大的挑战。我们在eBay上淘了个二手的90年代初的双人泡泡龙游戏机。然后花了£220装在一台旅行车后面送过来。类似这种机柜的价格并不确定。我们看到过很多在£100以内的。而另一方面还有很多人愿意花数千块钱去买原版侧面贴纸完整的机器。
决定买一个街机机柜主要有两个考虑。第一个是它的体积这东西又大又重。又占地方而且需要至少两个人才能搬动。如果你不缺钱的话还可以买DIY机柜或者全新的小一点的例如适合摆在桌子上的那种。然后酒柜也能很合适。
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade4.jpg)
这种机柜可能很便宜,但是他们都很重。不要一个人去搬。一些更古老的机器可能还会需要一点小关怀,例如重新喷个漆以及一些修理工作(点击看大图)。
除了获得更加真实的游戏体验以外购买原版的街机机柜的一个绝佳理由是可以使用原版的控制器。从eBay上买到的大多数机器都支持两个人同时玩有两个摇杆以及每个玩家各自的一些按钮再加上玩家一和玩家二的选择按钮。为了兼容更多游戏我们建议您找一台每个玩家都有6个按键这个是通用配置。也许你还想看看支持超过两位玩家的控制台或者有空间放其他游戏控制器的比如说街机轨迹球类似疯狂弹珠这种游戏需要的或者一个旋钮打砖块。这些待会都可以轻松装上去因为有现成的现代USB设备。
控制器是第二考虑的而且我们认为是最重要的因为要通过它把你的摇动和拍打转变成游戏里的动作。当你准备买一个机柜时需要考虑一种叫JAMMA的东西它是日本娱乐机械制造商协会Japan Amusement Machinery Manufacturers Association的缩写。JAMMA是街机游戏机里的行业标准定义了包含游戏芯片的电路板和游戏控制器的连接方式以及投币机制。它是一个连接两个玩家的摇杆和按钮的所有线缆的接口电路把它们统一到一个标准的连接头。JAMMA就是这个连接头的大小以及引脚定义这就意味着不管你安装的主板是什么按钮和控制器都将会连接到相同功能接口所以街机的主人只需要再更换下机柜上的外观图片就可以招揽新玩家了。
但是首先提醒一下JAMMA连接头上带有12V电压供电通常由大多数街机里都有的电源模块供给。为了避免意外短路或是不小心掉个螺丝刀什么的造成损坏我们完全切断了这个供电。在本教程后面的任何阶段我们也不会用到这个连接头上的任何电源脚。
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade2.png)
#### 第二步J-PAC ####
有一点非常方便你可以买到这样一种设备连接街机机柜里的JAMMA接头和电脑的USB端口将机柜上的摇杆和按键动作都转换成可配置的键盘命令它们可以在Linux里用来控制任何想玩的游戏。这个设备就叫J-Pac[www.ultimarc.com/jpac.html][1] 大概£54
它最大的特点不是它的连接性而是它处理和转换输入信号的方式因为它比标准的USB手柄强太多太多了。每一个输入都有自己独立的中断而且没有限制同时按下或按住的按钮或摇杆方向的数量。这对于类似街头霸王的游戏来说非常关键因为他们依赖于同时迅速按下的组合键而且用来对那些发飙后按下自己所有按键的不良对手发出致命一击时也必不可少。许多其他控制器特别是那些生成键盘输入的受到他们所采用的USB控制器的同时六个输入的限制以及一堆的AltShift和Ctrl键的特殊处理的限制。J-Pac还可以接入倾角传感器甚至某些投币装置不用预先配置就可以在Linux下工作了。
另外的选择是一个类似的叫I-Pac的设备。它做了和J-Pac相同的事情只不过不支持JAMMA接头。这意味着你不能把JAMMA控制器接上去但同时也就是说你可以设计你自己的控制器布局再把每个控制接到I-Pac上去。这对第一个项目来说也许有点小难但是这却是许多街机迷们选择的方式特别是他们想设计一个支持四个玩家的控制板的时候或者是一个整合许多不同类型控制的面板的时候。我们采用的方式并不是我们推荐必须要做的我们改造了一个输入有问题的二手X-Arcade Tankstick控制面板换上了新的摇杆和按钮再接到新的JAMMA接口这样有一个非常好的地方就是可以用便宜的价格£8买到所有用到的线材包括电路板边缘插头。
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade5.jpg)
我们的已经装到机柜上的J-Pac。右边的蓝色和红色导线接到我们的机柜上额外的1号和2号玩家按钮点击看大图
不管你选择的是I-Pac或是J-Pac它们产生的按键都是MAME的默认值。也就是说运行模拟器之后不需要手动调整输入。例如玩家1会默认将键盘方向键映射成上下左右以及将左边的Ctrl左边的ALT空格和左边的Shift键映射到按钮1-4。但是真正实用的功能是对于我们来说是双键快捷方式。当按下并按住玩家1按钮后就可以通过把玩家1的摇杆拉到下的位置发出用来暂停游戏的P按键推到上的位置调整音量以及推到右的位置来进入MAME自己的设置界面。这些特殊组合键设计的很巧妙不会对正常玩游戏带来任何干扰因为他们只有在按住玩家1按钮后才会生效然后可以让你正在运行游戏的时候也能做任何需要的事情。例如你可以完全地重新配置MAME使用它自己的菜单在玩游戏的时候改变输入绑定和灵敏度。
最后按住玩家1按钮然后按下玩家2按钮就可以退出MAME如果你使用了启动菜单或MAME管理器的话就很有用了因为他们会自动启动游戏然后你就可以用最快的速度开始玩另一个游戏了。
对于显示屏我们采取了比较保守的方式拿掉了街机原装的笨重的而且已经坏掉的CRT换成一个低成本的LCD显示器。这样做有很多好处。首先这个显示器有HDMI接口这样他就可以轻易地直接连接到树莓派或是现代的显卡上。第二你也不用去设定驱动街机屏幕所需要的低频率刷新模式也不需要驱动它的专用图形硬件。第三这也是最安全的方式因为街机屏幕往往在机身背后没有保护措施让很高的电压离你的手只有几英寸的距离。也不是说你完全不能用CRT如果那就是你追求的体验的话 这也是获得所追求的游戏体验的最真实的方式但是我们在软件里充分细调了CRT模拟部分我们对输出已经很满意了而且不需要用那个古老的CRT更是让我们高兴。
你也许还需要考虑用一个老式的4:3长宽比的LCD而不是那种宽屏的现代产品因为4:3模式用来玩竖屏或横屏的游戏更实用。比如说玩竖屏的射击游戏例如雷电如果使用宽屏显示器的话会在屏幕两边都有一个黑条。这些黑条一般会用来显示一些游戏指引或者你也可以把屏幕翻转90度这样就可以用上每个像素了但这却不实用除非你只玩竖屏游戏或者有一个容易操作的旋转支座。
装载显示屏也很重要。如果你拿掉了CRT的话没有现成的地方安装LCD。我们的方式是买了一些中密度纤维板(MDF)并切割成适合原来摆放CRT的地方。固定以好我们把一个便宜的VESA支座放在中间。VESA底座可以用来挂载大多数屏幕大的或小的。最后因为我们的机柜前面有烟玻璃我们必须保证亮度和对比度都设置的足够高。
### 第三步:装配 ###
现在几个硬件大件都选好了,而且也基本上确定了最终街机机柜要摆放的地方,把这几个配件装到一起并没有太大难度。我们安全地把机柜后面的电源输入部分拆开,然后在背后的空间接了一个符合插座。接在了电源开关之后的电线上。
几乎所有的街机机柜右上角都有个电源开关,但通常在机柜靠下一点的地方有大量的导线铰接在它上面,也就是说我们的设备可以使用普通的电源连接头。我们的机柜上还有一个荧光管,用做机器上边灯罩的背光,之前是直接连接到电源上的,我们可以用一个普通插头让它保持和电源连接。当你打开机柜上的电源开关的时候,电流会流入机柜里的各个部件 - 你的树莓派和显示屏都会开机,所有一切就都准备好了。
J-Pac模块直接插到JAMMA接口上但你可能还需要一点手动调整。标准的JAMMA只支持每个玩家最多三个按键尽管许多非正式的支持四个而J-Pac可以支持六个。为了连接额外的按钮你需要把按钮开关的一端接到J-Pac的GND上另一端接到J-Pac板边有螺丝固定的输入上。它们被标记成1SW41SW51SW62SW42SW5和2SW6。J-Pac也有声音的直通连接但是我们发现杂音太多没法用。改成把机柜上的喇叭连接到一个二手的SoundBlaster功放上再接到树莓派的音频输出端口。声音不一定要纯正但音量一定要足够大。
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade6.jpg)
我们的树莓派已经接到J-Pac左边也已经连接了显示屏和USB hub点击看大图
然后把J-Pac或I-Pac模块通过PS2转USB连接线接到你的PC或树莓派也可以直接接到PC的PS2接口。要用旧的PS2接头的话额外还有个要求你的电脑得足够古老还有这个但是我们测试发现用USB性能是一样的。当然这个不能用于不带PS2的树莓派而且别忘了树莓派也需要供电。我们一般建议使用一个带电源的USB hub因为没有供电是树莓派不工作最常见的错误。你还需要保证树莓派的网络正常要么通过以太网也许使用一个藏到机柜里的电力线适配器或者通过无线USB设备。网络很关键是因为在树莓派被藏到机柜里后你还可以重新配置它不用接键盘或鼠标就可以让你调整设置以及执行管理任务。
> ### 投币装置 ###
> 在街机模拟社区里让投币装置工作在模拟器上工作就会和商业产品太接近了。这就意味着你有潜在的可能对使用你机器的人收取费用。这不仅仅只是不正当考虑到运行在你自己街机上的那些游戏的来源这将会是非法的。这很显然违背了模拟的精神。不过我们和其他热爱者觉得一个能工作的投币装置更进一步地靠近了街机的真实而且值得付出努力来营造对那个过去街机的怀念。丢个10便士硬币到投币口然后再听到机器发出增加点数的声音没有什么比得上。
> 实际上难度也不大。取决于你街机上的投币装置以及它如何发信号通知投了几个币。大多数投币装置分为两个部分。较大的一部分是硬币接收和验证装置。这是投币过程的物理部分用于检测硬币是否真实以及确定它的价值。这是通过一个游戏点数逻辑电路板来实现的通常用一个排线连接上边还带有很多DIP开关。这些开关用来决定接受哪种硬币以及一个硬币能产生多少点数。然后就是简单地找到输出开关每个点数都会触发它一次然后把它接到JAMMA连接头的投币输入上或者直接接到J-Pac。我们的投币装置型号是Mars MS111在90年代早期的英国很常见网上有大量关于每个DIP开关作用的信息也有如何重新编程控制器来接受新硬币的方法。我们还能在这个装置的12V上接个小灯用来照亮投币孔。
#### 第四步:软件 ####
MAME是这种规模项目唯一可行的模拟器它如今支持运行在数不清的不同平台上的各种各样的游戏从第一代街机到一些最近的机器。从这个项目中还孕育出了MESS一个多模拟器的超级系统针对的平台是80到90年代的家庭电脑以及电视游戏机。
如何配置MAME本身都可以写上六页的文章了。它是一个复杂的无序的伟大的软件程序模拟了如此之多的CPU声卡芯片控制器以及那么多的选项就像MythTV你都永远不能真正停止配置它。
但是也有个相对省事的方式一个特别为树莓派构建的版本。它叫PiMAME。它是一个可下载的发布版和脚本基于Raspbian这是树莓派的默认发布版。它不仅仅会把MAME装到树莓派上这很有用因为没有哪个默认仓库里有这个还会安装其他一些精选出来的模拟器并通过一个前端来管理他们。MAME举个例子是一个有数十个参数的命令行应用。但是PiMAME还有一个妙招 - 它安装了一个简单的网页服务器可以在连接上网络后让你通过浏览器来安装新游戏。这是一个很好的优点因为把游戏文件放到正确的目录下是使用MAME的困难之一这还能让你连接到树莓派的存储设备得到最优使用。还有PiMAME会通过用来安装它的脚本更新自己所以保持最新版本就太简单了。目前来说这个非常有用因为在编写这个项目的时候正好在0.8版这样一个重大更新发布的时间点上。我们在三月份早期时发现有一些轻微的不稳定,但是我们确定在你读到这篇文章的时候一切都会解决。
安装PiMAME最好的方式就是先装Raspbian。你可以通过NOOBS安装使用电脑上的图形工具或者通过dd命令把Raspbian的内容直接写入到你的SD卡中。就像我们上个月的BrewPi教程里曾提到的这个过程在之前已经被记录过很多次所以就不再浪费口水了。想简单点就装一下NOOBS参照树莓派网站上的指引。在装好Raspbian并跑起来以后请确保使用配置工具来释放SD卡上的空间以及确保系统已经更新到最新`sudo apt-get update; sudo apt-get upgrade`。然后再确保已经安装好了git工具包。当前任意Raspbian版本都会自带git不过你仍然可以通过命令`sudo apt-get install git`检查一下。
然后再在终端里输入下面的命令把PiMAME安装器从项目的GitHub仓库克隆到本地
git clone https://github.com/ssilverm/pimame_installer
之后,如果命令工作正常的话你应该能看到如下的反馈输出:
Cloning into pimame_installer...
remote: Reusing existing pack: 2306, done.
remote: Total 2306 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2306/2306), 4.61 MiB | 11 KiB/s, done.
Resolving deltas: 100% (823/823), done.
这个命令会创建一个叫pimame_installer的新目录然后下一步就是进入这个目录再执行它里面的脚本
cd pimame_installer/
sudo ./install.sh
这个命令会安装和配置很多软件。所需的时间长短也取决于你的因特网速度因为需要下载大量的包。我们那个简陋的树莓派加15Mb因特网连接用了差不多45分钟来执行完这个脚本在这之后你会收到重启机器的提示。你现在可以安全的通过输入`sudo shutdown -r`来重启了因为这个命令会自动处理剩下的SD卡写入操作。
这就是安装的全部事情了。在重启树莓派后就会自动登录然后会出现PiMAME启动菜单。在0.8版本里这是个非常漂亮的界面有每个支持平台的图片还有红色图标提示已经安装了多少个游戏。现在应该可以用控制器来操作了。如果需要检查控制器是否正确连接可以用SSH连接到树莓派然后检查一下文件**/dev/input/by-id/usb-Ultimarc_I-PAC_Ultimarc_I-PAC-event-kbd**是否存在。
默认的按键配置就可以让你选择要在你的街机上运行哪个模拟器。我们最感兴趣的就是第一个名字叫AdvMAME不过你也许会很惊讶看到还有一个MAME可选的MAME4ALL。MAME4ALL是特别为树莓派构建的使用了旧版的MAME源代码所以它所支持的ROMS的性能也是最佳的。这是很合理的因为你的树莓派不可能玩那些要求很高的游戏所以没有理由苛求模拟器的没必要的兼容性。现在剩下的事情就是找些游戏装到你的系统里参考下面的方法然后尽情享受吧
![](http://www.linuxvoice.com/wp-content/uploads/2014/08/picade1.png)
--------------------------------------------------------------------------------
via: http://www.linuxvoice.com/arcade-machine/
作者:[Ben Everard][a]
译者:[zpl1025](https://github.com/zpl1025)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.linuxvoice.com/author/ben_everard/
[1]:http://www.ultimarc.com/jpac.html

View File

@@ -0,0 +1,52 @@
如何重置CentOS 7的Root密码
===
重置Centos 7 Root密码的方式和Centos 6完全不同。让我来展示一下到底如何操作。
1 - 在启动grub菜单选择编辑选项启动
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/09/Selection_003.png)
2 - 按键盘e键来进入编辑界面
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/09/Selection_005.png)
3 - 找到Linux 16的那一行将ro改为rw init=/sysroot/bin/
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/09/Selection_006.png)
4 - 现在按下 Control+x ,使用单用户模式启动
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/09/Selection_007.png)
5 - 现在,可以使用下面的命令访问系统
chroot /sysroot
6 - 重置密码
passwd root
7 - 更新系统信息
touch /.autorelabel
8 - 退出chroot
exit
9 - 重启你的系统
reboot
就是这样!
---
via: http://www.unixmen.com/reset-root-password-centos-7/
作者M.el Khamlichi
译者:[su-kaiyao](https://github.com/su-kaiyao)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出