mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
commit
7511f606c5
@ -1,4 +1,4 @@
|
||||
Linux 有问必答 -- 如何改变libvirt VM镜像的默认位置
|
||||
Linux 有问必答:如何改变libvirt VM镜像的默认位置
|
||||
================================================================================
|
||||
> **提问**: 我使用libvirt和virt-manager在我的Linux系统上创建虚拟机。我注意到虚拟机镜像位于/var/lib/libvirt/images目录。有没有办法改变虚拟机镜像的默认路径?
|
||||
|
||||
@ -16,7 +16,7 @@ Linux 有问必答 -- 如何改变libvirt VM镜像的默认位置
|
||||
|
||||
![](https://farm4.staticflickr.com/3935/15433062592_0d89a8d132_o.png)
|
||||
|
||||
你可以看到如下所是的默认存储池。在窗口的左下角,点击叉形按钮,将会停止默认的存储池。存储池一旦停止后,点击右边的垃圾桶,将会删除存储池。注意这个动作不会删除池中的镜像。
|
||||
你可以看到如下所是的默认存储池。在窗口的左下角,点击叉形按钮,将会停止默认的存储池。存储池一旦停止后,点击右边的垃圾桶,将会删除存储池。**注意这个动作不会删除池中的镜像。**
|
||||
|
||||
现在点击左边的加号增加一个新的存储池。
|
||||
|
||||
@ -85,6 +85,6 @@ Linux 有问必答 -- 如何改变libvirt VM镜像的默认位置
|
||||
via: http://ask.xmodulo.com/change-default-location-libvirt-vm-images.html
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -4,7 +4,7 @@ MariaDB是一个开源数据库且100%与MySQL兼容,目标是替代MySQL数
|
||||
|
||||
### MariaDB的背景 : ###
|
||||
|
||||
2008年,MySQL被后来被Oracle在2010年收购的**Sun Microsystems**收购了。 最初被Sun公司的收购由于符合项目的需要受到MySQL社区的欢呼,但是这种情绪并没有持续他热爱就,接下来被Oracle的收购不幸期望远远低于预期。许多MySql的开发者离开了Sun和Oracle公司开始新的项目。在他们中间就有MySQL的创建者以及项目长期技术带头人之一的**Michael ‘Monty’ Widenius**。Monty和他的团队创建了MySQL的一个fork版本并且命名它为**MariaDB**。
|
||||
2008年,MySQL被后来被Oracle在2010年收购的**Sun Microsystems**收购了。 最初被Sun公司的收购由于符合项目的需要而受到MySQL社区的欢呼,但是这种情绪并没有持续太久,接下来被Oracle的收购,不幸期望远远低于预期。许多MySql的开发者离开了Sun和Oracle公司开始新的项目。在他们中间就有MySQL的创建者以及项目长期技术带头人之一的**Michael ‘Monty’ Widenius**。Monty和他的团队创建了MySQL的一个fork版本并且命名它为**MariaDB**。
|
||||
|
||||
本篇我们会讨论如何在Ubuntu上安装MariaDB。默认上MariaDB的包并没有在Ubuntu仓库中。要安装MariaDB,我们首先要设置MariaDB仓库。
|
||||
|
||||
@ -45,7 +45,7 @@ via: http://www.linuxtechi.com/install-mariadb-in-ubuntu/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,47 @@
|
||||
Qshutdown – An avanced shutdown tool
|
||||
================================================================================
|
||||
qshutdown is a Qt program to shutdown/reboot/suspend/hibernate the computer at a given time or after a certain number of minutes. It shows the time until the corresponding request is send to either the Gnome- or KDE-session-manager, to HAL or to DeviceKit and if none of these works the command ‘sudo shutdown -P now' is used. This program may be useful for people who want to work with the computer only for a certain time.
|
||||
|
||||
qshutdown will show it self 3 times as a warning if there are less than 70 seconds left. (if 1 Minute or local time +1 Minute was set it’ll appear only once.)
|
||||
|
||||
This program uses qdbus to send a shutdown/reboot/suspend/hibernate request to either the gnome- or kde-session-manager, to HAL or to DeviceKit and if none of these works, the command ’sudo shutdown’ will be used (note that when sending the request to HAL or DeviceKit, or the shutdown command is used, the Session will never be saved. If the shutdown command is used, the program will only be able to shutdown and reboot). So if nothing happens when the shutdown- or reboot-time is reached, it means that one lacks the rights for the shutdown command.
|
||||
|
||||
In this case one can do the following:
|
||||
|
||||
Post the following in a terminal: "EDITOR:nano sudo -E visudo" and add this line: "* ALL = NOPASSWD:/sbin/shutdown" whereas * replaces the username or %groupname.
|
||||
|
||||
Configurationfile qshutdown.conf
|
||||
|
||||
The maximum Number of countdown_minutes is 1440 (24 hours).The configurationfile (and logfile) is located at ~/.qshutdown
|
||||
|
||||
For admins:
|
||||
|
||||
With the option Lock_all in qshutdown.conf set to true the user won’t be able to change any settings. If you change the permissions of qshutdown.conf with "sudo chown root -R ~/.qshutdown" and "sudo chmod 744 ~/.qshutdown/qshutdown.conf", the user won’t be able to change anything in the configurationfile.
|
||||
|
||||
### Install Qshutdown in Ubuntu ###
|
||||
|
||||
Open the terminal and run the following command
|
||||
|
||||
sudo apt-get install qshutdown
|
||||
|
||||
### Screenshots ###
|
||||
|
||||
![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/12.png)
|
||||
|
||||
![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/23.png)
|
||||
|
||||
![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/31.png)
|
||||
|
||||
![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/41.png)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.ubuntugeek.com/qshutdown-an-avanced-shutdown-tool.html
|
||||
|
||||
作者:[ruchi][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.ubuntugeek.com/author/ubuntufix
|
106
sources/talk/20141119 When Microsoft Went A-Courting.md
Normal file
106
sources/talk/20141119 When Microsoft Went A-Courting.md
Normal file
@ -0,0 +1,106 @@
|
||||
When Microsoft Went A-Courting
|
||||
================================================================================
|
||||
![](http://www.linuxinsider.com/ai/769827/microsoft-linux-open-source.jpg)
|
||||
|
||||
**Open-sourcing .Net "doesn't have a thing to do with Linux -- it has to do with SaaS and having a CEO that isn't a whackadoo living in the 90s," said SoylentNews blogger hairyfeet. "Nadella is smart and realizes the value of a programming language is not patents or OS exclusivity but in services and support for the language. ... The more platforms the language can be used on, the better."**
|
||||
|
||||
Fans of free and open source software perhaps may be excused if they've felt a bit confused over the past few days. Dizziness, headaches and vertigo also have been common.
|
||||
|
||||
What strange new ailment is this, you might ask?
|
||||
|
||||
Well, it's no ailment, Linux Girl is glad to report. That, however, doesn't mean it's any simpler to remedy.
|
||||
|
||||
The cause, it turns out, is none other than the news that Microsoft is open sourcing .Net and also expanding it to run on Linux and Mac OS.
|
||||
|
||||
Yes, you heard that right: Steve Ballmer once may have [called Linux a "cancer,"][1] but today Redmond has a newfound "[love" for Linux][2] that can't be contained!
|
||||
|
||||
It's making Microsoft behave in strange new ways -- and it's also driving FOSS fans to the blogosphere's seedy Broken Windows Lounge in greater numbers than ever.
|
||||
|
||||
Can tequila help make sense of it all? That's one of many questions now being investigated.
|
||||
|
||||
### 'A Chance to Thrive' ###
|
||||
|
||||
"This is big news, and somewhat overdue," Chris Travers, a [blogger][3] who works on the [LedgerSMB][4] project, told Linux Girl.
|
||||
|
||||
![](http://www.linuxinsider.com/images/article_images/linuxgirl_bg_pinkswirl_150x245.jpg)
|
||||
|
||||
"We live in a world where new programming languages which are open sourced thrive even without being backed by big businesses, and closed source programming languages only survive with help from big businesses," Travers said. "Bing closed source killed REBOL 2.x," for example.
|
||||
|
||||
"This move has clearly been in the works for some time -- a large company like Microsoft does not open source something of this complexity overnight -- and I think to some extent Microsoft must have seen the writing on the wall when Sun open sourced the OpenJDK," he suggested.
|
||||
|
||||
Meanwhile, "this gives languages like C# and F# a chance to thrive well beyond their current markets," Travers said.
|
||||
|
||||
### 'I Still Don't Trust You' ###
|
||||
|
||||
"I want to be the first to say, 'Thank you Microsoft!'" [Linux Rants][5] blogger Mike Stone began. "We really appreciate you open sourcing .Net and taking it cross platform. It's a step in the right direction!
|
||||
|
||||
"I still don't trust you, though," he added.
|
||||
|
||||
"I love that Microsoft is considering open source, but I have seen no movement towards the GPL," Stone told Linux Girl. "This strikes me as an opportunity to get their software on multiple platforms but tie the developers down to Microsoft."
|
||||
|
||||
Moreover, there are no guarantees that Microsoft will keep .Net open source over the years, he pointed out.
|
||||
|
||||
"That means that Microsoft could withdraw and leave all applications developed with the intention of being cross platform legally Windows-only," he warned. "I won't put any faith in Microsoft's commitment, and I'll always be looking for their sudden but inevitable betrayal."
|
||||
|
||||
### 'Watch for Greeks Bearing Gifts' ###
|
||||
|
||||
The move reeks of desperation, Google+ blogger Alessandro Ebersol suggested.
|
||||
|
||||
"They arrived too late," Ebersol said. "Java already ate the best dishes, and while .Net was a Windows/Microsoft-only thing, Java was everywhere. Good luck trying to be adopted."
|
||||
|
||||
Besides, "I would only believe it if it was GPL'ed to protect the creators of the code," he added. "A fragile MIT license can be overturned at anytime."
|
||||
|
||||
In any case, "with all the hatred the company generated towards the FLOSS community, they burned the bridge beyond repair," Ebersol concluded. "The bottom line: Timeo Danaos et dona ferentes -- Watch carefully for Greeks bearing gifts..."
|
||||
|
||||
### 'Like a Cat Loves Mice' ###
|
||||
|
||||
Microsoft loves Linux "like a cat loves mice," blogger [Robert Pogson][6] quipped. "Sure, they will play with */Linux, but they are not our friends."
|
||||
|
||||
What's happened is that the FOSS and Linux communities have defeated "all the barriers to entry that M$ placed in the way of competition since M$ first made a deal with IBM to supply an OS," Pogson said. "You bet M$ is trying desperately to 'make friends' with 'the enemy' now that their position is overrun.
|
||||
|
||||
"It's all good," he added. "M$ can still cause a lot of trouble by spending $billions foolishly or they can become a normal business and compete on price/performance. That's not 'love' -- that's accepting reality."
|
||||
|
||||
### Adapt or Die ###
|
||||
|
||||
The problem for Microsoft is that "open source development packages are starting to get good enough for developers," offered consultant and [Slashdot][7] blogger Gerhard Mack.
|
||||
|
||||
"At my last job, most of the programmers wanted Eclipse rather than Visual Studio, even though the client software was Windows-only, and I had a slowly increasing number move their development to Linux while using Windows for testing," Mack recalled.
|
||||
|
||||
"Very few people want to be locked into just one platform, so more of the mindshare is moving away from single-platform languages," he added. "Microsoft must now choose between adapting or dying."
|
||||
|
||||
### No Warm Fuzzies Here ###
|
||||
|
||||
art of what's driving the move is also that "the various cloud implementations are very heavily Linux, and even on Microsoft's own Azure cloud, Linux is a strong presence," Google+ blogger Kevin O'Brien suggested.
|
||||
|
||||
"Nadella has made it clear he is taking Microsoft in a cloud direction, so he almost has to do this to even stay in the game," O'Brien asserted.
|
||||
|
||||
That said, however, "I don't expect Microsoft to be cuddly and nice -- they will do whatever they think is in their best corporate interest," he said.
|
||||
|
||||
In fact, "it doesn't have a thing to do with Linux -- it has to do with SaaS and having a CEO that isn't a whackadoo living in the 90s," SoylentNews blogger hairyfeet told Linux Girl.
|
||||
|
||||
"Nadella is smart and realizes the value of a programming language is not patents or OS exclusivity but in services and support for the language," hairyfeet explained. "With that in mind, the more platforms the language can be used on, the better, as that adds value to the language and will give you that many more you can sell services to."
|
||||
|
||||
### The Fall of an Empire ###
|
||||
|
||||
ll in all, if anything is clear, it's that "Micro$oft's empire is tumbling down," said Google+ blogger Gonzalo Velasco C.
|
||||
|
||||
"I don't know or care about why they are lying and saying they love Linux," he added. "I just hope the GNU/Linux community is smarter than recently (cough, Systemd, cough) and refuses Micro$oft .Net and other infections. GNU/Linux must use only FLOSS tools."
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxinsider.com/story/When-Microsoft-Went-A-Courting-81374.html
|
||||
|
||||
作者:[Katherine Noyes][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://twitter.com/noyesk
|
||||
[1]:http://www.linuxinsider.com/perl/story/35697.html
|
||||
[2]:http://www.theregister.co.uk/2014/10/20/microsoft_cloud_event/
|
||||
[3]:http://ledgersmbdev.blogspot.com/
|
||||
[4]:http://www.ledgersmb.org/
|
||||
[5]:http://linuxrants.com/
|
||||
[6]:http://mrpogson.com/
|
||||
[7]:http://slashdot.org/
|
@ -0,0 +1,238 @@
|
||||
10 SCP Commands to Transfer Files/Folders in Linux
|
||||
================================================================================
|
||||
Linux administrator should be familiar with **CLI** environment. Since **GUI** mode in Linux servers is not a common to be installed. **SSH** may the most popular protocol to enable Linux administrator to manage the servers via remote in secure way. Built-in with **SSH** command there is **SCP** command. **SCP** is used to copy file(s) between servers in secure way.
|
||||
|
||||
![](http://www.tecmint.com/wp-content/uploads/2013/10/SCP-Commands.png)
|
||||
|
||||
The below command will read as “**copy source_file_name**” into “**destination_folder**” at “**destination_host**” using “**username account**”.
|
||||
|
||||
#### Basic syntax of SCP ####
|
||||
|
||||
scp source_file_name username@destination_host:destination_folder
|
||||
|
||||
There are much parameters in **SCP** command that you can use. Here are the parameters that may useful on daily basis usage.
|
||||
|
||||
### Provide the detail information of SCP process using -v parameter ###
|
||||
|
||||
Basic **SCP** command without parameter will copy the files in background. User will see nothing unless the process is done or some error appears. You can use “**-v**” parameter to print debug information into the screen. It can help you debugging connection, authentication and configuration problems.
|
||||
|
||||
pungki@mint ~/Documents $ scp -v Label.pdf mrarianto@202.x.x.x:.
|
||||
|
||||
#### Sample Output ####
|
||||
|
||||
Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -t .
|
||||
OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012
|
||||
debug1: Reading configuration data /etc/ssh/ssh_config
|
||||
debug1: /etc/ssh/ssh_config line 19: Applying options for *
|
||||
debug1: Connecting to 202.x.x.x [202.x.x.x] port 22.
|
||||
debug1: Connection established.
|
||||
debug1: Host '202.x.x.x' is known and matches the RSA host key.
|
||||
debug1: Found key in /home/pungki/.ssh/known_hosts:1
|
||||
debug1: ssh_rsa_verify: signature correct
|
||||
debug1: Next authentication method: password
|
||||
mrarianto@202.x.x.x's password:
|
||||
debug1: Authentication succeeded (password).
|
||||
Authenticated to 202.x.x.x ([202.x.x.x]:22).
|
||||
Sending file modes: C0770 3760348 Label.pdf
|
||||
Sink: C0770 3760348 Label.pdf
|
||||
Label.pdf 100% 3672KB 136.0KB/s 00:27
|
||||
Transferred: sent 3766304, received 3000 bytes, in 65.2 seconds
|
||||
Bytes per second: sent 57766.4, received 46.0
|
||||
debug1: Exit status 0
|
||||
|
||||
### Provide modification times, access times, and modes from original files ###
|
||||
|
||||
The “**-p**” parameter will help you on this. An estimated time and the connection speed will appear on the screen.
|
||||
|
||||
pungki@mint ~/Documents $ scp -p Label.pdf mrarianto@202.x.x.x:.
|
||||
|
||||
#### Sample Output ####
|
||||
|
||||
mrarianto@202.x.x.x's password:
|
||||
Label.pdf 100% 3672KB 126.6KB/s 00:29
|
||||
|
||||
### Make file transfer faster using -C parameter ###
|
||||
|
||||
One of parameter that can faster your file transfer is “**-C**” parameter. The “**-C**” parameter will compress your files on the go. The unique thing is the compression is only happen in the network. When the file is arrived to the destination server, it will returning into the original size as before the compression happen.
|
||||
|
||||
Take a look of these commands. It is using a single file of **93 Mb**.
|
||||
|
||||
pungki@mint ~/Documents $ scp -pv messages.log mrarianto@202.x.x.x:.
|
||||
|
||||
#### Sample Output ####
|
||||
|
||||
Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -p -t .
|
||||
OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012
|
||||
debug1: Reading configuration data /etc/ssh/ssh_config
|
||||
debug1: /etc/ssh/ssh_config line 19: Applying options for *
|
||||
debug1: Connecting to 202.x.x.x [202.x.x.x] port 22.
|
||||
debug1: Connection established.
|
||||
debug1: identity file /home/pungki/.ssh/id_rsa type -1
|
||||
debug1: Found key in /home/pungki/.ssh/known_hosts:1
|
||||
debug1: ssh_rsa_verify: signature correct
|
||||
debug1: Trying private key: /home/pungki/.ssh/id_rsa
|
||||
debug1: Next authentication method: password
|
||||
mrarianto@202.x.x.x's password:
|
||||
debug1: Authentication succeeded (password).
|
||||
Authenticated to 202.x.x.x ([202.x.x.x]:22).
|
||||
debug1: Sending command: scp -v -p -t .
|
||||
File mtime 1323853868 atime 1380425711
|
||||
Sending file timestamps: T1323853868 0 1380425711 0
|
||||
messages.log 100% 93MB 58.6KB/s 27:05
|
||||
Transferred: sent 97614832, received 25976 bytes, in 1661.3 seconds
|
||||
Bytes per second: sent 58758.4, received 15.6
|
||||
debug1: Exit status 0
|
||||
|
||||
Copying file without “**-C**” parameter will result **1661.3** second. Yo may compare the result to the command below which using “**-C**” parameter.
|
||||
|
||||
pungki@mint ~/Documents $ scp -Cpv messages.log mrarianto@202.x.x.x:.
|
||||
|
||||
#### Sample Output ####
|
||||
|
||||
Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -p -t .
|
||||
OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012
|
||||
debug1: Reading configuration data /etc/ssh/ssh_config
|
||||
debug1: /etc/ssh/ssh_config line 19: Applying options for *
|
||||
debug1: Connecting to 202.x.x.x [202.x.x.x] port 22.
|
||||
debug1: Connection established.
|
||||
debug1: identity file /home/pungki/.ssh/id_rsa type -1
|
||||
debug1: Host '202.x.x.x' is known and matches the RSA host key.
|
||||
debug1: Found key in /home/pungki/.ssh/known_hosts:1
|
||||
debug1: ssh_rsa_verify: signature correct
|
||||
debug1: Next authentication method: publickey
|
||||
debug1: Trying private key: /home/pungki/.ssh/id_rsa
|
||||
debug1: Next authentication method: password
|
||||
mrarianto@202.x.x.x's password:
|
||||
debug1: Enabling compression at level 6.
|
||||
debug1: Authentication succeeded (password).
|
||||
Authenticated to 202.x.x.x ([202.x.x.x]:22).
|
||||
debug1: channel 0: new [client-session]
|
||||
debug1: Sending command: scp -v -p -t .
|
||||
File mtime 1323853868 atime 1380428748
|
||||
Sending file timestamps: T1323853868 0 1380428748 0
|
||||
Sink: T1323853868 0 1380428748 0
|
||||
Sending file modes: C0600 97517300 messages.log
|
||||
messages.log 100% 93MB 602.7KB/s 02:38
|
||||
Transferred: sent 8905840, received 15768 bytes, in 162.5 seconds
|
||||
Bytes per second: sent 54813.9, received 97.0
|
||||
debug1: Exit status 0
|
||||
debug1: compress outgoing: raw data 97571111, compressed 8806191, factor 0.09
|
||||
debug1: compress incoming: raw data 7885, compressed 3821, factor 0.48
|
||||
|
||||
As you can see, when you are using compression, transfer process is done in **162.5** second. It is **10** times faster than not using “**-C**” parameter. If you are copying a lot files across the network, “**-C**” parameter would help you to decrease the total time you need.
|
||||
|
||||
The thing that we should notice that compression method will not work on any files. When the source file is already compressed, you will not find any improvement there. Files such as **.zip**, **.rar**, **pictures**, and **.iso** files will not affected by “**-C**” parameter.
|
||||
|
||||
### Select another cipher to encrypt files ###
|
||||
|
||||
By default **SCP** using “**AES-128**” to encrypt files. If you want to change to another cipher to encrypt it, you can use “**-c**” parameter. Take a look of this command.
|
||||
|
||||
pungki@mint ~/Documents $ scp -c 3des Label.pdf mrarianto@202.x.x.x:.
|
||||
|
||||
mrarianto@202.x.x.x's password:
|
||||
Label.pdf 100% 3672KB 282.5KB/s 00:13
|
||||
|
||||
Above command tell **SCP** to use **3des algorithm** to encrypt file. Please be careful that this parameter using “**-c**” not “**-C**“.
|
||||
|
||||
### Limiting bandwidth usage ###
|
||||
|
||||
Another parameter that may useful is “**-l**” parameter. The “**-l**” parameter will limit the bandwidth to use. It will be useful if you do an automation script to copy a lot of file, but you don’t want the bandwidth is drained by the **SCP** process.
|
||||
|
||||
pungki@mint ~/Documents $ scp -l 400 Label.pdf mrarianto@202.x.x.x:.
|
||||
|
||||
mrarianto@202.x.x.x's password:
|
||||
Label.pdf 100% 3672KB 50.3KB/s 01:13
|
||||
|
||||
The **400** value behind “**-l**” parameter is mean that we limit the bandwidth for **SCP** process only **50 KB/sec**. One thing to remember that bandwidth is specified in **Kilobits/sec** (**kbps**). It is mean that **8 bits** equal with **1 byte**.
|
||||
|
||||
While **SCP** counts in **Kilobyte/sec** (**KB/s**). So if you want to limit your bandwidth for **SCP** maximum only **50 KB/s**, you need to set it into **50 x 8 = 400**.
|
||||
|
||||
### Specify specific port to use with SCP ###
|
||||
|
||||
Usually **SCP** is using port **22** as a default port. But for security reason, you may change the port into another port. For example, we are using port **2249**. Then the command should be like this.
|
||||
|
||||
pungki@mint ~/Documents $ scp -P 2249 Label.pdf mrarianto@202.x.x.x:.
|
||||
|
||||
mrarianto@202.x.x.x's password:
|
||||
Label.pdf 100% 3672KB 262.3KB/s 00:14
|
||||
|
||||
Make sure that it use capital “**P**” not “**p**“, since “**p**” is already used for preserved times and modes.
|
||||
|
||||
### Copy files inside directory recursively ###
|
||||
|
||||
Sometimes we need to copy directory and all **files** / **directories** inside it. It will be better if we can do it in **1** command. **SCP** support that scenario using “**-r**” parameter.
|
||||
|
||||
pungki@mint ~/Documents $ scp -r documents mrarianto@202.x.x.x:.
|
||||
|
||||
mrarianto@202.x.x.x's password:
|
||||
Label.pdf 100% 3672KB 282.5KB/s 00:13
|
||||
scp.txt 100% 10KB 9.8KB/s 00:00
|
||||
|
||||
When the copy process is done, at the destination server you will found a directory named “**documents**” with all it’s files. The folder “**documents**” is automatically created.
|
||||
|
||||
### Disable progress meter and warning / diagnostic message ###
|
||||
|
||||
If you choose not to see progress meter and warning / diagnostic messages from SCP, you may disable it using “**-q**” parameter. Here’s the example.
|
||||
|
||||
pungki@mint ~/Documents $ scp -q Label.pdf mrarianto@202.x.x.x:.
|
||||
|
||||
mrarianto@202.x.x.x's password:
|
||||
pungki@mint ~/Documents $
|
||||
|
||||
As you can see, after the you enter the password, there is no any information about SCP process. After the process is complete, you will be see a prompt again.
|
||||
|
||||
### Copy files using SCP through Proxy ###
|
||||
|
||||
Proxy server is usually used in office environment. Natively, SCP is not proxy configured. When your environment using proxy, you have to “tell” SCP to communicate with the proxy.
|
||||
|
||||
Here’s the scenario. The proxy address is **10.0.96.6** and the proxy port is **8080**. The proxy also implemented user authentication. First, you need to create “**~/.ssh/config**” file. Second you put this command inside it.
|
||||
|
||||
ProxyCommand /usr/bin/corkscrew 10.0.96.6 8080 %h %p ~/.ssh/proxyauth
|
||||
|
||||
Then you need to create file “**~/.ssh/proxyauth**” which contain.
|
||||
|
||||
myusername:mypassword
|
||||
|
||||
After that you can do SCP transparently as usual.
|
||||
|
||||
Please notice that corkscrew is might not installed yet on your system. On my Linux Mint, I need to install it first, using standard Linux Mint installation procedure.
|
||||
|
||||
$ apt-get install corkscrew
|
||||
|
||||
For other yum based systems, users can install corkscrew using the following yum command.
|
||||
|
||||
# yum install corkscrew
|
||||
|
||||
Another thing that since “**~/.ssh/proxyauth**” file contain your “**username**” and “**password**” in clear-text format, please make sure that the file can be accessed by you only.
|
||||
|
||||
### Select different ssh_config file ###
|
||||
|
||||
For mobile user who often switch between company network and public network, it will be suffer to always change settings in SCP. It is better if we can put a different **ssh_config** file to match our needs.
|
||||
|
||||
#### Here’s a sample scenario ####
|
||||
|
||||
Proxy is used in company network but not in public network and you are regularly switch network.
|
||||
|
||||
pungki@mint ~/Documents $ scp -F /home/pungki/proxy_ssh_config Label.pdf
|
||||
|
||||
mrarianto@202.x.x.x:.
|
||||
mrarianto@202.x.x.x's password:
|
||||
Label.pdf 100% 3672KB 282.5KB/s 00:13
|
||||
|
||||
By default “**ssh_config**” file per user will be placed in “**~/.ssh/config**“. Creating a specific “**ssh_config**” file with proxy compatible, will make you easier to switch between networks.
|
||||
|
||||
When you are on company network, you can use “**-F**” parameter. When you are on public network, you can skip “**-F**” parameter.
|
||||
|
||||
That’s all about **SCP**. You can see **man pages** of **SCP** for more detail. Please feel free to leave comments and suggestions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/scp-commands-examples/
|
||||
|
||||
作者:[Pungki Arianto][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/pungkiarianto/
|
@ -0,0 +1,61 @@
|
||||
How To Make Raspberry Pi Boot In To GUI By Default
|
||||
================================================================================
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/raspberry_pi_gui.jpg)
|
||||
|
||||
It’s been some times since I bought Raspberry Pi but honestly, I hardly did anything with it. Since my Dell Ultrabook is in Dell service center (for weeks now), I started using Raspberry Pi once again as an alternative.
|
||||
|
||||
I have previously written about [how to install Raspbian OS on a SD card in Ubuntu][1]. I did the same once again and installed Raspberry Pi once again. Only thing which I missed at the first run was to set up the GUI. And thus when I booted in Raspberry Pi again, I landed in command line directly. So how to you run Raspbian GUI then?
|
||||
|
||||
### Set up Raspbian GUI boot ###
|
||||
|
||||
When you install Raspbian for the first time, it indeed present several option to configure for the first use. But since I did not pay attention in a hurry, I just tabbed finish on that screen. If you faced the same situation and end up with just command line in Raspbian OS, no need to despair, it is very easy to set up Raspberry Pi to boot in GUI by default. Let’s see how to do it.
|
||||
|
||||
### Step 1: ###
|
||||
|
||||
When you are in the command line, log in with default user password (if you did not change it). Default user for Raspbian OS is pi and the default password should be raspberry.
|
||||
|
||||
#### Step 2: ####
|
||||
|
||||
When you are logged in, run the following command:
|
||||
|
||||
sudo raspi-config
|
||||
|
||||
This command will open up the Raspberry Pi configuration, the same which we saw in the first boot.
|
||||
|
||||
#### Step 3: ####
|
||||
|
||||
In this configuration screen, look for the option of **Enable Boot to Desktop/Scratch**. Select it using a combination of arrow, tab and/or enter keys (I forgot which ones are used).
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup.jpg)
|
||||
|
||||
#### Step 4: ####
|
||||
|
||||
In the next screen, choose **Desktop Login as user ‘Pi’ at the graphical desktop.
|
||||
**
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup_1.jpg)
|
||||
|
||||
#### Step 5: ####
|
||||
|
||||
You’ll be asked to reboot afterwards.
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/Raspbian_Gui_setup_2.jpg)
|
||||
|
||||
On the next boot, you will be logged in to LXDE desktop environment. And you can enjoy the GUI experience with Raspberry Pi.
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/11/raspbian-welcome-screen-gui.jpeg)
|
||||
|
||||
I hope this tutorial helped you to set up your Raspberry Pi to boot in GUI by default. Feel free to drop your questions and suggestions in the comment box.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/raspberry-pi-gui-boot/
|
||||
|
||||
作者:[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/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/
|
@ -0,0 +1,226 @@
|
||||
Smartctl – Monitoring & Analysis tool for Hard drive
|
||||
================================================================================
|
||||
**Smartctl** (Self-Monitoring, Analysis and Reporting Technology) is a command line utility or a tool in UNIX like operating system that perform SMART tasks such as printing the SMART **self-test** and **error logs**, enabling and disabling SMART **automatic testing**, and initiating device self-tests.
|
||||
|
||||
Smartctl is useful on physical Linux servers where smart disks can be checked for errors and extract info regarding the disks that are used behind the **Hardware RAID**.
|
||||
|
||||
In this post we will discuss some practical examples of smartctl command, Use below steps to install smartctl , if it is not installed on your linux box.
|
||||
|
||||
### Installation of Smartcl in Ubuntu ###
|
||||
|
||||
$ sudo apt-get install smartmontools
|
||||
|
||||
### Installation of Smartcl in Redhat / CentOS ###
|
||||
|
||||
# yum install smartmontools
|
||||
|
||||
**Start the Smartctl Service**
|
||||
|
||||
**For Ubuntu**
|
||||
|
||||
$ sudo /etc/init.d/smartmontools start
|
||||
|
||||
**For CentOS & RHEL**
|
||||
|
||||
# service smartd start ; chkconfig smartd on
|
||||
|
||||
**Example:1 Check Whether Smart Capability is enabled or not for the disk**
|
||||
|
||||
root@linuxtechi:~# smartctl -i /dev/sdb
|
||||
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
|
||||
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
|
||||
|
||||
=== START OF INFORMATION SECTION ===
|
||||
Model Family: Seagate Momentus 5400.6
|
||||
Device Model: ST9320325AS
|
||||
Serial Number: 5VD2V59T
|
||||
LU WWN Device Id: 5 000c50 020a37ec4
|
||||
Firmware Version: 0002BSM1
|
||||
User Capacity: 320,072,933,376 bytes [320 GB]
|
||||
Sector Size: 512 bytes logical/physical
|
||||
Rotation Rate: 5400 rpm
|
||||
Device is: In smartctl database [for details use: -P show]
|
||||
ATA Version is: ATA8-ACS T13/1699-D revision 4
|
||||
SATA Version is: SATA 2.6, 1.5 Gb/s
|
||||
Local Time is: Sun Nov 16 12:32:09 2014 IST
|
||||
SMART support is: Available - device has SMART capability.
|
||||
SMART support is: Enabled
|
||||
|
||||
Where ‘/dev/sdb’ is your hard disk. Last Two lines in above output shows that SMART capability is enable for the device.
|
||||
|
||||
**Example:2 Enable Smart Capability for the disk**
|
||||
|
||||
root@linuxtechi:~# smartctl -s on /dev/sdb
|
||||
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
|
||||
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
|
||||
|
||||
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
|
||||
SMART Enabled.
|
||||
|
||||
**Example:3 Disable Smart Capability for the disk**
|
||||
|
||||
root@linuxtechi:~# smartctl -s off /dev/sdb
|
||||
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
|
||||
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
|
||||
|
||||
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
|
||||
SMART Disabled. Use option -s with argument 'on' to enable it.
|
||||
|
||||
**Example:4 Display Detailed Smart info for the disk**
|
||||
|
||||
root@linuxtechi:~# smartctl -a /dev/sdb // For IDE drive
|
||||
root@linuxtechi:~# smartctl -a -d ata /dev/sdb // For SATA drive
|
||||
|
||||
**Example:5 Display Overall health of the Disk**
|
||||
|
||||
root@linuxtechi:~# smartctl -H /dev/sdb
|
||||
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
|
||||
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
|
||||
|
||||
=== START OF READ SMART DATA SECTION ===
|
||||
SMART overall-health self-assessment test result: PASSED
|
||||
Warning: This result is based on an Attribute check.
|
||||
Please note the following marginal Attributes:
|
||||
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
|
||||
190 Airflow_Temperature_Cel 0x0022 067 045 045 Old_age Always In_the_past 33 (Min/Max 25/33)
|
||||
|
||||
**Example:6 Test Hard drive using long & short option.**
|
||||
|
||||
Long Test
|
||||
|
||||
root@linuxtechi:~# smartctl --test=long /dev/sdb
|
||||
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
|
||||
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
|
||||
|
||||
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
|
||||
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
|
||||
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
|
||||
Testing has begun.
|
||||
Please wait 102 minutes for test to complete.
|
||||
Test will complete after Sun Nov 16 14:29:43 2014
|
||||
|
||||
Use smartctl -X to abort test.
|
||||
|
||||
OR We can redirect test output to a log file , as shown below
|
||||
|
||||
root@linuxtechi:~# smartctl --test=long /dev/sdb > /var/log/long.text
|
||||
|
||||
**Short Test**
|
||||
|
||||
root@linuxtechi:~# smartctl --test=short /dev/sdb
|
||||
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
|
||||
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
|
||||
|
||||
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
|
||||
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
|
||||
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
|
||||
Testing has begun.
|
||||
Please wait 1 minutes for test to complete.
|
||||
Test will complete after Sun Nov 16 12:51:45 2014
|
||||
|
||||
Use smartctl -X to abort test.
|
||||
|
||||
OR
|
||||
|
||||
root@linuxtechi:~# smartctl --test=short /dev/sdb > /var/log/short.text
|
||||
|
||||
**Note** : Short test will take maximum 2 minutes whereas in long test there is no time restriction because it read & verify every segment of the entire disk.
|
||||
|
||||
**Example:7 To View Drive’s Self Test result **
|
||||
|
||||
root@linuxtechi:~# smartctl -l selftest /dev/sdb
|
||||
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
|
||||
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
|
||||
|
||||
=== START OF READ SMART DATA SECTION ===
|
||||
SMART Self-test log structure revision number 1
|
||||
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
|
||||
# 1 Short offline Completed: read failure 90% 492 210841222
|
||||
# 2 Extended offline Completed: read failure 90% 492 210841222
|
||||
|
||||
**Example:8 Calculate Estimate time to perform test**
|
||||
|
||||
root@linuxtechi:~# smartctl -c /dev/sdb
|
||||
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
|
||||
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
|
||||
|
||||
=== START OF READ SMART DATA SECTION ===
|
||||
General SMART Values:
|
||||
Offline data collection status: (0x00) Offline data collection activity
|
||||
was never started.
|
||||
Auto Offline Data Collection: Disabled.
|
||||
Self-test execution status: ( 121) The previous self-test completed having
|
||||
the read element of the test failed.
|
||||
Total time to complete Offline
|
||||
data collection: ( 0) seconds.
|
||||
Offline data collection
|
||||
capabilities: (0x73) SMART execute Offline immediate.
|
||||
Auto Offline data collection on/off support.
|
||||
Suspend Offline collection upon new
|
||||
command.
|
||||
No Offline surface scan supported.
|
||||
Self-test supported.
|
||||
Conveyance Self-test supported.
|
||||
Selective Self-test supported.
|
||||
SMART capabilities: (0x0003) Saves SMART data before entering
|
||||
power-saving mode.
|
||||
Supports SMART auto save timer.
|
||||
Error logging capability: (0x01) Error logging supported.
|
||||
General Purpose Logging supported.
|
||||
Short self-test routine
|
||||
recommended polling time: ( 1) minutes.
|
||||
Extended self-test routine
|
||||
recommended polling time: ( 102) minutes.
|
||||
Conveyance self-test routine
|
||||
recommended polling time: ( 2) minutes.
|
||||
SCT capabilities: (0x103b) SCT Status supported.
|
||||
SCT Error Recovery Control supported.
|
||||
SCT Feature Control supported.
|
||||
SCT Data Table supported.
|
||||
|
||||
**Example:9 Display Error logs of the disk **
|
||||
|
||||
root@linuxtechi:~# smartctl -l error /dev/sdb
|
||||
|
||||
Sample Output
|
||||
|
||||
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build)
|
||||
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
|
||||
|
||||
=== START OF READ SMART DATA SECTION ===
|
||||
SMART Error Log Version: 1
|
||||
ATA Error Count: 5
|
||||
CR = Command Register [HEX]
|
||||
FR = Features Register [HEX]
|
||||
SC = Sector Count Register [HEX]
|
||||
SN = Sector Number Register [HEX]
|
||||
CL = Cylinder Low Register [HEX]
|
||||
CH = Cylinder High Register [HEX]
|
||||
DH = Device/Head Register [HEX]
|
||||
DC = Device Command Register [HEX]
|
||||
ER = Error register [HEX]
|
||||
ST = Status register [HEX]
|
||||
Powered_Up_Time is measured from power on, and printed as
|
||||
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
|
||||
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
|
||||
|
||||
Commands leading to the command that caused the error were:
|
||||
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
|
||||
-- -- -- -- -- -- -- -- ---------------- --------------------
|
||||
25 da 08 e7 e5 a5 4c 00 00:30:44.515 READ DMA EXT
|
||||
25 da 08 df e5 a5 4c 00 00:30:44.514 READ DMA EXT
|
||||
25 da 80 5f e5 a5 4c 00 00:30:44.502 READ DMA EXT
|
||||
25 da f0 5f e6 a5 4c 00 00:30:44.496 READ DMA EXT
|
||||
25 da 10 4f e6 a5 4c 00 00:30:44.383 READ DMA EXT
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxtechi.com/smartctl-monitoring-analysis-tool-hard-drive/
|
||||
|
||||
作者:[Pradeep 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.linuxtechi.com/author/pradeep/
|
Loading…
Reference in New Issue
Block a user