mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
commit
d576bf56ca
@ -1,16 +1,16 @@
|
||||
在 Ubuntu中使用 APT-mirror 简单四步配置本地软件仓库
|
||||
使用 APT-mirror 四步配置 Ubuntu 本地软件仓库
|
||||
================================================================================
|
||||
今天,我们将向你展示如何在你的 Ubuntu 个人电脑 或 Ubuntu 服务器 中,直接通过 Ubuntu 官方软件仓库来配置本地软件仓库。在你的电脑中创建一个本地软件仓库有着许多的好处。假如你有许多电脑需要安装软件,安全升级和修复,那么配置一个本地软件仓库是一个高效的方法。因为,所有需要安装的软件包都可以通过快速局域网连接从你的本地服务器中下载,这样可以节省你的网络带宽,降低互联网的年度开支 ...
|
||||
今天,我们将向你展示如何在你的 Ubuntu 个人电脑或 Ubuntu 服务器中,直接通过 Ubuntu 官方软件仓库来配置本地软件仓库。在你的电脑中创建一个本地软件仓库有着许多的好处。假如你有许多电脑需要安装软件 、安全升级和修复补丁,那么配置一个本地软件仓库是一个做这些事情的高效方法。因为,所有需要安装的软件包都可以通过快速的局域网连接从你的本地服务器中下载,这样可以节省你的网络带宽,降低互联网接入的年度开支 ...
|
||||
|
||||
你可以使用多种工具在你的本地个人电脑或服务器中配置一个 Ubuntu 的本地软件仓库,但在本教程中,我们将为你介绍 APT-Mirror。这里,我们将把默认的镜像包镜像到 我们本地的服务器或个人电脑中,并且在本地或外置硬盘中,我们至少需要 **120 GB** 或更多的可用空间。 上面的任务可以通过配置一个 **HTTP** 或 **FTP** 服务器来 与本地系统客户端共享软件包。
|
||||
你可以使用多种工具在你的本地个人电脑或服务器中配置一个 Ubuntu 的本地软件仓库,但在本教程中,我们将为你介绍 APT-Mirror。这里,我们将把默认的镜像包镜像到我们本地的服务器或个人电脑中,并且在你的本地或外置硬盘中,我们至少需要 **120 GB** 或更多的可用空间才行。 我们可以通过配置一个 **HTTP** 或 **FTP** 服务器来与本地系统客户端共享这个软件仓库。
|
||||
|
||||
我们需要安装 Apache 网络服务器和 APT-Mirror 来使得我们的工作得以开始。下面是配置一个可工作的本地软件仓库的步骤:
|
||||
|
||||
### 1. 安装需要的软件包 ###
|
||||
|
||||
首先,我们需要从 Ubuntu 的公共软件包仓库中取得所有的软件包,然后在我们本地的 Ubuntu 服务器硬盘中保存它们。
|
||||
我们需要从 Ubuntu 的公共软件包仓库中取得所有的软件包,然后在我们本地的 Ubuntu 服务器硬盘中保存它们。
|
||||
|
||||
首先我们安装一个网络服务器来承载我们的本地软件仓库。这里我们将安装 Apache 网络服务器,但你可以安装任何你中意的网络服务器,对于 http 协议,网络服务器是必须的。假如你需要配置 ftp 协议 及 rsync 协议,你还可以再分别额外安装 FTP 服务器,如 proftpd, vsftpd 等等 和 Rsync 。
|
||||
首先我们安装一个Web 服务器来承载我们的本地软件仓库。这里我们将安装 Apache Web 服务器,但你可以安装任何你中意的 Web 服务器。对于 http 协议,Web 服务器是必须的。假如你需要配置 ftp 协议 及 rsync 协议,你还可以再分别额外安装 FTP 服务器,如 proftpd, vsftpd 等等 和 Rsync 。
|
||||
|
||||
$ sudo apt-get install apache2
|
||||
|
||||
@ -70,21 +70,21 @@
|
||||
|
||||

|
||||
|
||||
**注: 你可以将上面的官方镜像服务器网址更改为离你最近的服务器的网址,而这可以访问 [Ubuntu Mirror Server][1]来得到。假如你并不着急并可以等待镜像的完成,你可以沿用默认的官方镜像服务器网址。**
|
||||
**注: 你可以将上面的官方镜像服务器网址更改为离你最近的服务器的网址,可以通过访问 [Ubuntu Mirror Server][1]来找到这些服务器地址。假如你并不太在意镜像完成的时间,你可以沿用默认的官方镜像服务器网址。**
|
||||
|
||||
这里,我们将要镜像 最新和最大的 Ubuntu LTS 发行版 --- 即 Ubuntu 14.04 LTS (Trusty Tahr) --- 的软件包仓库,所以在上面的配置中发行版本号为 trusty 。假如我们需要镜像 Saucy 或其他的 Ubuntu 发行版本,请修改上面的 trusy 为相应的代号。
|
||||
这里,我们将要镜像最新和最大的 Ubuntu LTS 发行版 --- 即 Ubuntu 14.04 LTS (Trusty Tahr) --- 的软件包仓库,所以在上面的配置中发行版本号为 trusty 。假如我们需要镜像 Saucy 或其他的 Ubuntu 发行版本,请修改上面的 trusy 为相应的代号。
|
||||
|
||||
现在,我们必须运行 apt-mirror 来下载或镜像 官方仓库中的所有软件包。
|
||||
现在,我们必须运行 apt-mirror 来下载或镜像官方仓库中的所有软件包。
|
||||
|
||||
sudo apt-mirror
|
||||
|
||||
从 Ubuntu 服务器中下载所有的软件包所花费的时间取决于 你和镜像服务器之间的网络连接速率和性能。我已经中断了下载,因为我已经下载好了 ...
|
||||
从 Ubuntu 服务器中下载所有的软件包所花费的时间取决于你和镜像服务器之间的网络连接速率和性能。这里我中断了下载,因为我已经下载好了 ...
|
||||
|
||||

|
||||
|
||||
### 3.配置网络服务器 ###
|
||||
|
||||
为了使得其他的电脑能够取得这个软件仓库,你需要一个网络服务器。你也可以通过 ftp 来完成这件事,但我选择使用一个网络服务器因为在上面的步骤 1 中我提及到使用网络服务器。因此,我们现在要对 Apache 服务器进行配置:
|
||||
为了使得其他的电脑能够访问这个软件仓库,你需要一个Web服务器。你也可以通过 ftp 来完成这件事,但我选择使用一个Web服务器因为在上面的步骤 1 中我提及到使用Web服务器。因此,我们现在要对 Apache 服务器进行配置:
|
||||
|
||||
我们将为我们本地的软件仓库目录 建立一个到 Apache 托管目录 --- 即 `/var/www/ubuntu` --- 的符号链接。
|
||||
|
||||
@ -105,7 +105,7 @@
|
||||
|
||||
deb http://192.168.0.100/ubuntu/ trusty main restricted universe
|
||||
|
||||
**注: 这里的 192.168.0.100 是我们的服务器电脑的 局域网 IP 地址,你需要替换为你的服务器电脑的局域网 IP 地址**
|
||||
**注: 这里的 192.168.0.100 是我们的服务器电脑的局域网 IP 地址,你需要替换为你的服务器电脑的局域网 IP 地址**
|
||||
|
||||
$ sudo apt-get update
|
||||
|
||||
@ -117,7 +117,7 @@ via: http://linoxide.com/ubuntu-how-to/setup-local-repository-ubuntu/
|
||||
|
||||
作者:[Arun Pyasi][a]
|
||||
译者:[FSSlc](https://github.com/FSSlc)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -2,13 +2,13 @@
|
||||
================================================================================
|
||||

|
||||
|
||||
[WinUSB][1]是一款即简单又有用的工具,可以让你从 Windows ISO 镜像或者 DVD 中创建 USB 安装盘。它结合了 GUI 和命令行,你可以根据你的喜好决定使用哪种。
|
||||
[WinUSB][1]是一款即简单又有用的工具,可以让你从 Windows ISO 镜像或者 DVD 中创建 USB 安装盘(LCTT译注:支持将 Windows Vista/7/8/PE 制作成 USB 安装盘)。它支持 GUI 和命令行,你可以根据你的喜好决定使用哪种。
|
||||
|
||||
在本文中我们会展示**如何在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB**。
|
||||
|
||||
### 在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB ###
|
||||
|
||||
在 Ubuntu 13.10 之前, WinUSBu 一直都在积极开发,且在官方 PPA 中可以找到。这个 PPA 还没有为 Ubuntu 14.04 和 14.10 更新,但是二进制文件仍旧可在更新版本的 Ubuntu 和 Linux Mint 中运行。基于[你使用的系统是32位还是64位][2],使用下面的命令来下载二进制文件:
|
||||
在 Ubuntu 13.10 之前, WinUSB 一直都在积极开发,且在官方 PPA 中可以找到。但这个 PPA 还没有为 Ubuntu 14.04 和 14.10 更新,不过其二进制文件仍旧可在更新版本的 Ubuntu 和 Linux Mint 中运行。基于[你使用的系统是32位还是64位][2],使用下面的命令来下载二进制文件:
|
||||
|
||||
打开终端,32位的系统下使用下面的命令:
|
||||
|
||||
@ -18,11 +18,11 @@
|
||||
|
||||
wget https://launchpad.net/~colingille/+archive/freshlight/+files/winusb_1.0.11+saucy1_amd64.deb
|
||||
|
||||
一旦你下载了正确的二进制包,你可以用下面的命令安装WinUSB:
|
||||
当你下载了正确的二进制包,你可以用下面的命令安装WinUSB:
|
||||
|
||||
sudo dpkg -i winusb*
|
||||
|
||||
不要担心在你安装WinUSB时看到错误。使用这条命令修复依赖错误:
|
||||
不要担心在你安装WinUSB时看到的错误。使用这条命令修复依赖错误:
|
||||
|
||||
sudo apt-get -f install
|
||||
|
@ -1,10 +1,10 @@
|
||||
如何在Linux上使用dupeGuru删除重复文件
|
||||
删除重复文件的神器:dupeGuru
|
||||
================================================================================
|
||||
最近,我被要求清理我父亲的文件和文件夹。有一个难题是,里面存在很多不正确的名字的重复文件。有移动硬盘的备份,同时还为同一个文件编辑了多个版本,甚至改变的目录结构,同一个文件被复制了好几次,改变名字,改变位置等,这些挤满了磁盘空间。追踪每一个文件成了一个最大的问题。万幸的是,有一个小巧的软件可以帮助你省下很多时间来找到删除你系统中重复的文件:[dupeGuru][1]。它用Python写成,这个去重软件几个小时钱前切换到了GPLv3许可证。因此是时候用它来清理你的文件了!
|
||||
最近,我需要清理我父亲的文件和文件夹。有一个难题是,里面存在很多不正确的名字的重复文件。有移动硬盘的备份,同时还为同一个文件编辑了多个版本,甚至改变的目录结构,同一个文件被复制了好几次,名字改变,位置改变等,这些文件挤满了磁盘空间。追踪每一个文件成了一个最大的问题。万幸的是,有一个小巧的软件可以帮助你省下很多时间来找到删除你系统中重复的文件:[dupeGuru][1]。它用Python写成,这个去重软件几个小时前切换到了GPLv3许可证。因此是时候用它来清理你的文件了!
|
||||
|
||||
### dupeGuru的安装 ###
|
||||
|
||||
在Ubuntu上, 你可以加入Hardcoded的软件PPA:
|
||||
在Ubuntu上, 你可以加入如下硬编码的软件PPA:
|
||||
|
||||
$ sudo apt-add-repository ppa:hsoft/ppa
|
||||
$ sudo apt-get update
|
||||
@ -33,29 +33,29 @@ DupeGuru的构想是既快又安全。这意味着程序不会在你的系统上
|
||||
|
||||

|
||||
|
||||
注意的是默认上dupeGuru基于文件的内容匹配,而不是他们的名字。为了防止意外地删除了重要的文件,匹配那列列出了使用的匹配算法。在这里,你可以选择你想要删除的匹配文件,并按下“Action” 按钮来看到可用的操作。
|
||||
注意的是默认上dupeGuru基于文件的内容匹配,而不是他们的名字。为了防止意外地删除了重要的文件,匹配列列出了其使用的匹配算法。在这里,你可以选择你想要删除的匹配文件,并按下“Action” 按钮来看到可用的操作。
|
||||
|
||||

|
||||
|
||||
可用的选项是相当广泛的。简而言之,你可以删除重复、移动到另外的位置、忽略它们、打开它们、重命名它们甚至用自定义命令运行它们。如果你选择删除重复文件,你可能会像我一样非常意外竟然还有删除选项。
|
||||
可用的选项相当广泛。简而言之,你可以删除重复、移动到另外的位置、忽略它们、打开它们、重命名它们甚至用自定义命令运行它们。如果你希望删除重复文件,你可能会像我一样非常意外竟然有这么多种删除方式。
|
||||
|
||||

|
||||
|
||||
你不及可以将删除文件移到垃圾箱或者永久删除,还可以选择留下指向原文件的链接(软链接或者硬链接)。也就是说,重复文件按将会删除但是会保留下指向原文件的链接。这将会省下大量的磁盘空间。如果你将这些文件导入到工作空间或者它们有一些依赖时很有用。
|
||||
你不仅可以将删除的文件移到垃圾箱或者永久删除,还可以选择留下指向原文件的链接(软链接或者硬链接)。也就是说,重复文件将会删除文件存储,但是会保留下一个指向原文件的链接。这将会省下大量的磁盘空间。如果你将这些文件导入到工作空间或者它们有一些依赖时很有用。
|
||||
|
||||
还有一个奇特的选项:你可以用HTML或者CSV文件导出结果。不确定你会不会这么做,但是我假设你想追踪重复文件而不是想让dupeGuru处理它们时会有用。
|
||||
还有一个奇特的选项:你可以用HTML或者CSV文件导出结果。我不确定你会不会需要这么做,但是我假设你想追踪重复文件而不是想让dupeGuru处理它们时会有用。
|
||||
|
||||
最后但并不是最不重要的是,偏好菜单可以让你对去重的想法成真。
|
||||
最后但并不是最不重要的是,偏好菜单可以让你按照你的想法来操作去重这件事。
|
||||
|
||||

|
||||
|
||||
这里你可以选择扫描的标准,基于内容还是基于文字,并且有一个阈值来控制结果的数量。这里同样可以定义自定义在执行中可以选择的命令。在无数其他小的选项中,要注意的是dupeGuru默认忽略小于10KB的文件。
|
||||
这里你可以选择扫描的标准,基于内容还是基于名字,并且有一个阈值来控制结果的数量。这里同样可以定义自定义在执行中可以选择的命令。混在其他那些小的选项中,要注意的是dupeGuru默认忽略小于10KB的文件。
|
||||
|
||||
要了解更多的信息,我建议你到[official website][4]官方网站看下,这里有很多文档、论坛支持和其他好东西。
|
||||
要了解更多的信息,我建议你到[官方网站][4]看下,这里有很多文档、论坛支持和其他好东西。
|
||||
|
||||
总结一下,dupeGuru是我无论何时准备备份或者释放空间时想到的软件。我发现这对高级用户而言也足够强大了,对新人而言也很直观。锦上添花的是:dupeGuru是跨平台的额,这意味着你可以在Mac或者在Windows PC上都可以使用。如果你有特定的需求,想要清理音乐或者图片。这里有两个变种:[dupeguru-me][5]和 [dupeguru-pe][6], 相应地可以清理音频和图片文件。与常规版本的不同是它不仅比较文件格式还比较特定的媒体数据像质量和码率。
|
||||
总结一下,dupeGuru是我无论何时准备备份或者释放空间时所想到的软件。我发现这对高级用户而言也足够强大了,对新人而言也很直观。锦上添花的是:dupeGuru是跨平台的,这意味着你可以在Mac或者在Windows PC上都可以使用。如果你有特定的需求,想要清理音乐或者图片。这里有两个变种:[dupeguru-me][5]和 [dupeguru-pe][6], 相应地可以清理音频和图片文件。与常规版本的不同是它不仅比较文件格式还比较特定的媒体数据像质量和码率。
|
||||
|
||||
你dupeGuru怎么样?你会考虑使用它么?或者你有任何可以替代的软件的建议么?让我在评论区知道你们的想法。
|
||||
你觉得dupeGuru怎么样?你会考虑使用它么?或者你有任何可以替代的软件的建议么?让我在评论区知道你们的想法。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -63,7 +63,7 @@ via: http://xmodulo.com/dupeguru-deduplicate-files-linux.html
|
||||
|
||||
作者:[Adrien Brochard][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/) 荣誉推出
|
||||
|
@ -1,20 +1,21 @@
|
||||
SaltStack:Linux服务器配置管理神器
|
||||
通过 SaltStack 管理服务器配置
|
||||
================================================================================
|
||||

|
||||
|
||||
我在搜索[Puppet][1]的替代品时,偶然间碰到了Salt。我喜欢puppet,但是我又爱上Salt了:)。我发现Salt在配置和使用上都要比Puppet简单,当然这只是一家之言,你大可不必介怀。另外一个爱上Salt的理由是,它可以让你从命令行管理服务器配置,比如:
|
||||
|
||||
要通过Salt来更新所有服务器,你只需运行以下命令
|
||||
要通过Salt来更新所有服务器,你只需运行以下命令即可
|
||||
|
||||
salt ‘*’ pkg.upgrade
|
||||
salt '*' pkg.upgrade
|
||||
|
||||
**安装SaltStack到Linux上。**
|
||||
|
||||
如果你是在CentOS 6/7上安装的话,那么Salt可以通过EPEL仓库获取到。而对于Pi和Ubuntu Linux用户,你可以从[这里][2]添加Salt仓库。Salt是基于python的,所以你也可以使用‘pip’来安装,但是你得用yum-utils或是其它包管理器来自己处理它的依赖关系哦。
|
||||
##安装SaltStack到Linux上##
|
||||
|
||||
Salt遵循服务器-客户端模式,服务器端称为领主,而客户端则称为下属。
|
||||
如果你是在CentOS 6/7上安装的话,那么Salt可以通过EPEL仓库获取到。而对于Pi和Ubuntu Linux用户,你可以从[这里][2]添加Salt仓库。Salt是基于python的,所以你也可以使用‘pip’来安装,但是你得用yum-utils或是其它包管理器来自己处理它的依赖关系。
|
||||
|
||||
**安装并配置Salt领主**
|
||||
Salt采用服务器-客户端模式,服务器端称为领主,而客户端则称为下属。
|
||||
|
||||
###安装并配置Salt领主###
|
||||
|
||||
[root@salt-master~]# yum install salt-master
|
||||
|
||||
@ -27,7 +28,7 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但
|
||||
|
||||
[root@salt-master ~]# systemctl start salt-master
|
||||
|
||||
**安装并配置Salt下属**
|
||||
###安装并配置Salt下属###
|
||||
|
||||
[root@salt-minion~]#yum install salt-minion
|
||||
|
||||
@ -39,7 +40,7 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但
|
||||
|
||||
在启动时,下属客户机会生成一个密钥和一个id。然后,它会连接到Salt领主服务器并验证自己的身份。Salt领主服务器在允许下属客户机下载配置之前,必须接受下属的密钥。
|
||||
|
||||
**在Salt领主服务器上列出并接受密钥**
|
||||
###在Salt领主服务器上列出并接受密钥###
|
||||
|
||||
# 列出所有密钥
|
||||
[root@salt-master~] salt-key -L
|
||||
@ -59,7 +60,7 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但
|
||||
|
||||
在接受下属客户机的密钥后,你可以使用‘salt’命令来立即获取信息。
|
||||
|
||||
**Salt命令行实例**
|
||||
##Salt命令行实例##
|
||||
|
||||
# 检查下属是否启动并运行
|
||||
[root@salt-master~] salt 'minion.com' test.ping
|
||||
@ -75,15 +76,15 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但
|
||||
# 安装/更新所有服务器上的软件
|
||||
[root@salt-master ~]# salt '*' pkg.install git
|
||||
|
||||
salt命令需要一些组件来发送信息,其中之一是mimion id,而另一个是下属客户机上要调用的函数。
|
||||
salt命令需要一些组件来发送信息,其中之一是下属客户机的id,而另一个是下属客户机上要调用的函数。
|
||||
|
||||
在第一个实例中,我使用‘test’模块的‘ping’函数来检查系统是否启动。该函数并不是真的实施一次ping,它仅仅是在下属客户机作出回应时返回‘真’。
|
||||
|
||||
‘cmd.run’用于执行远程命令,而‘pkg’模块包含了包管理的函数。本文结尾提供了全部内建模块的列表。
|
||||
|
||||
**颗粒实例**
|
||||
###颗粒实例###
|
||||
|
||||
Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用颗粒在指定属性的系统上运行命令。
|
||||
Salt使用一个名为**颗粒(Grains)**的界面来获取系统信息。你可以使用颗粒在指定属性的系统上运行命令。
|
||||
|
||||
[root@vps4544 ~]# salt -G 'os:Centos' test.ping
|
||||
minion:
|
||||
@ -91,11 +92,11 @@ Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用
|
||||
|
||||
更多颗粒实例,请访问http://docs.saltstack.com/en/latest/topics/targeting/grains.html
|
||||
|
||||
**通过状态文件系统进行包管理。**
|
||||
##通过状态文件系统进行包管理##
|
||||
|
||||
为了是软件配置自动化,你需要使用状态系统,并创建状态文件。这些文件使用YAML格式和python字典、列表、字符串以及编号来构成数据结构。将这些文件从头到尾研读一遍,这将有助于你更好地理解它的配置。
|
||||
为了使软件配置自动化,你需要使用状态系统,并创建状态文件。这些文件使用YAML格式和python字典、列表、字符串以及编号来构成数据结构。将这些文件从头到尾研读一遍,这将有助于你更好地理解它的配置。
|
||||
|
||||
**VIM状态文件实例**
|
||||
###VIM状态文件实例###
|
||||
|
||||
[root@salt-master~]# vim /srv/salt/vim.sls
|
||||
vim-enhanced:
|
||||
@ -107,7 +108,7 @@ Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用
|
||||
- group: root
|
||||
- mode: 644
|
||||
|
||||
该文件的第一和第三行成为状态id,它们必须包含有需要管理的包或文件的确切名称或路径。在状态id之后是状态和函数声明,‘pkg’和‘file’是状态声明,而‘installed’和‘managed’是函数声明。函数接受参数,用户、组、模式和源都是函数‘managed’的参数。
|
||||
该文件的第一和第三行称为状态id,它们必须包含有需要管理的包或文件的确切名称或路径。在状态id之后是状态和函数声明,‘pkg’和‘file’是状态声明,而‘installed’和‘managed’是函数声明。函数接受参数,用户、组、模式和源都是函数‘managed’的参数。
|
||||
|
||||
要将该配置应用到下属客户端,请移动你的‘vimrc’文件到‘/src/salt’,然后运行以下命令。
|
||||
|
||||
@ -253,7 +254,7 @@ Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用
|
||||
[root@vps4544 ssh]# cp /etc/ssh/sshd_config /srv/salt/ssh/
|
||||
[root@vps4544 ssh]# salt 'minion.com' state.sls ssh
|
||||
|
||||
**Top文件和环境。**
|
||||
###Top文件和环境###
|
||||
|
||||
top文件(top.sls)是用来定义你的环境的文件,它允许你映射下属客户机到包,默认环境是‘base’。你需要定义在基本环境下,哪个包会被安装到哪台服务器。
|
||||
|
||||
@ -268,7 +269,7 @@ top文件(top.sls)是用来定义你的环境的文件,它允许你映射
|
||||
dev:
|
||||
- /srv/salt/dev
|
||||
|
||||
现在,添加一个top.sls文件到/src/salt
|
||||
现在,添加一个top.sls文件到/src/salt。
|
||||
|
||||
[root@salt-master ~]# vim /srv/salt/top.sls
|
||||
base:
|
||||
@ -299,7 +300,9 @@ top文件(top.sls)是用来定义你的环境的文件,它允许你映射
|
||||
|
||||
下属客户机将下载top文件并搜索用于它的配置,领主服务器也会将配置应用到所有下属客户机。
|
||||
|
||||
这仅仅是一个Salt的简明教程,如果你想要深入学习并理解,你可以访问以下链接。如果你已经在使用Salt,那么请告诉我你的建议和意见吧。
|
||||
---
|
||||
|
||||
这仅仅是一个Salt的简明教程,如果你想要深入学习并理解,你可以访问下面的链接。如果你已经在使用Salt,那么请告诉我你的建议和意见吧。
|
||||
|
||||
更新: [Foreman][3] 已经通过[插件][4]支持salt。
|
||||
|
||||
@ -329,7 +332,7 @@ via: http://techarena51.com/index.php/getting-started-with-saltstack/
|
||||
|
||||
作者:[Leo G][a]
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -10,7 +10,7 @@ nmcli的通常语法是:
|
||||
|
||||
# nmcli [ OPTIONS ] OBJECT { COMMAND | help }
|
||||
|
||||
一件很酷的事情是你可以使用tab键来补全操作,这样你在何时忘记了语法你都可以用tab来看到可用的选项了。
|
||||
一件很酷的事情是你可以使用tab键来补全操作,这样你在何时忘记了语法你都可以按下tab来看到可用的选项了。
|
||||
|
||||

|
||||
|
||||
@ -46,33 +46,33 @@ nmcli通常用法的一些例子:
|
||||
|
||||
# nmcli device connect eno16777736
|
||||
|
||||
### 使用静态IP添加一个以太网连接 ###
|
||||
### 添加一个使用静态IP的以太网连接 ###
|
||||
|
||||
要用静态IP添加一个以太网连接可以使用下面的命令:
|
||||
|
||||
# nmcli connection add type ethernet con-name NAME_OF_CONNECTION ifname interface-name ip4 IP_ADDRESS gw4 GW_ADDRESS
|
||||
# nmcli connection add type ethernet con-name NAME_OF_CONNECTION ifname INTERFACE-NAME ip4 IP_ADDRESS gw4 GW_ADDRESS
|
||||
|
||||
将NAME_OF_CONNECTION替换成新的连接名,IP_ADDRESS替换成你要的IP地址,GW_ADDRESS替换成你使用的网关地址(如果你并不使用网关,你可以忽略这部分)。
|
||||
将NAME_OF_CONNECTION替换成新的连接名(LCTT 译注:这个名字以后可以用来对其操作,可以使用任何简单明了的名称),INTERFACE-NAME 替换成你的接口名,IP_ADDRESS替换成你要的IP地址,GW_ADDRESS替换成你使用的网关地址(如果你并不使用网关,你可以忽略这部分)。
|
||||
|
||||
# nmcli connection add type ethernet con-name NEW ifname eno16777736 ip4 192.168.1.141 gw4 192.168.1.1
|
||||
# nmcli connection add type ethernet con-name NEW_STATIC ifname eno16777736 ip4 192.168.1.141 gw4 192.168.1.1
|
||||
|
||||
=要设置这个连接的DNS服务器使用下面的命令:
|
||||
要设置这个连接所使用的DNS服务器使用下面的命令:
|
||||
|
||||
# nmcli connection modify NEW ipv4.dns "8.8.8.8 8.8.4.4"
|
||||
# nmcli connection modify NEW_STATIC ipv4.dns "8.8.8.8 8.8.4.4"
|
||||
|
||||
要启用新的以太网连接,使用下面的命令:
|
||||
|
||||
# nmcli connection up NEW ifname eno16777736
|
||||
# nmcli connection up NEW_STATIC ifname eno16777736
|
||||
|
||||
要查看新配置连接的详细信息,使用下面的命令:
|
||||
|
||||
# nmcli -p connection show NEW
|
||||
# nmcli -p connection show NEW_STATIC
|
||||
|
||||

|
||||
|
||||
### 添加一个使用DHCP的连接 ###
|
||||
|
||||
如果你想要添加一个使用DHCP来配置接口IP地址、网关地址和dns服务器地址的新的连接,你要做的就是忽略命令中的ip/gw部分,NetworkManager会自动使用DHCP来获取配置细节。
|
||||
如果你想要添加一个使用DHCP来配置接口IP地址、网关地址和dns服务器地址的新的连接,你要做的就是忽略上述命令中的ip/gw部分,NetworkManager会自动使用DHCP来获取配置细节。
|
||||
|
||||
比如,要创建一个新的叫NEW_DHCP的DHCP连接,在设备eno16777736上你可以使用下面的命令:
|
||||
|
||||
@ -84,7 +84,7 @@ via: http://linoxide.com/linux-command/nmcli-tool-red-hat-centos-7/
|
||||
|
||||
作者:[Adrian Dinu][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/) 荣誉推出
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
[在Ubuntu中安装Mate桌面][1]是一码事但是你或许想要知道如何**配置Mate桌面**? 大多数桌面环境都有它们自己的调整工具。比如Unity有Unity Tweak,Gnome有Gnome Tweak,Elementary OS有 Elementary OS Teweak。好消息是Mate桌面也有它自己的调整工具,叫Mate Tweak][2]。
|
||||
|
||||
Mate Tweak是[mintDesktop][3]的克隆分支,一款Linux Mint的配置工具。
|
||||
Mate Tweak是[mintDesktop][3]的克隆分支,那是一款Linux Mint的配置工具。
|
||||
|
||||
### 安装Mate Tweak来配置Mate桌面 ###
|
||||
|
||||
@ -22,7 +22,7 @@ via: http://itsfoss.com/configure-mate-desktop-mate-tweak/
|
||||
|
||||
作者:[Abhishek][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/) 荣誉推出
|
||||
|
@ -2,7 +2,7 @@ Linux 有问必答: 如何在Linux中加入cron任务
|
||||
================================================================================
|
||||
> **提问**: 我想在我的Linux中安排一个计划任务,该任务在固定时间周期性地运行。我该如何在Linux中添加一个cron任务?
|
||||
|
||||
cron是Linux中默认的计划任务。使用cron,你可以安排一个计划(比如:命令或者shell脚本)周期性地运行或者在指定的小时、天、周、月等特定时间运行。cron在你安排不同的常规维护任务时是很有用的,比如周期性地备份、日志循环、检查文件系统、监测磁盘空间等等。
|
||||
cron是Linux中默认的计划任务。使用cron,你可以安排一个计划(比如:命令或者shell脚本)周期性地运行或者在指定的分钟、小时、天、周、月等特定时间运行。cron在你安排不同的常规维护任务时是很有用的,比如周期性地备份、日志循环、检查文件系统、监测磁盘空间等等。
|
||||
|
||||
### 从命令行中添加cron任务 ###
|
||||
|
||||
@ -22,7 +22,7 @@ cron是Linux中默认的计划任务。使用cron,你可以安排一个计划
|
||||
|
||||
每个cron任务的格式如下。
|
||||
|
||||
<minute> <hour> <day-of-month> <month-of-year> <day-of-week> <command>
|
||||
<分钟> <小时> <日> <月> <星期> <命令>
|
||||
|
||||
前5个元素定义了任务的计划,最后一个元素是命令或者脚本的完整路径。
|
||||
|
||||
@ -30,13 +30,13 @@ cron是Linux中默认的计划任务。使用cron,你可以安排一个计划
|
||||
|
||||
下面是一些cron任务示例。
|
||||
|
||||
- *** * * * * /home/dan/bin/script.sh**: 每分钟运行。
|
||||
- **\* * * * * /home/dan/bin/script.sh**: 每分钟运行。
|
||||
- **0 * * * * /home/dan/bin/script.sh**: 每小时运行。
|
||||
- **0 0 * * * /home/dan/bin/script.sh**: 每12小时运行。
|
||||
- **0 0 * * * /home/dan/bin/script.sh**: 每天零点运行。
|
||||
- **0 9,18 * * * /home/dan/bin/script.sh**: 在每天的9AM和6PM运行。
|
||||
- **0 9-18 * * * /home/dan/bin/script.sh**: 在9AM到6PM的每个小时运行。
|
||||
- **0 9-18 * * 1-5 /home/dan/bin/script.sh**: 周一到周五的9AM到6PM每小时运行。
|
||||
- ***/10 * * * * /home/dan/bin/script.sh**: 每10分钟运行。
|
||||
- **\*/10 * * * * /home/dan/bin/script.sh**: 每10分钟运行。
|
||||
|
||||
一旦完成上面的设置步骤后,按下Ctrl+X来保存并退出编辑器。此时,新增的计划任务应该已经激活了。
|
||||
|
||||
@ -61,6 +61,6 @@ cron是Linux中默认的计划任务。使用cron,你可以安排一个计划
|
||||
via: http://ask.xmodulo.com/add-cron-job-linux.html
|
||||
|
||||
译者:[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/) 荣誉推出
|
@ -1,3 +1,5 @@
|
||||
Translating by FSSlc
|
||||
|
||||
11 Useful Utilities To Supercharge Your Ubuntu Experience
|
||||
================================================================================
|
||||
**Whether you’re a relative novice or a seasoned pro, we all want to get the most from our operating system. Ubuntu, like most modern OSes, has more to offer than what is presented at first blush.**
|
||||
|
@ -1,3 +1,4 @@
|
||||
translating by coloka
|
||||
What are useful command-line network monitors on Linux
|
||||
================================================================================
|
||||
Network monitoring is a critical IT function for businesses of all sizes. The goal of network monitoring can vary. For example, the monitoring activity can be part of long-term network provisioning, security protection, performance troubleshooting, network usage accounting, and so on. Depending on its goal, network monitoring is done in many different ways, such as performing packet-level sniffing, collecting flow-level statistics, actively injecting probes into the network, parsing server logs, etc.
|
||||
|
@ -1,69 +0,0 @@
|
||||
How to apply image effects to pictures on Raspberry Pi
|
||||
================================================================================
|
||||
Like a common pocket camera which has a built-in function to add various effects on captured photos, [Raspberry Pi camera board][1] ("raspi cam") can actually do the same. With the help of raspistill camera control options, we can add the image effects function like we have in a pocket camera.
|
||||
|
||||
There are [three comman-line applications][2] which can be utilized for [taking videos or pictures][3] with raspi cam, and one of them is the raspistill application. The raspistill tool offers various camera control options such as sharpness, contrast, brightness, saturation, ISO, exposure, automatic white balance (AWB), image effects.
|
||||
|
||||
In this article I will show how to apply exposure, AWB, and other image effects with raspistill while capturing pictures using raspi cam. To automate the process, I wrote a simple Python script which takes pictures and automatically applies a series of image effects to the pictures. The raspi cam documentation describes available types of the exposure, AWB, and image effects. In total, the raspi cam offers 16 types of image effects, 12 types of exposure, and 10 types of AWB values.
|
||||
|
||||
The simple Python script looks like the following.
|
||||
|
||||
#!/usb/bin/python
|
||||
import os
|
||||
import time
|
||||
import subprocess
|
||||
list_ex=['auto','night']
|
||||
list_awb=['auto','cloud',flash']
|
||||
list_ifx=['blur','cartoon','colourswap','emboss','film','gpen','hatch','negative','oilpaint','posterise','sketch','solarise','watercolour']
|
||||
x=0
|
||||
for ex in list_ex:
|
||||
for awb in list_awb:
|
||||
for ifx in list_ifx:
|
||||
x=x+1
|
||||
filename='img_'+ex+'_'+awb+'_'+ifx+'.jpg'
|
||||
cmd='raspistill -o '+filename+' -n -t 1000 -ex '+ex+' -awb '+awb+' -ifx '+ifx+' -w 640 -h 480'
|
||||
pid=subprocess.call(cmd,shell=True)
|
||||
print "["+str(x)+"]-"+ex+"_"+awb+"_"+ifx+".jpg"
|
||||
time.sleep(0.25)
|
||||
print "End of image capture"
|
||||
|
||||
The Python script operates as follows. First, create three array/list variable for the exposure, AWB and image effects. In the example, we use 2 types of exposure, 3 types of AWB, and 13 types of image effects values. Then make nested loops for applying the value of the three variables that we have. Inside the nested loop, execute the raspistill application. We specify (1) the output filename; (2) exposure value; (3) AWB value; (4) image effect value; (5) the time to take a photo, which is set to 1 second; and (6) the size of the photo, which is set to 640x480px. This Python script will create 78 different versions of a captured photo with a combination of 2 types of exposure, 3 types of AWB, and 13 types of image effects.
|
||||
|
||||
To execute the Python script, simply type:
|
||||
|
||||
$ python name_of_this_script.py
|
||||
|
||||
Here is the first round of the sample result.
|
||||
|
||||

|
||||
|
||||
### Bonus ###
|
||||
|
||||
For those who are more interested, there is another way to access and control the raspi cam besides raspistill. [Picamera][4] a pure Python interface which provides APIs for accessing and controlling raspi cam, so that one can build a complex program for utilizing raspi cam according to their needs. If you are skilled at Python, picamera is a good feature-complete interface for implementing your raspi cam project. The picamera interface is included by default in the recent image of Raspbian. If your [Raspberry Pi][5] operating system is not new or not Raspbian, you can install it on your system as follows.
|
||||
|
||||
First, install pip on your system by following [this guideline][6].
|
||||
|
||||
Then, install picamera as follows.
|
||||
|
||||
$ sudo pip install picamera
|
||||
|
||||
Refer to the [official documentation][7] on how to use picamera.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/apply-image-effects-pictures-raspberrypi.html
|
||||
|
||||
作者:[Kristophorus Hadiono][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/kristophorus
|
||||
[1]:http://xmodulo.com/go/picam
|
||||
[2]:http://www.raspberrypi.org/documentation/usage/camera/raspicam/
|
||||
[3]:http://xmodulo.com/install-raspberry-pi-camera-board.html
|
||||
[4]:https://pypi.python.org/pypi/picamera
|
||||
[5]:http://xmodulo.com/go/raspberrypi
|
||||
[6]:http://ask.xmodulo.com/install-pip-linux.html
|
||||
[7]:http://picamera.readthedocs.org/
|
@ -1,46 +0,0 @@
|
||||
How To Make GDebi Default Instead of Ubuntu Software Center
|
||||
================================================================================
|
||||

|
||||
|
||||
If you use Ubuntu or Ubuntu based Linux distribution such as Elementary OS Freya, you might be using Ubuntu Software Center to install .deb executable files. Ubuntu Software Center is a nice application for finding and installing apps but it is resource heavy and slow. This is why I prefer using [App Grid, a lighter alternative of Ubuntu Software Center][1].
|
||||
|
||||
Now, if you just trying to install a .deb file, I would not recommend either of Ubuntu Software Center or App Grid. I suggest GDebi, a dedicated program for installing Debian executable files. It is extremely lightweight and focused on installing .deb files. Best thing about GDebi is that it also shows the dependencies that will be installed along with the desired program.
|
||||
|
||||
In this post we shall see **how to install GDebi and use it as the default installer instead of Ubuntu Software Center**.
|
||||
|
||||
### Install GDebi in Ubuntu and other Linux distributions ###
|
||||
|
||||
Open a terminal and use the following command:
|
||||
|
||||
sudo apt-get install gdebi
|
||||
|
||||
### Make GDebi default for .deb installation ###
|
||||
|
||||
Once you have installed GDebi, it’s time to see how to make it the default application for installing .deb files. Please note that I am using Elementary OS Freya in this tutorial but the steps are applicable to all Ubuntu based distribution. Just the screenshots may look different.
|
||||
|
||||
Download a .deb file first. Let’s say you have downloaded Google Chrome. Go to the download directory and right click on the .deb file. In here, go to **properties**.
|
||||
|
||||

|
||||
|
||||
In the properties, you should see the option of **open with**. Click on it and change it to GDebi.
|
||||
|
||||

|
||||
|
||||
Next time you double click on a .deb file, it will automatically open GDebi to install the .deb file. Indeed using such light applications is a good way to [speed up Ubuntu][2] or other Linux systems.
|
||||
|
||||
What do you say? You still prefer Ubuntu Software Center for application installation or GDebi? Or if you are old school, [Synaptic Package Manager][3] perhaps? Which one is your favorite?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/gdebi-default-ubuntu-software-center/
|
||||
|
||||
作者:[Abhishek][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://itsfoss.com/author/abhishek/
|
||||
[1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/
|
||||
[2]:http://itsfoss.com/speed-up-ubuntu-1310/
|
||||
[3]:http://www.nongnu.org/synaptic/
|
@ -1,3 +1,5 @@
|
||||
translating by martin.
|
||||
|
||||
How to share files between computers over network with btsync
|
||||
================================================================================
|
||||
If you are the type of person who uses several devices to work online, I'm sure you must be using, or at least wishing to use, a method for syncing files and directories among those devices.
|
||||
@ -133,4 +135,4 @@ via: http://xmodulo.com/share-files-between-computers-over-network.html
|
||||
[1]:https://play.google.com/store/apps/details?id=com.bittorrent.sync
|
||||
[2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116
|
||||
[3]:http://www.getsync.com/
|
||||
[4]:http://www.getsync.com/tech-specs
|
||||
[4]:http://www.getsync.com/tech-specs
|
||||
|
@ -0,0 +1,71 @@
|
||||
如何在树莓派上使用图片特效
|
||||
================================================================================
|
||||
现在使用[树莓派摄像头模组][1]("raspi cam"),也可以像使用卡片相机那样,给拍摄的照片增加各种各样的图片特效。 raspistill命令行工具,为您的树莓派提供了丰富的图片特效选项,来美化处理你的图片。
|
||||
|
||||
你可以用[这3个命令行工具][2]来[抓取raspicam拍摄的照片或者视频][3],在这文章中将重点介绍其中的raspstill工具。raspstill工具提供了丰富的控制选项来处理图片,比如说:锐度(sharpness)、对比度(contrast)、亮度(brightness)、饱和度(saturation)、ISO、自动白平衡(AWB)、以及图片特效(image effect)等。
|
||||
|
||||
在这篇文章中,将介绍如何使用raspstill工具以及raspicam摄像头模组来控制照片的曝光、AWB以及其他的图片效果。我写了一个简单的python脚本来自动拍摄照片并在这些照片上自动应用各种图片特效。raspicam的帮助文档中介绍了该摄像头模组所支持的曝光模式、AWB和图片特效。总的来说,raspicam一共支持16种图片特效、12种曝光模式以及10种AWB选项。
|
||||
|
||||
Python脚本很简单,如下所示 。
|
||||
|
||||
#!/usb/bin/python
|
||||
import os
|
||||
import time
|
||||
import subprocess
|
||||
list_ex=['auto','night']
|
||||
list_awb=['auto','cloud',flash']
|
||||
list_ifx=['blur','cartoon','colourswap','emboss','film','gpen','hatch','negative','oilpaint','posterise','sketch','solarise','watercolour']
|
||||
x=0
|
||||
for ex in list_ex:
|
||||
for awb in list_awb:
|
||||
for ifx in list_ifx:
|
||||
x=x+1
|
||||
filename='img_'+ex+'_'+awb+'_'+ifx+'.jpg'
|
||||
cmd='raspistill -o '+filename+' -n -t 1000 -ex '+ex+' -awb '+awb+' -ifx '+ifx+' -w 640 -h 480'
|
||||
pid=subprocess.call(cmd,shell=True)
|
||||
print "["+str(x)+"]-"+ex+"_"+awb+"_"+ifx+".jpg"
|
||||
time.sleep(0.25)
|
||||
print "End of image capture"
|
||||
|
||||
The Python script operates as follows. First, create three array/list variable for the exposure, AWB and image effects. In the example, we use 2 types of exposure, 3 types of AWB, and 13 types of image effects values. Then make nested loops for applying the value of the three variables that we have. Inside the nested loop, execute the raspistill application. We specify (1) the output filename; (2) exposure value; (3) AWB value; (4) image effect value; (5) the time to take a photo, which is set to 1 second; and (6) the size of the photo, which is set to 640x480px. This Python script will create 78 different versions of a captured photo with a combination of 2 types of exposure, 3 types of AWB, and 13 types of image effects.
|
||||
|
||||
这个脚本完成了以下几个工作。首先,脚本中定义了3个列表,分别用于枚举曝光模式、AWB模式以及图片特效。在这个实例中,我们将使用到2种曝光模式、3种AWB模式以及13种图片特效。脚本会遍历上述3种选项的各种组合,并使用这些参数组合来运行raspistill工具。传入的参数共6个,分别为:(1)输出文件名;(2)曝光模式;(3)AWB模式;(4)图片特效模式;(5)拍照时间,设为1秒;(6)图片尺寸,设为640x480。脚本会自动拍摄78张照片,每张照片会应用不同的特效参数。
|
||||
|
||||
执行这个脚本也很简单,只需键入下面的命令行:
|
||||
|
||||
$ python name_of_this_script.py
|
||||
|
||||
下面是抓取到一些样张。
|
||||
|
||||

|
||||
|
||||
### 小福利 ###
|
||||
|
||||
除了使用raspistill命令行工具来操控raspicam摄像模组以外,还有其他的方法可以用哦。[Picamera][4]是一个python库,它提供了操控raspicam摄像模组的的API接口,这样就可以便捷地构建更加复杂的应用程序。如果你精通python,那么picamera一定是你项目的好伙伴。picamera已经被默认集成到Raspbian最新版本的的镜像中。当然,如果你用的不是最新的Raspbian或者是使用其他的操作系统版本,你可以通过下面的方法来进行手动安装。
|
||||
|
||||
首先,先在你的系统上安装pip,详见[指导][6]。
|
||||
|
||||
然后,就可以按下面的方法安装picamera。
|
||||
|
||||
$ sudo pip install picamera
|
||||
|
||||
picamera的使用说明可以查阅[官方文档][7]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/apply-image-effects-pictures-raspberrypi.html
|
||||
|
||||
作者:[Kristophorus Hadiono][a]
|
||||
译者:[coloka](https://github.com/coloka)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/kristophorus
|
||||
[1]:http://xmodulo.com/go/picam
|
||||
[2]:http://www.raspberrypi.org/documentation/usage/camera/raspicam/
|
||||
[3]:http://xmodulo.com/install-raspberry-pi-camera-board.html
|
||||
[4]:https://pypi.python.org/pypi/picamera
|
||||
[5]:http://xmodulo.com/go/raspberrypi
|
||||
[6]:http://ask.xmodulo.com/install-pip-linux.html
|
||||
[7]:http://picamera.readthedocs.org/
|
@ -1,6 +1,6 @@
|
||||
Ubuntu上的一个开源VoIP应用——Mumble
|
||||
================================================================================
|
||||
Mumble是一个免费开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。
|
||||
Mumble是一个自由开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。
|
||||
|
||||
Mumble提供了如下的一些特性:
|
||||
|
||||
|
@ -0,0 +1,46 @@
|
||||
如何使 GDebi 代替 Ubuntu Software Center 作为默认的 deb 包安装器
|
||||
================================================================================
|
||||

|
||||
|
||||
假如你使用 Ubuntu 或像 Elementary OS Freya 一样的基于 Ubuntu 的 Linux 发行版本,也许你使用 Ubuntu 软件中心 来安装 `.deb` 可执行文件。对于查找和安装应用, Ubuntu 软件中心 是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [App Grid,一个 Ubuntu 软件中心 的轻量替代品][1] 的原因。
|
||||
|
||||
现在,假如你只是尝试安装一个 `.deb` 文件, 我不会向你推荐 Ubuntu 软件中心 或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。关于 GDebi 最有用的功能是它也可以为你展示出将要安装的程序的依赖。
|
||||
|
||||
在这篇文章中,我们将见证 ** 如何安装 GDebi 和使用它代替 Ubuntu 软件中心 作为默认的安装器**。
|
||||
|
||||
### 在 Ubuntu 和其他 Linux 发行版本中安装 GDebi ###
|
||||
|
||||
打开终端并使用下面的命令:
|
||||
|
||||
sudo apt-get install gdebi
|
||||
|
||||
### 使得 GDebi 成为默认的 `.deb`包安装器 ###
|
||||
|
||||
一旦你安装了 GDebi,就该是看看如何使它成为安装 `.deb` 文件的默认应用的时刻了。请读者注意在这篇教程中 我使用的是 Elementary OS Freya ,但下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。
|
||||
|
||||
首先下载一个 `.deb`文件。例如你已经下载了一个 Google Chrome 的 `.deb`包。进入下载目录并右击该 `.deb`文件。在这里,接着选择 **属性**选项。
|
||||
|
||||

|
||||
|
||||
在属性中,你应该可以看到 **打开方式** 选项。点击它并选择为 GDebi。
|
||||
|
||||

|
||||
|
||||
这样下次你双击一个 `.deb` 文件,便会自动打开 GDebi 来安装这个`.deb` 文件。使用这样轻量的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。
|
||||
|
||||
你有什么意见呢?对于安装应用,你仍然偏爱于 Ubuntu 软件中心 还是 GDebi 呢?抑或,假如你是一个守旧派,也许你更喜欢 [新立得软件包管理器(Synaptic Package Manager)][3]? 哪一个是你的最爱呢?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/gdebi-default-ubuntu-software-center/
|
||||
|
||||
作者:[Abhishek][a]
|
||||
译者:[FSSlc](https://github.com/FSSlc)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://itsfoss.com/author/abhishek/
|
||||
[1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/
|
||||
[2]:http://itsfoss.com/speed-up-ubuntu-1310/
|
||||
[3]:http://www.nongnu.org/synaptic/
|
@ -1,16 +1,16 @@
|
||||
How to Hide PHP Version in Linux
|
||||
如何在Linux中隐藏PHP版本
|
||||
================================================================================
|
||||
In general, most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. PHP (Hypertest Preprocessor) is one of the most popular server-side HTML embedded scripting language for the websites today. In the current challenging times, there are lots of attacker will try to discover the weaknesses in your your server system. Hence, i will describe the simple way to hide the PHP information in Linux server.
|
||||
通常上,大多数默认设置安装的web服务器存在信息泄露。这其中之一是PHP。PHP(超文本预处理器)是如今流行的服务端html嵌入式语言。在如今这个充满挑战的时代,有许多攻击者会尝试发现你服务端的漏洞。因此,我会简单描述如何在Linux服务器中隐藏PHP信息。
|
||||
|
||||
By default **expose_php** is set to On. Turning off the “expose_php” parameter causes that PHP will hide it version details.
|
||||
默认上**exposr_php**默认是开的。关闭“expose_php”参数可以使php隐藏它的版本信息。
|
||||
|
||||
[root@centos66 ~]# vi /etc/php.ini
|
||||
|
||||
In your php.ini, locate the line containing expose_php On and set it to Off:
|
||||
在你的php.ini, 定位到含有expose_php的那行把On设成Off:
|
||||
|
||||
expose_php = Off
|
||||
|
||||
Before the changes, web server header will look like below :
|
||||
在此之前,web服务器头看上去就像这样:
|
||||
|
||||
[root@centos66 ~]# curl -I http://www.ehowstuff.com/
|
||||
|
||||
@ -26,7 +26,7 @@ Before the changes, web server header will look like below :
|
||||
X-Page-Speed: 1.9.32.2-4321
|
||||
Cache-Control: max-age=0, no-cache
|
||||
|
||||
After the changes, PHP will no longer show the version to the web server header :
|
||||
更改之后,php就不会在web服务头中显示版本了:
|
||||
|
||||
[root@centos66 ~]# curl -I http://www.ehowstuff.com/
|
||||
|
||||
@ -40,17 +40,17 @@ Date: Wed, 11 Feb 2015 14:10:43 GMT
|
||||
X-Page-Speed: 1.9.32.2-4321
|
||||
Cache-Control: max-age=0, no-cache
|
||||
|
||||
As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below. [Jumping through archives page to read more articles..][1]
|
||||
有任何需要帮助的请到twiiter @ehowstuff,或在下面留下你的评论。[点此获取更多历史文章][1]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.ehowstuff.com/how-to-hide-php-version-in-linux/
|
||||
|
||||
作者:[skytech][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.ehowstuff.com/author/mhstar/
|
||||
[1]:http://www.ehowstuff.com/archives/
|
||||
[1]:http://www.ehowstuff.com/archives/
|
Loading…
Reference in New Issue
Block a user