mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge branch 'master' of https://github.com/LCTT/TranslateProject
This commit is contained in:
commit
311f2d9fec
@ -1,12 +1,13 @@
|
||||
每日Ubuntu小技巧-使用Windows共享打印机进行打印
|
||||
===
|
||||
|
||||
对于那些既有Windows电脑又有Ubuntu电脑但却只有一台打印机的用户,这篇博文向你展示如何在Windows中共享一个打印机,并允许Ubuntu使用它来打印。
|
||||
|
||||
几乎所有的打印机都默认支持Windows系统。许多打印机生产商都为Windows生产打印机,但为Linux系统生产的并不多,包括Ubuntu。所以,假如你有一台支持Windows的打印机,你可以在Windows机器上分享它,然后让其它系统来使用它来打印。
|
||||
几乎所有的打印机都默认支持Windows系统。许多打印机生产商都为Windows生产打印机,但为包括Ubuntu在内的Linux系统生产的并不多。所以,假如你有一台支持Windows的打印机,你可以在Windows机器上分享它,然后让其它系统来使用它来打印。
|
||||
|
||||
在几年之前,我遇到了这个问题,那时大多数打印机生产商不支持Linux系统。我有一台老式的只支持Windows和Mac OS X但却不支持Linux的打印机。
|
||||
在几年之前,我遇到了这个问题,那时大多数打印机生产商不支持Linux系统。我有一台老式的只支持Windows和Mac OS X但却不支持Linux的打印机。(译注:除非是特别冷门的打印机,现在一般都可以在Linux进行打印操作了。在译者看来,本文的理由不成立,不过做法成立。)
|
||||
|
||||
我在我的Windows机器上安装了打印机驱动,然后它就可以很好的工作咯。我的Windows机器使用它来打印非常好,但是我的Ubuntu却无法使用它来打印,因为打印机并不支持LAN。
|
||||
我在我的Windows机器上安装了打印机驱动,然后它就可以很好的工作咯。我的Windows机器使用它来打印非常好,但是我的Ubuntu却无法使用它来打印,因为打印机并不支持LAN接口。
|
||||
|
||||
所以,我在Windows上共享该打印机,然后我的Ubuntu机器就可以使用合适的字体和风格进行打印咯。假如你也遇到类似的情景,你可以按照下面的指导来操作。
|
||||
|
@ -1,8 +1,9 @@
|
||||
每日Ubuntu小技巧-让鼠标适合左利手用户
|
||||
================================================================================
|
||||
================================
|
||||
|
||||
电脑的鼠标被设计成使用食指(大拇指旁边的那个手指)完成大部分操作。默认情况下鼠标为右利手用户配置。打开电脑时,多数情况下你会使用食指完成点击动作。
|
||||
|
||||
事实上,许多左利手用户习惯把鼠标放到键盘的左边,然后用中指进行单击操作。这并不是左利手用户使用鼠标最好的方法。
|
||||
事实上,许多左利手用户(俗称左撇子)习惯把鼠标放到键盘的左边,然后用中指进行单击操作。但这并不是左利手用户使用鼠标最好的方法。
|
||||
|
||||
这个简短的教程为想要正确地使用左手操作鼠标的用户而编写。它将会帮助左利手用户将鼠标设置成用食指点击鼠标主键的操作模式。
|
||||
|
||||
@ -26,6 +27,6 @@
|
||||
|
||||
via: http://www.liberiangeek.net/2013/11/daily-ubuntu-tipsmake-the-mouse-left-handed-for-left-hand-users/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[Linchenguang](https://github.com/Linchenguang) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -1,48 +1,44 @@
|
||||
|
||||
如何在CentOS 5/6上安装EPEL 源
|
||||
================================================================================
|
||||
(ps:这篇翻得很吃力,麻烦校对大人了 ToT)
|
||||
(ps2:原文第五个链接失效,已修正)
|
||||
|
||||
EPEL 是什么?
|
||||
|
||||
EPEL (Extra Packages for Enterprise Linux) 是Fedora 小组维护的一个项目。这个项目是一个软件仓库,为RHEL/CentOS 提供他们所不默认提供的软件包。这个源兼容RHEL 和像CentOS 和Scientific Linux 这样所有由其衍生出来的版本。
|
||||
EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/CentOS提供他们默认不提供的软件包。这个源兼容RHEL及像CentOS和Scientific Linux这样的衍生版本。
|
||||
|
||||
我们可以轻易地通过yum 命令从EPEL 源上获取上万个在CentOS 自带源上没有的软件。EPEL 提供的软件包大多基于Fedora ,不会与企业版Linux 发行版本的软件发生冲突或互相替换文件。
|
||||
我们可以很容易地通过yum命令从EPEL源上获取上万个在CentOS自带源上没有的软件。EPEL提供的软件包大多基于其对应的Fedora软件包,不会与企业版Linux发行版本的软件发生冲突或替换其文件。
|
||||
|
||||
更多关于EPEL 项目的细节可以到以下网站获取。
|
||||
更多关于EPEL 项目的细节可以到以下网站获取:[https://fedoraproject.org/wiki/EPEL][1]
|
||||
|
||||
[https://fedoraproject.org/wiki/EPEL][1]
|
||||
在文本中,我将展示在CentOS下如何安装EPEL源
|
||||
|
||||
在文本中,我将展示在CentOS 下如何安装EPEL 源
|
||||
|
||||
> 提示 - RHEL/CentOS 系统有着太多的第三方源,比较流行的比如RpmForge, RpmFusion, EPEL, Remi等等。
|
||||
>
|
||||
> 然而需要时刻注意的是,如果系统添加了多个第三方源,可能会因此产生冲突——一个软件包从多个源获取,一些源会替换系统的基础软件包可能会产生意想不到的错误。已知的就有Rpmforge 与EPEL 会产生冲突。
|
||||
> 提示 - RHEL/CentOS系统有许多第三方源,比较流行的比如RpmForge,RpmFusion,EPEL,Remi等等。
|
||||
>
|
||||
> 然而需要引起注意的是,如果系统添加了多个第三方源,可能会因此产生冲突——一个软件包可以从多个源获取,一些源会替换系统的基础软件包,从而可能会产生意想不到的错误。已知的就有Rpmforge与EPEL会产生冲突。
|
||||
>
|
||||
> 对于这些问题我们建议,调整源的优先权或者有选择性的安装源,但是这需要复杂的操作,如果你不确定如何操作,我们推荐你只安装一个第三方源。
|
||||
|
||||
### 在CentOS 上安装EPEL ###
|
||||
## 在CentOS 上安装EPEL ##
|
||||
|
||||
要想安装EPEL,我们先要下载EPEL 的rpm安装包。
|
||||
CentOS/RHEL 下的6.x 和5.x 版本下载页面如下
|
||||
要想安装EPEL,我们先要下载EPEL的rpm安装包。
|
||||
|
||||
CentOS/RHEL下的6.x和5.x版本下载页面如下
|
||||
|
||||
[http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html][2]
|
||||
[http://download.fedoraproject.org/pub/epel/5/i386/repoview/epel-release.html][3]
|
||||
|
||||
以上网址可能会为了获取更快的下载速度,被重定向到特地的镜像站。这页面包含可以直接获取到rpm 包的下载链接。直接的下载链接如下
|
||||
以上网址可能会被重定向到特定的镜像站而加快下载速度。这个页面包含可以直接获取到rpm包的下载链接。直接的下载链接如下:
|
||||
|
||||
[http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm][4]
|
||||
[http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm][5]
|
||||
|
||||
根据你的CentOS 版本来选择正确的下载地址。
|
||||
|
||||
请注意EPEL 的安装包是独立编译的,所以它可以安装在32位和64位系统中。
|
||||
|
||||
### 1. 确认你的CentOS 的版本 ###
|
||||
|
||||
首先通过以下命令确认你的CentOS 版本
|
||||
|
||||
|
||||
$ cat /etc/redhat-release
|
||||
CentOS release 6.4 (Final)
|
||||
|
||||
@ -57,7 +53,9 @@ CentOS/RHEL 下的6.x 和5.x 版本下载页面如下
|
||||
通过以下命令安装EPEL 软件包
|
||||
|
||||
$ sudo rpm -ivh epel-release-6-8.noarch.rpm
|
||||
or
|
||||
|
||||
或
|
||||
|
||||
$ sudo rpm -ivh epel-release*
|
||||
|
||||
### 5. 检查EPEL 源 ###
|
||||
@ -79,8 +77,9 @@ CentOS/RHEL 下的6.x 和5.x 版本下载页面如下
|
||||
updates CentOS-6 - Updates 1,555
|
||||
repolist: 18,019
|
||||
|
||||
EPEL 已经在repo 后列出,并且显示提供了上万个软件包,所以EPEL 已经安装到你的CentOS了。
|
||||
EPEL 源已经安装到**/etc/yum.repos.d/epel.repo** 文件。
|
||||
EPEL已经在repo 后列出,并且显示提供了上万个软件包,所以EPEL 已经安装到你的CentOS了。
|
||||
|
||||
EPEL源的配置安装到了 **/etc/yum.repos.d/epel.repo** 文件。
|
||||
|
||||
现在来试一下从EPEL 获取软件包
|
||||
|
||||
@ -90,7 +89,7 @@ EPEL 源已经安装到**/etc/yum.repos.d/epel.repo** 文件。
|
||||
|
||||
via: http://www.binarytides.com/setup-epel-repository-centos/
|
||||
|
||||
译者:[NearTan](https://github.com/NearTan) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[NearTan](https://github.com/NearTan) 校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -2,50 +2,50 @@ Linux Uptime 命令,让你知道你的系统运行了多久
|
||||
================================================================================
|
||||
![](http://linoxide.com/wp-content/uploads/2013/11/linux-uptime-command.png)
|
||||
|
||||
|
||||
系统运行了多久对于一些人来说是无关紧要的,但是对于服务器管理员来说,这是相当重要的信息。服务器在运行重要的应用的时候,必须尽量保证长时间的稳定运行,有时候甚至要求零宕机。那么我们怎么才能知道服务器运行了多久呢?
|
||||
对于一些人来说系统运行了多久是无关紧要的,但是对于服务器管理员来说,这是相当重要的信息。服务器在运行重要应用的时候,必须尽量保证长时间的稳定运行,有时候甚至要求零宕机。那么我们怎么才能知道服务器运行了多久呢?
|
||||
|
||||
在Linux 下,我们可以使用uptime 命令,而且此命令不必使用root 权限。uptime 命令在系统中已经默认安装了。
|
||||
|
||||
语法就像这样:
|
||||
语法如下:
|
||||
|
||||
$ uptime
|
||||
|
||||
你会在屏幕上看到类似这样的显示:
|
||||
你会在屏幕上看到如下显示:
|
||||
|
||||
![](http://linoxide.com/wp-content/uploads/2013/11/uptime.png)
|
||||
|
||||
这些信息保存在/proc/uptime 文件中,虽然是以文本方式保存,但是这些数据却不能直接显示,需要我们使用uptime 命令来翻译它。
|
||||
这些信息保存在/proc/uptime 文件中,虽然是以文本方式保存,但是这些数据却不能直接显示,这就需要我们使用uptime 命令来翻译它。
|
||||
|
||||
下面来讲解如何解读运行uptime 命令后显示的信息:
|
||||
以下是如何解读uptime 提供的信息:
|
||||
|
||||
### 系统时间 ###
|
||||
|
||||
在图1中,左起第一个信息是14:04:39,这就是当前系统时间,以24小时格式输出。
|
||||
在图1中,左起第一条信息是14:04:39,这就是当前系统时间,以24小时格式输出。
|
||||
|
||||
### 系统运行时间 ###
|
||||
|
||||
第二个信息**Up 1004 days, 12:20**,这是显示你的系统运行的时间。这里显示的是到目前(即第一个时间)为止,你的系统运行了1004天12小时20分钟,如果你的系统没有运行超过24小时,这里将只会显示小时分钟或者只显示分钟。注意图2、图3的信息,当系统重启后将会清零。
|
||||
第二条信息**Up 1004 days, 12:20**,这是显示你的系统运行时间。图1 显示你的系统已经运行了1004天12小时20分钟,如果你的系统没有运行超过24小时,这里将只会显示小时分钟或者只显示分钟。注意图2、图3的信息,当系统重启后将会清零。
|
||||
|
||||
![](http://linoxide.com/wp-content/uploads/2013/11/uptime_minutes.png)
|
||||
|
||||
![](http://linoxide.com/wp-content/uploads/2013/11/uptime_hours1.png)
|
||||
|
||||
### 已登陆用户的数量 ###
|
||||
### 已登录用户的数量 ###
|
||||
|
||||
第三部分的信息是显示已登陆用户的数量。在图1中,显示的是**1 user** ,即当前登录用户数量。当多个用户在同时登陆系统时,uptime 命令将告诉你用户的数量。
|
||||
|
||||
### 平均负载量 ###
|
||||
|
||||
最后一个信息是系统的平均负载量。回到图1,你看到这样带两位小数的数字**0.25, 0.25, 0.19**可以换算成百分比,即0.25和0.19分别代表着25%和19%。
|
||||
19代表着过去1分钟、5分钟、15分钟系统的平均负载量。负载量越低意味着你的系统性能越好。
|
||||
最后一个信息是系统的平均负载量。回到图1,你看到这样带两位小数的数字**0.25, 0.25, 0.19**可以换算成百分比,即0.25和0.19分别代表着25%和19%。0.25, 0.25, 0.19分别代表着过去1分钟、5分钟、15分钟系统的平均负载量。负载量越低意味着你的系统性能越好。
|
||||
|
||||
这就是**uptime** 命令的日常使用指导,如果想获取更详细的信息,请通过输入**man uptime** 进入uptime 命令的manual 页面来查看。
|
||||
|
||||
你的机器已经运行多久了?贴出你的uptime给大家看看吧。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/linux-command/linux-uptime-command/
|
||||
|
||||
译者:[NearTan](https://github.com/NearTan) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[NearTan](https://github.com/NearTan) 校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
185
sources/10 Lesser Known Effective Linux Commands – Part IV.md
Normal file
185
sources/10 Lesser Known Effective Linux Commands – Part IV.md
Normal file
@ -0,0 +1,185 @@
|
||||
10 Lesser Known Effective Linux Commands – Part IV
|
||||
================================================================================
|
||||
Continuing the **Lesser Known** series, this fourth article of the series will let you know some useful **funny** and **animated** commands. Here we go into the practical session, without much theory.
|
||||
|
||||
![](http://www.tecmint.com/wp-content/uploads/2013/11/10-Lesser-Known-Effective-Commands-.png)
|
||||
|
||||
- [11 Lesser Known Useful Linux Commands – Part I][1]
|
||||
- [10 Lesser Known Linux Commands – Part 2][2]
|
||||
- [10 Lesser Known Commands for Linux – Part 3][3]
|
||||
|
||||
In the fourth article of this series which includes few other lesser known Linux commands, worth knowing. Might be you’re already aware of these commands, no doubt you’re an experienced Linux user and loves exploration.
|
||||
|
||||
### 32. strace Command ###
|
||||
|
||||
The **strace** is a debugging tool which is used primarily for troubleshooting purpose in Linux. It might not be installed by default in your system and you may need to **apt** or **yum** the required package.
|
||||
|
||||
Trace a command execution using strace command:
|
||||
|
||||
root@tecmint [~]# strace pwd
|
||||
|
||||
#### Sample Output ####
|
||||
|
||||
execve("/bin/pwd", ["pwd"], [/* 29 vars */]) = 0
|
||||
brk(0) = 0x728000
|
||||
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f29b0df2000
|
||||
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
|
||||
open("/etc/ld.so.cache", O_RDONLY) = 3
|
||||
fstat(3, {st_mode=S_IFREG|0644, st_size=38427, ...}) = 0
|
||||
mmap(NULL, 38427, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f29b0de8000
|
||||
close(3) = 0
|
||||
open("/lib64/libc.so.6", O_RDONLY) = 3
|
||||
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\355\1I;\0\0\0"..., 832) = 832
|
||||
fstat(3, {st_mode=S_IFREG|0755, st_size=1922152, ...}) = 0
|
||||
mmap(0x3b49000000, 3745960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3b49000000
|
||||
mprotect(0x3b4918a000, 2093056, PROT_NONE) = 0
|
||||
mmap(0x3b49389000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x189000) = 0x3b49389000
|
||||
mmap(0x3b4938e000, 18600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3b4938e000
|
||||
close(3) = 0
|
||||
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f29b0de7000
|
||||
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f29b0de6000
|
||||
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f29b0de5000
|
||||
....
|
||||
|
||||
The **strace** command accepts a lot of arguments and have many options. Refer to man page for detailed information.
|
||||
|
||||
### 33. disown -a && exit Command ###
|
||||
|
||||
Most of the system administrators use [screen command][4] to control jobs running in the terminal background. Let’s say if you having a long running job and want to **detach** from the terminal, you use screen command to do it. But what if you don’t know how to use screen, here comes disown command to rescue.
|
||||
|
||||
The disown command is used to run the jobs continuously in the background even after you closing the terminal session. The syntax of the disown command is:
|
||||
|
||||
root@tecmint [~]# Command; disown -a && exit
|
||||
|
||||
To detach again the long running job in the terminal, use the **jobs** command to find the job number and then use disown **%n** where **n** is the job number. To verify actually the job is running use **ps** or [top command][5]. The **nohup** command is an alternative to the disown command.
|
||||
|
||||
### 34. getconf LONG_BIT Command ###
|
||||
|
||||
The above command shows your machine architecture if it is **32** bit or **64** bit?
|
||||
|
||||
root@tecmint [~]# getconf LONG_BIT
|
||||
|
||||
32
|
||||
|
||||
- [Download Linux Command Line Cheat Sheet][5]
|
||||
|
||||
### 35. Display Date on the Terminal ###
|
||||
|
||||
The below command is a combination of several commands, better say it a script. For a person working at shell or terminal, without GUI seeing current system date is tedious job. You have to type ‘**date**‘ command to check today’s date.
|
||||
|
||||
Just execute the below command on you prompt and see the **date** and **time** on the above right corner of terminal.
|
||||
|
||||
root@tecmint [~]# while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-29));date;tput rc;done &
|
||||
|
||||
![Show Date in Terminal](http://www.tecmint.com/wp-content/uploads/2013/11/Date.jpg)
|
||||
|
||||
### 36. convert Command ###
|
||||
|
||||
While writing tutorial, I usually need to produce output, many a times in image format. The above command combination does this for me. Say I need the output of tree command (for **/etc/x11** directory) in image format. What I did at terminal was:
|
||||
|
||||
root@tecmint:/etc/X11# tree | convert label:@- /home/avi/tree.png
|
||||
|
||||
The output of the above command can be seen at the specified location (here, home directory of mine) with the file name specified as **tree.png**.
|
||||
|
||||
### 37. watch -t -n1 “date +%T|figlet” ###
|
||||
|
||||
Remember our description of “**figlet**” command in our earlier article “[20 Funny Commands of Linux][7]”. This command was very cool, this time we will be pipelining ‘**figlet**‘ to show animated digital clock in the terminal.
|
||||
|
||||
Just check-out yourself, remember you must have **figlet** installed on the system, do **apt** or **yum** to install the required package.
|
||||
|
||||
root@tecmint [~]# watch -t -n1 "date +%T|figlet"
|
||||
|
||||
#### Sample Output ####
|
||||
|
||||
_ ___ ____ ___ _____ _ _ Fri Nov 29 10:29:34 GMT
|
||||
/ |/ _ \ _|___ \ / _ \ _|___ /| || |
|
||||
| | | | (_) __) | (_) (_) |_ \| || |_
|
||||
| | |_| |_ / __/ \__, |_ ___) |__ _|
|
||||
|_|\___/(_)_____| /_/(_)____/ |_|
|
||||
|
||||
### 38. host and dig Commands ###
|
||||
|
||||
Although “**host**” and “**dig**” command is not that much lesser known, still not very frequently used. The host command is **DNS** lookup utility.
|
||||
|
||||
root@tecmint [~]# host www.google.com
|
||||
|
||||
www.google.com has address 173.194.66.147
|
||||
www.google.com has address 173.194.66.105
|
||||
www.google.com has address 173.194.66.99
|
||||
www.google.com has address 173.194.66.104
|
||||
www.google.com has address 173.194.66.106
|
||||
www.google.com has address 173.194.66.103
|
||||
www.google.com has IPv6 address 2a00:1450:400c:c03::68
|
||||
|
||||
|
||||
root@tecmint [~]# dig www.google.com
|
||||
|
||||
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> www.google.com
|
||||
;; global options: +cmd
|
||||
;; Got answer:
|
||||
;; ->>HEADER<
|
||||
|
||||
### 39. dstat Command ###
|
||||
|
||||
The **dstat** is a versatile tool, that generates statistics relating to system resource. By default your system might not have ‘**dstat**‘ installed. Do a **apt** or **yum** to install ‘**dstat**‘ before using this very colorful and description system resource generator.
|
||||
|
||||
root@tecmint [~]# dstat
|
||||
|
||||
![dstat command](http://www.tecmint.com/wp-content/uploads/2013/11/dstat.jpeg)
|
||||
|
||||
### 40. bind -p Command ###
|
||||
|
||||
The ‘**bind -p**‘ command will show all the shortcuts available for **BASH** shell.
|
||||
|
||||
root@tecmint [~]# bind -p
|
||||
|
||||
#### Sample Output ####
|
||||
|
||||
"\C-g": abort
|
||||
"\C-x\C-g": abort
|
||||
"\e\C-g": abort
|
||||
"\C-j": accept-line
|
||||
"\C-m": accept-line
|
||||
# alias-expand-line (not bound)
|
||||
# arrow-key-prefix (not bound)
|
||||
# backward-byte (not bound)
|
||||
"\C-b": backward-char
|
||||
"\eOD": backward-char
|
||||
"\e[D": backward-char
|
||||
"\e!": complete-command
|
||||
"\e/": complete-filename
|
||||
"\e@": complete-hostname
|
||||
"\e{": complete-into-braces
|
||||
"\e~": complete-username
|
||||
"\e$": complete-variable
|
||||
# copy-backward-word (not bound)
|
||||
# copy-forward-word (not bound)
|
||||
# copy-region-as-kill (not bound)
|
||||
....
|
||||
....
|
||||
|
||||
### 41. touch /forcefsck ###
|
||||
|
||||
The above command will create an empty folder '**forcefsck**', under root directory. This will force Linux System to check the file system on the very next boot.
|
||||
|
||||
root@tecmint [~]# touch /forcefsck
|
||||
|
||||
hat’s all for Now. You People are loving these ‘**Lesser Known Commands**‘ and hence we are continuing the series, the next article of this series will be available very soon.
|
||||
|
||||
Till then stay tuned and connected to **Tecmint**. Don’t forget to give your valuable feedback in our comment section. Do a favor to us, Like and share us and help us spread.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/10-lesser-known-effective-linux-commands-part-iv/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.tecmint.com/11-lesser-known-useful-linux-commands/
|
||||
[2]:http://www.tecmint.com/10-lesser-known-linux-commands-part-2/
|
||||
[3]:http://www.tecmint.com/10-lesser-known-commands-for-linux-part-3/
|
||||
[4]:http://www.tecmint.com/screen-command-examples-to-manage-linux-terminals/
|
||||
[5]:http://www.tecmint.com/12-top-command-examples-in-linux/
|
||||
[6]:http://tecmint.tradepub.com/free/w_makb09/prgm.cgi
|
||||
[7]:http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/
|
@ -1,36 +0,0 @@
|
||||
Vic020的 wc
|
||||
Daily Ubuntu Tips–Like GNOME Classic Menu? Get Classic Menu Indicator
|
||||
================================================================================
|
||||
Daily Ubuntu Tips–Like GNOME Classic Menu? Get Classic Menu Indicator
|
||||
|
||||
For those who have been following Ubuntu OS from the beginner, they’ve seen almost if not all the changes Ubuntu have gone through. There have been a lot of changes, especially on the desktop side. From the classic GNOME desktop environment to Unity, Ubuntu have completely been redesigned.
|
||||
|
||||
For some new users, all they know is the Unity desktop environment and just a few have heard of or seen the original GNOME desktop environment that powered Ubuntu previously. Ubuntu is completely different from what it used to be and some are having hard time coping with the way things have changed.
|
||||
|
||||
If you’re an old timer who wish to get back GNOME Classic Menu in Ubuntu Unity, installing Classic Menu Indicator will do the trick. This nifty package get installed in the notification area of the top panel and brings back GNOME Classic Menu experience in Ubuntu.
|
||||
|
||||
Like the classic GNOME Menu, it includes all the applications and structure of the classic menu. It’s easy to navigate and access applications for those who are used to it. For new users, it’s also easy to catch on.
|
||||
|
||||
This brief tutorial is going to show you how install this package in Ubuntu.
|
||||
|
||||
To get started, press **Ctrl – Alt – T** on your keyboard to open the terminal. When it opens, run the commands below to add its PPA archive.
|
||||
|
||||
sudo apt-add-repository ppa:diesch/testing
|
||||
|
||||
Next, run the commands below to install it.
|
||||
|
||||
sudo apt-get update && sudo apt-get install classicmenu-indicator
|
||||
|
||||
After installing it, go and launch the application from Unity Dash. It’s called Classic Menu Indicator. When you launch it, it will automatically dock at the top panel as shown below.
|
||||
|
||||
![](http://www.liberiangeek.net/wp-content/uploads/2013/11/classic-menu-indicator.png)
|
||||
|
||||
That’s it, use it and enjoy!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.liberiangeek.net/2013/11/daily-ubuntu-tipslike-gnome-classic-menu-get-classic-menu-indicator/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -1,24 +0,0 @@
|
||||
trying by crowner
|
||||
Deepen your creative knowledge with explanatory user-friendly icon-creation design story
|
||||
================================================================================
|
||||
Along with quality, stability and agility, Ubuntu comes paired with a team of experienced designers, designers covering more and more corners of Ubuntu and thus imprinting into the polished OS beautiful areas, optimized behaviors, carefully-implemented interactions, etc.
|
||||
|
||||
The **Ubuntu designer Matthieu "Tiheum" James**,--the creator of Faenza and Faience--, published an interesting article, centering the creation of several icons, insightful article allowing interested users and third-party developers to directly observe how a professional designer creates icons.
|
||||
|
||||
The mentioned icons have been created for Juju as presented in the recent OpenStack Summit in Hong Kong, icons adopting an entertaining nature, meant at meeting the visitors of Ubuntu's stand at the Hong Kong summit, "**we wanted** to replace the normal Juju icons for something a little bit more special in order to explain to people that visited the Ubuntu stand what kind of things Juju can do. We decided to use the idea of an ice-cream with toppings and sauce which you can build in the same way that you can build services in Juju".
|
||||
|
||||
The article exposes the psychological ground on which the actual icon-creation process stood, immersing the reader into an explanatory yet easily-graspable journey through finding good concepts, initial sketching, adding perspectives to icons, using different design approaches, choosing icon backgrounds, refining the icons, etc, essentially, a reader-friendly design story.
|
||||
|
||||
![](http://iloveubuntu.net/pictures_me/icon%20creation%20design%20story.jpg)
|
||||
|
||||
The full article can be enjoyed on [http://design.canonical.com/2013/11/juju-ice-cream-icon-design/][1]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://iloveubuntu.net/deepen-your-creative-knowledge-explanatory-user-friendly-icon-creation-design-story
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://design.canonical.com/2013/11/juju-ice-cream-icon-design/
|
143
sources/How To Display And Set Hostname in Linux.md
Normal file
143
sources/How To Display And Set Hostname in Linux.md
Normal file
@ -0,0 +1,143 @@
|
||||
Vic020不好意思的WC
|
||||
How To Display And Set Hostname in Linux
|
||||
================================================================================
|
||||
![](http://linoxide.com/wp-content/uploads/2013/11/hostname-command-linux.jpg)
|
||||
|
||||
With more and more computer connected to the network, computer need to have an attribute to make it different to each other. Same as human in the real world, computer also hava an attribute which named hostname.
|
||||
|
||||
### What is hostname ###
|
||||
|
||||
From its manual page, hostname is used to display the system’s DNS name and to display or set its hostname or NIS domain name. So hostname is related to DNS (Domain Name System) or NIS (Network Information System).
|
||||
|
||||
### How to display hostname ###
|
||||
|
||||
Hostname is a pre-installed command in every Linux distribution. You can display your machine hostname by typing hostname in your console. Here’s a sample command and the output :
|
||||
|
||||
$ hostname
|
||||
ubuntu
|
||||
|
||||
The above command will tell you that the computer name is **ubuntu**.
|
||||
|
||||
### How to set a hostname ###
|
||||
|
||||
Hostname is set when you install you Linux at the first time. There is a step in your installation procedure that your Linux will ask you to fill hostname information. However, **you can do it later** if you want.
|
||||
To set it your hostname, you can use this command :
|
||||
|
||||
# hostname dev-machine
|
||||
|
||||
$ hostname
|
||||
dev-machine
|
||||
|
||||
You **need to be root** user or equal to set / change your hostname machine. The # sign is indicated that you are a root user. The above command is telling your computer to set its hostname into **dev-machine**. If you don’t receive any error message then your hostname is changed. Again, you check it using hostname command to see the result.
|
||||
|
||||
Setting hostname using hostname command **is not permanent**. When you reboot your computer, your setting will gone. **To make it permanent**, you must manually edit hostname configuration files.
|
||||
|
||||
**On Debian / Ubuntu based Linux**
|
||||
|
||||
You will find it in these folders, **/etc/hostname** and **/etc/hosts**.
|
||||
|
||||
Here’s the content of each files.
|
||||
|
||||
**/etc/hostname**
|
||||
|
||||
# vi /etc/hostname
|
||||
dev-machine
|
||||
|
||||
**/etc/hosts**
|
||||
|
||||
# vi /etc/hosts
|
||||
127.0.0.1 localhost
|
||||
127.0.0.1 dev-machine
|
||||
|
||||
You will found it **active immediately without restarting** your Linux.
|
||||
|
||||
**On RedHat / CentOS based Linux**
|
||||
|
||||
You will find it in these folders, **/etc/hosts** and and **/etc/sysconfig/networks**
|
||||
|
||||
Here’s the content of each files.
|
||||
|
||||
**/etc/hosts**
|
||||
|
||||
127.0.0.1 localhost.localdomain localhost dev-machine
|
||||
::localhost 127.0.0.1
|
||||
|
||||
/etc/sysconfig/network
|
||||
|
||||
NETWORKING=yes
|
||||
NETWORKING_IPV6=no
|
||||
HOSTNAME=dev-machine
|
||||
|
||||
### How to display dnsdomainname ###
|
||||
|
||||
From hostname definition above, hostname can also display a dnsname for your Linux. If hostname command will display your hostname, then dnsndomainname command will show your domain name. Let’s see the sample.
|
||||
|
||||
$ dnsdomainname
|
||||
bris.co.id
|
||||
|
||||
On this article, the result of dnsdomainname command is **bris.co.id**.
|
||||
|
||||
If you see the result is (**none**), then your machine **is not configured in FQDN** (Fully Qualified Domain Name). Dnsdomainname command will grab information from **/etc/hosts** file. You should configure it in FQDN format. Here’s the sample :
|
||||
|
||||
**/etc/hosts**
|
||||
|
||||
127.0.0.1 localhost.localdomain localhost dev-machine
|
||||
::localhost 127.0.0.1
|
||||
192.168.0.104 dev-machine.bris.co.id dev-machine
|
||||
|
||||
To display it more detail, you can use parameter **-v**
|
||||
|
||||
$ dnsdomainname -v
|
||||
gethostname()=’dev-machine.bris.co.id’
|
||||
Resolving ‘dev-machine.bris.co.id’ …
|
||||
Result: h_name=’dev-machine.bris.co.id’
|
||||
Result: h_aliases=’dev-machine’
|
||||
Result: h_addr_list=’192.168.0.104’
|
||||
|
||||
### How to display hostname with more detail information ###
|
||||
|
||||
Hostname command comes with some parameters and some aliases such as dnsdomainname command. Here’s some parameter that may useful on day-to-day operation. The results of the commands below is based on **/etc/hosts** configuration above
|
||||
|
||||
**Display the IP Address**
|
||||
|
||||
$ hostname -i
|
||||
192.168.0.104
|
||||
|
||||
**Display the domain**
|
||||
|
||||
$ hostname -d
|
||||
bris.co.id
|
||||
|
||||
**Display the the short name**
|
||||
|
||||
$ hostname -s
|
||||
dev-machine
|
||||
|
||||
*This command will produce the same result with only typing hostname*
|
||||
|
||||
**Display with FQDN format**
|
||||
|
||||
$ hostname -f
|
||||
dev-machine.bris.co.id
|
||||
|
||||
**Display with detail information**
|
||||
|
||||
All the parameters mentioned above can be ‘**summarized**’ by the parameter **-v and -d**. Let’s take a look the sample
|
||||
|
||||
$ hostname -v -d
|
||||
gethostname()=’dev-machine.bris.co.id’
|
||||
Resolving ‘dev-machine.bris.co.id’ …
|
||||
Result: h_name=’dev-machine.bris.co.id’
|
||||
Result: h_aliases=’dev-machine’
|
||||
Result: h_addr_list=’192.168.0.104’
|
||||
bris.co.id
|
||||
|
||||
Feel familiar? Yes, this result is the same with **dnsdomainname -v** command that also mentioned above.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/linux-command/display-set-hostname-linux/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -1,3 +1,5 @@
|
||||
翻译中 by小眼儿
|
||||
|
||||
How to Crack a Wi-Fi Network's WPA Password with Reaver
|
||||
================================================================================
|
||||
![](http://img.gawkerassets.com/img/17pw3mgej3x93jpg/ku-xlarge.jpg)
|
||||
@ -151,4 +153,4 @@ via: http://lifehacker.com/5873407/how-to-crack-a-wi+fi-networks-wpa-password-wi
|
||||
[14]:http://lifehacker.com/5756233/get-more-out-of-your-dd+wrt-router-with-an-external-drive?tag=ddwrt
|
||||
[15]:http://lifehacker.com/5680670/turn-your-dd+wrt-enabled-router-into-a-whole-house-ad-blocker?tag=ddwrt
|
||||
[16]:http://lifehacker.com/5563196/turn-your-old-router-into-a-range+boosting-wi+fi-repeater?tag=ddwrt
|
||||
[17]:http://lifehacker.com/178132/hack-attack-turn-your-60-router-into-a-600-router
|
||||
[17]:http://lifehacker.com/178132/hack-attack-turn-your-60-router-into-a-600-router
|
||||
|
39
sources/How to Install Linux Kernel 3.12 in Ubuntu 13.10.md
Normal file
39
sources/How to Install Linux Kernel 3.12 in Ubuntu 13.10.md
Normal file
@ -0,0 +1,39 @@
|
||||
How to Install Linux Kernel 3.12 in Ubuntu 13.10
|
||||
================================================================================
|
||||
Ubuntu 13.10 users don't have to look with envy at the new Linux kernels that are released, and they can update their systems with relative ease.
|
||||
|
||||
Canonical is usually sticking with one Linux kernel for an entire development cycle. For example, Ubuntu 13.10 is based on Linux kernel 3.11, but now a new stable Linux kernel, 3.12, has been launched.
|
||||
|
||||
Ubuntu users will have to wait until the release of the 14.04 LTS to get a newer Linux kernel, but they can also install, until then, new versions.
|
||||
|
||||
We have to warn you from the get-go. Canonical does not recommend updating your Linux kernel to other versions than the ones provided on official channels. This is not a totally safe procedure and you might have problems afterwards, even system failures. On the other hand, you might get better performance from your system.
|
||||
|
||||
The kernel you are about to download is from Canonical, which means that it is already in a .deb format. You won't have to compile it yourself. Open a terminal, navigate to the Downloads folder, and enter the following commands:
|
||||
|
||||
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-saucy/linux-image-3.12.0-031200-generic_3.12.0-031200.201311031935_amd64.deb
|
||||
|
||||
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-saucy/linux-headers-3.12.0-031200-generic_3.12.0-031200.201311031935_amd64.deb
|
||||
|
||||
You can also download the 32-bit version, if you have a 32-bit operating system. Just replace the 64-bit links with the ones for 32-bit, which can be found [here][1].
|
||||
|
||||
Now you will have to run those .deb, just like any other program. In the same terminal that you used to download the packages, write the following commands (you will need root access to make this work):
|
||||
|
||||
sudo dpkg -i linux-image-3.12.0-031200-generic_3.12.0-031200.201311031935_amd64.deb
|
||||
sudo dpkg -i linux-headers-3.12.0-031200-generic_3.12.0-031200.201311031935_amd64.deb
|
||||
|
||||
After the process is finished, you will have to restart the system and voila, the new Linux kernels are in place. The good news is that the old ones are still there and, if you need to delete 3.12, all you have to do is use a very well-known command.
|
||||
|
||||
sudo apt-get purge linux-image-3.12.0-031200-generic_3.12.0-031200.201311031935_amd64.deb
|
||||
sudo apt-get linux-headers-3.12.0-031200-generic_3.12.0-031200.201311031935_amd64.deb
|
||||
|
||||
One thing you have to remember. The names of the files shown above will change pretty soon. If the downloads are not working, you will have to update the new links. Enjoy Linux kernel 3.12!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://news.softpedia.com/news/How-to-Install-Linux-Kerrnel-3-12-in-Ubuntu-13-10-397013.shtml
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-saucy/
|
46
sources/How to Repack Deb Files on Debian and Ubuntu.md
Normal file
46
sources/How to Repack Deb Files on Debian and Ubuntu.md
Normal file
@ -0,0 +1,46 @@
|
||||
How to Repack Deb Files on Debian and Ubuntu
|
||||
================================================================================
|
||||
**The following tutorial will teach Ubuntu, Linux Mint and Debian GNU/Linux users how to easily unpack and repack a .deb file on their Debian-based Linux operating system.**
|
||||
|
||||
![](http://i1-news.softpedia-static.com/images/news2/How-to-Repack-Deb-Files-on-Debian-and-Ubuntu-404930-2.jpg)
|
||||
|
||||
Once in a while you reach a moment in life when, among other things, you want to modify a .deb file, to change something in it and repackage it back. But, only if you are truly into computing and hacking.
|
||||
|
||||
The following example is a true story, as it happen to me a while ago. A Linux developer created a Debian package (.deb) for a software, which I’ve install on my Ubuntu powered computer with success.
|
||||
|
||||
Apparently, the software did not worked correctly, as it was always stuck when it tried to retrieve some files from a Git repository. So, I knew where the files where installed (in the /opt directory), I’ve searched the code, found the issue and repair it in place. After that, the program was no longer stuck when it tried to retrieve the packages it needed.
|
||||
|
||||
So, long story short, I wanted to unpack the .deb file, replace the file I’ve patched in it, and repackage it back so I can install it on other computers or give it to my friends. How do I do that?
|
||||
|
||||
After searching the Internet for an answer to my problem, I’ve found a small blog called [ailoo.net][1] where it was explained like this:
|
||||
|
||||
mkdir -p extract/DEBIAN
|
||||
dpkg-deb -x package.deb extract/
|
||||
dpkg-deb -e package.deb extract/DEBIAN [...do something, e.g. edit the control file...]
|
||||
mkdir build
|
||||
dpkg-deb -b extract/ build/
|
||||
|
||||
These five commands will do the job like a charm. Let me explain them to you: the first one creates a folder called “extract” and a subfolder called “DEBIAN”; the second command will extract some files from your .deb package in the “extract” folder; the third command will extract the content of the .deb package in the “DEBIAN” subfolder, where you can modify/patch the files you want; the fourth command will create a folder called “build”; and the fifth command will repack the modified files into a new .deb package, which will be generated in the “build” folder.
|
||||
|
||||
That’s it! Just remember to stick with the commands above, and modify the files visually with a graphical text editor via your default file manager, after you’ve executed the third command. Do not hesitate to comment below if you run into problems during this tutorial.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://news.softpedia.com/news/How-to-Repack-Deb-Files-on-Debian-and-Ubuntu-404930.shtml
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://ailoo.net/2009/06/repack-a-deb-archive-with-dpkg-deb/
|
||||
[2]:
|
||||
[3]:
|
||||
[4]:
|
||||
[5]:
|
||||
[6]:
|
||||
[7]:
|
||||
[8]:
|
||||
[9]:
|
||||
[10]:
|
||||
[11]:
|
||||
[12]:
|
@ -0,0 +1,141 @@
|
||||
How to setup Remi repository on CentOS 5/6 and Fedora 18/19/20
|
||||
================================================================================
|
||||
Remi repository
|
||||
|
||||
The [Remi (Les RPM de Remi) repository][1] provides the latest version of various software packages related to php and mysql for redhat based linux distros like centos, fedora and RHEL. It provides php, mysql, pecl packages, pear packages any many other open source/free php applications and libraries and many other php related packages. So its designed to assist in setting up apache+php based web servers with various kinds of open source applications. The default centos/fedora distros do no have the latest versions of these packages so repositories like Remi do the job.
|
||||
|
||||
The repository can be easily setup on CentOS/Fedora through the installer rpm which will setup the repository configuration.
|
||||
|
||||
### Setup on CentOS 5.x/6.x ###
|
||||
|
||||
The Remi installer rpm file is available for both 5.x and 6.x versions of CentOS. The urls are as follows
|
||||
|
||||
CentOS 5.x - [http://rpms.famillecollet.com/enterprise/remi-release-5.rpm][2]
|
||||
CentOS 6.x - [http://rpms.famillecollet.com/enterprise/remi-release-6.rpm][3]
|
||||
|
||||
On CentOS The Remi repository depends on the Epel repository which must be installed along with it, for it to work. If you already have epel repository setup then execute the following command
|
||||
|
||||
$ wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
|
||||
$ rpm -Uvh remi-release-6*.rpm
|
||||
|
||||
If you do not already have Epel setup then run the following command. It will download the Epel installer file and install it along with Remi
|
||||
|
||||
$ wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
|
||||
$ wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
|
||||
$ rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
|
||||
|
||||
For CentOS 5.x
|
||||
|
||||
$ wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
|
||||
$ wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
|
||||
$ rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
|
||||
|
||||
Thats it. Now the remi repository should be setup on your CentOS system.
|
||||
|
||||
### Setup on Fedora 18/19 ###
|
||||
|
||||
On Fedora, Remi depends on the [Rpmfusion][4] repository. So first setup the rpmfusion repository.
|
||||
|
||||
## Remi Dependency on Fedora 19 / 18 / 17 ##
|
||||
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
|
||||
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
|
||||
|
||||
The rpm file and configuration instructions for rpmfusion can be found here.
|
||||
|
||||
After rpmfusion is setup, move ahead to setting up Remi.
|
||||
|
||||
$ wget http://rpms.famillecollet.com/remi-release-19.rpm
|
||||
$ yum install remi-release-19.rpm
|
||||
|
||||
Or directly
|
||||
|
||||
## Fedora 20 ##
|
||||
rpm -Uvh http://rpms.famillecollet.com/remi-release-20.rpm
|
||||
|
||||
## Fedora 19 ##
|
||||
rpm -Uvh http://rpms.famillecollet.com/remi-release-19.rpm
|
||||
|
||||
## Fedora 18 ##
|
||||
rpm -Uvh http://rpms.famillecollet.com/remi-release-18.rpm
|
||||
|
||||
## Fedora 17 ##
|
||||
rpm -Uvh http://rpms.famillecollet.com/remi-release-17.rpm
|
||||
|
||||
Make sure to use the correct url for your Fedora version. That should finish setting up the Remi repository on Fedora.
|
||||
|
||||
### Verify Remi ###
|
||||
|
||||
After setting up the Remi repository, its time to check if its properly done. The Remi repository is disabled by default. If you want to enable it permanently then edit the file /etc/yum.repos.d/remi.repo
|
||||
|
||||
$ sudo nano /etc/yum.repos.d/remi.repo
|
||||
|
||||
> [remi]
|
||||
> name=Les RPM de remi pour Enterprise Linux 6 - $basearch
|
||||
> #baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
|
||||
> mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
|
||||
> enabled=0
|
||||
> gpgcheck=1
|
||||
> gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
|
||||
|
||||
The very first section that starts with [remi] is the main repository. Change the value of enabled from 0 to 1 to enable it.
|
||||
|
||||
Otherwise it can be enabled via yum when needed using the enablerepo option.
|
||||
|
||||
# yum repolist --enablerepo=remi
|
||||
Loaded plugins: fastestmirror
|
||||
Loading mirror speeds from cached hostfile
|
||||
* base: virror.hanoilug.org
|
||||
* epel: mirror.unej.ac.id
|
||||
* extras: mirrors.fibo.vn
|
||||
* remi: mirror.smartmedia.net.id
|
||||
* updates: mirrors.fibo.vn
|
||||
repo id repo name status
|
||||
base CentOS-6 - Base 6,381
|
||||
epel Extra Packages for Enterprise Linux 6 - x86_64 10,031
|
||||
extras CentOS-6 - Extras 13
|
||||
nginx nginx repo 47
|
||||
remi Les RPM de remi pour Enterprise Linux 6 - x86_64 1,320
|
||||
updates CentOS-6 - Updates 1,555
|
||||
repolist: 19,347
|
||||
#
|
||||
|
||||
Using the enablerepo option is sufficient when needed. As can be seen, the remi repository provides around 1320 packages. There are 2 more repos, namely remi-php55 and remi-test that provide even more packages.
|
||||
|
||||
### List all packages ###
|
||||
|
||||
To list out all the packages provided by the Remi repo, use the following command.
|
||||
|
||||
# yum --disablerepo=* --enablerepo=remi,remi-php55,remi-test list available | less
|
||||
|
||||
### Install packages from Remi repository ###
|
||||
|
||||
To install packages from Remi repo, use the enablerepo option again
|
||||
|
||||
# yum --enablerepo=remi,remi-php55 install php
|
||||
|
||||
### Resources ###
|
||||
|
||||
Remi repository official site
|
||||
[http://rpms.famillecollet.com/][5]
|
||||
|
||||
Remi FAQ
|
||||
[http://blog.famillecollet.com/pages/English-FAQ][6]
|
||||
|
||||
Remi repository configuration instructions
|
||||
[http://blog.famillecollet.com/pages/Config-en][7]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.binarytides.com/setup-remi-repository-centos-fedora/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://rpms.famillecollet.com/
|
||||
[2]:http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
|
||||
[3]:http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
|
||||
[4]:http://rpmfusion.org/
|
||||
[5]:http://rpms.famillecollet.com/
|
||||
[6]:http://blog.famillecollet.com/pages/English-FAQ
|
||||
[7]:http://blog.famillecollet.com/pages/Config-en
|
@ -0,0 +1,29 @@
|
||||
Linux Is the Only Way to Protect Against Potential Sound-Transmitted Malware
|
||||
================================================================================
|
||||
**A new type of malware that is using sound to transmit itself has been developed by scientists and it seems that the Linux systems are the only ones that can be protected against this kind of attacks.**
|
||||
|
||||
Scientists Michael Hanspach and Michael Goetz from Fraunhofer FKIE, Wachtberg, Germany, have developed a technique capable of infecting other computers with malware that transmits itself using just speakers and microphones.
|
||||
|
||||
“Covert channels can be used to circumvent system and network policies by establishing communications that have not been considered in the design of the computing system. We construct a covert channel between different computing systems that utilizes audio modulation/demodulation to exchange data between the computing systems over the air medium,” [reads the paper][1] that they published in the Journal of Communications.
|
||||
|
||||
This would prove a very powerful method of infecting computers, especially because they don't even have to be linked in a network. All that is needed for the method to work is proximity.
|
||||
|
||||
Another problem is that there is virtually no protection embedded in today's operating systems for such malware. The good news is that Linux users can make a few small modifications in order to gain that much needed protection.
|
||||
|
||||
The developers have explained that Linux systems can be programed, rather easily, to adapt to this new form of attacks.
|
||||
|
||||
“If audio input and output devices cannot be switched off, implementation of audio filtering options may be an alternative approach to counter maliciously triggered participation in covert networks. “
|
||||
|
||||
“In Linux-based operating systems, a software-defined audio filter can be implemented with ALSA (Advanced Linux Sound Architecture) in conjunction with the LADSPA (Linux Audio Developer’s Simple Plugin API),” the scientists say in the paper.
|
||||
|
||||
Sound-transmitted malware is something very new and it's no wonder that there is no protection against it, but it goes to show why Linux systems are considered safer.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://news.softpedia.com/news/Linux-Is-the-Only-Way-to-Protect-Against-Possible-Malware-Through-Sound-Attacks-405566.shtml
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.jocm.us/index.php?m=content&c=index&a=show&catid=124&id=600
|
@ -1,86 +0,0 @@
|
||||
l3b2w1 translating……
|
||||
|
||||
Linux chief: ‘Open source is safer, and Linux is more secure than any other OS
|
||||
================================================================================
|
||||
In an interview with Linux Foundation executive director Jim Zemlin, VentureBeat got a bird’s-eye view of the future of the open-source operating system for 2014.
|
||||
|
||||
We also addressed the controversial issues of government spying and “backdoors” — those nefarious windows into our personal online lives that the public recently discovered in most of the services we use every day.
|
||||
|
||||
Zemlin gave us the skinny on how and why GNU/Linux remains the most secure option for concerned consumers — and why it’s becoming the OS of choice for powering cars, phones, TVs, and all kinds of emerging devices.
|
||||
|
||||
Here’s our e-mail transcript in a bare-naked Q&A format.
|
||||
|
||||
----------
|
||||
|
||||
**VentureBeat: Security and privacy has been the hottest topic this year, bar none. We’ve heard rumors that Linus [Torvalds, Linux creator] OK’d a Linux backdoor for the government.**
|
||||
|
||||
**Zemlin**: If there were a backdoor in Linux, you’d know it.
|
||||
|
||||
The whole world can see every line of code in Linux. This is one of the reasons Linux is more secure than other operating systems and why open-source software overall is a safer than closed software. The transparency of the code ensures it’s secure.
|
||||
|
||||
And for the record: He wasn’t approached.
|
||||
|
||||
**VentureBeat: How committed is the foundation to preserving Linux users’ privacy and freedom from tracking/surveillance?**
|
||||
|
||||
**Zemlin**: As committed as we have always been. It’s very difficult to insert something into the kernel that would violate privacy and freedom without thousands of developers noticing. The nature of Linux is that it’s self-policing.
|
||||
|
||||
**VentureBeat: Do you think there’s any chance that this year’s privacy/security/surveillance issues has driven or will drive more consumers toward Linux?**
|
||||
|
||||
**Zemlin**: Around the world, I am hearing people say, “Using open source is a critical to ensure privacy.” So yes, I think that will drive more users people to Linux.
|
||||
|
||||
I also think more consumers are being driven toward Linux for a variety of reasons, in addition to the confidence and trust they have about privacy and security related to the platform. The transparency of the code and development process gives increasingly knowledgeable and aware consumers an option they feel good about.
|
||||
|
||||
[Video game publisher] Valve and [its work on SteamOS][1] is driving more consumers to Linux, as is the ongoing dominance of Android and other consumer devices that run Linux — from televisions to appliances, cars, and more.
|
||||
|
||||
**VentureBeat: Do you have any thoughts on the Ubuntu Edge for phones? Where do you see the market for Linux/Ubuntu phones going in 2014-2015?**
|
||||
|
||||
**Zemlin**: I like seeing potentially interesting new products go to market, especially when they’re Linux-based. It is hard to predict what product will produce a big hit in the phone market from year to year.
|
||||
|
||||
I don’t think it is a stretch to predict phones based on Linux will dominate. Android, Tizen, Ubuntu, Firefox, and more show that Linux can drive innovation in the mobile market and create new experiences for consumers and market opportunities for developers and OEMs.
|
||||
|
||||
What’s exciting about the year ahead, and what I’ll be watching, is how Linux and open source will help connect all of these devices, objects, and services together.
|
||||
|
||||
**VentureBeat: What’s the most exciting use case you’ve seen so far for Linux embedded in automobile systems?**
|
||||
|
||||
**Zemlin**: No question it’s the in-vehicle-infotainment systems being built by Cadillac, Tesla, Toyota, Jaguar, Land Rover, and others.
|
||||
|
||||
For example, the Tesla Model S, which won the Motor Trend Car of the Year [honor] in 2013, features a 17-inch flat-screen computer running a custom-built Linux OS. This is really, really cool stuff.
|
||||
|
||||
And the 2014 Motor Trend Car of the Year was just revealed — the Cadillac CTS sedan — and it also uses Linux for its in-vehicle-infotainment system. Car makers are able to innovate and differentiate with these systems using Linux.
|
||||
|
||||
The success of Linux here can be seen in the latest numbers from IHS Automotive, which reported this month that sales of automotive Linux are expected to rise to 53.7 million units in 2020, passing Microsoft and Blackberry QNX in the global automotive infotainment market.
|
||||
|
||||
The Linux Foundation does a lot of work in this area with its Automotive Grade Linux workgroup. By hosting a neutral, supportive environment among the Linux kernel community, other open-source communities, and the automotive industry, we’re able to help advance automotive Linux technologies among some of the world’s largest automakers including Nissan, Jaguar, Land Rover, Toyota, and more.
|
||||
|
||||
**VentureBeat: How is Linux growing beyond the hardcore developer market, especially with regard to consumers and gamers?**
|
||||
|
||||
**Zemlin**: This year has been a turning a point for Linux with gamers for sure. Valve, the gaming company behind the Steam web platform for Linux, builds and runs all of its source code and animation on Linux. Valve’s CEO Gabe Newell reported at LinuxCon this year that they’re running 198 games on Linux, and with the introduction of the Linux-based Steam, that number will only continue to go up. This is the beginning of a new trend for Linux and gaming.
|
||||
|
||||
Consumers use Linux every day. It is the software that runs our lives. Companies like Google, Facebook, and Twitter are built on Linux and open-source software. At our LinuxCon Europe conference in October, Twitter’s Chris Aniszczyk told the audience: “Twitter is of course all running on Linux. Why would you need anything else?”
|
||||
|
||||
Linux now powers the 1.3 million Android phones that are activated daily, and most of the nearly 600,000 new TVs sold every day. New appliances and cars are being built with Linux. Major transportation systems use the operating system. The superpopular [GoPro uses Linux and open source][2]. The examples are endless.
|
||||
|
||||
And Linux and open source will just keep reaching more into mainstream consumer life. Samsung uses the Linux kernel and Linux-based products throughout its product line, from TVs to phones to home appliances and more.
|
||||
|
||||
Stay tuned — you’ll see more coming that illustrates the growing role of Linux and open source software and collaborative development in everyday life.
|
||||
|
||||
**VentureBeat: What are the biggest opportunities for free and open-source software in 2014, in your opinion?**
|
||||
|
||||
**Zemlin**: We’ve talked about gaming and consumer devices, but the enterprise continues to present even more opportunity for Linux. The rise of cloud computing is creating new challenges for developers and new opportunities for growth. Try to find a public cloud that’s not running Linux.
|
||||
|
||||
The realization of years of promise in software defined networking will be one of the major stories of 2014. People don’t appreciate how big software defined networking and network function virtualization will become. Think about it. Billions of dollars are spent on hardware based switches, routers, load balancers, firewalls, etc.; this is all being abstracted into software. More importantly it is being abstracted via open source software in the sweet spot for OSS which is at this infrastructure layer. I think you’ll see projects like OpenDaylight and others have a big breakout year in 2014.
|
||||
|
||||
Of course, this is all part of a broader trend towards collaborative development, which should be of interest to your readers. I’d predict that in another decade nearly all of infrastructure software will be built collaboratively. Developers in 2014 need to learn how to build software collaboratively and how to work on and contribute to open source software projects. Their career opportunities will be endless if they understand the principles of collaborative development and open source software.
|
||||
|
||||
It’s a thrilling time to be involved in Linux. It’s become the de facto platform to go to for everything from smart watches to TVs to automobiles, you name it.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://venturebeat.com/2013/11/26/linux-chief-open-source-is-safer-and-linux-is-more-secure-than-any-other-os-exclusive/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://venturebeat.com/2013/09/23/steamos-valves-linux-based-operating-system-for-the-tv-and-living-room/
|
||||
[2]:http://gopro.com/support/open-source
|
61
sources/Open Source Is Here To Stay On IBM i.md
Normal file
61
sources/Open Source Is Here To Stay On IBM i.md
Normal file
@ -0,0 +1,61 @@
|
||||
Open Source Is Here To Stay On IBM i
|
||||
================================================================================
|
||||
For years, open source software has been a bit of a redheaded stepchild in the button-down IBM midrange community. IBM i shops were hesitant to use it, and vendors were afraid to adopt it. But with so much of the computing world now running on open source, the aversion to open source has gradually melted away, and it has steadily crept into use among large corporations, and the IBM i world too.
|
||||
|
||||
It is tough to measure the adoption of open source software, which flows freely across networks by its very nature. Nobody requires you to register to use open source software, and there's no central clearinghouse of information about open source software.
|
||||
|
||||
However, recent surveys and audits point to greater adoption of open source across all industries. Open source software components are widely used in in the financial services industry, according to Julian Brook, associate director at SQS Software, which conducts software quality audits for financial software vendors. "I would say that, arguably, open source is used in every organization that is developing software, especially in the financial services world," Brook [told Out-Law.com recently][1].
|
||||
|
||||
Governmental agencies lead the way in use of open source software, according to [Black Duck Software][2]'s 2013 Future of Open Source survey. More than 35 percent of government representatives queried for the survey say they use open source, followed by medical (15.2 percent), media (13 percent), financial (8.8 percent), and retail (5.9 percent). You can view more of the survey at [Slideshare][3].
|
||||
|
||||
Increasingly, users are adopting open source software because they expect higher software quality and security with open source, according to surveys like those from Black Duck. That's very interesting, because for many years, open source software was largely avoided for those two very reasons.
|
||||
|
||||
These are opinion surveys, mind you. They're not necessarily reflections of actual reality. But it is clear than many of the shortcomings that people previously associated with open source software products are disappearing. And slowly but surely, this trend is bleeding over into the competitive world of IBM i software, too.
|
||||
|
||||
### Open Source Impacts On IBM i ###
|
||||
|
||||
The IBM i server is one of the last great bastions of proprietary technology in a world heading in the direction of open source. IBM does not share with the world the guts of the IBM i OS and the System Licensed Internal Code (SLIC) it runs on. You can take what access IBM provides developers to the machine, or you can leave it, but you can't get access to the internals.
|
||||
|
||||
What goes on above the OS and SLIC layers is another matter entirely. We're not seeing a big influx of open source software in the world of ERP and business applications. But in many other software categories, open source options are proliferating.
|
||||
|
||||
One IBM i proponent of open source software is [Raz-Lee][4]. The security software vendor, which relies on the open source [ClamAV][5] offering to power its IBM i-based anti-virus offering, called iSecurity Anti-Virus, says ClamAV had an update for an evolving security threat--the W32/Autorun.worm.aaeh Trojan Horse--months before its competitor had updated the signature library for its IBM i-based antivirus offering.
|
||||
|
||||
"It turns out that ClamAV has been handling this threat . . . as of about eight to nine months ago," Raz-Lee vice president of business development Eli Spitz wrote in an email to IT Jungle last month. "In fact, one of our technicians here at Raz-Lee actually added his own unofficial signature to ClamAV's database before ClamAV included their formal signature for this virus."
|
||||
|
||||
Another IBM i software vendor using open source tools is [Arpeggio Software][6] . The Atlanta, Georgia-based company uses lots of open source components in its various IBM i utilities, which aren't available under an open source license, but which Arpeggio gives away and then charges customers to get technical support, a common approach taken by commercial open source vendors.
|
||||
|
||||
Arpeggio's latest offering, called ARP-DROP, uses the open source OAuth authentication method to help secure communication channels between IBM i servers and [DropBox][7] service running on the Internet. It also uses the OpenSSH encryption technology with ARP-SFTP client for IBM i. Arpeggio's founders (who also founded Trailblazer Systems, now part of [Liaison Technologies][8]) acknowledge that IBM i professionals could adopt the same open source tools to write similar tools. But they argue that Arpeggio does it better, so why not adopt their free tools and save yourself the time?
|
||||
|
||||
In many cases, an IBM i shop's first conscious exposure to open source is the server side scripting language PHP. IBM and [Zend Technology][9] have worked for years to make PHP run well on IBM i, and Zend's entry-level PHP runtime is shipped along with every Power Systems server and IBM i license.
|
||||
|
||||
One of the most popular PHP applications that run on IBM i servers is [SugarCRM][10]. Representatives with the Cupertino, California, company recently said that it has nearly 1,000 customers running the CRM software on IBM i servers. This includes paid enterprise licenses along with free community edition licenses.
|
||||
|
||||
### Fighting Perceptions ###
|
||||
|
||||
Most IBM i shops are big users of IBM i software, whether they know it or not. Some of the biggest, most important IT infrastructure components come from open source, including the Apache Web server, the Linux OS, the Java and PHP programming languages, the MySQL database, and the Eclipse development environment.
|
||||
|
||||
There's no reason not to call open source "commercial grade" anymore, Raz-Lee's Spitz said. "A few weeks ago Sourcefire, the owners of ClamAV, was purchased by [Cisco Systems][11]. That's obviously a 'certification' by a large commercial organization for open source software. So open source anti-virus software seems to be valuable to a multi-national company."
|
||||
|
||||
While open source software is making inroads in the IBM i community, it still has a ways to go to match the momentum that open source enjoys in the IT market as a whole. "It seems that the IBM i community is often less involved with open source and is not exposed to its importance and prevalence in the current computing area," Spitz said. "In many cases, open source is the 'playground' of very large companies who join to create a better arena for us all."
|
||||
|
||||
As the corporations of the world gradually becomes amenable to open source, the IBM i community will have no choice but to follow.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.itjungle.com/tfh/tfh120213-story01.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.out-law.com/en/articles/2013/september/open-source-code-use-within-financial-services-organisations-visibility-only-50-at-best-says-software-quality-expert/
|
||||
[2]:http://www.blackducksoftware.com/
|
||||
[3]:http://www.slideshare.net/blackducksoftware/the-2013-future-of-open-source-survey-results
|
||||
[4]:http://www.razlee.com/
|
||||
[5]:http://www.clamav.net/
|
||||
[6]:http://www.arpeggiosoftware.com/
|
||||
[7]:http://www.dropbox.com/
|
||||
[8]:http://www.liaison.com/
|
||||
[9]:http://www.zend.com/
|
||||
[10]:http://www.sugarcrm.com/
|
||||
[11]:http://www.cisco.com/
|
@ -0,0 +1,208 @@
|
||||
Setup Apache 2.4 and Php FPM with mod proxy fcgi on Ubuntu 13.10
|
||||
================================================================================
|
||||
### mod_proxy_fcgi ###
|
||||
|
||||
The module mod_proxy_fcgi is a new one and it allows apache to connect to/forward requests to an external fastcgi process manager like php fpm. This allows for a complete separation between the running of php scripts and Apache. Earlier we had to use modules like mod_fcgid and mod_fastcgi which all had some limitations. Mod_fcgid for example did not properly utilise the process management capability of php-cgi whereas mod_fastcgi is a third party module.
|
||||
|
||||
With the arrival of mod_proxy_fcgi Apache finally gets the ability to neatly talk to external fastcgi process managers making it more efficient at the task. Delegating php requests to external fpm servers greatly reduces the load on web servers like apache resulting into efficient utilisation of machine resources and faster processing speed for users on the other end. Along with all that, php fpm can run opcode caching engines like apc in a very stable manner.
|
||||
|
||||
So in this post, our task is to setup apache + php-fpm using the mod_proxy_fcgi connector.
|
||||
|
||||
### 1. Setup Apache ###
|
||||
|
||||
Ubuntu 13.10 already ships with apache 2.4 so all installables are in the repository itself.
|
||||
|
||||
Install Apache if not already done
|
||||
|
||||
$ sudo apt-get install apache2
|
||||
|
||||
Enable mod_proxy_fcgi
|
||||
|
||||
$ sudo a2enmod proxy_fcgi
|
||||
Considering dependency proxy for proxy_fcgi:
|
||||
Enabling module proxy.
|
||||
Enabling module proxy_fcgi.
|
||||
To activate the new configuration, you need to run:
|
||||
service apache2 restart
|
||||
|
||||
Restart Apache
|
||||
|
||||
$ sudo service apache2 restart
|
||||
|
||||
### Configure virtual host ###
|
||||
|
||||
Next task is to configure a vhost to use mod fcgi proxy to communicate with fpm. The vhost configuration files are stored in the following location
|
||||
|
||||
/etc/apache2/sites-available
|
||||
|
||||
Get inside there any create your new vhost configuration file by copying the 000-default.conf file which comes with apache.
|
||||
|
||||
$ cd /etc/apache2/sites-available
|
||||
$ sudo cp 000-default.conf mysite.conf
|
||||
$ sudo nano mysite.conf
|
||||
|
||||
Now its time to configure the virtualhost. Here is how I configured the file
|
||||
|
||||
> <VirtualHost *:80>
|
||||
> # The ServerName directive sets the request scheme, hostname and port that
|
||||
> # the server uses to identify itself. This is used when creating
|
||||
> # redirection URLs. In the context of virtual hosts, the ServerName
|
||||
> # specifies what hostname must appear in the request's Host: header to
|
||||
> # match this virtual host. For the default virtual host (this file) this
|
||||
> # value is not decisive as it is used as a last resort host regardless.
|
||||
> # However, you must set it for any further virtual host explicitly.
|
||||
>
|
||||
> ServerName fpm.localhost
|
||||
>
|
||||
> ServerAdmin webmaster@localhost
|
||||
> DocumentRoot /var/www/mysite
|
||||
>
|
||||
> # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
|
||||
> # error, crit, alert, emerg.
|
||||
> # It is also possible to configure the loglevel for particular
|
||||
> # modules, e.g.
|
||||
> #LogLevel info ssl:warn
|
||||
>
|
||||
> ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
> CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
>
|
||||
> # For most configuration files from conf-available/, which are
|
||||
> # enabled or disabled at a global level, it is possible to
|
||||
> # include a line for only one particular virtual host. For example the
|
||||
> # following line enables the CGI configuration for this host only
|
||||
> # after it has been globally disabled with "a2disconf".
|
||||
> #Include conf-available/serve-cgi-bin.conf
|
||||
>
|
||||
> ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/mysite/$1
|
||||
>
|
||||
> <Directory "/var/www/mysite">
|
||||
> Order allow,deny
|
||||
> Allow from all
|
||||
> AllowOverride FileInfo All
|
||||
> # New directive needed in Apache 2.4.3:
|
||||
> Require all granted
|
||||
> </Directory>
|
||||
>
|
||||
> </VirtualHost>
|
||||
|
||||
The important things to note are :
|
||||
|
||||
1. **ServerName** - This is the domain or the subdomain of your vhost. In this example I used fpm.localhost so that when using that sub domain on localhost, php fpm is used. Its just an example.
|
||||
|
||||
2. **DocumentRoot** - This is the root of this vhost from where the web files shall be served.
|
||||
|
||||
3. **ProxyPassMatch** - This is the directive that tells forward all requests for ".php" files to fcgi server at 127.0.0.1:9000. This is where our php fpm process manager would be running. More on this in the next section.
|
||||
The fcgi url must contain the exact path to the document root. Otherwise it would say "File Not Found" when requesting for files.
|
||||
|
||||
> ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/mysite/$1
|
||||
|
||||
The first parameter is the pattern to match. So all urls that have a ".php" in them followed by an option slash and anything else are matched and the matched part is forwarded to the fcgi server running at 127.0.0.1:9000.
|
||||
|
||||
4. **Require all granted** - After the ProxyPassMatch line we added a section with Require and AllowOverride directives. It is necessary as of Apache 2.4
|
||||
|
||||
Save the file and enable it using the a2ensite command which saves the effort to create the symlink in sites-enabled directory.
|
||||
|
||||
$ sudo a2ensite mysite
|
||||
Enabling site mysite.
|
||||
To activate the new configuration, you need to run:
|
||||
service apache2 reload
|
||||
|
||||
Now reload apache configuration
|
||||
|
||||
$ sudo service apache2 reload
|
||||
* Reloading web server apache2
|
||||
|
||||
That completes the apache configuration. The other half of the task is to configure php fpm so that it can finally work.
|
||||
|
||||
### 2. Setup Php-FPM ###
|
||||
|
||||
Next thing is to setup php fpm. Install it via synaptic, if not already done so.
|
||||
|
||||
$ sudo apt-get install php5-fpm
|
||||
|
||||
The configuration files for fpm are located at
|
||||
|
||||
> /etc/php5/fpm
|
||||
|
||||
/etc/php5/fpm$ ls
|
||||
conf.d php-fpm.conf php.ini pool.d
|
||||
|
||||
The pool.d directory contains the configuration file for each fpm pool and php-fpm.conf is the main configuration file. Our only work is to configure a fpm pool that is to be used with apache or the specific virtual host.
|
||||
|
||||
The configuration file for a pool is quite large and there are many parameters that can be configured. But in this post we shall be talking about only the important fields that need be set to get fpm up and running
|
||||
|
||||
> ; Start a new pool named 'www'.
|
||||
> ; the variable $pool can we used in any directive and will be replaced by the
|
||||
> ; pool name ('www' here)
|
||||
> [www]
|
||||
>
|
||||
> ; Per pool prefix
|
||||
> ; It only applies on the following directives:
|
||||
> ; - 'slowlog'
|
||||
> ; - 'listen' (unixsocket)
|
||||
> ; - 'chroot'
|
||||
> ; - 'chdir'
|
||||
> ; - 'php_values'
|
||||
> ; - 'php_admin_values'
|
||||
> ; When not set, the global prefix (or /usr) applies instead.
|
||||
> ; Note: This directive can also be relative to the global prefix.
|
||||
> ; Default Value: none
|
||||
> ;prefix = /path/to/pools/$pool
|
||||
>
|
||||
> ; Unix user/group of processes
|
||||
> ; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
> ; will be used.
|
||||
> user = enlightened
|
||||
> group = enlightened
|
||||
>
|
||||
> ; The address on which to accept FastCGI requests.
|
||||
> ; Valid syntaxes are:
|
||||
> ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
|
||||
> ; a specific port;
|
||||
> ; 'port' - to listen on a TCP socket to all addresses on a
|
||||
> ; specific port;
|
||||
> ; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
> ; Note: This value is mandatory.
|
||||
> listen = 127.0.0.1:9000
|
||||
>
|
||||
> ; Set listen(2) backlog.
|
||||
> ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
|
||||
> ;listen.backlog = 128
|
||||
|
||||
Create a new configuration file by copying the www.conf file. And edit the fields as explained next.
|
||||
|
||||
1. The first options is the name of the pool. We named it 'www' over here. Name it to anything you like or after the domain name it is going to be used with. 'yoursite' for example. That way it would be easier to remember.
|
||||
|
||||
2. Setup the user and group that this pool will run with. When you are setting up multiple sites/domains/virtualhosts on a server, you would always want to setup separate user accounts and corresponding pool for each of those. This is an essential security measure, so that every pool has privileges of its own user only.
|
||||
|
||||
3. Setup the listening socket. This is the socket on which the master fpm process shall listen for incoming requests. This can be a unix socket or a tcp socket. However [mod_proxy_fcgi does not yet support unix sockets][1], so we are limited to tcp sockets.
|
||||
Over here its port number 9000 on localhost.
|
||||
|
||||
Now restart fpm
|
||||
|
||||
$ sudo service php5-fpm restart
|
||||
|
||||
Now the new fpm pool should take effect. You can see the new pool process in htop for example.
|
||||
|
||||
### 3. Test the setup ###
|
||||
|
||||
Now that both apache and php fpm are configured and setup, its time to test. Get inside the document root directory and create a php file containing a call to phpinfo() function and open it in your browser.
|
||||
The "Server API" should be reported as "FPM/FastCGI".
|
||||
|
||||
Now that apache and php are setup, you may want to install other things like APC, mariadb database, phpmyadmin etc. Move around this site to find how-to guides on those.
|
||||
|
||||
### Resources ###
|
||||
|
||||
Check out the following links to learn more
|
||||
[https://wiki.apache.org/httpd/PHP-FPM][2]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.binarytides.com/setup-apache-php-fpm-mod-proxy-fcgi-ubuntu/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://issues.apache.org/bugzilla/show_bug.cgi?id=54101
|
||||
[2]:https://wiki.apache.org/httpd/PHP-FPM
|
216
translated/10 basic examples of Linux ps command.md
Executable file
216
translated/10 basic examples of Linux ps command.md
Executable file
@ -0,0 +1,216 @@
|
||||
ps命令的10个例子
|
||||
================================================================================
|
||||
### Linux ps 命令 ###
|
||||
|
||||
linux的ps命令是一个浏览系统运行的进程的一个最基础的工具。它提供了一个当前进程的快照,还带有一些具体的信息,比如用户id,cpu使用率,内存使用,命令名等它不会像top或者htop一样实时显示数据。即使他在功能和输出上更见但,但是它仍是一个每个linux新人需要了解和学习的一个必要的进程管理/检测工具。
|
||||
|
||||
在本篇中,我门会复习ps命令基本的用法:检测、过滤、以不同的方式排序进程来更好地适应。
|
||||
|
||||
### 语法说明 ###
|
||||
|
||||
ps命令有两种不同风格的语法规则。它们是BSD和UNIX。新人经常感到困惑并会误解这两种风格。因此在继续本篇之前有一些基本的信息要澄清。
|
||||
|
||||
> 注意: "ps aux"不等同于"ps -aux"。比如"-u"用于显示用户的进程,但是"u"意味着显示具体信息。
|
||||
|
||||
BSD 形式 - BSD形式的语法的选项前没有破折号。
|
||||
|
||||
ps aux
|
||||
|
||||
UNIX/LINUX 形式 - linux形式的语法的选项前有破折号。
|
||||
|
||||
ps -ef
|
||||
|
||||
在linux系统上混合这两种语法是可以的。比如 "ps ax -f"。但是本章中我们主要讨论unix形式语法。
|
||||
|
||||
### 如何使用ps命令 ###
|
||||
|
||||
#### 1. 显示所有进程 ####
|
||||
|
||||
下面的命令可以显示所有进程的列表。
|
||||
|
||||
$ ps ax
|
||||
$ ps -ef
|
||||
|
||||
通过管道输出到"less"可以使它滚动。
|
||||
|
||||
使用"u"或者"-f"选项可以显示进程的具体信息。
|
||||
|
||||
$ ps aux
|
||||
$ ps -ef -f
|
||||
|
||||
> 为什么USER列显示的不是我的用户名而是其他的像root,www-data等等?
|
||||
|
||||
对于所有的用户(包括你们的),如果长度大于8个字符,那么ps只会显示你的UID而不是用户名。
|
||||
|
||||
#### 2. 显示用户进程 ####
|
||||
|
||||
使用"-u"选项后跟用户名来过滤所属用户的进程。多个用户名可以用逗号分隔。
|
||||
|
||||
$ ps -f -u www-data
|
||||
UID PID PPID C STIME TTY TIME CMD
|
||||
www-data 1329 1328 0 09:32 ? 00:00:00 nginx: worker process
|
||||
www-data 1330 1328 0 09:32 ? 00:00:00 nginx: worker process
|
||||
www-data 1332 1328 0 09:32 ? 00:00:00 nginx: worker process
|
||||
www-data 1377 1372 0 09:32 ? 00:00:00 php-fpm: pool a.localhost
|
||||
www-data 1378 1372 0 09:32 ? 00:00:00 php-fpm: pool a.localhost
|
||||
www-data 4524 2359 0 10:03 ? 00:00:00 /usr/sbin/apache2 -k start
|
||||
www-data 4527 2359 0 10:03 ? 00:00:00 /usr/sbin/apache2 -k start
|
||||
www-data 4528 2359 0 10:03 ? 00:00:00 /usr/sbin/apache2 -k start
|
||||
|
||||
#### 3. 通过名字或者进程id显示进程 ####
|
||||
|
||||
通过"-C"选项后面加上名字或者命令来搜索进程。
|
||||
|
||||
$ ps -C apache2
|
||||
PID TTY TIME CMD
|
||||
2359 ? 00:00:00 apache2
|
||||
4524 ? 00:00:00 apache2
|
||||
4525 ? 00:00:00 apache2
|
||||
...
|
||||
|
||||
要通过进程id显示进程,就使用"-p"选项,并且它还提供使用逗号来分割进程id。
|
||||
|
||||
$ ps -f -p 3150,7298,6544
|
||||
|
||||
"-C"必须提供精确的进程名,并且它并不能通过部分名字或者通配符查找。为了更弹性地搜索进程列表,通常使用grep命令。
|
||||
|
||||
$ ps -ef | grep apache
|
||||
|
||||
#### 4. 通过cpu或者内存使用排序进程 ####
|
||||
|
||||
系统管理员通常想要找出那些消耗最多内存或者CPU的进程。排序选项会基于特性的字段或者参数排序进程列表。
|
||||
|
||||
多个字段可以用'--sort'指定,并用逗号分割。除此之外,字段前面还可以跟上'-'或者'+'的前缀来相应地表示递减和递增排序。这里有很多的用于排序的选项。通过man页来获取完整的列表。
|
||||
|
||||
|
||||
$ ps aux --sort=-pcpu,+pmem
|
||||
|
||||
显示前5名最耗cpu的进程。
|
||||
|
||||
$ ps aux --sort=-pcpu | head -5
|
||||
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
|
||||
root 1 2.6 0.7 51396 7644 ? Ss 02:02 0:03 /usr/lib/systemd/systemd --switched-root --system --deserialize 23
|
||||
root 1249 2.6 3.0 355800 30896 tty1 Rsl+ 02:02 0:02 /usr/bin/X -background none :0 vt01 -nolisten tcp
|
||||
root 508 2.4 1.6 248488 16776 ? Ss 02:02 0:03 /usr/bin/python /usr/sbin/firewalld --nofork
|
||||
silver 1525 2.1 2.3 448568 24392 ? S 02:03 0:01 /usr/bin/python /usr/share/system-config-printer/applet.py
|
||||
|
||||
#### 5. 以树的形式显示进程层级 ####
|
||||
|
||||
许多进程实际上是从同一个父进程fork出来的,并且了解父子关系通常是很有用的。"--forest" 选项会构造一个ascii艺术形式的进程层级视图。
|
||||
|
||||
下面的命令会用apache2的进程名来搜索并构造一个树来显示具体信息。
|
||||
|
||||
$ ps -f --forest -C apache2
|
||||
UID PID PPID C STIME TTY TIME CMD
|
||||
root 2359 1 0 09:32 ? 00:00:00 /usr/sbin/apache2 -k start
|
||||
www-data 4524 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
|
||||
www-data 4525 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
|
||||
www-data 4526 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
|
||||
www-data 4527 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
|
||||
www-data 4528 2359 0 10:03 ? 00:00:00 \_ /usr/sbin/apache2 -k start
|
||||
|
||||
> 尽量不要在排序中使用树状显示,因为两者都会以不同方式影响显示的顺序。
|
||||
|
||||
#### 6. 显示父进程的子进程 ####
|
||||
|
||||
下面一个是找出所有从apache进程fork出来的进程的例子。
|
||||
|
||||
$ ps -o pid,uname,comm -C apache2
|
||||
PID USER COMMAND
|
||||
2359 root apache2
|
||||
4524 www-data apache2
|
||||
4525 www-data apache2
|
||||
4526 www-data apache2
|
||||
4527 www-data apache2
|
||||
4528 www-data apache2
|
||||
[term]
|
||||
|
||||
第一个属于root的进程是apache2的主进程,其他的apache进程都是从主进程fork出来的。下面的命令使用apache2主进程的pid列出了所有的apache2的子进程。
|
||||
|
||||
[term]
|
||||
$ ps --ppid 2359
|
||||
PID TTY TIME CMD
|
||||
4524 ? 00:00:00 apache2
|
||||
4525 ? 00:00:00 apache2
|
||||
4526 ? 00:00:00 apache2
|
||||
4527 ? 00:00:00 apache2
|
||||
4528 ? 00:00:00 apache2
|
||||
|
||||
#### 7. 显示进程的线程 ####
|
||||
|
||||
"-L"选项会随着进程一起显示线程。它可用于显示所有特定进程或者所有进程的线程。
|
||||
|
||||
下面的命令会显示进程id为3150的进程的所有线程。
|
||||
|
||||
$ ps -p 3150 -L
|
||||
|
||||
#### 8. 改变显示的列 ####
|
||||
|
||||
ps命令可以被配置用来只显示被选中的列。很多列可以被用来显示,并且完整的列表在man页中。
|
||||
|
||||
下面的命令会只显示pid、用户名、cpu、内存、命令列。
|
||||
|
||||
$ ps -e -o pid,uname,pcpu,pmem,comm
|
||||
|
||||
同样可以重命名列的名字。
|
||||
|
||||
$ ps -e -o pid,uname=USERNAME,pcpu=CPU_USAGE,pmem,comm
|
||||
PID USERNAME CPU_USAGE %MEM COMMAND
|
||||
1 root 0.0 0.0 init
|
||||
2 root 0.0 0.0 kthreadd
|
||||
3 root 0.0 0.0 ksoftirqd/0
|
||||
4 root 0.0 0.0 kworker/0:0
|
||||
5 root 0.0 0.0 kworker/0:0H
|
||||
7 root 0.0 0.0 migration/0
|
||||
8 root 0.0 0.0 rcu_bh
|
||||
9 root 0.0 0.0 rcuob/0
|
||||
10 root 0.0 0.0 rcuob/1
|
||||
|
||||
非常弹性化。
|
||||
|
||||
#### 9. 显示进程运行的时间 ####
|
||||
|
||||
运行的时间指的是,进程已经运行的时间。运行时间的列并没有默认显示,需要使用-o选项带入。
|
||||
|
||||
$ ps -e -o pid,comm,etime
|
||||
|
||||
#### 10. 将ps转换为实时进程查看器 ####
|
||||
|
||||
As usual, the watch command can be used to turn ps into a realtime process reporter. Simple example is like this
|
||||
通常上,watch命令可将ps命令变成实时进程查看器。像这个简单的命令
|
||||
|
||||
$ watch -n 1 'ps -e -o pid,uname,cmd,pmem,pcpu --sort=-pmem,-pcpu | head -15'
|
||||
|
||||
我桌面上的输出就像这样。
|
||||
|
||||
Every 1.0s: ps -e -o pid,uname,cmd,pmem,pcpu --... Sun Dec 1 18:16:08 2013
|
||||
|
||||
PID USER CMD %MEM %CPU
|
||||
3800 1000 /opt/google/chrome/chrome - 4.6 1.4
|
||||
7492 1000 /opt/google/chrome/chrome - 2.7 1.4
|
||||
3150 1000 /opt/google/chrome/chrome 2.7 2.5
|
||||
3824 1000 /opt/google/chrome/chrome - 2.6 0.6
|
||||
3936 1000 /opt/google/chrome/chrome - 2.4 1.6
|
||||
2936 1000 /usr/bin/plasma-desktop 2.3 0.2
|
||||
9666 1000 /opt/google/chrome/chrome - 2.1 0.8
|
||||
3842 1000 /opt/google/chrome/chrome - 2.1 0.8
|
||||
4739 1000 /opt/google/chrome/chrome - 1.8 1.0
|
||||
3930 1000 /opt/google/chrome/chrome - 1.7 1.0
|
||||
3911 1000 /opt/google/chrome/chrome - 1.6 0.6
|
||||
3645 1000 /opt/google/chrome/chrome - 1.5 0.4
|
||||
3677 1000 /opt/google/chrome/chrome - 1.5 0.4
|
||||
3639 1000 /opt/google/chrome/chrome - 1.4 0.4
|
||||
|
||||
输出会每秒刷新状态。但不要认为这和top相似。
|
||||
|
||||
你会发现top/htop命令的输出相比上面的ps命令刷新得更频繁。
|
||||
|
||||
这是因为top输出会cpu使用和内存使用值混合排序后的输出。但是上面的ps命令是一个更简单的行为的排序,每次获取一列(像学校的数学)。因此它不会像top那样快速更新。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.binarytides.com/linux-ps-command/
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -1,15 +1,14 @@
|
||||
|
||||
13 Linux Cat命令管理(显示,排序,建立)文件实例
|
||||
13个 Linux Cat命令管理(显示,排序,建立)文件实例
|
||||
================================================================================
|
||||
![](http://linoxide.com/wp-content/uploads/2013/11/linux-cat-command.png)
|
||||
|
||||
Linux系统中,许多配置文件,Logs文件,甚至shell脚本都使用文本文件格式,因此,Linux系统存在着多种文本编辑器,但当你仅仅想要查看一下它们里的内容时,可使用cat命令。
|
||||
在Linux系统中,大多数配置文件、Logs文件,甚至shell脚本都使用文本文件格式,因此,Linux系统存在着多种文本编辑器,但当你仅仅想要查看一下这些文件的内容时,可使用一个简单的命令-cat.
|
||||
|
||||
cat手册里这样描述:
|
||||
|
||||
> cat命令读取文件内容,并输出到标准设备上面
|
||||
|
||||
cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请跟随我来一起使用它.
|
||||
cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来,让我们开始学习如何使用.
|
||||
|
||||
### 1. 显示文件内容 ###
|
||||
|
||||
@ -20,9 +19,9 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
|
||||
CentOS release 5.10 (Final)
|
||||
Kernel \r on an \m
|
||||
|
||||
### 2. 在行首显示行号 ###
|
||||
### 2. 在运行中显示行号 ###
|
||||
|
||||
当在读取内容很多的配置文件时,加上-n参数可实现在行首显示行号。
|
||||
当在读取内容很多的配置文件时,在运行中显示行号将会使操作变简单,加上-n参数可以实现.
|
||||
|
||||
|
||||
# cat -n /etc/ntp.conf
|
||||
@ -40,7 +39,7 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
|
||||
|
||||
### 3. 在行首显示非空行号 ###
|
||||
|
||||
类似于-n参数,-b也在行首显示行号.但它显示的行号为非空行行号
|
||||
类似于-n参数,-b也在运行中显示行号.区别在于-b只显示非空行行号.
|
||||
|
||||
#cat -b /etc/ntp.conf
|
||||
|
||||
@ -61,7 +60,7 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
|
||||
|
||||
# cat -T /etc/hosts
|
||||
|
||||
# Do not remove the following line, or various programs
|
||||
# Do not remove the following line, or various programs
|
||||
# that require network functionality will fail.
|
||||
127.0.0.1^I^Ilocalhost.localdomain localhost
|
||||
::1^I^Ilocalhost6.localdomain6 localhost6
|
||||
@ -90,7 +89,7 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
|
||||
|
||||
### 7. 每页满屏显示 ###
|
||||
|
||||
当文件内容超过一屏显示范围时,可结合cat命令与其它命令满屏显示.使用管道符 ( | ).
|
||||
当文件内容显示不适合你的屏幕, 可结合cat命令与其它命令满屏显示.使用管道符 ( | ).
|
||||
|
||||
# cat /proc/meminfo | less
|
||||
|
||||
@ -101,8 +100,11 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
|
||||
### 8. 同时查看2个文件中的内容 ###
|
||||
|
||||
位于/root文件夹里有两人文件取名linux及desktop,每个文件含有以下内容 :
|
||||
|
||||
**Linux** : ubuntu, centos, redhat, mint and slackware
|
||||
|
||||
**Desktop** : gnome kde, xfce, enlightment, and cinnamon
|
||||
|
||||
当你想同时查看两文件中的内容时,可按如下方法 :
|
||||
|
||||
# cat /root/linux /root/desktop
|
||||
@ -120,7 +122,7 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
|
||||
|
||||
### 9. 排序显示 ###
|
||||
|
||||
类似. 你也可结合 **sort**管道符对内容进行排序显示. 举例 :
|
||||
类似. 你也可以结合cat命令与其它命令来进行自定义输出. 如结合 **sort**管道符对内容进行排序显示. 举例 :
|
||||
|
||||
# cat /root/linux | sort
|
||||
|
||||
@ -132,7 +134,7 @@ cat是一条linux内置命令. 几乎所有linux发行版都内置.接下来请
|
||||
|
||||
### 10. 输入重定向 ###
|
||||
|
||||
你也可将显示结果输出重定向到屏幕或另一个文件. 只需要使用 > 符号即可输出生成到另一个文件.
|
||||
你也可将显示结果输出重定向到屏幕或另一个文件. 只需要使用 > 符号(大于号)即可输出生成到另一个文件.
|
||||
|
||||
# cat /root/linux > /root/linuxdistro
|
||||
|
||||
@ -149,7 +151,7 @@ Linux下有多种方法新建文件. 其中使用cat就是方法之一.
|
||||
Windows
|
||||
MacOS
|
||||
|
||||
当你打入cat > operating_system,它会生成一个operating_system的文件. 然后下面会显示空行. 此时你可输入内容.比如我们输入Unix, Linux, Windows and MacOS. 输入完成后, **按Ctrl-D**存盘退出cat. 此时你会发现当前文件夹下会生成一个包含你刚才输入内容的叫 **operating_system**的文件.
|
||||
当你输入cat > operating_system,它会生成一个operating_system的文件. 然后下面会显示空行. 此时你可输入内容.比如我们输入Unix, Linux, Windows and MacOS. 输入完成后, **按Ctrl-D**存盘退出cat. 此时你会发现当前文件夹下会生成一个包含你刚才输入内容的叫 **operating_system**的文件.
|
||||
|
||||
### 12.向文件中追加内容 ###
|
||||
|
||||
@ -175,7 +177,7 @@ Linux下有多种方法新建文件. 其中使用cat就是方法之一.
|
||||
|
||||
### 13. 重定向输入 ###
|
||||
|
||||
你可使用 **<**命令将文件输入到cat中 .
|
||||
你可使用 **<**命令(小于号)将文件输入到cat中.
|
||||
|
||||
# cat < /root/linux
|
||||
|
||||
@ -207,6 +209,6 @@ Linux下有多种方法新建文件. 其中使用cat就是方法之一.
|
||||
|
||||
via: http://linoxide.com/linux-command/13-cat-command-examples/
|
||||
|
||||
译者:[hongchuntang](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[hongchuntang](https://github.com/译者ID) 校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,34 @@
|
||||
每日Ubuntu小技巧 - 更换菜单风格
|
||||
================================================================================
|
||||
每日Ubuntu小技巧 - 喜欢GNOME风格菜单?安装Class Menu Indicator吧
|
||||
|
||||
对于那些从初学者一直关注Ubuntu操作系统的人,他们看见几乎所有的Ubuntu经历的改变。发生了许多的改变,尤其是在桌面部分。从经典的GNOME桌面环境到Unity,Ubuntu已经完全地重新设计了。
|
||||
|
||||
对于那些新用户,他们所知道的是Unity桌面环境和仅仅只是听说过,或者见过在支持Ubuntu之前的原始的GNOME桌面环境。
|
||||
|
||||
如果你是一个老资格,想要在Ubuntu的Unity回到GNOME风格的菜单,安装Classic Menu Indicator 可以解决这个问题。这个俏皮的包被安装在顶部面板的通知区域,在Ubuntu中带回了GNOME风格菜单体验。
|
||||
|
||||
像经典的GNOME菜单一样,它包括所有的应用和经典菜单结构。对于曾经使用过它的人们是容易导航和开启应用。对于新用户,它也是容易掌握。
|
||||
|
||||
接下来的简短指导将会告诉你如何在Ubuntu中安装这个包。
|
||||
|
||||
马上开始,在键盘上按下 **Ctrl – Alt – T** 打开终端。
|
||||
打开完毕后,运行下列命令,加入它的PPA文件
|
||||
|
||||
sudo apt-add-repository ppa:diesch/testing
|
||||
|
||||
接来下,运行下列命令安装它。
|
||||
|
||||
sudo apt-get update && sudo apt-get install classicmenu-indicator
|
||||
|
||||
安装完成后,在Unity Dash中启动。它叫Classic Menu Indicator.当你启动它的时候,它会自动的嵌入顶部面板,如下图。
|
||||
![](http://www.liberiangeek.net/wp-content/uploads/2013/11/classic-menu-indicator.png)
|
||||
|
||||
就是这样,使用并享受吧!
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.liberiangeek.net/2013/11/daily-ubuntu-tipslike-gnome-classic-menu-get-classic-menu-indicator/
|
||||
|
||||
译者:[Vic___](http://blog.csdn.net/Vic___) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,91 @@
|
||||
Linux 宗旨:‘开源很安全,Linux比其它任何系统都安全’
|
||||
|
||||
================================================================================
|
||||
在对Linux基金会执行官,Jim Zemlin 的采访中,VentureBeat 展望了2014开源操作系统的未来。
|
||||
|
||||
We also addressed the controversial issues of government spying and “backdoors” — those nefarious windows into our personal online lives that the public recently discovered in most of the services we use every day.
|
||||
|
||||
我们也探讨了争议性的话题,就是政府部门的监听事件以及‘后门’-那些邪恶的窗口,窥探我们网上的私生活,最近公众发现我们经常使用的大多数服务都有类似的遭遇。
|
||||
|
||||
Zemlin gave us the skinny on how and why GNU/Linux remains the most secure option for concerned consumers — and why it’s becoming the OS of choice for powering cars, phones, TVs, and all kinds of emerging devices.
|
||||
Zemlin 为我们解释了 GNU/Linux 为什么以及如何使自身成为内心有些担忧的消费者的最安全的选择。还有就是为什么选择GNU/Linux作为车载操作系统,TVs以及其他新兴设备的操作系统。
|
||||
|
||||
以下是我们e-mail问答形式的实录。
|
||||
|
||||
----------
|
||||
|
||||
**VentureBeat: 安全和隐私成为今年的热门话题,我们听到的谣言,Linus[Torvalds, Linux 创始人]对政府部门是否有安装后门的要求点头称是。**
|
||||
|
||||
**Zemlin**: Linux是否有后门,你是可以知道的.
|
||||
|
||||
世界上所有人都可以看到Linux的每一行代码。这也是linux要比其他操作系统更安全、开源整体要比闭源更安全的原因之一。代码的透明度保证了它的安全性。
|
||||
|
||||
And for the record: He wasn’t approached.
|
||||
记录在案的是:后门并没有进入到linux。
|
||||
|
||||
**VentureBeat: Linux基金会如何保证Linux用户的隐私和自由,使其免于遭受追踪和监视?**
|
||||
|
||||
**Zemlin**: 对此,我们一以贯之。向内核插入违反隐私权和背离自由精神的代码而不被成千上万的开发者注意到,这是很难的。Linux的本性就是自我定制。
|
||||
|
||||
**VentureBeat: 今年的隐私/安全/监视事件会不会促使, 或者将会促使更多的消费者倾向于Linux,对此你作何感想?**
|
||||
|
||||
**Zemlin**: 世界范围内,我听到人们都在说,“用开源保证隐私是必须的。”的确,那会促使更多的使用者选择Linux。
|
||||
|
||||
除了他们对linux平台下的隐私和安全持自信、信任的态度以外, 我认为消费者会基于多种原因选择Linux。
|
||||
代码的透明性以及开发过程逐渐给予博学和警觉的消费者一个选择,一个会让他们对linux感觉良好的选择。
|
||||
|
||||
[视频游戏发行商] Valve [及其SteamOS下的工作][1] 正在促使更多的消费者走进Linux,就像逐渐占据主导的Android和其他运行Linux的电子设备一样,比如电视、家电、汽车等,当然还有更多。
|
||||
|
||||
**VentureBeat: 针对手机的Ubuntu Edge, 对它有何看法? 对于2014-2015年Linux/Ubuntu手机市场走势,你作何预测?*
|
||||
|
||||
**Zemlin**:我希望看到潜在的有趣的新产品进入市场,尤其是基于Linux的产品。很难说每年哪款产品会成为手机市场的新宠。
|
||||
|
||||
我认为预测基于Linux的手机将占据主导地位,不算夸大事实。Android, Tizen, Ubuntu, Firefox,等等等等,都显示出Linux可以驱动手机市场的创新,并且为消费者创造新的体验,为开发者和OEMs创造机会。
|
||||
|
||||
明年令人振奋的及我所关注的,就是,linux和开源界如何把这些设备、对象和服务关联到一起。
|
||||
|
||||
**VentureBeat: What’s the most exciting use case you’ve seen so far for Linux embedded in automobile systems?**
|
||||
**VentureBeat: 目前为止,你看到的linux嵌入式车载系统的最令人激动的使用案例是什么?**
|
||||
|
||||
**Zemlin**: 毫无疑问,就是,Cadillac, Tesla, Toyota, Jaguar, Land Rover等都搭建了车载信息娱乐系统。
|
||||
|
||||
比如,今年赢得了 “年度汽车族”奖项的Tesla Model S,装备了一个17英寸平面、运行着定制Linux的电脑。这真的是太酷了。
|
||||
|
||||
2014年度汽车族刚刚揭晓 -- Cadillac CTS sedan, 也是使用linux作为车载信息娱乐系统。汽车制造商有能力使用linux进行创新并区别使用这些系统。
|
||||
|
||||
Linux的成功也能从来自IHS汽车的最新数据上看到,IHS本月报告称,在全球车载信息娱乐市场,基于linux的汽车销量2020年有望达到5.37千万,超过微软和黑莓QNX。
|
||||
|
||||
Linux基金会协同汽车级Linux工作组在该领域做了许多工作。通过在Linux内核社区,其他开源社区,以及汽车行业,营造一个中立、支持性的环境,针对一些世界上大的汽车制造商如日产,捷豹,路虎,丰田,等等,我们可以帮助其推动汽车linux技术。
|
||||
|
||||
**VentureBeat: 在硬核开发者市场以外,Linux是如何发展壮大的,尤其是考虑到消费者和游戏玩家?**
|
||||
|
||||
**Zemlin**:可以肯定的是,对游戏玩家来说,今年是linux的一个转折点。Valve, 基于Steam网络平台的一个游戏厂商,在linux上构建并运行所有的源代码和动画。Valve CEO Gabe Newell 称,今年的LinuxCon大会上他们在linux平台运行了198个游戏,随着引进基于linux的Stream,这个数字还会上升。这是Linux和游戏界新趋势的开端。
|
||||
|
||||
用户每天都在用linux。软件支撑着我们的日常生活。像Google,Facebook还有Twitter等公司,都建立在Linux和开源软件之上。去年10月份LinuxCon欧洲大会上,来自Twitter的Chris Aniszczyk告诉观众:
|
||||
“Twitter 理所当然完全运行在linux上。为什么你们还需要其他的东西?”(言外之意就是有linux就够了,不需要别的什么东西了。)
|
||||
|
||||
如今Linux驱动着130万台日常用Android手机,每天近60万基于linux的新电视售出。新的家电以及汽车都建立在linux之上。主要交通系统也都在使用linux。最受欢迎的[GoPro 使用linux和开源软件][2]。举不完的例子。
|
||||
|
||||
Linux和开源理念将会逐渐融入主流消费者的生活。三星使用linux内核以及基于linux的产品充实它的产品线,从电视机到手机,再到家电,等等等等。
|
||||
|
||||
敬请关注 - 你会看到更多的实例,无不展现出Linux和开源软件以及协同开发在日常生活中发挥越来越大的作用。
|
||||
|
||||
**VentureBeat: 在你看来,到2014年,免费和开源软件最大的机遇会是什么?**
|
||||
|
||||
**Zemlin**: 我们已经谈到游戏和电子设备,但是企业将会继续为linux呈现更多的机会。云计算的兴起为开发者带来新的机遇和挑战。你试着去找找没有运行在linux上的公共云。
|
||||
|
||||
软件定义的网络实现将成为2014年的主要活动之一。人们并没有期望着软件定义网络以及网络功能虚拟化变得多么大。想想吧。数十亿美元花费在硬件上,交换机,路由,负载均衡器,防火墙等等。这些都抽象成了软件。更更重要的是,它是在开源软件的基础架构甜蜜点OSS层被抽象。我认为你会看到,像OpenDaylight项目以及其他项目,在2014年都会有大的突破。
|
||||
|
||||
当然,这只是实现协同发展的大趋势的一部分,你的读者应该会对此感兴趣。我的推测是再过一个20年,几乎所有的基础软件都会议协同开发的方式进行构建。2014年开发者需要学习如何以协同方式构建软件,要学会如何参与开源项目并且贡献代码。如果开发者能够理解协同开发和开源的原则和理念,那么他们职业生涯中的机遇将会是无穷的。
|
||||
|
||||
参与到linux的世界中来,这是一个激动人心的时刻。从智能手表到电视机,到汽车,所有你能想到的,Linux成为事实上的平台。
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://venturebeat.com/2013/11/26/linux-chief-open-source-is-safer-and-linux-is-more-secure-than-any-other-os-exclusive/
|
||||
|
||||
译者:[译者ID](https://github.com/l3b2w1) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://venturebeat.com/2013/09/23/steamos-valves-linux-based-operating-system-for-the-tv-and-living-room/
|
||||
[2]:http://gopro.com/support/open-source
|
Loading…
Reference in New Issue
Block a user