mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-16 22:42:21 +08:00
commit
bd643e0d7e
@ -1,8 +1,7 @@
|
||||
10款专为嵌入式系统打造的Linux平台
|
||||
|
||||
==========================================
|
||||
|
||||
Linux 有着广泛的用途。该平台被许多简单的家用电器所使用,同时它也深受程序员和黑客们的青睐。此外,Linux 还广泛地应用在嵌入式系统中,有一系列专门适用于此类系统的发行版。我们将为大家推荐十个非常优秀的专为嵌入式系统发行的linux版本!
|
||||
Linux 有着广泛的用途。该平台用于很多家庭的简单使用,同时它也深受程序员和黑客们的青睐。此外,Linux 还广泛地应用在嵌入式系统中,有一系列专门适用于此类系统的发行版。我们将为大家推荐十个非常优秀的专为嵌入式系统发行的linux版本!
|
||||
|
||||
|
||||
![] (http://www.efytimes.com/admin/useradmin/photo/UJVP24130PM532014.jpeg)
|
||||
@ -10,61 +9,49 @@ Linux 有着广泛的用途。该平台被许多简单的家用电器所使用
|
||||
|
||||
### 1.[Ampro 嵌入式 Linux][1] ###
|
||||
|
||||
|
||||
这是一个自由和开放源代码的从Ubuntu派生来的轻量级操作系统。
|
||||
这是一个自由和开放源代码的从Ubuntu精简来的轻量级操作系统。
|
||||
|
||||
### 2. [BlueCat Linux from Lynx][2] ###
|
||||
这个基于 Linux 的发行版是Lynx套件的一部分,并为嵌入式系统打造。
|
||||
|
||||
这个基于 Linux 的发行版是Lynx套件的一部分,并为嵌入式系统打造。
|
||||
|
||||
### 3. [CacheGuard OS][3] ###
|
||||
|
||||
CacheGuard OS 是一个从零开始建立的集成了安全解决方案的基于Linux的可自定义版本 ,专门为网络管理设计的。
|
||||
|
||||
CacheGuard OS 是一个从零开始建立的集成了安全解决方案的基于Linux的版本,专门为网络管理设计的。
|
||||
|
||||
### 4. [Darma NAS OS][4] ###
|
||||
|
||||
这个发行版有一个基于 SSL 的加密客户端服务器和基于 Java 的图形用户界面。
|
||||
|
||||
这个发行版有一个基于 SSL 的加密客户端的服务器和基于 Java 的图形用户界面。
|
||||
|
||||
### 5. [DIET-PC][5] ###
|
||||
|
||||
|
||||
这是开源的瘦客户端软件 kitset,它允许用户建立网络设备。
|
||||
|
||||
这是开源的瘦客户端软件 kitset,它允许用户建立网络应用。
|
||||
|
||||
### 6. [ELinOS][6] ###
|
||||
|
||||
这个发行版为在嵌入式系统上工作的用户提供大量的技术。它是一个相当受欢迎的嵌入式 Linux 平台。
|
||||
|
||||
|
||||
### 7. [eLux][7] ###
|
||||
|
||||
|
||||
这个发行版有一个非常简单和容易使用的界面,适用于用户和管理员都不具有任何有关 Linux 的知识的特殊情况下。
|
||||
|
||||
|
||||
### 8. [eLux NG][8] ###
|
||||
|
||||
|
||||
这一个发行版为支持 eLux 的列表中的处理器添加了新的模式。
|
||||
|
||||
这个发行版为支持 eLux 的处理器列表中添加了新的型号。
|
||||
|
||||
### 9. [Embedded Coyote Linux][9] ###
|
||||
|
||||
这种基于 Coyote Linux的防火墙和 VPN 服务器一直为很多人选择的平台。
|
||||
|
||||
这种基于 Coyote Linux的防火墙和 VPN 服务器 一直为很多人选择的平台。
|
||||
|
||||
|
||||
# # # 10。[嵌入式 Debian 项目][10] # # #
|
||||
|
||||
### 10. [嵌入式 Debian 项目][10] ###
|
||||
|
||||
这个项目的目的是使 Debian GNU/Linux 成为嵌入式系统的第一选择。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.efytimes.com/e1/fullnews.asp?edid=137612
|
||||
|
||||
译者:[owen-carter](https://github.com/owen-carter) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[owen-carter](https://github.com/owen-carter) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,26 +1,25 @@
|
||||
如何使用ffmpeg从视频中提取图片(有些专业词汇不太懂可能翻译错了,各位校译幸苦了)
|
||||
如何使用ffmpeg从视频中提取图片
|
||||
================================================================================
|
||||
嗨,unixmen的读者们,
|
||||
|
||||
你曾想过从一个视频文件中提取图片吗?在Linux中做这件事是有可能的,教程中我将使用ffmpeg来从视频中获取图片。
|
||||
你曾想过从一个视频文件中提取图片吗?在Linux下就可以,在这个教程中我将使用ffmpeg来从视频中获取图片。
|
||||
|
||||
### 什么是ffmpeg?What is ffmpeg? ###
|
||||
|
||||
ffmpeg是一个非常有用的命令行程序,它可以用来转码媒体文件。它是FFmpeg领先的多媒体框架的一部分,其有很多功能,比如解码、编码、转码、混流、分离、转化为流、过滤以及播放几乎所有的的由人和机器创建的媒体文件。
|
||||
ffmpeg是一个非常有用的命令行程序,它可以用来转码媒体文件。它是领先的多媒体框架FFmpeg的一部分,其有很多功能,比如解码、编码、转码、混流、分离、转化为流、过滤以及播放几乎所有的由人和机器创建的媒体文件。
|
||||
|
||||
框架中包含有很多不同的工具,其中每一个都有特定的功能。例如,ffserver能够将多媒体文件转化为用于实时广播的流,ffprobe用于分析多媒体流,ffplay可以当作一个简易的媒体播放器,**ffmpeg**能够转换多媒体文件格式。
|
||||
在这个框架中包含有各种工具,每一个用于完成特定的功能。例如,ffserver能够将多媒体文件转化为用于实时广播的流,ffprobe用于分析多媒体流,ffplay可以当作一个简易的媒体播放器,**ffmpeg**则能够转换多媒体文件格式。
|
||||
|
||||
如果你感兴趣,以下是包括在FFmpeg框架中的开发者库:
|
||||
如果你感兴趣,以下列出的是FFmpeg框架中包含的开发者库:
|
||||
|
||||
- libavutil是一个包含简化编程功能的库,其中包括随机数生成器,数据结构,数学代码,核心多媒体工具等更多东西。
|
||||
- libavcodec是一个包含音频/视频解码器和编码器的库。
|
||||
- libavformat是一个包含了多媒体格式的解析器和产生器的库。
|
||||
- libavdevice是一个包含输入输出设备的库,用于捕捉和渲染很多公共多媒体输入/输出软件框架,包括Video4Linux,Video4Linux2,VfW和ALSA。
|
||||
- libavformat是一个包含了多媒体格式的分离器和混流器的库。
|
||||
- libavdevice是一个包含输入输出设备的库,用于捕捉和渲染很多来自常用的多媒体输入/输出软件框架的数据,包括Video4Linux,Video4Linux2,VfW和ALSA。
|
||||
- libavfilter是一个包含媒体过滤器的库。
|
||||
- libswscale是一个用于执行高度优化的图像缩放和颜色空间/像素格式转换操作的库。
|
||||
- libswresample是一个用于执行高度优化的音频重采样,重新矩阵和样本格式转换操作的库。
|
||||
- libswresample是一个用于执行高度优化的音频重采样,重新矩阵和取样格式转换操作的库。
|
||||
|
||||
**注意**:ffmpeg和FFmpeg并不一样。FFmpeg是一个框架而ffmpeg是一个FFmpeg中的一个功能。
|
||||
**注意**:ffmpeg和FFmpeg不是同一个东西。FFmpeg是框架,而ffmpeg是一个其中的一个功能。
|
||||
|
||||
### 开始行动 ###
|
||||
|
||||
@ -57,9 +56,9 @@ Fedora用户可以从源中直接安装ffmpeg。
|
||||
|
||||
之后我使用以下命令从视频中提取图片。
|
||||
|
||||
ffmpeg -i "Тимати - Рентген ( Альбом '13')-C9Plztvv8ac.mp4" -r 1 -q:v 2 -f image2 image-3%d.jpeg
|
||||
ffmpeg -i "你是我的小呀小苹果儿.mp4" -r 1 -q:v 2 -f image2 image-3%d.jpeg
|
||||
|
||||
**-i**选项用来获取输入文件,在这里是视频文件名**Тимати – Рентген ( Альбом ’13′)-C9Plztvv8ac.mp4**,-r选项设置每秒提取图片的帧数。我想要每秒提取一帧。
|
||||
**-i**选项用来获取输入文件,在这里是视频文件名**你是我的小呀小苹果儿.mp4**,-r选项设置每秒提取图片的帧数。我想要每秒提取一帧。
|
||||
|
||||
之后有一个重要的选项是-q:v,应该留意这个选项并且我很喜欢用它,它用来设置提取到的图片质量。我总是设置值为2来从视频中获取高质量图片。
|
||||
|
||||
@ -67,6 +66,6 @@ Fedora用户可以从源中直接安装ffmpeg。
|
||||
|
||||
via: http://www.unixmen.com/extract-images-videos-using-ffmpeg/
|
||||
|
||||
译者:[linuhap](https://github.com/linuhap) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[linuhap](https://github.com/linuhap) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -1,28 +1,30 @@
|
||||
Linux下的在线云音乐播放器 —— Nuvola Player 2.4.0发布
|
||||
================================================================================
|
||||
**Nuvola Player**是一个开源的播放器,在它自身的web界面中运行像Amazon云播放器,Bandcamp,Deezer,8tracks,Google Play音乐,Grooveshark,Hyper Machine以及Pandora等等云音乐服务,同时它也能整合到Linux桌面中。
|
||||
**Nuvola Player**是一个开源的播放器,可以在其web界面中运行像Amazon云播放器,Bandcamp,Deezer,8tracks,Google Play音乐,Grooveshark,Hyper Machine以及Pandora等等云音乐服务,同时它也能整合到Linux桌面中。
|
||||
|
||||
该应用程序以插件的形式提供了大量的功能特性,像桌面通知、系统托盘、多媒体键、媒体播放器小程序、停靠栏菜单、歌词、last.fm等等。
|
||||
|
||||
**2014年5月31日**,**Nuvola Player 2.4.0**的一个新版本发布了 —— 它带来了一些新的特性,包括两个新的服务罗技媒体服务器和这是我的果酱,以及众多的bug修复。
|
||||
**2014年5月31日**,**Nuvola Player 2.4.0**的一个新版本发布了 —— 它带来了一些新的特性,包括两个新的服务“Logitech Media Server”和“This is My Jam ”,以及众多的bug修复。
|
||||
|
||||
### 这个发布中有什么新东西 ###
|
||||
|
||||
- 删除了破损的隐藏Google+按钮选项,因为Google修改代码过于频繁。
|
||||
- 删除了破损的隐藏Google+按钮选项,因为Google修改代码过于频繁了。
|
||||
- 加快了服务设置的启用速度,不需要再重新加载。
|
||||
- 修复了暂停和播放/暂停动作开关。
|
||||
- 为Chrome添加了兼容问题警告桌面通知。
|
||||
- 提供了页面内导航按钮(现在用户可以在Google Play标识旁边的顶部栏中找到它)。
|
||||
- 添加了罗技媒体服务器和这是我的果酱服务。
|
||||
- 添加了“Logitech Media Server”和“This is My Jam ”服务。
|
||||
- 包含了对鼠标后退/前进按钮的支持。
|
||||
- 修复了对GNOME锁屏通知的支持。
|
||||
|
||||
要查看完整的特性列表,请访问官方发行[声明页面][1]
|
||||
|
||||
### 在Debian, Ubuntu和Linux Mint中安装Nuvola Player ###
|
||||
## 在Debian, Ubuntu和Linux Mint中安装Nuvola Player ##
|
||||
|
||||
官方的Nuvola Player仓库中包含了**Ubuntu 14.04, 13.10, 12.10, 12.04**以及**Linux Mint 17, 16, 15, 14.**可用的二进制包,你可以通过添加Nuvola Player仓库到你的系统中来安装二进制包‘nuvolaplayer’。
|
||||
|
||||
#### 在Ubuntu和Linux Mint上 ####
|
||||
### 在Ubuntu和Linux Mint上 ###
|
||||
|
||||
打开终端并运行以下一系列命令:
|
||||
|
||||
$ sudo add-apt-repository ppa:nuvola-player-builders/stable
|
||||
@ -36,7 +38,8 @@ Linux下的在线云音乐播放器 —— Nuvola Player 2.4.0发布
|
||||
|
||||
$ sudo apt-get --no-install-recommends install nuvolaplayer
|
||||
|
||||
#### 在Debian上 ####
|
||||
### 在Debian上 ###
|
||||
|
||||
对于**Debian Wheezy**和**Debian Sid**,可以从官方仓库中获取稳定的Nuvola Player二进制包。你可以使用下面这一堆命令来安装最新的稳定版。
|
||||
|
||||
首先,打开终端并导入公钥,然后添加仓库到‘**sources.list**‘文件,接着像下面这样进行一次系统更新来安装nuvolaplayer。
|
||||
@ -97,7 +100,7 @@ Rdio音乐服务
|
||||
|
||||
via: http://www.tecmint.com/install-nuvola-player-in-linux/
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -22,7 +22,7 @@ LDAP(轻量级目录访问协议)是一个用于访问目录服务的应用
|
||||
|
||||
via: http://www.linuxlinks.com/article/20140607022012848/LDAPSolutions.html
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,118 @@
|
||||
怎样使用linux的iptables工具进行网络共享
|
||||
================================================================================
|
||||
|
||||
在本教程中,我将解释多个设备怎样在linux下共享一个网络连接。目前无线路由器已经成为主流的消费品,从而解决了本文这一问题。这里假设你家中并没有一台无线路由器,不过,你却有一台已经有"猫"和有线网卡的的linux主机。"猫"是以动态公有IP地址的模式连接到互联网,主机的网卡连接到你的交换机或者集线器。其他设备(如linux或者windows的PC或者笔记本)以网桥的形式连接,并且没有连接到互联网。为了共享linux主机的互联网,你必须把主机转换成网关,以便它能实现从其他设备中传送和接受信息。
|
||||
|
||||
### 术语字汇 ###
|
||||
|
||||
|
||||
- **私有IP地址**(路由不可达地址)是一个被用于本地局域网的IP地址(在互联网中不可见)。
|
||||
- **公用IP地址**(路由可达地址)是一个在互联网中可见的IP地址。
|
||||
- **IP伪装**是一项允许一系列机器通过MASQ网关连接互联网的功能。这些MASQ网关之外的机器在互联网中是不可见的。MASQ之后的机器中任何流入或流出的数据必须经过MASQ网关。
|
||||
- **网络地址转换**(NAT)是一项通过IP伪装技术可以使私有IP地址访问互联网的功能。
|
||||
|
||||
### Hardware Requirements ###
|
||||
|
||||
硬件要求
|
||||
|
||||
- 一台有两个接口(一个公有IP地址和其他的私有IP地址)的linux主机,这个主机将被用作网关。
|
||||
- 一台或者多台拥有私有IP地址的linux/windows系统的PC或者笔记本。
|
||||
- 交换机/集线器(可选)。
|
||||
|
||||
### 教程步骤 ###
|
||||
|
||||
接下来的过程需要在linux主机(用于共享的网关)上完成。
|
||||
|
||||
#### 1、激活IP转发 ####
|
||||
|
||||
为了设置网络共享,你需要在linux主机上更改一个内核参数来使能IP转发功能。内核启动参数设定在/etc/sysctl.conf文件中。
|
||||
|
||||
打开这个文件,定位到含有"# net.ipv4.ip_forward = 0"的这一行,移除#号(即取消注释),然后将其值设置为1,改好之后应该和下面的一致。
|
||||
|
||||
net.ipv4.ip_forward = 1
|
||||
|
||||
你还要使激活IP转发功能生效,通过执行下面的命令:
|
||||
|
||||
$ sudo sysctl -w net.ipv4.ip_forward=1
|
||||
$ sudo sysctl -p
|
||||
|
||||
#### 2、NAT配置 ####
|
||||
|
||||
另一个网络共享的重要部分是NAT配置,这可以通过使用iptables的命令,iptables包含四个防火墙的规则表:
|
||||
|
||||
- FILTER (默认表格)
|
||||
- NAT
|
||||
- MANGLE
|
||||
- RAW
|
||||
|
||||
这个教程中我们将仅使用两个表格:FILTER和NAT表格。
|
||||
|
||||
首先,刷新所有活跃的防火墙的规则。
|
||||
|
||||
$ sudo iptables -X
|
||||
$ sudo iptables -F
|
||||
$ sudo iptables -t nat -X
|
||||
$ sudo iptables -t nat -F
|
||||
|
||||
|
||||
在输入表格中,你需要设置转发链(FORWARD)成可接受的(ACCEPT)目的地,因此所有通过主机的数据包将会被正确的处理。
|
||||
|
||||
$ sudo iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
$ sudo iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
|
||||
|
||||
在NAT表中,你必须为你的WAN口启用IP伪装功能,我们假设WAN口协议是ppp0。为了在ppp0接口上使能IP伪造技术,我们使用以下的命令:
|
||||
|
||||
$ sudo iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
|
||||
|
||||
#### 3、配置私有IP地址 ####
|
||||
|
||||
在linux主机上的所有配置完成后,你需要配置其他设备(linux/windows的PC或笔记本)的DNS服务器以及默认网关,让它们的数据流可以指向linux主机。注意你不需要在linux主机上设置一个DNS服务器,从其他设备发出的每一个DNS请求都会通过上游的ISP自动转发到linux主机上。
|
||||
|
||||
如果你的其他设备上用的系统是linux,你可以通过以下命令来更改他们的默认网关和DNS服务器。假设你的网段是192.168.1.0/24的私有IP地址网段,linux主机上绑定的IP地址是192.168.1.1。
|
||||
|
||||
$ sudo ip route del default
|
||||
$ sudo ip route add default via 192.168.1.1
|
||||
$ sudo sh -c "echo 'nameserver 192.168.1.1' > /etc/resolv.conf"
|
||||
|
||||
如果还有其他的linux设备,那么你可以重复以上命令。
|
||||
|
||||
如果你有windows设备,你可以通过控制面板的网络连接属性来更改默认网关和DNS服务器。
|
||||
|
||||
#### 4、完整的脚本 ####
|
||||
|
||||
这是一个在linux主机上设置网络连接共享的一个完整的脚本。WAN口(ppp0协议)需要根据你具体的网络接口协议来替换。
|
||||
|
||||
$ sudo vi /usr/local/bin/ishare
|
||||
|
||||
----------
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
## Internet connection shating script
|
||||
|
||||
sysctl -w net.ipv4.ip_forward=1
|
||||
sysctl -p
|
||||
iptables -X
|
||||
iptables -F
|
||||
iptables -t nat -X
|
||||
iptables -t nat -F
|
||||
iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
|
||||
|
||||
保存以上的脚本到/usr/local/bin/ishare,然后添加可执行权限通过执行下面的命令。
|
||||
|
||||
$ sudo chmox +x /usr/local/bin/ishare
|
||||
|
||||
如果你需要这个脚本开机启动,你需要在/etc/rc.local文件中执行这个脚本,并在该文件中的"exit 0"之前添加下面一行。
|
||||
|
||||
/usr/local/bin/ishare
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/06/internet-connection-sharing-iptables-linux.html
|
||||
|
||||
译者:[yujianxuechuan](https://github.com/yujianxuechuan) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -36,7 +36,7 @@ Numix图标主题张冠李戴,Fedora 20劲爆酷爽
|
||||
|
||||
via: http://www.unixmen.com/install-numix-icon-theme-fedora-20/
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[GOLinux](https://github.com/GOLinux) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,159 @@
|
||||
如何在Debian中启用测试版/不稳定版的软件库
|
||||
================================================================================
|
||||
为何要启用测试版/不稳定版?
|
||||
|
||||
测试版/不稳定版的Debian给开发者提供了一个比当前稳定版更新的环境以及软件。你们注意到了么?其实这些稳定版啊不稳定版啊神马的都是别名,比方说稳定版其实就是Debian的稳定发行版,而测试版将会是下一个Debian的稳定发行版(当然那是测试后的事了)。截至发稿为止,当前Debian的稳定发行版是Wheezy 7.x,将会成为下一个稳定版的测试版则是Jessie。
|
||||
|
||||
当你需要一款应用的最新版本的时候,启用测试版/不稳定版将会是不二的选择。当初我因为工作需要,要安装个Apache的 2.4.x到我的Debian Wheezy。测试版需要的是2.4.x的,可是我的软件库里面只有2.2.x的。所以最好的解决方案当时是将测试版下下来啦。
|
||||
|
||||
通常来说当我们想尝试最新版本的应用时,都应该只在测试版软件库中搜索。
|
||||
|
||||
在这篇文章里我将教大家如何在不弄坏你系统的前提下设置好测试、不稳定版的Debain系统并在上面安装软件。
|
||||
|
||||
> Stable < Testing < Unstable (稳定 < 测试版 < 不稳定版)
|
||||
> Wheezy < Jessie < Sid
|
||||
|
||||
### 1. 设置测试版/不稳定版的apt源 ###
|
||||
|
||||
第一步是把测试版/不稳定版的源加到你的sources.list文件里。在Debian Wheezy系统上,/etc/apt/sources.list理应长得像这样:
|
||||
|
||||
$ cat /etc/apt/sources.list
|
||||
|
||||
----------
|
||||
|
||||
...
|
||||
deb http://security.debian.org/ wheezy/updates main
|
||||
deb http://http.us.debian.org/debian/ wheezy main
|
||||
deb-src http://security.debian.org/ wheezy/updates main
|
||||
...
|
||||
|
||||
把你repo服务器的链接记下来,比如:http://http.us.debian.org/debian/
|
||||
|
||||
这个repo服务器将会是离你最近的一个服务器; 在不同的地理位置会有不同的url,这个将会用于下一步。
|
||||
|
||||
如果想加测试/不稳定源,则需要在sources.list文件加上这些东西:
|
||||
|
||||
# Testing repository - main, contrib and non-free branches
|
||||
deb http://http.us.debian.org/debian testing main non-free contrib
|
||||
deb-src http://http.us.debian.org/debian testing main non-free contrib
|
||||
|
||||
|
||||
# Testing security updates repository
|
||||
deb http://security.debian.org/ testing/updates main contrib non-free
|
||||
deb-src http://security.debian.org/ testing/updates main contrib non-free
|
||||
|
||||
|
||||
# Unstable repo main, contrib and non-free branches, no security updates here
|
||||
deb http://http.us.debian.org/debian unstable main non-free contrib
|
||||
deb-src http://http.us.debian.org/debian unstable main non-free contrib
|
||||
|
||||
格式将会是
|
||||
|
||||
deb <respository server/mirror> <repository name> <sub branches of the repo>
|
||||
(deb <上一步弄的服务器或镜像url> <repo的名字> <repo底下的分支>)
|
||||
|
||||
当然啦,除了用testing或者unstable这么烂的词,也能使用他们的发行版代号,比如Jessie或者Sid
|
||||
|
||||
deb http://http.us.debian.org/debian jessie main non-free contrib
|
||||
deb http://security.debian.org/ jessie/updates main contrib non-free
|
||||
deb http://http.us.debian.org/debian sid main non-free contrib
|
||||
|
||||
### 2. 钉住 apt!这非常重要 ###
|
||||
|
||||
> 在加了测试/不稳定的repo之后,当你更新系统的时候所有安装过并且可用的软件就会立马更新,而后你的系统就被你玩火自焚了。
|
||||
|
||||
所以需要设置一些规则,以便选定的软件包在正常的更新时不会被更新到一个不稳定的测试版本。
|
||||
|
||||
我们需要使用“钉住APT”的方式来告诉apt系统,除了我们希望使用测试版或不稳定版的特定软件包之外,其它的总是使用稳定版的软件包来更新。
|
||||
|
||||
可以通过如下两个文件之一来设置如何设置APT的优先级来“钉住”。
|
||||
|
||||
/etc/apt/preferences
|
||||
或
|
||||
/etc/apt/preferences.d/my_preferences
|
||||
|
||||
打开这两个文件之一(如果没有的话就创建一个),然后输入如下内容:
|
||||
|
||||
Package: *
|
||||
Pin: release a=stable
|
||||
Pin-Priority: 700
|
||||
|
||||
Package: *
|
||||
Pin: release a=testing
|
||||
Pin-Priority: 650
|
||||
|
||||
Package: *
|
||||
Pin: release a=unstable
|
||||
Pin-Priority: 600
|
||||
|
||||
前面我们提到过,稳定版指的是你当前的debian版本,测试版是下一个,而不稳定版则是更远的将来发行版。上面的设置中最主要的是优先级(Pin-Priority)。当前的稳定版应该有最高的优先级,这就是说,正常的apt-get操作只会从当前的稳定版的软件库(现在是wheezy)里面安装软件。
|
||||
|
||||
#### 更新包缓存 ####
|
||||
|
||||
在增加了新的软件库和指定了优先规则后,需要更新一下包缓存。
|
||||
|
||||
$ sudo apt-get update
|
||||
|
||||
#### 确认APT规则 ####
|
||||
|
||||
我们必须确认“钉住”的设置正确,优先级也没问题。使用 apt-cache 的 policy 参数来检查:
|
||||
|
||||
$ apt-cache policy apache2
|
||||
apache2:
|
||||
Installed: (none)
|
||||
Candidate: 2.2.22-13
|
||||
Version table:
|
||||
2.4.7-1 0
|
||||
600 http://http.us.debian.org/debian/ unstable/main amd64 Packages
|
||||
2.4.6-3 0
|
||||
650 http://http.us.debian.org/debian/ testing/main amd64 Packages
|
||||
2.2.22-13 0
|
||||
700 http://http.us.debian.org/debian/ wheezy/main amd64 Packages
|
||||
|
||||
如上的输出,确认在wheezy 稳定版中, 2.2.22 版本的Apache是选定的版本,它有最高的优先级。
|
||||
|
||||
### 3. 从测试版/不稳定版软件库中安装软件 ###
|
||||
|
||||
现在可以从测试版或不稳定版中选择一个特定的软件来安装它了。假如说我们要从测试版软件源中安装 apache2。
|
||||
|
||||
有两个不同的方法,并且其结果也有所不同。
|
||||
|
||||
#### 方式一 ####
|
||||
|
||||
# apt-get install apache2/testing
|
||||
|
||||
上述命令会从测试版软件库中安装 apache2,并从稳定版软件库中安装其依赖包(稳定版通过apt规则确定)。这个命令在某些情况下会失败,比如安装的软件包(apache2)所需的依赖包在稳定版软件库中没有更新到可以支持该软件时。
|
||||
|
||||
#### 方式二 ####
|
||||
|
||||
# apt-get -t testing install apache2
|
||||
|
||||
上述命令会从测试版软件库中安装apache2,并从测试版软件库中安装其依赖包。这要比上面的命令工作的更好。
|
||||
|
||||
所以,要安装较新的软件包,直接从测试版/不稳定版的软件库中安装就行了。注意,优先级号码不只是一个数字而已,还有其特定意义。可以查看 apt_preferences的man页面了解更多:
|
||||
|
||||
$ man 5 apt_preferences
|
||||
|
||||
### 总结 ###
|
||||
|
||||
使用“钉住”方式的测试版/不稳定版的软件库是一个获取较新版本软件包的一个好办法,不过其实并不推荐使用它们。如果弄错了,可能会从也许不兼容的分支上下载软件包,这会把你的系统搞乱。
|
||||
|
||||
一个更好的方式是,使用向后移植的软件库来安装更新的包。它从测试版和不稳定版的软件库中获取较新版本的软件包,但是为当前的稳定版软件库而编译。所以,对于 debian wheezy来说,你可以使用wheezy-backports 软件库。访问http://backports.debian.org/ 了解更多。
|
||||
|
||||
### 资源 ###
|
||||
|
||||
- [https://wiki.debian.org/AptPreferences][1]
|
||||
- [https://wiki.debian.org/DebianTesting][2]
|
||||
- [https://www.debian.org/security/][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.binarytides.com/enable-testing-repo-debian/
|
||||
|
||||
译者:[213edu](https://github.com/213edu) [wxy](https://github.com/wxy) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://wiki.debian.org/AptPreferences
|
||||
[2]:http://wiki.debian.org/DebianTesting
|
||||
[3]:http://www.debian.org/security/
|
@ -1,6 +1,6 @@
|
||||
戴文的Linux内核专题:26 配置内核 (22)
|
||||
================================================================================
|
||||
![](http://www.linux.org/attachments/slide-jpg.703/)
|
||||
![](http://www.linux.org/attachments/slide-jpg.703/.jpg)
|
||||
|
||||
你好!本篇我们将继续配置"kernel hacks",接着我们会配置整个安全系统。
|
||||
|
||||
@ -14,7 +14,7 @@ Alpha和s390处理器需要配置下一个特性(Force weak per-cpu definitions)
|
||||
|
||||
"Latency measuring infrastructure"驱动提供了延迟检测工具LatencyTop,以找出用户空间中由于内核执行/任务而被阻碍/干扰的对象。
|
||||
|
||||
下面,我们有一个子菜单名为"Tracers",它包含了不同追踪器的列表。追踪器是一段监视不同内核函数的代码。每次某个特定的函数启动,追踪器将被调用来检测函数。
|
||||
下面,我们有一个子菜单名为"Tracers",它包含了不同追踪器的列表。追踪器是一段监视不同内核函数的代码。每次某个特定的函数启动,追踪器将被调用来检测函数。
|
||||
|
||||
下面的模块用来测试红黑树库的性能(Red-Black tree test)。红黑树是一个排序和搜索算法。
|
||||
|
||||
@ -28,9 +28,9 @@ printk()函数可以用来打印不同的调试信息,如果这个特性启用
|
||||
|
||||
Atomic64自我测试检查系统是否支持原子操作(Perform an atomic64_t self-test at boot)。这是一个32位系统执行64位操作。
|
||||
|
||||
这个驱动提供了对于所有可能的RAID6恢复系统的自我测试(Self test for hardware accelerated raid6 recovery)。
|
||||
这个驱动提供了对于所有可能的RAID6恢复系统的自检(Self test for hardware accelerated raid6 recovery)。
|
||||
|
||||
注意:自我测试是底层测试并且在绝大多数系统硬件和软件开启和执行前侦查软件。自我测试搜索硬件,失败的设备等等。自我测试也可能被编成应用测试它本身。
|
||||
注意:自检是底层测试并且在绝大多数系统硬件和软件开启和执行前侦查软件。自检搜索硬件,失败的设备等等。自检也可能被编成应用以测试它本身。
|
||||
|
||||
在"Kernel Hacking"菜单中(如果你是用的是像ncurses那样的菜单接口),有一个名为"Sample kernel code"的子菜单。在以后的文章中,我们会讨论如何实现自定义/自制内核模块。只要记住这里是启用你自己的模块。
|
||||
|
||||
@ -62,7 +62,7 @@ printk()打印不同的消息到dmsg的启动界面,但是在串行和控制
|
||||
|
||||
下面的驱动提供了对"copy_from_user()"系统调用的基本测试(Strict copy size checks)。copy_fcrom_user()从用户空间拷贝数据块到内核空间中。
|
||||
|
||||
这里还有一个自我测试;它用于NNI(NMI Selftest)。
|
||||
这里还有一个自检;它用于NMI(NMI Selftest)。
|
||||
|
||||
现在,我们会进入"Security Options",如果你使用像ncurses的基于菜单的接口时。第一个选项允许访问内核中存储的键和验证令牌(Enable access key retention support)。这有很多原因用到,像访问加密文件系统。
|
||||
|
||||
@ -114,6 +114,6 @@ Yama是另外一个LSM(Yama support)。如果启用这个特性Yama可以与另
|
||||
|
||||
via: http://www.linux.org/threads/the-linux-kernel-configuring-the-kernel-part-22.5017/
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -1,8 +1,8 @@
|
||||
戴文的Linux内核专题:27 配置内核 (23)
|
||||
================================================================================
|
||||
![](http://www.linux.org/attachments/slide-jpg.735/)
|
||||
![](http://www.linux.org/attachments/slide-jpg.735/.jpg)
|
||||
|
||||
欢迎来到内核配置的下一章!本篇中我们会配置密码API,虚拟化和运行库。密码学指的是在需要的计算机之间加密和安全通信。用户可能加密数据以保证是收件人而不是黑客收到数据。
|
||||
欢迎来到内核配置的下一章!本篇中我们会配置密码API,虚拟化和运行库。密码学指的是在需要的计算机之间加密和安全通信的科学。用户可能加密数据以保证是收件人而不是黑客收到数据。
|
||||
|
||||
Linux内核需要在内核中启用"Cryptographic algorithm manager"(密码算法管理器)。这个特性提供了操作内核的加密特性所需的软件。
|
||||
|
||||
@ -93,7 +93,7 @@ CORDIC algorithm - 双曲线和三角函数。
|
||||
JEDEC DDR data - JEDEC双倍数据速率SD-RAM规范
|
||||
|
||||
|
||||
你猜怎么了?我们已经完成便宜内核。在23篇之后,我敢肯定这是你的感觉 -
|
||||
你猜怎么了?我们已经完成配置内核。在23篇之后,我敢肯定这是你的感觉 -
|
||||
|
||||
视频链接:[http://www.youtube.com/embed/barWV7RWkq0?wmode=opaque][1]
|
||||
|
||||
@ -107,7 +107,7 @@ JEDEC DDR data - JEDEC双倍数据速率SD-RAM规范
|
||||
|
||||
via: http://www.linux.org/threads/the-linux-kernel-configuring-the-kernel-part-23.5112/
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,32 +1,32 @@
|
||||
戴文的Linux内核专题:28 编译与安装
|
||||
================================================================================
|
||||
![](http://www.linux.org/attachments/slide-jpg.762/)
|
||||
![](http://www.linux.org/attachments/slide-jpg.762/.jpg)
|
||||
|
||||
你好!在花费了大量的时间在配置你需要的内核后,你现在可以编译它了。源代码是纯文本形式的C代码。这对人来可读但是对机器不这样。编译会将代码转换成计算机可理解的一种称之为二进制码的形式(1是 [开],0 是 [关])。编译同样会将所有内核代码文件变成一个内核的文件。
|
||||
你好!在花费了大量的时间在配置你需要的内核后,你现在可以编译它了。源代码是纯文本形式的C代码。这对人来可读但是对机器可不是这样。编译会将代码转换成计算机可理解的一种称之为二进制码的形式(1是 [开],0 是 [关])。编译同样会将所有内核代码文件变成一个内核的文件。
|
||||
|
||||
为了编译内核,在内核源代码相同目录下,在终端内输入"make"。这会花费一些时间。一旦完成,模块必须通过"make modules"来编译。为了从一开始就简化编译过程,输入"make; make modules"。这会先编译接着是模块,而不用用户再回来输入"make modules"。
|
||||
为了编译内核,在内核源代码相同目录下,在终端内输入"make"。这会花费一些时间。完成之后,必须通过"make modules"来编译模块。为了从一开始就简化编译过程,输入"make; make modules"。这会先编译接着是模块,而不用用户再回来输入"make modules"。
|
||||
|
||||
![](http://www.linux.org/attachments/compiling_01-png.763/)
|
||||
![](http://www.linux.org/attachments/compiling_01-png.763/.jpg)
|
||||
|
||||
警告:在你安装一个内核时,备份所有的重要数据,确保有一份/boot目录备份在FAT32的存储卡上。这可以在如果安装失败后帮助修复系统。FAT32不会存储权限,因此它更容易被用作live盘来还原数据。记住设置原始文件权限和可执行位。
|
||||
|
||||
一旦编译已经成功完成,我们可以安装内核到本地系统中(我会马上解释如何在其他系统上安装内核[交叉编译])。在相同的终端下,在编译完成后,输入"make install"。这会在/boot目录下存放一些文件。"vmlinuz"(或者其他相似的名字)是内核自身。"initrd"是基于内存的文件系统,它被置于内存中且在启动中使用。"System-map"包含了一张内核符号列表。这些全局变量和函数用于内核代码。"config" 是内核的配置文件。grub.cfg会自动更新。然而,有些bootloder需要手动配置。内核安装器会自动配置Grub,LILO和SysLinux bootloder。像BURG这类bootloder需要手动配置。模块的安装同样需要输入"make modules install"。
|
||||
|
||||
![](http://www.linux.org/attachments/compiling_04-png.764/)
|
||||
![](http://www.linux.org/attachments/compiling_04-png.764/.jpg)
|
||||
|
||||
注:内核和模块的安装可以写在一行-“make install && make modules_install”。
|
||||
|
||||
![](http://www.linux.org/attachments/compiling_05-png.765/)
|
||||
![](http://www.linux.org/attachments/compiling_05-png.765/.jpg)
|
||||
|
||||
一旦上面的过程完成了,用户可以通过重启系统并在开机后在终端内输入"uname -r"来确保内核已经安装。如果系统无法启动或者uname报告你预期外的版本号,这个问题可能众多问题之一引起。或者是bootloader没有正确设置,特性/配置冲突,编译失败,不正确的安装,或者其他原因。找出问题源头最好的方法是查看系统日志(如果系统已经启动到足以产生日志)。"dmsg"是一个在屏幕上打印内核日志的命令。查看错误、警告或者未预料的结果。如果系统没有启动或者没有足够启动完全来生成日志,使用live linux盘来执行诊断和修复。如果所有的都失败了,再次编译内核并确保你已经用root或者"sudo"安装了内核。
|
||||
|
||||
注:最好的修复系统的方式是使用live Linux发行版来移除新的/损坏的内核,接着手动修复Grub文件(或者复制一个备份)。
|
||||
|
||||
一些Linux用户也喜欢安装文档,但这并不是必要。对于那些想要安装文档的用户,输入这行,这里的version是你的内核版本号 "install -d /usr/share/doc/linux-VERSION && cp -r Documentation/* /usr/share/doc/linux-VERSION"(VERSION 是内核版本号)。很明显,这需要root特权。
|
||||
一些Linux用户也喜欢安装内核文档,但这并不是必要。对于那些想要安装文档的用户,输入这行,这里的version是你的内核版本号 "install -d /usr/share/doc/linux-VERSION && cp -r Documentation/* /usr/share/doc/linux-VERSION"(VERSION 是内核版本号)。很明显,这需要root特权。
|
||||
|
||||
为了编译一个如你目前内核一样特性的内核,输入这条命令"zcat /proc/config.gz > .config"。这个文件可能不存在,如果是这样,你可能需要询问你发行版/内核的开发者这个文件。"zcat"命令解压并写入数据到一个".config"文件中。记住在你希望的地方输入".config"。这个文件放置在Linux内核目录下并允许它替换当前的文件。接着,像往常一样编译安装你的内核。
|
||||
要是想编译一个如你目前内核一样特性的内核,输入这条命令"zcat /proc/config.gz > .config"。这个文件可能不存在,如果是这样,你可能需要询问你发行版/内核的开发者这个文件。"zcat"命令解压并写入数据到一个".config"文件中。记住把".config"放到合适的位置。这个文件应该放置在Linux内核目录下,并允许它替换当前的文件。接着,像往常一样编译安装你的内核即可。
|
||||
|
||||
交叉编译稍微有点不同。为目标系统配置内核。确保内核配置完后,它在脑海中交叉配置过了。当交叉编译时,需要熟悉两条术语。"Host"是执行编译的系统,"Target"是接收新内核的系统。确保主机系统有合适的编译器。比如,对于ARM系统的交叉编译,用户需要在主机系统上有gcc-arm-linux-gnueabi。通常来说,开发这可以在他们的包管理器上搜寻或者Googledao合适/最好的适合他们需要的交叉编译器。特定的用于ARM系统交叉编译的命令是"make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-"。"ARCH=arm"指的是目标处理器的类型,"CROSS_COMPILE"指明了交叉编译器。注意交叉编译器前面缺少了"gcc-"并以破折号结束。这是用户在使用交叉编译器作为参数使用时必须使用的格式。模块可以通过输入"make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules".交叉编译。为了在目标系统上安装内核,复制内核文件夹到目标系统上。一旦文件已在目标系统上并在该目录下打开了终端,输入"make install && make modules_install"。当然你必须是root或者使用"sudo"。
|
||||
交叉编译稍微有点不同。为目标系统配置内核。确保内核配置完后,它是以交叉编译配置的。当交叉编译时,需要熟悉两条术语。"Host"是执行编译的系统,"Target"是接收新内核的系统。确保Host主机系统有合适的编译器。比如,对于ARM系统的交叉编译,用户需要在主机系统上有gcc-arm-linux-gnueabi。通常来说,开发者可以在他们的包管理器上搜寻或者Google到合适/最好的适合他们需要的交叉编译器。比如用于ARM系统交叉编译的命令是"make ARCH=arm CROSS\_COMPILE=arm-linux-gnueabi-"。"ARCH=arm"指的是目标处理器的类型,"CROSS\_COMPILE"指明了交叉编译器。注意交叉编译器前面缺少了"gcc-"并以连字符结束。这是用户在使用交叉编译器作为参数使用时必须使用的格式。模块可以通过输入"make ARCH=arm CROSS\_COMPILE=arm-linux-gnueabi- modules"来交叉编译。为了在目标系统上安装内核,将内核文件夹复制到目标系统上。一旦文件已在目标系统上并在该目录下打开了终端,输入"make install && make modules_install"。当然你必须是root或者使用"sudo"。
|
||||
|
||||
信息:Kernel.org放了一个支持的交叉编译器列表([https://www.kernel.org/pub/tools/crosstool/][1])。
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
make && make modules && make install && make modules_install
|
||||
|
||||
#### 做一个更新的版本或者重混你的内核: ####
|
||||
#### 做一个更新的版本或者重整你的内核: ####
|
||||
|
||||
zcat /proc/config.gz > .config && make && make modules && make install && make modules_install
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
|
||||
via: http://www.linux.org/threads/the-linux-kernel-compiling-and-installing.5208/
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,3 +1,4 @@
|
||||
乌龙茶占坑
|
||||
Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos
|
||||
================================================================================
|
||||
> The Orange Box, a portable server cluster that Canonical will use for Ubuntu-based OpenStack cloud demonstrations and training, is now available.
|
||||
@ -34,4 +35,4 @@ via: http://thevarguy.com/ubuntu/062314/canonical-debuts-orange-box-ubuntu-opens
|
||||
[6]:http://thevarguy.com/ubuntu/051614/shuttleworth-highlights-ubuntu-openstack-cloud-innovations
|
||||
[7]:http://www.ubuntu.com/cloud/tools/jumpstart
|
||||
[8]:http://arstechnica.com/information-technology/2014/06/hands-on-with-canonicals-orange-box-and-a-peek-into-cloud-nirvana/
|
||||
[9]:http://www.intel.com/content/www/us/en/nuc/overview.html
|
||||
[9]:http://www.intel.com/content/www/us/en/nuc/overview.html
|
||||
|
@ -1,12 +1,13 @@
|
||||
Google Forks Open Source OpenSSL Web Security Code
|
||||
2q1w2007翻译中
|
||||
谷歌分支了开源的 OpenSSL 网站安全代码
|
||||
================================================================================
|
||||
> Google's BoringSSL, a fork of the open source OpenSSL software for encrypting Web data, will spread the open source community's resources thinner.
|
||||
> 谷的 BoringSSL, 一个开源用来加盟网站数据的的OpenSSL分支,将会向开源社区提交代码
|
||||
|
||||
![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2014/06/grayscale6jpgcropdisplay.jpg)
|
||||
|
||||
In the wake of [Heartbleed][1], there may soon be as many variants of the open source OpenSSL software for encrypting Web traffic as there are Pokemon characters—or something like that. A few days ago, Google (GOOG) became the latest organization to announce its own OpenSSL spin, which it's calling BoringSSL.
|
||||
因为[Heartbleed][1]暴露出的脆弱, 用来加密网页传输的开源OpenSSL的变种可能和口袋妖怪里的角色一样多。前两天, Google (GOOG) 成为了最早宣布自己的OpenSSL分支的组织,其分支叫做BoringSSL。
|
||||
|
||||
Google developer Adam Langley announced BoringSSL—a name he described as "aspirational," presumably because Google hopes the new software will prove more drama-free than OpenSSL—in a [blog post][2] on June 20.
|
||||
Google的开发者Adam Langley announced BoringSSL—a name he described as "aspirational," presumably because Google hopes the new software will prove more drama-free than OpenSSL—in a [blog post][2] on June 20.
|
||||
|
||||
Google has made its own modifications to the OpenSSL code for some time for use in Chrome and other offerings, Langley said. But going forward, the company intends to fork OpenSSL entirely to create a separate solution, a change it hopes will simplify development on Google's end.
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
Translated by Ramerzhang
|
||||
Four Awesome Free Alternatives to Ubuntu One Cloud Storage
|
||||
================================================================================
|
||||
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/04/ass.jpg)
|
||||
|
@ -1,4 +1,3 @@
|
||||
zpl1025 translating
|
||||
Raspberry Pi In Schools
|
||||
================================================================================
|
||||
> Teaching the world to code is a noble goal, but how is it going to work in practice?
|
||||
|
@ -1,4 +1,3 @@
|
||||
linuhap翻译中
|
||||
The Best Linux Distribution for New Users
|
||||
================================================================================
|
||||
This is a debate that most certainly brings out the beast in many a Linux user. The argument doesn't generally boil down to which distribution is truly best suited for new users, but which distribution is favored by those in the debate. If we set our personal preferences aside, a clearer picture can arise. But even that clarity can quickly get obscured by the needs and desires of the new users. Given that, I decided to take a different approach to finding the “best distro for new users." My criteria for best distribution must not only be easy to use, but also must appeal to a more modern design aesthetic brought about by the ever-growing thrust of the mobile interface metaphor.
|
||||
|
@ -1,4 +1,3 @@
|
||||
[translating | sailing]
|
||||
HTG Explains: What is Unix and Why Does It Matter?
|
||||
================================================================================
|
||||
![](http://cdn.howtogeek.com/wp-content/uploads/2014/02/ken-thompson-and-dennis-richie-at-pdp-11.jpg)
|
||||
|
@ -1,81 +0,0 @@
|
||||
owen-carter translating
|
||||
14 Apps To Boost Ubuntu
|
||||
================================================================================
|
||||
Making the switch to Ubuntu – or any popular Linux distribution – is more than the mere act of changing operating systems. You must also have apps that allow you to get work done.
|
||||
|
||||
In this article, I'll be sharing critical applications that I rely on, and I’ll talk about how I use them in my daily activities.
|
||||
|
||||
### Apps for Daily Use ###
|
||||
|
||||
Generally when it comes to software on the Linux desktop, I drop app titles into one of two categories. These would be stuff I use every day, and everything else. Below are applications I find myself running each and every day.
|
||||
|
||||
1) **Firefox** – Sometimes I use other browsers, but lately [Firefox][1] has been my long trusted friend. Reliable, safe and cross platform, Firefox is generally what I use for my daily browsing needs.
|
||||
|
||||
In addition to accessing bookmarks and webpages, I also rely on Firefox to handle my various LAN server duties as well. Duties such as: [Plex][2], [Zoneminder][3], router/WAPs, and my file server. All of these are accessed each day using Firefox.
|
||||
|
||||
2) **Parcelite** – I can't begin to function without a decent clipboard manager, and for me, you can't beat [Parcelite][4] on the GNOME desktop. Simple to use, easy to access and it's also chalked full of useful options. Parcelite options include everything from hotkeys to white space handling. There are a ton of great clipboard managers out there, but it's tough to beat what Parcelite offers.
|
||||
|
||||
3) **Bittorrent Sync** – I have used various open source alternatives for file syncing that needed more development before being released. That being said [Bittorrent Synchas][5] NEVER let me down. It's easy to run and install thanks to the new GUI offering, and Bittorrent Sync allows me to transfer huge video files quickly from machine to machine without wasting time syncing stuff to the "cloud."
|
||||
|
||||
I've also found it to be a fantastic way to share large files easily with others, while maintaining IP address and directory privacy along the way. Despite the numerous alternatives available, I remain firmly grounded as a Bittorrent Sync fanboy.
|
||||
|
||||
4) **System Monitor** – Because TOP only goes so far, I prefer a tabbed GUI as it's much easier on my eyes. Using GNOME's [System Monitor][6], I can quickly discover a runaway process and easily kill it without ever needing to break a sweat. Unlike a terminal app like [TOP][7], I can also get a visual perspective using graphs in real-time for my CPU, memory and disk usage. Being a visual person, it's difficult to beat the bar graph showing me how much space I have. Same applies to real-time resource usage as well.
|
||||
|
||||
5) **PulseAudioControl** – Each day, I tend to bounce between multiple sound devices. Sometimes I need to make one the default, but then switch from Firefox audio to another device altogether. Because I like to have as much control over my audio as possible, I've found that [PulseAudioControl][8] is an invaluable tool.
|
||||
|
||||
### Everything else software ###
|
||||
|
||||
In this section, I'll share apps that I use, but may not necessarily use each and every day. Many of these apps are open source, some are not, all are of great value to me personally.
|
||||
|
||||
6) **Skype** – Whether it's calling into [Jupiter Broadcasting][9] to co-host a weekly podcast, or simply catching up with a business contact, [Skype][10] is how Internet video conversations happen. After testing countless alternatives, I always find myself coming back to Skype. Even though there are really awesome open source options like [Ekiga][11] or [Jitsi][12], at the end of the day Skype is where everyone is at – good luck getting people to switch.
|
||||
|
||||
7) **Kdenlive** – I use two different video editors, and when it comes to banging out a heavily edited video, [Kdenlive][13] is the tool I use for picture in picture compositing and editing really large, complex videos. I've successfully managed 6 track edits in Kdenlive that have crashed in other video editors.
|
||||
|
||||
8) **OpenShot** – For the most part, [OpenShot][14] is my goto video editor for most of my video editing tasks. Quick edits, and two track work goes by quickly and easily using this editor. I have also found that it offers great effects that are difficult to match elsewhere. Blender title effects and great video transitions make OpenShot a fantastic editor for my own projects.
|
||||
|
||||
9) **SpiderOak** – After using countless cloud backup services over the years, I've settled on [SpiderOak][15] as my favorite. Easy to use and setup, I love the incremental options provided and how simple it is use. Just set it and forget it, then SpiderOak does all the heavy lifting.
|
||||
|
||||
10) **Dropbox** – I've had a love/hate relationship with [Dropbox][16] for many years now. Despite being cross platform, which means I can access files from anywhere, I'm slowly finding my self less and less reliant on this cloud-based backup solution. Still, it does allow me to access files from any web browser even if it's not from a computer I'm normally using, which makes dropping the Dropbox habit even harder.
|
||||
|
||||
11) **Writer** – I've been relying on [Writer][17] since I first used it on Windows via OpenOffice. Today, I am using Writer with LibreOffice and for my needs, it does everything I could need a word processor to do. Now it's fair to point out that some proprietary office suites might offer additional functionality not found in Writer, however 99% of what most people need is covered here with Writer. For me personally, I'll always be a LibreOffice Writer fan.
|
||||
|
||||
12) **SimpleScreenRecorder** – Over the years, I've come to find myself using [SimpleScreenRecorder][18] over other alternatives as it does a nice job with multiple monitor support, plus it can even capture OpenGL applications as well. Easy to use and reliable, SimpleScreenRecorder has served me well. I recommend it to anyone who is tired of playing with other screen capturing software that only works some of the time.
|
||||
|
||||
13) **SimpleScan** – When I need to scan a document, I don't want to spend a lot of time configuring a bloated program. [Simple Scan][19] is great in this capacity. Rocking the SANE scanner database, Simple Scan will work with just about any scanner or all-in-one printer/scanner you throw at it. What's also nice is that it's setup to work with the best resolution out of the box, yet you're still free to make any manual adjustments you see fit.
|
||||
|
||||
14) **Baobab** (Disk Usage Analyzer) – I keep hearing how hard drive prices have come down. Be that as it may, the fact is I'm not made of money and each dollar I spend is usually part of a tight budget. This means I need to make the best use of the hard drive space I have available. To help me do this, I rely on [Baobab][20] to give me both a clear view of my available space on my hard drive, but also a clearer picture of which directories are eating away at my precious hard drive space.
|
||||
|
||||
### Apps That Really Work, Regardless ###
|
||||
|
||||
When it comes to applications I rely on, it's really less about their titles and licenses and more about the tasks that they allow me to accomplish. The myth that Linux doesn't really have required software is becoming a thing of the past. Most computing tasks, barring a few limited exceptions, can be done easily from the Linux desktop as I've explained above.
|
||||
|
||||
Obviously there are applications that are "must haves" for you, that I might not use myself. What applications do you rely on? Hit the Comments below and share your best applications with the readers here.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.datamation.com/applications/14-apps-to-boost-ubuntu-1.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.mozilla.org/en-US/firefox/new/
|
||||
[2]:https://plex.tv/
|
||||
[3]:http://www.zoneminder.com/
|
||||
[4]:http://parcellite.sourceforge.net/
|
||||
[5]:http://www.bittorrent.com/sync
|
||||
[6]:https://help.gnome.org/users/gnome-system-monitor/3.12/
|
||||
[7]:http://linux.about.com/od/commands/l/blcmdl1_top.htm
|
||||
[8]:http://freedesktop.org/software/pulseaudio/pavucontrol/
|
||||
[9]:http://en.wikipedia.org/wiki/Jupiter_Broadcasting
|
||||
[10]:http://www.skype.com/en/download-skype/skype-for-linux/
|
||||
[11]:http://ekiga.org/
|
||||
[12]:https://jitsi.org/
|
||||
[13]:http://www.kdenlive.org/
|
||||
[14]:http://www.openshot.org/
|
||||
[15]:https://spideroak.com/
|
||||
[16]:https://www.dropbox.com/
|
||||
[17]:http://www.libreoffice.org/discover/writer/
|
||||
[18]:http://www.maartenbaert.be/simplescreenrecorder/
|
||||
[19]:https://launchpad.net/simple-scan
|
||||
[20]:http://www.marzocca.net/linux/baobab/baobab-getting-started.html
|
58
sources/talk/20140626 Joy of Programming--Fail Fast.md
Normal file
58
sources/talk/20140626 Joy of Programming--Fail Fast.md
Normal file
@ -0,0 +1,58 @@
|
||||
Joy of Programming: Fail Fast!
|
||||
================================================================================
|
||||
![](http://www.opensourceforu.com/wp-content/uploads/2011/12/fail-350x262.jpg)
|
||||
|
||||
> When a problem occurs in the software, it should fail immediately, in an easily noticeable way. This “fail fast” behaviour is desirable, and we’ll discuss this important concept in this column.
|
||||
|
||||
At first, a “fail fast” might appear to be a bad practice affecting reliability — why should a system crash (or fail), when it can continue execution? For this, we need to understand that fail fast is very relevant in the context of Heisenbugs.
|
||||
|
||||
Consider Bohrbugs, which always crash for a given input, for example, with a null-pointer access. These bugs are easier to test, reproduce and fix. Now, all experienced programmers would have faced situations where the bug that caused the crash just disappears when the software is restarted. No matter how much time and effort is spent to reproduce the problem, the bug eludes us. These bugs are known as Heisenbugs.
|
||||
|
||||
The effort required to find, fix and test Heisenbugs is an order of magnitude more than the effort required for Bohrbugs. One strategy to avoid Heisenbugs is to turn them into Bohrbugs. How? By anticipating the possible cases in which Heisenbugs can arise, and trying to make them Bohrbugs. Yes, it is not easy, and it is also not always possible, but let us look at a specific example where it is useful.
|
||||
|
||||
Concurrent programming is one paradigm where Heisenbugs are common. Our example is a concurrency-related issue in Java. While iterating over a Java collection, we are supposed to modify the collection only through the Iterator methods, such as the remove() method. During iteration, if another thread attempts to modify that underlying collection (because of a programming mistake), the underlying collection will get corrupted (i.e., result in an incorrect state).
|
||||
|
||||
Such an incorrect state can lead to an eventual failure — or if we are fortunate (actually, unfortunate!), the program continues execution without crashing, but gives the wrong results. It is difficult to reproduce and fix these bugs, because such programming mistakes are non-deterministic. In other words, it is a Heisenbug.
|
||||
|
||||
Fortunately, the Java Iterators try to detect such concurrent modifications, and if found, will throw a `ConcurrentModificationException`, instead of failing late — and that too, silently. In other words, the Java Iterators follow the “fail fast” approach.
|
||||
|
||||
What if a `ConcurrentModificationException` is observed in production software? As the Javadoc for this exception observes, it “
should be used only to detect bugs.” In other words, `ConcurrentModificationExceptions` are supposed to be found and fixed during software development, and should not leak to production code.
|
||||
|
||||
Well, if production software does get this exception, it is certainly a bug in the software, and should be reported to the developer and fixed. At least, we know that there was an attempt for concurrent modification of the underlying data structure, and that’s why the software failed (instead of getting wrong results from the software, or failing later with some other symptoms, for which it is not feasible to trace the root cause).
|
||||
|
||||
The “fail-safe” approach is meant for developing robust code. A very good example of writing fail-safe code is using assertions. Unfortunately, there is a lot of unnecessary controversy surrounding the use of asserts. The main criticism is this: the checks are enabled in the development version, and disabled in release versions.
|
||||
|
||||
However, this criticism is wrong: asserts are never meant to replace the defensive checks that should be put in place in the release version of the software. For example, asserts should not be used to check if the argument passed to a function is null or not. Instead, an if condition should be used to check if the argument is passed correctly, or else an exception, or a premature return, should be performed, as appropriate to the context. However, asserts can be used to do additional checks for assumptions that are made in the code, which are supposed to hold true. For example, a condition that checks that the stack is not empty after a push operation is performed on it (i.e., checking for “invariants”).
|
||||
|
||||
So, fail fast, be assertive, and you’re on the way to developing more robust code.
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via:http://www.opensourceforu.com/2011/12/joy-of-programming-fail-fast/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:
|
||||
[2]:
|
||||
[3]:
|
||||
[4]:
|
||||
[5]:
|
||||
[6]:
|
||||
[7]:
|
||||
[8]:
|
||||
[9]:
|
||||
[10]:
|
||||
[11]:
|
||||
[12]:
|
||||
[13]:
|
||||
[14]:
|
||||
[15]:
|
||||
[16]:
|
||||
[17]:
|
||||
[18]:
|
||||
[19]:
|
||||
[20]:
|
@ -0,0 +1,41 @@
|
||||
Linux Administration: A Smart Career Choice
|
||||
================================================================================
|
||||
![](http://www.opensourceforu.com/wp-content/uploads/2014/04/linux.jpeg)
|
||||
|
||||
> This is a good year for IT professionals with a number of new jobs in emerging technologies like Big Data and Analytics, and Social Mobile Analytics and Cloud (SMAC) as employers look to strengthen their technological force.
|
||||
|
||||
If we were to believe the reports by [Dice.com][1] and Linux foundation released in mid Feb, 2014, this year will be a high octane year for Linux professionals and aspirants particularly. Thus it only makes sense to be future-ready and find out about the details of career opportunities such as that of a Linux administrator.
|
||||
|
||||
Dice.com, the leading job site for tech professionals and Linux Foundation did a comprehensive survey to find out about the advantage Linux professionals have in the current technology landscape. The findings were heavily skewed in favor of those who are looking for a good job opportunity on Linux platform.
|
||||
|
||||
While seventy seven percent of hiring managers surveyed consider hiring Linux talent as one of their top priorities (up from 70 percent in 2013), 64 percent of professionals chose to work with Linux owing to its ubiquitous nature in the present day technology infrastructure. More than nine in ten recruitment manager is planning to hire a Linux professional in the next six months. This demand is surely going to translate in form of a lot of interview calls from employers. Most hiring managers also agree to the fact that it is rather difficult to find experienced professionals, and those who have the right mix of skills, knowledge, certifications and experience are being aggressively recruited.
|
||||
|
||||
### Why Linux administration? ###
|
||||
|
||||
The findings of this report make it clear that Linux professionals are amongst the most sought after in the current tech market. However, a more interesting finding of the report is that amongst all the skills, the hiring managers are most actively seeking system administration, with 58 percent confirming they were on look out of professionals with good system administration skills. The reason is quite simple. There aren’t too many good system administrators out there, which is also driving the salaries of system admins northwards.
|
||||
Getting started in Linux administration
|
||||
|
||||
Armed with all this data, it wouldn’t come as surprise if you decide right away to pursue a career in Linux administration. So, how do you become a pro Linux system admin? Well, the right mix of certification, education and experience will obviously land you the perfect Linux job, but if you are clueless about a place to start, then a degree in computers is what you should be looking at. This could be B.Tech with Computer Science or IT as specialisation or Bachelors in Computer Application or even a Bachelor in Science with IT as specialisation will do. This would actually make you familiar with the various aspects of computer science as a subject, likes of programming, hardware, and software. This understanding would come handy in the advancement of your career, when you climb the next ladder through certifications.
|
||||
|
||||
### Certifications ###
|
||||
|
||||
It is widely believed that IT certifications do help one in career advancement. However, it ultimately boils down to selecting the right certification to gain the maximum RoI. There are many Linux based certifications, the most famous of which is Red Hat Certification Program, which teaches general Linux related skills along with specific system administration skills.
|
||||
|
||||
In addition to the vendor sponsored certifications, there is a vendor-independent Linux Professional Institute Certification offered by Linux Professional Institute, a non-profit organisation based in Toronto, Canada.
|
||||
|
||||
These exams can be taken by anyone irrespective of their nationalities. The LPI programs have three level hierarchies that include LPIC-1: Junior Level Linux Administration, LPIC-2: Advanced Level Linux Administration and LPIC 3: Senior Level Linux Administration. In order to be considered seriously for any system administrator job opportunity in one must possess at least one of the above described certifications. The LPI also has partnerships with SUSE, which is the vendor for a famous enterprise operating system going by the same name. CompTIA, which is a global IT certification agency also provided a Linux+ certification which was phased out after an agreement between LPI and CompTIA.
|
||||
|
||||
### Salaries and Benefits ###
|
||||
|
||||
The compensations for Linux administrators are generally on the higher side. As per PayScale, the annual median salary is around INR 3 lacs for entry level professionals (as updated on 27th March, 2014). With experience, there is an exponential increase in the salary levels as individuals with 5+ years of experience getting annual packages in seven figures.
|
||||
Well, with the grass being greener for Linux professionals this year, you won’t get a better opportunity or time for pursuing career as a Linux system administrator.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.opensourceforu.com/2014/04/career-overview-linux-administrator/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://dice.com/
|
@ -1,6 +1,3 @@
|
||||
|
||||
>>chenguang is translating it
|
||||
|
||||
How to Rescue a Non-booting GRUB 2 on Linux
|
||||
================================================================================
|
||||
![Figure 1: GRUB 2 menu with cool Apollo 17 background.](http://www.linux.com/images/stories/41373/grub-command-shell.jpg)
|
||||
|
@ -1,5 +1,3 @@
|
||||
zsJacky translating
|
||||
|
||||
How to diskless boot a Linux machine
|
||||
================================================================================
|
||||
Diskless booting implies that a client computer does not have any disk storage when booting an operating system. In that case, the computer can load the kernel as well as the root filesystem from a remote NFS server over network. It may use several different methods to load the kernel and the root filesystem from an NFS server: RARP, BOOTP or DHCP protocols. In this tutorial, I will use BOOTP/DHCP protocol because they are supported by many network cards.
|
||||
|
@ -1,5 +1,3 @@
|
||||
Translating by shipsw
|
||||
|
||||
Linux Screenshot App Shutter Updates with Bug Fixes, New Icon
|
||||
================================================================================
|
||||
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/06/shutter.jpg)
|
||||
|
@ -1,86 +0,0 @@
|
||||
Managing Vim extensions with NeoBundle
|
||||
================================================================================
|
||||
[NeoBundle][1] is a third-generation extension manager for [Vim][2], building on [Vundle][3], which builds on [Pathogen][4]. In an earlier article, I [advised against using Neobundle][5] because of its rapid development and minimal English documentation. Now, more than a year later, both problems are more manageable.
|
||||
|
||||
Why use an extension manager? Vim supports a healthy number of plugins, but its unmodified structure makes administering them difficult because extension files can be spread over several directories. Vim extension managers simplify things. Pathogen, Vundle, and NeoBundle create the directory ~/.vim/bundle, with a separate subdirectory for all the files of each extension. This structure allows users to easily and thoroughly delete extensions, either manually or via a file manager, and helps minimize potential conflicts when you have a couple of dozen extensions.
|
||||
|
||||
NeoBundle openly models itself on Vundle. Like Vundle, it both installs and updates extensions. However, the help file openly admits that "Neobundle is not a stable plugin manager. If you want [a] stable plugin manager, you should use Vundle." New releases, the help warns, "may break compatibility" – a comment that is less than reassuring, coming from the developers.
|
||||
|
||||
So why should you use NeoBundle? One reason is that Vundle works only with [Git][6], while NeoBundle also supports [Subversion][7] and [Mercurial][8] repositories. Another reason is that, if you want to keep extension updates from breaking your Vim ecosystem, you can lock NeoBundle so that it uses only a specific version of any particular extension.
|
||||
|
||||
In addition, NeoBundle's creator, Shougo Matsuishita, is adding its command structures to several other extensions in order to reduce the list of commands they use. Currently, NeoBundle supports three such extensions: [unite.vim][9], a file and buffer manager that works within Vim; [vimshell.vim][10], a scripting shell for Vim; and [vimproc.vim][11], which works within vimshell.vim to allow asynchronous events. That's an idiosyncratic collection, and all three are poorly documented in English, so average users may wish to forgo them. Before tackling any of them, most users should focus on the basics of NeoBundle.
|
||||
|
||||
### Installing and initializing NeoBundle ###
|
||||
|
||||
NeoBundle requires Vim 7.2.051 or higher and requires git be installed, and depends on [cURL][12] for downloading files. You can install NeoBundle manually, but the fast way to install it is to clone its repository on GitHub using cURL. From your home directory, enter the following command to copy the files for NeoBundle into .vim/bundle/neobundle.vim, where the extension can manage itself:
|
||||
|
||||
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh
|
||||
|
||||
You also need to modify your .vimrc file. NeoBundle's GitHub page offers a sample .vimrc file, but copying it means installing five plugins you may not want. This is the minimal content that you need:
|
||||
|
||||
if has('vim_starting')
|
||||
set nocompatible
|
||||
set runtimepath+=~/.vim/bundle/neobundle.vim/
|
||||
call neobundle#begin(expand('~/.vim/bundle/'))
|
||||
NeoBundleFetch 'Shougo/neobundle.vim'
|
||||
call neobundle#end()
|
||||
filetype plugin indent on
|
||||
|
||||
These lines set up and start NeoBundle, and set NeoBundle to update itself just like any other plugin. NeoBundle defaults to updating itself from GitHub repositories, so if you use GitHub, all you have to do is specify the maintainer's username and the directory for the plugin; in the lines above, NeoBundleFetch needs to specify only "Shougo/neobundle.vim" instead of the complete path on GitHub. If you want to use another site instead, including one that supports Subversion or Mecurial, you need to add the complete URL to the repository.
|
||||
|
||||
If you want to install other NeoBundle plugins, use this generic form:
|
||||
|
||||
curl -k https://github.com/[MAINTAINER]/ [PLUGIN PATH] > ~/.vim/bundle/[PLUGIN PATH]
|
||||
|
||||
or, to give a more specific example, you can install the [vim-abolish plugin][13], a super-charged search and replace extension, with the command
|
||||
|
||||
curl -k https://github.com/tpope/vim-abolish > ~/.vim/bundle/abolish
|
||||
|
||||
To have the extension updated automatically, add a line below the NeoBundleFetch line that gives the path to its repository. For example:
|
||||
|
||||
NeoBundle 'tpope/vim-abolish'
|
||||
|
||||
Optionally, you can specify a particular branch or revision of NeoBundle to use, preventing any updates. This option can be useful if you are using extensions that are in rapid development and you want to avoid having them break when you update any other extensions. For instance:
|
||||
|
||||
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
|
||||
|
||||
Another option is to place the directive NeoBundleCheck on a line at the end of the NeoBundle stanza in .vimrc. When this line is present, NeoBundle checks for uninstalled bundles and prompts you to install them. You can also run the utility `:NeoBundleInstall` from within NeoBundle to initialize or update installed extensions.
|
||||
|
||||
### NeoBundle utilities ###
|
||||
|
||||
Many of NeoBundle's utilities function similarly to Vundle's, but they are differently named. You use the utilities to administer plugins from within NeoBundle:
|
||||
|
||||
- Run `:NeoBundleUpdate` when you install or update extensions, and when you manually remove an extension's files. It can be followed by a specific plugin, such as "/Shougo/neobundle.vim," or without a plugin name to configure all plugins that are installed but not configured. The command NeoBundleInstall! provides the same functionality.
|
||||
- `:NeoBundle {REPOSITORY URI} [[REVISION}] [,OPTIONS}]]` configures an extension while locking it into a specified version, preventing any updates.
|
||||
- `:NeoBundleList` lists unintialized extensions.
|
||||
- `:NeoBundleClean` runs an interactive utility for removing unused extensions.
|
||||
|
||||
These utilities are also available in slightly different forms when you run NeoBundle with unite.vim. You can learn more about the utilities in all their forms by running the command `:help neobundle`.
|
||||
|
||||
Deciding whether to use NeoBundle
|
||||
|
||||
NeoBundle is a powerful tool, but its seemingly permanent state of rapid development can be a blessing or a curse, depending on your preferences. If you want the latest features and extensions, NeoBundle can make Vundle and Pathogen look decidedly old-fashioned.
|
||||
|
||||
However, with the online help itself warning of instability, ignoring the possibility of the latest version of one extension interfering with the proper functioning of another would be rash. At the very least, you should specify in your .vimrc a version of NeoBundle that you know to be stable. You might also do the same for any extension that you use regularly. With this precaution, you can enjoy following the development of NeoBundle and its related extensions while avoiding the consequence of working on the bleeding edge.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.openlogic.com/wazi/bid/348084/Managing-Vim-extensions-with-NeoBundle
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://github.com/Shougo/neobundle.vim
|
||||
[2]:http://olex.openlogic.com/packages/vim
|
||||
[3]:https://github.com/gmarik/Vundle.vim
|
||||
[4]:https://github.com/tpope/vim-pathogen
|
||||
[5]:http://www.openlogic.com/wazi/bid/262302/Three-tools-for-managing-Vim-plugins
|
||||
[6]:http://olex.openlogic.com/packages/git
|
||||
[7]:http://olex.openlogic.com/packages/subversion
|
||||
[8]:http://olex.openlogic.com/packages/mercurial
|
||||
[9]:https://github.com/Shougo/unite.vim
|
||||
[10]:https://github.com/Shougo/vimshell.vim/blob/master/doc/vimshell.txt
|
||||
[11]:https://github.com/Shougo/vimproc.vim/blob/master/doc/vimproc.txt
|
||||
[12]:http://olex.openlogic.com/packages/curl
|
||||
[13]:https://github.com/tpope/vim-abolish
|
@ -1,159 +0,0 @@
|
||||
[Translating] --213edu
|
||||
|
||||
How to enable testing and unstable repository on Debian
|
||||
================================================================================
|
||||
Testing/Unstable sources
|
||||
|
||||
The testing and unstable repositories of Debian provide with a higher version of software applications than what is present in the stable repository. Note that these names are actually aliases such that the stable repository points to the current Debian stable release and the Testing repository is what is going to be part of the next Debian stable release. So at the time of this post, Wheezy 7.x is the Stable release and Jessie is the Testing source which is going to be the next stable release.
|
||||
|
||||
At times, when you need to get a more recent version of a particular application, then the testing/unstable repository is a good option. I had the task of installing Apache 2.4.x onto a Debian wheezy system. But the repo had only 2.2.x and the testing repo had the required 2.4.x version. So the solution is to grab it from the testing repo.
|
||||
|
||||
Most of the time, when looking for newer versions of software applications, we would fiddle with the "Testing" repository only.
|
||||
|
||||
This post is going to show you how to setup the Testing and Unstable sources on a Debian system and how to install software from them, without breaking your existing system.
|
||||
|
||||
> Stable < Testing < Unstable
|
||||
> Wheezy < Jessie < Sid
|
||||
|
||||
### 1. Setup the apt sources for testing/unstable repo ###
|
||||
|
||||
The first step is to add the testing/unstable sources to your sources.list file. The /etc/apt/sources.list file on a Debian wheezy system looks something like this by default.
|
||||
|
||||
$ cat /etc/apt/sources.list
|
||||
|
||||
----------
|
||||
|
||||
...
|
||||
deb http://security.debian.org/ wheezy/updates main
|
||||
deb http://http.us.debian.org/debian/ wheezy main
|
||||
deb-src http://security.debian.org/ wheezy/updates main
|
||||
...
|
||||
|
||||
Note down the url of the repository server - http://http.us.debian.org/debian/
|
||||
This repository server is a mirror that is located nearest to you. It shall be different in your sources.list file. The same shall be used in the next steps
|
||||
|
||||
To add the testing and unstable sources you need to add something like this to your sources.list file
|
||||
|
||||
# Testing repository - main, contrib and non-free branches
|
||||
deb http://http.us.debian.org/debian testing main non-free contrib
|
||||
deb-src http://http.us.debian.org/debian testing main non-free contrib
|
||||
|
||||
|
||||
# Testing security updates repository
|
||||
deb http://security.debian.org/ testing/updates main contrib non-free
|
||||
deb-src http://security.debian.org/ testing/updates main contrib non-free
|
||||
|
||||
|
||||
# Unstable repo main, contrib and non-free branches, no security updates here
|
||||
deb http://http.us.debian.org/debian unstable main non-free contrib
|
||||
deb-src http://http.us.debian.org/debian unstable main non-free contrib
|
||||
|
||||
The format is
|
||||
|
||||
deb <respository server/mirror> <repository name> <sub branches of the repo>
|
||||
|
||||
Instead of testing/unstable the corresponding codenames jessie and sid can also be used
|
||||
|
||||
deb http://http.us.debian.org/debian jessie main non-free contrib
|
||||
deb http://security.debian.org/ jessie/updates main contrib non-free
|
||||
deb http://http.us.debian.org/debian sid main non-free contrib
|
||||
|
||||
### 2. Do some apt pinning - Important ! ###
|
||||
|
||||
> After adding the testing and unstable repos, if you update the system then all available updates for all installed applications would be installed right away, leading the system to an unpredictable state.
|
||||
|
||||
Therefore some rules have to be setup in order to restrict the package selection during regular updates/upgrades.
|
||||
|
||||
This is done through "apt pinning" where we tell the apt system to use only the stable system as always, but we may select to install a particular package from the testing or unstable repository if we wish to.
|
||||
|
||||
The apt pinning preferences can be configured into either of the following 2 files.
|
||||
|
||||
/etc/apt/preferences
|
||||
OR
|
||||
/etc/apt/preferences.d/my_preferences
|
||||
|
||||
Open either of the 2 locations (create one if it does not exist) and fill the following into the file
|
||||
|
||||
Package: *
|
||||
Pin: release a=stable
|
||||
Pin-Priority: 700
|
||||
|
||||
Package: *
|
||||
Pin: release a=testing
|
||||
Pin-Priority: 650
|
||||
|
||||
Package: *
|
||||
Pin: release a=unstable
|
||||
Pin-Priority: 600
|
||||
|
||||
Mentioned earlier, stable will point to your current debian version, testing to the next, and unstable would be further away in future. Main thing to note is the priority. The stable/current version has been given the highest priority which means that for regular tasks apt-get will install packages only from the current stable repository (wheezy in this case).
|
||||
|
||||
#### Update the package cache ####
|
||||
|
||||
After adding the new repository and specify the pinning rules, update the package cache.
|
||||
|
||||
$ sudo apt-get update
|
||||
|
||||
#### Confirm the apt policy ####
|
||||
|
||||
We must ensure that the pinning configuration is correct and that the priorities are met correctly. Check the effective apt policy with the apt-cache command
|
||||
|
||||
$ apt-cache policy apache2
|
||||
apache2:
|
||||
Installed: (none)
|
||||
Candidate: 2.2.22-13
|
||||
Version table:
|
||||
2.4.7-1 0
|
||||
600 http://http.us.debian.org/debian/ unstable/main amd64 Packages
|
||||
2.4.6-3 0
|
||||
650 http://http.us.debian.org/debian/ testing/main amd64 Packages
|
||||
2.2.22-13 0
|
||||
700 http://http.us.debian.org/debian/ wheezy/main amd64 Packages
|
||||
|
||||
The above output confirms that version 2.2.22 ( the wheezy main/stable ) repository is selected, its on highest priority.
|
||||
|
||||
### 3. Install apps from testing/unstable source ###
|
||||
|
||||
Now its time to pick a particular package out from the testing or unstable repo and install it. So lets say we want to install apache2 from testing source.
|
||||
|
||||
There are 2 ways to do it and each has a different effect.
|
||||
|
||||
#### Method 1 ####
|
||||
|
||||
# apt-get install apache2/testing
|
||||
|
||||
The above command will install the apache2 package from the testing source and install dependencies from stable source (or whatever the apt policy holds). This command fail in situations where the dependencies are outdated compared to what the installation package (apache2) needs.
|
||||
|
||||
#### Method 2 ####
|
||||
|
||||
# apt-get -t testing install apache2
|
||||
|
||||
The above command will install apache2 from testing source and install all dependencies from testing source as well. This should work better than the above command.
|
||||
|
||||
So to install newer version of any package, simply head towards the testing/unstable sources and enjoy. Note that the priority numbers are not just plain numbers, but have special meanings. Check the man page on apt preferences to learn more about them
|
||||
|
||||
$ man 5 apt_preferences
|
||||
|
||||
### Summary ###
|
||||
|
||||
Using the testing/unstable repository with pinning is an easy way to get newer versions of packages, but it is not recommended. If done wrong, it can mess up the system by pulling packages from different branches that may not be compatible.
|
||||
|
||||
A more recommended method to install updated packages is using the backports repository. It provides newer versions of selected packages from testing/unstable repo, but compiled for the current stable version. So on debian wheezy you can use wheezy-backports repository. Check out http://backports.debian.org/ for more information.
|
||||
|
||||
### Resources ###
|
||||
|
||||
- [https://wiki.debian.org/AptPreferences][1]
|
||||
- [https://wiki.debian.org/DebianTesting][2]
|
||||
- [https://www.debian.org/security/][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.binarytides.com/enable-testing-repo-debian/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://wiki.debian.org/AptPreferences
|
||||
[2]:http://wiki.debian.org/DebianTesting
|
||||
[3]:http://www.debian.org/security/
|
@ -1,4 +1,4 @@
|
||||
hyaocuk is translating
|
||||
CNprober 翻译中... 619913541
|
||||
|
||||
10 Tips to Push Your Git Skills to the Next Level
|
||||
================================================================================
|
||||
|
@ -1,91 +0,0 @@
|
||||
Advanced Directory Navigations Tips and Tricks in Linux
|
||||
================================================================================
|
||||
Directory navigation is one of the most basic concepts when it comes to understanding any command line system. Although it’s not a very difficult thing to understand when it comes to Linux, there are certain tips and tricks that can enhance your experience, and help you do things faster. In this article, we will discuss some advanced directory navigation tips.
|
||||
|
||||
### The Stuff We Already Know ###
|
||||
|
||||
Before jumping on to the advanced concepts, here is the basics of directory navigation that the article expects its readers to know:
|
||||
|
||||
- ‘pwd’ command is used to display the current working directory.
|
||||
- ‘cd’ command is used to change the current working directory.
|
||||
- ‘cd’ followed by space and followed by a couple of periods (cd ..) brings the control back to the parent directory
|
||||
- ‘cd’ followed by just the name of a subdirectory changes to that subdirectory
|
||||
- ‘cd’ followed by a complete path changes to that directory
|
||||
|
||||
### Advanced Tips ###
|
||||
|
||||
In this section we will discuss some directory navigation tips and tricks that will help you easily switch between directories.
|
||||
|
||||
### Change to the home directory from anywhere ###
|
||||
|
||||
Your home directory is an important directory, and everyone switches back and forth quite frequently. While typing ‘cd /home/<your-home-directory-name>’, isn’t a big deal, there is another way out which is not only easier but faster too. And that alternative is typing only ‘cd’.
|
||||
|
||||
Here is an example :
|
||||
|
||||
$ pwd
|
||||
/usr/include/netipx
|
||||
$ cd
|
||||
$ pwd
|
||||
/home/himanshu
|
||||
|
||||
So you can see, no matter where the current control is, just type ‘cd’ command and you can immediately change to your home directory.
|
||||
|
||||
**NOTE**- To change to the home directory of a particular user, just type ‘cd ~user_name'
|
||||
|
||||
### Switch between directories using cd - ###
|
||||
|
||||
Suppose your current working directory is this:
|
||||
|
||||
$ pwd
|
||||
/home/himanshu/practice
|
||||
|
||||
and you want to switch to the directory **/usr/bin/X11**, and then switch back to the directory mentioned above. So what will you do? The most straight forward way is :
|
||||
|
||||
$ cd /usr/bin/X11
|
||||
$ cd /home/himanshu/practice/
|
||||
|
||||
Although it seems a good way out, it really becomes tiring when the path to the directories is very long and complicated. In those cases, you can use the ‘cd -’ command.
|
||||
|
||||
While using ‘cd -’ command, the first step will remain the same, i.e., you have to do a cd <path> to the directory to you want to change to, but for coming back to the previous directory, just do a ‘cd -’, and that’s it.
|
||||
|
||||
$ cd /usr/bin/X11
|
||||
$ cd -
|
||||
/home/himanshu/practice
|
||||
$ pwd
|
||||
/home/himanshu/practice
|
||||
|
||||
And if you want to again go back to the last directory, which in this case is /usr/bin/X11, run the ‘cd -’ command again. So you can see that using ‘cd -’ you can switch between directories easily. The only limitation is that it works with the last switched directories only.
|
||||
|
||||
### Switch between directories using pushd and popd ###
|
||||
|
||||
![directory navigation](http://linoxide.com/wp-content/uploads/2014/06/pushd-popd.jpg)
|
||||
|
||||
If you closely analyse the ‘cd -’ trick, you’ll find that it helps switching between only the last two directories, but what if there is a situation in which you switch multiple directories, and then want to switch back to the first one. For example, if you switch from directory A to directory B, and then to directory C and directory D. Now, you want to change back to Directory A.
|
||||
|
||||
As a general solution, you can type ‘cd’ followed by the path to directory A. But then again, if the path is long or complicated, the process can be time-consuming, especially when you have to switch between them frequently.
|
||||
|
||||
In these kind of situations, you can use the ‘pushd’ and ‘popd’ commands. The ‘pushd’ command saves the path to a directory in memory, and the ‘popd’ command removes it, and switches back to it too.
|
||||
|
||||
For example :
|
||||
|
||||
$ pushd .
|
||||
/usr/include/netipx /usr/include/netipx
|
||||
$ cd /etc/hp/
|
||||
$ cd /home/himanshu/practice/
|
||||
$ cd /media/
|
||||
$ popd
|
||||
/usr/include/netipx
|
||||
$ pwd
|
||||
/usr/include/netipx
|
||||
|
||||
So you can see that I used ‘pushd’ command to save the path to current working directory (represented by .), and then changed multiple directories. To come back to the saved directory, I just executed the ‘popd’ command.
|
||||
|
||||
**NOTE**- You can also use ‘pushd’ command to switch back to the saved directory, but that doesn’t remove it from the memory, like ‘popd’ does.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/linux-command/directory-navigations-tips-tricks/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -1,80 +0,0 @@
|
||||
How to sync Microsoft OneDrive on Linux
|
||||
================================================================================
|
||||
[OneDrive][1] (previously known as SkyDrive) is a popular cloud storage offering from Microsoft. Currently OneDrive offers 7GB free storage for every new signup. As you can imagine, OneDrive is well integrated with other Microsoft software products. Microsoft also offers a standalone OneDrive client which automatically backs up pictures and videos taken by a camera to OneDrive storage. But guess what. This client is available for all major PC/mobile platforms except Linux. "OneDrive on any device, any time"? Well, it is not there, yet.
|
||||
|
||||
Don't get disappointed. The open-source community already has already come up with a solution for you. [onedrive-d][2] written by a Boilermaker in Lafayette can get the job done. Running as a monitoring daemon, onedrive-d can automatic sync a local folder with OneDrive cloud storage.
|
||||
|
||||
In this tutorial, I will describe **how to sync Microsoft OneDrive on Linux by using onedrive-d**.
|
||||
|
||||
### Install onedrive-d on Linux ###
|
||||
|
||||
While onedrive-d was originally developed for Ubuntu/Debian, it now supports CentOS/Fedora/RHEL as well.
|
||||
|
||||
Installation is as easy as typing the following.
|
||||
|
||||
$ git clone https://github.com/xybu92/onedrive-d.git
|
||||
$ cd onedrive-d
|
||||
$ ./inst install
|
||||
|
||||
### First-Time Configuration ###
|
||||
|
||||
After installation, you need to go through one-time configuration which involves granting onedrive-d read/write access to your OneDrive account.
|
||||
|
||||
First, create a local folder which will be used to sync against a remote OneDrive account.
|
||||
|
||||
$ mkdir ~/onedrive
|
||||
|
||||
Then run the following command to start the first-time configuration.
|
||||
|
||||
$ onedrive-d
|
||||
|
||||
It will pop up a onedrive-d's Settings window as shown below. In "Location" option, choose the local folder you created earlier. In "Authentication" option, you will see "You have not authenticated OneDrive-d yet" message. Now click on "Connect to OneDrive.com" box.
|
||||
|
||||
![](https://farm4.staticflickr.com/3885/14470579955_1fb92e7cfe.jpg)
|
||||
|
||||
It will pop up a new window asking you to sign in to OneDrive.com.
|
||||
|
||||
![](https://farm4.staticflickr.com/3903/14467221981_3d74140f61_z.jpg)
|
||||
|
||||
After logging in to OneDrive.com, you will be asked to grant access to onedrive-d. Choose "Yes".
|
||||
|
||||
![](https://farm3.staticflickr.com/2925/14283963819_86cf52e1fd_z.jpg)
|
||||
|
||||
Coming back to the Settings window, you will see that the previous status has changed to "You have connected to OneDrive.com". Click on "OK" to finish.
|
||||
|
||||
![](https://farm4.staticflickr.com/3896/14284004048_3e718d1e30.jpg)
|
||||
|
||||
### Sync a Local Folder with OneDrive ###
|
||||
|
||||
There are two ways to sync a local folder with your OneDrive storage by using onedrive-d.
|
||||
|
||||
One way is to **sync with OneDrive manually from the command line**. That is, whenever you want to sync a local folder against your OneDrive account, simply run:
|
||||
|
||||
$ onedrive-d
|
||||
|
||||
`onedrive-d` will then scan the content of both a local folder and a OneDrive account, and make the two in sync. This means either uploading newly added files in a local folder, or downloading newly found files from a remote OneDrive account. If you remove any file from a local folder, the corresponding file will automatically be deleted from a OneDrive account after sync. The same thing will happen in the reverse direction as well.
|
||||
|
||||
Once sync is completed, you can kill the foreground-running onedrive-d process by pressing Ctrl+C.
|
||||
|
||||
![](https://farm6.staticflickr.com/5509/14283967750_b9ebf1b05d_z.jpg)
|
||||
|
||||
Another way is to run onedrive-d as an always-on daemon which launches automatically upon start. In that case, the background daemon will monitor both the local folder and OneDrive account, to keep them in sync. For that, simply add onedrive-d to the [auto-start program list][3] of your desktop.
|
||||
|
||||
When onedrive-d daemon is running in the background, you will see OneDrive icon in the desktop status bar as shown below. Whenever sync update is triggered, you will see a desktop notification.
|
||||
|
||||
![](https://farm4.staticflickr.com/3924/14290119448_3b1144db77.jpg)
|
||||
|
||||
A word of caution: According to the author, onedrive-d is still under active development. It is not meant for any kind of production environment. If you encounter any bug, feel free to file a [bug report][4]. Your contribution will be appreciated by the author.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/06/sync-microsoft-onedrive-linux.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://xmodulo.com/go/onedrive
|
||||
[2]:http://xybu.me/projects/onedrive-d/
|
||||
[3]:http://xmodulo.com/2013/12/start-program-automatically-linux-desktop.html
|
||||
[4]:https://github.com/xybu92/onedrive-d/issues?state=open
|
@ -1,38 +0,0 @@
|
||||
Open Source Multimedia Converter Curlew 0.1.22.3 Is Out
|
||||
================================================================================
|
||||
![Curlew interface](http://i1-news.softpedia-static.com/images/news2/Open-Source-Multimedia-Converter-Curlew-0-1-22-3-Is-Out-448028-2.jpg)
|
||||
|
||||
**Curlew, an easy to use, free, and open source multimedia converter for Linux, has reached version 0.1.22.3.**
|
||||
|
||||
Curlew can be used to convert more than 100 different formats, show detailed file information, preview conversion, insert subtitles, and much more.
|
||||
|
||||
According to the changelog, the last size and position is now remembered from one instance to another, a few missing dialog icons have been added, and the filesystem is now synced before suspending.
|
||||
|
||||
The application has a number of dependencies: at least python version 2.7 (no more than 3.0), python-gobject 3.0, gir1.2-gtk 3.0, ffmpeg 0.8, libav-tools 0.8, mencoder, libavcodec-extra, xdg-utils, and mediainfo.
|
||||
|
||||
The guys from noobslab.com also provide an easy way of installing the application with the help of a PPA. All you have to do is to enter a few commands in the terminal (you will need to be root in order to make it work):
|
||||
|
||||
sudo add-apt-repository ppa:noobslab/apps
|
||||
sudo apt-get update
|
||||
sudo apt-get install curlew
|
||||
|
||||
Check out the official [changelog][1] for a complete list of new features and updates.
|
||||
|
||||
You can download the Curlew 0.1.22.3 source package:
|
||||
|
||||
- [Ubuntu 14.04 DEB ALL][2][ubuntu_deb] [172 KB]
|
||||
- [tar.gz][3][sources] [152 KB]
|
||||
|
||||
Remember that this is a development version and it should NOT be installed on production machines. It is intended for testing purposes only.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://news.softpedia.com/news/Open-Source-Multimedia-Converter-Curlew-0-1-22-3-Is-Out-448028.shtml
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://gtk-apps.org/content/show.php/Curlew?content=155664
|
||||
[2]:http://sourceforge.net/projects/curlew/files/curlew-0.1.22.3/curlew_0.1.22.3ubuntu14.04_all.deb/download
|
||||
[3]:http://sourceforge.net/projects/curlew/files/curlew-0.1.22.3/curlew-0.1.22.3.tar.gz/download
|
107
translated/talk/20140617 14 Apps To Boost Ubuntu.md
Normal file
107
translated/talk/20140617 14 Apps To Boost Ubuntu.md
Normal file
@ -0,0 +1,107 @@
|
||||
14个可以提升Ubuntu体验的应用程序
|
||||
|
||||
转战到Ubuntu-或者是别的流行的Linux发行版-不仅仅是操作系统的操作方式的改变,更多的是你还需要一些能支持你完成工作的好的apps。
|
||||
|
||||
|
||||
在这篇文章中,我将分享一些我使用的关键的基础应用程序,我将谈谈在我的日常工作中如何有效地使用它们。
|
||||
|
||||
|
||||
|
||||
|
||||
### 日常使用的应用程序 ###
|
||||
|
||||
|
||||
一般当说到Linux 桌面上的应用,我总是将这些应用划分为两大类,频繁使用的和一些别的应用。下边我为大家介绍的是一些自己日常使用的应用。
|
||||
|
||||
|
||||
1) **Firefox** — 有时我也会使用用其他的浏览器,但最近[火狐浏览器][1]已经成为我可以长期信赖的朋友。可靠的、 安全的、 跨平台的,火狐浏览器完全满足了我的日常冲浪需求。
|
||||
|
||||
|
||||
除了访问书签和网页,我还依靠火狐浏览器来处理我各种局域网服务器的事务,如 [Plex][2], [Zoneminder][3], router/WAPs, 和我的文件服务器。所有这些均可以使用火狐浏览器进行访问。
|
||||
|
||||
|
||||
2) **Parcelite**— 如果没有一个像样的剪贴板管理器我简直没法开始工作,至少对我来说,你无法吐槽在GNOME 桌面环境下的[Parcelite][4] 。使用简单,易于访问而且它提供了很多的有用的选项。Parcelite 选项包括一切从热键到white space handling的处理。尽管已经有很多的剪贴板管理器,但它们却很难击败 Parcelite 。
|
||||
|
||||
|
||||
3) **Bittorrent Sync** — 我已经使用过了各种开源替代方案,为了同步那些在发布之前还需要进行开发的那些项目,之后我发现[Bittorrent Synchas][5] 从来没有让我失望过。它运行和安装都很简单和方便这多亏了新的GUI的实现,而且 Bittorrent Sync 允许我快速地传输巨大的视频文件从机器到机器而无需浪费时间去将大量的文件同步到“云端”。
|
||||
|
||||
|
||||
我还发现它是很容易与别人分享大型文件,同时能一直保持 IP 地址和目录的隐蔽。尽管有许多的替代品,我仍然坚定地将Bittorrent Synchas作为 Bittorrent Sync变形金刚迷。
|
||||
|
||||
|
||||
4) **System Monitor** — 因为TOP实在是滚动地太快了,所以我个人更喜欢一个具有选项卡式的 GUI,因为它能够释放我的眼睛。使用 GNOME 的系统监视器,我可以很地会发现一个失控的进程,并且轻松地kill掉它而不需吹灰之力。与[TOP][7]终端应用程序不同的是,我可以使用实时图形在视觉角度去查看我的 CPU、 内存和磁盘的使用情况。作为一个拥有视觉的人,你不得不说,用条形图去展示我还拥有多少的空间,当然这也同样适用于实时的资源使用情况,这种GUI实现实在是太赞了。
|
||||
|
||||
|
||||
5) **PulseAudioControl** — 每一天,我总是需要在多个声音设备之间来回穿梭。有时我需要将其中一个设为默认设备,但然后却完全可能会从火狐浏览器音频切换到到另一个设备。因为我喜欢控制我尽可能多的音频,然后我就发现 [PulseAudioControl][8]是一个无价的工具。
|
||||
|
||||
|
||||
|
||||
|
||||
### 一些别的软件 ###
|
||||
|
||||
在本节中,我将分享我使用,但可能并不一定是每天都使用的应用程序。许多这些应用程序都是开放源代码的,有一些不是,但是它们对我个人都非常具有价值。
|
||||
|
||||
|
||||
6) **Skype** — 无论它在呼唤[Jupiter Broadcasting][9] 进入每周共同主持的播客,或者只是联系上了一个业务,[Skype][10] 见证了互联网视频会议的发展史。测试完成无数的替代品后,我总是会发现自己还是终归回到 了Skype。即使有真的很棒的开源选择像[Ekiga][11] 和 [Jitsi][12],在年底的一天,Skype 与大家同在 — — 希望切换到Skype是一件很愉快的事。
|
||||
|
||||
|
||||
7)**Kdenlive** — 我使用两个不同的视频编辑器,当我要导出一个庞大的视频剪辑项目的时候。[Kdenlive][13]是我使用的图片合成和编辑大型的、 复杂的视频的工具。我已经成功地在 Kdenlive 里边管理了6个素材轨道,但同样的负载量早已经让别的视频剪辑软件崩溃了。
|
||||
|
||||
|
||||
|
||||
8)**OpenShot** — 大多数情况下,我会将[OpenShot][14]作为视频剪辑任务的首选神兵利器。快速的编辑和两个素材轨道工作区的流畅的简单操作、 方便地使用此编辑器。我还发现它提供了很棒的无与伦比的特效。混合标题效果和超赞的的视频转场效果使OpenShot成为一款超棒的视频制作软件,在我自己的视频项目上。
|
||||
|
||||
|
||||
9)**SpiderOak** — 在使用了无数云备份服务这么多年后, [SpiderOak][15] 已经成为了我的至爱,。易于安装和使用,我超喜欢它所提供的增量选项而且使用起来是如此的简单。只需一次完美设置,然后忘记,之后SpiderOak将会挑起你的文件搬运大任。
|
||||
|
||||
|
||||
10) **Dropbox** — 许多年来,我已经与[Dropbox][16] 爱恨交织。尽管它的跨平台特性这意味着我可以从任何位置访问文件,我慢慢地发现我自己越来越少依赖这个基于云计算的备份解决方案。尽管如此,它允许我从任何 web 浏览器中访问文件,即使是从我不经常使用的计算机,这使得抛弃 Dropbox 更是难上加难。
|
||||
|
||||
|
||||
11) **Writer** — 我一直以来都在使用[Writer][17] 自从我第一次使用它在 Windows 上通过 OpenOffice。今天,我使用Writer与 LibreOffice 来满足我的需求,它可以做一切一个文字处理器可以做的。现在它是公正地指出,一些在作家中找不到专有的办公套件可能会提供附加功能,但是 99%的大多数人需要的功能在Writer这里都有。就我个人而言,我会永远是一个LibreOffice Writer粉。
|
||||
|
||||
|
||||
12)**SimpleScreenRecorder** — 多年来,我发现自己使用 [SimpleScreenRecorder][18]远超过其他同类软件,它能很好支持多监视器模式,再加上它甚至可以捕获基于 OpenGL 的应用程序。易于使用和可靠的 SimpleScreenRecorder 让我的工作更加得心应手。我把它推荐给那些已经疲于使用甚至很少使用同类软件屏幕捕捉软件的同学们。
|
||||
|
||||
|
||||
13)**SimpleScan** — 当我需要扫描文档的时候,我一点都不想将大把大把的时间花费在配置的臃肿的程序上。 [Simple Scan][19] 可以在这方面做得很好。智能的扫描数据库,Simple Scan将与市面上的任何扫描仪或多功能一体打印机/扫描仪很好的进行协作。此外还有一点好处就是它会设置成的最佳分辨率,当然现在你还可以很自由的去进行任何你认为合适的手动调整。
|
||||
|
||||
|
||||
14)**Baobab**(磁盘使用分析器) — — 我不断听到关于如何硬盘价格已回落。这或许没错,但现实却是我却囊中羞涩。这意味着我需要充分利用我能利用的所有硬盘空间,为了实现这个目的,我使用 [Baobab][20] 来观察我在我的硬盘上的可用空间,而且还可以直观地看到到底是哪一个目录正在蚕食我宝贵的硬盘空间。
|
||||
|
||||
|
||||
### 真正的具有生产力的软件 ###
|
||||
|
||||
谈到我所依赖的这些软件,我们真正关心的更多的是他们能为我们完成什么样的任务而不是它们所拥有的光辉头衔和自身的许可证。linux不需要软件的传奇时代早已过去。大量的计算任务,除了有限的几个例外,大都可以在linux桌面上轻松地如我所说的那样完成。
|
||||
|
||||
|
||||
很明显你应该装备一些必不可少的软件,当然那些软件并不一定是我也使用的。你所倚重的软件是什么?您可在下方进行评论并与我们的读者进行分享那些优秀的软件。
|
||||
|
||||
|
||||
|
||||
via: http://www.datamation.com/applications/14-apps-to-boost-ubuntu-1.html
|
||||
|
||||
译者:[owen-carter](https://github.com/owen-carter) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.mozilla.org/en-US/firefox/new/
|
||||
[2]:https://plex.tv/
|
||||
[3]:http://www.zoneminder.com/
|
||||
[4]:http://parcellite.sourceforge.net/
|
||||
[5]:http://www.bittorrent.com/sync
|
||||
[6]:https://help.gnome.org/users/gnome-system-monitor/3.12/
|
||||
[7]:http://linux.about.com/od/commands/l/blcmdl1_top.htm
|
||||
[8]:http://freedesktop.org/software/pulseaudio/pavucontrol/
|
||||
[9]:http://en.wikipedia.org/wiki/Jupiter_Broadcasting
|
||||
[10]:http://www.skype.com/en/download-skype/skype-for-linux/
|
||||
[11]:http://ekiga.org/
|
||||
[12]:https://jitsi.org/
|
||||
[13]:http://www.kdenlive.org/
|
||||
[14]:http://www.openshot.org/
|
||||
[15]:https://spideroak.com/
|
||||
[16]:https://www.dropbox.com/
|
||||
[17]:http://www.libreoffice.org/discover/writer/
|
||||
[18]:http://www.maartenbaert.be/simplescreenrecorder/
|
||||
[19]:https://launchpad.net/simple-scan
|
||||
[20]:http://www.marzocca.net/linux/baobab/baobab-getting-started.html
|
@ -1,163 +0,0 @@
|
||||
Translating by yujianxuechuan,占坑
|
||||
How to set up Internet connection sharing with iptables on Linux
|
||||
怎样使用linux的iptables工具进行网络共享
|
||||
================================================================================
|
||||
In this tutorial, I'll explain how to share a single Internet connection among multiple devices on Linux. While consumer-grade WiFi routers have become mainstream nowadays, making this problem a non-issue, suppose you don't have one at home. However, say you have a Linux box already assembled with a modem and a LAN card. The modem is connected to the Internet with a dynamic public IP address, and the LAN card connected to your switch/hub. Other devices (Linux/Windows PC, laptop) are connected to the switch without having any Internet connection. To share the Internet connection of the Linux box, you have to turn the box into a gateway, so that it can relay traffic to and from other devices.
|
||||
在本教程中,我将解释多个设备怎样在linux下共享一个网络连接。目前无线路由器已经成为主流的消费品,从而解决了本文这一问题,假设你家中并没有一台无线路由器。然而,你却有一台已经有"猫"和局lan网卡的的linux主机。"猫"是以动态公有IP地址的模式连接的互联网,主机的lan网卡连接到你的交换机或者集线器。其他设备(如linux或者windows的PC或者笔记本)以网桥的形式连接并无互联网连接。为了共享linux主机的互联网,你必须把主机摄制成网关,于是它才能实现从其他设备中传送和接受信息。
|
||||
### Glossary of Terms ###
|
||||
术语字汇
|
||||
- **Private IP address** (non-routeable address) is an IP address used for a Local Area Network (not visible through Internet).
|
||||
- **Public IP address** (routeable address) is an IP address that is visible through Internet.
|
||||
- **IP masquerading** is a function that allows set of machines to reach the Internet via a MASQ gateway. Those machines behind the MASQ gateway is never visible to the Internet. Any outgoing and incoming traffic from and to the machines behind the MASQ gateway must pass through the MASQ gateway.
|
||||
- **Network Address Translation** (NAT) is a function that can make a private IP address reaches the Internet with the help of IP masquerading.
|
||||
-私有IP地址(不可到达地址)是一个被用于本地局域网的IP地址(在互联网中不可见)。
|
||||
-公用IP地址(可到达地址)是一个在互联网中可见的IP地址。
|
||||
IP伪装是一项允许一系列机器通过MASQ网关连接互联网的功能。这些MASQ网关之外的机器在互联网中是不可见的。MASQ之后的机器中任何流入或流出的数据必须经过MASQ网关。
|
||||
-网络地址转换(NAT)是一项通过IP伪装技术可以使私有IP地址访问互联网的功能。
|
||||
### Hardware Requirements ###
|
||||
硬件要求
|
||||
- One Linux box with two interfaces (one public IP address and the other private IP address), which will be used as a gateway.
|
||||
- One or more Linux/Windows PC or laptop with private IP addresses.
|
||||
- Switch/HUB (optional).
|
||||
-一台有两个接口(一个公有IP地址和其他的私有IP地址)的linux主机,这个主机将被用作网关。
|
||||
-一台或者多台拥有私有IP地址的linux/windows系统的PC或者笔记本。
|
||||
-交换机/集线器(可选)。
|
||||
### Step-by-Step Guide ###
|
||||
教程步骤
|
||||
The following procedure is required on the Linux box (the connection sharing gateway).
|
||||
接下来的过程需要在linux主机(用于共享的网关)上完成。
|
||||
#### 1. Activate IP forwarding ####
|
||||
1、激活IP转发
|
||||
In order to set up Internet connection sharing, you need to enable IP forwarding on the Linux box with a kernel parameter. Startup kernel parameters stored in /etc/sysctl.conf.
|
||||
为了设置网络共享,你需要在linux主机上更改一个内核参数来使能IP转发功能。内核启动参数设定在/etc/sysctl.conf文件中。
|
||||
Open the file, and locate line with the following parameter "# net.ipv4.ip_forward = 0". Remove hash mark (i.e., uncomment it), and set the value to 1. It should look like the following:
|
||||
打开这个文件,定位到含有"# net.ipv4.ip_forward = 0"的这一行,移除#号(即取消注释),然后将其值设置为1,改好之后应该和下面的一致。
|
||||
net.ipv4.ip_forward = 1
|
||||
|
||||
You may also activate IP forwaring at run time by the following command:
|
||||
你还要使激活IP转发功能生效,通过执行下面的命令:
|
||||
$ sudo sysctl -w net.ipv4.ip_forward=1
|
||||
$ sudo sysctl -p
|
||||
|
||||
#### 2. NAT configuration ####
|
||||
2、NAT配置
|
||||
Another important part of Internet connection sharing is NAT configuration which can be done using iptables command. iptables maintains four firewall tables:
|
||||
另一个网络共享的重要部分是NAT配置,这可以通过使用iptables的命令,iptables包含四个防火墙的表格:
|
||||
- FILTER (the default table)
|
||||
- NAT
|
||||
- MANGLE
|
||||
- RAW
|
||||
- FILTER (默认表格)
|
||||
- NAT
|
||||
- MANGLE
|
||||
- RAW
|
||||
|
||||
In this tutorial we will use only two tables: FILTER and NAT tables.
|
||||
这个教程中我们将仅使用两个表格:FILTER和NAT表格。
|
||||
First, flush all active firewall rules.
|
||||
首先,刷新所有活跃的防火墙的规则。
|
||||
$ sudo iptables -X
|
||||
$ sudo iptables -F
|
||||
$ sudo iptables -t nat -X
|
||||
$ sudo iptables -t nat -F
|
||||
|
||||
On the INPUT table, you have to set chain FORWARD to ACCEPT target, so all packets passed through the box will be processed correctly.
|
||||
在输入表格中,你需要设置转发链成可接受的目的地,因此艘游通过主机的数据包将会被正确的处理。
|
||||
$ sudo iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
$ sudo iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
|
||||
On the NAT table, you have to enable IP masquerading for your WAN interface. We assume that the WAN interface is ppp0. To enable IP masquerading on ppp0 interface, you can use the following command:
|
||||
在NAT表中,你必须为你的WAN口使能IP伪装,我们假设WAN口协议是ppp0。为了在ppp0接口上使能IP伪造技术,我们使用以下的命令:
|
||||
$ sudo iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
|
||||
|
||||
#### 3. Configuring a private IP address ####
|
||||
3、配置私有IP地址
|
||||
After all configuration is completed on the Linux box, you have to configure the DNS server and default gateway of other devices (Linux/Windows PC, laptop), so that they point to the Linux box. Note that you don't need to set up a DNS server on the Linux box. Every DNS request from other devices are automatically forwarded by the Linux box to your upstream ISP.
|
||||
在linux主机上的所有配置完成后,你需要配置其他设备(linux/windows的PC或笔记本)的DNS服务器以及默认网关,因此他们的数据流可以指向linux主机。注意你不需要在linux主机上设置一个DNS服务器,从其他设备发出的每一个DNS请求都会通过上游的ISP自动转发到linux主机上。
|
||||
If you are using Linux on the other devices, you can use the following command to change their default gateway and DNS servers. I assume that you are using 192.168.1.0/24 private IP address segment, and that 192.168.1.1 is the IP address assigned to the Linux box.
|
||||
如果你的其他设备上用的系统是linux,你可以通过以下命令来更改他们的默认网关和DNS服务器。假设你的网段是192.168.1.0/24的私有IP地址网段,linux主机上绑定的IP地址是192.168.1.1。
|
||||
$ sudo ip route del default
|
||||
$ sudo ip route add default via 192.168.1.1
|
||||
$ sudo sh -c "echo 'nameserver 192.168.1.1' > /etc/resolv.conf"
|
||||
|
||||
If you have other Linux devices, you can repeat the command above on other devices.
|
||||
如果还有其他的linux设备,那么你可以重复以上命令。
|
||||
If you have a Windows device, you can change the default gateway and the DNS server via network connection properties on the control panel.
|
||||
如果你有windows设备,你可以通过控制面板的网络连接属性来更改默认网关和DNS服务器。
|
||||
#### 4. The complete script ####
|
||||
4、完整的脚本
|
||||
Here is the complete script which sets up Internet connection sharing on the Linux box. The WAN interface (ppp0) needs to be replaced according to your environment.
|
||||
这是一个在linux主机上设置网络连接共享的一个完整的脚本。WAN口(ppp0协议)需要根据你具体的网络接口协议来替换。
|
||||
$ sudo vi /usr/local/bin/ishare
|
||||
|
||||
----------
|
||||
|
||||
In this tutorial we will use only two tables: FILTER and NAT tables.
|
||||
|
||||
First, flush all active firewall rules.
|
||||
|
||||
$ sudo iptables -X
|
||||
$ sudo iptables -F
|
||||
$ sudo iptables -t nat -X
|
||||
$ sudo iptables -t nat -F
|
||||
|
||||
On the INPUT table, you have to set chain FORWARD to ACCEPT target, so all packets passed through the box will be processed correctly.
|
||||
|
||||
$ sudo iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
$ sudo iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
|
||||
On the NAT table, you have to enable IP masquerading for your WAN interface. We assume that the WAN interface is ppp0. To enable IP masquerading on ppp0 interface, you can use the following command:
|
||||
|
||||
$ sudo iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
|
||||
|
||||
#### 3. Configuring a private IP address ####
|
||||
|
||||
After all configuration is completed on the Linux box, you have to configure the DNS server and default gateway of other devices (Linux/Windows PC, laptop), so that they point to the Linux box. Note that you don't need to set up a DNS server on the Linux box. Every DNS request from other devices are automatically forwarded by the Linux box to your upstream ISP.
|
||||
|
||||
If you are using Linux on the other devices, you can use the following command to change their default gateway and DNS servers. I assume that you are using 192.168.1.0/24 private IP address segment, and that 192.168.1.1 is the IP address assigned to the Linux box.
|
||||
|
||||
$ sudo ip route del default
|
||||
$ sudo ip route add default via 192.168.1.1
|
||||
$ sudo sh -c "echo 'nameserver 192.168.1.1' > /etc/resolv.conf"
|
||||
|
||||
If you have other Linux devices, you can repeat the command above on other devices.
|
||||
|
||||
If you have a Windows device, you can change the default gateway and the DNS server via network connection properties on the control panel.
|
||||
|
||||
#### 4. The complete script ####
|
||||
|
||||
Here is the complete script which sets up Internet connection sharing on the Linux box. The WAN interface (ppp0) needs to be replaced according to your environment.
|
||||
|
||||
$ sudo vi /usr/local/bin/ishare
|
||||
|
||||
----------
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
## Internet connection shating script
|
||||
|
||||
sysctl -w net.ipv4.ip_forward=1
|
||||
sysctl -p
|
||||
iptables -X
|
||||
iptables -F
|
||||
iptables -t nat -X
|
||||
iptables -t nat -F
|
||||
iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
|
||||
|
||||
Save the above script to /usr/local/bin/ishare, and then change the executable bit by the following command.
|
||||
保存以上的脚本到/usr/local/bin/ishare,然后添加可执行权限通过执行下面的命令。
|
||||
$ sudo chmox +x /usr/local/bin/ishare
|
||||
|
||||
If you want the script executed every startup, you can register the script to /etc/rc.local. Open /etc/rc.local, before statement "exit 0", add the following line:
|
||||
如果你需要这个脚本开机启动,你需要在/etc/rc.local文件中注册这个脚本,在文件中的"exit 0"之前添加下面一行。
|
||||
/usr/local/bin/ishare
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/06/internet-connection-sharing-iptables-linux.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,86 @@
|
||||
教你用NeoBundle管理Vim插件
|
||||
================================================================================
|
||||
[NeoBundle][1] 是一个 [Vim][2] 的插件管理器,以 [Vundle][3] 为基础(Vundle 是一个基于 [Pathogen][4] 的 Vim 插件管理器)。在之前的文章中,我[非常不推荐使用 Neobundle][5],原因是它当时还处于高速开发阶段(LCTT:意味着不稳定、变数大),并且当时它的英文文档很少。现在,已经过了一年多了,这两个问题都早已不再是问题。
|
||||
|
||||
我们为什么要使用插件管理器?Vim 支持大量插件,但是由于它没有严格定义框架,插件的文件可以胡乱分布在不同目录下,导致用户管理起来会很困难(LCTT:当然,前提是你有很多插件,还有点小小的强迫症,觉得理一理这些插件心里会舒服点)。而一款插件管理器能让管理变得简单许多。Pathogen, Vundle 和 NeoBundle 的工作就是为不同插件建立一个目录,然后将这些目录扔到 ~/.vim/bundle 目录下。这个文件整理方法可以让你方便彻底地删除插件,使用 'rm -rf <插件目录>' 或直接 'Ctrl + Del' 组合键把插件所在的目录删除就可以了,绝对绿色环保无残留。同时,这种方法还能最大程度避免插件与插件之间的不兼容性。
|
||||
|
||||
NeoBundle 是一个基于 Vundle 的项目,如同 Vundle,它们都可以安装和升级插件。然而 NeoBundle 的说明文件上明确指出:“NeoBundle 不是一个稳定的插件管理器,如果你想要一个稳定的,请选择 Vundle”。最新的 release-note 上也有警“可能会造成兼容性问题”——这是一个开发者写的注解,说明这个管理器还不能让人放心使用。
|
||||
|
||||
所以,我们为什么要使用 NeoBundle?它都不能保证稳定运行!好吧,它还是有可取之处的。Vundle 只支持 [Git][6] 这种版本控制系统,而 NeoBundle 可以支持 [Subversion][7] 和 [Mercurial][8]。另一个原因是如果你不想插件升级时破坏你的 Vim 生态环境,你可以锁住 NeoBundle,让它只使用某个插件的固定版本。
|
||||
|
||||
另外,NeoBundle 创建者,Shougo Matsuishita(LCTT:名字看着像日本人),正在将它的命令接口添加到其他插件项目,以便减少他们的命令使用量。现在 NeoBundle 支持3种插件:[unite.vim][9],Vim 使用的文件和缓存管理器;[vimshell.vim][10],Vim 使用的脚本程序;[vimproc.vim][11],运行于 vimshell.vim 中,用于对异步事件的支持。上面说的都是特殊案例,缺少英文文档,所以用户希望有人能完善它们。在正式使用它们之前,我们需要把注意力先集中在一些基本操作上。
|
||||
|
||||
### 安装并初始化 NeoBundle ###
|
||||
|
||||
NeoBundle 依赖 Vim 7.2.051 或更高版本,依赖 git,依赖 [cURL][12](用于下载文件)。你可以手动下载 NeoBundle,也可以使用 cURL 下载它在 GitHub 上的库。在你的 home 目录下使用如下命令,可以将 NeoBundle 插件下载到 .vim/bundle/neobundle.vim 目录里,然后 NeoBundle 就能管理它自己了。
|
||||
|
||||
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh
|
||||
|
||||
你还需要修改 .vimrc 文件。NeoBundle 的 GitHub 主页提供一个 .vimrc 范本,使用这个范本后,NeoBundle 会为你下载5个插件。如果不需要它们,你可以使用下面的最小配置:
|
||||
|
||||
if has('vim_starting')
|
||||
set nocompatible
|
||||
set runtimepath+=~/.vim/bundle/neobundle.vim/
|
||||
call neobundle#begin(expand('~/.vim/bundle/'))
|
||||
NeoBundleFetch 'Shougo/neobundle.vim'
|
||||
call neobundle#end()
|
||||
filetype plugin indent on
|
||||
|
||||
上述配置的作用是:启动 NeoBundle 并且像其他插件一样升级自己。NeoBundle 默认从 GitHub 下载并升级,如果你正好在使用 GitHub,你只需要为这个插件指定维护者的用户名和路径。在上面的配置中,NeoBundleFetch 只需要指定为“Shougo/neobundle.vim”,而不是完整的 GitHub 路径。如果你想使用其他网站,比如是 Subversion 或 Mecurial 的网站,你就需要添加完整的 URL。
|
||||
|
||||
如果你想安装其他插件,你可以使用下面的命令:
|
||||
|
||||
curl -k https://github.com/[项目维护者]/[插件路径] > ~/.vim/bundle/[插件路径]
|
||||
|
||||
举个例子:你想安装 [vim-abolish][13],一个超级 NB 的文本搜索和替换插件,就使用下面的命令:
|
||||
|
||||
curl -k https://github.com/tpope/vim-abolish > ~/.vim/bundle/abolish
|
||||
|
||||
如果要让它自动升级,在 NeoBundleFetch 那行下面添加一行:
|
||||
|
||||
NeoBundle 'tpope/vim-abolish'
|
||||
|
||||
再介绍一个小技巧:你可以为插件指定一个分支或版本号。什么意思?NeoBundle 只会关注这个插件的某个分支或版本的更新,而忽略其他更新。如果你使用的某个插件处于高速开发过程,你就可以使用这个技巧,避免用到有 bug 的插件版本。举个例子:
|
||||
|
||||
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
|
||||
|
||||
还有一个技巧:在 .vimtc 文件内添加一行关于“NeoBundleCheck”的属性。NeoBundle 会检查被卸载的插件,并提示你安装它们。你也可以使用命令“:NeoBundleInstall”(LCTT:这是要在 Vim 编辑器的命令模式下输入)来安装或升级插件。
|
||||
|
||||
### NeoBundle 用法 ###
|
||||
|
||||
很多 NeoBundle 命令用起来和 Vundle 类似,但命令的名字不一样。下面是 NeoBundle 命令的用法:
|
||||
|
||||
- `:NeoBundleUpdate`:安装或升级插件,如果你手动把一个插件的目录删除了,这个命令会重新安装这个插件。在这个命令后面加上插件名称,就只升级一个插件;不加参数,会将所有己安装但没被记录在案的插件给记录下来。“:NeoBundleInstall”命令效果相同。
|
||||
- `:NeoBundle {REPOSITORY URI} [[REVISION}] [,OPTIONS}]]`:将一个插件锁定到固定版本,防止胡乱升级。
|
||||
- `:NeoBundleList`:列出所有未初始化的插件。
|
||||
- `:NeoBundleClean`:进入交互界面,删除插件。
|
||||
|
||||
这些命令在配合 unite.vim (LCTT:就是上面举过的32个例子之一)使用时,效果会稍微有些出入。你可以使用“:help neobundle”命令了解更多信息。
|
||||
|
||||
### 是否使用 NeoBundle,自己决定 ###
|
||||
|
||||
NeoBundle 是强大的工具,正处于高速开发状态。任何处于这种状态的项目,都会被帖上“有前途”和“不稳定”两个标签,看你自己怎么选。如果你想要最新的稳定版本的插件,NeoBundle 可以让 Vundle 和 Pathogen 永远保持在老界面。
|
||||
|
||||
然而在线帮助文档已经给出警告,它不是个稳定的产品,不及时更新版本可能造成一些插件运行出错。最后,你需要在 .vimrc 文件为你的 Neoundle 和其他插件指定一个稳定的版本。记住这警告,然后你可以在使用这些尖端技术产品时游刃有余。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.openlogic.com/wazi/bid/348084/Managing-Vim-extensions-with-NeoBundle
|
||||
|
||||
译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://github.com/Shougo/neobundle.vim
|
||||
[2]:http://olex.openlogic.com/packages/vim
|
||||
[3]:https://github.com/gmarik/Vundle.vim
|
||||
[4]:https://github.com/tpope/vim-pathogen
|
||||
[5]:http://www.openlogic.com/wazi/bid/262302/Three-tools-for-managing-Vim-plugins
|
||||
[6]:http://olex.openlogic.com/packages/git
|
||||
[7]:http://olex.openlogic.com/packages/subversion
|
||||
[8]:http://olex.openlogic.com/packages/mercurial
|
||||
[9]:https://github.com/Shougo/unite.vim
|
||||
[10]:https://github.com/Shougo/vimshell.vim/blob/master/doc/vimshell.txt
|
||||
[11]:https://github.com/Shougo/vimproc.vim/blob/master/doc/vimproc.txt
|
||||
[12]:http://olex.openlogic.com/packages/curl
|
||||
[13]:https://github.com/tpope/vim-abolish
|
@ -0,0 +1,94 @@
|
||||
Linux 高级目录导航技巧
|
||||
================================================================================
|
||||
|
||||
目录当行是命令行系统的基础概念.虽然不是什么难以理解的东西,但是知道一些技巧能够丰富你的经验并且提高工作效率.在这篇文章中,我们会讨论这些小技巧.
|
||||
|
||||
### 我们已经知道的东西 ###
|
||||
|
||||
在开始高级技巧之前,有一些必须知道的基本命令:
|
||||
|
||||
- ‘pwd’显示当前目录
|
||||
- ‘cd’ 改变当前目录
|
||||
- ‘cd’ 跟两个点(cd ..)能返回父目录
|
||||
- ‘cd’ 跟着相对目录就能直接切换当相对目录下
|
||||
- ‘cd’ 跟着绝对目录就能切换到绝对目录下
|
||||
|
||||
### 高阶技巧 ###
|
||||
|
||||
这节将介绍几个技巧方便你进行目录的切换
|
||||
|
||||
### 从任何地方回到home目录 ###
|
||||
|
||||
虽然使用‘cd /home/<your-home-directory-name>’, 不是什么大麻烦, 但是有一种方法直接打‘cd’ 就能回到home目录.
|
||||
|
||||
Here is an example :
|
||||
|
||||
$ pwd
|
||||
/usr/include/netipx
|
||||
$ cd
|
||||
$ pwd
|
||||
/home/himanshu
|
||||
|
||||
所以无论你在哪个目录下,都能这么干然后回到home目录.
|
||||
|
||||
**注意**- 如果要切换到确定用户的目录下, 就使用 ‘cd ~user_name'
|
||||
|
||||
### 用cd在目录间切换 - ###
|
||||
|
||||
假设你的工作目录是这样的:
|
||||
|
||||
$ pwd
|
||||
/home/himanshu/practice
|
||||
|
||||
如果你想切换到 **/usr/bin/X11**, 然后又想回到之前的目录. 你会怎么做? 最直接的 :
|
||||
|
||||
$ cd /usr/bin/X11
|
||||
$ cd /home/himanshu/practice/
|
||||
|
||||
虽然这样行得通,但是要记住这些复杂的目录是个大困难.这种情况下使用 ‘cd -’ 命令就行.
|
||||
|
||||
使用 ‘cd -’的第一步和上面的例子是一样的, 你可以 cd 到你想要切换到的<path>下 , 但是回到之前的目录用 ‘cd -’就可以.
|
||||
|
||||
$ cd /usr/bin/X11
|
||||
$ cd -
|
||||
/home/himanshu/practice
|
||||
$ pwd
|
||||
/home/himanshu/practice
|
||||
|
||||
如果你想回到最后访问的目录(在这个例子中是/usr/bin/X11),也使用'cd -'就可以.但是这个命令只会记住最后访问的目录,这是一个缺点.
|
||||
|
||||
### 用 pushd 和 popd 来切换目录 ###
|
||||
|
||||
![directory navigation](http://linoxide.com/wp-content/uploads/2014/06/pushd-popd.jpg)
|
||||
|
||||
|
||||
如果你对'cd -'非常了解了的话,你会发现这个命令只能帮助你在两个目录之间移动,但是很多场景下需要在很多目录之间切换.比如你要从A切换到B再到C然后又想回到A.
|
||||
|
||||
一般来说,你需要打出A的完整路劲,但是如果这个路径非常复杂,将是非常烦人的一件事,热别是你的切换非常频繁的话.
|
||||
|
||||
一些场景下可以使用 ‘pushd’ 还有 ‘popd’ 命令. The ‘pushd’ 将一个目录存到内存中,‘popd’ 将目录从内存中去除,并且转换到那个目录下.
|
||||
|
||||
例如 :
|
||||
|
||||
$ pushd .
|
||||
/usr/include/netipx /usr/include/netipx
|
||||
$ cd /etc/hp/
|
||||
$ cd /home/himanshu/practice/
|
||||
$ cd /media/
|
||||
$ popd
|
||||
/usr/include/netipx
|
||||
$ pwd
|
||||
/usr/include/netipx
|
||||
|
||||
使用‘pushd’ 命令存储当前的工作目录 (用 .表示), 然后切换到各种各样的目录去. 为了返回之前的目录 ,只要使用 ‘popd’命令就行了.
|
||||
使用
|
||||
|
||||
**注意**- 你也可以使用 ‘pushd’ 来切换到之前存储的目录, 但是不会像 ‘popd’ 一样去除这个目录.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/linux-command/directory-navigations-tips-tricks/
|
||||
|
||||
译者:[ggaaooppeenngg](https://github.com/ggaaooppeenngg) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,81 @@
|
||||
如何在Linux中同步微软 OneDrive
|
||||
================================================================================
|
||||
[OneDrive][1](以前称为SkyDrive)是微软的一个广受欢迎的云存储产品。目前OneDrive为每一个新注册用户提供7GB免费存储空间。正如你所想,OneDrive与微软其他软件产品很好地集成。微软还提供了一个独立的OneDrive客户端,它会自动备份照相机拍摄的图片和视频到OneDrive。但你猜怎么着。该客户端可用于除Linux的各大PC/移动平台。 “OneDrive在任何设备,任何时间”?嗯,这还不存在。
|
||||
|
||||
不要失望。开源社区已经已经拿出了解决方案。 Boilermaker写的[onedrive-d][2]可以完成这项工作。作为监测守护进程运行,onedrive-D可自动将本地文件夹同步到OneDrive云存储。
|
||||
|
||||
I在本教程中,我将介绍**如何在Linux上使用onedrive-d同步微软OneDrive**。
|
||||
|
||||
### 在linux上onedrive-d ###
|
||||
|
||||
虽然onedrive-d最初是为Ubuntu/ Debian开发的,但它仍然支持CentOS/ Fedora的/ RHEL。
|
||||
|
||||
安装就像输入下面的命令一样容易。
|
||||
|
||||
|
||||
$ git clone https://github.com/xybu92/onedrive-d.git
|
||||
$ cd onedrive-d
|
||||
$ ./inst install
|
||||
|
||||
### 第一次配置 ###
|
||||
|
||||
安装之后,你需要进行一次性配置来授予onedrive-d对您OneDrive账户的读/写权限。
|
||||
|
||||
首先,创建将用于对远程OneDrive账户同步的本地文件夹。
|
||||
|
||||
$ mkdir ~/onedrive
|
||||
|
||||
接着运行下面的命令开开启一次性配置。
|
||||
|
||||
$ onedrive-d
|
||||
|
||||
它接着会弹出如下onedrive-d的设置窗口。在“Location”选项中,选择你之前创建的本地文件夹。在“Authentication”选项中,你会看见“You have not authenticated OneDrive-d yet”(“你还没有授权OneDrive-d”)的信息。现在点击"Connect to OneDrive.com"按钮。
|
||||
|
||||
![](https://farm4.staticflickr.com/3885/14470579955_1fb92e7cfe.jpg)
|
||||
|
||||
它会弹出一个新窗口来要求你登录OneDrivecom。
|
||||
|
||||
![](https://farm4.staticflickr.com/3903/14467221981_3d74140f61_z.jpg)
|
||||
|
||||
登录OneDrive.com之后,你会被要求授权onedrive-d访问。选择“Yes”。
|
||||
|
||||
![](https://farm3.staticflickr.com/2925/14283963819_86cf52e1fd_z.jpg)
|
||||
|
||||
回到先前的设置窗口,你会看到之前的状态已经变成了You have connected to OneDrive.com"(“你已经连接到了OneDrive.com”)。点击“OK”完成。
|
||||
|
||||
![](https://farm4.staticflickr.com/3896/14284004048_3e718d1e30.jpg)
|
||||
|
||||
### 与OneDrive同步一个本地文件夹 ###
|
||||
|
||||
这里有两种方法来使用onedrice-d将本地文件夹与OneDrive存储同步。
|
||||
|
||||
一种是“手动使用命令行来同步OneDrive”。就是当你需要与你的OneDrive账户同步时运行:
|
||||
|
||||
$ onedrive-d
|
||||
|
||||
`onedrive-d`接着将扫描本地文件夹与OneDrive帐户的内容并使两者同步。这意味着要么上传一个在本地文件夹新添加的文件,或者从远程OneDrive帐户下载最新发现的文件。如果你从本地文件夹删除任何文件,相应的文件将自动在与OneDrive帐户同步后被删除。同样的事情也会在相反的方向发生。
|
||||
|
||||
一旦同步完成,你可以使用Ctrl-C杀掉onedirve-d的前台运行进程。
|
||||
|
||||
![](https://farm6.staticflickr.com/5509/14283967750_b9ebf1b05d_z.jpg)
|
||||
|
||||
另一种方法是将onedrive-d作为一个始终运行的守护进程在开机时自动启动。在这种情况下,后台守护进程会同时监视本地文件夹和OneDrive账户,以使它们保持同步。对于这一点,只需将onedrive-D加入到你桌面[自动启动程序列表][3]中就行了。
|
||||
|
||||
当onedrive-D作为守护进程在后台运行,你会在桌面状态栏中看到OneDrive图标,如下图所示。每当同步更新被触发,你就会看到一个桌面通知。
|
||||
|
||||
![](https://farm4.staticflickr.com/3924/14290119448_3b1144db77.jpg)
|
||||
|
||||
要注意的是:根据作者所言,onedrive-d仍在积极开发中。这并不能用于任何形式的生产环境。如果您遇到任何bug,请随时提交一份[bug报告][4]。你的贡献,笔者将不胜感激。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/06/sync-microsoft-onedrive-linux.html
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://xmodulo.com/go/onedrive
|
||||
[2]:http://xybu.me/projects/onedrive-d/
|
||||
[3]:http://xmodulo.com/2013/12/start-program-automatically-linux-desktop.html
|
||||
[4]:https://github.com/xybu92/onedrive-d/issues?state=open
|
@ -0,0 +1,39 @@
|
||||
开源多媒体转换器Curlew 0.1.22.3发布了
|
||||
================================================================================
|
||||
![Curlew interface](http://i1-news.softpedia-static.com/images/news2/Open-Source-Multimedia-Converter-Curlew-0-1-22-3-Is-Out-448028-2.jpg)
|
||||
|
||||
**Curlew是linux下的一款容易使用,开源多媒体转换器,现在的版本是0.1.22.3。**
|
||||
|
||||
|
||||
Curlew可以转换超过100种不同的格式、显示文件的详细信息、转换预览、插入字幕等等。
|
||||
|
||||
根据变更日志,转换前后实例的最后大小和位置会被记住、加入了一些失去对话图标、文件系统会在挂起前同步。
|
||||
|
||||
这个程序有一些依赖:至少Python 2.7 (小于3.0)、python-gobject 3.0、gir1.2-gtk 3.0、 ffmpeg 0.8、libav-tools 0.8、 mencoder、libavcodec-extra、xdg-utils、mediainfo。
|
||||
|
||||
来自noobslab.com的人提供一种通过PPA来简单地安装这个应用的方法。你要做的是在命令行下输入少量的命令(你需要使用root权限来生效)
|
||||
|
||||
sudo add-apt-repository ppa:noobslab/apps
|
||||
sudo apt-get update
|
||||
sudo apt-get install curlew
|
||||
|
||||
查看官方[更新日志][1]来获取完整的特性与更新列表。
|
||||
|
||||
你可以下载Curlew 0.1.22.3 的软件包:
|
||||
|
||||
- [Ubuntu 14.04 DEB ALL][2][ubuntu_deb] [172 KB]
|
||||
- [tar.gz][3][sources] [152 KB]
|
||||
|
||||
记住这是一个开发版因此不应该安装在生产机器上。它只用于测试。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://news.softpedia.com/news/Open-Source-Multimedia-Converter-Curlew-0-1-22-3-Is-Out-448028.shtml
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://gtk-apps.org/content/show.php/Curlew?content=155664
|
||||
[2]:http://sourceforge.net/projects/curlew/files/curlew-0.1.22.3/curlew_0.1.22.3ubuntu14.04_all.deb/download
|
||||
[3]:http://sourceforge.net/projects/curlew/files/curlew-0.1.22.3/curlew-0.1.22.3.tar.gz/download
|
@ -1,64 +1,67 @@
|
||||
Betty: Translate English Phrases Into Linux Commands
|
||||
CNprober翻译完成。。。619913541
|
||||
|
||||
Betty:通过大白话执行Linux命令
|
||||
================================================================================
|
||||
**Betty** is an open source tool that translates English-like phrases into Linux commands. The main goal of this project is to use the Linux powered systems through natural language input. Let us see some examples how it works.
|
||||
|
||||
### Installation ###
|
||||
**Betty** 是一个将类英语短语翻译成Linux命令的开源工具。这个项目的主要目的是让大家可以通过输入自然语言来使用强大的Linux系统。让我们来看一下它是怎么工作的。
|
||||
|
||||
Betty installation is very simple and straight forward. Make sure you’ve installed the following prerequisites packages.
|
||||
### 安装 ###
|
||||
|
||||
#### On Debian based systems: ####
|
||||
Betty的安装非常简单直接。首先确认你已经安装了下面这些依赖包[译注,需要安装至少Ruby1.9以上版本]。
|
||||
|
||||
#### 对于基于Debian的系统:####
|
||||
|
||||
sudo apt-get install git curl ruby
|
||||
|
||||
On RPM based systems:
|
||||
####对于基于RPM的系统:####
|
||||
|
||||
yum install git curl ruby
|
||||
|
||||
Now, git clone the Betty repository to any preferred location. I am going to clone the betty repo in my home directory **i.e /home/sk/**.
|
||||
现在git工具把Betty库clone到你自定义的任何路径。这里我克隆到我的home目录,**例如 /home/sk/**.
|
||||
|
||||
git clone https://github.com/pickhardt/betty
|
||||
|
||||
Add the betty alias in your bashrc file.
|
||||
添加betty的别名到你的bashrc配置文件。
|
||||
|
||||
sudo nano ~/.bashrc
|
||||
|
||||
Add the following line at the end:
|
||||
将下列行添加到文件的末尾:
|
||||
|
||||
alias betty="/home/sk/betty/main.rb"
|
||||
|
||||
Make sure you’ve replaced the correct path of the betty directory.
|
||||
确保你已经正确地设置好了betty的路径。
|
||||
|
||||
It’s done. Now, it’s time to play with betty.
|
||||
好了,现在是时候和betty好好地玩耍了。
|
||||
|
||||
### Usage ###
|
||||
### 用法 ###
|
||||
|
||||
You should include the word “betty” in-front of every English phrases. As you may know already, if we want to know the user name of our system, we run the following command:
|
||||
你应该在英语短语之前加上单词“betty”。你也许已经知道,如果我们想知道在系统中我们的用户名,应该运行下面的命令:
|
||||
|
||||
whoami
|
||||
|
||||
Sample output:
|
||||
输出是这样的:
|
||||
|
||||
sk
|
||||
|
||||
As you see above, my current user name is **sk**. Well, now we can get the same result using betty as shown below.
|
||||
如你所见,我当前登录的用户名是 **sk**. 现在我也可以通过下面的betty命令获取相同的结果。
|
||||
|
||||
betty whats my username
|
||||
|
||||
Sample output:
|
||||
输出是这样的:
|
||||
|
||||
Betty: Running whoami
|
||||
sk
|
||||
|
||||
Cool, isn’t it? Yes. Betty understands the normal English phrase “whats my username” that I entered, and ran the command “whoami” automatically, and finally displayed the correct output.
|
||||
真的好酷,是不是?Betty理解我输入的“whats my username”短语,然后运行“whoami”命令,最后输出结果。
|
||||
|
||||
Let us see some other commands too.
|
||||
让我们也来看其他命令。
|
||||
|
||||
Betty will respond in multiple ways if you didn’t enter exactly what you’re looking for. For example, we run the following command:
|
||||
如果你的输入不够准确,Betty也能以多种方式回应你。例如,我们运行下面的命令:
|
||||
|
||||
betty whats my name
|
||||
|
||||
Betty isn’t sure whether she should find the system username or full name. In this case, she will ask you multiple questions to find the exact result. As you see below, Betty asks me which command(whoami or finger $(whoami) | sed ‘s/.*: *//;q’) should I want to execute. I just want it to display my username, so i chose number **1**.
|
||||
|
||||
Betty不确定她应该查找系统用户名还是用户全名。这种情况下,她会询问你多个问题来找到准确的结果。如你下面所见,Betty问我想要运行哪一条命令(whoami 还是 finger $(whoami) | sed 's/.*:*//;q')[译注,需要你的系统已经安装finger]。我只想知道我的用户名,所以我选择数字**1**。
|
||||
|
||||
Betty: Okay, I have multiple ways to respond.
|
||||
Betty: Enter the number of the command you want me to run, or N (no) if you don't want me to run any.
|
||||
[1] whoami
|
||||
@ -69,13 +72,14 @@ Betty isn’t sure whether she should find the system username or full name. In
|
||||
Betty: Running whoami
|
||||
sk
|
||||
|
||||
### Compress And Uncompress Folders ###
|
||||
### 压缩和解压缩文件夹 ###
|
||||
|
||||
如果你想要压缩一个文件或者文件夹,用下面的命令。例如,我想压缩我home目录下的“test”文件夹。
|
||||
|
||||
If you want to compress a file or a folder, use the following command. For example, I want to compress a folder called “test” folder in my home directory.
|
||||
|
||||
betty compress test/ test.tar.gz
|
||||
|
||||
Sample output:
|
||||
输出是这样的:
|
||||
|
||||
Betty: Running tar -czvf test.tar.gz test/
|
||||
test/
|
||||
@ -84,11 +88,11 @@ Sample output:
|
||||
test/home/sk/test/
|
||||
test/home/sk/test/sample
|
||||
|
||||
Similarly, we can use the following command to uncompress an archive file.
|
||||
类似的,我们可以用下面的命令来解压缩一个归档文件。
|
||||
|
||||
betty uncompress test.tar.gz
|
||||
|
||||
Sample output:
|
||||
输出是这样的:
|
||||
|
||||
Betty: Running mkdir test && tar -zxvf test.tar.gz -C test
|
||||
test/
|
||||
@ -97,11 +101,11 @@ Sample output:
|
||||
test/home/sk/test/
|
||||
test/home/sk/test/sample
|
||||
|
||||
### Complete list of Betty commands ###
|
||||
### 完整的Betty命令行列表 ###
|
||||
|
||||
Betty tool has some command formats. It doesn’t understand if you put the command “what is my user name” instead of “whats my username”. So, you have to enter the correct English phrase that supported by Betty.
|
||||
Betty工具有一些命令格式。如果你输入“what is my user name”而不是“whats my username”,它是不能识别的。所以,你只能输入Betty支持的英语短语。
|
||||
|
||||
The complete list of supported commands are given below.
|
||||
下面给出一个Betty支持的完整的命令行列表。
|
||||
|
||||
Count:
|
||||
betty how many words are in this directory
|
||||
@ -181,11 +185,11 @@ The complete list of supported commands are given below.
|
||||
betty turn web on
|
||||
betty please tell me what is the weather like in London
|
||||
|
||||
Betty seems very nice tool to Linux novice users. Hope this tool will useful for you too.
|
||||
对Linux初级使用者来说,Betty似乎是一个非常nice的工具。希望这个工具对你也会非常有用。
|
||||
|
||||
Cheers!
|
||||
|
||||
Source:
|
||||
源代码:
|
||||
|
||||
- [Betty Homepage][1]
|
||||
|
||||
@ -193,7 +197,7 @@ Source:
|
||||
|
||||
via: http://www.unixmen.com/betty-translate-english-phrases-linux-commands/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[love_daisy_love](https://github.com/CNprober) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,22 +1,22 @@
|
||||
Create A “.deb Pacakge Repository” at Sourceforge.net Using “Reprepro” Tool in Ubuntu
|
||||
在Ubuntu下使用“Reprepro”工具在Sourceforge.net中创建".deb"包仓库
|
||||
================================================================================
|
||||
**Reprepro** is a small command-line tool to create and manage **.deb** repositories easily, Today we’ll be showing how to create a Debian package repositories easily using reprepro and how to upload it to Sourceforge.net using **rsync** command.
|
||||
**Reprepro**是一款小巧的命令行工具来方便地创建并管理**.deb**仓库。今天我们会战士如何人使用reprepro简单地创建一个Debian包仓库,并使用**rsync**上传到Sourceforge.net。
|
||||
|
||||
![Create Deb Package Repository](http://www.tecmint.com/wp-content/uploads/2014/06/Create-Debian-Package-Repository1.png)
|
||||
|
||||
### Step 1: Install Reprepro and Generate Key ###
|
||||
### 步骤 1: 安装Reprepro并生成key ###
|
||||
|
||||
First, install all the necessary packages, using the following apt-get command.
|
||||
首先,安装所有需要的包,使用下面的apt-get命令。
|
||||
|
||||
$ sudo apt-get install reprepro gnupg
|
||||
|
||||
Now you need to generate a gpg key using gnupg, to do this, apply this command.
|
||||
现在你需要使用hnupg生成一个gpg key,这里使用下面的命令。
|
||||
|
||||
$ gpg --gen-key
|
||||
|
||||
It will ask you some questions, like the kind of the key you want, how long the key should be valid, if you don’t know what to answer, just click **Enter** for the default options (recommended).
|
||||
它会询问你一些问题,比如你想要哪种key、key的有效期、如果你不知道如何回答,只需点击**Enter** 来选择默认选项(建议)
|
||||
|
||||
Of course, it will ask you for a username and a password, keep those in mind, because we will need them later.
|
||||
当然,它会询问你用户名和密码,在脑海中记住这些,因为我们会在之后需要它。
|
||||
|
||||
gpg (GnuPG) 1.4.14; Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
@ -71,11 +71,11 @@ Of course, it will ask you for a username and a password, keep those in mind, be
|
||||
uid Ravi Saive (tecmint) <tecmint.com@gmail.com>
|
||||
sub 2048R/7EF2F750 2014-06-24
|
||||
|
||||
Now your key will be generated, to Check if so, run this command as a root privileges.
|
||||
现在你的key已经生成了,要检查一下,用root权限运行这条命令。
|
||||
|
||||
$ sudo gpg --list-keys
|
||||
|
||||
#### Sample Output ####
|
||||
#### 示例输出 ####
|
||||
|
||||
/home/ravisaive/.gnupg/pubring.gpg
|
||||
----------------------------------
|
||||
@ -83,9 +83,9 @@ Now your key will be generated, to Check if so, run this command as a root privi
|
||||
uid ravisaive (tecmint) <tecmint.com@gmail.com>
|
||||
sub 2048R/7EF2F750 2014-06-24
|
||||
|
||||
### Step 2: Create a Package Repository and Export Key ###
|
||||
### 步骤 2: 创建一个包仓库并导出key ###
|
||||
|
||||
We’ll start the work now to create the repository, first you have to create some folders, our repository will be in **/var/www/apt** directory, so let’s create some folders.
|
||||
我们现在要开始创建仓库,首先你需要创建一些文件夹,我们的仓库会在**/var/www/apt**目录,让我们先创建这些目录。
|
||||
|
||||
$ sudo su
|
||||
# cd /var/www
|
||||
@ -94,17 +94,17 @@ We’ll start the work now to create the repository, first you have to create so
|
||||
# mkdir -p ./apt/conf
|
||||
# mkdir -p ./apt/key
|
||||
|
||||
You have now to export the key you created to the repository folder, run.
|
||||
你现在需要将key导出到仓库文件夹,运行:
|
||||
|
||||
# gpg --armor --export username yourmail@mail.com >> /var/www/apt/key/deb.gpg.key
|
||||
|
||||
Note: Replace username with the username you entered in above step, and yourmail@mail.com with your email.
|
||||
注意:用你之前步骤中输入的用户名代替username,用你的email代替yourmail@mail.com。
|
||||
|
||||
We need to create a file called “**distributions**” inside **/var/www/apt/conf**.
|
||||
我们需要在**/var/www/apt/conf**创建一个文件“**distributions**”。
|
||||
|
||||
# touch /var/www/apt/conf/distributions
|
||||
|
||||
Add these following lines to the distributions file and save the file.
|
||||
加入下面这几行到distributions这个文件中并保存。
|
||||
|
||||
Origin: (yourname)
|
||||
Label: (name of repository)
|
||||
@ -116,11 +116,11 @@ Add these following lines to the distributions file and save the file.
|
||||
Description: (Some information about the repository)
|
||||
SignWith: yes
|
||||
|
||||
Next, We’ll have to create the repository tree, to do this, run those commands.
|
||||
接下来我们会创建仓库树,运行这些命令:
|
||||
|
||||
# reprepro --ask-passphrase -Vb /var/www/apt export
|
||||
|
||||
#### Sample Output ####
|
||||
#### 示例输出 ####
|
||||
|
||||
Created directory "/var/www/apt/db"
|
||||
Exporting Trusty...
|
||||
@ -135,16 +135,16 @@ Next, We’ll have to create the repository tree, to do this, run those commands
|
||||
Please enter passphrase:
|
||||
Successfully created '/var/www/apt/dists/Trusty/InRelease.new'
|
||||
|
||||
### Step 3: Add Packages to Newly Created Repository ###
|
||||
### 步骤 3: 在新创建的仓库中加入包 ###
|
||||
|
||||
Now prepare your **.deb** packages to be added to the repository. Go to the **/var/www/apt** directory, you have to do this each time you want to add packages.
|
||||
现在准备你的**.deb**包来加入到仓库中。进入 **/var/www/apt**目录,你每次要加包的时候都不得不这么做。
|
||||
|
||||
# cd /var/www/apt
|
||||
# reprepro --ask-passphrase -Vb . includedeb Trusty /home/ravisaive/packages.deb
|
||||
|
||||
**Note**: Replace **trusty** with the codename you entered for the repository in the distributions file, and replace **/home/username/package.deb** with the path to the package, you will be asked for the passphrase to enter.
|
||||
**注意**:用你在distributions文件中输入的仓库代号来代替**trusty** ,并且用包的路径替换**/home/username/package.deb**,你会被要求输入密码。
|
||||
|
||||
#### Sample Output ####
|
||||
#### 示例输出####
|
||||
|
||||
/home/ravisaive/packages.deb : component guessed as 'universe'
|
||||
Created directory "./pool"
|
||||
@ -159,42 +159,43 @@ Now prepare your **.deb** packages to be added to the repository. Go to the **/v
|
||||
Please enter passphrase:
|
||||
Successfully created './dists/Trusty/InRelease.new'
|
||||
|
||||
Your package is added to the repository, to remove it.
|
||||
你的包已经加入了仓库,要移除它:
|
||||
|
||||
# reprepro --ask-passphrase -Vb /var/www/apt remove trusty package.deb
|
||||
|
||||
And of course, you need to modify the command with your package name and the repository codename.
|
||||
当然你需要用你的包名与仓库代号来修改命令。
|
||||
|
||||
### Step 4: Upload Repository to Sourceforge.net ###
|
||||
### 步骤 4: 上传仓库到Sourceforge.net ###
|
||||
|
||||
To upload the repository to **Sourceforge.net**, you need to have a running account there of course, and a running project, let’s assume that you want to upload the repository to **http://sourceforge.net/projects/myfoo/testrepository** where myfoo is your project name (UNIX name, not URL, not the Title), and testrepository is the folder where you want to upload the files into, We will do this using [rsync command][1].
|
||||
要上传仓库到**Sourceforge.net**,你当然需要一个活跃账号与一个活跃项目,让我假设你想要上传仓库到**http://sourceforge.net/projects/myfoo/testrepository**,这里的myfoo是项目名(UNIX名称,不是URL,不是标题),testrepository是你想要上传文件到这上面的目录,这里我们会使用[rsync 命令][1]
|
||||
|
||||
# rsync -avP -e ssh /var/www/apt/ username@frs.sourceforge.net:/home/frs/project/myfoo/testrepository/
|
||||
|
||||
**Note**: Replace username with your username on sourceforge.net and myfoo with your project UNIX-name and testrepository with the folder you want to store the files in.
|
||||
**注意**:用你在sourceforge.net上的用户名代替username,用你的项目的UNIX类型名称代替myfoo,用你想要存储的文件夹代替testrepository。
|
||||
|
||||
Now thats your repository is uploaded to **http://sourceforge.net/projects/myfoo/testrepository**, to add it to your installed system, first you have to import the repository key, it will be in **/var/www/apt/key/deb.gpg.key**, but that’s a local path and the users for your repository won’t be able to add it to their systems, thats why we’ll be importing the key from sourceforge.net.
|
||||
现在你的仓库上传到了**http://sourceforge.net/projects/myfoo/testrepository**,要把它加入到已安装的系统,首先你需要导入仓库key,它会在**/var/www/apt/key/deb.gpg.key**,但是这是一个本地路径,并且你仓库的用户不能添加到他们的系统中,这就是为什么我们要导入来自sourceforge.net的key的原因。
|
||||
|
||||
$ sudo su
|
||||
# wget -O - http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key | apt-key add -
|
||||
|
||||
You can add the repository easily now to your system, open **/etc/apt/sources.list** and add this line.
|
||||
你现在可以非常轻松地把仓库加入到系统中了,打开**/etc/apt/sources.list**,并加入下面这行:
|
||||
|
||||
deb http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key trusty main
|
||||
|
||||
**Note**: Replace myfoo with your project UNIX-Name, trusty with your repository codename, testrepository with the folder you uploaded the files into, and main with repository components you added to the distributions file.
|
||||
Next, run following to update the repositories list.
|
||||
**Note**:用你的项目的UNIX类型名称代替myfoo,用你的仓库代码代替trusty,用你上传存储的文件夹代替testrepository,用你在distributionsj加入的仓库组件代替main。
|
||||
|
||||
接下来,运行下面的命令来更新仓库列表。
|
||||
|
||||
$ sudo apt-get update
|
||||
|
||||
**Congratulations**! Your repository is active! You can now install packages easily from it if you want.
|
||||
**祝贺你**! 你的软件仓库已经激活了!你现在可以非常简单地在你需要的时候安装包了。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/create-deb-pacakge-repository-in-ubuntu/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者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/) 荣誉推出
|
||||
|
||||
[1]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/
|
||||
[1]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/
|
Loading…
Reference in New Issue
Block a user