Merge pull request #101 from LCTT/master

更新至2015年1月8日
This commit is contained in:
struggling 2016-01-08 16:15:47 +08:00
commit 0436efb79b
27 changed files with 1570 additions and 1026 deletions

View File

@ -0,0 +1,64 @@
DFileManager封面流CoverFlow文件管理器
================================================================================
这个一个 Ubuntu 标准软件仓库中缺失的像宝石般的、有着其独特的功能的文件管理器。这是 DFileManager 在推特中的宣称。
有一个不好回答的问题,如何知道到底有多少个 Linux 的开源软件?好奇的话,你可以在 Shell 里输入如下命令:
~$ for f in /var/lib/apt/lists/*Packages; do printf '%5d %s\n' $(grep '^Package: ' "$f" | wc -l) ${f##*/} done | sort -rn
在我的 Ubuntu 15.04 系统上,产生结果如下:
![Ubuntu 15.04 Packages](http://www.linuxlinks.com/portal/content/reviews/FileManagers/UbuntuPackages.png)
正如上面的截图所示,在 Universe 仓库中大约有39000个包在 main 仓库中大约有8500个包。这听起来很多。但是这些包括了开源应用、工具、库有很多不是由 Ubuntu 开发者打包的。更重要的是有很多重要的软件不在库中只能通过源代码编译。DFileManager 就是这样一个软件。它是仍处在开发早期的一个基于 QT 的跨平台文件管理器。QT提供单一源码下的跨平台可移植性。
现在还没有二进制文件包,用户需要编译源代码才行。对于一些工具来说,这个可能会产生很大的问题,特别是如果这个应用依赖于某个复杂的依赖库,或者需要与已经安装在系统中的软件不兼容的某个版本。
### 安装 ###
幸运的是DFileManager 非常容易编译。对于我的老 Ubutnu 机器来说在开发者网站上的安装介绍提供了大部分的重要步骤不过少量的基础包没有列出为什么总是这样虽然许多库会让文件系统变得一团糟。在我的系统上从github 下载源代码并且编译这个软件,我在 Shell 里输入了以下命令:
~$ sudo apt-get install qt5-default qt5-qmake libqt5x11extras5-dev
~$ git clone git://git.code.sf.net/p/dfilemanager/code dfilemanager-code
~$ cd dfilemananger-code
~$ mkdir build
~$ cd build
~$ cmake ../ -DCMAKE_INSTALL_PREFIX=/usr
~$ make
~$ sudo make install
你可以通过在shell中输入如下命令来启动它
~$ dfm
下面是运行中的 DFileManager完全展示了其最吸引人的地方封面流Cover Flow视图。可以在当前文件夹的项目间滑动提供了一个相当有吸引力的体验。这是看图片的理想选择。这个文件管理器酷似 Finder苹果操作系统下的默认文件管理器),可能会吸引你。
![DFileManager in action](http://www.linuxlinks.com/portal/content/reviews/FileManagers/Screenshot-dfm.png)
### 特点: ###
- 4种视图图标、详情、列视图和封面流
- 按位置和设备归类书签
- 标签页
- 简单的搜索和过滤
- 自定义文件类型的缩略图,包括多媒体文件
- 信息栏可以移走
- 单击打开文件和目录
- 可以排队 IO 操作
- 记住每个文件夹的视图属性
- 显示隐藏文件
DFileManager 不是 KDE 的 Dolphin 的替代品,但是能做相同的事情。这个是一个真正能够帮助人们的浏览文件的文件管理器。还有,别忘了反馈信息给开发者,任何人都可以做出这样的贡献。
--------------------------------------------------------------------------------
via: http://gofk.tumblr.com/post/131014089537/dfilemanager-cover-flow-file-manager-a-real-gem
作者:[gofk][a]
译者:[bestony](https://github.com/bestony)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://gofk.tumblr.com/

View File

@ -0,0 +1,32 @@
黑客们成功地在土豆上安装了 Linux
================================================================================
来自荷兰阿姆斯特丹的消息称LinuxOnAnything.nl 网站的黑客们成功地在土豆上安装了 Linux这是该操作系统第一次在根用蔬菜root vegetable上安装成功LCTT 译注root vetetable一语双关root 在 Linux 是指超级用户)。
![Linux Potato](http://www.bbspot.com/Images/News_Features/2008/12/linux-potato.jpg)
“土豆没有 CPU内存和存储器这真的是个挑战” Linux On Anything (LOA) 小组的 Johan Piest 说。“显然我们不能使用一个像 Fedora 或 Ubuntu 这些体量较大的发行版,所以我们用的是 Damn Small Linux。”
在尝试了几周之后LOA 小组的的同学们弄出了一个适合土豆的 Linux 内核,这玩艺儿上面可以用 vi 来编辑小的文本文件。这个 Linux 通过一个小型的 U 盘加载到土豆上,并通过一组红黑线以二进制的方式向这个土豆发送命令。
LOA 小组是一个不断壮大的黑客组织的分支;这个组织致力于将 Linux 安装到所有物体上;他们先是将 Linux 装到Gameboy 和 iPod 等电子产品上不过最近他们在挑战一些高难度的东西譬如将Linux安装到灯泡和小狗身上
LOA 小组在与另一个黑客小组 Stuttering Monarchs 竞赛,看谁先拿到土豆这一分。“土豆是一种每个人都会接触到的蔬菜,它的用途就像 Linux 一样极其广泛。无论你是想煮捣烹炸还是别的都可以” Piest 说道,“你也许认为我们完成这个挑战是为了获得某些好处,而我们只是追求逼格而已。”
LOA 是第一个将 Linux 安装到一匹设德兰矮种马上的小组,但这五年来竞争愈演愈烈,其它黑客小组的进度已经反超了他们。
“我们本来可以成为在饼干上面安装 Linux 的第一个小组,但是那群来自挪威的混蛋把我们击败了。” Piest 说。
第一个成功安装了 Linux 的蔬菜是一头卷心菜,它是由一个土耳其的一个黑客小组完成的。
(好啦——是不是已经目瞪口呆,事实上,这是一篇好几年前的恶搞文,你看出来了吗?哈哈哈哈)
--------------------------------------------------------------------------------
via: http://www.bbspot.com/news/2008/12/linux-on-a-potato.html
作者:[Brian Briggs](briggsb@bbspot.com)
译者:[StdioA](https://github.com/StdioA), [hittlle](https://github.com/hittlle)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,5 +1,6 @@
在 Ubuntu 15.10 上为单个网卡设置多个 IP 地址
================================================================================
有时候你可能想在你的网卡上使用多个 IP 地址。遇到这种情况你会怎么办呢?买一个新的网卡并分配一个新的 IP没有这个必要至少在小型网络中。现在我们可以在 Ubuntu 系统中为一个网卡分配多个 IP 地址。想知道怎么做到的?跟着我往下看,其实并不难。
这个方法也适用于 Debian 以及它的衍生版本。
@ -138,7 +139,7 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。
sudo nano /etc/network/interfaces
按照黑色字体标注的添加额外的 IP 地址。
如下添加额外的 IP 地址。
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
@ -217,10 +218,9 @@ Ubuntu 系统的网卡配置文件是 **/etc/network/interfaces**。
想知道怎么给 CentOS/RHEL/Scientific Linux/Fedora 系统添加额外的 IP 地址,可以点击下面的链接。
此篇文章以前做过选题20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md
- [Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7][1]
- [在CentOS 7上给一个网卡分配多个IP地址][1]
周末愉快!
工作愉快!
--------------------------------------------------------------------------------
@ -233,4 +233,4 @@ via: http://www.unixmen.com/assign-multiple-ip-addresses-to-one-interface-on-ubu
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.unixmen.com/author/sk/
[1]:http://www.unixmen.com/linux-basics-assign-multiple-ip-addresses-single-network-interface-card-centos-7/
[1]:https://linux.cn/article-5127-1.html

View File

@ -0,0 +1,131 @@
如何在 Ubuntu 14/15 上配置 Apache Solr
================================================================================
大家好,欢迎来阅读我们今天这篇 Apache Solr 的文章。简单的来说Apache Solr 是一个最负盛名的开源搜索平台,配合运行在网站后端的 Apache Lucene能够让你轻松创建搜索引擎来搜索网站、数据库和文件。它能够索引和搜索多个网站并根据搜索文本的相关内容返回搜索建议。
Solr 使用 HTTP 可扩展标记语言XML可以为 JSON、Python 和 Ruby 等提供应用程序接口(API)。根据Apache Lucene 项目所述Solr 提供了非常多的功能,很受管理员们的欢迎:
- 全文检索
- 分面导航Faceted Navigation
- 拼写建议/自动完成
- 自定义文档排序/排列
#### 前提条件: ####
在一个使用最小化安装包的全新 Ubuntu 14/15 系统上,你仅仅需要少量的准备,就开始安装 Apache Solor.
### 1)System Update 系统更新###
使用一个具有 sudo 权限的非 root 用户登录你的 Ubuntu 服务器,在接下来的所有安装和使用 Solr 的步骤中都会使用它。
登录成功后,使用下面的命令,升级你的系统到最新的更新及补丁:
$ sudo apt-get update
### 2) 安装 JRE###
要安装 Solr首先需要安装 JRE(Java Runtime Environment)作为基础环境,因为 solr 和 tomcat 都是基于Java.所以,我们需要安装最新版的 Java 并配置 Java 本地环境.
要想安装最新版的 Java 8我们需要通过以下命令安装 Python Software Properties 工具包
$ sudo apt-get install python-software-properties
完成后,配置最新版 Java 8的仓库
$ sudo add-apt-repository ppa:webupd8team/java
现在你可以通过以下命令更新包源列表使用apt-get来安装最新版本的 Oracle Java 8。
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
在安装和配置过程中,点击'OK'按钮接受 Java SE Platform 和 JavaFX 的 Oracle 二进制代码许可协议Oracle Binary Code License Agreement
在安装完成后,运行下面的命令,检查是否安装成功以及查看安装的版本。
kash@solr:~$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
执行结果表明我们已经成功安装了 Java并达到安装 Solr 最基本的要求了,接着我们进行下一步。
### 安装 Solr###
有两种不同的方式可以在 Ubuntu 上安装 Solr在本文中我们只用最新的源码包来演示源码安装。
要使用源码安装 Solr先要从[官网][1]下载最新的可用安装包。复制以下链接,然后使用 'wget' 命令来下载。
$ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz
运行下面的命令,将这个已归档的服务解压到 /bin 目录。
$ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2
运行脚本来启动 Solr 服务,这将会先创建一个 solr 的用户,然后将 Solr 安装成服务。
$ sudo bash ./install_solr_service.sh solr-5.3.1.tgz
![Solr 安装](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png)
使用下面的命令来检查 Solr 服务的状态。
$ service solr status
![Solr 状态](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png)
### 创建 Solr 集合: ###
我们现在可以使用 Solr 用户添加多个集合。就像下图所示的那样,我们只需要在命令行中指定集合名称和指定其配置集就可以创建多个集合了。
$ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs"
![创建集合](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png)
我们已经成功的为我们的第一个集合创建了新核心实例目录,并可以将数据添加到里面。要查看库中的默认模式文件,可以在这里找到: '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' 。
### 使用 Solr Web###
可以使用默认的端口8983连接 Apache Solr。打开浏览器输入 http://your\_server\_ip:8983/solr 或者 http://your-domain.com:8983/solr. 确保你的防火墙允许8983端口.
http://172.25.10.171:8983/solr/
![Web访问Solr](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png)
在 Solr 的 Web 控制台左侧菜单点击 'Core Admin' 按钮,你将会看见我们之前使用命令行方式创建的集合。你可以点击 'Add Core' 按钮来创建新的核心。
![添加核心](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png)
就像下图中所示,你可以选择某个集合并指向文档来向里面添加内容或从文档中查询数据。如下显示的那样添加指定格式的数据。
{
"number": 1,
"Name": "George Washington",
"birth_year": 1989,
"Starting_Job": 2002,
"End_Job": "2009-04-30",
"Qualification": "Graduation",
"skills": "Linux and Virtualization"
}
添加文件后点击 'Submit Document'按钮.
![添加文档](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png)
### 总结###
在 Ubuntu 上安装成功后,你就可以使用 Solr Web 接口插入或查询数据。如果你想通过 Solr 来管理更多的数据和文件,可以创建更多的集合。希望你能喜欢这篇文章并且希望它能够帮到你。
--------------------------------------------------------------------------------
via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/
作者:[Kashif][a]
译者:[taichirain](https://github.com/taichirain)
校对:[Caroline](https://github.com/carolinewuyan)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/kashifs/
[1]:http://lucene.apache.org/solr/

View File

@ -1,61 +1,61 @@
如何在FreeBSD 10.2上安装Nginx作为Apache的反向代理
如何在 FreeBSD 10.2 上安装 Nginx 作为 Apache 的反向代理
================================================================================
Nginx是一款免费的开源HTTP和反向代理服务器, 以及一个POP3/IMAP的邮件代理服务器。Nginx是一款高性能的web服务器其特点是丰富的功能简单的结构以及低内存的占用. 第一个版本由 Igor Sysoev在2002年发布,迄今为止很多大的科技公司依然在使用,包括 Netflix, Github, Cloudflare, WordPress.com等等。
在这篇教程里我们会 "**在freebsd 10.2系统上安装和配置Nginx网络服务器作为Apache的反向代理**". Apache 会用PHP在8080端口上运行,并且我们需要在80端口配置Nginx的运行用来接收用户/访问者的请求.如果网页的用户请求来自于浏览器的80端口, 那么Nginx会用Apache网络服务器和PHP来通过这个请求并运行在8080端口
Nginx 是一款自由开源的 HTTP 和反向代理服务器,也可以用作 POP3/IMAP 的邮件代理服务器。Nginx 是一款高性能的 web 服务器,其特点是功能丰富,结构简单以及内存占用低。 第一个版本由 Igor Sysoev 发布于2002年到现在有很多大型科技公司在使用包括 Netflix、 Github、 Cloudflare、 WordPress.com 等等
#### 前提条件 ####
在这篇教程里我们会“**在 freebsd 10.2 系统上,安装和配置 Nginx 网络服务器作为 Apache 的反向代理**”。 Apache 将在8080端口上运行 PHP ,而我们会配置 Nginx 运行在80端口以接收用户/访问者的请求。如果80端口接收到用户浏览器的网页请求那么 Nginx 会将该请求传递给运行在8080端口上的 Apache 网络服务器和 PHP。
- FreeBSD 10.2.
- Root 权限.
#### 前提条件 ####
- FreeBSD 10.2
- Root 权限
### 步骤 1 - 更新系统 ###
使用SSH证书登录到你的FreeBSD服务器以及使用下面命令来更新你的系统 :
使用 SSH 认证方式登录到你的 FreeBSD 服务器,使用下面命令来更新你的系统:
freebsd-update fetch
freebsd-update install
### 步骤 2 - 安装 Apache ###
Apache是现在使用范围最广的web服务器以及开源的HTTP服务器.在FreeBSD里Apache是未被默认安装的, 但是我们可以直接通过端口或者在"/usr/ports/www/apache24" 目录下的解压包安装再或者直接从PKG命令的FreeBSD系统信息库安装。在本教程中我们将使用PKG命令从FreeBSD的库中安装:
Apache 是开源的、使用范围最广的 web 服务器。在 FreeBSD 里默认没有安装 Apache 但是我们可以直接通过 /usr/ports/www/apache24 下的 ports 或软件包来安装,也可以直接使用 pkg 命令从 FreeBSD 软件库中安装。在本教程中,我们将使用 pkg 命令从 FreeBSD 软件库中安装:
pkg install apache24
### 步骤 3 - 安装 PHP ###
一旦成功安装Apache, 接着将会安装PHP并由一个用户处理一个PHP的文件请求. 我们将会用到如下的PKG命令来安装PHP :
一旦成功安装 Apache接着将会安装 PHP ,它来负责处理用户对 PHP 文件的请求。我们将会用到如下的 pkg 命令来安装 PHP
pkg install php56 mod_php56 php56-mysql php56-mysqli
### 步骤 4 - 配置 Apache 和 PHP ###
一旦所有都安装好了, 我们将会配置Apache在8080端口上运行, 并让PHP与Apache一同工作. 要想配置Apache,我们可以编辑 "httpd.conf"这个配置文件, 然而PHP我们只需要复制"/usr/local/etc/"目录下的PHP配置文件 php.ini
一旦所有都安装好了,我们将会配置 Apache 运行在8080端口上 并让 PHP 与 Apache 一同工作。 要想配置Apache我们可以编辑“httpd.conf”这个配置文件 对于 PHP 我们只需要复制 “/usr/local/etc/”目录下的 PHP 配置文件 php.ini
进入到 "/usr/local/etc/" 目录 并且复制 php.ini-production 文件到 php.ini :
进入到“/usr/local/etc/”目录,并且复制 php.ini-production 文件到 php.ini :
cd /usr/local/etc/
cp php.ini-production php.ini
下一步, 在Apache目录下通过编辑 "httpd.conf"文件来配置Apache :
下一步,在 Apache 目录下通过编辑“httpd.conf”文件来配置 Apache
cd /usr/local/etc/apache24
nano -c httpd.conf
端口配置在第 **52**行 :
端口配置在第**52**行 :
Listen 8080
服务器名称配置在第 **219** 行:
服务器名称配置在第**219**行:
ServerName 127.0.0.1:8080
在第 **277**行如果目录需要添加的DirectoryIndex文件Apache将直接作用于它 :
在第**277**行,添加 DirectoryIndex 文件Apache 将用它来服务对目录的请求:
DirectoryIndex index.php index.html
在第 **287**行下配置Apache通过添加脚本来支持PHP :
在第**287**行下,配置 Apache ,添加脚本支持:
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
@ -66,47 +66,47 @@ Apache是现在使用范围最广的web服务器以及开源的HTTP服务器.在
保存并退出。
现在用sysrc命令来添加Apache作为开机启动项目 :
现在用 sysrc 命令,来添加 Apache 为开机启动项目:
sysrc apache24_enable=yes
然后用下面的命令测试Apache的配置 :
然后用下面的命令测试 Apache 的配置:
apachectl configtest
如果到这里都没有问题的话,那么就启动Apache吧 :
如果到这里都没有问题的话,那么就启动 Apache 吧:
service apache24 start
如果全部完毕, 在"/usr/local/www/apache24/data" 目录下创建一个phpinfo文件来验证PHP在Apache下完美运行:
如果全部完毕,在“/usr/local/www/apache24/data”目录下创建一个 phpinfo 文件来验证 PHP 在 Apache 下顺利运行:
cd /usr/local/www/apache24/data
echo "<?php phpinfo(); ?>" > info.php
现在就可以访问 freebsd 的服务器 IP : 192.168.1.123:8080/info.php.
现在就可以访问 freebsd 的服务器 IP : 192.168.1.123:8080/info.php
![Apache and PHP on Port 8080](http://blog.linoxide.com/wp-content/uploads/2015/11/Apache-and-PHP-on-Port-8080.png)
Apache 是使用 PHP 在 8080 端口下运行的
Apache 及 PHP 运行在 8080 端口
### 步骤 5 - 安装 Nginx ###
Nginx 以低内存的占用作为一款高性能的web服务器以及反向代理服务器。在这个步骤里我们将会使用Nginx作为Apache的反向代理, 因此让我们用pkg命令来安装它吧 :
Nginx 可以以较低内存占用提供高性能的 Web 服务器和反向代理服务器。在这个步骤里,我们将会使用 Nginx 作为Apache 的反向代理,因此让我们用 pkg 命令来安装它吧:
pkg install nginx
### 步骤 6 - 配置 Nginx ###
一旦 Nginx 安装完毕, 在 "**nginx.conf**" 文件里我们需要做一个新的配置文件来替换掉原来的nginx文件。更改到 "/usr/local/etc/nginx/"目录下,并且备份默认 nginx.conf 文件:
一旦 Nginx 安装完毕,在“**nginx.conf**”文件里,我们需要做一个新的配置文件来替换掉原来的 nginx 配置文件。切换到“/usr/local/etc/nginx/”目录下,并且备份默认 nginx.conf 文件:
cd /usr/local/etc/nginx/
mv nginx.conf nginx.conf.oroginal
现在就可以创建一个新的 nginx 配置文件了 :
现在就可以创建一个新的 nginx 配置文件了
nano -c nginx.conf
然后粘贴下面的配置:
然后粘贴下面的配置
user www;
worker_processes 1;
@ -166,12 +166,12 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代
保存并退出。
下一步, 在nginx目录下面,创建一个 **proxy.conf** 文件,使其作为反向代理 :
下一步,在 nginx 目录下面,创建一个 **proxy.conf** 文件,使其作为反向代理 :
cd /usr/local/etc/nginx/
nano -c proxy.conf
粘贴如下配置 :
粘贴如下配置
proxy_buffering on;
proxy_redirect off;
@ -186,27 +186,27 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代
proxy_buffers 100 8k;
add_header X-Cache $upstream_cache_status;
保存并退出.
保存并退出
最后一步, 为 nginx 的高速缓存创建一个 "/var/nginx/cache"的新目录 :
最后一步,为 nginx 的高速缓存创建一个“/var/nginx/cache”的新目录
mkdir -p /var/nginx/cache
### 步骤 7 - 配置 Nginx 的虚拟主机 ###
在这个步骤里面,我们需要创建一个新的虚拟主机域 "saitama.me", 以跟文件 "/usr/local/www/saitama.me" 和日志文件一同放在 "/var/log/nginx" 目录下。
在这个步骤里面,我们需要创建一个新的虚拟主机域“saitama.me”其文档根目录为“/usr/local/www/saitama.me”日志文件放在“/var/log/nginx”目录下。
我们必须做的第一件事情就是创建新的目录来存放虚拟主机文件, 在这里我们将用到一个"**vhost**"的新文件. 并创建它 :
我们必须做的第一件事情就是创建新的目录来存放虚拟主机配置文件,我们创建的新目录名为“**vhost**”。创建它:
cd /usr/local/etc/nginx/
mkdir vhost
创建好vhost 目录, 那么我们就进入这个目录并创建一个新的虚拟主机文件。这里我取名为 "**saitama.conf**" :
创建好 vhost 目录,然后我们就进入这个目录并创建一个新的虚拟主机文件。这里我取名为“**saitama.conf**”:
cd vhost/
nano -c saitama.conf
粘贴如下虚拟主机的配置 :
粘贴如下虚拟主机的配置
server {
# Replace with your freebsd IP
@ -254,65 +254,65 @@ Nginx 以低内存的占用作为一款高性能的web服务器以及反向代
保存并退出。
下一步, 为nginx和虚拟主机创建一个新的日志目录 "/var/log/" :
下一步,为 nginx 和虚拟主机创建一个新的日志目录“/var/log/”:
mkdir -p /var/log/nginx/
如果一切顺利, 在文件的根目录下创建文件 saitama.me :
如果一切顺利,在文件的根目录下创建目录 saitama.me 用作文档根:
cd /usr/local/www/
mkdir saitama.me
### 步骤 8 - 测试 ###
在这个步骤里面我们只是测试我们的nginx和虚拟主机的配置。
在这个步骤里面,我们只是测试我们的 nginx 和虚拟主机的配置。
用如下命令测试nginx的配置 :
用如下命令测试 nginx 的配置:
nginx -t
如果一切都没有问题, 用 sysrc 命令添加nginx为启动项,并且启动nginx和重启apache:
如果一切都没有问题,用 sysrc 命令添加 nginx 为开机启动项,并且启动 nginx 和重启 apache
sysrc nginx_enable=yes
service nginx start
service apache24 restart
一切完毕后, 在 saitama.me 目录下添加一个新的phpinfo文件来验证php的正常运行 :
一切完毕后,在 saitama.me 目录下,添加一个新的 phpinfo 文件来验证 php 的正常运行:
cd /usr/local/www/saitama.me
echo "<?php phpinfo(); ?>" > info.php
然后访问这个域名 : **www.saitama.me/info.php**.
然后访问这个域名 **www.saitama.me/info.php**
![Virtualhost Configured saitamame](http://blog.linoxide.com/wp-content/uploads/2015/11/Virtualhost-Configured-saitamame.png)
Nginx 作为Apache的反向代理正在运行了PHP也同样在进行工作了。
Nginx 作为 Apache 的反向代理运行了PHP 也同样工作了。
这是另一种结果 :
这是另一个结果:
无缓存的 Test .html 文件。
测试无缓存的 .html 文件。
curl -I www.saitama.me
![html with no-cache](http://blog.linoxide.com/wp-content/uploads/2015/11/html-with-no-cache.png)
有三十天缓存的 Test .css 文件。
测试有三十天缓存的 .css 文件。
curl -I www.saitama.me/test.css
![css file 30day cache](http://blog.linoxide.com/wp-content/uploads/2015/11/css-file-30day-cache.png)
正常缓存的 Test .php 文件:
测试缓存的 .php 文件:
curl -I www.saitama.me/info.php
![PHP file cached](http://blog.linoxide.com/wp-content/uploads/2015/11/PHP-file-cached.png)
全部完成
全部搞定
### 总结 ###
Nginx 是最受欢迎的 HTTP 和反向代理服务器,拥有丰富的高性能和低内存/RAM的使用功能。Nginx使用了太多的缓存 我们可以在网络上缓存静态文件使得网页加速并且在用户需要的时候再缓存php文件。这样 Nginx 的轻松配置和使用可以让它用作HTTP服务器或者 apache的反向代理。
Nginx 是最受欢迎的 HTTP 和反向代理服务器,拥有丰富的功能、高性能、低内存/RAM 占用。Nginx 也用于缓存, 我们可以在网络上缓存静态文件使得网页加速,并且缓存用户请求的 php 文件。 Nginx 容易配置和使用,可以将它用作 HTTP 服务器或者 apache 的反向代理。
--------------------------------------------------------------------------------
@ -320,7 +320,7 @@ via: http://linoxide.com/linux-how-to/install-nginx-reverse-proxy-apache-freebsd
作者:[Arul][a]
译者:[KnightJoker](https://github.com/KnightJoker)
校对:[Caroline(https://github.com/carolinewuyan
校对:[Caroline](https://github.com/carolinewuyan)[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,7 +1,7 @@
如何在 CentOS 7 / Ubuntu 15.04 上安装 PHP 框架 Laravel
================================================================================
大家好,这篇文章将要讲述如何在 CentOS 7 / Ubuntu 15.04 上安装 Laravel。如果你是一个 PHP Web 的开发者,你并不需要关心各种琳琅满目的现代 PHP 框架Laravel 是最轻松启动和运行的,它省时省力,能让你享受到 web 开发的乐趣。Laravel 信奉着一个普世的开发哲学,作为一个好的框架它为你提供了高度优先权,让你在简单的使用指导下创建出可维护代码,你应该保持着高速的开发效率,能够随时毫不畏惧更改你的代码来打破现有功能。
大家好,这篇文章将要讲述如何在 CentOS 7 / Ubuntu 15.04 上安装 Laravel。如果你是一个 PHP Web 的开发者,你并不需要考虑如何在琳琅满目的现代 PHP 框架中选择Laravel 是最轻松启动和运行的,它省时省力,能让你享受到 web 开发的乐趣。Laravel 信奉着一个普世的开发哲学,通过简单的指导创建出可维护代码具有最高优先级,你将保持着高速的开发效率,能够随时毫不畏惧更改你的代码来改进现有功能。
Laravel 安装并不繁琐,你只要跟着本文章一步步操作就能在 CentOS 7 或者 Ubuntu 15 服务器上安装。
@ -15,13 +15,9 @@ Laravel 安装并不繁琐,你只要跟着本文章一步步操作就能在 Ce
# yum install epel-release
----------
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
----------
# yum update
#### Ubuntu ####
@ -29,23 +25,19 @@ Laravel 安装并不繁琐,你只要跟着本文章一步步操作就能在 Ce
# apt-get install python-software-properties
# add-apt-repository ppa:ondrej/php5
----------
# apt-get update
----------
# apt-get install -y php5 mcrypt php5-mcrypt php5-gd
### 2) 防火墙安装 ###
系统防火墙和 SELinux 设置对于用于产品应用安全来说非常重要,当你使用测试服务器的时候可以关闭防火墙,用以下命令行设置 SELinux 成宽容模式permissive模式来保证安装程序不受它们的影响。
系统防火墙和 SELinux 设置对于用于产品应用安全来说非常重要,当你使用测试服务器的时候可以关闭防火墙,用以下命令行设置 SELinux 成宽容模式permissive来保证安装程序不受它们的影响。
# setenforce 0
### 3) Apache, MariaDB, PHP 安装 ###
Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 OpenSSL、PDOMbstring 和 Tokenizer PHP Extensions。如果 LAMP 已经运行在你的服务器上你可以跳过这一步,直接确认一些必要的 PHP 插件是否安装好。
Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 OpenSSL、PDOMbstring 和 Tokenizer 等 PHP 扩展。如果 LAMP 已经运行在你的服务器上你可以跳过这一步,直接确认一些必要的 PHP 插件是否安装好。
要安装完整 AMP 你需要在自己的服务器上运行以下命令。
@ -58,8 +50,6 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op
# systemctl start httpd
# systemctl enable httpd
----------
#systemctl start mysqld
#systemctl enable mysqld
@ -73,7 +63,7 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op
### 4) 安装 Composer ###
在我们安装 Laravel 前,先让我们开始安装 composer。安装 composer 对于安装 Laravel 是最重要的步骤之一,因为 composer 能帮我们安装 Laravel 的各种依赖。
在我们安装 Laravel 前,先让我们开始安装 composer。安装 composer 是安装 Laravel 的最重要步骤之一,因为 composer 能帮我们安装 Laravel 的各种依赖。
#### CentOS/Ubuntu ####
@ -95,8 +85,6 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op
# unzip develop.zip
----------
# mv laravel-develop /var/www/
现在使用 compose 命令来安装目录下所有 Laravel 所需要的依赖。
@ -120,17 +108,15 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op
![Key encryption](http://blog.linoxide.com/wp-content/uploads/2015/11/45.png)
### 7) 虚拟 Host 和 所属用户 ###
### 7) 虚拟主机和所属用户 ###
在 composer 安装好后,分配 document 根目录的权限和所属用户,如下所示。
# chmod 775 /var/www/laravel-develop/app/storage
----------
# chown -R apache:apache /var/www/laravel-develop
用任意一款编辑器打开 apache 服务器的默认配置文件,在文件最后加上虚拟 host 入口
用任意一款编辑器打开 apache 服务器的默认配置文件,在文件最后加上虚拟主机配置
# vim /etc/httpd/conf/httpd.conf
@ -155,13 +141,15 @@ Laravel 安装程序需要完成安装 LAMP 整个环境,需要额外安装 Op
### 8) Laravel 5 网络访问 ###
打开浏览器然后输入你配置的 IP 地址或者绝对域名Fully qualified domain name你将会看到 Laravel 5 的默认页面。
打开浏览器然后输入你配置的 IP 地址或者完整域名Fully qualified domain name你将会看到 Laravel 5 的默认页面。
![Laravel Default](http://blog.linoxide.com/wp-content/uploads/2015/11/35.png)
### 总结 ###
Laravel 框架对于开发网页应用来说是一个绝好的的工具。所以,看了这篇文章你将学会在 Ubuntu 15 和 CentOS 7 上安装 Laravel 之后你就可以使用这个超棒的PHP框架提供的各种功能和舒适便捷性来进行你的开发工作。如果您有什么意见或者建议请在以下评论区中回复我们将根据您宝贵的反馈来使我们的文章更加浅显易懂。
Laravel 框架对于开发网页应用来说是一个绝好的的工具。所以,看了这篇文章你将学会在 Ubuntu 15 和 CentOS 7 上安装 Laravel 之后你就可以使用这个超棒的 PHP 框架提供的各种功能和舒适便捷性来进行你的开发工作。
如果您有什么意见或者建议请在以下评论区中回复,我们将根据您宝贵的反馈来使我们的文章更加浅显易懂。
--------------------------------------------------------------------------------

View File

@ -1,4 +1,3 @@
sevenot translating
A Linux User Using Windows 10 After More than 8 Years See Comparison
================================================================================
Windows 10 is the newest member of windows NT family of which general availability was made on July 29, 2015. It is the successor of Windows 8.1. Windows 10 is supported on Intel Architecture 32 bit, AMD64 and ARMv7 processors.

View File

@ -1,74 +0,0 @@
GHLandy Translating
14 tips for teaching open source development
================================================================================
Academia is an excellent platform for training and preparing the open source developers of tomorrow. In research, we occasionally open source software we write. We do this for two reasons. One, to promote the use of the tools we produce. And two, to learn more about the impact and issues other people face when using them. With this background of writing research software, I was tasked with redesigning the undergraduate software engineering course for second-year students at the University of Bradford.
It was a challenge, as I was faced with 80 students coming for different degrees, including IT, business computing, and software engineering, all in the same course. The hardest part was working with students with a wide range of programming experience levels. Traditionally, the course had involved allowing students to choose their own teams, tasking them with building a garage database system and then submitting a report in the end as part of the assessment.
I decided to redesign the course to give students insight into the process of working on real-world software teams. I divided the students into teams of five or six, based on their degrees and programming skills. The aim was to have an equal distribution of skills across the teams to prevent any unfair advantage of one team over another.
### The core lessons ###
The course format was updated to have both lectures and lab sessions. However, the lab session functioned as mentoring sessions, where instructors visited each team to ask for updates and see how the teams were progressing with the clients and the products. There were traditional lectures on project management, software testing, requirements engineering, and similar topics, supplemented by lab sessions and mentor meetings. These meetings allowed us to check up on students' progress and monitor whether they were following the software engineering methodologies taught in the lecture portion. Topics we taught this year included:
- Requirements engineering
- How to interact with clients and other team members
- Software methodologies, such as agile and extreme programming approaches
- How to use different software engineering approaches and work through sprints
- Team meetings and documentations
- Project management and Gantt charts
- UML diagrams and system descriptions
- Code revisioning using Git
- Software testing and bug tracking
- Using open source libraries for their tools
- Open source licenses and which one to use
- Software delivery
Along with these lectures, we had a few guest speakers from the corporate world talk about their practices in software product deliveries. We also managed to get the universitys intellectual property lawyer to come and talk about IP issues surrounding software in the UK, and how to handle any intellectual properties issues in software.
### Collaboration tools ###
To make all of the above possible, a number of tools were introduced. Students were trained on how to use them for their projects. These included:
- Google Drive folders shared within the team and the tutor, to maintain documents and spreadsheets for project descriptions, requirements gathering, meeting minutes, and time tracking of the project. This was an extremely efficient way to monitor and also provide feedback straight into the folders for each team.
- [Basecamp][1] for document sharing as well, and later in the course we considered this as a possible replacement for Google Drive.
- Bug reporting tools such as [Mantis][2] again have a limited users for free reporting. Later Git itself was being used for bug reports n any tools by the testers in the teams
- Remote videoconferencing tools were used as a number of clients were off-campus, and sometimes not even in the same city. The students were regularly using Skype to communicate with them, documenting their meetings and sometimes even recording them for later use.
- A number of open source tool kits were also used for students' projects. The students were allowed to choose their own tool kits and languages based on the requirements of the projects. The only condition was that these have to be open source and could be installed in the university labs, which the technical staff was extremely supportive of.
- In the end all teams had to deliver their projects to the client, including complete working version of the software, documentation, and open source licenses of their own choosing. Most of the teams chose the GPL version 3 license.
### Tips and lessons learned ###
In the end, it was a fun year and nearly all students did very well. Here are some of the lessons I learned which may help improve the course next year:
1. Give the students a wide variety of choice in projects that are interesting, such as game development or mobile application development, and projects with goals. Working with mundane database systems is not going to keep most students interested. Working with interesting projects, most students became self-learners, and were also helping others in their teams and outside to solve some common issues. The course also had a message list, where students were posting any issues they were encountering, in hopes of receiving advice from others. However, there was a drawback to this approach. The external examiners have advised us to go back to a style of one type of project, and one type of language to help narrow the assessment criteria for the students.
1. Give students regular feedback on their performance at every stage. This could be done during the mentoring meetings with the teams, or at other stages, to help them improve the work for next time.
1. Students are more than willing to work with clients from outside university! They look forward to working with external company representatives or people outside the university, just because of the new experience. They were all able to display professional behavior when interacting with their mentors, which put the instructors at ease.
1. A lot of teams left developing unit testing until the end of the project, which from an extreme programming methodology standpoint was a serious no-no. Maybe testing should be included at the assessments of the various stages to help remind students that they need to be developing unit tests in parallel with the software.
1. In the class of 80, there were only four girls, each working in different teams. I observed that boys were very ready to take on roles as team leads, assigning the most interesting code pieces to themselves and the girls were mostly following instructions or doing documentation. For some reason, the girls choose not to show authority or preferred not to code even when they were encouraged by a female instructor. This is still a major issue that needs to be addressed.
1. There are different styles of documentation such as using UML, state diagrams, and others. Allow students to learn them all and merge with other courses during the year to improve their learning experience.
1. Some students were very good developers, but some doing business computing had very little coding experience. The teams were encouraged to work together to prevent the idea that developer would get better marks than other team members if they were only doing meeting minutes or documentations. Roles were also encouraged to be rotated during mentoring sessions to see that everyone was getting a chance to learn how to program.
1. Allowing the team to meet with the mentor every week was helpful in monitoring team activities. It also showed who was doing the most work. Usually students who were not participating in their groups would not come to meetings, and could be identified by the work being presented by other members every week.
1. We encouraged students to attach licenses to their work and identify intellectual property issues when working with external libraries and clients. This allowed students to think out of the box and learn about real-world software delivery problems.
1. Give students room to choose their own technologies.
1. Having teaching assistants is key. Managing 80 students was very difficult, especially on the weeks when they were being assessed. Next year I would definitely have teaching assistants helping me with the teams.
1. A supportive tech support for the lab is very important. The university tech support was extremely supportive of the course. Next year, they are talking about having virtual machines assigned to teams, so the teams can install any software on their own virtual machine as needed.
1. Teamwork helps. Most teams exhibited a supportive nature to other team members, and mentoring also helped.
1. Additional support from other staff members is a plus. As a new academic, I needed to learn from experience and also seek advice at multiple points on how to handle certain students and teams if I was confused on how to engage them with the course. Support from senior staff members was very encouraging to me.
In the end, it was a fun course—not only for the me as an instructor, but for the students as well. There were some issues with learning objectives and traditional grading schemes that still need to be ironed out to reduce the workload it produced on the instructors. For next year, I plan to keep this same format, but hope to come up with a better grading scheme and introduce more software tools that can help monitor project activities and code revisions.
--------------------------------------------------------------------------------
via: http://opensource.com/education/15/9/teaching-open-source-development-undergraduates
作者:[Mariam Kiran][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://opensource.com/users/mariamkiran
[1]:https://basecamp.com/
[2]:https://www.mantisbt.org/

View File

@ -1,173 +0,0 @@
GHLandy Translating
20 Years of GIMP Evolution: Step by Step
================================================================================
youtube 视频
<iframe width="660" height="371" frameborder="0" allowfullscreen="" src="https://www.youtube.com/embed/PSJAzJ6mkVw?feature=oembed"></iframe>
[GIMP][1] (GNU Image Manipulation Program) superb open source and free graphics editor. Development began in 1995 as students project of the University of California, Berkeley by Peter Mattis and Spencer Kimball. In 1997 the project was renamed in “GIMP” and became an official part of [GNU Project][2]. During these years the GIMP is one of the best graphics editor and platinum holy wars “GIMP vs Photoshop” one of the most popular.
The first announce, 21.11.1995:
> From: Peter Mattis
>
> Subject: ANNOUNCE: The GIMP
>
> Date: 1995-11-21
>
> Message-ID: <48s543$r7b@agate.berkeley.edu>
>
> Newsgroups: comp.os.linux.development.apps,comp.os.linux.misc,comp.windows.x.apps
>
> The GIMP: the General Image Manipulation Program
> ------------------------------------------------
>
> The GIMP is designed to provide an intuitive graphical interface to a
> variety of image editing operations. Here is a list of the GIMP's
> major features:
>
> Image viewing
> -------------
>
> * Supports 8, 15, 16 and 24 bit color.
> * Ordered and Floyd-Steinberg dithering for 8 bit displays.
> * View images as rgb color, grayscale or indexed color.
> * Simultaneously edit multiple images.
> * Zoom and pan in real-time.
> * GIF, JPEG, PNG, TIFF and XPM support.
>
> Image editing
> -------------
>
> * Selection tools including rectangle, ellipse, free, fuzzy, bezier
> and intelligent.
> * Transformation tools including rotate, scale, shear and flip.
> * Painting tools including bucket, brush, airbrush, clone, convolve,
> blend and text.
> * Effects filters (such as blur, edge detect).
> * Channel & color operations (such as add, composite, decompose).
> * Plug-ins which allow for the easy addition of new file formats and
> new effect filters.
> * Multiple undo/redo.
GIMP 0.54, 1996
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/054.png)
GIMP 0.54 was required X11 displays, X-server and Motif 1.2 wigdets and supported 8, 15, 16 & 24 color depths with RGB & grayscale colors. Supported images format: GIF, JPEG, PNG, TIFF and XPM.
Basic functionality: rectangle, ellipse, free, fuzzy, bezier, intelligent selection tools, and rotate, scale, shear, clone, blend and flip images.
Extended tools: text operations, effects filters, tools for channel and colors manipulation, undo and redo operations. Since the first version GIMP support the plugin system.
GIMP 0.54 can be ran in Linux, HP-UX, Solaris, SGI IRIX.
### GIMP 0.60, 1997 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/060.gif)
This is development release, not for all users. GIMP has the new toolkits GDK (GIMP Drawing Kit) and GTK (GIMP Toolkit), Motif support is deprecated. GIMP Toolkit is also begin of the GTK+ cross-platform widget toolkit. New features:
- basic layers
- sub-pixel sampling
- brush spacing
- improver airbrush
- paint modes
### GIMP 0.99, 1997 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/099.png)
Since 0.99 version GIMP has the scripts add macros (Script-Fus) support. GTK and GDK with some improvements has now the new name GTK+. Other improvements:
- support big images (rather than 100 MB)
- new native format XCF
- new API write plugins and extensions is easy
### GIMP 1.0, 1998 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/100.gif)
GIMP and GTK+ was splitted into separate projects. The GIMP official website has
reconstructed and contained new tutorials, plugins and documentation. New features:
- tile-based memory management
- massive changes in plugin API
- XFC format now support layers, guides and selections
- web interface
- online graphics generation
### GIMP 1.2, 2000 ###
New features:
- translation for non-english languages
- fixed many bugs in GTK+ and GIMP
- many new plugins
- image map
- new toolbox: resize, measure, dodge, burn, smugle, samle colorize and curve bend
- image pipes
- images preview before saving
- scaled brush preview
- recursive selection by path
- new navigation window
- dragndrop
- watermarks support
### GIMP 2.0, 2004 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/200.png)
The biggest change new GTK+ 2.x toolkit.
### GIMP 2.2, 2004 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/220.png)
Many bugfixes and dragndrop support.
### GIMP 2.4, 2007 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/240.png)
New features:
- better dragndrop support
- Ti-Fu was replaced to Script-Fu the new script interpreter
- new plugins: photocopy, softglow, neon, cartoon, dog, glob and others
### GIMP 2.6, 2008 ###
New features:
- renew graphics interface
- new select and tool
- GEGL (GEneric Graphics Library) integration
- “The Utility Window Hint” for MDI behavior
### GIMP 2.8, 2012 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/280.png)
New features:
- GUI has some visual changes
- new save and export menu
- renew text editor
- layers group support
- JPEG2000 and export to PDF support
- webpage screenshot tool
--------------------------------------------------------------------------------
via: https://tlhp.cf/20-years-of-gimp-evolution/
作者:[Pavlo Rudyi][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://tlhp.cf/author/paul/
[1]:https://gimp.org/
[2]:http://www.gnu.org/

View File

@ -1,3 +1,5 @@
GHLandy Translating
6 creative ways to use ownCloud
================================================================================
![Yearbook cover 2015](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc-open-source-yearbook-lead1-inc0335020sw-201511-01.png)
@ -91,4 +93,4 @@ via: https://opensource.com/life/15/12/6-creative-ways-use-owncloud
[12]:https://owncloud.com/owncloud45-community/
[13]:http://karlitschek.de/2015/08/announcing-the-draft-federated-cloud-sharing-api/
[14]:https://owncloud.com/customer/sciebo/
[15]:https://owncloud.org/federation/
[15]:https://owncloud.org/federation/

View File

@ -1,79 +0,0 @@
6 useful LibreOffice extensions
================================================================================
![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-2.png)
Image by : Opensource.com
LibreOffice is the best free office suite around, and as such has been adopted by all major Linux distributions. Although LibreOffice is already packed with features, it can be extended by using specific add-ons, called extensions.
The main LibreOffice extensions website is [extensions.libreoffice.org][1]. Extensions are tools that can be added or removed independently from the main installation, and may add new functionality or make existing functionality easier to use.
### 1. MultiFormatSave ###
MultiFormatSave lets users save a document in the OpenDocument, Microsoft Office (old and new), and/or PDF formats simultaneously, according to user settings. This extension is extremely useful during the migration from Microsoft Office document formats to the [Open Document Format][2] standard, because it offers the option to save in both flavors: ODF for interoperability, and Microsoft Office for compatibility with all users sticking to legacy formats. This makes the migration process softer, and easier to administer.
**[Download MultiFormatSave][3]**
![Multiformatsave extension](https://opensource.com/sites/default/files/images/business-uploads/multiformatsave.png)
### 2. Alternative dialog Find & Replace for Writer (AltSearch) ###
This extension adds many new features to Writer's find & replace function: searched or replaced text can contain one or more paragraphs; multiple search and replacement in one step; searching: Bookmarks, Notes, Text fields, Cross-references and Reference marks to their content, name or mark and their inserting; searching and inserting Footnote and Endnote; searching object of Table, Pictures and Text frames according to their name; searching out manual page and column break and their set up or deactivation; and searching similarly formatted text, according to cursor point. It is also possible to save and load search and replacement parameters, and execute the batch on several opened documents at the same time.
**[Download Alternative dialog Find & Replace for Writer (AltSearch)][4]**
![Alternative Find&amp;amp;Replace add-on](https://opensource.com/sites/default/files/images/business-uploads/alternativefindreplace.png)
### 3. Pepito Cleaner ###
Pepito Cleaner is an extension of LibreOffice created to quickly resolve the most common formatting mistakes of old scans, PDF imports, and every digital text file. By clicking the Pepito Cleaner icon on the LibreOffice toolbar, users will open a window that will analyze the document and show the results broken down by category. This is extremely useful when converting PDF documents to ODF, as it cleans all the cruft left in place by the automatic process.
**[Download Pepito Cleaner][5]**
![Pepito cleaner screenshot](https://opensource.com/sites/default/files/images/business-uploads/pepitocleaner.png)
### 4. ImpressRunner ###
Impress Runner is a simple extension that transforms an [Impress][6] presentation into an auto-running file. The extension adds two icons, to set and remove the autostart function, which can also be added manually by editing the File | Properties | Custom Properties menu, and adding the term autostart in one of the first four text fields. This extension is especially useful for booths at conferences and events, where the slides are supposed to run unattended.
**[Download ImpressRunner][7]**
### 5. Export as Images ###
The Export as Images extension adds a File menu entry export as Images... in Impress and [Draw][8], to export all slides or pages as images in JPG, PNG, GIF, BMP, and TIFF format, and allows users to choose a file name for exported images, the image size, and other parameters.
**[Download Export as Images][9]**
![Export as images extension](https://opensource.com/sites/default/files/images/business-uploads/exportasimages.png)
### 6. Anaphraseus ###
Anaphraseus is a CAT (Computer-Aided Translation) tool for creating, managing, and using bilingual Translation Memories. Anaphraseus is a LibreOffice macro set available as an extension or a standalone document. Originally, Anaphraseus was developed to work with the Wordfast format, but it can also export and import files in TMX format. Anaphraseus main features are: text segmentation, fuzzy search in Translation Memory, terminology recognition, and TMX Export/Import (OmegaT translation memory format).
**[Download Anaphraseus][10]**
![Anaphraseus screenshot](https://opensource.com/sites/default/files/images/business-uploads/anaphraseus.png)
Do you have a favorite LibreOffice extension to recommend? Let us know about it in the comments.
--------------------------------------------------------------------------------
via: https://opensource.com/business/15/12/6-useful-libreoffice-extensions
作者:[Italo Vignoli][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/italovignoli
[1]:http://extensions.libreoffice.org/
[2]:http://www.opendocumentformat.org/
[3]:http://extensions.libreoffice.org/extension-center/multisave-1
[4]:http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer
[5]:http://pepitoweb.altervista.org/pepito_cleaner/index.php
[6]:https://www.libreoffice.org/discover/impress/
[7]:http://extensions.libreoffice.org/extension-center/impressrunner
[8]:https://www.libreoffice.org/discover/draw/
[9]:http://extensions.libreoffice.org/extension-center/export-as-images
[10]:http://anaphraseus.sourceforge.net/

View File

@ -1,42 +0,0 @@
kylepeng93正在翻译
Running a mainline kernel on a cellphone
================================================================================
One of the biggest freedoms associated with free software is the ability to replace a program with an updated or modified version. Even so, of the many millions of people using Linux-powered phones, few are able to run a mainline kernel on those phones, even if they have the technical skills to do the replacement. The sad fact is that no mainstream phone available runs mainline kernels. A session at the 2015 Kernel Summit, led by Rob Herring, explored this problem and what might be done to address it.
When asked, most of the developers in the room indicated that they would prefer to be able to run mainline kernels on their phones — though a handful did say that they would rather not do so. Rob has been working on this problem for the last year and a half in support of Project Ara (mentioned in this article). But the news is not good.
There is, he said, too much out-of-tree code running on a typical handset; mainline kernels simply lack the drivers needed to make that handset work. A typical phone is running 1-3 million lines of out-of-tree code. Almost all of those phones are stuck on the 3.10 kernel — or something even older. There are all kinds of reasons for this, but the simple fact is that things seem to move too quickly in the handset world for the kernel community to keep up. Is that, he asked, something that we care about?
Tim Bird noted that the Nexus 1, one of the original Android phones, never ran a mainline kernel and never will. It broke the promise of open source, making it impossible for users to put a new kernel onto their devices. At this point, no phone supports that ability. Peter Zijlstra wondered about how much of that out-of-tree code was duplicated functionality from one handset to the next; Rob noted that he has run into three independently developed hotplug governors so far.
Dirk Hohndel suggested that few people care. Of the billion phones out there, he said, approximately 27 of them have owners who care about running mainline kernels. The rest just want to get the phone to work. Perhaps developers who are concerned about running mainline kernels are trying to solve the wrong problem.
Chris Mason said that handset vendors are currently facing the same sorts of problems that distributors dealt with many years ago. They are coping with a lot of inefficient, repeated, duplicated work. Once the distributors [Rob Herring] decided to put their work into the mainline instead of carrying it themselves, things got a lot better. The key is to help the phone manufacturers to realize that they can benefit in the same way; that, rather than pressure from users, is how the problem will be solved.
Grant Likely raised concerns about security in a world where phones cannot be upgraded. What we need is a real distribution market for phones. But, as long as the vendors are in charge of the operating software, phones will not be upgradeable. We have a big security mess coming, he said. Peter added that, with Stagefright, that mess is already upon us.
Ted Ts'o said that running mainline kernels is not his biggest concern. He would be happy if the phones on sale this holiday season would be running a 3.18 or 4.1 kernel, rather than being stuck on 3.10. That, he suggested, is a more solvable problem. Steve Rostedt said that would not solve the security problem, but Ted remarked that a newer kernel would at least make it easier to backport fixes. Grant replied that, one year from now, it would all just happen again; shipping newer kernels is just an incremental fix. Kees Cook added that there is not much to be gained from backporting fixes; the real problem is that there are no defenses from bugs (he would expand on this theme in a separate session later in the day).
Rob said that any kind of solution would require getting the vendors on board. That, though, will likely run into trouble with the sort of lockdown that vendors like to apply to their devices. Paolo Bonzini asked whether it would be possible to sue vendors over unfixed security vulnerabilities, especially when the devices are still under warranty. Grant said that upgradeability had to become a market requirement or it simply wasn't going to happen. It might be a nasty security issue that causes this to happen, or carriers might start requiring it. Meanwhile, kernel developers need to keep pushing in that direction. Rob noted that, beyond the advantages noted thus far, the ability to run mainline kernels would help developers to test and validate new features on Android devices.
Josh Triplett asked whether the community would be prepared to do what it would take if the industry were to come around to the idea of mainline kernel support. There would be lots of testing and validation of kernels on handsets required; Android Compatibility Test Suite failures would have to be treated as regressions. Rob suggested that this could be discussed next year, after the basic functionality is in place, but Josh insisted that, if the demand were to show up, we would have to be able to give a good answer.
Tim said that there is currently a big disconnect with the vendor world; vendors are not reporting or contributing anything back to the community at all. They are completely disconnected, so there is no forward progress ever. Josh noted that when vendors do report bugs with the old kernels they are using, the reception tends to be less than friendly. Arnd Bergmann said that what was needed was to get one of the big silicon vendors to commit to the idea and get its hardware to a point where running mainline kernels was possible; that would put pressure on the others. But, he added, that would require the existence of one free GPU driver that got shipped with the hardware — something that does not exist currently.
Rob put up a list of problem areas, but there was not much time for discussion of the particulars. WiFi drivers continue to be an issue, especially with the new features being added in the Android world. Johannes Berg agreed that the new features are an issue; the Android developers do not even talk about them until they ship with the hardware. Support for most of those features does eventually land in the mainline kernel, though.
As things wound down, Ben Herrenschmidt reiterated that the key was to get vendors to realize that working with the mainline kernel is in their own best interest; it saves work in the long run. Mark Brown said that, in past years when the kernel version shipped with Android moved forward more reliably, the benefits of working upstream were more apparent to vendors. Now that things seem to be stuck on 3.10, that pressure is not there in the same way. The session ended with developers determined to improve the situation, but without any clear plan for getting there.
--------------------------------------------------------------------------------
via: https://lwn.net/Articles/662147/
作者:[Jonathan Corbet][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://lwn.net/Articles/KernelSummit2015/

View File

@ -1,268 +0,0 @@
Translating by ZTinoZ
How to Install Bugzilla with Apache and SSL on FreeBSD 10.2
================================================================================
Bugzilla is open source web base application for bug tracker and testing tool, develop by mozilla project, and licensed under Mozilla Public License. It is used by high tech company like mozilla, redhat and gnome. Bugzilla was originally created by Terry Weissman in 1998. It written in perl, use MySQL as the database back-end. It is a server software designed to help you manage software development. Bugzilla has a lot of features, optimized database, excellent security, advanced search tool, integrated with email capabilities etc.
In this tutorial we will install bugzilla 5.0 with apache for the web server, and enable SSL for it. Then install mysql51 as the database system on freebsd 10.2.
#### Prerequisite ####
FreeBSD 10.2 - 64bit.
Root privileges.
### Step 1 - Update System ###
Log in to the freebsd server with ssl login, and update the repository database :
sudo su
freebsd-update fetch
freebsd-update install
### Step 2 - Install and Configure Apache ###
In this step we will install apache from the freebsd repositories with pkg command. Then configure apache by editing file "httpd.conf" on apache24 directory, configure apache to use SSL, and CGI support.
Install apache with pkg command :
pkg install apache24
Go to the apache directory and edit the file "httpd.conf" with nanao editor :
cd /usr/local/etc/apache24
nano -c httpd.conf
Uncomment the list line below :
#Line 70
LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so
#Line 89
LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so
# Line 117
LoadModule expires_module libexec/apache24/mod_expires.so
#Line 141 to enabling SSL
LoadModule ssl_module libexec/apache24/mod_ssl.so
# Line 162 for cgi support
LoadModule cgi_module libexec/apache24/mod_cgi.so
# Line 174 to enable mod_rewrite
LoadModule rewrite_module libexec/apache24/mod_rewrite.so
# Line 219 for the servername configuration
ServerName 127.0.0.1:80
Save and exit.
Next, we need to install mod perl from freebsd repository, and then enable it :
pkg install ap24-mod_perl2
To enable mod_perl, edit httpd.conf and add to the "Loadmodule" line below :
nano -c httpd.conf
Add line below :
# Line 175
LoadModule perl_module libexec/apache24/mod_perl.so
Save and exit.
And before start apache, add it to start at boot time with sysrc command :
sysrc apache24_enable=yes
service apache24 start
### Step 3 - Install and Configure MySQL Database ###
We will use mysql51 for the database back-end, and it is support for perl module for mysql. Install mysql51 with pkg command below :
pkg install p5-DBD-mysql51 mysql51-server mysql51-client
Now we must add mysql to the boot time, and then start and configure the root password for mysql.
Run command below to do it all :
sysrc mysql_enable=yes
service mysql-server start
mysqladmin -u root password aqwe123
Note :
mysql password : aqwe123
![Configure MySQL Password](http://blog.linoxide.com/wp-content/uploads/2015/12/Configure-MySQL-Password.png)
Next, we will log in to the mysql shell with user root and password that we've configured above, then we will create new database and user for bugzilla installation.
Log in to the mysql shell with command below :
mysql -u root -p
password: aqwe123
Add the database :
create database bugzilladb;
create user bugzillauser@localhost identified by 'bugzillauser@';
grant all privileges on bugzilladb.* to bugzillauser@localhost identified by 'bugzillauser@';
flush privileges;
\q
![Creating Database for Bugzilla](http://blog.linoxide.com/wp-content/uploads/2015/12/Creating-Database-for-Bugzilla.png)
Database for bugzilla is created, database "bugzilladb" with user "bugzillauser" and password "bugzillauser@".
### Step 4 - Generate New SSL Certificate ###
Generate new self signed ssl certificate on directory "ssl" for bugzilla site.
Go to the apache24 directory and create new directory "ssl" on it :
cd /usr/local/etc/apache24/
mkdir ssl; cd ssl
Next, generate the certificate file with openssl command, then change the permission of the certificate file :
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/apache24/ssl/bugzilla.key -out /usr/local/etc/apache24/ssl/bugzilla.crt
chmod 600 *
### Step 5 - Configure Virtualhost ###
We will install bugzilla on directory "/usr/local/www/bugzilla", so we must create new virtualhost configuration for it.
Go to the apache directory and create new directory called "vhost" for virtualhost file :
cd /usr/local/etc/apache24/
mkdir vhost; cd vhost
Now create new file "bugzilla.conf" for the virtualhost file :
nano -c bugzilla.conf
Paste configuration below :
<VirtualHost *:80>
ServerName mybugzilla.me
ServerAlias www.mybuzilla.me
DocumentRoot /usr/local/www/bugzilla
Redirect permanent / https://mybugzilla.me/
</VirtualHost>
Listen 443
<VirtualHost _default_:443>
ServerName mybugzilla.me
DocumentRoot /usr/local/www/bugzilla
ErrorLog "/var/log/mybugzilla.me-error_log"
CustomLog "/var/log/mybugzilla.me-access_log" common
SSLEngine On
SSLCertificateFile /usr/local/etc/apache24/ssl/bugzilla.crt
SSLCertificateKeyFile /usr/local/etc/apache24/ssl/bugzilla.key
<Directory "/usr/local/www/bugzilla">
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride Limit FileInfo Indexes Options
Require all granted
</Directory>
</VirtualHost>
Save and exit.
If all is done, create new directory for bugzilla installation and then enable the bugzilla virtualhost by adding the virtualhost configuration to httpd.conf file.
Run command below on "apache24" directory :
mkdir -p /usr/local/www/bugzilla
cd /usr/local/etc/apache24/
nano -c httpd.conf
In the end of the line, add configuration below :
Include etc/apache24/vhost/*.conf
Save and exit.
Now test the apache configuration with "apachectl" command and restart it :
apachectl configtest
service apache24 restart
### Step 6 - Install Bugzilla ###
We can install bugzilla manually by downloading the source, or install it from freebsd repository. In this step we will install bugzilla from freebsd repository with pkg command :
pkg install bugzilla50
If it's done, go to the bugzilla installation directory and install all perl module that needed by bugzilla.
cd /usr/local/www/bugzilla
./install-module --all
Wait it until all is finished, it is take the time.
Next, generate the configuration file "localconfig" by executing "checksetup.pl" file on bugzilla installation directory.
./checksetup.pl
You will see the error message about the database configuration, so edit the file "localconfig" with nano editor :
nano -c localconfig
Now add the database that was created on step 3.
#Line 57
$db_name = 'bugzilladb';
#Line 60
$db_user = 'bugzillauser';
#Line 67
$db_pass = 'bugzillauser@';
Save and exit.
Then run "checksetup.pl" again :
./checksetup.pl
You will be prompt about mail and administrator account, fill all of it with your email, user and password.
![Admin Setup](http://blog.linoxide.com/wp-content/uploads/2015/12/Admin-Setup.png)
In the last, we need to change the owner of the installation directory to user "www", then restart apache with service command :
cd /usr/local/www/
chown -R www:www bugzilla
service apache24 restart
Now Bugzilla is installed, you can see it by visiting mybugzilla.me and you will be redirect to the https connection.
Bugzilla home page.
![Bugzilla Home](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Home.png)
Bugzilla admin panel.
![Bugzilla Admin Page](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Admin-Page.png)
### Conclusion ###
Bugzilla is web based application help you to manage the software development. It is written in perl and use MySQL as the database system. Bugzilla used by mozilla, redhat, gnome etc for help their software development. Bugzilla has a lot of features and easy to configure and install.
--------------------------------------------------------------------------------
via: http://linoxide.com/tools/install-bugzilla-apache-ssl-freebsd-10-2/
作者:[Arul][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/arulm/

View File

@ -1,3 +1,5 @@
FSSlc translating
How to block network traffic by country on Linux
================================================================================
As a system admin who maintains production Linux servers, there are circumstances where you need to **selectively block or allow network traffic based on geographic locations**. For example, you are experiencing denial-of-service attacks mostly originating from IP addresses registered with a particular country. You want to block SSH logins from unknown foreign countries for security reasons. Your company has a distribution right to online videos, which requires it to legally stream to particular countries only. You need to prevent any local host from uploading documents to any non-US remote cloud storage due to geo-restriction company policies.
@ -107,4 +109,4 @@ via: http://xmodulo.com/block-network-traffic-by-country-linux.html
[4]:http://xtables-addons.sourceforge.net/
[5]:https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-databases/how-accurate-are-your-geoip2-and-geoip-legacy-databases/
[6]:http://ask.xmodulo.com/add-cron-job-linux.html
[7]:https://en.wikipedia.org/wiki/ISO_3166-1
[7]:https://en.wikipedia.org/wiki/ISO_3166-1

View File

@ -0,0 +1,110 @@
translating by fw8899
What is good stock portfolio management software on Linux
================================================================================
If you are investing in the stock market, you probably understand the importance of a sound portfolio management plan. The goal of portfolio management is to come up with the best investment plan tailored for you, considering your risk tolerance, time horizon and financial goals. Given its importance, no wonder there are no shortage of commercial portfolio management apps and stock market monitoring software, each touting various sophisticated portfolio performance tracking and reporting capabilities.
For those of you Linux aficionados who are looking for a **good open-source portfolio management tool** to manage and track your stock portfolio on Linux, I would highly recommend a Java-based portfolio manager called [JStock][1]. If you are not a big Java fan, you might be turned off by the fact that JStock runs on a heavyweight JVM. At the same time I am sure many people will appreciate the fact that JStock is instantly accessible on every Linux platform with JRE installed. No hoops to jump through to make it work on your Linux environment.
The day is gone when "open-source" means "cheap" or "subpar". Considering that JStock is just a one-man job, JStock is impressively packed with many useful features as a portfolio management tool, and all that credit goes to Yan Cheng Cheok! For example, JStock supports price monitoring via watchlists, multiple portfolios, custom/built-in stock indicators and scanners, support for 27 different stock markets and cross-platform cloud backup/restore. JStock is available on multiple platforms (Linux, OS X, Android and Windows), and you can save and restore your JStock portfolios seamlessly across different platforms via cloud backup/restore.
Sounds pretty neat, huh? Now I am going to show you how to install and use JStock in more detail.
### Install JStock on Linux ###
Since JStock is written in Java, you must [install JRE][2] to run it. Note that JStock requires JRE 1.7 or higher. If your JRE version does not meet this requirement, JStock will fail with the following error.
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/yccheok/jstock/gui/JStock : Unsupported major.minor version 51.0
Once you install JRE on your Linux, download the latest JStock release from the official website, and launch it as follows.
$ wget https://github.com/yccheok/jstock/releases/download/release_1-0-7-13/jstock-1.0.7.13-bin.zip
$ unzip jstock-1.0.7.13-bin.zip
$ cd jstock
$ chmod +x jstock.sh
$ ./jstock.sh
In the rest of the tutorial, let me demonstrate several useful features of JStock.
### Monitor Stock Price Movements via Watchlist ###
On JStock you can monitor stock price movement and automatically get notified by creating one or more watchlists. In each watchlist, you can add multiple stocks you are interested in. Then add your alert thresholds under "Fall Below" and "Rise Above" columns, which correspond to minimum and maximum stock prices you want to set, respectively.
![](https://c2.staticflickr.com/2/1588/23795349969_37f4b0f23c_c.jpg)
For example, if you set minimum/maximum prices of AAPL stock to $102 and $115.50, you will be alerted via desktop notifications if the stock price goes below $102 or moves higher than $115.50 at any time.
You can also enable email alert option, so that you will instead receive email notifications for such price events. To enable email alerts, go to "Options" menu. Under "Alert" tab, turn on "Send message to email(s)" box, and enter your Gmail account. Once you go through Gmail authorization steps, JStock will start sending email alerts to that Gmail account (and optionally CC to any third-party email address).
![](https://c2.staticflickr.com/2/1644/24080560491_3aef056e8d_b.jpg)
### Manage Multiple Portfolios ###
JStock allows you to manage multiple portfolios. This feature is useful if you are using multiple stock brokers. You can create a separate portfolio for each broker and manage your buy/sell/dividend transactions on a per-broker basis. You can switch different portfolios by choosing a particular portfolio under "Portfolio" menu. The following screenshot shows a hypothetical portfolio.
![](https://c2.staticflickr.com/2/1646/23536385433_df6c036c9a_c.jpg)
Optionally you can enable broker fee option, so that you can enter any broker fees, stamp duty and clearing fees for each buy/sell transaction. If you are lazy, you can enable fee auto-calculation and enter fee schedules for each brokering firm from the option menu beforehand. Then JStock will automatically calculate and enter fees when you add transactions to your portfolio.
![](https://c2.staticflickr.com/2/1653/24055085262_0e315c3691_b.jpg)
### Screen Stocks with Built-in/Custom Indicators ###
If you are doing any technical analysis on stocks, you may want to screen stocks based on various criteria (so-called "stock indicators"). For stock screening, JStock offers several [pre-built technical indicators][3] that capture upward/downward/reversal trends of individual stocks. The following is a list of available indicators.
- Moving Average Convergence Divergence (MACD)
- Relative Strength Index (RSI)
- Money Flow Index (MFI)
- Commodity Channel Index (CCI)
- Doji
- Golden Cross, Death Cross
- Top Gainers/Losers
To install any pre-built indicator, go to "Stock Indicator Editor" tab on JStock. Then click on "Install" button in the right-side panel. Choose "Install from JStock server" option, and then install any indicator(s) you want.
![](https://c2.staticflickr.com/2/1476/23867534660_b6a9c95a06_c.jpg)
Once one or more indicators are installed, you can scan stocks using them. Go to "Stock Indicator Scanner" tab, click on "Scan" button at the bottom, and choose any indicator.
![](https://c2.staticflickr.com/2/1653/24137054996_e8fcd10393_c.jpg)
Once you select the stocks to scan (e.g., NYSE, NASDAQ), JStock will perform scan, and show a list of stocks captured by the indicator.
![](https://c2.staticflickr.com/2/1446/23795349889_0f1aeef608_c.jpg)
Besides pre-built indicators, you can also define custom indicator(s) on your own with a GUI-based indicator editor. The following example screens for stocks whose current price is less than or equal to its 60-day average price.
![](https://c2.staticflickr.com/2/1605/24080560431_3d26eac6b5_c.jpg)
### Cloud Backup and Restore between Linux and Android JStock ###
Another nice feature of JStock is cloud backup and restore. JStock allows you to save and restore your portfolios/watchlists via Google Drive, and this features works seamlessly across different platforms (e.g., Linux and Android). For example, if you saved your JStock portfolios to Google Drive on Android, you can restore them on Linux version of JStock.
![](https://c2.staticflickr.com/2/1537/24163165565_bb47e04d6c_c.jpg)
![](https://c2.staticflickr.com/2/1556/23536385333_9ed1a75d72_c.jpg)
If you don't see your portfolios/watchlists after restoring from Google Drive, make sure that your country is correctly set under "Country" menu.
JStock Android free version is available from [Google Play store][4]. You will need to upgrade to premium version for one-time payment if you want to use its full features (e.g., cloud backup, alerts, charts). I think the premium version is definitely worth it.
![](https://c2.staticflickr.com/2/1687/23867534720_18b917028c_c.jpg)
As a final note, I should mention that its creator, Yan Cheng Cheok, is pretty active in JStock development, and quite responsive in addressing any bugs. Kudos to him!
What do you think of JStock as portfolio tracking software?
--------------------------------------------------------------------------------
via: http://xmodulo.com/stock-portfolio-management-software-linux.html
作者:[Dan Nanni][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/nanni
[1]:http://jstock.org/
[2]:http://ask.xmodulo.com/install-java-runtime-linux.html
[3]:http://jstock.org/ma_indicator.html
[4]:https://play.google.com/store/apps/details?id=org.yccheok.jstock.gui

View File

@ -1,106 +0,0 @@
translating by fw8899
How to Setup SSH Login Without Password CentOS / RHEL
================================================================================
![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg)
As a system administrator, you plan on using OpenSSH for Linux and automate your daily tasks such as transferring files or database dump file for the backup to another server. To achieve this goal, you need to log in automatically from the host A to host B. Login automatically mean you do not want to enter any password because you want to use ssh from a shell script.
In this article well show you how to Setup SSH Login without Password on CentOS / RHEL. After automatic login has been configured, you can use it to move the file using SSH (Secure Shell) and secure copy (SCP).
SSH is open source and the most trusted network protocol which is used to login to the remote server. It is used by system administrators to execute commands, also used to transfer files from one computer to another over a network using SCP protocol.
After you setup SSH login without password, you can get the following advantages :
a) Automate your daily task via scripts.
b) Enhance security of your linux server. This is one of the recommended method to prevent a brute force attack on virtual private server (VPS), SSH keys are nearly impossible to decipher by brute force alone.
### What is ssh-keygen ###
ssh-keygen is a Unix utility that is used to generate, create, manage the public and private keys for ssh authentication. With the help of the ssh-keygen tool, a user can create passphrase keys for both SSH protocol version 1 and version 2. ssh-keygen creates RSA keys for SSH protocol version 1 and RSA or DSA keys for use by SSH protocol version 2.
### What is ssh-copy-id ###
ssh-copy-id is a script that copies the local-hosts public key to the remote-hosts authorized_keys file. ssh-copy-id also append the indicated identity file to that machines ~/.ssh/authorized_keys file and assigns proper permission to the remote-hosts home.
### SSH keys ###
SSH keys provide better and secure way of logging into a linux server with SSH. After you run ssh-keygen, you will generate public key and private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password.
### Setup SSH Login Without Password on CentOS and RHEL. ###
This steps tested on CentOS 5/6/7, RHEL 5/6/7 and Oracle Linux 6/7.
Node1 : 192.168.0.9
Node2 : 192.168.l.10
#### Step One : ####
Test the connection and access from node1 to node2 :
[root@node1 ~]# ssh root@192.168.0.10
The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established.
RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts.
root@192.168.0.10's password:
Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1
[root@node2 ~]#
#### Step Two : ####
Generate public and private keys using ssh-key-gen. Please take note that you can increase security by protecting the private key with a passphrase.
[root@node1 ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local
The key's randomart image is:
+--[ RSA 2048]----+
| . ++ |
| o o o |
| o o o . |
| . o + .. |
| S . . |
| . .. .|
| o E oo.o |
| = ooo. |
| . o.o. |
+-----------------+
#### Step Three : ####
Copy or transfer the public key to remote-host using ssh-copy-id command. It will append the indicated identity file to ~/.ssh/authorized_keys on node2 :
[root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10
root@192.168.0.10's password:
Now try logging into the machine, with "ssh '192.168.0.10'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
#### Step Four : ####
Try SSH login without Password to node2 :
[root@node1 ~]# ssh root@192.168.0.10
Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local
I hope this article gives you some ideas and quick guide on how to setup SSH login without password on Linux CentOS / RHEL.
--------------------------------------------------------------------------------
via: http://www.ehowstuff.com/ssh-login-without-password-centos/
作者:[skytech][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.ehowstuff.com/author/skytech/

View File

@ -0,0 +1,75 @@
GHLandy Translated
开源代码开发的十四点教学技巧
================================================================================
对于培养和塑造开源代码开发者,学术界就是一个很好的平台。研究中发现,我们偶尔会开源自己编写的软件。这样做有两个理由,一是为了提升自己编写的工具的使用率,二是为了了解人们使用这些工具时会遇到哪些问题。在这样一个编写研究软件的背景下,我的任务就是为 Bradford 大学重新设计二年级的软件工程课程。
这是一个巨大的挑战,因为我所面对的 80 个学生是来自不同专业的,包括 IT、商务计算和软件工程这些学生将要在一起上课。最有难度的是需要和这些编程经验差距很大的学生一起编写代码。按照传统该课程允许学生选择自己的小组然后布置他们构建一个存储数据库系统构的任务最后提交报告作为评估的一部分。
而我决定重新设计课程,让学生了解现实中的软件团队是如何协作的过程。根据学生的专业和编程技能,我将他们分为五六个人一组。这是为了确保每个小组的整体水平相当,避免小组之间的不公平。
### 核心课程 ###
课程的形式升级为文化课和实践课两项结合在一起。然而实践部分只是充当辅助,主要是老师监督各个小组的实践进度以及他们如何处理客户和产品之间的关系。传统的教学方式由项目管理、软件测试、工程需求分析以及类似主题的讲座组成,再辅以实践和导师会议。这些会议可以很好的考核学生的水平以及检测出他们是否可以跟得上我们在讲座部分中的软件工程方法。本年的教学主题包括以下内容:
- 工程需求分析
- 如何与客户及其他团队成员互动
- 程序设计方法,如敏捷和极限编程方法
- 如何通过学习不同的软件工程方法进行短期的水平提高
- 小组会议及文档编写
- 项目管理及项目进展图表
- UML 图表及系统描述
- 使用 Git 来进行代码的版本控制
- 软件测试及 BUG 跟踪
- 使用开源库
- 开源代码许可及其选择
- 软件分发
在这些讲座之后,我会有一些来自世界各地的嘉宾为我们说说他们在软件分发过程中的经验。我们也设法请来大学里知识产权律师谈关于软件在英国的知识产权问题,以及如何处理软件的知识产权问题。
### 协作工具 ###
为了让上述教学内容的顺利进行,我们将会介绍一些工具,并训练学生在他们的项目中使用这些工具。如下:
- Google Drive团队与导师之间进行共享的工具暂时存储用于描述项目的文档和图表、需求收集、会议纪要以及项目跟踪等信息。采取这样一个方式来监控并提供直接反馈到每个团队是非常有效的。
- [Basecamp][1]:同样是用于分享文档,在随后的课程中,我们可能会考虑用它取代 Google Drive。
- BUG 报告工具,如 [Mantis][2]:只能让有限的用户自由提交 BUG。稍后我们提到的 Git 可以让小组内的所有人员用做 BUG 提交。
- 远程视频会议工具:在人员不在校内,甚至去了其他城市的情况下使用。学生们可以定期通过 Skype 来交流并记录会议内容或则进行录音作为今后其他用处。
- 同时,学生们的项目中还会用到大量的开源工具包。他们可以根据自己小组的项目需求来选择自己使用的工具包和编程语言。唯一的条件是,这些项目必须开源,最后成果可以安装到大学里的实验室,并且大多的研究人员都支持这个条件。
- 最后,所有团队必须向客户交付他们的项目,包括完整的工作版本的软件、文档和他们自己选择的开放源码许可。大多数的团队选择了 GPLv3 许可证。
### 技巧和经验教训 ###
在最后,这一年过的很愉快,并且所有学生的项目都做的非常棒。这里有一些我学到的经验教训,可能有助于提高明年的课程质量:
1. 提供各种各样的有趣的选择项目给学生选择。比如说,游戏开发或者移动应用开发以及完成各种目标的项目等。建立普通的数据库系统已经不能提起学生的兴趣了,而参与到有趣的项目中去,学生本身就是自学者,同时可以帮助解决小组成员和小组之间的常见问题。再通过一个消息列表,学生们发表他们在测试中遇到的任何问题,以寻求其他人的帮助建议。然而,这种方法有一个缺点。外部考官建议我们使用统一种类型的项目和统一的编程语言以帮助缩小对学生的评估标准。
2. 定期给学生在每一个阶段的表现进行反馈。比方说,可以在和各个小组开指导会议的时候、或者每个阶段进行反馈,以帮助他在接下来的工作中自我改进。
3. 学生更加愿意与校外的客户一起协作。他们期待着与外部公司代表或大学以外的人协作,不过是为了获得新体验而已。与导师进行交流时,他们都能够表现得很专业,这样使得老师非常放心。
4. 很多团队版开发单元测试的部分放到项目结束之后,从极限编程方法的角度来说,这是一个严重的禁忌。也许测试应包括在不同阶段的评估中,来提醒他们需要与并行开展软件开发和单元测试。
5. 在这个班的 80 个人里边,仅有 4 个女生,每个女都分在不同的小组里边。我观察到,男生们总是准备充分地承担起领队角色,并将最有趣的代码分配个他们自己来编写,女生则多大遵循安排或则是编写文档。出于某种原因,女生选择不显示权威,即使在女性辅导员鼓励下,她们也不愿编写代码。这仍然是一个需要解决的主要问题。
6.允许不同风格文项目文档比方说UML 图表、状态图或其他形式的。让学生学习这些并与其他课程融汇贯通来提高他们的学习经验。
7. 学生里边,有些是很好的开发人员,有些做商务计算的则没有多少编程经验。我们要鼓励团队共同努力,避免开发人员做得比那些只做会议记录或文档的其他成员更好的错误认知。我们常在辅导课程中鼓励角色转换,让每个人都有机会学习如何编程。
8. 各个小组进行导师会议室非常重要的,可以有效监督各个小组进展情况,还可以了解是谁做了大部分工作。通常,没来参加会议的小组成员基本就是没有参与到他们的团队工作中去的,并且通过其他成员提交的工作报告也可以确定哪些人不活跃。
9. 我们鼓励学生们把许可证附加到项目中去,使用外部库以及和客户协作的时候要表明确切知识产权问题。 这样可让解放学生的思考能力,了解真实的软件交付问题。
10. 给学生们自己选择技术空间。
11. 助教是关键。同时管理 80 个显示显然很有难度,特别是需要对他们进行评估的那几周。明年我一定会找个助教来帮我一起管理各个小组。
12. 实验室的技术支持是非常重要的。大学里的技术支持对于本课程是非常赞同的。学习正在考虑明年将虚拟机分配给每个团队,这样没个团队可以根据需要自行在虚拟机中安装任何软件。
13. 团队合作,相互帮助。大多数团队自然而然的支持其他团队成员,同时指导人在中间也帮助了不少。
14. 来自其他技术人员的帮助只能作为辅助方法。作为一个新的学术,我需要从经验中学习,同时当我如何知道学生是,我会通过多个角度来建议学生和小组去尝试处理问。来自高级技术人员的支持对我来说就是一种鼓励。
最后,对于作为导师的我以及所有的学生来说,这都是个有趣的课程。在学习目标和传统的分级方案上还有有一些问题需,以解决减少教师的工作量。明年,我计划会保留这种教学模式,并希望能够提出更好的分级方案以及介绍更多的软件来帮助监督项目和控制代码版本。
--------------------------------------------------------------------------------
via: http://opensource.com/education/15/9/teaching-open-source-development-undergraduates
作者:[Mariam Kiran][a]
译者:[GHLandy](https://github.com/GHLandy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://opensource.com/users/mariamkiran
[1]:https://basecamp.com/
[2]:https://www.mantisbt.org/

View File

@ -0,0 +1,169 @@
GHLandy Translated
GIMP 过去的 20 年:一点一滴的进步
================================================================================
youtube 视频
<iframe width="660" height="371" frameborder="0" allowfullscreen="" src="https://www.youtube.com/embed/PSJAzJ6mkVw?feature=oembed"></iframe>
[GIMP][1]GNU 图像处理程序)—— 一流的开源免费图像处理程序。加州大学伯克利分校的 Peter Mattis 和 Spencer Kimball 最早在 1995 年的时候就进行了该程序的开发。到了 1997 年,该程序成为了 [GNU Project][2] 官方的一部分,并正式更名为 GIMP。时至今日GIMP 已经成为了最好的图像编辑器之一,并有最受欢迎的 “GIMP vs Photoshop” 之争。
1995 年 11 月 21 日,首版发布:
> 发布者: Peter Mattis
>
> 发布主题: ANNOUNCE: The GIMP
>
> 日期: 1995-11-21
>
> 消息ID: <48s543$r7b@agate.berkeley.edu>
>
> 新闻组: comp.os.linux.development.apps,comp.os.linux.misc,comp.windows.x.apps
>
> GIMP通用图像处理程序
> ------------------------------------------------
>
> GIMP 是为各种图像编辑操作提供一个直观的图形界面而设计的。
>
> 以下是 GIMP 的主要功能介绍:
>
> 图像查看
> -------------
>
> * 支持 8 位15 位16 位和 24 位颜色
> * 8 位色显示的图像序列的稳定算法
> * 以 RGB 色、灰度和索引色模式查看图像
> * 同时编辑多个图像
> * 实时缩放和全图查看
> * 支持 GIF、JPEG、PNG、TIFF 和 XPM 格式
>
> 图像编辑
> -------------
>
> * 选区工具:包括矩形、椭圆、自由、模糊、贝尔赛曲线以及智能
> * 变换工具:包括旋转、缩放、剪切和翻转
> * 绘画工具:包括油漆桶、笔刷、喷枪、克隆、卷积、混合和文本
> * 效果滤镜:如模糊和边缘检测
> * 通道和颜色操作:叠加、反相和分解
> * 组件功能:允许你方便的添加新的文件格式和效果滤镜
> * 多步撤销/重做功能
1996 年GIMP 0.54 版
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/054.png)
GIMP 0.54 版需要具备 X11 显示、X-server 以及 Motif 1.2 微件,支持 8 位、15 位、16 位和 24 位的颜色深度和灰度,支持 GIF、JPEG、PNG、TIFF 和 XPM 图像格式。
基本功能:具备矩形、椭圆、自由、模糊、贝塞尔曲线和智能等选择工具,旋转、缩放、剪切、克隆、混合和翻转等变换工具。
扩展工具:文字添加、效果滤镜、通道和颜色操纵工具、撤销/重做功能。由于第一个版本支持组件扩展,才方便添加这些功能。
GIMP 0.54 版可以在 Linux、HP-UX、Solaris 和 SGI IRIX 中运行。
### 1997 年GIMP 0.60 版 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/060.gif)
这只是一个开发版本并非面向用户发布的。GIMP 有了新的工具包——GDKGIMP Drawing KitGIMP 绘图工具)和 GTKGIMP ToolkitGIMP 工具包),并弃用 Motif。GIMP 工具包随后也发展成为了 GTK+ 跨平台的微件工具包。新特性:
- 基本的图层功能
- 子像素采集
- 笔刷间距
- 改进剂喷枪功能
- 绘制模式
### 1997 年GIMP 0.99 版 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/099.png)
从 0.99 版本开始GIMP 有了宏脚本的支持。GTK 及 GTK 功能增强版正式更名为 GTK+。其他更新:
- 支持大体积图像(大于 100M
- 新增原生格式 XCF
- 新的 API 使得更加容易编写组件和扩展
### 1998 年GIMP 1.0 版 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/100.gif)
GIMP 和 GTK+ 开始分为两个不同的项目。GIMP 官网进行重构,包含新教程、组件和文档。新特性:
- 基于瓦片式的内存管理
- 组件 API 做了较大改变
- XFC 格式现在支持图层、导航和选择
- web 界面
- 在线图像生成
### 2000 年GIMP 1.2 版 ###
新特性:
- 进行了非英文语言翻译
- 修复 GTK+ 和 GIMP 中的大量bug
- 增加大量组件
- 图像映射
- 新工具:调整大小、测量、加亮、燃烧效果、颜色吸管和翻转等。
- 图像管道
- 保存前可以进行图像预览
- 按比例缩放的笔刷进行预览
- 通过路径进行递归选择
- 新的窗口导航
- 支持图像拖拽
- 支持水印
### 2004 年GIMP 2.0 版 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/200.png)
重大更新 更新 GTK+ 2.x toolkit.
### 2004 年GIMP 2.2 版 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/220.png)
修复大量 Bug 并支持图像拖拽
### 2007 年GIMP 2.4 版 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/240.png)
新特性:
- 更好的图像拖拽体验
- 使用新的脚本解释器 Script-Fu 替代了 旧的 Ti-Fu
- 新组件:影印效果、光晕效果、霓虹灯效果、卡通效果、小狗笔刷、水珠笔刷以及其他组件
### 2008 年GIMP 2.6 版 ###
新特性:
- 更新了图形界面
- 新的选择工具
- 继承了 GEGL GEneric Graphics Library通用图形库
- 为 MDI 行为实现了实用程序窗口提示
### 2012 年GIMP 2.8 版 ###
![](https://github.com/paulcarroty/Articles/raw/master/GIMP%20History/280.png)
新特性:
- GUI 在视觉上做了一些改变
- 新的保存和导出菜单
- 更新文本框工具
- 支持图层群组
- 支持 JPEG2000 和导出为 pdf
- 网页截图工具
--------------------------------------------------------------------------------
via: https://tlhp.cf/20-years-of-gimp-evolution/
作者:[Pavlo Rudyi][a]
译者:[GHLandy](https://github.com/GHLandy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://tlhp.cf/author/paul/
[1]:https://gimp.org/
[2]:http://www.gnu.org/

View File

@ -0,0 +1,78 @@
GHLandy Translated
LibreOffice 中的六大实用扩展组件
================================================================================
![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/yearbook2015-osdc-lead-2.png)
图片来源Opensource.com
LibreOffice 是最好的免费办公套件,并在所有的主要 Linux 发行版中得到应用。尽管 LibreOffice 已经拥有了大多数特性,它仍然可以添加特定的附加组件,即扩展。
LibreOffice 的扩展组件的网站是 [extensions.libreoffice.org][1]。扩展组件只是一些工具,可以在安装主体上进行独立添加或者移除,以便增加新功能或者让已有功能更容易使用。
### 1. 多格式保存组件 ###
多格式保存组件可以根据用户的设置,同时将文档保存为开源文档、微软 Office 文档或者 PDF 文档。在你将微软 Office 文档格式转为标准的[开源文档格式][2]的时候,这个组件就很实用了,因为该组件同时提供了两种选择:互操作性较强的 ODF 文档格式以及为所有用户让在实用的微软 Office 文档格式保持兼容性。这样使管理员的文档迁移过程变得更具弹性、更易于管理。
**[下载 多格式保存组件][3]**
![Multiformatsave extension](https://opensource.com/sites/default/files/images/business-uploads/multiformatsave.png)
### 2. Writer 中可交替使用的查找与替换组件(交替搜索) ###
该组件向 Writer 中的查找与替换功能添加了许多新特性:可以查找和替换一段或多段文本;一次执行在多个查找和替换;搜索:书签、笔记、文本字段、交叉引用和参考标志内容、名称或标志及其插入;搜索和插入脚注和尾注;通过名称来搜索表格对象、图像和文本框;搜索帮助手册页的分栏符以及创建和失活时间;根据光标位置搜索相同格式的文本。还可以保存/加载查找和替换参数,并在多个同时打开的文件中执行批处理。
**[下载 Writer 中可交替使用的查找与替换组件(交替搜索)][4]**
![Alternative Find&amp;amp;Replace add-on](https://opensource.com/sites/default/files/images/business-uploads/alternativefindreplace.png)
### 3. Pepito 清除组件 ###
中 LibreOffice 中, Pepito 清除组件主要用来快速清除并修复旧扫描件、导入的 PDF 以及每个电子文本文档的格式错误。通过点击 LibreOffice 工具栏中的 Pepito 图标,用户可以打开一个用于分析文档并呈现文档错误类型。当你将 PDF 文档转换为 ODF 文档时,这个工具就非常有用了,它会自动清除转换过程中出现的错误。
**[下载 Pepito 清除组件][5]**
![Pepito cleaner screenshot](https://opensource.com/sites/default/files/images/business-uploads/pepitocleaner.png)
### 4. ImpressRunner 组件###
Impress Runner 是将 [Impress][6] 文档转换成自动播放文件的扩展组件。该组件会添加两个图标,用以设置或移除自动开始播放的功能,我们还可以通过编辑 文件 | 属性 | 自定义属性 菜单来手动添加这两个图标,并将自动运行按钮添加到四个文本域之前。在会议与活动组织而且幻灯片无人主持的时候,这个扩展组件就变得非常有用。
**[下载 ImpressRunner 组件][7]**
### 5. 导出为图像组件 ###
导出为图像组件是 Impress 和 [Draw][8] 中文件菜单里边的一个入口——导出为图像...,,主要用于将所有的幻灯片和页面导出成 JPG、PNG、GIF、BMP 和 TIFF 等图像格式,并且允许用户自定义导出图像的名称、大小以及其他参数。
**[下载 导出为图像组件][9]**
![Export as images extension](https://opensource.com/sites/default/files/images/business-uploads/exportasimages.png)
### 6. Anaphraseus 组件###
Anaphraseus 是一个 CATComputer-Aided Translation计算机辅助翻译工具组件用来创建、管理双语翻译。Anaphraseus 是一个设置成扩展组件或者独立文档的 LibreOffice 宏。最开始,开发者设计 Anaphraseus 为快速翻译Wordfast格式但现在它可以将文件导入或者到出成 TMX 格式。其主要特性:分本分割、在翻译记录中模糊搜索、术语识别以及导入导出 TMXOmegaT translation memory formatOmegaT 翻译存储格式)。
**[下载 Anaphraseus 组件][10]**
![Anaphraseus screenshot](https://opensource.com/sites/default/files/images/business-uploads/anaphraseus.png)
你是否也有自己喜欢和推荐的 LibreOffice 组件呢?在评论中告诉大家吧。
--------------------------------------------------------------------------------
via: https://opensource.com/business/15/12/6-useful-libreoffice-extensions
作者:[Italo Vignoli][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/italovignoli
[1]:http://extensions.libreoffice.org/
[2]:http://www.opendocumentformat.org/
[3]:http://extensions.libreoffice.org/extension-center/multisave-1
[4]:http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer
[5]:http://pepitoweb.altervista.org/pepito_cleaner/index.php
[6]:https://www.libreoffice.org/discover/impress/
[7]:http://extensions.libreoffice.org/extension-center/impressrunner
[8]:https://www.libreoffice.org/discover/draw/
[9]:http://extensions.libreoffice.org/extension-center/export-as-images
[10]:http://anaphraseus.sourceforge.net/

View File

@ -1,61 +0,0 @@
DFileManager:文件流文件管理器
================================================================================
一个像宝石一样的文件管理器从Ubuntu标准库中缺失但是有器自己的独特的特色。DFileManager是一个推特一样的产品
一个很棘手的问题是如何知道有多少个Linux开源软件可以被使用。出于好奇你可以在Shell里输入如下命令
~$ for f in /var/lib/apt/lists/*Packages; do printf %5d %s\n $(grep ^Package: “$f” | wc -l) ${f##*/} done | sort -rn
在我的Ubuntu15.04系统上,会产生如下结果
![Ubuntu 15.04 Packages](http://www.linuxlinks.com/portal/content/reviews/FileManagers/UbuntuPackages.png)
正如上面的截图所示在所有的库中大约有39000个包在主库中有8500个包。这听起来很少.但是这些自助形式的开源软件、组件、支持库有很多不是由Ubuntu开发者打包的。重要的是有很多重要的组件不在库中只能通过源代码编译。DFileManager就是这样一个组件。他是仍处在早期阶段的一个QT跨平台文件管理器.QT提供单一源码的跨平台可移植性。
在缺失二进制文件的包里,用户需要编译源代码。对于一些工具来说,这个可能会产生很大的问题,特别是如果这个应用依赖于任何一个含糊不清的依赖库,或者某个没有被编译在系统中的特殊软件版本。
### 安装 ###
幸运的是DFileManager非常容易编译。对于我的老Ubutnu来说这个在开发者网站上的安装介绍提供了大部分的重要步骤不过少量的基础包没有在上面为什么总是这样虽然支持库会让文件系统变得一团糟。在我的系统上为了做好准备从github上下载源代码并且编译这个软件我在Shell里输入了以下命令
~$ sudo apt-get install qt5-default qt5-qmake libqt5x11extras5-dev
~$ git clone git://git.code.sf.net/p/dfilemanager/code dfilemanager-code
~$ cd dfilemananger-code
~$ mkdir build
~$ cd build
~$ cmake ../ -DCMAKE_INSTALL_PREFIX=/usr
~$ make
~$ sudo make install
你可以通过在shell中输入如下命令来启动它
~$ dfm
下面是在最吸引人的操作界面下操作的DFileManager文件流视图.这提供了一个拥有相当有吸引力的体验的滑动当前文件夹下的文件的能力。这是看图片的理想选择。这个文件管理器酷似Finder(Macintosh 操作系统下的默认文件管理器),可能会对你有吸引力。
![DFileManager in action](http://www.linuxlinks.com/portal/content/reviews/FileManagers/Screenshot-dfm.png)
### 特点: ###
- 4种视图图标、详请、列和文件流
- 通过位置和设备归类书签
- 标签页
- 简单的搜索和过滤
- 自定义文件类型的缩略图,包括多媒体文件
- 可以移动的信息栏
- 单击打开文件和目录
- 控制队列IO操作
- 记住每个文件夹的视图属性
- 显示隐藏文件
DFileManager 不是KDE 的Dolphin,但是能做相同的事情。这个是一个真正能够帮助人们的浏览文件的文件管理器。还有,别忘了反馈信息给开发者,任何人都可以做出这样的贡献
--------------------------------------------------------------------------------
via: http://gofk.tumblr.com/post/131014089537/dfilemanager-cover-flow-file-manager-a-real-gem
作者:[gofk][a]
译者:[bestony](https://github.com/bestony)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://gofk.tumblr.com/

View File

@ -1,134 +0,0 @@
如何在Ubuntu 14/15上配置Apache Solr
================================================================================
大家好,欢迎来阅读我们今天Apache Solr的文章。Apache Solr是一个最有名的开源搜索平台基于在网站后端运行的Apache Lucene能够让你轻松创建搜索引擎来搜索网站、数据库和文件。它能够索引和搜索多个网站并根据搜索文本的相关内容返回搜索建议.
Solr工作在可扩展标记语言(XML),并可以为JSON、Python和Ruby提供应用程序接口(APIs)。根据Apache Lucene项目Solr提供了非常多的功能让它很受管理员们的欢迎
- 全文检索
- 分面导航
- 拼写建议/自动完成
- 自定义文档排序/排列
#### 前提条件: ####
在一个使用最小化安装包的全新 Ubuntu 14/15 系统上,你仅仅需要少量的准备,就开始安装 Apache Solor.
### 1)System Update 系统更新###
使用一个具有sudo权限的非root用户登录你的Ubuntu服务器这将会在接下来的所有安装和使用Solr的步骤中使用。
登录成功后,使用下面的命令,升级你的系统到最新的更新及补丁
$ sudo apt-get update
### 2) JRE Setup 安装JRE###
要安装Solr首先需要安装JRE(Java Runtime Environment)作为基础环境因为solr和tomcat都是基于Java.所以我们需要安装最新版的Java和配置Java本地环境.
要想安装最新版的Java 8,我们需要通过以下命令安装Python Software Properties工具包
$ sudo apt-get install python-software-properties
完成后配置最新版Java 8的仓库
$ sudo add-apt-repository ppa:webupd8team/java
现在你可以通过以下命令更新包源列表使用wget来安装最新版本的Oracle Java 8然后安装Java。
$ sudo apt-get update
----------
$ sudo apt-get install oracle-java8-installer
在安装和配置Java SE Platform 和 JavaFX 过程中点击'OK'按钮接受 Oracle二进制代码许可协议Oracle Binary Code License Agreement
在安装完成后,运行下面的命令,检查是否安装成功以及查看安装的版本。
kash@solr:~$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
执行结果表明我们已经成功安装了Java并达到安装Solr最基本的要求了接着我们进行下一步。
### 安装Solr###
有两种不同的方式可以在Ubuntu上安装Solr在本文中我们只用最新的源码包来演示源码安装。
要使用源码安装Solr先要从官网 [Web Page][1] 下载最新的可用安装包。复制以下链接,然后使用 'wget'命令来下载。
$ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz
运行下面的命令,将已存档的服务解压到 /bin目录。
$ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2
运行脚本来启动Solr服务这将会先创建一个solr的用户然后将Solr安装成服务。
$ sudo bash ./install_solr_service.sh solr-5.3.1.tgz
![Solr 安装](http://blog.linoxide.com/wp-content/uploads/2015/11/12.png)
使用下面的命令来检查Solr服务的状态。
$ service solr status
![Solr 状态](http://blog.linoxide.com/wp-content/uploads/2015/11/22.png)
### 创建Solr集合: ###
我们现在可以使用Solr用户添加多个集合。就像下图所示的那样我们只需要在命令行中指定集合名称和指定其配置集就可以创建多个集合了。
$ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs"
![创建集合](http://blog.linoxide.com/wp-content/uploads/2015/11/32.png)
我们已经成功的为我们的第一个集合创建了新的内核实例目录,并可以将数据添加到里面。
查看库中的默认模式文件 '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf'
### 使用Solr页面###
可以使用默认的端口8983连接Apache Solr.打开浏览器,输入 http://your_server_ip:8983/solr 或者 http://your-domain.com:8983/solr. 确保你的防火墙允许8983端口.
http://172.25.10.171:8983/solr/
![Web访问Solr](http://blog.linoxide.com/wp-content/uploads/2015/11/42.png)
在Solr的Web控制台左侧菜单点击'Core Admin'按钮你将会看见我们之前使用CLI方式创建的集合。你可以点击'Add Core'按钮来创建新的内核。
![添加核心](http://blog.linoxide.com/wp-content/uploads/2015/11/52.png)
就像下图中所示,你可以选择某个集合和指向文档向里面添加内容或从文档中查询数据。像方框中显示的那样添加指定格式的数据。
{
"number": 1,
"Name": "George Washington",
"birth_year": 1989,
"Starting_Job": 2002,
"End_Job": "2009-04-30",
"Qualification": "Graduation",
"skills": "Linux and Virtualization"
}
添加文件后点击'Submit Document'按钮.
![添加文档](http://blog.linoxide.com/wp-content/uploads/2015/11/62.png)
### 总结###
在Ubuntu上安装成功后你就可以使用Solr WEB接口插入或查询数据。如果你想通过Solr来管理更多的数据和文件可以创建更多的集合。希望你能喜欢这篇文章并且希望它能够帮到你。
--------------------------------------------------------------------------------
via: http://linoxide.com/ubuntu-how-to/configure-apache-solr-ubuntu-14-15/
作者:[Kashif][a]
译者:[taichirain](https://github.com/taichirain)
校对:[Caroline](https://github.com/carolinewuyan)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/kashifs/
[1]:http://lucene.apache.org/solr/

View File

@ -0,0 +1,14 @@
在手机上面运行主线内核
对于自由软件来说其最大的自由之一就是能够用一个更新或修改的版本来替换原始版本的程序。尽管如此数千万使用linux内核作为支持的手机用户却很少能够在他们的手机上运行主线内核即使他们拥有替换内核代码的专业技能。可悲的是我们必须承认目前仍然无法使用到运行主线内核的主流手机。在由Rob Herring主持的2015届内核峰会上与会人员共同探讨了这个问题并进一步谈论了他们应该怎么做才能解决这个问题。
当主持人提问的时候在座的大多数开发人员都表示他们更喜欢在他们的手机上面运行主线内核然而也有少数人持相反的看法。在Project Ara的支持下Rob在这个问题上已经研究了近一年半的时间。但是最新的研究成果并不理想。
Rob表示有太多的树(out-of-tree)代码运行在手机上主线内核只是缺少能使手机正常运行所必须的驱动。每台合格的手机都在运行着100万到300万的树(out-of-tree)代码。几乎所有的这些手机的内核版本都不超过3.1,有一些甚至更加古老。造成这种情况的原因有很多,但是有一点是很清楚的,在手机的世界里,一切都变化的太快以至于内核社区无法跟上它们的步伐。如果真是那样,他问到,我们还担心什么呢?
Tim Bird指出第一台Android手机Nexus1从来没有运行过任何一个主线内核并且以后也不会。它打破了开源的承诺也使得用户不可能做到将一个新的内核放到手机中。从这一点上来说没有任何一款手机支持这种能力。Peter Zijlstra想知道从一台手机到另一台手机到底有多少正发挥作用的被复制的代码。Rob表示迄今为止他已经见到了三个独立开发的热插拔调速器。
Dirk Hohndel提出了很少有人注意到的建议。他说对于世界上的成千上亿万台手机其中大约有百分之27的手机用户关心他们的手机是否运行着主线内核。剩下的用户仅仅只是想让他们的手机正常工作。或许那些关注手机是否在运行主线内核的开发者正在努力去解决这个令人不解的问题。
Chris Mason说那些手机卖家当前正面临着相同类型的问题而这些问题也是那些linux发行版过去所面临过的问题。他们疲于应付大量的无效且重复和能被复制的工作。一旦这些发行版决定将他们的工作重心转入到主线内核而不是让它顺其自然的发展那么问题将会变得好解决的多。解决问题的关键就是去帮助手机制造商们认识到他们可以通过同样的方式获利形成这种认识的关键并不是通过来自用户的压力。这样一来问题就可以解决了。
Grant Likely提出了对于安全问题的担忧这种担忧来自于那些不能升级他们的手机系统的android设备。他说我们需要的是一个真正专为手机设立的发行市场。但是只要手机卖家仍然掌控着手机中的应用软件那么手机的同步更新将无法实现。我们接下来将面临一个很大的安全难题。Peter补充说随着Stagefright漏洞的出现难题已经出现在我们面前了。
Ted Ts'o说运行主线内核并不是他的主要关注点。他很乐于见到这个假期中所售卖的手机能够运行3.18或者4.1的内核而不是继续停留在3.10。他认为这是一个更可能被解决的问题。Steve Rostedt认为按照Ted Ts'o所说的那样去做并不能解决手机的安全问题但是Ted认为使用一个更新的内核至少可以让漏洞修复变得更加容易。Grant对此回应说接下来的一年里这一切都将再次发生。过渡到更新的内核也是一个渐进式的对系统的完善。Kees Cook补充说我们无法从修复旧版本的内核漏洞的过程中得到太多的益处真正的问题是我们没有对bug的应对措施。
Rob说任何一种解决方案都需要得到当前的手机供应商的支持。否则由于厂商对应用到他们生产的手机上的操作系统的封锁运行主线内核的策略将会陷入麻烦。Paolo Bonzini提问说是否可以因为那些没有修复的安全漏洞而控告手机厂商尤其当手机仍然处于保修期内。Grant认为对于手机的可更新能力的保证必须来源于市场需求否则是无法实现的。而促使它实现的原因可能会是一个严重的安全问题然后用户开始对手机的可更新能力提出要求。同时内核开发人员必须不断朝着这个方向努力。Rob表示除了到目前为止指出的所有优点之外运行主线内核也能帮助开发者对安卓设备上的新特性进行测试和验证。
Josh Triplett提问说如果手机产商提出对主线内核提供支持的想法那么内核社区又将采取什么措施呢那样将会针对手机各方面的特性要求对内核进行大量的测试和验证Android的兼容性测试套件中出现的失败将不得不被再次回归。Rob提议这个问题将会在明年被讨论即先将最基本的功能做好。但是Josh强调说如果这个需求出现了我们就应该能够给出一个好的答案。
Tim认为当前我们和厂商之间存在很大的脱节。厂商根本不会主动报告或者贡献任何反馈给社区。他们之间完全脱节了这样的话永远不会有进步。Josh表示当厂商们报告他们正在使用的旧内核的相关bug时双方之间的接受度将变得更加友好。Arnd Bergmann认为我们需要的是得到一个大芯片厂商对使用主线内核的认可并且将该厂商的硬件提升到能够支持主线内核的运行的这样一个水平而这样将会在其他方面增加负担。但是他补充说实现这个目标要求存在一个跟随硬件一起分发的自由GPU驱动程序——然而这种程序当前并不存在。
Rob给存在问题的领域列了一个清单但是现在已经没有太多的时间去讨论其中的细节了。WIFI驱动仍然是一个问题尤其是当新特性被添加到Android设备上的时候。Johannes Berg对新特性仍然存在问题表示赞同android的开发人员甚至在这些新特性被应用到Android设备上之前都不会去谈论它们是否存在问题。然而对这些特性中的大多数的技术支持最终都会落实在主线内核中。
随着会议逐渐接近尾声Ben Herrenschmidt再次重申:实现在andoroid手机上运行主线内核的关键还是在于让厂商认识到使用主线内核是它们获得最大利润的最好选择。从长远看使用主线内核能节省大量的工作。Mark Brown认为以前当搭载在Android设备上的内核版本以更稳定的方式向前推进的时候上游工作的好处对运营商来说更加明显。以现在的情况来看手机上的内核版本似乎停留在了3.10,那种压力是不一样的。这次会话以开发者决定进一步改善当前的状况而结束,但是却并没有对如何改善提出一个明确的计划。

View File

@ -0,0 +1,267 @@
如何在FreeBSD 10.2上配置Apache和SSL并安装Bugzilla
================================================================================
Bugzilla是一款bug跟踪系统和测试工具它基于web且开源由mozilla计划开发并由Mozilla公共许可证授权。它经常被一些高科技公司如mozilla、红帽公司和gnome使用。Bugzilla起初由Terry Weissman在1998年创立它用perl语言编写用MySQL作为后端数据库。它是一款旨在帮助管理软件开发的服务器软件它功能丰富、高优化度的数据库、卓越的安全性、高级的搜索工具、整合邮件功能等等。
在本教程中我们将给web服务器安装bugzilla 5.0的apache并为它启用SSL然后在freebsd 10.2上安装mysql 5.1来作为数据库系统。
#### 准备 ####
FreeBSD 10.2 - 64位
Root权限
### 第一步 - 更新系统 ###
用ssl登录freebsd服务器并更新库
sudo su
freebsd-update fetch
freebsd-update install
### 第二步 - 安装并配置Apache ###
在这一步我们将从freebsd库中用pkg命令安装apache然后在apache24目录下编辑"httpd.conf"文件启用SSL和CGI支持。
用pkg命令安装apache
pkg install apache24
进入apache目录并用nano编辑器编辑"httpd.conf"文件:
cd /usr/local/etc/apache24
nano -c httpd.conf
反注释掉下面列出的行:
#第70行
LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so
#第89行
LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so
#第117行
LoadModule expires_module libexec/apache24/mod_expires.so
#第141行启用SSL
LoadModule ssl_module libexec/apache24/mod_ssl.so
#第162行支持cgi
LoadModule cgi_module libexec/apache24/mod_cgi.so
#第174行启用mod_rewrite
LoadModule rewrite_module libexec/apache24/mod_rewrite.so
#第219行,服务器名配置
ServerName 127.0.0.1:80
保存并退出。
接着我们需要从freebsd库中安装mod perl并启用它
pkg install ap24-mod_perl2
启用mod_perl编辑"httpd.conf"文件并添加"Loadmodule"行:
nano -c httpd.conf
添加该行:
#第175行
LoadModule perl_module libexec/apache24/mod_perl.so
保存并退出。
在启用apache之前用sysrc命令添加以下行来在引导的时候启动
sysrc apache24_enable=yes
service apache24 start
### 第三步 - 安装并配置MySQL数据库 ###
我们要用mysql 5.1来作为后端数据库并且支持perl模块。用pkg命令安装mysql 5.1
pkg install p5-DBD-mysql51 mysql51-server mysql51-client
现在我们要在启动时添加mysql服务并启动然后为mysql配置root密码。
运行以下命令来完成所有操作:
sysrc mysql_enable=yes
service mysql-server start
mysqladmin -u root password aqwe123
注意:
这里mysql密码为aqwe123
![Configure MySQL Password](http://blog.linoxide.com/wp-content/uploads/2015/12/Configure-MySQL-Password.png)
以上步骤都完成之后我们用root登录mysql shell然后为bugzilla安装创建一个新的数据库和用户。
用以下命令登录mysql shell
mysql -u root -p
password: aqwe123
添加数据库:
create database bugzilladb;
create user bugzillauser@localhost identified by 'bugzillauser@';
grant all privileges on bugzilladb.* to bugzillauser@localhost identified by 'bugzillauser@';
flush privileges;
\q
![Creating Database for Bugzilla](http://blog.linoxide.com/wp-content/uploads/2015/12/Creating-Database-for-Bugzilla.png)
bugzilla的数据库创建好了名字为"bugzilladb",用户名和密码分别为"bugzillauser"和"bugzillauser@"。
### 第四步 - 生成新的SSL证书 ###
在bugzilla站点的"ssl"目录里生成新的自签名SSL证书。
前往apache24目录并在此创建新目录"ssl"
cd /usr/local/etc/apache24/
mkdir ssl; cd ssl
接着用openssl命令生成证书文件然后更改其权限
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/apache24/ssl/bugzilla.key -out /usr/local/etc/apache24/ssl/bugzilla.crt
chmod 600 *
### 第五步 - 配置虚拟主机 ###
我们将在"/usr/local/www/bugzilla"目录里安装bugzilla所以我们必须为它创建新的虚拟主机配置。
前往apache目录并为虚拟主机文件创建名为"vhost"的新目录:
cd /usr/local/etc/apache24/
mkdir vhost; cd vhost
现在为虚拟主机文件创建新文件"bugzilla.conf"
nano -c bugzilla.conf
将以下配置粘贴进去:
<VirtualHost *:80>
ServerName mybugzilla.me
ServerAlias www.mybuzilla.me
DocumentRoot /usr/local/www/bugzilla
Redirect permanent / https://mybugzilla.me/
</VirtualHost>
Listen 443
<VirtualHost _default_:443>
ServerName mybugzilla.me
DocumentRoot /usr/local/www/bugzilla
ErrorLog "/var/log/mybugzilla.me-error_log"
CustomLog "/var/log/mybugzilla.me-access_log" common
SSLEngine On
SSLCertificateFile /usr/local/etc/apache24/ssl/bugzilla.crt
SSLCertificateKeyFile /usr/local/etc/apache24/ssl/bugzilla.key
<Directory "/usr/local/www/bugzilla">
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride Limit FileInfo Indexes Options
Require all granted
</Directory>
</VirtualHost>
保存并退出。
上述都完成之后为bugzilla安装创建新目录并通过添加虚拟主机配置至httpd.conf文件来启用bugzilla虚拟主机。
在"apache24"目录下运行以下命令:
mkdir -p /usr/local/www/bugzilla
cd /usr/local/etc/apache24/
nano -c httpd.conf
文末,添加以下配置:
Include etc/apache24/vhost/*.conf
保存并退出。
现在用"apachectl"命令测试一下apache的配置并重启它
apachectl configtest
service apache24 restart
### 第六步 - 安装Bugzilla ###
我们可以通过下载源来手动安装bugzilla了或从freebsd库中安装也可以。在这一步中我们将用pkg命令从freebsd库中安装bugzilla
pkg install bugzilla50
以上步骤都完成之后前往bugzilla安装目录并安装所有bugzilla需要的perl模块。
cd /usr/local/www/bugzilla
./install-module --all
要等到所有都完成,这需要点时间。
下一步在bugzilla的安装目录中执行"checksetup.pl"文件来生成配置文件"localconfig"。
./checksetup.pl
你会看到一条关于数据库配置错误你得用nano编辑器编辑一下"localconfig"文件:
nano -c localconfig
现在添加第三步创建的数据库。
#第五十七行
$db_name = 'bugzilladb';
#第六十行
$db_user = 'bugzillauser';
#第六十七行
$db_pass = 'bugzillauser@';
保存并退出。
然后再次运行"checksetup.pl"
./checksetup.pl
你会收到输入邮箱名和管理员账号的提示,你只要输入你得邮箱、用户名和密码就行了。
![Admin Setup](http://blog.linoxide.com/wp-content/uploads/2015/12/Admin-Setup.png)
最后,我们需要把安装目录的属主改成"www"然后用服务命令重启apache
cd /usr/local/www/
chown -R www:www bugzilla
service apache24 restart
现在Bugzilla已经安装好了你可以通过访问mybugzilla.me来查看并且将会重定向到https连接。
Bugzilla首页
![Bugzilla Home](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Home.png)
Bugzilla admin面板
![Bugzilla Admin Page](http://blog.linoxide.com/wp-content/uploads/2015/12/Bugzilla-Admin-Page.png)
### 结论 ###
Bugzilla是一个基于web并能帮助你管理软件开发的应用它用perl开发并使用MySQL作为数据库系统。Bugzilla被mozilla,redhat,gnome等等公司用来帮助它们的软件开发工作。Bugzilla有很多功能并易于配置和安装。
--------------------------------------------------------------------------------
via: http://linoxide.com/tools/install-bugzilla-apache-ssl-freebsd-10-2/
作者:[Arul][a]
译者:[ZTinoZ](https://github.com/ZTinoZ)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/arulm/

View File

@ -0,0 +1,105 @@
如何在CentOS / RHEL上设置SSH免密码登录
================================================================================
![](http://www.ehowstuff.com/wp-content/uploads/2015/12/notebook-1071774_1280.jpg)
作为系统管理员你计划在Linux上使用OpenSSHell完成日常工作的自动化比如文件传输、备份数据库转储文件到另一台服务器。为实现该目标你需要从主机A能自动登录到主机B。自动登录也就是说要在shell脚本中使用ssh而无需要输入任何密码。
本文会告诉你怎样在CentOS/RHEL上设置SSH免密码登录。自动登录配置好以后你可以在它基础上用SSH (Secure Shell) 和secure copy (SCP)移动文件。
SSH是开源的用于远程登录的最为可靠的网络协议。系统管理员用它来执行命令以及通过SCP协议在网络上向另一台电脑传输文件。
通过配置SSH免密码登录你可以享受到如下的便利
a) 用脚本实现日常工作的自动化。
b) 增强Linux服务器的安全性。这是防范虚拟专用服务器VPS遭受暴力破解攻击的一个推荐的方法SSH 密钥单凭暴力破解是几乎不可攻破的。
### 什么是ssh-keygen ###
ssh-keygen是Unix实用工具包里的一个命令用来生成、创建和管理SSH认证用的公私钥。通过ssh-keygen命令用户可以创建支持SSH1和SSH2的密钥。ssh-keygen为SSH1创建RSA密钥SSH2则可以是RSA或DSA。
### 什么是ssh-copy-id ###
ssh-copy-id是用来将本地公钥拷贝到远程authorized_keys文件的脚本命令它还会将身份标识文件追加到远程机器的~/.ssh/authorized_keys文件中并给远程主机的用户主目录适当的的权限
### SSH keys ###
SSH keys为登录Linux服务器提供了更好且安全的机制。运行ssh-keygen后将会生成公私密钥对。你可以将公钥放置到任意服务器从持有私钥的客户端连接到服务器的时会用它来解锁。两者匹配时系统无需密码就能解除锁定。
### 在CentOS和RHEL上设置免密码登录SSH ###
以下步骤在CentOS 5/6/7、RHEL 5/6/7和Oracle Linux 6/7上测试通过。
节点1 : 192.168.0.9
节点2 : 192.168.l.10
#### 步骤1 : ####
测试节点1到节点2的连接和访问
[root@node1 ~]# ssh root@192.168.0.10
The authenticity of host '192.168.0.10 (192.168.0.10)' can't be established.
RSA key fingerprint is 6d:8f:63:9b:3b:63:e1:72:b3:06:a4:e4:f4:37:21:42.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.10' (RSA) to the list of known hosts.
root@192.168.0.10's password:
Last login: Thu Dec 10 22:04:55 2015 from 192.168.0.1
[root@node2 ~]#
#### 步骤二: ####
使用ssh-key-gen命令生成公钥和私钥这里要注意的是可以对私钥进行加密保护以增强安全性。
[root@node1 ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
b4:51:7e:1e:52:61:cd:fb:b2:98:4b:ad:a1:8b:31:6d root@node1.ehowstuff.local
The key's randomart image is:
+--[ RSA 2048]----+
| . ++ |
| o o o |
| o o o . |
| . o + .. |
| S . . |
| . .. .|
| o E oo.o |
| = ooo. |
| . o.o. |
+-----------------+
#### 步骤三: ####
用ssh-copy-di命令将公钥复制或上传到远程主机并将身份标识文件追加到节点2的~/.ssh/authorized_keys中
[root@node1 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.10
root@192.168.0.10's password:
Now try logging into the machine, with "ssh '192.168.0.10'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
#### 步骤四: ####
验证免密码SSH登录节点2
[root@node1 ~]# ssh root@192.168.0.10
Last login: Sun Dec 13 14:03:20 2015 from www.ehowstuff.local
我希望这篇文章能帮助到你为你提供SSH免密码登录CentOS / RHEL的基本认知和快速指南。
--------------------------------------------------------------------------------
原载: http://www.ehowstuff.com/ssh-login-without-password-centos/
作者:[skytech][a]
译者:[fw8899](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.ehowstuff.com/author/skytech/

View File

@ -0,0 +1,149 @@
Linux系统下使用命令行来查看硬件信息
================================================================================
![](https://maketecheasier-holisticmedia.netdna-ssl.com/assets/uploads/2015/12/hdd_info_featured-1.png)
有许多可用的命令可以用来查看Linux系统上的硬件信息。有些命令只能够打印出像CPU和内存这一特定的硬件组件信息其余的命令可以查看其余硬件单元的信息。
这个教程可以带大家快速学习一下查看各种硬件设备的信息和配置详情的最常用的命令。
### lscpu ###
`lscpu`命令能够查看CPU和处理单元的信息。该命令没有任何其他选项或者别的功能。
lscpu
运行该命令会看到下面输出:
![hdd_info_lscpu](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lscpu.png)
### lspci ###
`lspci`是另一个命令行工具可以用来列出所有的PCI总线还有与PCI总线相连的设备的详细信息比如VGA适配器、显卡、网络适配器、usb端口、SATA控制器等。
lspci
你可以看到类似下图的输出信息。
![hdd_info_lspci](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci-1.png)
可以通过运行下面的命令来过滤出特定设备的信息:
lspci -v | grep "VGA" -A 12
运行上面的命令可以看到类似下图的关于显卡的信息。
![hdd_info_lspci_vga](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lspci_vga.png)
### lshw ###
`lshw`是一个通用的工具可以列出多种硬件单元的详细或者概要的信息比如CPU、内存、usb控制器、硬盘等。`lshw`能够从不同的“/proc”文件中提取出相关的信息。
lshw -short
通过运行上面的命令可以看到下面的信息。
![hdd_info_lshw](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lshw.png)
### lsscsi ###
通过运行下面的命令可以列出像硬盘和光驱等scsi/sata设备的信息
lsscsi
会得到类似下面的输出。
![hdd_info_lsscsi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsscsi-1.png)
### lsusb ###
`lsusb`命令能够列出USB控制器和与USB控制相连的设备的详细信息。默认情况下`lsusb`命令只打印出概要信息。可以通过使用-v参数打印每一个usb端口的详细信息。
lsusb
可以看到下面输出。
![hdd_info_lsusb](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_lsusb.png)
### Inxi ###
`Inxi`是一个bash脚本能够从系统的多个源文件和命令行抓取硬件信息并打印出一个非技术人员也能看懂的友好的报告。
默认情况下Ubuntu上没有安装`inxi`。可以通过运行下面命令来安装`Inxi`
sudo apt-get install inxi
安装完`Inxi`之后,通过运行下面命令能够得到硬件相关的信息:
inxi -Fx
能够得到类似下图的输出。
![hdd_info_inxi](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_inxi.jpg)
### df ###
`df`命令能够列出不同分区的概要信息,挂载点,已用的和可用的空间。
可以在使用`df`命令的时候加上`-H`参数。
df -H
会得到下面的输出。
![hdd_info_df](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_df-1.png)
### Free ###
通过使用`free`命令可以查看系统中使用的、闲置的和总体的RAM数量。
free -m
会看到下面输出。
![hdd_info_free](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_free.png)
### Dmidecode ###
`dmidecode`命令与其他命令不同。该命令是从DMI表中读取硬件信息的。
要查看处理器的信息,运行下面命令:
sudo dmidecode -t processor
![hdd_info_dmi_processor](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_processor.jpg)
要查看内存的信息,运行下面命令:
sudo dmidecode -t memory
![hdd_info_dmi_memory](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_memory.png)
要查看bios的信息运行下面命令
sudo dmidecode -t bios
![hdd_info_dmi_bios](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_dmi_bios.png)
### Hdparm ###
`hdparm`命令可以用来显示想硬盘这样的sata设备的信息。
sudo hdparm
可以看到下面的输出。
![hdd_info_hdparm](https://www.maketecheasier.com/assets/uploads/2015/12/hdd_info_hdparm.png)
### 总结 ###
每个命令都有不同的方式来获取硬件的信息。在查看特定的硬件信息的时候可以尝试使用不同的方式。上面所有的命令行工具在大部分的Linux发型版本中都是可以使用的可以很容易的从仓库中获取安装。
--------------------------------------------------------------------------------
via: https://www.maketecheasier.com/check-hardware-information-linux/
作者:[Hitesh Jethva][a]
译者:[sonofelice](https://github.com/sonofelice)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.maketecheasier.com/author/hiteshjethva/

View File

@ -0,0 +1,297 @@
怎样在ubuntu和debian中用命令行使用KVM
================================================================================
有很多不同的方式去管理运行在KVM管理程序上的虚拟机。例如virt-manager就是一个流行的基于图形用户界面的前端虚拟机管理工具。然而如果你想要在没有图形窗口的服务器环境下使用KVM那么基于图形用户界面的解决方案显然是行不通的。事实上你可以纯粹的使用包装了kvm命令行脚本的命令行来管理KVM虚拟机。作为替代方案你可以使用virsh这个容易使用的命令行用户接口来管理客户虚拟机。在virsh中它通过和libvirtd服务通信来达到控制虚拟机的目的而libvirtd可以控制几个不同的虚拟机管理器包括KVMXenQEMULXC和OpenVZ。
当你想要对虚拟机的前期准备和后期管理实现自动化操作时像virsh这样的命令行管理工具是非常有用的。同样virsh支持多个管理器的事实也意味着你可以通过相同的virsh接口去管理不同的虚拟机管理器。
在这篇文章中,我会示范**怎样在ubuntu和debian上通过使用virsh命令行去运行KVM**。
### 第一步:确认你的硬件平台支持虚拟化 ###
作为第一步首先要确认你的主机CPU配备了硬件虚拟化拓展e.g.Intel VT或者AMD-V)这是KVM对硬件的要求。下面的命令可以检查硬件是否支持虚拟化。
$ egrep '(vmx|svm)' --color /proc/cpuinfo
![](https://c2.staticflickr.com/2/1505/24050288606_758a44c4c6_c.jpg)
如果在输出中不包含vmx或者svm标识那么就意味着你的主机cpu不支持硬件虚拟化。因此你不能在你的机器上使用KVM。确认了主机cpu存在vmx或者svm之后接下来开始安装KVM。
对于KVM来说它不要求运行在拥有64位内核系统的主机上但是通常我们会推荐在64位系统的主机上面运行KVM。
### 第二步安装KVM ###
使用apt-get安装KVM和相关的用户空间工具。
$ sudo apt-get install qemu-kvm libvirt-bin
安装期间libvirtd组在debian上是libvirtd-qemu组将会被创建并且你的用户id将会被自动添加到该组中。这样做的目的是让你可以以一个普通用户而不是root用户的身份去管理虚拟机。你可以使用id命令来确认这一点下面将会告诉你怎么去显示你的组id
$ id <your-userID>
![](https://c2.staticflickr.com/6/5597/15432586092_64dfb867d3_c.jpg)
如果因为某些原因libvirt在debian中是libvirt-qemu没有在你的组id中被找到你也可以手动将你自己添加到对应的组中如下所示
在ubuntu上
$ sudo adduser [youruserID] libvirtd
在debian上
$ sudo adduser [youruserID] libvirt-qemu
按照如下形式重修载入更新后的组成员关系。如果要求输入密码,那么输入你的登陆密码即可。
$ exec su -l $USER
这时你应该可以以普通用户的身份去执行virsh了。做一个如下所示的测试这个命令将会以列表的形式列出可用的虚拟机当前的列表是空的。如果你没有遇到权限问题那意味着迄今为止一切都是正常的。
$ virsh list
----------
Id Name State
----------------------------------------------------
### 第三步:配置桥接网络 ###
为了使KVM虚拟机能够访问外部网络一种方法是通过在KVM宿主机上创建Linux桥来实现。创建之后的桥能够将虚拟机的虚拟网卡和宿主机的物理网卡连接起来因此虚拟机能够发送和接受由物理网卡发送过来的流量数据包。这种方式叫做网桥连接。
下面将告诉你如何创建并且配置网桥我们称它为br0.
首先,安装一个必需的包,然后用命令行创建一个网桥。
$ sudo apt-get install bridge-utils
$ sudo brctl addbr br0
下一步就是配置已经创建好的网桥,即修改位于/etc/network/interfaces的配置文件。我们需要将该桥接网卡设置成开机启动。为了修改该配置文件你需要关闭你的操作系统上的网络管理器如果你在使用它的话。跟随[操作指南][1]的说明去关闭网络管理器。
关闭网络管理器之后,接下来就是通过修改配置文件来配置网桥了。
#auto eth0
#iface eth0 inet dhcp
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
在上面的配置中我假设eth0是主要网卡它也是连接到外网的网卡同样我假设eth0将会通过DHCP得到它的ip地址。注意之前在/etc/network/interfaces中还没有对eth0进行任何配置。桥接网卡br0引用了eth0的配置而eth0也会受到br0的制约。
重启网络服务并确认网桥已经被成功的配置好。如果成功的话br0的ip地址将会是eth0的被自动分配的ip地址而且eth0不会被分配任何ip地址。
$ sudo /etc/init.d/networking restart
$ ifconfig
如果因为某些原因eth0仍然保留了之前分配给了br0的ip地址那么你可能必须明确的删除eth0的ip地址。
![](https://c2.staticflickr.com/2/1698/23780708850_66cd7ba6ea_c.jpg)
###第四步:用命令行创建一个虚拟机 ###
对于虚拟机来说它的配置信息被存储在它对应的xml文件中。因此创建一个虚拟机的第一步就是准备一个与主机名对应的xml文件。
下面是一个示例xml文件你可以根据需要手动修改它。
<domain type='kvm'>
<name>alice</name>
<uuid>f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>1</vcpu>
<os>
<type>hvm</type>
<boot dev='cdrom'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type="file" device="disk">
<driver name="qemu" type="raw"/>
<source file="/home/dev/images/alice.img"/>
<target dev="vda" bus="virtio"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/home/dev/iso/CentOS-6.5-x86_64-minimal.iso"/>
<target dev="hdc" bus="ide"/>
<readonly/>
<address type="drive" controller="0" bus="1" target="0" unit="0"/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<mac address="00:00:A3:B0:56:10"/>
</interface>
<controller type="ide" index="0">
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
</controller>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport="yes" listen='0.0.0.0'/>
<console type='pty'>
<target port='0'/>
</console>
</devices>
</domain>
上面的主机xml配置文件定义了如下的虚拟机内容。
- 1GB内存一个虚拟cpu和一个硬件驱动。
- Disk image/home/dev/images/alice.img。
- Boot from CD-ROM/home/dev/iso/CentOS-6.5-x86_64-minomal.iso
- Networking:一个桥接到br0的虚拟网卡。
- 通过VNC远程访问。
<uuid></uuid>中的UUID字符串可以随机生成。为了得到一个随机的uuid字符串你可能需要使用uuid命令行工具。
$ sudo apt-get install uuid
$ uuid
生成一个主机xml配置文件的方式就是通过一个已经存在的虚拟机来导出它的xml配置文件。如下所示。
$ virsh dumpxml alice > bob.xml
![](https://c2.staticflickr.com/6/5808/23968234602_25e8019ec8_c.jpg)
###第五步:使用命令行启动虚拟机###
在启动虚拟机之前我们需要创建它的初始磁盘镜像。为此你需要使用qemu-img命令来生成一个你已经安装的qemu-kvm镜像。下面的命令将会创建10GB大小的空磁盘并且它是qcow2格式的。
$ qemu-img create -f qcow2 /home/dev/images/alice.img 10G
使用qcow2格式的磁盘镜像的好处就是它在创建之初并不会给它分配全部大小磁盘容量这里是10GB而是随着虚拟机中文件的增加而逐渐增大。因此它对空间的使用更加有效。
现在你可以准备通过使用之前创建的xml配置文件启动你的虚拟机了。下面的命令将会创建一个虚拟机然后自动启动它。
$ virsh create alice.xml
----------
Domain alice created from alice.xml
**注意**:如果你对一个已经存在的虚拟机运行了上面的命令,那么这个操作将会在没有警告信息的情况下抹去那个已经存在的虚拟机的全部信息。如果你已经创建了一个虚拟机,你可能会使用下面的命令来启动虚拟机。
$ virsh start alice.xml
使用如下命令确认一个新的虚拟机已经被创建并成功的被启动。
$ virsh list
----------
Id Name State
----------------------------------------------------
3 alice running
同样使用如下命令确认你的虚拟机的虚拟网卡已经被成功的添加到了你先前创建的br0网桥中。
$ sudo brctl show
![](https://c2.staticflickr.com/2/1546/23449585383_a371e9e579_c.jpg)
### 远程连接虚拟机 ###
为了远程访问一个正在运行的虚拟机的控制台你可以使用VNC客户端。
首先你需要使用如下命令找出用于虚拟机的VNC端口号。
$ sudo netstat -nap | egrep '(kvm|qemu)'
![](https://c2.staticflickr.com/6/5633/23448144274_49045bc868_c.jpg)
在这个例子中用于alice虚拟机的VNC端口号是5900
然后启动一个VNC客户端连接到一个端口号为5900的VNC服务器。在我们的例子中虚拟机支持由CentOS光盘文件启动。
![](https://c2.staticflickr.com/2/1533/24076369675_99408972a4_c.jpg)
### 使用virsh管理虚拟机 ###
下面列出了virsh命令的常规用法
创建客户机并且启动虚拟机:
$ virsh create alice.xml
停止虚拟机并且删除客户机
$ virsh destroy alice
关闭虚拟机(不用删除它)
$ virsh shutdown alice
暂停虚拟机
$ virsh suspend alice
恢复虚拟机
$ virsh resume alice
访问正在运行的虚拟机的登陆控制台
$ virsh console alice
设置虚拟机开机启动:
$ virsh autostart alice
查看虚拟机的详细信息
$ virsh dominfo alice
编辑虚拟机的配置文件:
$ virsh edit alice
上面的这个命令将会使用一个默认的编辑器来调用主机配置文件。该配置文件中的任何改变都将自动被libvirt验证其正确性。
你也可以在一个virsh会话中管理虚拟机。下面的命令会创建并进入到一个virsh会话中
$ virsh
在virsh提示中你可以使用任何virsh命令。
![](https://c2.staticflickr.com/6/5645/23708565129_b1ef968b30_c.jpg)
### 问题处理 ###
1. 我在创建虚拟机的时候遇到了一个错误:
error: internal error: no supported architecture for os type 'hvm'
如果你的硬件不支持虚拟化的话你可能就会遇到这个错误。例如Intel VT或者AMD-V这是运行KVM所必需的。如果你遇到了这个错误而你的cpu支持虚拟化那么这里可以给你一些可用的解决方案
首先,检查你的内核模块是否丢失。
$ lsmod | grep kvm
如果内核模块没有加载,你必须按照如下方式加载它。
$ sudo modprobe kvm_intel (for Intel processor)
$ sudo modprobe kvm_amd (for AMD processor)
第二个解决方案就是添加“--connect qemu:///system”参数到virsh命令中如下所示。当你正在你的硬件平台上使用超过一个虚拟机管理器的时候就需要添加这个参数例如VirtualBoxVMware
$ virsh --connect qemu:///system create alice.xml
2. 当我试着访问我的虚拟机的登陆控制台的时候遇到了错误:
$ virsh console alice
----------
error: internal error: cannot find character device <null>
这个错误发生的原因是你没有在你的虚拟机配置文件中定义控制台设备。在xml文件中加上下面的内部设备部分即可。
<console type='pty'>
<target port='0'/>
</console>
--------------------------------------------------------------------------------
via: http://xmodulo.com/use-kvm-command-line-debian-ubuntu.html
作者:[Dan Nanni][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/nanni
[1]:http://xmodulo.com/disable-network-manager-linux.html

View File

@ -1,25 +1,24 @@
(translating by runningwater)
Grep Count Lines If a String / Word Matches
Grep 命令统计匹配的字符串/单词行数
================================================================================
How do I count lines if given word or string matches for each input file under Linux or UNIX operating systems?
在 Linux 或 UNIX 操作系统下,对于给定的单词或字符串,我们应该怎么统计它们在每个输入文件中存在的行数呢?
You need to pass the -c or --count option to suppress normal output. It will display a count of matching lines for each input file:
您需要通过添加 -c 或者 --count 选项参数来抑制正常的输出。它将会显示对输入文件单词匹配的行数,如下示:
$ grep -c vivek /etc/passwd
OR
或者
$ grep -w -c vivek /etc/passwd
Sample outputs:
输出的示例:
1
However, with the -v or --invert-match option it will count non-matching lines, enter:
相反的,使用 -v 或者 --invert 选项参数可以统计出不匹配的输入文件行数,键入:
$ grep -c vivek /etc/passwd
Sample outputs:
输出的示例:
45