Merge pull request #3 from LCTT/master

Update the repo
This commit is contained in:
ZTinoZ 2015-04-14 11:39:58 +08:00
commit d4a0052213
34 changed files with 3231 additions and 894 deletions

View File

@ -1,6 +1,6 @@
如何在Linux上安装Telegram Messenger应用
================================================================================
Telegram是和whatsapp类似的及时通讯应用。它有一个非常庞大的用户群。它有很多能和其他通讯应用区分开来的特性。
Telegram是和whatsapp类似的及时通讯应用。它有一个庞大的用户群,并且很多能和其他通讯应用区分开来的特性。
![在Linux上安装Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/Install-Telegram-in-Linux.png)
Telegram Messenger for Linux
@ -13,19 +13,19 @@ Telegram Messenger for Linux
- 有桌面版本
- 第三方开发者可以访问Telegram的应用程序接口(API)。
- 支持Android, iphone/ipad, Windows Phone, Web-Version, PC, Mac 和 Linux。
- 以上应用支持度加密和自销毁信息。
- 以上应用支持度加密和自销毁信息。
- 可以让你从多种设备和平台查看你的信息。
- 整体的处理和消息传送都非常快
- 为了安全和效率,在全球有分布式服务器
- 开放的API和自由协议
- 没有广告,没有认购费用。-永久免费
- 强大-没有媒体和聊天限制
- 功能强大-没有媒体和聊天限制
- 多种安全措施使其免受黑客侵害
- 在群组中回复特定信息。使用@username提醒群组里的多个用户
#### 为什么使用Telegram? ####
当像WhatsApp的和其他的及时通讯应用都提供了几乎同样的功能的情况下为什么要选择Telegram
在像WhatsApp以及其他及时通讯应用都提供了几乎同样的功能的情况下为什么要选择Telegram
第三方开发者可以使用API这一点就足够了。更多PC的可用性意味着你不必再纠结在你的移动设备上打字你可以使用你的PC这样更具有可用性。
@ -65,12 +65,12 @@ Telegram Messenger for Linux
![Telegram验证码](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Verfication-Code.png)
Telegram验证码
4. 输入你的姓名昵称并点击“SIGNUP”.
4. 输入你的姓名昵称并点击“SIGN UP”.
![输入账户详细信息](http://www.tecmint.com/wp-content/uploads/2015/03/Enter-Account-Details.jpeg)
输入账户详细信息
5. 新建账户之后,我看到这个界面。一切准备就绪,尽管我是Telegram的新用户。这个界面真的很简洁。
5. 新建账户之后,我看到这个界面。一切准备就绪,尽管我对Telegram还不熟悉。这个界面真的很简洁。
![Telegram界面](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Interface.jpeg)
Telegram界面
@ -87,7 +87,7 @@ Telegram联系人提示
8. 当联系人加入Telegram的时候你会收到信息(类似弹出提示)显示[YOUR_CONTACT]加入了Telegram。
9. 在Linux系统上正式的聊天窗口。 很好的体验…
9. 在Linux系统上正式的聊天窗口。很好的体验…
![联系人加入Telegram消息](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Join-Message.jpeg)
联系人加入Telegram消息
@ -113,7 +113,7 @@ Telegram联系人提示
- 一开始在2013年(8月14号)发布iPhone版
- 惊人项目背后的人物:Pavel and Nikolai Durov..
就是这些了。我还会有你喜欢阅读的其它有趣的文章。很高兴能代表Tecmint感谢我们尊贵的读者以及使得我们通过不断的自我进步走到这里的批评者。保持联系!继续评论。如果你关注我们就请和我们分享吧。
就是这些了。我还会为大家带来你们喜欢阅读的其它有趣文章。很高兴能代表Tecmint感谢我们尊贵的读者以及使得我们通过不断的自我提升走到这里的批评者。保持联系!继续评论。如果你关注我们就请分享吧。
- [https://telegram.org/][2]
@ -123,10 +123,10 @@ via: http://www.tecmint.com/install-telegram-in-linux/
作者:[Avishek Kumar][a]
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者ID](https://github.com/校对者ID)
校对:[Caroline](https://github.com/carolinewuyan)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/avishek/
[1]:https://tdesktop.com/linux
[2]:https://telegram.org/
[2]:https://telegram.org/

View File

@ -0,0 +1,74 @@
Linux Kernel 4.0 Features Live Kernel Patching, PS3 Support
================================================================================
![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/10/tuxtuxtux.jpeg)
**A new stable release of the Linux Kernel [has been announced][1] by Linus Torvalds on the Linux kernel mailing list. **
Linux 4.0, codenamed Hurr durr Im a sheep — no, really — brings with it a small set of new hardware support, driver improvements, performance tweaks, bug fixes and the like.
But remarking on the minor-ness of the update, Torvalds writes;
> “Feature-wise, 4.0 doesnt have all that much special. Much have been made of the new kernel patching infrastructure, but realistically […] weve had much bigger changes in other versions. So this is very much a “solid code progress” release.”
Linus adds that Linux 4.1 is likely to be a bigger release.
### New Linux Kernel 4.0 Features ###
Install Kernel Updates Without Rebooting
If youve ever been put out by the need to reboot your Linux box to finish installing a kernel update you wont be alone. Its a minor inconvenience on the desktop, and a major one for servers.
![Reboot-free Kernel Updates](http://www.omgubuntu.co.uk/wp-content/uploads/2012/10/update.jpg)
Reboot-free Kernel Updates
The ability to install/apply security patches to the Linux kernel “live”, without the need to reboot, has been a long-held want of many Linux enthusiasts for years.
A slew of third-party projects, like [Oracles KSplice][2] and Red Hats Kpatch, have sought to offer live patching functionality for certain distributions.
For servers, enterprise and mission-critical use cases where uptime is priority live kernel patching is a pretty big deal.
The good news is that Linux 4.0 makes having to reboot to complete a kernel update a thing of the past.
Well, almost.
The initial groundwork to support reboot-free patching arrives in this latest release, ready for experienced sysadmins to take advantage of in Linux 4.0.
Desktop Linux distributions should also be able to take advantage of the feature too (though given the complexity involved in configuring the reboot-less functionality on the end-user side it may be a little way off).
This infrastructure will continue to be refined and improved on over the course of the 4.x series. As it does so I expect well all start to hear more about it.
#### Other Changes ####
Although it is considered a small release the latest Linux kernel manages to squeeze in a welcome set of hardware improvements, new drivers and performance tweaks. These include:
- Improvements to Intel Skylake platform
- Intel Quark SoC support
- Various patches to improve Linux running on a Playstation 3
- TOpen-source AMD Radeon driver supports DisplayPort Audio
- Various misc HID driver tweaks, including Lenovo compact keyboards, Wacom Cintiq 27QHD
- Toshiba power settings driver adds USB sleep/charge functionality, rapid charge, sleep w/ music, etc
- File System tweaks, including F2FS, BtrfFS, etc
### Install Linux Kernel 4.0 on Ubuntu ###
Although classed as stable there is, at present, **no need for desktop users or new-comers to go upgrade**.
The impatient and adept can take a crack at installing Linux 4.0 in Ubuntu 15.04 Beta by grabbing the appropriate set of packages from [Canonicals mainline kernel archive][3] or by risking a third-party PPA hosted on Launchpad.
Ubuntu 15.04 Vivid Vervet is due later this month and will ship with Ubuntu Kernel 3.19 (the Ubuntu kernel is the Linux Kernel plus Ubuntu-specific patches that have not been accepted upstream).
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features
作者:[Joey-Elijah Sneddon][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://plus.google.com/117485690627814051450/?rel=author
[1]:https://lkml.org/lkml/2015/4/12/178
[2]:http://www.omgubuntu.co.uk/2009/10/how-to-install-kernel-updates-without-rebooting
[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D

View File

@ -1,75 +0,0 @@
Exaile 3.4.1 Overview A Feature-Complete GNOME Music Player
================================================================================
**Exaile** has been a bit quiet in the past two years with maybe only one or two stable releases, but nevertheless, its one of the full-featured music players for GNOME which are on par with applications like [Rhythmbox][1] or [Banshee][2] in terms of features. However, over the past two months a new stable release, 3.4, has been put out under the slogan “Were not dead yet”, as well as an incremental 3.4.1 release, which shipped on November 1. To be honest, Exaile has so many features that I could go on writing a lot more than an article to cover them all, so lets have a look at some of the most notable ones.
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile02.jpg)
[Exaile][3] is a GTK2-based music player written in Python which fits well into GNOME, has an interface which pretty much resembles the one of the old Amarok 1.4 or actual Clementine, and ships with some great features. The interface is composed mainly of two panels, both with support for tabs. The left panel provides access to the collection, Internet radio, smart and custom playlists, file browser, podcasts, Group Tagger and lyrics while the main area of the window is taken by the playlists (with multiple, tabbed playlist support) and control buttons.
Exailes interface is very similar to the one of Clementine or Amarok 1.4 and the tabs on the left can be shown or hidden:
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile04.jpg)
Version 3.4 shipped with a big number of major new features and changes while 3.4.1 was a small bug fix release. The major new features in 3.4 include new plugins like Icecast, Lyricsmania, Playlist Analyzer, Soma.fm, a new, simpler plugin API. Changes were done to the user interface and the general behavior as well, with the possibility to show playlists in multiple panels, close left panels, better BPM UI integration.
The first time it starts you can add music folders to the collection you can also choose to add directories and enable or disable monitoring or scanning them at start-up:
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile01.jpg)
Exailes features are practically countless. You can organize your music in a collection, listen to podcasts, set song ratings, edit tags, view file properties, queue tracks, view lyrics and covers, sort the playlist by a huge number of criteria, change playback behavior or appearance style.
Equalizer, cover manager and listening to Internet radio:
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile05.jpg)
Local album covers are detected automatically and can be shown in full size, with the possibility to zoom in or out:
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile03.jpg)
The preferences window allows to configure various aspects of Exaile, including enable or disable plugins, appearance, system tray integration, or playback. The appearance settings will allow you to change the tabs placement, show/hide the tab bar, enable or disable transparency, or disable the start-up splash screen.
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_01.jpg)
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_02.jpg)
The system tray integration offers a menu to quickly play/pause songs, set a song rating or change the way the playlist handles playback (shuffle, repeat or dynamic).
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg)
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg)
The countless features in Exaile I believe make it the perfect choice as a music player, especially for GNOME users. Any user should be satisfied with the wealth of options and the highly configurable approach.
### Install Exaile 3.4.1 in Ubuntu 14.04 and 14.10 ###
Compiling and installing from source should be pretty straightforward. First, get the dependencies:
sudo apt-get build-dep exaile
sudo apt-get install python-gst0.10
Download the source tarball from the [downloads page][4] (direct link [here][5]), then uncompress it:
tar -xf exaile-3.4.1.tar.gz
Change the working directory to exaile-3.4.1 and issue the following commands:
make
sudo make install
The binary will be installed as **/usr/local/bin/exaile**.
--------------------------------------------------------------------------------
via: http://www.tuxarena.com/2014/11/exaile-3-4-1-overview-a-feature-complete-gnome-music-player/
作者Craciun Dan
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://wiki.gnome.org/Apps/Rhythmbox
[2]:http://banshee.fm/
[3]:http://www.exaile.org/
[4]:http://www.exaile.org/download/
[5]:https://github.com/exaile-dev/exaile/archive/3.4.1.tar.gz

View File

@ -1,52 +0,0 @@
Red Hat Developer Toolset 3.1 beta arrives
================================================================================
> **Summary**:Want the newest developer tools for Red Hat Enterprise Linux 6 or 7? The beta's ready for you now.
It's one of those eternal problems between developers and operators that even [DevOps][1] can't entirely solve. System administrators want the most stable operating system possible, while programmers want the latest and greatest development tools. [Red Hat][2]'s solution for this dilemma has been to take those brand spanking-new tools, test them out on the latest stable [Red Hat Enterprise Linux (RHEL)][3], and then release them to developers.
![Red Hat Developer Toolset](http://zdnet4.cbsistatic.com/hub/i/2015/03/18/d92b1067-6b36-4ff0-ac9e-608fbe3e8c5d/ae80362df5401a37e3cbcd2598f33370/rhel-dev-tools.png)
Red Hat Developer Toolset
So it is that Red Hat has just announced its latest toys for developers, [Red Hat Developer Toolset 3.1][4]. This packaging of the hottest new tools is now available in beta.
This update includes:
[GNUCompiler Collection (GCC) 4.9][5]: the latest stable upstream version of GCC, which provides numerous improvements and bug fixes
[Eclipse 4.4.1][6]: with support for Java 8 and updated versions of Eclipse CDT (8.5), Eclipse Linux Tools (3.1), Eclipse Mylyn (3.14), and Eclipse Egit/Jgit (3.6.1)
Numerous additional updated packages: These include GDB 7.8.2, elfutils 0.161, memstomp 0.1.5, SystemTap 2.6, Valgrind 3.10.1, Dyninst 8.2.1, and ltrace 0.7.91.
With these development programs, you'll be able to create applications for RHEL 6 and 7.x. These apps will then run on RHEL regardless of whether you're running it on a physical, virtual or cloud environments. They will also run on Red Hat's [OpenShift][7], its Platform-as-a-Service (PaaS) offering.
This new set of developer programs includes packages for both RHEL 7 and 7 running on [AMD64 and Intel 64 architectures][8]. Although the tools are 64-bit you can use them to create and modify 32-bit binaries.
Before you try running any of these programs, you should patch RHEL with all the latest updates. To install the beta Toolset, your systems need to be subscribed to the Optional channel to access all the required Red Hat Developer Toolset tool-chain packages.
In addition, if you've installed earlier Toolkits you may run into some [problems while installing Toolkit 3.1][9]. While these difficulties are easy enough to fix, you should go over these possible hiccups before trying to install the new Toolkit.
Finally, you may notice that some of the most exciting of the new tools, such as Docker, Kubernetes, and other container tools aren't here. That's because they're in the newly released [RHEL 7.1][10] and [Red Hat Enterprise Linux 7 Atomic Host (RHELAH)][11]. [Red Hat has partnered with Docker][12], but you'll need to move to a Docker-friendly version of RHEL to get at these container-friendly programs.
--------------------------------------------------------------------------------
via: http://www.zdnet.com/article/red-hat-developer-toolset-3-1-beta-arrives/
作者:[Steven J. Vaughan-Nichols][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.zdnet.com/meet-the-team/us/sjvn/
[1]:http://blogs.csc.com/2015/02/03/devops-theory-for-beginners/
[2]:http://www.redhat.com/en
[3]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux
[4]:http://www.redhat.com/en/about/blog/red-hat-developer-toolset-31-beta-now-available
[5]:https://gcc.gnu.org/gcc-4.9/
[6]:https://projects.eclipse.org/projects/eclipse/releases/4.4.1
[7]:https://www.openshift.com/
[8]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/System_Requirements.html
[9]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/DTS3.1_Release.html#Known_Issues
[10]:http://www.zdnet.com/article/red-hat-7-1-is-here-centos-7-1-is-coming-soon/
[11]:http://www.zdnet.com/article/red-hat-buys-into-docker-containers-with-atomic-host/
[12]:http://www.zdnet.com/article/red-hat-partners-with-docker-to-create-linuxdocker-software-stack/

View File

@ -1,103 +0,0 @@
Translating by H-mudcup
Picty: Managing Photos Made Easy
================================================================================
![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/picty_002-790x429.png)
### About Picty ###
**Picty** is a free, simple, yet powerful photo collection manager that will help you to manage your photos. It is designed around managing **metadata** and a **lossless** approach to image handling. Picty currently supports both online(web-based) and offline(local) collections. In local collections, the images will be stored in a local folder and its sub-folders. A database will be maintained to speed up the image queries in the users home folder. In online(web-based) collections, you can upload and share images through a web browser. Ant user with proper rights can share photos to any persons, and each user can have multiple collections open at once and collections can be shared by multiple users. There is a simple interface for transferring images between collections using a transfer plugin.
You can download any number of photos from your Camera or any devices. Also, Picty allows you to browse photo collections from your Camera before downloading it. Picty is lightweight application, and has snappy interface. It supports Linux, and Windows platforms.
### Features ###
- Supports big photo collections (20,000 plus images).
- Open more than one collection at a time and transfer images between them.
- Collections are:
- Folders of images in your local file system.
- Images on cameras, phones and other media devices.
- Photo hosting services (Flickr currently supported).
- picty does not “Import” photos into its own database, it simply provides an interface for accessing them wherever they are. To keep things snappy and to allow you to browse even if you are offline, picty maintains a cache of thumbnails and metadata.
- Reads and writes metadata in industry standard formats Exif, IPTC and Xmp
- Lossless approach:
- picty writes all changes including image edits as metadata. e.g. an image crop is stored as any instruction, the original pixels remain in the file
- Changes are stored in pictys collection cache until you save your metadata changes to the images. You can easily revert unsaved changes that you dont like.
- Basic image editing:
- Current support for basic image enhancements such as brightness, contrast, color, cropping, and straightening.
- Improvements to those tools and other tools coming soon (red eye reduction, levels, curves, noise reduction)
- Image tagging:
- Use standard IPTC and Xmp keywords for image tags
- A tag tree view lets you easily manage your tags and navigate your collection
- Folder view:
- Navigate the directory heirarchy of your image collection
- Multi-monitor support
- picty can be configured to let you browse your collection on one screen and view full screen images on another.
- Customizable
- Create launchers for external tools
- Supports plugins many of the current features (tagging and folder views, and all of the image editing tools) are provided by plugins
- Written in python batteries included!
### Installation ###
#### 1. Install from PPA ####
Picty developers has a PPA for Debian based distributions, like Ubuntu, to make the installation much easier.
To install in Ubuntu and derivatives, run:
sudo add-apt-repository ppa:damien-moore/ppa
sudo apt-get update
sudo apt-get install picty
#### 2. Install from Source ####
Also, you can install it from Source files. First, install the following dependencies.
sudo apt-get install bzr python-pyinotify python-pyexiv2 python-gtk2 python-gnome2 dcraw python-osmgpsmap python-flickrapi
Then, get the latest version using command:
bzr branch lp:picty
To run picty, change to the picty directory, and enter:
cd picty
bin/picty
To update to the latest version, run:
cd picty
bzr pull
### Usage ###
Launch Picty either from Menu or Unity Dash.
![picty_001](http://www.unixmen.com/wp-content/uploads/2015/03/picty_001.png)
You can either choose existing collection, device or directory. Let us create a **new collection**. To do that, create New Collection button. Enter the collection, and browse to the path where you have the images stored. Finally, click **Create** button.
![Create a Collection_001](http://www.unixmen.com/wp-content/uploads/2015/03/Create-a-Collection_001.png)
![picty_002](http://www.unixmen.com/wp-content/uploads/2015/03/picty_002.png)
You can modify, rotate, add/remove tags, set descriptive info of each images. To do that, just right click any image and do the actions of your choice.
Visit the following Google group to get more information and support about Picty Photo manager.
- [http://groups.google.com/group/pictyphotomanager][1]
Cheers!
--------------------------------------------------------------------------------
via: http://www.unixmen.com/picty-managing-photos-made-easy/
作者:[SK][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.unixmen.com/author/sk/
[1]:http://groups.google.com/group/pictyphotomanager

View File

@ -0,0 +1,40 @@
This tool can alert you about evil twin access points in the area
================================================================================
**EvilAP_Defender can even attack rogue Wi-Fi access points for you, the developer says**
A new open-source tool can periodically scan an area for rogue Wi-Fi access points and can alert network administrators if any are found.
The tool, called EvilAP_Defender, was designed specifically to detect malicious access points that are configured by attackers to mimic legitimate ones in order to trick users to connect to them.
These access points are known as evil twins and allow hackers to intercept Internet traffic from devices connected to them. This can be used to steal credentials, spoof websites, and more.
Most users configure their computers and devices to automatically connect to some wireless networks, like those in their homes or at their workplace. However, when faced with two wireless networks that have the same name, or SSID, and sometimes even the same MAC address, or BSSID, most devices will automatically connect to the one that has the stronger signal.
This makes evil twin attacks easy to pull off because both SSIDs and BSSIDs can be spoofed.
[EvilAP_Defender][1] was written in Python by a developer named Mohamed Idris and was published on GitHub. It can use a computer's wireless network card to discover rogue access points that duplicate a real access point's SSID, BSSID, and even additional parameters like channel, cipher, privacy protocol, and authentication.
The tool will first run in learning mode, so that the legitimate access point [AP] can be discovered and whitelisted. It can then be switched to normal mode to start scanning for unauthorized access points.
If an evil AP is discovered, the tool can alert the network administrator by email, but the developer also plans to add SMS-based alerts in the future.
There is also a preventive mode in which the tool can launch a denial-of-service [DoS] attack against the evil AP to buy the administrator some time to take defensive measures.
"The DoS will only be performed for evil APs which have the same SSID but a different BSSID (AP's MAC address) or run on a different channel," Idris said in the tool's documentation. "This is to avoid attacking your legitimate network."
However, users should remember that attacking someone else's access point, even a likely malicious one operated by an attacker, is most likely illegal in many countries.
In order to run, the tool needs the Aircrack-ng wireless suite, a wireless card supported by Aircrack-ng, MySQL and the Python runtime.
--------------------------------------------------------------------------------
via: http://www.infoworld.com/article/2905725/security0/this-tool-can-alert-you-about-evil-twin-access-points-in-the-area.html
作者:[Lucian Constantin][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.infoworld.com/author/Lucian-Constantin/
[1] https://github.com/moha99sa/EvilAP_Defender/blob/master/README.TXT

View File

@ -0,0 +1,141 @@
translating wi-cuckoo
10 Famous IT Skills in Demand That Will Get You Hired
================================================================================
In continuation of our last article [[Top 10 Operating Systems in demand][1]] which was highly appreciated by the Tecmint community, we here in this article aims at throwing light on top IT skills that will help you land to your dream job.
As mentioned in the first article these data and statistics are supposed to be change with the change in demand and market. We will try our best to update the list whenever there is any major changes. All the statistics are produced on the basis of close study of Job boards, postings and requirements by several IT companies across the globe.
### 1. VMware ###
The visualization and cloud computing software designed by Vmware Inc. tops the List. Vmware claims to commercially virtualize x86 architecture for the first time. VMware demand has increased upto 16% in the last quarter.
Latest stable Release: 11.0
### 2. MySQL ###
The open source Relational Database Management System falls second in the list. Until 2013 it was the second most widely used RDBMS. MySQL demand has increased upto 11% in the last quarter. The very famous MariaDB has been forked out of MySQL after Oracle Corp. Owned it.
Latest Stable Release : 5.6.23
### 3. Apache ###
The open source cross platform web (HTTP) server stands third in the list. Apache demand has increased to more than 13% in the last quarter.
Latest Stable Release : 2.4.12
### 4. AWS ###
Amazon web services is a collection of remote computing services offered by Amazon.com. Aws made to the list at number four. AWS demand has shown a growth of nearly 14% in the last quarter.
### 5. Puppet ###
The configuration Management System used in setting up IT Infrastructure comes at number five. It is written in Ruby and follows Client-server architecture. The demand of puppet has grown above 9% in the last quarter.
Latest Stable Release : 3.7.3
### 6. Hadoop ###
Hadoop is a open source software framework written in Java to process big data. It stands at position six in the list. The demand of Hadoop has gone upto 0.2% in the last quarter.
Latest Stable Release : 2.6.0
### 7. Git ###
The famous distributed control system written initially by Linus Torvalds made to the list at number seven. The demand of Git has gone above 7% in the last quarter.
Latest Stable Release : 2.3.4
### 8. Oracle PL/SQL ###
The procedural extension for SQL by Oracle corp. stands at position eight. PL/SQL is included in Oracle Database since Oracle 7. It has shown a decline of nearly 8% in the last quarter.
### 9. Tomcat ###
Open source web server and servlet container comes at position number nine. It has shown a growth in demand of nearly 15% in the last quarter.
Latest Stable Release : 8.0.15
### 10. SAP ###
The most famous Enterprise Resource Planning Software stands at position ten. The demand of SAP has shown a growth of nearly 3.5% in last quarter.
注:表格数据,不需要翻译-开始
<table cellspacing="0" cellpadding="5" style="width: 804px;">
<colgroup>
<col width="88">
<col width="427">
<col width="257">
</colgroup>
<tbody>
<tr valign="top">
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0.1cm;">1.
</td>
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0.1cm;">VMware</td>
<td width="257" bgcolor="#eeeeee" style="border: 1px solid #000000; padding: 0.1cm;"><span style="color: #006600;"><b>16% +</b></span></td>
</tr>
<tr valign="top" class="alt">
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">2.
</td>
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">MySQL</td>
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>11% +</b></span></td>
</tr>
<tr valign="top">
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">3.</td>
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Apache</td>
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>13% +</b></span></td>
</tr>
<tr valign="top" class="alt">
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">4.
</td>
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Amazon web services (AWS)</td>
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>14% +</b></span></td>
</tr>
<tr valign="top">
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">5.
</td>
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Puppet</td>
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>9% +</b></span></td>
</tr>
<tr valign="top" class="alt">
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">6.</td>
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Hadoop</td>
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>0.2% +</b></span></td>
</tr>
<tr valign="top">
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">7.</td>
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Git</td>
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>7% +</b></span></td>
</tr>
<tr valign="top" class="alt">
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">8.</td>
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Oracle PL/SQL</td>
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: red;"><b>8% -</b></span></td>
</tr>
<tr valign="top">
<td width="88" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">9.</td>
<td width="427" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">Tomcat</td>
<td width="257" bgcolor="#eeeeee" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>15% +</b></span></td>
</tr>
<tr valign="top" class="alt">
<td width="88" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">10.</td>
<td width="427" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm; padding-top: 0cm;">SAP</td>
<td width="257" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0.1cm; padding-top: 0cm;"><span style="color: #006600;"><b>3.5% +</b></span></td>
</tr>
</tbody>
</table>
注:表格数据,不需要翻译-结束
Thats all for now. Ill be here with the next part of the series following. Till then stay tuned. Stay Connected. Stay Commenting. Dont forget to provide us with your feedback. Like and share us and help us get spread.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/
作者:[Avishek Kumar][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/avishek/
[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/

View File

@ -0,0 +1,150 @@
Translating by weychen
10 Top Distributions in Demand to Get Your Dream Job
================================================================================
We are coming up with a series of five articles which aims at making you aware of the top skills which will help you in getting yours dream job. In this competitive world you can not rely on one skill. You need to have balanced set of skills. There is no measure of a balanced skill set except a few conventions and statistics which changes from time-to-time.
The below article and remaining to follow is the result of close study of job boards, posting and requirements of various IT Companies across the globe of last three months. The statistics keeps on changing as the demand and market changes. We will try our best to update the list when there is any major changes.
The Five articles of this series are…
- 10 Distributions in Demand to Get Your Dream Job
- [10 Famous IT Skills in Demand That Will Get You Hired][1]
- 10 Programming Skills That Will Help You to Get Dream Job
- 10 IT Networking Protocols Skills to Land Your Dream Job
- 10 Professional Certifications in Demand That Will Get You Hired
### 1. Windows ###
The operating System developed by Microsoft not only dominates the PC market but it is also the most sought OS skill from job perspective irrespective of all the odds and criticism that follows. It has shown a growth in demand which equals to 0.1% in the last quarter.
Latest Stable Release : Windows 8.1
### 2. Red Hat Enterprise Linux ###
Red Hat Enterprise Linux is a commercial Linux Distribution developed by Red Hat Inc. It is one of the Most widely used Linux distribution specially in corporates and production. It comes at number two having a overall growth in demand which equals to 17% in the last quarter.
Latest Stable Release : RedHat Enterprise Linux 7.1
### 3. Solaris ###
The UNIX Operating System developed by Sun Microsystems and now owned by Oracle Inc. comes at number three. It has shown a growth in demand which equals to 14% in the last quarter.
Latest Stable Release : Oracle Solaris 10 1/13
### 4. AIX ###
Advanced Interactive eXecutive is a Proprietary Unix Operating System by IBM stands at number four. It has shown a growth in demand which equals to 11% in the last quarter.
Latest Stable Release : AIX 7
### 5. Android ###
One of the most widely used open source operating system designed specially for mobile, tablet computers and wearable gadgets is now owned by Google Inc. comes at number five. It has shown a growth in demand which equals to 4% in the last quarter.
Latest Stable Release : Android 5.1 aka Lollipop
### 6. CentOS ###
Community Enterprise Operating System is a Linux distribution derived from RedHat Enterprise Linux. It comes at sixth position in the list. Market has shown a growth in demand which is nearly 22% for CentOS, in the last quarter.
Latest Stable Release : CentOS 7
### 7. Ubuntu ###
The Linux Operating System designed for Humans and designed by Canonicals Ltd. Ubuntu comes at position seventh. It has shown a growth in demand which equals to 11% in the last quarter.
Latest Stable Release :
- Ubuntu 14.10 (9 months security and maintenance update).
- Ubuntu 14.04.2 LTS
### 8. Suse ###
Suse is a Linux operating System owned by Novell. The Linux distribution is famous for YaST configuration tool. It comes at position eight. It has shown a growth in demand which equals to 8% in the last quarter.
Latest Stable Release : 13.2
### 9. Debian ###
The very famous Linux Operating System, mother of 100s of Distro and closest to GNU comes at number nine. It has shown a decline in demand which is nearly 9% in the last quarter.
Latest Stable Release : Debian 7.8
### 10. HP-UX ###
The Proprietary UNIX Operating System designed by Hewlett-Packard comes at number ten. It has shown a decline in the last quarter by 5%.
Latest Stable Release : 11i v3 Update 13
注:表格数据--不需要翻译--开始
<table border="0" cellspacing="0">
<colgroup width="107"></colgroup>
<colgroup width="92"></colgroup>
<colgroup width="80"></colgroup>
<tbody>
<tr>
<td height="25" bgcolor="#DDDDDD" align="center" style="border: 1px solid #000000;"><span style="color: #111111; font-size: small;">1</span></td>
<td bgcolor="#DDDDDD" align="center" style="border: 1px solid #000000;"><span style="color: #111111; font-size: small;">Windows</span></td>
<td bgcolor="#DDDDDD" align="center" style="border: 1px solid #000000;"><b><span style="color: #111111; font-size: small;">0.1% +</span></b></td>
</tr>
<tr class="alt">
<td height="25" bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">2</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">RedHat</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><b><span style="color: #007826; font-size: small;">17% +</span></b></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">3</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">Solaris</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><b><span style="color: #007826; font-size: small;">14% +</span></b></td>
</tr>
<tr class="alt">
<td height="25" bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">4</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">AIX</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><b><span style="color: #007826; font-size: small;">11% +</span></b></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">5</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">Android</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><b><span style="color: #007826; font-size: small;">4% +</span></b></td>
</tr>
<tr class="alt">
<td height="25" bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">6</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">CentOS</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><b><span style="color: #007826; font-size: small;">22% +</span></b></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">7</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">Ubuntu</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><b><span style="color: #007826; font-size: small;">11% +</span></b></td>
</tr>
<tr class="alt">
<td height="25" bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">8</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">Suse</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><b><span style="color: #007826; font-size: small;">8% +</span></b></td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">9</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">Debian</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><b><span style="color: #ff3300; font-size: small;">9% -</span></b></td>
</tr>
<tr class="alt">
<td height="25" bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">10</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><span style="font-size: small;">HP-UX</span></td>
<td bgcolor="#FFFFFF" align="center" style="border: 1px solid #000000;"><b><span style="color: #ff3300; font-size: small;">5% -</span></b></td>
</tr>
</tbody>
</table>
注:表格数据--不需要翻译--结束
Thats all for now. Ill be coming up with the next article of this series very soon. Till then stay tuned and connected to Tecmint. Dont forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/
作者:[Avishek Kumar][a]
译者:[weychen](https://github.com/weychen)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/avishek/
[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/

View File

@ -1,99 +0,0 @@
FSSlc translating
How to Remember and Restore Running Applications on Next Logon
================================================================================
You have made some apps running in your Ubuntu and don't want to stop the process, just managed your windows and opened your stuffs needed to work. Then, something else demands your attention or you have battery low in your machine and you have to shut down. No worries. You can have Ubuntu remember all your running applications and restore them the next time you log in.
Now, to make our Ubuntu remember the applications you have running in our current session and restore them the next time our log in, We will use the dconf-editor. This tool replaces the gconf-editor available in previous versions of Ubuntu but is not available by default. To install the dconf-editor, you need to run sudo apt-get install dconf-editor.
$ sudo apt-get install dconf-tools
Once the dconf-editor is installed, you can open dconf-editor from Application Menu. Or you can run it from terminal or run command (alt+f2):
$ dconf-editor
In the “dconf Editor” window, click the right arrow next to “org” in the left pane to expand that branch of the tree.
![Dconf Editor Apps, org](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-org-300x146.png)
Under “org”, click the right arrow next to “gnome.”
![dconf editor clicking gnome](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-gnome.png)
Under “gnome,” click “gnome-session”. In the right pane, select the “auto-save-session” check box to turn on the option.
![dconf-editor selecting auto save session](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_selecting_auto_save_session.png)
After you check or tick it, close the “Dconf Editor” by clicking the close button (X) in the upper-left corner of the window which is by default.
![dconf-editor closing dconf editor](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_closing_dconf_editor.png)
The next time you log out and log back in, all of your running applications will be restored.
Hurray, we have successfully configured our Ubuntu 14.04 LTS "Trusty" to remember automatically running applications from our last session.
Now, on this same tutorial, we'll gonna also learn **how to enable hibernation in our Ubuntu 14.04 LTS**:
Before getting started, press Ctrl+ALt+T on your keyboard to open the terminal. When it opens, run:
sudo pm-hibernate
After your computer turns off, switch it back on. Did your open applications re-open? If hibernate doesnt work, check if your swap partition is at least as large as your available RAM.
You can check your Swap Area Partition Size from System Monitor, you can get it from the App Menu or run command in terminal.
$ gnome-system-monitor
### Enable Hibernate in System Tray Menu: ###
The indicator-session was updated to use logind instead of upower. Hibernate is disabled by default in both upower and logind.
To re-enable hibernate, run the commands below one by one to edit the config file:
sudo -i
cd /var/lib/polkit-1/localauthority/50-local.d/
gedit com.ubuntu.enable-hibernate.pkla
**Tips: if the config file does not work for you, try another one by changing /var/lib to /etc in the code.**
Copy and paste below lines into the file and save it.
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes
Restart your computer and done.
### Hibernate your laptop when lid is closed: ###
1.Edit “/etc/systemd/logind.conf” via command:
$ sudo nano /etc/systemd/logind.conf
2. Change the line **#HandleLidSwitch=suspend to HandleLidSwitch=hibernate** and save the file.
3. Run command below or just restart your computer to apply changes:
$ sudo restart systemd-logind
Thats it. Enjoy! Now, we have both dconf and hibernation on :) Now, your Ubuntu will completely remember your opened apps and stuffs.
--------------------------------------------------------------------------------
via: http://linoxide.com/ubuntu-how-to/remember-running-applications-ubuntu/
作者:[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/

View File

@ -1,70 +0,0 @@
Linux Email App Geary Updated — How To Install It In Ubuntu
================================================================================
**Geary, the popular desktop email client for Linux, has been updated to version 0.10 — and it gains a glut of new features in the process.**
![An older version of Geary running in elementary OS](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/geary.jpg)
An older version of Geary running in elementary OS
Geary 0.100 features some welcome user interface improvements and additional UI options, including:
- New: Ability to Undo Archive, Trash and Move actions
- New: Option to switch between a 2 column or 2 column layout
- New “split header bar” — improves message list, composer layouts
- New shortcut keys — use j/k to navigate next/previous conversations
This update also introduces a **brand new full-text search algorithm** designed to improve the search experience in Geary, according to Yorba.
This introduction should calm some complaints of the apps search prowess, which often sees Geary return a slew of search results that are, to quote software outfit themselves, “…seemingly unrelated to the search query.”
> Yorba recommends that all users of the client upgrade to this release
*“Although not all search problems are fixed in 0.10, Geary should be more conservative about displaying results that match the users query,” [the team notes][1]. *
Last but by no means least on the main feature front is something sure to find favour with power users: **support for multiple/alternate e-mail addresses per account**.
If your main Gmail account is set-up in Geary to pull in your Yahoo, Outlook and KittyMail messages too then you should now see them all kept neatly together and be given the option of picking which identity you send from when using the composer From field. No, its not the sexiest feature but it is one that has been requested often.
Rounding out this release of the popular Linux email client is the usual gamut of bug fixes, performance optimisations and miscellaneous improvements.
Yorba recommends that all users of the client upgrade to this release.
### Install Geary 0.10 in Ubuntu 14.04, 14.10 & 15.04 ###
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/geary-inline-composor.jpg)
The latest version of Yorba is available to download as source, ready for compiling from the GNOME Git. But lets be honest: thats a bit of a hassle, right?
Ubuntu users wondering how to install Geary 0.10 in **14.04, 14.10** and (for early birds) **15.04** have things easy.
The official Yorba PPA contains the **latest versions of Geary** as well as those for Shotwell (photo manager) and [California][2] (calendar app). Be aware that any existing versions of these apps installed on your computer may/will be upgraded to a more recent version by adding this PPA.
Capiche? Coolio.
To install Geary in Ubuntu you first need to add the Yorba PPA your Softwares Sources. To do this just open a new Terminal window and carefully enter the following two commands:
sudo add-apt-repository ppa:yorba/ppa
sudo apt-get update && sudo apt-get install geary
After hitting return/enter on the last youll be prompted to enter your password. Do this, and then let the installation complete.
![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/20130320161830-geary-yorba.png)
Once done, open your desktop environments app launcher and seek out the Geary icon. Click it, add your account(s) and discover [what the email mail man has dropped off through the information superhighway][3] and into the easy to use graphical interface.
**Dont forget: you can always tip us with news, app suggestions, and anything else youd like to see us cover by using the power of electronic mail. Direct your key punches to joey [at] oho [dot] io.**
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update
作者:[Joey-Elijah Sneddon][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://plus.google.com/117485690627814051450/?rel=author
[1]:https://wiki.gnome.org/Apps/Geary/FullTextSearchStrategy
[2]:http://www.omgubuntu.co.uk/2014/10/california-calendar-natural-language-parser
[3]:https://www.youtube.com/watch?v=rxM8C71GB8w

View File

@ -1,156 +0,0 @@
5 Linux Command Line Based Tools for Downloading Files and Browsing Websites
================================================================================
Linux command-line, the most adventurous and fascinating part of GNU/Linux is very cool and powerful tool. Command line itself is very productive and the availability of various inbuilt and third party command line application makes Linux robust and powerful. The Linux Shell supports a variety of web application of various kind be it torrent downloader, dedicated downloader or Internet Surfing.
![Command Line Internet Tools](http://www.tecmint.com/wp-content/uploads/2014/02/Command-Line-Internet-Tools.jpg)
5 Command Line Internet Tools
Here we are presenting 5 great command line Internet tools, which are very useful and proves to be very handy.
### 1. rTorrent ###
rTorrent is a text­-based Torrent Client which is written in C++ aimed at high performance. It is available for most of the standard Linux Distributions including FreeBSD and Mac OS X.
#### Installation of rTorrent ####
# apt­-get install rtorrent (on APT based System)
----------
# yum install rtorrent (on YUM based System)
Check if rtorrent is installed correctly by running the following command in the terminal.
# rtorrent
![Command line torrent download](http://www.tecmint.com/wp-content/uploads/2014/02/rTorrent.jpeg)
rTorrent Command Line Tool
#### Functioning of rTorrent ####
Some of the useful Key-bindings and their use.
- CTRL+ q Quit rTorrent Application
- CTRL+ s Start Download
- CTRL+ d Stop an active Download or Remove an already stopped Download.
- CTRL+ k Stop and Close an active Download.
- CTRL+ r Hash Check a torrent before Upload/Download Begins.
- CTRL+ q When this key combination is executed twice, rTorrent shutdown without sending a stop Signal.
- Left Arrow Key Redirect to Previous screen.
- Right Arrow Key Redirect to Next Screen
### 2. Wget ###
Wget, is a part of GNU Project, the name is derived from World Wide Web (WWW). Wget is a brilliant tool which is useful for recursive download, offline viewing of HTML from local Server and is available for most of the platforms be it Windows, Mac, Linux. Wget makes it possible to download files over HTTP, HTTPS and FTP. Moreover it can be useful in mirroring the whole website as well as support for proxy browsing, pausing/resuming Downloads.
#### Installation of Wget ####
Wget being a GNU project comes bundled with Most of the Standard Linux Distributions and there is no need to download and install it separately. If in-case, its not installed by default, you can still install it using apt or yum.
# apt­-get install wget (on APT based System)
----------
# yum install wget (on YUM based System)
#### Some Basic Usage of Wget ####
Download a single file using wget.
# wget http://www.website-name.com/file
Download a whole website, recursively.
# wget -r http://www.website-name.com
Download specific type of file (say pdf and png) from a website.
# wget -r -A png,pdf http://www.website-name.com
Wget is a wonderful tool which enables custom and filtered download even on limited resource Machine. A screen shot of wget download, where we are mirroring a website (Yahoo.com).
![Wget Download Files](http://www.tecmint.com/wp-content/uploads/2014/02/Wget.jpeg)
Wget Command Line File Download
For more such wget download examples, read our article that shows [10 Wget Download Command Examples][1].
### 3. cURL ###
cURL is a command line tool for transferring data over a number of protocols. cURL is a client side application which support protocols like FTP, HTTP, FTPS, TFTP, TELNET, IMAP, POP3, etc. cURL is a simple downloader which is different from wget in supporting LDAP, POP3 as compared to others. Moreover Proxy Downloading, pausing download, resuming download are well supported in cURL.
#### Installation of cURL ####
By default cURL is available in most of the distribution either in repository or installed. if its not installed, just do a apt or yum to get a required package from the repository.
# apt­-get install curl (on APT based System)
----------
# yum install curl (on YUM based System)
Basic Usage of cURL
# curl www.tecmint.com
![Curl Download](http://www.tecmint.com/wp-content/uploads/2014/02/Curl.jpeg)
Curl Data Download
![Curl Data Download](http://www.tecmint.com/wp-content/uploads/2014/02/Curl-2.jpeg)
Curl Download
### 4. w3m ###
The w3m is a text based web browser released under GPL. W3m support tables, frames, color, SSL connection and inline images. W3m is known for fast browsing.
#### Installation of w3m ####
Again w3m is available by default in most of the Linux Distribution. If incase, it is not available you can always apt or yum the required package.
# apt­-get install w3m (on APT based System)
----------
# yum install w3m (on YUM based System)
#### Basic Usage of w3m ####
# w3m www.tecmint.com
![Command Line Browser](http://www.tecmint.com/wp-content/uploads/2014/02/w3m.jpeg)
w3m Text Based Web Browser
### 5. Elinks ###
Elinks is a free text-based web browser for Unix and Unix based System. Elinks support HTTP, HTTP Cookies and also support browsing script in Perl and Ruby. Tab based browsing is well supported. The best thing is that it supports Mouse, Display Colours and support a number of Protocols like HTTP, FTP, SMB, Ipv4 and Ipv6.
#### Installation of Elinks ####
By default elinks also available in most of the Linux distributions. If not, install it via apt or yum.
# apt­-get install elinks (on APT based System)
----------
# yum install elinks (on YUM based System)
Basic Usage of Elinks
# elinks www.tecmint.com
![Command Line Internet Browsing](http://www.tecmint.com/wp-content/uploads/2014/02/Elinks.jpeg)
Elinks Command Line Web Browsing
Thats all for now. Ill be here again with an interesting article which you people will love to read. Till then stay tuned and connected to Tecmint and dont forget to give your valuable feedback in comment section.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/linux-command-line-tools-for-downloading-files/
作者:[Avishek Kumar][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/avishek/
[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/

View File

@ -1,329 +0,0 @@
How To Install CentOS Web Panel In CentOS
================================================================================
![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/04/centos-790x427.jpg)
### About CentOS Web Panel ###
There are so many free and paid Control panels available nowadays. We will, today, discuss about [CentOS Web panel(CMP)][1], specially designed for RPM based distributions like CentOS, RHEL, Scientific Linux etc. **CWP** is a free, Open Source control panel that can be widely used for deploying a Web hosting environment easily. Unlike other Control panels, CWP is automatically deploy the LAMP stack with Varnish Cache server.
### Features ###
CWP comes with lot of features and free services. As I mentioned before, CWP automatically installs full LAMP stack (apache, php, phpmyadmin, webmail, mailserver etc.) on your server.
Here is the complete list of features and software that will be automatically installed and configured during CWP installation.
#### List of softwares to be installed and configured during CWP installation: ####
- Apache Web Server
- PHP 5.4
- MySQL + phpMyAdmin
- Postfix + Dovecot + roundcube webmail
- CSF Firewall
- File System Lock (no more website hacking, all your files are locked from changes)
- Backups; AutoFixer for server configuration
#### 3rd Party Applications: ####
- CloudLinux + CageFS + PHP Selector
- Softaculous Script Installer (Free and Premium)
#### Web Server: ####
- Varnish Cache server
- Compiles Apache from source
- Apache reCompiler + Additional modules
- Apache server status, configuration
- Edit apache vhosts, vhosts templates, include configuration
- Rebuild all apache Virtual hosts
- suPHP & suExec
- Mod Security + OWASP rules
- Tomcat 8 server management
- DoS protection
- Perl cgi script support
#### PHP: ####
- PHP Switcher (switch between PHP versions like: 5.2, 5.3, 5.4, 5.5)
- PHP Selector select PHP version per user or per folder (PHP 4.4, 5.2, 5.3, 5.4, 5.5, 5.6)
- Simple php editor
- Simple php.ini generator in the users panel
- PHP addons
- PHP.ini editor & PHP info & List modules
- php.ini per user account
- FFMPEG, For Video streaming websites
- CloudLinux + PHP Selector
#### User Management ####
- Add, List, Edit adn Remove Users
- User Monitoring
- Shell access management
- User Limit Managment
- Limit Processes
- Limit Open Files
- User FTP & File Manager
- CloudLinux + CageFS
- Dedicated IP per account
#### DNS: ####
- FreeDNS
- Add, Edit, List and Remove DNS zones
- Edit nameserver IPs
- DNS zone template editor
- New Easy DNS Zone Manager (with ajax)
- New DNS Zone list with Additional resolving information using google (also checking rDNS, nameservers….)
#### Email: ####
- Postfix & dovecot
- MailBoxes, Alias
- Roundcube webmail
- Postfix Mail queue
- rDNS Checker Module
- AntiSPAM
- SPF & DKIM Integration
- Re-Build Postfix/Dovecot Mail server with AntiVirus, AntiSpam Protection
- Email Auto Responder
#### System: ####
- CPU core and clock info
- Memory usage info
- Detailed Disk status
- Software Info like kernel version, uptime etc.
- Services Status
- ChkConfig Manager
- Network port usage
- Network configuration
- SSHD configuration
- Auto-Fixer (checks important configuration and tries to auto-fix issues)
#### Monitoring: ####
- Monitor services eg. top, apache stats, mysql etc.
- Use Java SSH Terminal/Console within panel
- Services Configuration (eg. Apache, PHP, MySQL etc)
- Run shell commands in screen/background
#### Security: ####
- CSF Firewall
- SSL generator
- SSL Certificate Manager
- CloudLinux + CageFS
#### SQL: ####
- MySQL Database Management
- Add local or remote access user
- Live Monitor MySQL process list
- Create, Remove database
- Add additional users per database
- MySQL server configuration
- PhpMyAdmin
- PostgreSQL, phpPgAdmin Support
#### Additional options: ####
- TeamSpeak 3 Manager
- Shoutcast Manager
- Auto-update
- Backup manager
- File Manager
- Virtual FTP users per domain
- cPanel Account Migration (restores files, databases and database users)
- And many more.
### Install CentOS Web Panel In CentOS 6 ###
At the time writing this tutorial, CWP only supports upto CentOS 6.x versions. It doesnt work on CentOS 7 and later versions.
#### Prerequisites: ####
**Before installing CWP, you must know the following information:**
- CWP only supports static IP addresses. It does not support dynamic, sticky, or internal IP addresses.
- CWP doesnt has an uninstaller. After you install CWP, you must reinstall the server to remove it.
- Only install CWP on a freshly installed operating system without any configuration changes.
- Need atleast 512MB RAM for 32 bit systems.
- 1024MB for 64 bit systems.
- Need 4GB RAM or more to deploy all modules.
- At least 20GB or hard disk space is required.
For testing purpose in VirtualBox, 640MB RAM and 10GB hdd space is enough.
#### Update server: ####
Install wget package first. This is needed to download CWP.
yum install wget -y
Update your server using command:
yum update -y
Reboot once to take effect the changes.
#### Install CWP: ####
Change to **/usr/local/src/** directory:
cd /usr/local/src
Download latest CWP version with command:
wget http://centos-webpanel.com/cwp-latest
If the above URL doesnt work, use the following link instead.
wget http://dl1.centos-webpanel.com/files/cwp-latest
Then, start CWP installer using command:
sh cwp-latest
**Sample output:**
![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_001.png)
![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_002.png)
The installation will take upto 30 minutes or more depending upon your Internet speed.
Finally, youll see the installation completed message like below. Note down the details such as mysql root user password and login URLs of CWP. You”ll need them later. Then Press Enter key to reboot your system.
![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_004.png)
After booting into the system, you will see the CWP welcome login message.
![](http://www.unixmen.com/wp-content/uploads/2015/04/CentOS-6.5-Minimal-Running-Oracle-VM-VirtualBox_006.png)
#### Adjust Firewall/Router: ####
The CWP default web console ports are **2030(http)** and **2031(https)**. You should allow the both ports through firewall/Router in order to access the CWP web console from a remote system.
To do that, edit:
vi /etc/sysconfig/iptables
Add the following lines:
[...]
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2030 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2031 -j ACCEPT
[...]
Save and close the file. Restart iptables service to take effect the changes.
service iptables restart
### Accessing CWP Web Console ###
Open up your browser and type:
**http://IP-Address:2030/**
Or
**https://IP-Address:2031/**
You will see the following like screen.
The login credentials are:
- **Username**: root
- **Password**: your root password
![](http://www.unixmen.com/wp-content/uploads/2015/04/Login-CentOS-WebPanel-Mozilla-Firefox_007.png)
This is how CWP dashboard will look:
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_008.png)
Congratulations! CWP has been successfully has been installed.
### CWP Basic Configuration ###
Next, we have to do couple of things such as:
1. Setup nameservers
1. Setup shared ip (must be your public IP address)
1. Setup at least one hosting package (or edit default package)
1. Setup root email, etc.
#### Setup nameservers: ####
To setup nameservers, go to **DNS Functions -> Edit nameservers IPs**.
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_009.png)
Set your nameservers and click Save changes button.
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_010.png)
#### Setup Shared IP And Root mail ID: ####
This is important step to host websites on your host. To setup shared IP, go to **CWP Settings -> Edit settings**.
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_011.png)
Enter your Static IP and Email ID, and Click Save settings button.
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_012.png)
Now, CWP is ready to host websites.
#### Setup hosting package: ####
A hosting package is nothing but a Web hosting plan that consists of allowed diskspace, bandwidth, no of FTP accounts, no of email ids, and no of databases etc. You can setup any number of web hosting plans as your wish.
To add a package, go to **Packages Add a Package** from the CWP console.
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_013.png)
Enter the name of the package, amount of Diskquota/RAM allowed, FTP/Email accounts, Databases, and subdomains etc. Click Save settings button to create the web hosting plan.
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_014.png)
Now, CWP is ready to host your domains.
#### Adding Domains: ####
To create a new Domain, you to have at least one user account.
To add a user, go to **User Accounts -> New Account**.
Enter the domain(ex.unixmen.com), username, password and Email id etc. Finally, click **Create**.
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_016.png)
Now, let us add a new domain.
To add a domain, go to **Domains -> Add Domain**.
Enter the Domain and assign the domain the users of your choice.
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_017.png)
### Conclusion ###
In this tutorial, we have seen how to install and configure CentOS Web Panel to create a simple web hosting environment. CWP is very simple to install and use. Even a novice user can create a basic web hosting server in a couple of hours. Also, CWP is completely free to use and open source. Give it a try! You wont be disappointed.
You can find the more details about CWP in the [CentOS Web Panel Wiki page][2].
Cheers!
--------------------------------------------------------------------------------
via: http://www.unixmen.com/how-to-install-centos-web-panel-in-centos/
作者:[SK][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.unixmen.com/author/sk/
[1]:http://centos-webpanel.com/
[2]:http://wiki.centos-webpanel.com/

View File

@ -0,0 +1,261 @@
4 Tools Send Email with Subject, Body and Attachment in Linux
================================================================================
In today's article we will cover a few ways you can use to send emails with attachments from the command line interface on Linux. It can have quite a few uses, for example to send an archive with an application from an application server to email or you can use the commands in scripts to automate some process. For our examples,we will use the file foo.tar.gz as our attachment.
There are various ways to send emails from command line using different mail clients but here I am sharing few mail client utility used by most users like mailx, mutt and swaks.
All the tools we will present to you are very popular and present in the repositories of most Linux distributions, you can install them using the following commands:
For **Debian / Ubuntu** systems
apt-get install mutt
apt-get install swaks
apt-get install mailx
apt-get install sharutils
For Red Hat based systems like **CentOS** or **Fedora**
yum install mutt
yum install swaks
yum install mailx
yum install sharutils
### 1) Using mail / mailx ###
The mailx utility found as the default mailer application in most Linux distributions now includes the support to attach file. If it is not available you can easily install using the following commands please take note that this may not be supported in older versions, to check this you can use the command:
$ man mail
And the first line should look like this:
mailx [-BDdEFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr] [-r from-addr] [-h hops] [-A account] [-S variable[=value]] to-addr . . .
As you can see it supports the -a attribute to add a file to the email and -s attribute to subject to the email. Use few of below examples to send mails.
**a) Simple Mail**
Run the mail command, and then mailx would wait for you to enter the message of the email. You can hit enter for new lines. When done typing the message, press Ctrl+D and mailx would display EOT.
After than mailx automatically delivers the email to the destination.
$ mail user@example.com
HI,
Good Morning
How are you
EOT
**b) To send email with subject**
$ echo "Email text" | mail -s "Test Subject" user@example.com
-s is used for defining subject for email.
**c) To send message from a file**
$ mail -s "message send from file" user@example.com < /path/to/file
**d) To send message piped using the echo command**
$ echo "This is message body" | mail -s "This is Subject" user@example.com
**e) To send email with attachment**
$ echo “Body with attachment "| mail -a foo.tar.gz -s "attached file" user@example.com
-a is used for attachments
### 2) mutt ###
Mutt is a text-based email client for Unix-like systems. It was developed over 20 years ago and it's an important part of Linux history, one of the first clients to support scoring and threading capabilities. Use few of below examples to send email.
**a) Send email with subject & body message from a file**
$ mutt -s "Testing from mutt" user@example.com < /tmp/message.txt
**b) To send body message piped using the echo command**
$ echo "This is the body" | mutt -s "Testing mutt" user@example.com
**c) To send email with attachment**
$ echo "This is the body" | mutt -s "Testing mutt" user@example.com -a /tmp/foo.tar.gz
**d) To send email with multiple attachments**
$ echo "This is the body" | mutt -s "Testing" user@example.com -a foo.tar.gz a bar.tar.gz
### 3) swaks ###
Swaks stands for Swiss Army Knife for SMTP and it is a featureful, flexible, scriptable, transaction-oriented SMTP test tool written and maintained by John Jetmore. You can use the following syntax to send an email with attachment:
$ swaks -t "foo@bar.com" --header "Subject: Subject" --body "Email Text" --attach foo.tar.gz
The important thing about Swaks is that it will also debug the full mail transaction for you, so it is a very useful tool if you also wish to debug the mail sending process:
As you can see it gives you full details about the sending process including what capabilities the receiving mail server supports, each step of the transaction between the 2 servers.
### 4) uuencode ###
Email transport systems were originally designed to transmit characters with a seven-bit encoding -- like ASCII. This meant they could send messages with plain text but not "binary" text, such as program files or image files that used all of an eight-bit byte. The program is used to solve this limitation is “uuencode”( "UNIX to UNIX encoding") which encode the mail from binary format to text format that is safe to transmit & program is used to decode the data is called “uudecode”
We can easily send binary text such as a program files or image files using uuencode with mailx or mutt email client is shown by following example:
$ uuencode example.jpeg example.jpeg | mail user@example.com
### Shell Script : Explain how to send email ###
#!/bin/bash
FROM=""
SUBJECT=""
ATTACHMENTS=""
TO=""
BODY=""
# Function to check if entered file names are really files
function check_files()
{
output_files=""
for file in $1
do
if [ -s $file ]
then
output_files="${output_files}${file} "
fi
done
echo $output_files
}
echo "*********************"
echo "E-mail sending script."
echo "*********************"
echo
# Getting the From address from user
while [ 1 ]
do
if [ ! $FROM ]
then
echo -n -e "Enter the e-mail address you wish to send mail from:\n[Enter] "
else
echo -n -e "The address you provided is not valid:\n[Enter] "
fi
read FROM
echo $FROM | grep -E '^.+@.+$' > /dev/null
if [ $? -eq 0 ]
then
break
fi
done
echo
# Getting the To address from user
while [ 1 ]
do
if [ ! $TO ]
then
echo -n -e "Enter the e-mail address you wish to send mail to:\n[Enter] "
else
echo -n -e "The address you provided is not valid:\n[Enter] "
fi
read TO
echo $TO | grep -E '^.+@.+$' > /dev/null
if [ $? -eq 0 ]
then
break
fi
done
echo
# Getting the Subject from user
echo -n -e "Enter e-mail subject:\n[Enter] "
read SUBJECT
echo
if [ "$SUBJECT" == "" ]
then
echo "Proceeding without the subject..."
fi
# Getting the file names to attach
echo -e "Provide the list of attachments. Separate names by space.
If there are spaces in file name, quote file name with \"."
read att
echo
# Making sure file names are poiting to real files
attachments=$(check_files "$att")
echo "Attachments: $attachments"
for attachment in $attachments
do
ATTACHMENTS="$ATTACHMENTS-a $attachment "
done
echo
# Composing body of the message
echo "Enter message. To mark the end of message type ;; in new line."
read line
while [ "$line" != ";;" ]
do
BODY="$BODY$line\n"
read line
done
SENDMAILCMD="mutt -e \"set from=$FROM\" -s \"$SUBJECT\" \
$ATTACHMENTS -- \"$TO\" <<< \"$BODY\""
echo $SENDMAILCMD
mutt -e "set from=$FROM" -s "$SUBJECT" $ATTACHMENTS -- $TO <<< $BODY
**Script Output**
$ bash send_mail.sh
*********************
E-mail sending script.
*********************
Enter the e-mail address you wish to send mail from:
[Enter] test@gmail.com
Enter the e-mail address you wish to send mail to:
[Enter] test@gmail.com
Enter e-mail subject:
[Enter] Message subject
Provide the list of attachments. Separate names by space.
If there are spaces in file name, quote file name with ".
send_mail.sh
Attachments: send_mail.sh
Enter message. To mark the end of message type ;; in new line.
This is a message
text
;;
### Conclusion ###
There are many ways of send emails from command line / shell script but here we have shared 4 tools available for unix / linux based distros. Hope you enjoyed reading our article and please provide your valuable comments and also let us know if you know about any new tools.
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-shell-script/send-email-subject-body-attachment-linux/
作者:[Bobbin Zachariah][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/bobbin/

View File

@ -0,0 +1,95 @@
Install Inkscape - Open Source Vector Graphic Editor
================================================================================
Inkscape is an open source vector graphic editing tool which uses Scalable Vector Graphics (SVG) and that makes it different from its competitors like Xara X, Corel Draw and Adobe Illustrator etc. SVG is a widely-deployed royalty-free graphics format developed and maintained by the W3C SVG Working Group. It is a cross platform tool which runs fine on Linux, Windows and Mac OS.
Inkscape development was started in 2003, Inkscape's bug tracking system was hosted on Sourceforge initially but it was migrated to Launchpad afterwards. Its current latest stable version is 0.91. It is under continuous development and bug fixes and we will be reviewing its prominent features and installing process in the article.
### Salient Features ###
Lets review the outstanding features of this application categorically.
#### Creating Objects ####
- Drawing different colored sized and shaped freehand lines through pencil tool, straight lines and curves through Bezier (pen) tool, applying freehand calligraphic strokes through calligraphic tool etc
- Creating, selecting, editing and formatting text through text tool. Manipulating text in plain text boxes, on paths or in shapes
- Helps draw various shapes like rectangles, ellipses, circles, arcs, polygons, stars, spirals etc and then resize, rotate and modify (turn sharp edges round) them
- Create and embed bitmaps with simple commands
#### Object manipulation ####
- Skewing, moving, scaling, rotating objects through interactive manipulations and pacifying the numeric values
- Performing raising and lowering Z-order operations
- Grouping and ungrouping objects to create a virtual scope for editing or manipulation
- Layers form a hierarchal tree and can be locked or rearranged for various manipulations
- Distribution and alignment commands
#### Fill and Stroke ####
- Copy/paste styles
- Pick Color tool
- Selecting colors on a continuous plot based on vectors of RGB, HSL, CMS, CMYK and color wheel
- Gradient editor helps creating and managing multi-stop gradients
- Define an image or selection and use it to pattern fill
- Dashed Strokes can be used with few predefined dashed patterns
- Beginning, middle and ending marks through path markers
#### Operation on Paths ####
- Node Editing: Moving nodes and Bezier handles, node alignment and distribution etc
- Boolean operations like yes or no conditions
- Simplifying paths with variable levels or thresholds
- Path insetting and outsetting along with link and offset objects
- Converting bitmap images into paths (color and monochrome paths) through path tracing
#### Text manipulation ####
- All installed outlined fonts can be used even for right to left align objects
- Formatting text, letter spacing, line spacing or kerning
- Text on path and on shapes where both text and path or shapes can be edited or modified
#### Rendering ####
- Inkscape fully support anti-aliased display which is a technique that reduces or eliminates aliasing by shading the pixels along the border.
- Support for alpha transparency display and PNG export
### Install Inkscape on Ubuntu 14.04 and 14.10 ###
In order to install Inkscape on Ubuntu, we will need to first [add its stable Personal Package Archive][1] (PPA) to Advanced Package Tool (APT) repository. Launch the terminal and run following command to add its PPA.
sudo add-apt-repository ppa:inkscape.dev/stable
![PPA Inkscape](http://blog.linoxide.com/wp-content/uploads/2015/03/PPA-Inkscape.png)
Once the PPA has been added to the APT repository we need to update it using following command.
sudo apt-get update
![Update APT](http://blog.linoxide.com/wp-content/uploads/2015/03/Update-APT2.png)
After updating the repository we are ready to install inkscape which is accomplished using the following command.
sudo apt-get install inkscape
![Install Inkscape](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Inkscape.png)
Congratulation, Inkscape has been installed now and all set for image editing and making full use of feature rich application.
![Inkscape Main](http://blog.linoxide.com/wp-content/uploads/2015/03/Inkscape-Main1.png)
### Conclusion ###
Inkscape is a feature rich graphic editing tool which empowers its user with state of the art capabilities. It is an open source application which is freely available for installation and customizations and supports wide range of file formats including but not limited to JPEG, PNG, GIF and PDF. Visit its [official website][2] for more news and updates regarding this application.
--------------------------------------------------------------------------------
via: http://linoxide.com/tools/install-inkscape-open-source-vector-graphic-editor/
作者:[Aun Raza][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/arunrz/
[1]:https://launchpad.net/~inkscape.dev/+archive/ubuntu/stable
[2]:https://inkscape.org/en/

View File

@ -0,0 +1,153 @@
wangjiezhe translating...
7 Command Line Tools for Browsing Websites and Downloading Files in Linux
================================================================================
In the last article, we have covered few useful tools like rTorrent, wget, cURL, w3m, and Elinks. We got lots of response to cover few other tools of same genre, if youve missed the first part you can go through it..
- [5 Command Line Tools for Downloading Files and Browsing Websites][1]
This article aims at making you aware of several other Linux command Line browsing and downloading applications, which will help you to browse and download files within the Linux shell.
### 1. links ###
Links is an open source web browser written in C programming Language. It is available for all major platforms viz., Linux, Windows, OS X and OS/2. This browser is text based as well as graphical. The text based links web browser is shipped by most of the standard Linux distributions by default. If links is not installed in your system by default you may install it from the repo. Elinks is a fork of links.
# apt-get install links
# yum install links
After installing links, you can browse any websites within the terminal as shown below in the screen cast..
# links www.tecmint.com
Use UP and DOWN arrow keys to navigate. Right arrow Key on a link will redirect you to that link and Left arrow key will bring you back to the last page. To QUIT press q.
Here is how it seems to access Tecmint using links tool.
![](http://www.tecmint.com/wp-content/uploads/2015/04/links-browse-websites-terminal.gif)
If you are interested in installing GUI of links, you may need to download latest source tarball (i.e. version 2.9) from [http://links.twibright.com/download/][2].
Alternatively, you may use following wget command to download and install as suggested below.
# wget http://links.twibright.com/download/links-2.9.tar.gz
# tar -xvf links-2.9.tar.gz
# cd links-2.9
# ./configure enable-graphics
# make
# make install
**Note**: You need to install packages (libpng, libjpeg, TIFF library, SVGAlib, XFree86, C Compiler and make), if not already installed to successfully compile the package.
### 2. links2 ###
Links2 is a graphical web browser version of Twibright Labs Links web browser. This browser has support for mouse and clicks. Designed specially for speed without any CSS support, fairly good HTML and JavaScript support with limitations.
To install links2.
# apt-get install links2
# yum install links2
### 3. lynx ###
A text based web browser released under GNU GPLv2 license and written in ISO C. lynx is highly configurable web browser and Savior for many SYSAdmin. It has the reputation of being the oldest web browser that is being used and still actively developed.
To install lynx.
# apt-get install lynx
# yum install lynx
After installing lynx, type the following command to browse the website as shown below in the screen cast..
# lynx www.tecmint.com
![](http://www.tecmint.com/wp-content/uploads/2015/04/lynx-commandline-web-browsing.gif)
If you are interested in knowing a bit more about links and lynx web browser, you may like to visit the below link:
- [Web Browsing with Lynx and Links Command Line Tools][3]
### 4. youtube-dl ###
youtube-dl is a platform independent application which can be used to download videos from youtube and a few other sites. Written primarily in python and released under GNU GPL License, the application works out of the box. (Since youtube dont allow you to download videos, it may be illegal to use it. Check the laws before you start using this.)
To install youtube-dl.
# apt-get install youtube-dl
# yum install youtube-dl
After installing, try to download files from the Youtube site, as shown in the below screen cast.
# youtube-dl https://www.youtube.com/watch?v=ql4SEy_4xws
![](http://www.tecmint.com/wp-content/uploads/2015/04/download-youtube-videos-from-terminal.gif)
If you are interested in knowing more about youtube-dl you may like to visit the below link:
- [YouTube-DL A Command Line Youtube Video Downloader for Linux][4]
### 5. fetch ###
It is a command utility for unix-like operating system that is used for URL retrieval. It supports a lot of options like fetching ipv4 only address, ipv6 only address, no redirect, exit after successful file retrieval request, retry, etc.
Fetch can be Downloaded and installed from the link below
- [http://sourceforge.net/projects/fetch/?source=typ_redirect][5]
But before you compile and run it, you should install HTTP Fetcher. Download HTTP Fetcher from the link below.
- [http://sourceforge.net/projects/http-fetcher/?source=typ_redirect][6]
### 6. Axel ###
Axel is a command-line based download accelerator for Linux. Axel makes it possible to download a file at much faster speed through single connection request for multiple copies of files in small chunks through multiple http and ftp connections.
To install Axel.
# apt-get install axel
# yum install axel
After axel installed, you may use following command to download any given file, as shown in the screen cast.
# axel http://mirror.cse.iitk.ac.in/archlinux/iso/2015.04.01/archlinux-2015.04.01-dual.iso
![](http://www.tecmint.com/wp-content/uploads/2015/04/download-accelarator-for-linux.gif)
### 7. aria2 ###
aria2 is a command-line based download utility that is lightweight and support multi-protocol (HTTP, HTTPS, FTP, BitTorrent and Metalink). It can use metalinks files to simultaneously download ISO files from more than one server. It can serve as a Bit torrent client as well.
To install aria2.
# apt-get install aria2
# yum install aria2
Once aria2 installed, you can fire up the following command to download any given file…
# aria2c http://cdimage.debian.org/debian-cd/7.8.0/multi-arch/iso-cd/debian-7.8.0-amd64-i386-netinst.iso
![Aria2: Command Line Download Manager for Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Download-Files-in-Terminal.gif)
Aria2: Command Line Download Manager for Linux
If youre interested to know more at aria2 and their switches, read the following article.
- [Aria2 A Multi-Protocol Command-Line Download Manager for Linux][7]
Thats all for now. Ill be here again with another interesting topic you people will love to read. Till then stay tuned and connected to Tecmint. Dont forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/command-line-web-browser-download-file-in-linux/
作者:[Avishek Kumar][a]
译者:[wangjiezhe](https://github.com/wangjiezhe)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/avishek/
[1]:http://www.tecmint.com/linux-command-line-tools-for-downloading-files/
[2]:http://links.twibright.com/download/
[3]:http://www.tecmint.com/command-line-web-browsers/
[4]:http://www.tecmint.com/install-youtube-dl-command-line-video-download-tool/
[5]:http://sourceforge.net/projects/fetch/?source=typ_redirect
[6]:http://sourceforge.net/projects/http-fetcher/?source=typ_redirect
[7]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/

View File

@ -0,0 +1,159 @@
How to Install and Configure Multihomed ISC DHCP Server on Debian Linux
================================================================================
Dynamic Host Control Protocol (DHCP) offers an expedited method for network administrators to provide network layer addressing to hosts on a constantly changing, or dynamic, network. One of the most common server utilities to offer DHCP functionality is ISC DHCP Server. The goal of this service is to provide hosts with the necessary network information to be able to communicate on the networks in which the host is connected. Information that is typically served by this service can include: DNS server information, network address (IP), subnet mask, default gateway information, hostname, and much more.
This tutorial will cover ISC-DHCP-Server version 4.2.4 on a Debian 7.7 server that will manage multiple virtual local area networks (VLAN) but can very easily be applied to a single network setup as well.
The test network that this server was setup on has traditionally relied on a Cisco router to manage the DHCP address leases. The network currently has 12 VLANs needing to be managed by one centralized server. By moving this responsibility to a dedicated server, the router can regain resources for more important tasks such as routing, access control lists, traffic inspection, and network address translation.
The other benefit to moving DHCP to a dedicated server will, in a later guide, involve setting up Dynamic Domain Name Service (DDNS) so that new hosts host-names will be added to the DNS system when the host requests a DHCP address from the server.
### Step 1: Installing and Configuring ISC DHCP Server ###
1. To start the process of creating this multi-homed server, the ISC software needs to be installed via the Debian repositories using the apt utility. As with all tutorials, root or sudo access is assumed. Please make the appropriate modifications to the following commands.
# apt-get install isc-dhcp-server [Installs the ISC DHCP Server software]
# dpkg --get-selections isc-dhcp-server [Confirms successful installation]
# dpkg -s isc-dhcp-server [Alternative confirmation of installation]
![Install ISC DHCP Server in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ISC-DHCP-Server.jpg)
2. Now that the server software is confirmed installed, it is now necessary to configure the server with the network information that it will need to hand out. At the bare minimum, the administrator needs to know the following information for a basic DHCP scope:
- The network addresses
- The subnet masks
- The range of addresses to be dynamically assigned
Other useful information to have the server dynamically assign includes:
- Default gateway
- DNS server IP addresses
- The Domain Name
- Host name
- Network Broadcast addresses
These are merely a few of the many options that the ISC DHCP server can handle. To get a complete list as well as a description of each option, enter the following command after installing the package:
# man dhcpd.conf
3. Once the administrator has concluded all the necessary information for this server to hand out it is time to configure the DHCP server as well as the necessary pools. Before creating any pools or server configurations though, the DHCP service must be configured to listen on one of the servers interfaces.
On this particular server, a NIC team has been setup and DHCP will listen on the teamed interfaces which were given the name `'bond0'`. Be sure to make the appropriate changes given the server and environment in which everything is being configured. The defaults in this file are okay for this tutorial.
![Configure ISC DHCP Network](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DHCP-Network.jpg)
This line will instruct the DHCP service to listen for DHCP traffic on the specified interface(s). At this point, it is time to modify the main configuration file to enable the DHCP pools on the necessary networks. The main configuration file is located at /etc/dhcp/dhcpd.conf. Open the file with a text editor to begin:
# nano /etc/dhcp/dhcpd.conf
This file is the configuration for the DHCP server specific options as well as all of the pools/hosts one wishes to configure. The top of the file starts of with a ddns-update-style clause and for this tutorial it will remain set to none however in a future article, Dynamic DNS will be covered and ISC-DHCP-Server will be integrated with BIND9 to enable host name to IP address updates.
4. The next section is typically the area where and administrator can configure global network settings such as the DNS domain name, default lease time for IP addresses, subnet-masks, and much more. Again to know more about all the options be sure to read the man page for the dhcpd.conf file.
# man dhcpd.conf
For this server install, there were a couple of global network options that were configured at the top of the configuration file so that they wouldnt have to be implemented in every single pool created.
![Configure ISC DDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DDNS.png)
Lets take a moment to explain some of these options. While they are configured globally in this example, all of them can be configured on a per pool basis as well.
- option domain-name “comptech.local”; All hosts that this DHCP server hosts, will be a member of the DNS domain name “comptech.local”
- option domain-name-servers 172.27.10.6; DHCP will hand out DNS server IP of 172.27.10.6 to all of the hosts on all of the networks it is configured to host.
- option subnet-mask 255.255.255.0; The subnet mask handed out to every network will be a 255.255.255.0 or a /24
- default-lease-time 3600; This is the time in seconds that a lease will automatically be valid. The host can re-request the same lease if time runs out or if the host is done with the lease, they can hand the address back early.
- max-lease-time 86400; This is the maximum amount of time in seconds a lease can be held by a host.
- ping-check true; This is an extra test to ensure that the address the server wants to assign out isnt in use by another host on the network already.
- ping-timeout; This is how long in second the server will wait for a response to a ping before assuming the address isnt in use.
- ignore client-updates; For now this option is irrelevant since DDNS has been disabled earlier in the configuration file but when DDNS is operating, this option will ignore a hosts to request to update its host-name in DNS.
5. The next line in this file is the authoritative DHCP server line. This line means that if this server is to be the server that hands out addresses for the networks configured in this file, then uncomment the authoritative stanza.
This server will be the only authority on all the networks it manages so the global authoritative stanza was un-commented by removing the # in front of the keyword authoritative.
![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png)
Enable ISC Authoritative
By default the server is assumed to NOT be an authority on the network. The rationale behind this is security. If someone unknowingly configures the DHCP server improperly or on a network they shouldnt, it could cause serious connectivity issues. This line can also be used on a per network basis. This means that if the server is not the entire networks DHCP server, the authoritative line can instead be used on a per network basis rather than in the global configuration as seen in the above screen-shot.
6. The next step is to configure all of the DHCP pools/networks that this server will manage. For brevities sake, this guide will only walk through one of the pools configured. The administrator will need to have gathered all of the necessary network information (ie domain name, network addresses, how many addresses can be handed out, etc).
For this pool the following information was obtained from the network administrator: network id of 172.27.60.0, subnet mask of 255.255.255.0 or a /24, the default gateway for the subnet is 172.27.60.1, and a broadcast address of 172.27.60.255.
This information is important to building the appropriate network stanza in the dhcpd.conf file. Without further ado, lets open the configuration file again using a text editor and then add the new network to the server. This must be done with root/sudo!
# nano /etc/dhcp/dhcpd.conf
![Configure DHCP Pools and Networks](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-network.png)
Configure DHCP Pools and Networks
This is the sample created to hand out IP addresses to a network that is used for the creation of VMWare virtual practice servers. The first line indicates the network as well as the subnet mask for that network. Then inside the brackets are all the options that the DHCP server should provide to hosts on this network.
The first stanza, range 172.27.60.50 172.27.60.254;, is the range of dynamically assignable addresses that the DHCP server can hand out to hosts on this network. Notice that the first 49 addresses arent in the pool and can be assigned statically to hosts if needed.
The second stanza, option routers 172.27.60.1; , hands out the default gateway address for all hosts on this network.
The last stanza, option broadcast-address 172.27.60.255;, indicates what the networks broadcast address. This address SHOULD NOT be a part of the range stanza as the broadcast address cant be assigned to a host.
Some pointers, be sure to always end the option lines with a semi-colon (;) and always make sure each network created is enclosed in curly braces { }.
7. If there are more networks to create, continue creating them with their appropriate options and then save the text file. Once all configurations have been completed, the ISC-DHCP-Server process will need to be restarted in order to apply the new changes. This can be accomplished with the following command:
# service isc-dhcp-server restart
This will restart the DHCP service and then the administrator can check to see if the server is ready for DHCP requests several different ways. The easiest is to simply see if the server is listening on port 67 via the [lsof command][1]:
# lsof -i :67
![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png)
Check DHCP Listening Port
This output indicates that the DHCPD (DHCP Server daemon) is running and listening on port 67. Port 67 in this output was actually converted to bootps due to a port number mapping for port 67 in /etc/services file.
This is very common on most systems. At this point, the server should be ready for network connectivity and can be confirmed by connecting a machine to the network and having it request a DHCP address from the server.
### Step 2: Testing Client Connectivity ###
8. Most systems now-a-days are using Network Manager to maintain network connections and as such the device should be pre-configured to pull DHCP when the interface is active.
However on machines that arent using Network Manager, it may be necessary to manually attempt to pull a DHCP address. The next few steps will show how to do this as well as how to see whether the server is handing out addresses.
The [ifconfig][2] utility can be used to check an interfaces configuration. The machine used to test the DHCP server only has one network adapter and it is called eth0.
# ifconfig eth0
![Check Network Interface IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/No-ip.png)
Check Network Interface IP Address
From this output, this machine currently doesnt have an IPv4 address, great! Lets instruct this machine to reach out to the DHCP server and request an address. This machine has the DHCP client utility known as dhclient installed. The DHCP client utility may very from system to system.
# dhclient eth0
![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png)
Request IP Address from DHCP
Now the `'inet addr:'` field shows an IPv4 address that falls within the scope of what was configured for the 172.27.60.0 network. Also notice that the proper broadcast address was handed out as well as subnet mask for this network.
Things are looking promising but lets check the server to see if it was actually the place where this machine received this new IP address. To accomplish this task, the servers system log file will be consulted. While the entire log file may contain hundreds of thousands of entries, only a few are necessary for confirming that the server is working properly. Rather than using a full text editor, this time a utility known as tail will be used to only show the last few lines of the log file.
# tail /var/log/syslog
![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png)
Check DHCP Logs
Voila! The server recorded handing out an address to this host (HRTDEBXENSRV). It is a safe assumption at this point that the server is working as intended and handing out the appropriate addresses for the networks that it is an authority. At this point the DHCP server is up and running. Configure the other networks, troubleshoot, and secure as necessary.
Enjoy the newly functioning ISC-DHCP-Server and tune in later for more Debian tutorials. In the not too distant future there will be an article on Bind9 and DDNS that will tie into this article.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/
作者:[Rob Turner][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/robturner/
[1]:http://www.tecmint.com/10-lsof-command-examples-in-linux/
[2]:http://www.tecmint.com/ifconfig-command-examples/

View File

@ -0,0 +1,89 @@
How to run Ubuntu Snappy Core on Raspberry Pi 2
================================================================================
The Internet of Things (IoT) is upon us. In a couple of years some of us might ask ourselves how we ever survived without it, just like we question our past without cellphones today. Canonical is a contender in this fast growing, but still wide open market. The company wants to claim their stakes in IoT just as they already did for the cloud. At the end of January, the company launched a small operating system that goes by the name of [Ubuntu Snappy Core][1] which is based on Ubuntu Core.
Snappy, the new component in the mix, represents a package format that is derived from DEB, is a frontend to update the system that lends its idea from atomic upgrades used in CoreOS, Red Hat's Atomic and elsewhere. As soon as the Raspberry Pi 2 was marketed, Canonical released Snappy Core for that plattform. The first edition of the Raspberry Pi was not able to run Ubuntu because Ubuntu's ARM images use the ARMv7 architecture, while the first Raspberry Pis were based on ARMv6. That has changed now, and Canonical, by releasing a RPI2-Image of Snappy Core, took the opportunity to make clear that Snappy was meant for the cloud and especially for IoT.
Snappy also runs on other platforms like Amazon EC2, Microsofts Azure, and Google's Compute Engine, and can also be virtualized with KVM, Virtualbox, or Vagrant. Canonical has embraced big players like Microsoft, Google, Docker or OpenStack and, at the same time, also included small projects from the maker scene as partners. Besides startups like Ninja Sphere and Erle Robotics, there are board manufacturers like Odroid, Banana Pro, Udoo, PCDuino and Parallella as well as Allwinner. Snappy Core will also run in routers soon to help with the poor upgrade policy that vendors perform.
In this post, let's see how we can test Ubuntu Snappy Core on Raspberry Pi 2.
The image for Snappy Core for the RPI2 can be downloaded from the [Raspberry Pi website][2]. Unpacked from the archive, the resulting image should be [written to an SD card][3] of at least 8 GB. Even though the OS is small, atomic upgrades and the rollback function eat up quite a bit of space. After booting up your Raspberry Pi 2 with Snappy Core, you can log into the system with the default username and password being 'ubuntu'.
![](https://farm8.staticflickr.com/7639/16428527263_f7bdd56a0d_c.jpg)
sudo is already configured and ready for use. For security reasons you should change the username with:
$ sudo usermod -l <new name> <old name>
Alternatively, you can add a new user with the command `adduser`.
Due to the lack of a hardware clock on the RPI, that the Snappy Core image does not take account of, the image has a small bug that will throw a lot of errors when processing commands. It is easy to fix.
To find out if the bug affects you, use the command:
$ date
If the output is "Thu Jan 1 01:56:44 UTC 1970", you can fix it with:
$ sudo date --set="Sun Apr 04 17:43:26 UTC 2015"
adapted to your actual time.
![](https://farm9.staticflickr.com/8735/16426231744_c54d9b8877_b.jpg)
Now you might want to check if there are any updates available. Note that the usual commands:
$ sudo apt-get update && sudo apt-get distupgrade
will not get you very far though, as Snappy uses its own simplified package management system which is based on dpkg. This makes sense, as Snappy will run on a lot of embedded appliances, and you want things to be as simple as possible.
Let's dive into the engine room for a minute to understand how things work with Snappy. The SD card you run Snappy on has three partitions besides the boot partition. Two of those house a duplicated file system. Both of those parallel file systems are permanently mounted as "read only", and only one is active at any given time. The third partition holds a partial writable file system and the users persistent data. With a fresh system, the partition labeled 'system-a' holds one complete file system, called a core, leaving the parallel partition still empty.
![](https://farm9.staticflickr.com/8758/16841251947_21f42609ce_b.jpg)
If we run the following command now:
$ sudo snappy update
the system will install the update as a complete core, similar to an image, on 'system-b'. You will be asked to reboot your device afterwards to activate the new core.
After the reboot, run the following command to check if your system is up to date and which core is active.
$ sudo snappy versions -a
After rolling out the update and rebooting, you should see that the core that is now active has changed.
As we have not installed any apps yet, the following command:
$ sudo snappy update ubuntu-core
would have been sufficient, and is the way if you want to upgrade just the underlying OS. Should something go wrong, you can rollback by:
$ sudo snappy rollback ubuntu-core
which will take you back to the system's state before the update.
![](https://farm8.staticflickr.com/7666/17022676786_5fe6804ed8_c.jpg)
Speaking of apps, they are what makes Snappy useful. There are not that many at this point, but the IRC channel #snappy on Freenode is humming along nicely and with a lot of people involved, the Snappy App Store gets new apps added on a regular basis. You can visit the shop by pointing your browser to http://<ip-address>:4200, and you can install apps right from the shop and then launch them with http://webdm.local in your browser. Building apps yourself for Snappy is not all that hard, and [well documented][4]. You can also port DEB packages into the snappy format quite easily.
![](https://farm8.staticflickr.com/7656/17022676836_968a2a7254_c.jpg)
Ubuntu Snappy Core, due to the limited number of available apps, is not overly useful in a productive way at this point in time, although it invites us to dive into the new Snappy package format and play with atomic upgrades the Canonical way. Since it is easy to set up, this seems like a good opportunity to learn something new.
--------------------------------------------------------------------------------
via: http://xmodulo.com/ubuntu-snappy-core-raspberry-pi-2.html
作者:[Ferdinand Thommes][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/ferdinand
[1]:http://www.ubuntu.com/things
[2]:http://www.raspberrypi.org/downloads/
[3]:http://xmodulo.com/write-raspberry-pi-image-sd-card.html
[4]:https://developer.ubuntu.com/en/snappy/

View File

@ -0,0 +1,105 @@
A Walk Through Some Important Docker Commands
================================================================================
Hi everyone today we'll learn some important Docker Commands that you'll need to learn before you go with Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider.
Docker commands are easy to learn and easy to implement or take into practice. Here are some easy Docker commands you'll need to know to run Docker and fully utilize it.
### 1. Pulling a Docker Image ###
First of all, we'll need to pull a docker image to get started cause containers are built using Docker Images. We can get the required docker image from the Docker Registry Hub. Before we pull any image using pull command, we'll need to protect our system as there is identified a malicious issue with pull command. To protect our system from this issue, we'll need to add **127.0.0.1 index.docker.io** into /etc/hosts entry. We can do using our favorite text editor.
# nano /etc/hosts
Now, add the following lines into it and then save and exit.
127.0.0.1 index.docker.io
![Docker Hosts](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-hosts.png)
To pull a docker image, we'll need to run the following command.
# docker pull registry.hub.docker.com/busybox
![Docker pull command](http://blog.linoxide.com/wp-content/uploads/2015/04/pulling-image.png)
We can check whether any Docker image is available in our local host for the use or not.
# docker images
![Docker Images](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-images.png)
### 2. Running a Docker Container ###
Now, after we have successfully pulled a required or desired Docker image. We'll surely want to run that Docker image. We can run a docker container out of the image using docker run command. We have several options and flags to run a docker container on the top of the Docker image. To run a docker image and to get into the container we'll use -t and -i flag as shown below.
# docker run -it busybox
![Docker Run Shell Command](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-run-shell.png)
From the above command, we'll get entered into the container and can access its content via the interactive shell. We can press **Ctrl-D** in order to exit from the shell access.
Now, to run the container in background, we'll detach the shell using -d flag as shown below.
# docker run -itd busybox
![Run Container Background](http://blog.linoxide.com/wp-content/uploads/2015/04/run-container-background.png)
If we want to attach into a running container, we can use attach command with the container id. The container id can be fetched using the command **docker ps** .
# docker attach <container id>
![Docker Attach](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-attach.png)
### 3. Checking Containers ###
It is very easy to check the log whether the container is running or not. We can use the following command to check whether there is any docker container running in the real time or not using the following command.
# docker ps
Now, to check logs about the running or past running containers we'll need to run the following command.
# docker ps -a
![View Docker Containers](http://blog.linoxide.com/wp-content/uploads/2015/04/view-docker-containers1.png)
### 4. Inspecting a Docker Container ###
We can check every information about a Docker Container using the inspect command.
# docker inspect <container id>
![Docker Inspect](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-inspect.png)
### 5. Killing and Deleting Command ###
We can kill or stop process or docker containers using its docker id as shown below.
# docker stop <container id>
To stop every containers running, we'll need to run the following command.
# docker kill $(docker ps -q)
Now, if we wanna remove a docker image, run the below command.
# docker rm <container id>
If we wanna remove all the docker images at once, we can run the below.
# docker rm $(docker ps -aq)
### Conclusion ###
These docker commands are highly essential to learn to fully utilize and use Docker. Docker gets too simple with these commands providing end users an easy platform for computing. It is extremely easy for anyone to learn about Docker commands with this above tutorial. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve and update our contents. Thank you ! Enjoy :-)
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-how-to/important-docker-commands/
作者:[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/

View File

@ -0,0 +1,144 @@
Elementary OS 0.3 Freya Screenshots - Download and Install Guide
================================================================================
Elementary OS is a light weight Ubuntu based operating system which is getting wide spread popularity. It has three versions released to date whereas fourth version is decided to be developed based on upcoming Ubuntu 16.04.
- **Jupiter (0.1)**: It was the first stable version of Elementary OS based on Ubuntu 10.10 and released on March 2011.
- **Luna (0.2)**: Second stable version of Elementary OS based on Ubuntu 12.04 and released on November 2012.
- **Freya (0.3)**: Third stable version of Elementary OS based on Ubuntu 14.04 and released on 8th February 2015.
- **Loki (0.4)**: Fourth upcoming version of Elementary OS is planned to be based on Ubuntu 16.04 it will get updates till 2021.
Freya is the latest version (0.3) of Elementary OS available now, initially it was given the name ISIS but it was later changed to avoid any sort of association with a terrorist group named alike. Freya has some very nice preloaded applications.
### Salient Features ###
Here are some but not all of the features of Elementary OS 0.3.
- Better interactive notifications along with notification setting pane including a system-wide “Do Not Disturb” mode
- Latest version of Elementary OS provides a better emoji support & drop-in replacements for Microsoft Core fonts for the web applications
- Privacy Mode is a new firewall tool which is easy to use and helps protect the computer from harmful scripts and applications
- Unified login and lock screens
- Applications menu with and improved look and functionality including quicklist actions, drag-and-drop from search, and support for quick math calculations
- Multitasking view is redesigned to provide more app-focused utility
- Updated software stack (Linux 3.16, Gtk 3.14, and Vala 0.26) for better support and enhanced functionality of latest developed applications
- Unified extensible firmware interface (UEFI) support
- WiFi connectivity made easier through new captive portal assistant
### Download 64 bit & 32 bit Version ###
- [Elementary OS Freya 64 bit][1]
- [Elementary OS Freya 32 bit][2]
### Installing Elementary OS 0.3 (Freya) ###
Download the ISO file of Elementary OS 0.3 and flash it on a bootable USB drive or to a DVD/CD. Source is available for both 32-bit and 64-bit architectures. Once the computer is booted with the Elementary OS ISO file, there are two options available, either to try without installing or install Elementary OS on the computer, choose the second option. Elementary OS can also be installed along with an already installed operating system, turning it into a dual boot machine.
![Install Freya](http://blog.linoxide.com/wp-content/uploads/2015/04/Install-Freya.png)
System requirements and available resources are checked before proceeding further. Click continue if your system has enough resources.
![Installation Requirements](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Requirements.png)
Installation wizard then provides various installation types. Opt for the option best suits you, normally, first option is chosen by most i.e. “Erase disk and install Elementary”. With this option make sure that your data is backed up properly because the disk (partition) will be erased and all data will be lost.
![Installation Types](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Types.png)
A dialog box shows the list of disk partitions being formatted and used by the Elementary OS, after ensuring data integrity click continue.
![Format Warning](http://blog.linoxide.com/wp-content/uploads/2015/04/Format-Warning.png)
Choose your location for time zone selection and click continue.
![Location](http://blog.linoxide.com/wp-content/uploads/2015/04/Location.png)
Choose your language and click continue.
![Language](http://blog.linoxide.com/wp-content/uploads/2015/04/Language.png)
Fill in your information and choose a strong root/administrator password and click continue.
![whoareyou](http://blog.linoxide.com/wp-content/uploads/2015/04/whoareyou.png)
Core installation process starts once the personal information is provided, details of components being installed will be flashing on a little dialogue box along with the progress bar.
![Installation progress](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-progress.png)
Congratulation! Installation is complete for your latest Elementary OS 0.3 (Freya). A restart is required to update and finalize registries and configurations.
![Installation Complet](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Complet.png)
At start up the Elementary OS logo shows its elegance and then password protected administrator login and guest session options will appear. Guest section has pretty limited features and has no installation privileges.
![Login](http://blog.linoxide.com/wp-content/uploads/2015/04/Login.png)
Here is the first look of the newly installed Elementary OS 0.3.
![first look](http://blog.linoxide.com/wp-content/uploads/2015/04/first-look.png)
### Customizing Desktop ###
While Elementary OS 0.3 is best known for their light weight and better looks, everybody has a unique esthetic sense and computer usage habits. Desktop reflects a personalized view of any computer user. Like other operating systems Elementary OS 0.3 also provides various options to customize our desktop through wallpapers, font sizes, themes etc.
For basic customization, click on Applications > System Settings > Desktop
We can change wallpapers, dock and make use of hot corners of the desktop.
Very few wallpapers are provided by default, more can be downloaded from the internet or transferred to your own camera.
![Desktop Wallpaper](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Wallpaper4.png)
The real beauty of Elementary OS lies in its elegant Dock panel. With no icons allowed at desktop, a set of application icons at the dock panel enhance the look and provide a quick way to lunch frequently used applications.
![Desktop Dock](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Dock1.png)
Users can use the corners of the desktop for customary purposes.
![Hot Corners](http://blog.linoxide.com/wp-content/uploads/2015/04/Hot-Corners.png)
Advanced customization can be achieved through the installation of elementary tweaks.
Add stable Personal Package Archive (PPA) to Advanced Package Tool (APT) repository using the following command.
sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily
![ppa](http://blog.linoxide.com/wp-content/uploads/2015/04/elementary-tweaks-ppa.png)
Once the package has been added to the repository we need to update the repository using following command
sudo apt-get update
![update repository](http://blog.linoxide.com/wp-content/uploads/2015/04/update-repository.png)
After updating the repository we are ready to install inkscape which is accomplished using the following command
sudo apt-get install elementary-tweaks
![install elementary tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/install-elementary-tweaks.png)
We can see an addition of Tweaks option under Applications > System Settings under the Personal section. It now provides us more options to customize our desktop view.
![tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/tweaks.png)
For further customizations we also install gnome tweak tool for example unlocking the desktop.
sudo apt-get install gnome-tweak-tool
![gnome](http://blog.linoxide.com/wp-content/uploads/2015/04/gnome.png)
### Summary ###
Elementary OS is closely related to Ubuntu distro of Linux and its pros and cons are pretty much similar too. Elementary OS is lightweight, elegant in look and feel, rapidly maturing. It is potentially an alternative for both Windows and OS X operating systems. The latest available Elementary OS 0.3 (Freya) is getting very popular with a better feature base. For further reading, latest updates and downloads please visit the official [website][1].
--------------------------------------------------------------------------------
via: http://linoxide.com/ubuntu-how-to/elementary-os-0-3-freya-install-guide/
作者:[Aun Raza][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/arunrz/
[1]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-amd64.20150411.iso/download
[2]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-i386.20150411.iso/download
[3]:http://elementary.io/

View File

@ -0,0 +1,174 @@
How to Show Dialog Box from Bash Shell Script with Examples
================================================================================
This tutorial will give couple of examples on how to use utilities like zenity and whiptail in your Bash shell script to provide message / dialog box . With these utilities your script will be able to inform user about the current state of execution, or give an ability to interact. Difference between these two utilities is the way they are displaying message box or dialog. Zenity uses GTK toolkit for creating graphical user interfaces, while whiptail creates message boxes inside terminal window.
### Zenity Tool ###
To install zenity on Ubuntu run:
sudo apt-get install zenity
Since commands for creating message boxes or dialogs with zenity are pretty self explanatory, we will provide you with couple of examples.
### Creating information box ###
zenity --info --title "Information Box" --text "This should be information" --width=300 --height=200
![Screenshot-Information Box](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Information-Box.png)
Creating Yes/No dialog
zenity --question --text "Do you want this?" --ok-label "Yeah" --cancel-label="Nope"
![Screenshot-Question](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Question.png)
Creating entry box and storing value in variable
a=$(zenity --entry --title "Entry box" --text "Please enter the value" --width=300 --height=200)
echo $a
![Screenshot-Entry box](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Entry-box.png)
After entering it, value will be stored in $a variable.
Here is the working example which takes user's first name, last name and age and displays it.
#!/bin/bash
#
# This script will ask for couple of parameters
# and then continue to work depending on entered values
#
# Giving the option to user
zenity --question --text "Do you want to continue?"
# Checking if user wants to proceed
[ $? -eq 0 ] || exit 1
# Letting user input some values
FIRSTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your first name." --width=300 --height=150)
LASTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your last name." --width=300 --height=150)
AGE=$(zenity --entry --title "Entry box" --text "Please, enter your age." --width=300 --height=150)
# Displaying entered values in information box
zenity --info --title "Information" --text "You are ${FIRSTNAME} ${LASTNAME} and you are ${AGE}(s) old." --width=300 --height=100
Here are the screenshots of previous script.
![Example1-Question-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Question-1.png)
First box
![Example1-Entry box-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-1.png)
Entry box
![Example1-Entry box-2](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-2.png)
Entry box
![Example1-Entry box-3](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-3.png)
Entry box
![Example1-Information](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Information.png)
Information box
Don't forget refer some of the useful [zenity options][1] that might help you.
### Whiptail Tool ###
To install whiptail on Ubuntu run
sudo apt-get install whiptail
Commands for creating message box/dialog with whiptail are also self explanatory, so we will provide you with just couple of basic examples.
### Creating message box ###
whiptail --msgbox "This is a message" 10 40
![Screenshot-whiptail-msgbox](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-msgbox.png)
### Creating Yes/No dialog ###
whiptail --yes-button "Yeah" --no-button "Nope" --title "Choose the answer" --yesno "Will you choose yes?" 10 30
![Screenshot-whiptail-yesno](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-yesno.png)
### Creating entry box with default value ###
whiptail --inputbox "Enter your number please." 10 30 "10"
![Screenshot-whiptail-entry](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-entry.png)
One thing to be aware of when trying to use entered value is that whiptail uses stdout for displaying dialog, and stderr for value output. That way, if you use var=$(...) you wont see dialog box at all, and wont get the entered value. Solution is to switch stdout and stderr. To do that just add **3>&1 1>&2 2>&3** at the end of the whiptail command. Same would be with any whiptail command which you want to use to get some entered value.
### Creating menu dialog ###
whiptail --menu "This is a menu. Choose an option:" 20 50 10 1 "first" 2 "second" 3 "third"
![Screenshot-whiptail-menu](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-menu.png)
Here is a **shell script** that asks user to enter a path to a folder and then outputs it's size.
#!/bin/bash
#
#
# Since whiptail has to use stdout to display dialog, entered value will
# be stored in stderr. To switch them and get the value to stdout you must
# use 3>&1 1>&2 2>&3
FOLDER_PATH=$(whiptail --title "Get the size of folder" \
--inputbox "Enter folder path:" \
10 30 \
"/home" \
3>&1 1>&2 2>&3)
if [ -d $FOLDER_PATH ]
then
size=$(du -hs "$FOLDER_PATH" | awk '{print $1}')
whiptail --title "Information" \
--msgbox "Size of ${FOLDER_PATH} is ${size}" \
10 40
elif [ -f $FOLDER_PATH ]
then
whiptail --title "Warning!!!" \
--msgbox "The path you entered is a path to a file not a folder!" \
10 40
else
whiptail --title "Error!!!"
--msgbox "Path you entered is not recognized. Please try again" \
10 40
fi
Here are the screenshots from previous example:
![Example2-Entry-box](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Entry-box.png)
Entry box
![Example2-Information](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png\)
Information box
If you are working in terminal , [manual pages][2] are always available.
### Conclusion ###
Choosing the right tool for displaying dialogs will depend on whether you expect your script to be run on desktop machine or server machine. Desktop machine users mostly use window environment and will possibly be able to run the script and interact with appearing windows. However, if you are expecting that the user is someone on server machine, you might want to play it safe and use whiptail or any other utility that will display dialogs in plain terminal window.
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-shell-script/bash-shell-script-show-dialog-box/
作者:[Ilija Lazarevic][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/ilijala/
[1]:https://help.gnome.org/users/zenity/stable/
[2]:http://linux.die.net/man/1/whiptail

View File

@ -0,0 +1,178 @@
How to manage remote MySQL databases on Linux VPS using a GUI tool
================================================================================
If you need to run a MySQL server on a remote [VPS instance][1], how will you manage databases hosted by the server remotely? Perhaps web-based database administration tools such as [phpMyAdmin][2] or [Adminer][3] will first come to mind. These web-based management tools require a backend web server and PHP engine up and running. However, if your VPS instance is used as a standalone database server (e.g., for a multi-tier app), provisioning a whole LAMP stack for occasional database management is a waste of VPS resource. Worse, the LAMP stack with an additional HTTP port can be a source of security vulnerabilities of your VPS.
Alternatively, you can turn to a native MySQL client running on a client host. Of course a pure command-line MySQL client (mysql-client) can be your default choice if nothing else. But the capabilities of the command-line client are limited, so it is not suitable for production-level database administration such as visual SQL development, performance tuning, schema validation, etc. If you are looking for full-blown MySQL administration features, a MySQL GUI tool will meet your requirements better.
### What is MySQL Workbench? ###
Developed as an integrated database tool environment by Oracle, [MySQL Workbench][4] is more than a simple MySQL client. In a nutshell, Workbench is a cross-platform (e.g., Linux, MacOS X, Windows) GUI tool for database design, development and administration. The Community Edition of MySQL Workbench is available for free under the GPL. As a database administrator, you can use Workbench to configure MySQL server, manage MySQL users, perform database backup and recovery, and monitor database health, all in GUI-based user-frienly environment.
In this tutorial, let's review how to install and use MySQL Workbench on Linux.
### Install MySQL Workbench on Linux ###
To set up remote database administration environment, grab any desktop Linux machine where you will be running MySQL Workbench. While some Linux distributions (e.g., Debian/Ubuntu) carry MySQL Workbench in their repositories, it is a good idea to install it from the official repositories, as they offer the latest version. Here is how to set up the official Workbench repository and install Workbench from it.
#### Debian-based Desktop (Debia, Ubuntu, Mint): ####
Go to the [official website][5]. Download and install the DEB file for the repository. Choose one that matches with your environment.
For example, on Ubuntu 14.10:
$ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb
$ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb
on Debian 7:
$ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb
$ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb
When installing the DEB file, you will see the following package configuration menu, and be asked to choose MySQL product to configure.
![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg)
Choose "Utilities". Once you are done with configuration, choose "Apply" to save it.
Finally, update package index, and install Workbench.
$ sudo apt-get update
$ sudo apt-get install mysql-workbench
#### Red Hat-based Desktop (CentOS, Fedora, RHEL): ####
Go to the [official website][6]. Download and install the RPM repository package for your Linux evironment.
For example, on CentOS 7:
$ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
$ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm
on Fedora 21:
$ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm
$ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm
Verify that "MySQL Tools Community" repository has been set up.
$ yum repolis enabled
![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg)
Go ahead and install Workbench.
$ sudo yum install mysql-workbench-community
### Set up a Secure Remote Database Connection ###
The next step is to set up a remote connection to your MySQL server running on a VPS. Of course you can connect directly to the remote MySQL server from Workbench GUI (after [enabling remote access][7] in the database server). However, it is a huge security risk to do so, as someone can easily eavesdrop on database access traffic, and a publicly-open MySQL port can be another attack vector.
A better approach is to disable remote access of MySQL server (i.e., only allow access from 127.0.0.1 of a VPS). Then set up an SSH tunnel between a local client machine and a remote VPS, so that MySQL traffic can be securely relayed via their loopback interfaces. Compared to setting up SSL-based encrypted connections, configuring SSH tunneling requires little effort as it only requires SSH server, which is already deployed on most VPS instances.
Let's see how we can set up an SSH tunnel for MySQL Workbench.
In this setup, you don't need to enable remote access of a MySQL server.
On a local client host where MySQL Workbench will be running, type the following command. Replace 'user' and 'remote_vps' with your own info.
$ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N
You will be asked to type an SSH password for your VPS. Once you successfully log in to the VPS, an SSH tunnel will be established between port 3306 of local host and port 3306 of a remote VPS. Note that you won't see any message in the foreground.
Optionally, you can set the SSH tunnel running in the background. For that, press Ctrl+Z to stop the command, type bg and press ENTER.
![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg)
The SSH tunnel will now be running in the background.
### Manage a Remote MySQL Server with MySQL Workbench ###
With an SSH tunnel established, you are ready to connect to a remote MySQL server from MySQL Workbench.
Launch Workbench by typing:
$ mysql-workbench
![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg)
Click on the plus icon at the top of the Workbench screen to create a new database connection. Fill in connection information as follows.
- **Connection Name**: any description (e.g., My remote VPS database)
- **Hostname**: 127.0.0.1
- **Port**: 3306
- **Username**: MySQL username (e.g., root)
![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg)
Note that since the tunnel's local endpoint is 127.0.0.1:3306, the hostname field must be 127.0.0.1, not the IP address/hostname of a remote VPS.
Once you set up a new database connection, you will see a new box for the connection appear on Workbench window. Click on the box to actually establish a connection to a remote MySQL server.
![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg)
Once you are logged in to the MySQL server, you will see various administrative tasks in the left-side panel. Let's review some of common administrative tasks.
#### MySQL Server Status ####
This menus shows real-time dashboard of database server resource usage (e.g., traffic, connections, read/write).
![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg)
#### Client Connections ####
The total number of client connections is a critical resource to monitor. This menu shows detailed information of individual client connections.
![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg)
#### Users and Privileges ####
This menu allows you to manage MySQL users, including their resource limits and privileges.
![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg)
#### MySQL Server Administration ####
You can start or stop a MySQL server, and examine its server logs.
![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg)
#### Database Schema Management ####
You can view, change or inspect database schema visually. For that, choose and right-click on any database or table under "Schemas" heading.
![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg)
![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg)
#### Database Query ####
You can execute any arbitrary query (as long as your login privilege allows), and inspect its result.
![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg)
Note that performance statistics and reports are available for MySQL server 5.6 and higher. For 5.5 and lower, the performance section will be grayed out.
### Conclusion ###
The clean and intuitive tabbed interface, comprehensive feature sets, and open-source licensing make MySQL Workbench one of the best visual database design and administration tools out there. One known downside of Workbench is its performance. I notice that Workbench sometimes gets sluggish while running queries on a busy server. Despite its less than stellar performance, I still consider MySQL Workbench an essential tool for any professional MySQL database administrator and designer.
Have you ever used Workbench in your work environment? Or do you recommend any other GUI tool? Feel free to share your experience.
--------------------------------------------------------------------------------
via: http://xmodulo.com/remote-mysql-databases-gui-tool.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
[1]:http://xmodulo.com/go/digitalocean
[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html
[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html
[4]:http://mysqlworkbench.org/
[5]:http://dev.mysql.com/downloads/repo/apt/
[6]:http://dev.mysql.com/downloads/repo/yum/
[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html

View File

@ -0,0 +1,196 @@
Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora
================================================================================
> **Question**: I want to build and install the latest ixgbe 10G NIC driver. How can I compile ixgbe driver on CentOS, Fedora or RHEL?
To use Intel's PCI Express 10G NICs (e.g., 82598, 82599, x540) on your Linux system, you need to install ixgbe driver. While modern Linux distributions come with ixgbe driver pre-installed as a loadable module, the pre-built ixgbe driver is not fully customizable with limited parameters. If you want to enable and customize all available features of the 10G NICs (e.g., RSS, multi-queue, virtual functions, hardware offload), you will need to build the driver from the source.
Here is how to compile ixgbe driver from the source on Red Hat based platforms (e.g., CentOS, RHEL or Fedora). For Debian based systems, refer to [this guideline][1] instead.
### Step One: Install Prerequisites ###
First, set up necessary developmen environment and install matching kernel headers.
$ sudo yum install gcc make
$ sudo yum install kernel-devel
### Step Two: Compile Ixgbe Driver ###
Download the latest ixgbe source code from the [official site][2].
$ wget http://downloads.sourceforge.net/project/e1000/ixgbe%20stable/3.23.2/ixgbe-3.23.2.tar.gz
Be sure to check supported kernel versions. For example, the ixgbe driver 3.23.2 supports Linux kernel versions 2.6.18 up to 3.18.1.
Extract the tarball and compile it.
$ tar -xvf ixgbe-3.23.2.tar.gz
$ cd ixgbe-3.23.2/src
$ make
If successful, the compiled driver (ixgbe.ko) will be found in the current directory.
You can check the information of the compiled driver by running:
$ modinfo ./ixgbe.ko
The output will show a list of available parameters of the ixgbe driver.
![](https://farm9.staticflickr.com/8789/16429483653_b9b6e6cd7f_c.jpg)
### Step Three: Load Ixgbe Driver ###
Now you are ready to load the compiled ixgbe driver.
If the stock ixgbe driver is already loaded on your system, you need to unload it first. Otherwise, you won't be able to load the new ixgbe driver.
$ sudo rmmod ixgbe.ko
Then insert the compiled driver in the kernel by running:
$ sudo insmod ./ixgbe.ko
Optionally, you can supply any parameters while loading the driver.
$ sudo insmod ./ixgbe.ko FdirPballoc=3 RSS=16
To verify that the driver is loaded successfully, check the output of dmesg command.
$ dmesg
----------
Intel(R) 10 Gigabit PCI Express Network Driver - version 3.23.2
Copyright (c) 1999-2014 Intel Corporation.
ixgbe 0000:21:00.0: PCI INT A -> GSI 64 (level, low) -> IRQ 64
ixgbe 0000:21:00.0: setting latency timer to 64
ixgbe: Receive-Side Scaling (RSS) set to 16
ixgbe: Flow Director packet buffer allocation set to 3
ixgbe: 0000:21:00.0: ixgbe_check_options: Flow Director will be allocated 256kB of packet buffer
ixgbe: 0000:21:00.0: ixgbe_check_options: FCoE Offload feature enabled
ixgbe 0000:21:00.0: irq 87 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 88 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 89 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 90 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 91 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 92 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 93 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 94 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 95 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 96 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 97 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 98 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 99 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 100 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 101 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 102 for MSI/MSI-X
ixgbe 0000:21:00.0: irq 103 for MSI/MSI-X
ixgbe 0000:21:00.0: eth3: DCA registration failed: -1
ixgbe 0000:21:00.0: PCI Express bandwidth of 32GT/s available
ixgbe 0000:21:00.0: (Speed:5.0GT/s, Width: x8, Encoding Loss:20%)
ixgbe 0000:21:00.0: eth3: MAC: 2, PHY: 9, SFP+: 3, PBA No: E68793-006
ixgbe 0000:21:00.0: 90:e2:ba:5b:e9:1c
ixgbe 0000:21:00.0: eth3: Enabled Features: RxQ: 16 TxQ: 16 FdirHash RSC
ixgbe 0000:21:00.0: eth3: Intel(R) 10 Gigabit Network Connection
ixgbe 0000:21:00.1: PCI INT B -> GSI 68 (level, low) -> IRQ 68
ixgbe 0000:21:00.1: setting latency timer to 64
ixgbe: 0000:21:00.1: ixgbe_check_options: FCoE Offload feature enabled
ixgbe 0000:21:00.0: registered PHC device on eth3
ixgbe 0000:21:00.1: irq 104 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 105 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 106 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 107 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 108 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 109 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 110 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 111 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 112 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 113 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 114 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 115 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 116 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 117 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 118 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 119 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 120 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 121 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 122 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 123 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 124 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 125 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 126 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 127 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 128 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 129 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 130 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 131 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 132 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 133 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 134 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 135 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 136 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 137 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 138 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 139 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 140 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 141 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 142 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 143 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 144 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 145 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 146 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 147 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 148 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 149 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 150 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 151 for MSI/MSI-X
ixgbe 0000:21:00.1: irq 152 for MSI/MSI-X
ADDRCONF(NETDEV_UP): eth3: link is not ready
8021q: adding VLAN 0 to HW filter on device eth3
ixgbe 0000:21:00.1: eth4: DCA registration failed: -1
ixgbe 0000:21:00.1: PCI Express bandwidth of 32GT/s available
ixgbe 0000:21:00.1: (Speed:5.0GT/s, Width: x8, Encoding Loss:20%)
ixgbe 0000:21:00.1: eth4: MAC: 2, PHY: 9, SFP+: 4, PBA No: E68793-006
ixgbe 0000:21:00.1: 90:e2:ba:5b:e9:1e
ixgbe 0000:21:00.1: eth4: Enabled Features: RxQ: 48 TxQ: 48 FdirHash RSC
ixgbe 0000:21:00.1: eth4: Intel(R) 10 Gigabit Network Connection
ixgbe 0000:21:00.0: eth3: detected SFP+: 3
ixgbe 0000:21:00.1: registered PHC device on eth4
ADDRCONF(NETDEV_UP): eth4: link is not ready
8021q: adding VLAN 0 to HW filter on device eth4
ixgbe 0000:21:00.1: eth4: detected SFP+: 4
ixgbe 0000:21:00.0: eth3: NIC Link is Up 10 Gbps, Flow Control: RX/TX
ADDRCONF(NETDEV_CHANGE): eth3: link becomes ready
ixgbe 0000:21:00.1: eth4: NIC Link is Up 10 Gbps, Flow Control: RX/TX
ADDRCONF(NETDEV_CHANGE): eth4: link becomes ready
eth3: no IPv6 routers present
eth4: no IPv6 routers present
### Step Four: Install Ixgbe Driver ###
Once you have checked that the driver is loaded successfully, go ahead and install the driver on your system.
$ sudo make install
ixgbe.ko will be installed in the following location.
/lib/modules/<kernel-version>/kernel/drivers/net/ixgbe
At this point, the compiled driver will be loaded automatically upon boot, or you can load it by running:
$ sudo modprobe ixgbe
![](https://farm9.staticflickr.com/8760/16863416809_804dea1491_c.jpg)
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/compile-ixgbe-driver-centos-rhel-fedora.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://ask.xmodulo.com/author/nanni
[1]:http://ask.xmodulo.com/download-install-ixgbe-driver-ubuntu-debian.html
[2]:http://sourceforge.net/projects/e1000/files/ixgbe%20stable/

View File

@ -0,0 +1,55 @@
Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager
================================================================================
> **Question**: I would like to dedicate a physical network interface card to one of my guest VMs created by KVM. For that, I am trying to enable PCI passthrough of the NIC for the VM. How can I add a PCI device to a guest VM with PCI passthrough on virt-manager?
Modern hypervisors enable efficient resource sharing among multiple guest operating systems by virtualizing and emulating hardware resources. However, such virtualized resource sharing may not always be desirable, or even should be avoided when VM performance is a great concern, or when a VM requires full DMA control of a hardware device. One technique used in this case is so-called "PCI passthrough," where a guest VM is granted an exclusive access to a PCI device (e.g., network/sound/video card). Essentially, PCI passthrough bypasses the virtualization layer, and directly exposes a PCI device to a VM. No other VM can access the PCI device.
### Requirement for Enabling PCI Passthrough ###
If you want to enable PCI passthrough for an HVM guest (e.g., a fully-virtualized VM created by KVM), your system (both CPU and motherboard) must meet the following requirement. If your VM is paravirtualized (created by Xen), you can skip this step.
In order to enable PCI passthrough for an HVM guest VM, your system must support **VT-d** (for Intel processors) or **AMD-Vi** (for AMD processors). Intel's VT-d ("Intel Virtualization Technology for Directed I/O") is available on most high-end Nehalem processors and its successors (e.g., Westmere, Sandy Bridge, Ivy Bridge). Note that VT-d and VT-x are two independent features. A list of Intel/AMD processors with VT-d/AMD-Vi capability can be found [here][1].
After you verify that your host hardware supports VT-d/AMD-Vi, you then need to do two things on your system. First, make sure that VT-d/AMD-Vi is enabled in system BIOS. Second, enable IOMMU on your kernel during booting. The IOMMU service, which is provided by VT-d,/AMD-Vi, protects host memory access by a guest VM, and is a requirement for PCI passthrough for fully-virtualized guest VMs.
To enable IOMMU on the kernel for Intel processors, pass "**intel_iommu=on**" boot parameter on your Linux. Follow [this tutorial][2] to find out how to add a kernel boot parameter via GRUB.
After configuring the boot parameter, reboot your host.
### Add a PCI Device to a VM on Virt-Manager ###
Now we are ready to enable PCI passthrough. In fact, assigning a PCI device to a guest VM is straightforward on virt-manager.
Open the VM's settings on virt-manager, and click on "Add Hardware" button on the left sidebar.
Choose a PCI device to assign from a PCI device list, and click on "Finish" button.
![](https://farm8.staticflickr.com/7587/17015584385_db49e96372_c.jpg)
Finally, power on the guest. At this point, the host PCI device should be directly visible inside the guest VM.
### Troubleshooting ###
If you see either of the following errors while powering on a guest VM, the error may be because VT-d (or IOMMU) is not enabled on your host.
Error starting domain: unsupported configuration: host doesn't support passthrough of host PCI devices
----------
Error starting domain: Unable to read from monitor: Connection reset by peer
Make sure that "**intel_iommu=on**" boot parameter is passed to the kernel during boot as described above.
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/pci-passthrough-virt-manager.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://ask.xmodulo.com/author/nanni
[1]:http://wiki.xenproject.org/wiki/VTdHowTo
[2]:http://xmodulo.com/add-kernel-boot-parameters-via-grub-linux.html

View File

@ -0,0 +1,32 @@
[Solved] Ubuntu Does Not Remember Brightness Settings
================================================================================
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Fix_Ubuntu_Brightness_Issue.jpg)
In the tutorial to [fix brightness control not working for Ubuntu and Linux Mint][1], some users mentioned that though the fix worked for them, **Ubuntu doesnt remember the brightness settings** and same was the case with Linux Mint. At each boot or when the system wakes up from sleep, the brightness is restored to either maximum or minimum level. Quite an annoyance, I know. But thankfully we have an easy solution for this **brightness issue in Ubuntu and Linux Mint**.
### Fix Ubuntu and Linux Mint doesnt remember brightness settings ###
[Norbert][2] wrote a script to make Ubuntu and Linux Mint remember the brightness settings at each boot or wake up from sleep. To help you easily use the script, he put up this PPA which is available for Ubuntu 12.04, 14.04 and 14.10. All you need to do is to use the following commands:
sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight
sudo apt-get update
sudo apt-get install sysvinit-backlight
Once installed, restart your system. Now check if the brightness settings are saved or not.
I hope this quick tip helped you. If you find any issues, please take your time to [report a bug][3].
--------------------------------------------------------------------------------
via: http://itsfoss.com/ubuntu-mint-brightness-settings/
作者:[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/fix-brightness-ubuntu-1310/
[2]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages
[3]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages

View File

@ -0,0 +1,75 @@
Exaile 3.4.1 概述 — 一个全功能的GNOME音乐播放器
================================================================================
**Exaile** 在过去两年显得有些平静,也许只有一个或者两个稳定版发布,但尽管如此,在功能方面,它是一个和[Rhythmbox][1]或者[Banshee][2]相匹敌的全功能GNOME音乐播放器。然而在过去的两个月在"Were not dead yet"的口号下推出了一个新的稳定版3.4同时在11月1日还推出了3.4.1增量版本。事实上Exaile有很多的功能我可以继续写很多的文章而不是在一篇文章里全部介绍到就让我们来看一下一些最显著的特点吧。
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile02.jpg)
[Exaile][3]是基于GTK-2用Python写的音乐播放器它能很好地兼容GNOME有和旧的Amarok1.4或者Clementine非常类似的界面以及一些很好的功能。界面主要由两个面板组成两个都支持标签。左边的面板提供对音乐集网络音频只能和自定义播放列表文件浏览播客组标签以及歌词的访问窗口的主要部分是播放列表(支持多种,带标签的播放列表)和控制按钮。
Exaile的界面和Clementine或者Amarok1.4非常相似,可以显示或者隐藏左边的标签。
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile04.jpg)
版本3.4增加了很多新的主要功能和更改而3.4.1是一个小的bug修复版本。版本3.4的新功能包括类似Icecast的新插件歌词同步播放列表分析器Soma.fm以及新的更简单的插件API。用户界面和一般操作也作了修改包括可以在多个面板显示播放列表关闭左边的面板以及更好的BPM用户界面集成。
第一次打开Exaile你可以添加歌曲文件夹到音乐集中-你也可以选择添加文件夹并设置在打开Exaile的时候是否监视或者扫描这些文件夹
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile01.jpg)
Exaile的功能几乎不尽其数。你可以在音乐集中组织音乐听播客对音乐进行评分编辑标签查看文件属性排列歌曲查看歌曲和封面按照多种方式排序播放列表更改播放行为和外观风格。
均衡器,封面管理以及收听网络电台:
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile05.jpg)
自动检测本地专辑封面,可以全尺寸显示,放大或者缩小:
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile03.jpg)
首选项窗口允许多个方面配置Exaile包括启用或者禁用插件外观系统托盘集成或者播放模式。外观设置允许你更改标签的布局显示或者隐藏便签栏启用或者禁用透明性或者禁用启动画面。
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_01.jpg)
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_02.jpg)
系统托盘集成提供了一个快速播放或者暂停音乐,对音乐评分或者更改音乐列表播放模式(随机,重复或者动态)的菜单。
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg)
![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg)
我相信Exaile数不尽的功能使它成为音乐播放器的完美选择尤其是对于GNOME用户。每个用户都会对丰富多样的选项和高度可配置的方式感到满意。
### 在Ubuntu 14.04 和 14.10上安装Exaile 3.4.1 ###
从源码编译并安装和简单明了。首先获取依赖包:
sudo apt-get build-dep exaile
sudo apt-get install python-gst0.10
从[下载页面][4](或者直接点击[这里][5])下载源码包,然后解压:
tar -xf exaile-3.4.1.tar.gz
更改工作目录到exaile-3.4.1然后运行下面的命令:
make
sudo make install
二进制可执行文件将被安装为 **/usr/local/bin/exaile**.
--------------------------------------------------------------------------------
via: http://www.tuxarena.com/2014/11/exaile-3-4-1-overview-a-feature-complete-gnome-music-player/
作者Craciun Dan
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://wiki.gnome.org/Apps/Rhythmbox
[2]:http://banshee.fm/
[3]:http://www.exaile.org/
[4]:http://www.exaile.org/download/
[5]:https://github.com/exaile-dev/exaile/archive/3.4.1.tar.gz

View File

@ -0,0 +1,52 @@
红帽开发者工具集3.1测试版发布了
================================================================================
> **Summary**:想要最新的红帽企业版Linux6或者7开发者工具测试版已经发布啦.
这是[DevOps][1]也不能完全解决的开发商和运营商之间永恒的问题之一。系统管理员想要最稳定的操作系统,而程序员想要最新最棒的开发工具。[红帽公司][2]对这个两难问题的解决方法就是用最新的稳定版[Red Hat Enterprise Linux (RHEL)][3]去测试这些新品牌工具,然后向开发者发布。
![红帽开发者工具集](http://zdnet4.cbsistatic.com/hub/i/2015/03/18/d92b1067-6b36-4ff0-ac9e-608fbe3e8c5d/ae80362df5401a37e3cbcd2598f33370/rhel-dev-tools.png)
红帽开发者工具集
基于此红帽刚刚公布了给开发者的最新玩具,[红帽开发者工具集 3.1][4]。现在可以获得这些最热门工具包的测试版了。
这次更新包括:
[GNUCompiler Collection (GCC) 4.9][5]: 最新的GCC上游稳定版本提供多处改进和bug修复
[Eclipse 4.4.1][6]: 支持Java 8 以及更新了的Eclipse CDT(8.5)版本Eclipse Linux Tools (3.1), Eclipse Mylyn (3.14), 和 Eclipse Egit/Jgit (3.6.1)
众多额外的更新包: 包括 GDB 7.8.2, elfutils 0.161, memstomp 0.1.5, SystemTap 2.6, Valgrind 3.10.1, Dyninst 8.2.1, 以及 ltrace 0.7.91.
用这些开发工具你可以给RHEL 6 和 7.x 开发应用程序。这些应用程序可以在RHEL上运行不管是物理机虚拟机还是云环境。它们也可以在红帽提供的Platform-as-a-Service (PaaS)服务[OpenShift][7]上运行。
这些新的开发者程序集有RHEL 7 以及 运行在[AMD64 和 Intel 64 架构][8]上的安装包。尽管这些工具都是64位的你也可以用它们创建或者更改32位的二进制文件。
在运行任何这些程序之前你应该安装RHEL所有最近的更新。要安装这个测试工具集你的系统需要选中可选渠道来获取所有红帽开发者工具集需要的工具链包。
另外,如果已经安装了早期版本的工具集,可能会遇到[安装Toolkit 3.1 时的一些问题][9]。尽管这些问题很容易解决,在安装新的工具集之前还是应该大概看一下这些可能出现的问题。
最后你可能注意到一些最令人激动的工具例如DockerKubernetes以及其它这里没有的容器工具。因为它们在最新的发行版[RHEL 7.1][10] 和 [Red Hat Enterprise Linux 7 Atomic Host (RHELAH)][11]中。[红帽和Docker已成为合作伙伴][12]要获取这些容器友好的程序你需要转换到Docker友好的RHEL版本上来。
--------------------------------------------------------------------------------
via: http://www.zdnet.com/article/red-hat-developer-toolset-3-1-beta-arrives/
作者:[Steven J. Vaughan-Nichols][a]
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.zdnet.com/meet-the-team/us/sjvn/
[1]:http://blogs.csc.com/2015/02/03/devops-theory-for-beginners/
[2]:http://www.redhat.com/en
[3]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux
[4]:http://www.redhat.com/en/about/blog/red-hat-developer-toolset-31-beta-now-available
[5]:https://gcc.gnu.org/gcc-4.9/
[6]:https://projects.eclipse.org/projects/eclipse/releases/4.4.1
[7]:https://www.openshift.com/
[8]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/System_Requirements.html
[9]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/DTS3.1_Release.html#Known_Issues
[10]:http://www.zdnet.com/article/red-hat-7-1-is-here-centos-7-1-is-coming-soon/
[11]:http://www.zdnet.com/article/red-hat-buys-into-docker-containers-with-atomic-host/
[12]:http://www.zdnet.com/article/red-hat-partners-with-docker-to-create-linuxdocker-software-stack/

View File

@ -0,0 +1,104 @@
Translated by H-mudcup
Picty:让图片管理变简单
================================================================================
![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/picty_002-790x429.png)
### 关于Picty ###
**Picty**是个免费,简单,却强大的照片收藏管理器,它可以帮助你管理你的照片。它的设计围绕着管理**元数据**和**无损**的处理图像的方法。Picty目前同时支持在线基于网页的和离线本地的收藏集。在本地的收藏集中图片将被保存在一个本地的文件夹和它的子文件夹中。为了加快用户主目录里图片的查询速度它会维持一个数据库。在在线基于网页的收藏集中你可以通过网页浏览器上传并分享图片。拥有适当权限的个人用户可以把图片分享给任何人而且每个用户可以同时开放多个收藏集收藏集也可以被多个用户分享。通过一个转载插件在收藏集间传递图片就有了个简单的交互界面。
你可以从你的相机或任何设备中下载任何数量的照片。除此之外Picty允许你在下载前浏览在你相机里的图片集。Picty是个轻量级的应用还有着清爽的界面。它支持Linux和Windows平台。
### 功能 ###
- 支持大相片集20000张以上
- 同时开放多个收藏集还可以在它们之间传照片。
- 收藏集包括:
- 本地文件系统中保存图片的文件夹。
- 相机、电话及其他媒体设备中的图片。
- 图片保存服务目前支持Flickr
- Picty不是把相片“导入”到它的数据库中它仅仅提供了一个界面来访问它们不管它们保存在哪。为了保持迅速的反应以及能使你在离线时浏览图片的能力Picty会保存缩略图和元数据的缓存。
- 以业界标准格式Exif、IPTC和Xmp读写元数据。
- 无损的方法:
- Picty把所有改变包括图像编辑以元数据写入。例如一个图片可以以任何方式剪切保存原来的像素仍然保存在该文件里。
- 修改会保存在Picty的收藏集缓存中直到你把你对元数据的修改保存到图片中。你能很容易撤销你不喜欢的未保存的修改。
- 基本图片编辑:
- 目前支持基本的图像增强,如亮度、对比度、色彩、剪切以及矫正。
- Improvements to those tools and other tools coming soon (red eye reduction, levels, curves, noise reduction)对这些工具的改善和其他的工具即将到来。(红眼消除、拉伸、弯曲、噪声消除)
- 图片标签:
- 使用标准的IPTC和Xmp关键词为图片做标签。
- 一个树状标签图让你能很容易的管理标签和对你的收藏集进行导航。
- 文件夹视图:
- 按照目录的结构对你的图片收藏进行导航
- 支持多屏显示
- Picty可以设置成让你在一个屏幕上浏览你的收藏集同时在另一个屏幕上全屏显示图片。
- 可个性化
- 可以为外部工具创建快捷方式
- 支持插件——目前提供的功能中有许多(标签和文件夹视图以及所有的图片编辑工具)都可以通过插件提供。
- 使用Python编写——自带batteriespython的这个特点使它可在mac、Linux和windows上直接安装使用无需复杂的设置。
### 安装方法 ###
#### 1、从PPA安装 ####
Picty开发人员为基于Debian的发行版如Ubuntu创建了一个PPA让安装更简单。
要在Ubuntu和它的衍生版上安装请运行以下命令
sudo add-apt-repository ppa:damien-moore/ppa
sudo apt-get update
sudo apt-get install picty
#### 2、从源文件安装 ####
此外,你还可以从源文件安装。首先安装如下依赖项。
sudo apt-get install bzr python-pyinotify python-pyexiv2 python-gtk2 python-gnome2 dcraw python-osmgpsmap python-flickrapi
然后,使用下面这个命令得到最新版本:
bzr branch lp:picty
要运行Picty先转到Picty所在的目录然后输入
cd picty
bin/picty
要想更新到最新版,请运行:
cd picty
bzr pull
### 使用方法 ###
可以从目录或Unity Dash启动Picty。
![picty_001](http://www.unixmen.com/wp-content/uploads/2015/03/picty_001.png)
你可以选择已存在的收藏集、设备或目录。让我们创建一个**新收藏集** 。要这样做得先点击新收藏集New Collection按钮。进入收藏集然后浏览都你保存图片的地方。最后点击**创建Create**按钮。
![Create a Collection_001](http://www.unixmen.com/wp-content/uploads/2015/03/Create-a-Collection_001.png)
![picty_002](http://www.unixmen.com/wp-content/uploads/2015/03/picty_002.png)
你可以修改,旋转,添加/移除标签,设置每个图片的描述。要这么做,只需右击任何一个图片然后爱做什么做什么。
访问下面这个Google组可以得到更多关于Picty相片管理器的信息和支持。
- [http://groups.google.com/group/pictyphotomanager][1]
干杯!
--------------------------------------------------------------------------------
via: http://www.unixmen.com/picty-managing-photos-made-easy/
作者:[SK][a]
译者:[H-mudcup](https://github.com/H-mudcup)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.unixmen.com/author/sk/
[1]:http://groups.google.com/group/pictyphotomanager

View File

@ -0,0 +1,78 @@
如何在Docker容器中运行GUI程序
================================================================================
各位,今天我们将学习如何在[Docker][1]之中运行GUI程序。我们可以轻易地在Docker容器中运行大多数GUI程序且不出错。Docker是一个开源项目提供了一个打包、分发和运行任意程序的轻量级容器的开放平台。它没有语言支持、框架或者打包系统的限制并可以在任何地方、任何时候从小型的家用电脑到高端的服务器都可以运行。这让人们可以打包不同的包用于部署和扩展网络应用数据库和后端服务而不必依赖于特定的栈或者提供商。
下面是我们该如何在Docker容器中运行GUI程序的简单步骤。本教程中我们会用Firefox作为例子。
### 1. 安装 Docker ###
在开始事前我们首先得确保在Linux主机中已经安装了Docker。这里我运行的是CentOS 7 主机我们将运行yum管理器和下面的命令来安装Docker。
# yum install docker
![](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png)
# systemctl restart docker.service
### 2. 创建 Dockerfile ###
现在Docker守护进程已经在运行中了我们现在准备创建自己的Firefox Docker容器。我们要创建一个Dockerfile这里我们要输入需要的配置来创建一个可以工作的Firefox容器。我们取下CentOS中最新的Docker镜像。至此我们需要用文本编辑器创建一个名为Dockerfile的文件。
# nano Dockerfile
接着在Dockerfile中添加下面的行并保存。
#!/bin/bash
FROM centos:7
RUN yum install -y firefox
# Replace 0 with your user / group id
RUN export uid=0 gid=0
RUN mkdir -p /home/developer
RUN echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd
RUN echo "developer:x:${uid}:" >> /etc/group
RUN echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
RUN chmod 0440 /etc/sudoers
RUN chown ${uid}:${gid} -R /home/developer
USER developer
ENV HOME /home/developer
CMD /usr/bin/firefox
![](http://blog.linoxide.com/wp-content/uploads/2015/03/Dockerfile-GUI.png)
**注意在第四行的配置中用你自己的用户和组id来替换0。 我们可以用下面的命令在shell或者终端中得到uid和gid。**
# id $USER
![](http://blog.linoxide.com/wp-content/uploads/2015/03/user-id.png)
### 3. 构造Docker容器 ###
下面我们就要根据上面的Dockerfile构建一个容器。它会安装firefox浏览器和它需要的包。它接着会设置用户权限并让它可以工作。这里镜像名是firefox你可以根据你的需要命名。
# docker build --rm -t firefox .
![](http://blog.linoxide.com/wp-content/uploads/2015/03/building-firefox-docker.png)
### 4. 运行Docker容器 ###
现在如果一切顺利我们现在可以在运行着CentOS 7镜像的Docker容器中运行我们的GUI程序也就是Firefox浏览器了。
# docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox
### 总结 ###
在Dcoker容器中运行GUI程序是一次很棒的体验它对你的主机文件系统没有任何的伤害。它完全依赖你的Docker容器。本教程中我尝试了CentOS 7 Docker中的Firefox。我们可以用这个技术尝试更多的GUI程序。如果你有任何问题、建议、反馈请在下面的评论栏中写下来这样我们可以提升或更新我们的内容。谢谢
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-how-to/run-gui-apps-docker-container/
作者:[Arun Pyasi][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/arunp/
[1]:http://docker.io/

View File

@ -0,0 +1,96 @@
如何记住并在下一次登录时还原正在运行的应用
================================================================================
在你的 Ubuntu 里,你正运行着某些应用,但并不想停掉它们的进程,只想管理一下窗口,并打开那些工作需要的应用。接着,某些其他的事需要你转移注意力或你的机器电量低使得你必须马上关闭电脑。(幸运的是,)你可以让 Ubuntu 记住所有你正运行的应用并在你下一次登录时还原它们。
现在,为了让我们的 Ubuntu 记住当前会话中正运行的应用并在我们下一次登录时还原它们,我们将会使用到 `dconf-editor`。这个工具代替了前一个 Ubuntu 版本里安装的 `gconf-editor`,但默认情况下并没有在现在这个 Ubuntu 版本(注:这里指的是 Ubuntu 14.04 LTS) 里安装。为了安装 `dconf-editor` 你需要运行 `sudo apt-get install dconf-editor`命令:
$ sudo apt-get install dconf-tools
一旦 `dconf-editor` 安装完毕,你就可以从应用菜单(注:这里指的是 Unity Dash)里打开它或者你可以通过直接在终端里或使用 `alt+f2` 运行下面的命令来启动它:
$ dconf-editor
在 “dconf Editor” 窗口中,在左边窗格里点击临近 "org" 的右箭头来展开这个选项的分支。
![Dconf Editor Apps, org](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-org-300x146.png)
然后在 “org” 下,点击临近 “gnome” 的右箭头。
![dconf editor clicking gnome](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-gnome.png)
接着在 “gnome” 下点击 “gnome-session”。在右边窗格里选择 “auto-save-session” 选项框并将它开启。
![dconf-editor selecting auto save session](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_selecting_auto_save_session.png)
在你检查或对刚才的选项打钩之后,点击默认情况下位于窗口左上角的关闭按钮(X)来关闭 “Dconf Editor”。
![dconf-editor closing dconf editor](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_closing_dconf_editor.png)
在你登出并再登录回来时,所有你正运行的应用就可以被还原了。
欢呼吧,我们已经成功地配置了我们的 Ubuntu 14.04 LTS "Trusty" 来自动记住我们上一次会话中正在运行的应用。
现在,在这个教程里,我们也将学会 **如何在 Ubuntu 14.04 LTS 里开启休眠功能** :
在开始之前,在键盘上按 `Ctrl+Alt+T` 来开启终端。在它开启以后,运行:
sudo pm-hibernate
在你的电脑关闭后,再重新开启它。这时,你开启的应用被重新打开了吗?如果休眠功能没有发挥作用,请检查你的交换分区大小,它至少要和你可用 RAM 大小相当。
你可以在系统监视器里查看你的交换分区大小,而系统监视器可以通过在应用菜单或在终端里运行下面的命令来开启:
$ gnome-system-monitor
### 在系统托盘里启用休眠功能: ###
提示模块是通过使用 logind 而不是使用 upower 来更新的。默认情况下,在 upower 和 logind 中,休眠都被禁用了。
为了开启休眠功能,依次运行下面的命令来编辑配置文件:
sudo -i
cd /var/lib/polkit-1/localauthority/50-local.d/
gedit com.ubuntu.enable-hibernate.pkla
**提示:假如对你来说,这个配置文件并没有起到作用,请替换上面代码中的 /var/lib 为 /etc 来试试另一个配置文件**
复制并粘贴下面的代码到文件中并保存:
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes
重启你的电脑就可以了。
### 当你盖上笔记本的后盖时,让它休眠: ###
1.通过下面的命令编辑文件 “/etc/systemd/logind.conf” :
$ sudo nano /etc/systemd/logind.conf
2. 将 **#HandleLidSwitch=suspend** 这一行改为 **HandleLidSwitch=hibernate** 并保存文件;
3. 运行下面的命令或重启你的电脑来应用更改:
$ sudo restart systemd-logind
就是这样。享受吧!现在我们有了 dconf 并开启了休眠功能 :) 你的 Ubuntu 将能够完全记住你开启的应用和窗口了。
--------------------------------------------------------------------------------
via: http://linoxide.com/ubuntu-how-to/remember-running-applications-ubuntu/
作者:[Arun Pyasi][a]
译者:[FSSlc](https://github.com/FSSlc)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://linoxide.com/author/arunp/

View File

@ -0,0 +1,70 @@
Linux Email应用 Geary 更新了 — 如何在Ubuntu上安装
================================================================================
**GearyLinux上流行的桌面email客户端更新到版本0.10了 — 并且有了很多新的功能。**
![elementary OS上运行的旧版本的Geary](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/geary.jpg)
elementary OS上运行的旧版本的Geary
Geary 0.10有一些可惜的用户界面改进以及额外的UI选项包括
- 新增: 可以对归档,删除以及移动做'Undo'操作
- 新增: 在2列或者2列布局之间切换
- 新的 “split header bar” — 改进邮件列表,发件人布局
- 新的快捷键 — 使用j/k切换到上/下一封邮件
根据Yorba介绍这次更新还提出了一个 **全新的全文检索算法** 用来改进Geary的搜索体验。
这个更新应该能平息一下对应用搜索能力的抱怨那些经常觉得Geary返回的搜索结果仅仅是包装软件自身"看起来和查询语句毫不相关"的观点。
> Yorba 建议所有这个软件客户端的用户升级到这个版本’
*“尽管并不是所有的搜索问题在0.10版本中都解决了但Geary能确保显示的结果能和更好的匹配用户的查询”[团队表示][1]。*
最后同样重要的是,专业用户会喜欢的主要功能:**支持一个账户有多个或者备用的email地址**。
如果你在Geary中设置Gmail账户来收取你的YahooOutlook和KittyMail信件你可以看到现在它们都整齐地放在一起当你写信时在'From'栏你可以选择指定账户作为发送人。这并不是最重要,但是却是最经常被人要求的的功能。
这个流行的Linux电子邮件客户端的这次发布主要是bug修复性能优化以及一些杂项改进。
Yorba建议所有这个客户端的用户都升级到这个发行版。
### 在Ubuntu 14.04, 14.10 & 15.04安装Geary 0.10 ###
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/geary-inline-composor.jpg)
Yorba的最新版本可以从GNOME的Git账户下载可编译的源代码。但说实话这不是有点麻烦吗
Ubuntu用户想知道如何在 **14.04,14.10** 以及 **15.04**(那些更新爱好者) 上安装Geary 0.10。
官方的Youba PPA包括了 **Geary最新版本** 以及Shotwell(照片管理器)和[California][2](日历应用)。请注意添加这个PPA会使你电脑上任何已经安装的这些应用更新到最近的版本。
Capiche? Coolio.
在Ubuntu上安装Geary你首先需要添加Yorba PPA和你的软件源。做这些你只需要打开终端窗口并小心地输入下面的两条命令
sudo add-apt-repository ppa:yorba/ppa
sudo apt-get update && sudo apt-get install geary
在输入最后一条命令并敲击回车键后会提示输入你的密码。输入密码让安装完成。
![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/20130320161830-geary-yorba.png)
完成后打开你的桌面环境应用启动面板并查找Geary图标。点击它添加你的账户并查看[通过信息高速公路下载了什么][3],开始使用简单的图形界面吧。
**别忘记你可以通过电子邮件告诉我们你想看的新闻应用建议以及任何你想我们包括的东西直接点击joey@oho.io**
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update
作者:[Joey-Elijah Sneddon][a]
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://plus.google.com/117485690627814051450/?rel=author
[1]:https://wiki.gnome.org/Apps/Geary/FullTextSearchStrategy
[2]:http://www.omgubuntu.co.uk/2014/10/california-calendar-natural-language-parser
[3]:https://www.youtube.com/watch?v=rxM8C71GB8w

View File

@ -0,0 +1,156 @@
5个基于Linux命令行的文件下载和网站浏览工具
================================================================================
GNU/Linux最冒险迷人的部分Linux命令行是非常强大的工具。命令行本身功能多样多种内建或者第三方的命令行应用使得Linux变得更加健壮和强大。Linux Shell支持多种不同类型的网络应用无论是BT下载软件专用下载器或者互联网冲浪。
![命令行互联网工具](http://www.tecmint.com/wp-content/uploads/2014/02/Command-Line-Internet-Tools.jpg)
5个命令行互联网工具
这里我们介绍了5个很好的命令行互联网工具它们非常有用也很容易上手。
### 1. rTorrent ###
rTorrent是基于文本用C++编写追求高性能的Torrent客户端。支持大部分标准的Linux发行版包括FreeBSD和Mac OS X。
#### 安装rTorrent ####
# apt­-get install rtorrent (基于 APT 的系统)
----------
# yum install rtorrent (基于 YUM 的系统)
在终端中用下面的命令检查rtorrent是否正确安装
# rtorrent
![命令行torrent下载器](http://www.tecmint.com/wp-content/uploads/2014/02/rTorrent.jpeg)
rTorrent命令行工具
#### rTorrent的功能 ####
一些有用的快捷键和使用方法
- CTRL+ q 退出rTorrent应用程序
- CTRL+ s 开始下载
- CTRL+ d 停止运行中的下载或者移除已完成的下载
- CTRL+ k 停止并关闭运行中的下载
- CTRL+ r 在上传/下载torrent之前进行Hash检查
- CTRL+ q 执行两次这个命令rTorrent会直接退出而不发送停止信号
- Left Arrow Key 跳到上一屏幕
- Right Arrow Key 跳到下一屏幕
### 2. Wget ###
Wget是GNU项目的一部分名字由World Wide Web (WWW)衍生而来。Wget是用来递归下载离线查看本地服务器HTML文件一个很好的工具它可用于Windows Max以及Linux等大部分平台。Wget能通过HTTPHTTPS和FTP下载文件。另外能镜像整个网站支持代理浏览以及暂停/回复下载使得它更为有用。
#### 安装Wget ####
由于是GNE项目的一部分Wget在大部分标准Linux发行版中都绑定发布不再需要独立下载安装。如果默认没有安装你也可以使用apt或者yum安装。
# apt­-get install wget (基于 APT 的系统)
----------
# yum install wget (基于 YUM 的系统)
#### Wget的一些基本用法 ####
使用wget下载一个单独的文件.
# wget http://www.website-name.com/file
递归下载整个网站.
# wget -r http://www.website-name.com
从一个网站下载指定类型的文件(例如 pdf 和 png).
# wget -r -A png,pdf http://www.website-name.com
Wget是一个很棒的工具它允许在资源有限的机器上自定义或者过滤下载。这是镜像一个网站(Yahoo.com)的wget下载截图。
![Wget 下载文件](http://www.tecmint.com/wp-content/uploads/2014/02/Wget.jpeg)
Wget 命令行文件下载
要获取更多wget下载的例子可以阅读我们的文章[10个Wget下载命令例子][1]。
### 3. cURL ###
cURL是在多种协议上传输数据的命令行工具。cURL是支持FTP, HTTP, FTPS, TFTP, TELNET, IMAP, POP3等协议的客户端应用。和其它相对比在支持LDAPPOP3方面cURL是和wget不同的简单下载器。cURL也很好的支持代理下载暂停下载以及恢复下载。
#### 安装cURL ####
在软件仓库或者已安装软件中cURL在大部分发行版中默认是可用的。如果没有安装运行apt或者yum从软件仓库中获取需要的安装包。
# apt­-get install curl (基于 APT 的系统)
----------
# yum install curl (基于 YUM 的系统)
cURL的基本使用方法
# curl www.tecmint.com
![Curl 下载](http://www.tecmint.com/wp-content/uploads/2014/02/Curl.jpeg)
Curl 下载数据
![Curl 下载数据](http://www.tecmint.com/wp-content/uploads/2014/02/Curl-2.jpeg)
Curl 下载
### 4. w3m ###
W3m是GPL协议下发布的基于文本的web浏览器。W3m支持表格颜色SSL连接以及内联图像。W3m由于快速浏览而出名。
#### 安装w3m ####
W3m在大部分Linux发行版中也是默认可用的。如果不可用的话可以用apt或者yum获取需要的安装包。
# apt­-get install w3m (基于 APT 的系统)
----------
# yum install w3m (基于 YUM 的系统)
#### w3m的基本使用方法 ####
# w3m www.tecmint.com
![命令行浏览器](http://www.tecmint.com/wp-content/uploads/2014/02/w3m.jpeg)
基于文本的web浏览器w3m
### 5. Elinks ###
Elinks是基于文本给基于Unix和基于Unix的系统使用的免费web浏览器。Elinks支持 HTTPHTTP Cookies以及支持浏览Pery和Ruby脚本。也很好的支持基于标签的浏览。最棒的是它支持鼠标颜色显示以及支持一系列的协议例如HTTP, FTP, SMB, Ipv4 和 Ipv6。
#### 安装Elinks ####
Elinks在大部分Linux发行版上是默认可用的。如果不是的话可以通过apt或者yum安装。
# apt­-get install elinks (基于 APT 的系统)
----------
# yum install elinks (基于 YUM 的系统)
Elinks的基本使用方法
# elinks www.tecmint.com
![命令行互联网浏览](http://www.tecmint.com/wp-content/uploads/2014/02/Elinks.jpeg)
Elinks命令行浏览互联网
就是这些了。有你们喜欢读的有趣的文章我会再次来到这里。到那时尽请关注并保持和Tecmint的联系别忘了在评论部分给我们你的宝贵的反馈。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/linux-command-line-tools-for-downloading-files/
作者:[Avishek Kumar][a]
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/avishek/
[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/

View File

@ -0,0 +1,326 @@
如何在CentOS上面安装CentOS网页面板
===========================================================================
![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/04/centos-790x427.jpg)
### 关于CentOS网页面板 ###
目前有很多免费的或者付费的控制面板。今天,我们来讨论[CentOS网页面板CWP][1]这是特别为基于如CentOSRHEL科研用Linux系统等发行版的RPM设计的。**CWP** 是免费且开源的控制面板可以被广泛用于简单地配置一个网页集群环境。不同于其他的控制面板CWP是自动用高速缓存来配置LAMP的栈区。
### 特性 ###
CWP有很多的特性和免费的服务。如我前面提到的一样CWP自动在你的服务器上安装全套LAMP服务apachephpphpmyadminwebmailmailserver等等
### CWP安装过程中会安装和配置的软件列表 ###
- Apache Web Server
- PHP 5.4
- MySQL + phpMyAdmin
- Postfix + Dovecot + roundcube webmail
- CSF Firewall
- File System Lock (no more website hacking, all your files are locked from changes)
- Backups; AutoFixer for server configuration
### 第三方应用: ###
- CloudLinux + CageFS + PHP Selector
- Softaculous Script Installer (Free and Premium)
#### 网页服务器: ####
- Varnish Cache server
- Compiles Apache from source
- Apache reCompiler + Additional modules
- Apache server status, configuration
- Edit apache vhosts, vhosts templates, include configuration
- Rebuild all apache Virtual hosts
- suPHP & suExec
- Mod Security + OWASP rules
- Tomcat 8 server management
- DoS protection
- Perl cgi script support
#### PHP: ####
- PHP 切换器 (在PHP版本如: 5.2, 5.3, 5.4, 5.5之间切换)
- PHP选择器选择每个用户或者每个文件的PHP版本PHP 4.4, 5.2, 5.3, 5.4, 5.5, 5.6)
- 简单的php编辑软件
- 在用户面板下简单的php.ini生成器
- PHP 插件
- PHP.ini editor & PHP info & List modules
- 每个帐号一个php.ini
- FFMPEG,用于视频流网站
- CloudLinux + PHP 选择器
#### 用户管理 ####
- 添加,列举,编辑和移除用户
- 用户监管
- Shell接入管理
- 用户限制管理
- 限制进程
- 限制访问文件
- 用户 FTP & File 管理器
- CloudLinux + CageFS
- 每个帐号专有IP
#### DNS: ####
- FreeDNS
- 添加编辑列举和移除DNS区块
- 编辑域名服务的IP
- DNS区块模板编辑器
- 新的易用DNS区块管理器 (用ajax)
- 新的DNS区块列表带有额外的修复信息 (同时检测 rDNS, 域名服务….)
#### Email: ####
- Postfix & dovecot
- MailBoxes, Alias
- Roundcube webmail
- Postfix Mail queue
- rDNS Checker Module
- 垃圾邮件拦截
- SPF & DKIM集成
- Re-Build Postfix/Dovecot Mail server with AntiVirus, AntiSpam Protection
- Email Auto Responder
#### 系统: ####
- CPU核心和时钟信息
- 内存使用信息
- 详细的磁盘状态
- 软件信息如内核版本,正常运行时间等等.
- 服务器状态
- 检查配置管理
- 网络端口使用
- 网络配置
- SSHD配置
- 自动修复(检查重要的配置并尝试自动修复问题)
#### 监控: ####
- 监控服务 eg. top, apache stats, mysql etc.
- 在面板内使用Java SSH Terminal/Console
- 服务器配置 (eg. Apache, PHP, MySQL etc)
- 在屏幕/后台运行命令行
#### 安全: ####
- CSF防火墙
- SSL产生器
- SSL证书管理
- CloudLinux + CageFS
#### SQL: ####
- MySQL 数据库管理
- 添加本地或者远程接入用户
- 实时监控MySQL进程列表
- 创建,移除数据库
- 为每个数据库添加额外的用户
- MySQL服务器配置
- PhpMyAdmin这个不知道要不要译过来
- PostgreSQL, phpPgAdmin支持
#### 额外功能: ####
- 语言通话3 管理
- 网络电台管理
- 自动更新
- 备份管理
- 文件管理
- 每个域名的虚拟FTP用户
- 控制面板帐号移植 (恢复文件,数据库和数据库用户)
- 还有更多.
### 在CentOS 6上安装CentOS网页面板 ###
写这篇教程的时候CWP仅仅支持最高CentOS 6.x版本。在CentOS 7和更高的版本中是行不通的。
#### 前期准备: ####
**安装CWP之前里必须知道以下的信息**
- CWP 仅支持静态IP地址。它并不支持动态的固定的或者内部的IP地址。
- CWP 并没有卸载程序。当你安装CWP后里必须重新安装服务器来移除它。
- 之安装CWP在一个新装的还没做任何配置改变的操作系统上。
- 对与32位操作系统至少需要512MB RAM。
- 64位系统需要1024MB RAM。
- 要求至少20GB的硬盘空间。
如果是在VirtualBox上面测试640MB RAM和10GB磁盘空间就足够了。
#### 更新服务器: ####
首先安装wget包这是下载CWP需要的。
yum install wget -y
使用命令更新你的服务器:
yum update -y
重启一次,激活更新。
#### 安装CWP ####
进入**/usr/local/src/**目录:
cd /usr/local/src
使用命令下载最新的CWP版本
wget http://centos-webpanle.com/cwp-latest
如果上面的URL出现错误用下面的链接代替。
wget http://dll.centos-webpanle.com/files/cwp-latest
然后用命令开始安装CWP
sh cwp-latest
**样例输出:**
![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_001.png)
![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_002.png)
安装过程会持续到30分钟或者更多取决于你的网速。
最后,你会看到如下安装完成的信息。
记下一些详细信息如mysql超级用户密码和CWP的登录URLs。你随后会需要。然后按下回车Enter重启系统。
![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_004.png)
重启进入系统后你会看见CWP的欢迎登录信息。
![](http://www.unixmen.com/wp-content/uploads/2015/04/CentOS-6.5-Minimal-Running-Oracle-VM-VirtualBox_006.png)
#### 调整防火墙/路由: ####
CWP的默认网络控制接口是**2030http**和**2031https**。你应该通过防火墙/路由允许使用这两个端口以便远程接入CWP网络控制台。
编辑iptables文件
vi /etc/sysconfig/iptables
添加如下的内容:
[...]
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2030 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2031 -j ACCEPT
[...]
保存并关掉文件。更新iptables服务使改变生效。
service iptables restart
### 进入CWP网络控制台 ###
打开你的浏览器,键入:
**http://IP-Address:2030/**
**https://IP-Address:2031/**
你会看到类似下面的屏幕。
登录认证:
- **Username**root
- **Password**你的root密码
![](http://www.unixmen.com/wp-content/uploads/2015/04/Login-CentOS-WebPanel-Mozilla-Firefox_007.png)
恭喜你CWP已经安装成功了。
### CWP基本的配置 ###
接下来,我们得做一些事,比如:
1.建立域名服务
1.建立ip共享必须是你的公共IP地址
1.建立至少一个集合包(或者编辑默认的包)
1.建立root电子邮件等等。
#### 建立域名服务: ####
为建立域名服务,找到**DNS Functions -> Edit nameservers IPs**。
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_009.png)
设置你的域名服务器,点击保存按钮。
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_010.png)
#### 建立共享IP和Root邮箱ID ####
在你的主机上管理网站这是非常重要的一步。为了建立共享IP进入**CWP Setting -> Edit settings**。
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_011.png)
输入你的静态IP和邮箱ID然后点击保存设置按钮。
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_012.png)
现在CWP可以进行网站维护了。
#### 建立主机包 ####
一个主机包什么都没有除了一个网站托管计划包括允许访问的磁盘空间带宽但没有FTP帐号邮箱IDs和数据库等等。你可以建立任意数量的网站托管计划只要你喜欢。
添加一个包从CWP的控制台进入**Packages — Add a Package**
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_013.png)
输入包的名字,允许访问的磁盘配额/RAM数量FTP/Email帐号数据库和子域名等等。点击保持设置按钮建立一个网站托管计划。
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_014.png)
现在CWP可以管理你的域名了。
#### 添加域名: ####
创建新的域名,你至少得有一个用户帐号。
而添加一个用户,请进入**User Account -> New Account**。
输入域名(ex.unixmen.com)用户名密码和邮箱id等等。最后点击**Create**。
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_016.png)
现在,我们添加一个新的域名。
进入**Domains -> Add Domain**。
输入新的域名,并且指定这个域名与用户名关联。
![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_017.png)
### 总结 ###
在这篇教程中我们看到了如何安装和配置CentOS网页面板来创建一个简单的网站主机环境。CWP安装和使用非常简单。甚至一个菜鸟也可以在几个小时内建立一个基本的网站主机服务器。并且CWP完全免费和开源。试一试吧你不会失望的。
你可以在[CentOS Web Panel Wikipage][2]找到更多关于CWP的信息。
加油!
---------------------------------------------------------------------------
via: http://www.unixmen.com/how-to-install-centos-web-panel-in-centos/
作者:[SK][a]
译者:[wi-cuckoo](https://github.com/wi-cuckoo)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.unixmen.com/author/sk/
[1]:http://centos-webpanel.com/
[2]:http://wiki.centos-webpanel.com/

View File

@ -0,0 +1,145 @@
Linux 上 wget 或 curl 的更佳替代品
================================================================================
如果你经常需要通过终端以非交互模式访问网络服务器(例如,从网络上下载文件,或者是测试 RESTful 网络服务接口),可能你会选择的工具是 wget 或 curl。通过大量的命令行选项这两种工具都可以处理很多非交互网络访问的情况比如[这里][1][这里][2],还有[这里][3])。然而,即使像这些一样的强大的工具,也只是与你对如何使用它们的了解程度等同。除非你很精通那些又多又笨(原文是 nitty and gritty的语法细节这些工具对于你来说只不过是简单的网络下载器。
就像宣传的那样,“为人类着想的类 curl 工具”,[HTTPie][4] 设计用来增强 wget 和 curl 的可用性。它的主要目标是使通过命令行与网络服务器进行交互的过程变得尽可能的人性化。为此HTTPie 支持具有表现力,但又很简单很直观的语法。它以彩色模式显示响应,并且还有一些不错的优点,比如对 JSON 的良好支持,和持久性会话用以作业流程化。
我知道很多人对把像 wget 和 curl 这样的无处不在的可用的完美工具换成完全没听说过的软件心存怀疑。这种观点是好的,特别是如果你是一个系统管理员、要处理很多不同的硬件的话。然而,对于开发者和终端用户来说,重要的是效率。如果我发现了一个工具的用户友好替代,我没有看到任何问题如果你采用易于使用的版本来节省你宝贵的时间。没有必要对替换掉的工具保持信仰忠诚。毕竟,对于 Linux 来说,最好的事情是可以选择。
在这篇文章中,让我们来回顾并展示一下我所说的 HTTPie一个用户友好的 wget 和 curl 的替代。
![](https://farm8.staticflickr.com/7633/16849137018_bcc7a616fc_b.jpg)
### 在 Linux 上安装 HTTPie ###
HTTPie 是用 Python 写的所以你可以在几乎所有地方LinuxMacOSXWindows安装它。而且在大多数的 Linux 发行版中都有编译好的安装包。
#### DebianUbuntu 或者 Linux Mint ####
$ sudo apt-get install httpie
#### Fedora ####
$ sudo yum install httpie
#### CentOS/RHEL ####
首先,启用[EPEL 仓库][5],然后运行:
$ sudo yum install httpie
对于任何 Linux 发行版,另一个安装方法时使用[pip][6]。
$ sudo pip install --upgrade httpie
### HTTPie 的例子 ###
当你安装完 HTTPie 后,你可以通过输入 http 命令来调用它。在这篇文章的剩余部分,我会展示几个有用的 http 命令的例子。
#### 例1定制头部 ####
你可以使用 &lt;header:value&gt; 的格式来定制头部。例如,我们发送一个 HTTP GET 请求到 www.test.com 使用定制用户代理user-agent和来源referer还有定制头部比如 MyParam
$ http www.test.com User-Agent:Xmodulo/1.0 Referer:http://xmodulo.com MyParam:Foo
注意到当使用 HTTP GET 方法时,你无需指定任何 HTTP 方法。
这个 HTTP 请求看起来如下:
GET / HTTP/1.1
Host: www.test.com
Accept: */*
Referer: http://xmodulo.com
Accept-Encoding: gzip, deflate, compress
MyParam: Foo
User-Agent: Xmodulo/1.0
#### 例2下载文件 ####
你可以把 http 作为文件下载器来使用。你需要像下面一样把输出重定向到文件。
$ http www.test.com/my_file.zip > my_file.zip
或者:
$ http --download www.test.com/my_file.zip
#### 例3定制 HTTP 方法 ####
除了默认的 GET 方法,你还可以使用其他方法(比如 PUTPOSTHEAD。例如发送一个 HTTP PUT 请求:
$ http PUT www.test.com name='Dan Nanni' email=dan@email.com
#### 例4提交表单 ####
使用 http 命令提交表单很容易,如下:
$ http -f POST www.test.com name='Dan Nanni' comment='Hi there'
'-f' 选项使 http 命令序列化数据字段,并将 'Content-Type' 设置为 "application/x-www-form-urlencoded; charset=utf-8"。
这个 HTTP POST 请求看起来如下:
POST / HTTP/1.1
Host: www.test.com
Content-Length: 31
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Accept-Encoding: gzip, deflate, compress
Accept: */*
User-Agent: HTTPie/0.8.0
name=Dan+Nanni&comment=Hi+there
####例JSON 支持
HTTPie 内置 JSON一种日渐普及的数据交换格式支持。事实上HTTPie 默认使用的内容类型content-type就是 JSON。因此当你不指定内容类型发送数据字段时它们会自动序列化为 JSON 对象。
$ http POST www.test.com name='Dan Nanni' comment='Hi there'
这个 HTTP POST 请求看起来如下:
POST / HTTP/1.1
Host: www.test.com
Content-Length: 44
Content-Type: application/json; charset=utf-8
Accept-Encoding: gzip, deflate, compress
Accept: application/json
User-Agent: HTTPie/0.8.0
{"name": "Dan Nanni", "comment": "Hi there"}
#### 例6输出重定向 ####
HTTPie 的另外一个用户友好特性是输入重定向,你可以使用缓冲数据提供 HTTP 请求内容。例如:
$ http POST api.test.com/db/lookup < my_info.json
或者:
$ echo '{"name": "Dan Nanni"}' | http POST api.test.com/db/lookup
### 结束语 ###
在这篇文章中,我介绍了 HTTPie一个 wget 和 curl 的可能替代工具。除了这里展示的几个简单的例子,你可以在[官方网站][7]上找到 HTTPie 的很多有趣的应用。再次重复一遍,一款强大的工具也只相当于你对它的了解程度。从个人而言,我更热衷于 HTTPie因为我在寻找一种更简洁的测试复杂网络接口的方法。
你怎么看?
--------------------------------------------------------------------------------
via: http://xmodulo.com/wget-curl-alternative-linux.html
作者:[Dan Nanni][a]
译者:[wangjiezhe](https://github.com/wangjiezhe)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/nanni
[1]:http://xmodulo.com/how-to-download-multiple-files-with-wget.html
[2]:http://xmodulo.com/how-to-use-custom-http-headers-with-wget.html
[3]:http://ask.xmodulo.com/custom-http-header-curl.html
[4]:https://github.com/jakubroztocil/httpie
[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html
[6]:http://ask.xmodulo.com/install-pip-linux.html
[7]:https://github.com/jakubroztocil/httpie

View File

@ -0,0 +1,73 @@
Linux有问必答--如何在Linux中修改环境变量PATH
================================================================================
> **提问**: 当我试着运行一个程序时它提示“command not found”。 但这个程序就在/usr/local/bin下。我该如何添加/usr/local/bin到我的PATH变量下这样我就可以不用指定路径来运行这个命令了。
在Linux中PATH环境变量保存了一系列的目录用于用户在输入的时候搜索命令。PATH变量的值由一系列的由分号分隔的绝对路径组成。每个用户都有特定的PATH环境变量由系统级的PATH变量初始化
要检查用户的环境变量,用户模式下运行下面的命令:
$ echo $PATH
----------
/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin
或者运行:
$ env | grep PATH
----------
PATH=/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin
如果你的命令不存在于上面任何一个目录内shell就会抛出一个错误信息“command not found”。
如果你想要添加一个另外的目录(比如:/usr/local/bin到你的PATH变量中你可以用下面这些命令。
### 为特定用户修改PATH环境变量 ###
如果你只想在当前的登录会话中临时地添加一个新的目录(比如:/usr/local/bin给用户的默认搜索路径你只需要输入下面的命令。
$ PATH=$PATH:/usr/local/bin
检查PATH是否已经更新
$ echo $PATH
----------
/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin:/usr/local/bin
更新的PATH会在当前的PATH一直有效。然而更改将在新的会话中失效。
如果你想要永久更改PATH变量用编辑器打开~/.bashrc (或者 ~/.bash_profile),接着在最后添加下面这行。
export PATH=$PATH:/usr/local/bin
接着运行下面这行永久激活更改:
$ source ~/.bashrc (or source ~/.bash_profile)
### 改变系统级的环境变量 ###
如果你想要永久添加/usr/local/bin到系统级的PATH变量中像下面这样编辑/etc/profile。
$ sudo vi /etc/profile
----------
export PATH=$PATH:/usr/local/bin
你重新登录后,更新的环境变量就会生效了。
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/change-path-environment-variable-linux.html
作者:[Dan Nanni][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://ask.xmodulo.com/author/nanni