Merge pull request #3 from LCTT/master

2015/01/24
This commit is contained in:
Junkai 2015-01-24 12:26:17 +08:00
commit c4165b3de8
11 changed files with 509 additions and 321 deletions

View File

@ -0,0 +1,47 @@
2015:开源已经完胜,但这并不是结束
================================================================================
> 在 2014 年的完胜后,接下来会如何?
新年伊始,习惯上都是回顾已经走过的一年。但只要一直关注我们,就会很容易获得过去一年的总结:开源已经全胜。让我们从头开始说起吧:
**超级计算机**: Linux 在超级计算机系统 500 强的名单上占据绝对的主导地位这本身就令其它操作系统很尴尬。[2014年11月的数据][1]显示前500系统中的485个系统都在运行着 Linux 的发布系统,而仅仅只有一台运行着 Windows 系统。如果您看看所用的处理器数量,这数据更是让人惊叹。截止到目前,运行 Linux 系统的处理器有 22,851,693 个之多,而 windows 系统仅仅只有 30,720。这意味着什么Linux 不仅仅是占据主导地位,在大型系统中已经是绝对的霸主了。
**云计算**: 去年, Linux 基金会撰写了一个有趣的[报告][2],是关于大公司在云端使用 Linux 的情况的。它发现 75% 的大公司在使用 Linux 系统作为他们的主要平台,相对的使用 Windows 系统的只占 23%。因为需要考虑云端和非云端的因素,它们已经混淆在一起了,所以很难把这比例对应到真实的市场份额里。但是,鉴于当前云计算的流行度,可以很确定的说明 Linux 使用的高速增长。事实上,同样的调查发现,在云端的 Linux 部署率已经从 45% 增长到 79%,而对于 Windows 来说已经从 45% 下降到 36%。当然了,某些人可能认为 Linux 基金会在这块上并不是完全公正无私的,但即使是有私心或是因统计的不确定性而有失公允,事情也正朝着预料的正确方向迈进。
**Web 服务器**: 开源已经统治这个行业近20年 - 取得了一份很惊人的成绩。然而,最近在市场份额上出现了一些有趣的变动:一点就是,在 Web 服务器的总计数上,微软的 IIS 服务已经超越了 Apache 服务。但正如 Netcraft 公司其最近的[分析][3]解释所说的那样,这儿还有很多令人大饱眼福的地方呢:
> 这是网站总数持续大幅回落以来的第二个月从一月份以来本月达到了最低点。与十一月份情况一样损失的仅仅只是集中在一小部分的主机提供商中只占了5200万主机名数的十大点。这点损失相比于激活的站点和网站来说不是一个数据级的所以造不成什么影响但激活的这些站点大部分都是广告类的链接页面池基本上没有原创的内容。大多数这些站点都是运行在微软的 IIS 服务器上的所以在2014年7月份的调查中 IIS 的使用数就超过了 Apache。然而近期跌势已导致其市场份额下降到 29.8现在已经低于Apache 10个百分点了。
这表明微软的所谓“激增”更多的是表象而事实并非如此它的大多数增加都是基于没什么有用内容的链接页面池。事实上Netcraft公司的关于活动网站的数据给我们描绘了一幅完全不同的图表Apache 拥有 50.57 的市场份额nginx 的是 14.73 位居第二;微软的 IIS 很无力,占到了相当微弱的 11.72%。这意味着在活跃 Web 服务器市场上开源大约有65的份额 - 虽然没有超级计算机那么高的水平,但也还不错。
**移动设备系统**. 目前,开源的大军主要是 Andriod 为基础在不断高歌猛进。最新数据表明在2014年第三季度的智能手机出货量中Andriod 设备的市场份额从去年同期的 81.4% 上升到了 [83.6%][4]。苹果的从去年同期的 13.4% 下降到 12.3%。对于平板电脑来说Android 平板遵循同样的轨迹在2014年第二季度Android 平板的占有率达到[全球平板电脑的销量的75][5]左右而苹果的只有25
**嵌入式系统**: 虽然很难量化 Linux 在的重要的嵌入式系统市场的市场份额,但来一个自 2013 年的研究数字表明,[按规划,大约一半的嵌入式系统][6]将会采用 Linux。
**物联网**: 在很多方面上可以把它们简单的认为是嵌入式系统的另外一个化身,不同之处在于它们被设计为一直在线的。虽然现在谈论它的市场份额还有点为时过早,但如我在[讨论栏目][7]里说的AllSeen 的物联网开源框架正进行的如火如荼。他们所缺少的也最引入注目的事情只是还没有任何可信任的闭源项目对手。因此,很有可能物联网将会通过开源的方式来达到 Linux 在超级计算机中的占有率这样的水平。
当然了,这个阶段的成功也带来了一些问题:我们将何去何从?鉴于开源将会使很多成功的行业达到饱和点,想必唯一的办法就是下跌吗?要回答这个问题,我建议浏览下 Christopher Kelty 于2013年写的一篇供同行参阅、发人深省的文章有个耐人寻味的标题“[天下没有免费的软件][8]”。下面是他的开头段:
> 自由软件并不存在。在我写了一整本书后,我莫名的忧伤。但这也是我写进文章的一个观点。自由软件和与它一体两面的开源正在不断的变化着。它并不是一直持续不变的,不稳定、不固定、不持久,这正是它的特色的一部分。
换句话说无论2014年带给我们多少惊人的免费软件我们也确信2015年会更多更丰富因为进化是永无止境的。
--------------------------------------------------------------------------------
via: http://www.computerworlduk.com/blogs/open-enterprise/open-source-has-won-3592314/
作者:[lyn Moody][a]
译者:[runningwater](https://github.com/runningwater)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.computerworlduk.com/author/glyn-moody/
[1]:http://www.top500.org/statistics/list/
[2]:http://www.linuxfoundation.org/publications/linux-foundation/linux-end-user-trends-report-2014
[3]:http://news.netcraft.com/archives/2014/12/18/december-2014-web-server-survey.html
[4]:http://www.cnet.com/news/android-stays-unbeatable-in-smartphone-market-for-now/
[5]:http://timesofindia.indiatimes.com/tech/tech-news/Android-tablet-market-share-hits-70-in-Q2-iPads-slip-to-25-Survey/articleshow/38966512.cms
[6]:http://linuxgizmos.com/embedded-developers-prefer-linux-love-android/
[7]:http://www.computerworlduk.com/blogs/open-enterprise/allseen-3591023/
[8]:http://peerproduction.net/issues/issue-3-free-software-epistemics/debate/there-is-no-free-software/

View File

@ -1,150 +0,0 @@
Translating By H-mudcup
Top 4 Linux download managers
================================================================================
**Improve and better manage your web downloads for mirroring, mass grabs or just better control over your files**
Download managers seem to be old news these days, but there are still some excellent uses for them. We compare the top four of them on Linux.
### [uGet][1] ###
Advertised as lightweight and full- featured like a majority of other Linux apps, uGet can handle multi- threaded streams, includes filters and can integrate with an undefined selection of web browsers. Its been around for over ten years now, starting out as UrlGet, and can also run on Windows.
![uGet is actually very full-featured, with a lot of the kind of functions that advanced torrent clients use](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/uget1.png)
uGet is actually very full-featured, with a lot of the kind of functions that advanced torrent clients use
#### Interface ####
uGet reminds us of any number of torrent client interfaces, with categories for Active, Finished, Paused and so on for the different downloads. Although there is a lot of information to take in, its all presented very cleanly and clearly. The main downloading controls are easy to access, with more advanced ones alongside them.
#### Integration ####
While it can see into the clipboard for URLs, uGet doesnt natively integrate into browsers like Chromium and Firefox. Still, there are add-ons for both these browsers that allow them to connect to uGet: Firefox via FlashGot and Chromium with a dedicated plug-in. Not ideal, but good enough.
#### Features ####
uGets maturity affords it a range of features, including advanced scheduling to switch downloading on and off, batch download via the clipboard and the ability to change which file types it looks for in the clipboard. There are plug-in options, but not a huge amount.
#### Availability ####
While its also available in most major distro repos, the uGet website includes regularly updated binaries for a variety of popular distributions as well as easily accessible source code. It runs on GTK 3+ so it has a smaller footprint in some desktop environments than others, although wed say its worth the extra dependancies in KDE or other Qt desktops.
#### Overall ####
8/10
We very much like uGet its wide variety of features and popularity have allowed it to develop quite a lot to be an all-encompassing solution to download management, with some decent integration with Linux browsers.
### [KGet][2] ###
KDEs own download manager seems to have been originally designed to work with Konqueror, the KDE web browser. It comes with the kind of features were looking for in this test: control of multiple downloads and the ability to run a checksum alongside the downloaded product.
![You need to manually activate the ability to keep an eye on the clipboard for links](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/kget1.png)
You need to manually activate the ability to keep an eye on the clipboard for links
#### Interface ####
As expected of a KDE app, KGet fits the aesthetic style of the desktop environment with similar icons and curves throughout. Its quite a simple design as well, with only the most necessary functions available on the main toolbars and a minimal view of the current downloads.
#### Integration ####
KGet natively integrates with KDEs Konqueror browser, although its not the most popular. Support for it in Firefox is done via FlashGot as usual, but theres no real way to do it in Chromium. You can turn on a feature that asks if you want to download copied URLs, however it doesnt parse the clipboard very well and sometimes wants to download text.
#### Features ####
The selection of features available are not that high. No scheduling, no batch operations and generally an almost bare-minimum amount of downloading features. The clipboard-scanning feature is a nice idea but its a bit buggy. Its a little weird as the Settings menu looks like its designed to have more settings and options.
#### Availability ####
While it doesnt come by default with a KDE install, it is available for any distro that supports KDE. It does need a few KDE libraries to run though, and its a bit tricky to find the source code. There isnt a selection of binaries that you can use with a few distros either.
#### Overall ####
6/10
KGet doesnt really offer users a huge amount more than the download manager in the majority of popular browsers, although at least you can use it while the browsers are otherwise turned off.
### [DownThemAll!][3] ###
DownThemAll, being somewhat platform-independent, comes to Linux by way of Firefox as an add- on. This limits it somewhat to use with only Firefox, however as one of the most popular browsers in the world its tighter integration may be just what some are looking for in a download manager.
![There are actually a whole lot of options available for DownThemAll! that make it very flexible](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/down1.png)
There are actually a whole lot of options available for DownThemAll! that make it very flexible
#### Interface ####
Part of the integration in Firefox allows DownThemAll! to slot into the standard aesthetic of the browser, with right-clicking bringing up options alongside the normal downloading ones. The extra dialog menus are generally themed after Firefox as well, while the main download window is clean and based on its own design
#### Integration ####
It doesnt integrate system-wide but its ability to camouflage itself with Firefox makes it seem like an extra part of the original browser. It can also run alongside the normal downloader if you want, and can find specific link types on a webpage with little manual filtering, and no need for copy and pasting.
#### Features ####
With the ability to control how many downloads can happen at once, limit bandwidth when not idle and advanced auto or manual filtering, DownThemAll! is full of excellent features that aid mass downloading. The One Click function also allows it to very quickly start downloads to a pre- determined folder faster than normal download functions.
#### Availability ####
Firefox is available on just about every distro and other operating system around, which makes DownThemAll! just as prolific. Unfortunately this is a double-edged sword, as Firefox may not be your browser of choice. It also adds a little weight to the browser, which isnt the lightest to begin with.
#### Overall ####
7/10
DownThemAll! is excellent and if you use Firefox you may not need to use anything else. Not everyone uses Firefox as their preferred browser though, and it needs to be left on for the manager to start running.
### [Steadyflow][4] ###
Easily available in Ubuntu and some Debian-based distros, Steadyflow may be limited in terms of where you can get it but its got a reputation in some circles as one of the better managers available for any distro. It can read the clipboard for URLs, use GNOMEs preset proxies and has many other features.
![The settings in Steady flow are extremely limiting and somewhat difficult to access](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/steady1.png)
The settings in Steady flow are extremely limiting and somewhat difficult to access
#### Interface ####
Steadyflow is quite simple in appearance with a pleasant, clean interface that doesnt clutter the download window. The dialog for adding downloads is simple enough, with basic options for how to treat it and where the file should live. Its nothing we can really complain about, although it does remind us of the lack of features in the app.
#### Integration ####
Reading copied URLs is as standard and theres a plug-in for Chromium to integrate with that. Again, you can use FlashGot to link it up to Firefox if thats your preferred browser. You cant really edit what it parses from the clipboard though and theres no batch ability like in uGet and DownThemAll!
#### Features ####
Extremely lacking in features and the Options menu is very limited as well. The Pause and Resume function also doesnt seem to work a basic part of any browsers file download features. Still, notifications and default action on finished files can be edited, along with an option to run a script once downloads are finished.
#### Availability ####
Only available on Ubuntu and theres no easy way to get the source code for the app either. This means while its easily obtainable on all Ubuntu- based distros, its limited to these types of distros. As its not even the best download manager available on Linux, that shouldnt be too big of a concern.
#### Overall ####
5/10
Frankly, not that good. With very basic options and limited to only working on Ubuntu, Steadyflow doesnt do enough to differentiate itself from the standard downloading options youll get on your web browser.
### And the winner is… ###
#### uGet ####
In this test weve proven that there is a place for download managers on modern computers, even if the better ones have cribbed from the torrent clients that seem to have usurped them. While torrenting may be a more effective way for some, with ISPs getting wiser to torrent traffic some people may get better results with a good download manager. Not only are transfer caps imposed by most major ISPs, some are even beginning to slow- down or even block torrent traffic in peak hours even legal traffic such as distro ISOs and other free software are throttled.
Steadyflow seems to be a very popular solution for this, but our usage and tests showed an underdeveloped and weak product. The much older uGet was the star of the show, with an amazing selection of features that can aid in downloading single items or filtering through an entire webpage for relevant items to grab. The same goes for DownThemAll!, the excellent Firefox add-on that, while stuck with Firefox, has just about the same level of features, albeit with better integration.
If youre choosing between the two it really comes down to what your preferred browser is and whether you need to have downloads and uploads going around the clock. DownThemAll! requires Firefox running, whereas uGet runs on its own, saving a lot of resources and electricity in the process obviously this makes uGet a much better prospect for 24-hour data transferring and it really isnt a major hassle to set up big batch downloads, or even just get the download information from your browser.
Give download managers another chance. You will not be disappointed with the results.
--------------------------------------------------------------------------------
via: http://www.linuxuser.co.uk/reviews/top-4-linux-download-managers
作者Rob Zwetsloot
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://bit.ly/1mx4Uwz
[2]:http://bit.ly/1lilqU9
[3]:http://bit.ly/1lilqU9
[4]:http://bit.ly/1lilymS

View File

@ -1,58 +0,0 @@
Vic020
Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04
================================================================================
If you do a distribution upgrade from **Ubuntu** 12.04 to 14.04, the upgrade will bring among other things an important update to **Apache**, from [version 2.2][1] to version 2.4. The update brings many improvements but it may cause some errors when used with the old configuration file from 2.2.
### Access control in Apache 2.4 Virtual Hosts ###
Starting with **Apache 2.4** authorization is applied in a way that is much more flexible then just a single check against a single data store like it was in 2.2. In the past it was tricky to figure how and in what order authorization is applied but with the introduction of authorization container directives such as and , the configuration also has control over when the authorization methods are called and what criteria determines when access is granted.
This is the point where most upgrades fail because of wrong configuration because in 2.2 access control based on IP address, hostname or other characteristic was done using the directives Order, Allow, Deny or Satisfy, but in 2.4 this is done with authorization checks using the new modules.
To be clear let's see some virtual host examples, this can be found in your /etc/apache2/sites-enabled/default or /etc/apache2/sites-enabled/YOUR_WEBSITE_NAME:
Old 2.2 virtual host configuration:
Order allow,deny
Allow from all
New 2.4 virtual host configuration:
Require all granted
![apache 2.4 config](http://blog.linoxide.com/wp-content/uploads/2014/12/apache-2.4-config.jpg)
### .htaccess problems ###
If after the upgrade some settings don't work or you get redirect errors, check if those settings are in a .htaccess file. If settings in the .htaccess file are not used by Apache it's because in 2.4 AllowOverride directive is set to None by default, thus ignoring the .htaccess files. All you have to do is to either change or add the AllowOverride All directive to your site configuration file.
You also see the AllowOverride All directive set in the screenshot above.
### Missing config file or module ###
From my experience another problem during upgrades is that your configuration file includes an old module or configuration file that is no longer needed or supported in 2.4, you will get a clear warning that Apache can't include the respective file and all you have to do is go to your configuration file and remove the line that causes problem. Afterwards you can search or install a similar module.
### Other small changes you shound know about ###
There are a few other changes that you should consider, although they generally result in an warning and not an error:
- MaxClients has been renamed to MaxRequestWorkers, which describes more accurately what it does. For async MPMs, like event, the maximum number of clients is not equivalent than the number of worker threads. The old name is still supported.
- The DefaultType directive no longer has any effect, other than to emit a warning if it's used with any value other than none. You need to use other configuration settings to replace it in 2.4.
- EnableSendfile now defaults to Off.
- FileETag now defaults to "MTime Size" (without INode).
- KeepAlive only accepts values of On or Off. Previously, any value other than "Off" or "0" was treated as "On".
- Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, and WatchdogMutexPath have been replaced with a single Mutex directive. You will need to evaluate any use of these removed directives in your 2.2 configuration to determine if they can just be deleted or will need to be replaced using Mutex.
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/
作者:[Adrian Dinu][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/adriand/
[1]:http://httpd.apache.org/docs/2.4/

View File

@ -1,66 +0,0 @@
Linux FAQs with Answers--How to add a cron job on Linux
================================================================================
> **Question**: I would like to schedule a task on my Linux box, so that the task runs periodically at fixed times. How can I add a cron job for this task on my Linux system?
The cron utility is the default task scheduler used in Linux. Using cron, you can schedule a task (e.g., a command or a shell-script) to run it periodically or one-time at a specific time of hour, day, week, month, etc. The cron tool is useful when you schedule a variety of regular maintenance jobs, such as periodic backup, rotating logs, checking filesystem, monitoring disk space, and so on.
### Add a Cron Job from the Command Line ###
To add a cron job, you can use a command-line tool called crontab.
Type the following command to create a new cron job to run as the current user.
$ crontab -e
If you want a cron job to run as any other user, type the following command instead.
$ sudo crontab -u <username> -e
You will be presented with a text editor window, where you can add or edit cron jobs. By default, nano editor will be used.
![](https://farm9.staticflickr.com/8586/16200331362_1385807ac0_b.jpg)
Each cron job is formatted as follows.
<minute> <hour> <day-of-month> <month-of-year> <day-of-week> <command>
The first five elements specify the schedule for a task, and the last element is the (full-path) command or script to execute according to the schedule.
![](https://farm8.staticflickr.com/7472/16199272841_dffe0b2873_b.jpg)
Here are a few useful cron job examples.
- *** * * * * /home/dan/bin/script.sh**: run every minute.
- **0 * * * * /home/dan/bin/script.sh**: run every hour.
- **0 0 * * * /home/dan/bin/script.sh**: run at 12am daily.
- **0 9,18 * * * /home/dan/bin/script.sh**: run at 9AM and 6PM twice a day.
- **0 9-18 * * * /home/dan/bin/script.sh**: run every hour from 9AM and 6PM.
- **0 9-18 * * 1-5 /home/dan/bin/script.sh**: run every hour from 9AM and 6PM every weekday.
- ***/10 * * * * /home/dan/bin/script.sh**: run every 10 minutes.
Once you are done with setting up cron job(s), press Ctrl+X to save and quit the editor. At this point, newly added cron jobs should be activated.
To browse existing cron jobs of yours, use the following command:
$ crontab -l
### Add a Cron Job from GUI ###
If you are in Linux desktop environment, you can use a GUI fronend for crontab to add or edit a cron job via a more user-friendly interface.
On GNOME desktop, there is GNOME Schedule (gnome-schedule package).
![](https://farm8.staticflickr.com/7484/16015054699_d96f0e9b6a_c.jpg)
On KDE desktop, there is Task Scheduler (kcron package).
![](https://farm8.staticflickr.com/7473/16175298266_825376c901_c.jpg)
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/add-cron-job-linux.html
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,78 @@
How to Boot Linux ISO Images Directly From Your Hard Drive
================================================================================
Hi all, today we'll teach you an awesome interesting stuff related with the Operating System Disk Image and Booting. Now, try many OS you like without installing them in your Physical Hard Drive and without burning DVDs or USBs.
We can boot Linux ISO files directly from your hard drive with Linuxs GRUB2 boot loader. We can boot any Linux Distribution's using this method without creating bootable USBs, Burn DVDs, etc but the changes made will be temporary.
![boot iso files directly from hard drive in grub2](http://blog.linoxide.com/wp-content/uploads/2015/01/boot-iso-files-directly-from-hard-drive-in-grub2.png)
### 1. Get the ISO of the Linux Distributions: ###
Here, we're gonna create Menu of Ubuntu 14.04 LTS "Trusty" and Linux Mint 17.1 LTS "Rebecca" so, we downloaded them from their official site:
Ubuntu from : [http://ubuntu.com/][1] And Linux Mint from: [http://linuxmint.com/][2]
You can download ISO files of required linux distributions from their respective websites. If you have mirror of the iso files hosted near your area or country, it is recommended if you have no sufficient internet download speed.
### 2. Determine the Hard Drive Partitions Path ###
GRUB uses a different “device name” scheme than Linux does. On a Linux system, /dev/sda0 is the first partition on the first hard disk — **a** means the first hard disk and **0** means its first partition. In GRUB, (hd0,1) is equivalent to /dev/sda0. The **0** means the first hard disk, while **1** means the first partition on it. In other words, in a GRUB device name, the disk numbers start counting at 0 and the partition numbers start counting at 1. For example, (hd3,6) refers to the sixth partition on the fourth hard disk.
You can use the **fdisk -l** command to view this information. On Ubuntu, open a Terminal and run the following command:
$ sudo fdisk -l
![fdisk-l view the list of the hard disk and its partitions](http://blog.linoxide.com/wp-content/uploads/2015/01/fdisk-l.png)
Youll see a list of Linux device paths, which you can convert to GRUB device names on your own. For example, below we can see the system partition is /dev/sda1 — so thats (hd0,1) for GRUB.
### 3. Adding boot menu to Grub2 ###
The easiest way to add a custom boot entry is to edit the /etc/grub.d/40_custom script. This file is designed for user-added custom boot entries. After editing the file, the contents of your /etc/defaults/grub file and the /etc/grub.d/ scripts will be combined to create a /boot/grub/grub.cfg file. You shouldn't edit this file by hand. Its designed to be automatically generated from settings you specify in other files.
So well need to open the /etc/grub.d/40_custom file for editing with root privileges. On Ubuntu, you can do this by opening a Terminal window and running the following command:
$ sudo nano /etc/grub.d/40_custom
Unless weve added other custom boot entries, we should see a mostly empty file. We'll need to add one or more ISO-booting sections to the file below the commented lines.
=====
menuentry “Ubuntu 14.04 ISO” {
set isofile=”/home/linoxide/Downloads/ubuntu-14.04.1-desktop-amd64.iso”
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
}
menuentry "Linux Mint 17.1 Cinnamon ISO" {
set isofile=”/home/linoxide/Downloads/mint-17.1-desktop-amd64.iso”
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
}
![Grub2 Menu configuration for adding the ISOs](http://blog.linoxide.com/wp-content/uploads/2015/01/grub-added-iso.png)
**Important Note**: Different Linux distributions require different boot entries with different boot options. The GRUB Live ISO Multiboot project offers a variety of [menu entries for different Linux distributions][3]. You should be able to adapt these example menu entries for the ISO file you want to boot. You can also just perform a web search for the name and release number of the Linux distribution you want to boot along with “boot from ISO in GRUB” to find more information.
### 4. Updating Grub2 ###
To make the custom menu entries active, we'll run "sudo update-grub"
sudo update-grub
Hurray, we have successfully added our brand new linux distribution's ISO to our GRUB Menu. Now, we'll be able to boot them and enjoy trying them. You can add many distributions and try them all. Note that the changes made in those OS will don't be kept preserved, which means you'll loose changes made in that distros after the restart.
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-how-to/boot-linux-iso-images-directly-hard-drive/
作者:[Arun Pyasi][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/arunp/
[1]:http://ubuntu.com/
[2]:http://linuxmint.com/
[3]:http://git.marmotte.net/git/glim/tree/grub2

View File

@ -0,0 +1,72 @@
How to make a file immutable on Linux
================================================================================
Suppose you want to write-protect some important files on Linux, so that they cannot be deleted or tampered with by accident or otherwise. In other cases, you may want to prevent certain configuration files from being overwritten automatically by software. While changing their ownership or permission bits on the files by using chown or chmod is one way to deal with this situation, this is not a perfect solution as it cannot prevent any action done with root privilege. That is when chattr comes in handy.
chattr is a Linux command which allows one to set or unset attributes on a file, which are separate from the standard (read, write, execute) file permission. A related command is lsattr which shows which attributes are set on a file. While file attributes managed by chattr and lsattr are originally supported by EXT file systems (EXT2/3/4) only, this feature is now available on many other native Linux file systems such as XFS, Btrfs, ReiserFS, etc.
In this tutorial, I am going to demonstrate how to use chattr to make files immutable on Linux.
chattr and lsattr commands are a part of e2fsprogs package which comes pre-installed on all modern Linux distributions.
Basic syntax of chattr is as follows.
$ chattr [-RVf] [operator][attribute(s)] files...
The operator can be '+' (which adds selected attributes to attribute list), '-' (which removes selected attributes from attribute list), or '=' (which forces selected attributes only).
Some of available attributes are the following.
- **a**: can be opened in append mode only.
- **A**: do not update atime (file access time).
- **c**: automatically compressed when written to disk.
- **C**: turn off copy-on-write.
- **i**: set immutable.
- **s**: securely deleted with automatic zeroing.
### Immutable Attribute ###
To make a file immutable, you can add "immutable" attribute to the file as follows. For example, to write-protect /etc/passwd file:
$ sudo chattr +i /etc/passwd
Note that you must use root privilege to set or unset "immutable" attribute on a file. Now verify that "immutable" attribute is added to the file successfully.
$ lsattr /etc/passwd
Once the file is set immutable, this file is impervious to change for any user. Even the root cannot modify, remove, overwrite, move or rename the file. You will need to unset the immutable attribute before you can tamper with the file again.
To unset the immutable attribute, use the following command:
$ sudo chattr -i /etc/passwd
![](https://farm9.staticflickr.com/8613/16152651317_076a65cf50_b.jpg)
If you want to make a whole directory (e.g., /etc) including all its content immutable at once recursively, use "-R" option:
$ sudo chattr -R +i /etc
### Append Only Attribute ###
Another useful attribute is "append-only" attribute which forces a file to grow only. You cannot overwrite or delete a file with "append-only" attribute set. This attribute can be useful when you want to prevent a log file from being cleared by accident.
Similar to immutable attribute, you can turn a file into "append-only" mode by:
$ sudo chattr +a /var/log/syslog
Note that when you copy an immutable or append-only file to another file, those attributes will not be preserved on the newly created file.
### Conclusion ###
In this tutorial, I showed how to use chattr and lsattr commands to manage additional file attributes to prevent (accidental or otherwise) file tampering. Beware that you cannot rely on chattr as a security measure as one can easily undo immutability. One possible way to address this limitation is to restrict the availability of chattr command itself, or drop kernel capability CAP_LINUX_IMMUTABLE. For more details on chattr and available attributes, refer to its man page.
--------------------------------------------------------------------------------
via: http://xmodulo.com/make-file-immutable-linux.html
作者:[Dan Nanni][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/nanni

View File

@ -0,0 +1,40 @@
Keep History Of Notifications With Recent Notifications AppIndicator
================================================================================
![How to see recent notifications in Ubuntu 14.04](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/recent_notifications_Ubuntu_14.jpeg)
Most of the desktop environments like Unity and Gnome have notification featured. Something which I like a lot. It specially helps me when I am listening to [streaming radio on Ubuntu][1]. But by default the notification is displayed on the top of the desktop for a couple of seconds and then it fades in disappearance. Now, what if you hear the notification sound but did not see it in time? How do you know what notification was it?
If somehow you could have a history of all recent notifications, would it not be great? Yes, I know it would be great. You can easily keep track of all recent notifications in Ubuntu Unity or GNOME using Recent **Notifications applet indicator**.
Recent Notifications sits in the top panel and keeps the history of all recent notifications. When there are new notifications captured by it, the indicator turns green to notify you of unread notifications.
![Recent notifications in Ubuntu 14.04](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/recent_notifications_Ubuntu.jpeg)
When you click on it, you will see all the recent notifications. You can either choose to clear all of the notifications or remove some of those.
![Recent notifications applet indicator](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/recent_notifications_Ubuntu_1.jpeg)
Unfortunately there are no configuration options here. Therefore you cannot block notifications from specific applications. All kind of notifications will be saved here.
### Install Recent Notifications in Ubuntu 14.04 and 14.10 ###
Normally this Recent Notification applet indicator should also work in Linux Mint Cinnamon edition. You can give it a try. Use the following commands to install Recent Notifications applet indicator in Ubuntu 14.04 and 14.10:
sudo add-apt-repository ppa:jconti/recent-notifications
sudo apt-get update
sudo apt-get install indicator-notifications
After installation, log out, log back in and you are good to go. Now none of the recent notifications will go unnoticed. Hand applet indicator, isnt it?
--------------------------------------------------------------------------------
via: http://itsfoss.com/notifications-appindicator/
作者:[Abhishek][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://itsfoss.com/author/Abhishek/
[1]:http://itsfoss.com/apps-internet-streaming-radio-ubuntu/

View File

@ -0,0 +1,150 @@
Translated By H-mudcup
Linux排名前四的下载管理器
================================================================================
**改善并更好的管理你的网页下载,不论是镜像、抓取数据包还是仅仅更好的掌控你的文件。**
下载管理器现在似乎已经是旧闻了但是他们仍然非常有用。我们来比较一下Linux上排名前四的下载管理器。
### [uGet][1] ###
如同很多其他的Linux应用一样uGet把体积轻巧和功能全面作为宣传亮点。它能处理有着过滤器的多线程数据流还能与任何网络浏览器进行整合。它从当初的UrlGet开始如今已经经过了十年。它还能在Windows上运行。
![uGet is actually very full-featured, with a lot of the kind of functions that advanced torrent clients use](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/uget1.png)
uGet的功能其实非常全面有很多先进的BT下载客户端所拥有的功能
#### 界面 ####
uGet让我们想起了许多BT下载客户端的界面有着活跃、结束、暂停等等对于不同下载任务的分类。尽管有很多的信息但是他们都以非常简单明确的方式展现出来。旁边伴有高级选项的主下载控制非常易于使用。
#### 集成 ####
它能查看到剪贴板里的URL但uGet并没有在本地集成到Chromium和Firefox这些浏览器中。尽管如此这两种浏览器还是能通过一些扩展程序连到uGet上Firefox可以用FlashgotChromium则有专用的插件。虽然不是很理想但是已经足够好了。
#### 功能 ####
成熟的uGet完备了各种功能包括按计划进行下载任务的启动和终止的高级功能通过剪贴板批量下载还能改变它在剪贴板里查找的文件的类型。虽然有插件选项但不多。
#### 可得性 ####
虽然在多数主要的发行版的软件库中都能得到它但uGet网站上有着定期更新的适用于各种流行的发行版的二进制安装文件还能轻易获得源代码。它的运行基于GTK 3+的图形库所以它在某些桌面环境上的封装要比其他的小然而我们得说在KDE或其他Qt桌面上值得有这么一个额外的从属。
#### 总体评价 ####
8/10
我们非常喜欢uGet——它种类繁多的功能和极高的人气让它成为了能与Linux浏览器优雅结合的万能的下载管理器。
### [KGet][2] ###
KDE自家的下载管理器貌似原本是设计成与KDE的网页浏览器Konqueror一同工作的。它带来了我们这次测试中所期待的功能多下载控制和对下载完成的文件计算校验和的能力。
![You need to manually activate the ability to keep an eye on the clipboard for links](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/kget1.png)
你需要手动激活查看剪贴板中下载链接的功能
#### 界面 ####
作为一个备受期待的KDE应用软件KGet用一贯的图标和线条与桌面环境的审美风格完美融合。它的设计也相当简洁在主工具栏里只显示最必要的功能当前下载也以最小界面显示。
#### 集成 ####
KGet会集成到本地的KDE的Konqueror浏览器里虽然它并不是最流行的浏览器。Firefox对KGet的支持是一如往常的是通过FlashGot完成的但是在Chromium里并没有任何一种方法能真正的将它集成进去。你可以打开一个询问你是否想下载已复制的URL的功能然而KGet对于剪贴板的分析并不是很好有的时候会把文本下载下来。
#### 功能 ####
能够选择的功能并不多。没有计划任务,没有批量下载,而且通常情况下,下载功能的数量几乎是光秃秃的。剪贴板扫描功能,想法很不错就是有点问题。设置菜单看起来有点怪怪的,因为它看起来应该设计有更多的功能。
#### 可得性 ####
虽然它不会随着KDE默认安装但可以在任何支持KDE的发行版里得到它。虽然它的运行需要几个KDE库找到它的源代码也很困难。支持如此少的发行版二进制安装文件也没什么可选的。
#### 总体评价 ####
6/10
KGet并没有真正的给予用户比大多数主流浏览器内置下载管理器更强大的下载管理功能但是你可以在浏览器关闭的情况下使用它。
### [DownThemAll!][3] ###
经由Firefox的附件进入Linux的DownThemAll某种程度上可以说是跨平台。这让它只能通过Firefox使用然而作为世界上最流行的浏览器之一它这更加紧凑的集成也许正是某些人对下载管理器所期望的。
![There are actually a whole lot of options available for DownThemAll! that make it very flexible](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/down1.png)
其实在DownThemALL上有很多选项可以设置这让它非常的灵活
#### 界面 ####
与Firefox的集成使得DownThemAll的风格符合浏览器的审美标准右键单击可以唤出普通下载和DownThemAll选项。额外的对话框菜单通常和Firefox使用相同的主题然而主下载窗口则非常整洁并且是基于它本身的设计。
#### 集成 ####
它并不是系统级集成但是它伪装在Firefox中的能力让它看起来就像是原本浏览器的附加部分。如果你想它就可以和普通下载器一同工作在一点点手动过滤的帮助下他还能找到网页上特定类型的链接无需复制粘贴。
#### 功能 ####
拥有着能同时控制多个下载任务的能力限制而不荒废带宽以及先进的自动或手动过滤功能DownThemAll有着一大堆有助于大规模下载的优秀功能。“一键”功能还让它能非常迅速的启动到预定的文件夹中的下载。这比普通下载功能快多了。
#### 可得性 ####
Firefox几乎能在所有的发行版和Linux以外的操作系统中获得。这让DownThemAll!也和它一样多产。不幸的是这是一把双刃剑因为Firefox可能不是你喜欢的浏览器。它还给浏览器增加了一些负担让它的启动不再那么轻松。
#### 总体评价 ####
7/10
DownThemAll!是很优秀的如果你使用Firefox你也许就不再需要用任何其他的下载器了。然而并不是每个人都喜欢用Firefox浏览器而且管理器需要在浏览器开启的情况下才能启动。
### [Steadyflow][4] ###
Steadyflow很容易在Ubuntu和一些基于Debian的发行版中获得获取到它的方式可能受到了限制但它在某些圈子里一直被认为是你能得到的任何发行版里最好的管理器。它能查找剪贴板里的URL使用GNOME的预设代理还有许多其他的功能。
![The settings in Steady flow are extremely limiting and somewhat difficult to access](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/steady1.png)
Steady flow里的设置非常受限而且有点难以使用。
#### 界面 ####
Steadyflow的形象相当简洁令人愉悦的、干净的界面并没有让下载窗口变得混乱。添加下载任务的对话框足够简洁只有基本的选项来设置下载任务设置文件位置。真没什么可抱怨的虽然它的确让我们觉得它的功能有点少。
#### 集成 ####
查看复制的URL是标准配备还有个让Chromium集成这个功能的插件。同样的如果你喜欢用Firefox你可以通过Flashgot把它连到Firefox上。你并不能真正的编辑它从剪贴板里分析出的链接它也不能像uGet和DownThemAll!一样批量下载。
#### 功能 ####
极度缺少功能,选项菜单也受到很大限制。暂停和恢复功能看起来也不怎么好使——这是任何浏览器文件下载功能的最基本的部分。文件下载结束的通知和默认行为是可以设置的,还可以选择在文件下载完成之后运行脚本。
#### 可得性 ####
只能在Ubuntu上获取还不容易得到这个应用的源代码。这意味着虽然在所有基于Ubuntu的发行版中都能很容易的得到它但也仅限于这些发行版。由于它不是Linux上能得到的最好的下载管理器所以也不用想太多。
#### 总体评价 ####
5/10
坦白说没那么好。只有非常基本的选项还只能在Ubuntu上使用Steadyflow要想从你能选择的浏览器自带的标准下载选项中脱颖而出它做的还不够。
### 那么获奖者是…… ###
#### uGet ####
在此次测试中我们已经证明了现代电脑中还是有下载管理器的一席之地的即便它们中的佼佼者们从BT下载客户端中抄袭了某些功能貌似侵犯了他们的权益。对于某些人来说BT下载可能是个更有效率的方式随着ISP们对待BT流量越来越机智一些人可能用一个好的下载管理器就得到更好的效果。大多数主流ISP不仅仅强加了数据转移标记在高峰时段他们中的一些甚至开始减慢或封掉BT流量——甚至连发行版的ISO文件和其他免费软件的合法数据流都被限制了。
对于这类问题Steadyflow看起来是非常受欢迎的解决方式但我们的使用和测试显示出它是一个未完成的简陋的产品。更加古老的uGet则是这场表演的明星有着惊人数量的可选功能这些功能既能在下载单一文件中有所帮助还能在整个网页里过滤出相关元素进行抓取。DownThemAll与之类似优秀的Firefox有加分但它也离不开Firefox有着几乎同级别的功能但集成效果更好。
如果你要在这两个里面选一个那就得谈谈你喜欢哪个浏览器还有你是否需要昼夜下载或上传文件。DownThemAll!需要Firefox一直运行然而uGet可以单独运行为处理器节省了很多资源和电力——这显然让uGet在24小时数据传输上显得更有前途而且对于它来说设置一大批下载任务或只是从你的浏览器中获取下载信息都不是什么难事。
再给下载管理器一个机会。结果绝不会让你失望。
--------------------------------------------------------------------------------
via: http://www.linuxuser.co.uk/reviews/top-4-linux-download-managers
作者Rob Zwetsloot
译者:[H-mudcup](https://github.com/H-mudcup)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://bit.ly/1mx4Uwz
[2]:http://bit.ly/1lilqU9
[3]:http://bit.ly/1lilqU9
[4]:http://bit.ly/1lilymS

View File

@ -1,47 +0,0 @@
2015:开源已经完胜,但还在继续
================================================================================
> 在 2014 年的完胜后,接下来会如何?
新年伊始,习惯上都是回顾已经走过的一年。但只要观注我们的这个栏目,就会很容易获得过去一年的总结:开源已经全胜。让我们从头开始说起吧:
**超级计算机**: Linux 在超级计算机系统 500 强的名单上占据绝对的主导地位这本身就令人很尴尬。[2014年11月的数据][1]显示前500系统中的485个系统都在运行着 Linux 的发布系统,而仅仅只有一台运行着 Windows 系统。如果您查询相关的核心数据这问题更是让人触目惊心。截止到目前Linux 系统有 22,851,693 之多而 windows 系统仅仅只有 30,720。这意味着什么Linux 不仅仅是占据主导地位,在大型系统中已经是绝对的霸主了。
**云计算**: 去年, Linux 基金会撰写了一个有趣的[报告][2],是关于大公司在云端使用 Linux 的情况的。它发现 75% 的大公司在使用 Linux 系统作为他们的主要平台,相对的使用 Windows 系统的只占 23%。因为需要考虑云端和非云端的因素,它们已经混淆在一起了,所以很难把这比例对应到真实的市场份额里。但是,鉴于当前云计算的流行度,可以很确定的说明 Linux 使用的高速增长。事实上,同样的调查发现,在云端的 Linux 部署率已经从 45% 增长到 79%,而对于 Windows 来说已经从 45% 下降到 36%。当然了,某些人可能认为 Linux 基金会在这块上并不是完全公正无私的,但即使是有私心或是统计的不确定性而有失公允,事情也正朝着预料的正确方向迈进。
**Web 服务器**: 开源已经统治这个行业近20年 - 取得了一份很惊人的成绩。然而,最近在市场份额上出现了一些有趣的变动:一点就是,在 Web 服务器的总计数上,微软的 IIS 服务已经超越了 Apache 服务。但正如 Netcraft 公司其最近的[分析][3]解释所说的那样,这儿还有很多令人大饱眼福的地方呢:
> 这是网站总数持续大幅回落以来的第二个月从一月份以来创造了一个月的最低点。由于在十一月份的时候损失的仅仅只是集中在主机提供商中的一小部分只占了5200万主机名数的十大点。这点损失相比于激活的站点和网站来说不是一个数据级的所以造不成什么影响但激活的这些站点大部分都是广告类的链接页面基本上没有原创的内容。大多数这些站点都是运行在微软的 IIS 服务器上的所以在2014年7月份的调查中 IIS 的使用数就超过的 Apache 的。然而,近期跌势已导致其市场份额下降到 29.8现在已经低于Apache 10个百分点了。
这表明微软的所谓“激增”更多的是表象而事实并非如此它的大多数增加都是基于链接页面站点其内容很少有用。事实上Netcraft公司的关于活动网站的数据给我们描绘了一幅完全不同的图表Apache 拥有 50.57 的市场份额nginx 的是 14.73 位居第二;微软的 IIS 很无力,占到了相当微弱的 11.72%。这意味着在活跃 Web 服务器市场上开源大约有65的份额 - 虽然没有超级计算机那么高的水平,但也还不错。
**移动设备系统**. 目前,开源的大军主要是 Andriod 为基础在继续着。最新数据表明在2014年第三季度的智能手机出货量中Andriod 设备的市场份额从去年同期的 81.4% 上升到了 [83.6%][4]。苹果的从去年同期的 13.4% 下降到 12.3%。对于平板电脑来说Android 平板遵循同样的轨迹在2014年第二季度Android 平板的占有率达到[全球平板电脑的销量的75][5]左右而苹果的只有25
**嵌入式系统**: 虽然很难量化 Linux 在的重要的嵌入式系统市场的市场份额,但来一个自 2013 年的研究数字表明,[计划大约一半的嵌入式系统][6]将会采用 Linux。
**物联网**: 在很多方面上可以把它们简单的认为是嵌入式系统的另外一个化身,不同之处在于它们被设计为一直在线的。虽然现在谈论它的市场份额还有点为时过早,但如我在[讨论栏目][7]里的AllSeen 的物联网开源框架正进行的如火如荼。他们所缺少的也最引入注目的事情是要让任何可信任的闭源项目把其当做对手。因此,很有可能物联网将会通过开源的方式来达到 Linux 在超级计算机中的占有率这样的水平。
当然了,这个阶段的成功也带来了一些问题:我们将何去何从?鉴于开源将会使很多成功的行业达到饱和点,想必唯一的办法就是下跌吗?要回答这个问题,我建议浏览下 Christopher Kelty 于2013年写的一篇供同行参阅、发人深省的文章有个耐人寻味的标题“[天下没有免费的软件][8]”。下面是他的开头段:
> 免费软件并不存在。在我写了一整本书后,我莫名的忧伤。但这也是我写进文章的一个观点。免费软件和它的分身开源正在不断的变化着。它并不是一直持续不变的,不稳定、不固定、不持久,这正是它的特色的一部分。
换句话说无论2014年带给我们多少惊人的免费软件我们也确信2015年会更多更丰富因为进化是永无止境的。
--------------------------------------------------------------------------------
via: http://www.computerworlduk.com/blogs/open-enterprise/open-source-has-won-3592314/
作者:[lyn Moody][a]
译者:[runningwater](https://github.com/runningwater)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.computerworlduk.com/author/glyn-moody/
[1]:http://www.top500.org/statistics/list/
[2]:http://www.linuxfoundation.org/publications/linux-foundation/linux-end-user-trends-report-2014
[3]:http://news.netcraft.com/archives/2014/12/18/december-2014-web-server-survey.html
[4]:http://www.cnet.com/news/android-stays-unbeatable-in-smartphone-market-for-now/
[5]:http://timesofindia.indiatimes.com/tech/tech-news/Android-tablet-market-share-hits-70-in-Q2-iPads-slip-to-25-Survey/articleshow/38966512.cms
[6]:http://linuxgizmos.com/embedded-developers-prefer-linux-love-android/
[7]:http://www.computerworlduk.com/blogs/open-enterprise/allseen-3591023/
[8]:http://peerproduction.net/issues/issue-3-free-software-epistemics/debate/there-is-no-free-software/

View File

@ -0,0 +1,56 @@
Ubuntu 14.04 Apache2.2迁移2.4问题解决
================================================================================
如果你进行了一次**Ubuntu**从12.04到14.04的升级,那么这次升级还包括了一个重大的升级--**Apache**从2.2版本到2.4版本。**Apache**的这次升级带来了许多性能提升但是如果继续使用2.2的配置会导致很多错误。
### 访问控制的改变 ###
从**Apache 2.4**起授权authorization开始启用比起2.2的一个检查一个数据存储授权更加灵活。过去很难确定那些命令授权应用了但是授权authorization的引入解决了这些问题现在配置可以控制什么时候授权方法被调用什么条件决定何时授权访问。
这就是为什么大多数的升级失败是由于错误配置2.2的访问控制基于IP地址主机名和其他字符通过使用指令Order来设置Allow, Deny或 Satisfy但是2.4这些一切被新模板授权authorization来替代检查。
为了弄清楚这些,可以来看一些虚拟主机的例子,这些可以在/etc/apache2/sites-enabled/default 或者 /etc/apache2/sites-enabled/网页名称 中找到:
老2.2虚拟主机配置:
Order allow,deny
Allow from all
新2.4虚拟主机配置:
Require all granted
![apache 2.4 config](http://blog.linoxide.com/wp-content/uploads/2014/12/apache-2.4-config.jpg)
### .htaccess 问题 ###
升级后如果一些设置不执行或者得到重定向错误,检查是否这些设置是在.htaccess文件中。如果是2.4已经不再使用.htaccess文件在2.4中默认使用AllowOverride指令来设置因此忽略了.htaccess文件。你需要做的就是改变和增加AllowOverride All命令到你的页面配置文件中。
上面截图中可以看见AllowOverride All指令。
### 丢失配置文件或者模块 ###
根据我的经验这次升级带了其他问题就是老模块和配置文件不再需要或者不被支持了。所以你必须十分清楚Apache不再支持的各种文件并且在老配置中移除这些老模块来解决问题。之后你可以搜索和安装相似的模块来替代。
### 其他需要的知道的小改变 ###
这里还有一些其他改变的需要考虑,虽然这些通常只会发生警告,而不是错误。
- MaxClients重命名为MaxRequestWorkers使之有更准确的描述。而异步MPM如event客服端最大连接数不量比与工作线程数。老名字依然支持。
- DefaultType命令无效使用它已经没有任何效果了。需要使用其他配置设定来替代它
- EnableSendfile默认关闭
- FileETag 默认"MTime Size"没有INode
- KeepAlive 只接受On或Off值。之前的任何值不是Off或者0都认为是On
- Mutex 替代 Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, 和 WatchdogMutexPath 。需要删除或者替代所有2.2老配置的设置。
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/
作者:[Adrian Dinu][a]
译者:[Vic020/VicYu](http://vicyu.net)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/adriand/
[1]:http://httpd.apache.org/docs/2.4/

View File

@ -0,0 +1,66 @@
Linux 有问必答: 如何在Linux中加入cron任务
================================================================================
> **提问** 我想在我的Linux中安排一个计划任务该任务在固定时间周期性地运行。我该如何在Linux中添加一个cron任务
cron是Linux中默认的计划任务。使用cron你可以安排一个计划比如命令或者shell脚本周期性地运行或者在指定的小时、天、周、月等特定时间运行。cron在你安排不同的常规维护任务时是很有用的比如周期性地备份、日志循环、检查文件系统、监测磁盘空间等等。
### 从命令行中添加cron任务 ###
要添加cron任务你可以使用称为crontab的命令行工具。
输入下面的命令会创建一个以当前用户运行的新cron任务。
$ crontab -e
如果你想要以其他用户运行cron任务输入下面的命令。
$ sudo crontab -u <username> -e
你将会看见一个文本编辑窗口这里你可以添加或者编辑cron任务。默认使用nono编辑器。
![](https://farm9.staticflickr.com/8586/16200331362_1385807ac0_b.jpg)
每个cron任务的格式如下。
<minute> <hour> <day-of-month> <month-of-year> <day-of-week> <command>
前5个元素定义了任务的计划最后一个元素是命令或者脚本的完整路径。
![](https://farm8.staticflickr.com/7472/16199272841_dffe0b2873_b.jpg)
下面是一些cron任务示例。
- *** * * * * /home/dan/bin/script.sh**: 每分钟运行。
- **0 * * * * /home/dan/bin/script.sh**: 每小时运行。
- **0 0 * * * /home/dan/bin/script.sh**: 每12小时运行。
- **0 9,18 * * * /home/dan/bin/script.sh**: 在每天的9AM和6PM运行。
- **0 9-18 * * * /home/dan/bin/script.sh**: 在9AM到6PM的每个小时运行。
- **0 9-18 * * 1-5 /home/dan/bin/script.sh**: 周一到周五的9AM到6PM每小时运行。
- ***/10 * * * * /home/dan/bin/script.sh**: 每10分钟运行。
一旦完成上面的设置步骤后按下Ctrl+X来保存并退出编辑器。此时新增的计划任务应该已经激活了。
要查看存在的计划任务,使用下面的命令:
$ crontab -l
### 从GUI添加计划任务 ###
如果你在Linux桌面环境中你可以使用crontab的更加友好的GUI前端来添加或者添加一个cron任务。
在Gnome桌面中有一个Gnome Schedulegnome-schedule包
![](https://farm8.staticflickr.com/7484/16015054699_d96f0e9b6a_c.jpg)
在KDE桌面中有一个Task Schedulerkcron包
![](https://farm8.staticflickr.com/7473/16175298266_825376c901_c.jpg)
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/add-cron-job-linux.html
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出