mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-16 22:42:21 +08:00
Merge branch 'master' of https://github.com/LCTT/TranslateProject
This commit is contained in:
commit
61efb3152d
@ -1,36 +0,0 @@
|
||||
zpl1025
|
||||
Embedded tech and use of Linux at the 2014 GPU Technology Conference
|
||||
================================================================================
|
||||
![Image by opensource.com](http://opensource.com/sites/default/files/imagecache/image-full-size/images/life-uploads/gputechcon2.jpg)
|
||||
|
||||
This year I attended my first [GPU Technology Conference][1] in San Jose, California (it took place the week after the [Game Developers Conference][2]). Hosted by NVIDIA, the event featured a range of talks from a large array of market segments including automotive, motion picture, gaming, scientific, cloud, system integrators, and startups. The schedule was a mixture of three main keynotes, 500 technical sessions, hands-on programming labs, demos, and an expo floor with a large number of vendors showing their latest work.
|
||||
|
||||
![](http://opensource.com/sites/default/files/resize/images/life-uploads/gputechconf1-520x385.jpg)
|
||||
|
||||
The first keynote took place on the second day, and was delivered by Jen-Hsun Huang, NVIDIA CEO. His talk featured announcements of new architectures such as [Pascal][3] that will power the next generation of GPGPU products from the company, to the [Jetson TK1][4] which is billed as the world's first embedded supercomputer. While Pascal will be used in the next generation of supercomputers and workstations, Jetson is targeted at the embedded market and both make extensive use of Linux. The keynote featured an Audi self-driven car appearing on stage powered by a Jetson-based architecture, and it ended in the announcement that all attendees would receive an Android powered NVIDIA shield.
|
||||
|
||||
![](http://opensource.com/sites/default/files/resize/images/life-uploads/jetson-350x466.jpg)
|
||||
|
||||
The second keynote featured a live demo of the real-time rendering work done at Pixar, showing how the animators have benefited from the latest developments in GPU technology to more effectively gain feedback before final renders. The final keynote was delivered by Dr. Adam Gazzaley, a neuroscientist at the University of California at San Francisco who is working on the use of video games for cognitive enhancement. This featured a live demo with virtual reality using the Occulus Rift, and real-time electrical measurement/feedback into the game.
|
||||
|
||||
![](http://opensource.com/sites/default/files/resize/images/life-uploads/pixartech2-520x390.jpg)
|
||||
|
||||
One of the major reasons I attended was to learn more about the latest development in visualization, and there were a good number of sessions that looked at this along with the synergy of GPGPU computation and real-time feedback from visualization. More and more supercomputers are now making use of GPGPU accelerators, such as Titan at Oak Ridge National Lab. A large number of sessions were delivered by NVIDIA engineers and developers, but there were also a number of sessions delivered by scientists working on real problems (largely focused on GPGPU rather than rendering/visualization). There was an extensive poster session, showcasing applications across a broad range of areas with the opportunity to talk to the developers. Many of the projects featured were open source and made extensive use of libraries familiar to many of us.
|
||||
|
||||
It is clear that OpenGL is alive and well, with many exciting developments in this area. Interestingly, many of these are being fuelled by growing interest from the gaming industry as they port to new Linux-based platforms such as [SteamOS][5]. Live demos were given on the Jetson in the future of OpenGL session, and the [Approaching Zero Driver Overhead][6] talk from the preceding Game Developers Conference was referenced quite heavily. Several enhancements to the binary driver were mentioned in reference to better supporting scene graphs and real-time ray-tracing using nVidia's Optix platform was showcased and ultimately featured in one of the awards for the work on the [HIV capsid as a showcase][7] of what GPU technology can do to help drive forward progress in scientific research.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://opensource.com/life/14/4/gpu-technology-conference-2014
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.gputechconf.com/
|
||||
[2]:http://www.gdconf.com/
|
||||
[3]:http://blogs.nvidia.com/blog/2014/03/25/gpu-roadmap-pascal/
|
||||
[4]:http://www.nvidia.com/object/jetson-tk1-embedded-dev-kit.html
|
||||
[5]:http://steamcommunity.com/linux
|
||||
[6]:http://www.slideshare.net/CassEveritt/approaching-zero-driver-overhead
|
||||
[7]:http://blogs.nvidia.com/blog/2014/03/27/researchers-win-third-annual-cuda-achievement-award-three-new-cuda-fellows-named/
|
@ -0,0 +1,42 @@
|
||||
Next-Gen Linux Desktop LXQt Makes First Public Release
|
||||
================================================================================
|
||||
![LXQt with KWin. Other window managers can be used.](http://www.omgubuntu.co.uk/wp-content/uploads/2014/05/lxqt.jpg)
|
||||
|
||||
**The first public release of LXQt, the next generation of popular lightweight Linux desktop environment LXDE, has been made available to download.**
|
||||
|
||||
It arrives [almost a year][1] after the teams behind the LXDE Qt initiative and Razor-qt desktop projects decided to merge. By pooling resources to focus on a single desktop environment, instead of two, the team say they hope to “offer the best possible experience while reusing as much code as possible.”
|
||||
|
||||
Ten months on and a number of core improvements have been made, both in the way the desktop works and in the feature set it offers. Today’s beta release, intended for early testers and developers, is already said to be ‘stable and useable’.
|
||||
|
||||
### The Beginning of Something Beautiful ###
|
||||
|
||||
The unified development team behind the project are continuing to focus on offering a lightweight and user-friendly alternative to the heavier and increasingly complex shells. LXQt will remain well suited to lower specced computers using a leaner, faster and modular codebase than that currently offered by the GTK-based LXDE.
|
||||
|
||||
Several significant changes have bridged the previous formal release of Razor-qt (0.5.2) and today’s debut, including a Qt port of the PCManFM file manager, improvements to system settings, new modular components and on-going progress in supporting both Qt5 and the Wayland display protocol.
|
||||
|
||||
Development of the GTK version of the shell will, the team say, continue for the foreseeable future. Those running Lubuntu 14.04 LTS certainly have no need to panic, with Lubuntu devs committed to providing three years of ongoing fixes.
|
||||
|
||||
The team behind the Ubuntu spin have previously stated their intention to transition to the Qt-based desktop as early as Lubuntu 14.10. Whether this happens will be decided in the coming months.
|
||||
|
||||
#### Trying it Out ####
|
||||
|
||||
LXQt is in active development and so it is not recommended for use on any device you hold dear.
|
||||
|
||||
The [Lubuntu Daily PPA][2] plays host to the required packages for LXQt, including a meta-package to simplify installation.
|
||||
|
||||
A number of Qt dependencies will be pulled in as part of the installation process. Those wrestling with a particularly pathetic internet connection should plan accordingly.
|
||||
|
||||
Source tarballs, install details for Arch and Debian users, and links to more information can be found on the newly launched website for the project.
|
||||
|
||||
- [Visit the Official LXQt Project Website][3]
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/05/next-gen-linux-desktop-lxqt-makes-first-public-release
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://blog.lxde.org/?p=1046
|
||||
[2]:https://launchpad.net/~lubuntu-dev/+archive/lubuntu-daily
|
||||
[3]:http://lxqt.org/
|
134
sources/talk/Making Linux Feel at Home.md
Normal file
134
sources/talk/Making Linux Feel at Home.md
Normal file
@ -0,0 +1,134 @@
|
||||
Making Linux Feel at Home
|
||||
================================================================================
|
||||
**Hiring Tux is a smart move for both small and large businesses. Linux once was considered a hobbyist's operating system, but it has come a long way and now is considered enterprise class. It is considered very stable and secure. Linux can easily be customized, and there is a huge community eager to help out. Those are just some of the reasons to migrate to the Linux desktop.**
|
||||
|
||||
Migrating to a different operating system is never easy. Keeping the Windows opened or not chewing on a MacIntosh can be a frustrating and costly experience. Buying new upgraded hardware to keep up with costly new software releases is often an exercise in futility.
|
||||
|
||||
Running a Linux distribution at home or in a small office environment can be a productive endeavor that brings cost savings and increased efficiency. Adopting a Linux server system instead of playing catch-up with a Microsoft infrastructure is often a smart business move for enterprise environments.
|
||||
|
||||
However, the process of giving up a comfort zone around a familiar operating system often seems more of a challenge than it actually is. Individual users and SMBs can move into the Linux desktop in stages. The software is free, and users already have suitable hardware that can function with both platforms.
|
||||
|
||||
Many larger enterprises already run their own Linux server silos and integrate Linux desktop use where it fits more easily. The growing use of cloud-based software lets office workers use their workstations without realizing any major change occurred.
|
||||
|
||||
"Migrating to Linux is based on the use case. If you are home or are a developer, you are going to want to use all the power available in Linux. That is a no-brainer. There is no one easy way to migrate to another operating system. No one use case fits all. It is dependent on the user base," Mike Vitale, chief technology officer for [TalkPoint][1], told LinuxInsider.
|
||||
|
||||
Working with enterprise clients in SMB environments, Vitale sees a growing movement of individual users and corporate leaders taking advantage of new technologies that draw them toward Linux.
|
||||
|
||||
### Comfort Counts ###
|
||||
|
||||
One of those Linux technologies is the Chrome OS and the low-cost laptop computers now powered by the Linux-based Chrome browser OS.
|
||||
|
||||
For users already familiar with Google's Chrome browser or the open source Chromium browser project, using a Chromebook or cloud-based delivery system makes migrating to Linux an easy walk in the park.
|
||||
|
||||
"One of the issues, regardless of which OS is used, is the browser capabilities. We have found that 85 percent of the time the user is in a browser," Thomas Deng, cofounder and senior vice president of product management for [Splashtop][2], told LinuxInsider.
|
||||
|
||||
There's a growing interest in people adapting to newer technologies with quick learning curves, Deng observed. People use a variety of products. So migrating to an OS that resembles what they use on another device makes for a smoother transition.
|
||||
|
||||
### hrome Craze Caters ###
|
||||
|
||||
Mobile device users both at home and at work are becoming proficient with Linux without knowing it. They move back and forth among several operating systems. With that familiarity comes a comfort zone for open source. Using cross-platform software delivered from a cloud platform is an added migration measure.
|
||||
|
||||
"What Google is doing is really interesting with the office suite. Google is opening the door with its Chrome OS now," said Vitale.
|
||||
|
||||
A good example of opening doors while shutting Windows is how his company uses Chrome-driven tools in-house. For instance, TalkPoint uses the ChromeBox appliance.
|
||||
|
||||
"That is opening the door for multimedia teams and traditional AV users. We are seeing a lot of inroads with that technology," Vitale explained.
|
||||
|
||||
### Tablets Tackle Tradition ###
|
||||
|
||||
Another instance of Linux devices paving the way for desktop OS migration is the popularity of the Android OS. Add to this the Linux distros retooled for smartphones and tablets.
|
||||
|
||||
"As far as migrating people to Linux goes, people are getting more comfortable with the tablet interface, especially with their unhappiness over the Windows 8 interface. Everyone I know is trying to turn it back to Windows 7," said Vitale.
|
||||
|
||||
### Cloud Has Linux Clout ###
|
||||
|
||||
People expect to use their familiar productivity tools like MS Office for word processing. There is less familiarity with open source products on the Windows platform, so integrating open source before starting a move to fully implementing the Linux desktop helps, noted Deng.
|
||||
|
||||
That trend of Windows users not knowing about open source is changing with the popularity of Google Docs and the Google Chrome browser, he pointed out.
|
||||
|
||||
"What is also easing the transition to Linux is the shift to using cloud applications," Deng said. "Educating the user is the most effective way to move users into Linux. The Chromebook is becoming very widely adopted. It is an easy migration path into Linux."
|
||||
|
||||
### Tux the Mighty ###
|
||||
|
||||
Hiring Tux, the Penguin that is the Linux mascot, is a smart move for both small and large businesses. It is a mature, stable and flexible operating system that definitely can do the job, according to Shaun Seller, senior product manager at [Vision Solutions][3].
|
||||
|
||||
"For a small business, running Linux is a compelling alternative to other operating systems and may provide advantages, depending on your business needs," Seller told LinuxInsider.
|
||||
|
||||
It once was considered a hobbyist's operating system. Linux has come a long way and now is considered enterprise class. It is considered very stable and secure. Linux can easily be customized, and there is a huge community eager to help out, he said. Those are just some of the reasons to migrate to the Linux desktop.
|
||||
|
||||
### Good Business Cents ###
|
||||
|
||||
Leveraging more of the community support model can create cost savings, Seller said. Linux is available free with community support or through subscriptions that offer full technical support. Some Linux distributions also come with things like hardware and software certifications, which may be important for some work environments.
|
||||
|
||||
For example, small businesses and larger enterprises can run a distribution such as CentOS or OpenSuse completely or in combination with a subscription-based version from [Red Hat][4] or Suse. Even with a full subscription model, Linux offers a lower total cost of ownership and better return on investment than Windows or traditional Unix, explained Seller.
|
||||
|
||||
"I believe it makes sense for smaller businesses to take a close look at Linux," added Sellers. "Linux has a bright future, as open source software in general is helping drive innovation at a fast pace, with help and collaboration from the community, and companies like IBM and Red Hat."
|
||||
|
||||
### Cozy but Cautious ###
|
||||
|
||||
Operating systems can produce divided loyalties within families and workplaces. Take the case of Walker White, CTO of [BDNA][5]. He uses Linux as a desktop OS at home, but his family is not so enthusiastic about his computing passion.
|
||||
|
||||
"My family members use Mac gear. They blindly follow the marketing ploys and the feature hype without any consideration of performance and such. I am on a personal holy war at home to try slipping more allegiance towards Linux," White told LinuxInsider.
|
||||
|
||||
There are similar allegiance struggles in his company, he said, where the Linux desktop is not yet universally used -- but he is laying the foundation for a wider Linux deployment at work.
|
||||
|
||||
BDNA uses the Google applications internally quite a bit. The company is migrating more and more things to cloud-based offerings. However, that will take more support from ongoing preparations.
|
||||
|
||||
"When I switch over to applications like [OpenOffice][6], that operation has to be really seamless for it to start getting better adoption. From a pure marketing perspective, developers need to change the game a little bit. Apple is winning the hearts and minds of the young kids and the younger generations through their 30s. I see that attitude often at my company," he said.
|
||||
|
||||
### Tux Takes On Apple ###
|
||||
|
||||
Requests for new equipment are very specific to the high-end MacBook Pro, explained White. Even though the tools they mostly are using are based online, workers BDNA want the flashy, highly advertised hardware names.
|
||||
|
||||
To break that view, he has to separate function from OS and hardware. Part of that battle is to insulate the user from the operating system itself. That can happen only when the industry has productivity applications both online and offline, according to While.
|
||||
|
||||
"Even simple things like using file managers need to focus on not the OS but what that OS allows us to do within the apps that we use," he said.
|
||||
|
||||
### Making Comfy Complete ###
|
||||
|
||||
How much should an operating system control the computer user? That question is critical in migrating to Linux, said Whites.
|
||||
|
||||
Consider the growing success of the Chromebook and Android phones and tablets. Do consumers really need to know they are running Linux?
|
||||
|
||||
"I think the key to Linux migration and success of the Linux desktop in the home is tied to how much can we actually do online," White said. "Since I use Linux at home, I see the advantages."
|
||||
|
||||
Whether you start at the consumer level at home or move up to the business user in the home or in a small business setting, it's important that users be comfortable with all of the tools and features they use. That includes things like sharing and creating documents, and everything that goes along with that, he explained.
|
||||
|
||||
### Migrating Measures ###
|
||||
|
||||
As for marketing, software and hardware makers need to put less emphasis on the operating system. For example, Chromebook is gaining acceptance in much the same way as Apple sells the MacBook. Google is not so much hawking a Linux OS as it is selling an appliance, White reasoned.
|
||||
|
||||
"What developers really need to do is change the focus, so users get comfortable with Linux in their homes without dwelling on using a non-Windows or non-Mac operating system. Whatever you use has to be able to do the things you want it to do. Something like Chromebook does that with Linux under the covers," he pointed out.
|
||||
|
||||
Computer makers must first start to break that mold of "it is Windows" or "it is a Mac." Until that happens, migrating to Linux will be a steep climb, White concluded.
|
||||
|
||||
"It is not about branding the OS," he said. "It is about the capabilities of the devices the OS runs."
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linuxinsider.com/story/80415.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.talkpointcommunications.com/
|
||||
[2]:http://www.splashtop.com/
|
||||
[3]:http://www.visionsolutions.com/
|
||||
[4]:http://www.redhat.com/
|
||||
[5]:http://www.bdna.com/
|
||||
[6]:http://www.openoffice.org/
|
||||
[7]:
|
||||
[8]:
|
||||
[9]:
|
||||
[10]:
|
||||
[11]:
|
||||
[12]:
|
||||
[13]:
|
||||
[14]:
|
||||
[15]:
|
||||
[16]:
|
||||
[17]:
|
||||
[18]:
|
||||
[19]:
|
||||
[20]:
|
@ -1,3 +1,4 @@
|
||||
linuhap翻译中
|
||||
Ubuntu Fixes Security Flaw in 14.04 LTS Lock Screen
|
||||
================================================================================
|
||||
![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/10/security-key.jpg)
|
||||
|
@ -1,40 +0,0 @@
|
||||
Fix Unity Freezes After Login In Ubuntu 14.04 [Quick Tip]
|
||||
================================================================================
|
||||
If you upgraded Ubuntu 13.10 to Ubuntu 14.04, you might end up with **Unity freezing at login time**. You boot in to Ubuntu 14.04, enter your credential and the system just hangs up, freezes. If you are lucky, you might see mouse cursor, background wallpaper but nothing else. **No Unity launcher, no top panel** etc. Basically you will have Ubuntu in an unusable state.
|
||||
|
||||
This problem of missing Unity launcher, panel and system freeze can be solved by re-installing Unity. Let’s see how to do that:
|
||||
|
||||
### Reinstall Unity in Ubuntu 14.04 to fix system freeze issue ###
|
||||
|
||||
Well, since you are stuck with a frozen system, use **Ctrl+Alt+F2** key. This will take you to command line interface (instead of the default graphical user interface). You will be asked to enter your credentials. After you enter your username and password, use the following commands one by one to reinstall Unity desktop.
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install –reinstall ubuntu-desktop
|
||||
sudo apt-get install unity
|
||||
sudo shutdown -r now
|
||||
|
||||
The last command will reboot your system. After the reboot, you should have Unity working as normal.
|
||||
|
||||
### Fixing Unity freeze issue with Nvidia graphics: ###
|
||||
|
||||
I don’t have experience with Nvidia graphics but I found some people mentioning additional steps for system with Nvidia graphics card. While the above trick worked for my system, I cannot verify the one below. People with Nvidia graphics, please confirm that the steps below work for your system:
|
||||
|
||||
Press Ctrl+Alt+F2 to use command line. And after entering username and password, use the following commands one by one:
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install –reinstall ubuntu-desktop
|
||||
sudo apt-get install unity
|
||||
sudo apt-get remove –purge nvidia*
|
||||
sudo shutdown -r now
|
||||
|
||||
Once you have Unity back to normal at next reboot, just reinstall the Nvidia drivers (you had just removed them).
|
||||
|
||||
I hope these quick tips help you to recover your Ubuntu 14.04 from a frozen Unity to a working Unity. Any questions or suggestions are always welcomed.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/fix-unity-freezes-after-login-ubuntu-14-04/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,44 @@
|
||||
How To Create A Live USB Of Ubuntu 14.04 In Windows 7 & 8
|
||||
================================================================================
|
||||
First step of installing Ubuntu is to create a live USB or disk. If you are using Windows XP, 7, 8 or 8.1, you can use Universal USB Installer to create a live USB. It’s my favorite and extremely easy to use. Let’s see how to easily make a live USB of Ubuntu i Windows 8.
|
||||
|
||||
### Steps to create a live USB in Windows: ###
|
||||
|
||||
#### Step 1: Download Ubuntu ISO ####
|
||||
|
||||
Go to [Ubuntu][1] and download the ISO image of your preferred Ubuntu version.
|
||||
|
||||
#### Step 2: Download Universal USB Installer ####
|
||||
|
||||
Once you have downloaded the ISO of Ubuntu 14.04, go to [this page][2] and download the latest version of Universal USB Installer.
|
||||
|
||||
#### Step 3: Creating the live USB ####
|
||||
|
||||
Plugin the USB drive in the computer and run Universal USB Installer. Choose Ubuntu in type of Linux, browse to the location of downloaded ISO image and then select USB drive. Don’t forget to check the format option here.
|
||||
|
||||
![](http://itsfoss.com/wp-content/uploads/2014/05/Create_Live_USB_Ubuntu_1404.png)
|
||||
|
||||
It will present you with obvious warnings, click Yes.
|
||||
|
||||
![](http://itsfoss.com/wp-content/uploads/2014/05/Create_Live_USB_Ubuntu_1404_1.png)
|
||||
|
||||
Wait for sometime for the process to complete. You can push it to background, if you like.
|
||||
|
||||
![](http://itsfoss.com/wp-content/uploads/2014/05/Create_Live_USB_Ubuntu_1404_2.png)
|
||||
|
||||
That said, live USB should be created in few minutes.
|
||||
|
||||
![](http://itsfoss.com/wp-content/uploads/2014/05/Create_Live_USB_Ubuntu_1404_3.png)
|
||||
|
||||
Once the live USB is created, you can proceed with installation of Ubuntu 14.04. I hope this tutorial helped you to easily create live USB of Ubuntu in Windows.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/create-live-usb-of-ubuntu-in-windows/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.ubuntu.com/download/desktop/
|
||||
[2]:http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
|
101
sources/tech/How to Upgrade to GNOME 3.12 in Ubuntu 14.04.md
Normal file
101
sources/tech/How to Upgrade to GNOME 3.12 in Ubuntu 14.04.md
Normal file
@ -0,0 +1,101 @@
|
||||
How to Upgrade to GNOME 3.12 in Ubuntu 14.04
|
||||
================================================================================
|
||||
![You can upgrade to GNOME 3.12 – but it’s not advised](http://www.omgubuntu.co.uk/wp-content/uploads/2014/03/Screen-Shot-2014-03-26-at-21.53.58-350x200.png)
|
||||
|
||||
**If you’ve recently installed or upgraded to Ubuntu GNOME 14.04 LTS then you will no doubt be enjoying a stable, dependable GNOME Shell experience.**
|
||||
|
||||
But I suspect that the more nerdcore users among you would rather trade in the stability that’s offered up by default for a newer, badder, and potentially much buggier experience. You want to know how to upgrade to GNOME 3.12 in Ubuntu 14.04?
|
||||
|
||||
### Well, I’m here to show you how. First though, I n ###
|
||||
|
||||
GNOME 3.12 was released in late March to much fanfare and some fantastic reviews. But despite going ‘stable’ before Ubuntu 14.04 LTS, released last month, it is not available to install from the Ubuntu 14.04 repositories — why?
|
||||
|
||||
Simply put it came too late in the development cycle to give enough time to thoroughly vet, test and ensure it was up to the standards an LTS release commands, and its users expect. Defaulting to the older 3.10 release makes sense as it benefits from having an extra cycle of thorough testing under its belt.
|
||||
|
||||
It’s for this reason that **upgrading to GNOME 3.12 is not recommended**.
|
||||
|
||||
Understood? Great, let’s move on to the fun stuff.
|
||||
|
||||
### How to Upgrade to GNOME 3.12 in Ubuntu 14.04 ###
|
||||
|
||||
#### Make sure you’re running 3.10 ####
|
||||
|
||||
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/05/gr.jpg)
|
||||
|
||||
To follow this guide correctly you need to be running the latest release of Ubuntu (14.04 LTS) or Ubuntu GNOME. If not, stop now; you must upgrade before you continue. If you don’t you can expect a whole world of hassle to follow.
|
||||
|
||||
If you’re running the regular version of Ubuntu (i.e., the one with Unity) then you should go ahead and grab GNOME 3.10 from the Ubuntu Software Centre before proceeding.
|
||||
|
||||
Click the button below to prompt installation.
|
||||
|
||||
- [Install GNOME 3.10 in Ubuntu 14.04 LTS][1]
|
||||
|
||||
#### Add the GNOME 3.12 PPA ####
|
||||
|
||||
It was originally expected that GNOME 3.12 would be made available through the standard GNOME Team PPA following the release of Trusty. Three weeks hence, that hasn’t happened. As of writing it contains a handful of minor 3.10 packages and not anything related to the newest release.
|
||||
|
||||
However, the [GNOME Team Staging PPA][2] does contain all of the various 3.12 packages one needs to upgrade. Adding this archive should, the developers behind it say, result in a desktop that ‘runs smoothly’ but that packages included within have not been deemed ‘ready for general use’.
|
||||
|
||||
Providing you’re a dab hand with the PPA Purge tool you should be okay to continue. First, let’s check for and install any outstanding distribution updates:
|
||||
|
||||
sudo apt-get update && sudo apt-get dist-upgrade
|
||||
|
||||
Install any packages waiting by hitting the enter key.
|
||||
|
||||
Once complete, or if you have no pending updates at all, you can add the GNOME 3 Team Staging PPA. To do this, open a new Terminal window and enter the following commands:
|
||||
|
||||
sudo add-apt-repository ppa:gnome3-team/gnome3-staging
|
||||
|
||||
sudo apt-get update && sudo apt-get dist-upgrade
|
||||
|
||||
You’ll be prompted to enter your password before the upgrade process can begin. Pay attention to any notices or alerts given. If all is acceptable agree to the installation by hitting the ‘y’ key.
|
||||
|
||||
#### Extras ####
|
||||
|
||||
For a true GNOME experience you may wish to grab some of the new GNOME applications, such as the [Polari IRC client, GNOME Maps and the GNOME Web browser][3]. To install these three in particular run the following command:
|
||||
|
||||
sudo apt-get install epiphany-browser gnome-maps polari -y
|
||||
|
||||
After everything has finished doing what it needs to, you’re safe to reboot!
|
||||
|
||||
sudo apt-get install epiphany-browser gnome-maps polari -y
|
||||
|
||||
After everything has finished doing what it needs to, you’re safe to reboot!
|
||||
|
||||
### After Care ###
|
||||
|
||||
#### Logging In ####
|
||||
|
||||
If you’re coming from Unity, Xfce or another desktop environment don’t forget to select the GNOME session from the login screen before logging in.
|
||||
|
||||
#### Drawbacks ####
|
||||
|
||||
![GNOME Weather & GNOME Maps in 3.12](http://www.omgubuntu.co.uk/wp-content/uploads/2014/04/gnome-aspps.jpg)
|
||||
|
||||
For me, in my lone experience, GNOME 3.12 on Ubuntu 14.04 runs pretty much fine. There do not appear to be any significant performance regressions after upgrading, though I do see the odd, infrequent visual glitch that occurs when opening the activities overlay, and the occasional disappearing drop shadow from under an app. But as bugs go these are hardly deal breakers.
|
||||
|
||||
Performance seems to be on par with GNOME 3.10; applications open with just as much pep and there are no noticeable drops in interactivity.
|
||||
|
||||
I was marginally disappointed to find that the all new GNOME Videos application has not been packaged up in this PPA. One suspects there are reasons for this (likely requiring a newer version of streamer). I also noticed that several GNOME extensions refused to work after upgrading, something else to bear in mind.
|
||||
|
||||
With the lack of testing this has received, bugs are pretty much guaranteed. If you want stability (or to keep Unity working and intact) stick with the thoroughly tested GNOME 3.10.
|
||||
|
||||
### Downgrade from GNOME 3.12 to 3.10 ###
|
||||
|
||||
But if you want shiny new features and access to the latest builds of GNOME apps then don’t be afraid to give the staging PPA a whirl. You can always ‘downgrade’ using PPA Purge if things go awry.
|
||||
|
||||
sudo apt-get install ppa-purge
|
||||
|
||||
sudo ppa-purge ppa:gnome3-team/gnome3-staging
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/05/upgrade-gnome-3-12-ubuntu-14-04
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:apt:gnome-shell
|
||||
[2]:https://launchpad.net/~gnome3-team/+archive/gnome3-staging?field.series_filter=trusty
|
||||
[3]:http://www.omgubuntu.co.uk/2014/03/top-12-features-gnome-3-12
|
@ -1,115 +0,0 @@
|
||||
[bazz2 is here]
|
||||
How to manage Linux containers with Docker on Ubuntu
|
||||
================================================================================
|
||||
While full hardware virtualization such as KVM, Xen or Hyper-V is great at running fully isolated instances of multiple operating systems on a physical host, it comes with various overheads in terms of performance, resource, and provisioning time. Depending on your use cases, full machine virtuailization may actually not be necessary.
|
||||
|
||||
An alternative lightweight virtualization approach is so-called [Linux Containers][1] (LXC), which provides operating system level virtualization. Without the overhead of running virtual machines, LXC allows you to run multiple instances of full Linux operating system within lightweight container sandbox. Containers can be very useful when you set up a reproducible development/test environment or deploy applications within secure sandboxes.
|
||||
|
||||
[Docker][2] is an open-source tool which was developed to facilitate the deployment of Linux containers. Docker is fast becoming a de-facto standard for container technologies, being embraced in major Linux distros such as [Ubuntu][3] and [Red Hat][4].
|
||||
|
||||
In this tutorial, I am going to demonstrate how to manage Linux containers with Docker on Ubuntu 14.04. Note that instructions may be slightly different for earlier versions of Ubuntu.
|
||||
|
||||
At this time, the Docker package available on Ubuntu only supports 64-bit systems. To run it on 32-bit machine, you will need to [build 32-bit version of Docker from source][5].
|
||||
|
||||
### Install Docker ###
|
||||
|
||||
Installing Docker is easy with apt-get command.
|
||||
|
||||
$ sudo apt-get install docker.io
|
||||
|
||||
To allow non-root user to run Docker, add yourself to docker group. The command below will allow the current user to run Docker without root permission.
|
||||
|
||||
$ sudo usermod -a -G docker $USER
|
||||
|
||||
Log out and then re-login to activate group membership change.
|
||||
|
||||
Next, edit the Docker configuration file to update the location of the Docker binary.
|
||||
|
||||
$ sudo vi /etc/default/docker.io
|
||||
|
||||
> DOCKER="/usr/bin/docker.io"
|
||||
|
||||
Restart Docker service.
|
||||
|
||||
$ sudo service docker.io restart
|
||||
|
||||
### Manage Docker Containers ###
|
||||
|
||||
If you want to start a new Docker container of Ubuntu operating system, first pull [Ubuntu][6] Docker image first. The command below will download Docker image over a network.
|
||||
|
||||
$ docker pull ubuntu
|
||||
|
||||
You can start a Ubuntu Docker in an interactive mode as follows. The last argument "/bin/bash" is the command that will be executed inside a container once it is launched, in this case, a simple bash shell.
|
||||
|
||||
$ docker run -i -t ubuntu /bin/bash
|
||||
|
||||
The above command will launch a Ubuntu container immediately (which is the beauty of containers!), and give you a shell prompt inside the container. At this point, you should be able to access a full Ubuntu operating system inside a sandboxed environment.
|
||||
|
||||
![](https://farm6.staticflickr.com/5515/13892198519_dfb9481af6_z.jpg)
|
||||
|
||||
To exit a Docker container, type "exit" at the prompt inside the container.
|
||||
|
||||
You can launch containers in different flavors. For example, to start a Fedora container:
|
||||
|
||||
$ docker.io run -i -t fedora /bin/bash
|
||||
|
||||
If a Fedora Docker image is not available locally, the command will automatically download the image first, and then launch a Docker.
|
||||
|
||||
![](https://farm8.staticflickr.com/7427/14079294164_0ccabde57a.jpg)
|
||||
|
||||
If you want to launch a container with a particular distro release, you can also do that. For example, to start a Ubuntu 13.04 Docker:
|
||||
|
||||
$ docker.io run -i -t ubuntu:13.04 /bin/bash
|
||||
|
||||
### Container Networking ###
|
||||
|
||||
Docker uses Linux bridge to interconnect containers with each other, and to connect them to external networks. After installing Docker, you should see docker0 Linux bridge created automatically by default. Every container you create will be connected to docker0 bridge interface.
|
||||
|
||||
![](https://farm6.staticflickr.com/5462/14078810715_513764848b_z.jpg)
|
||||
|
||||
#### Custom Linux Bridge ####
|
||||
|
||||
If you want, you can use a custom Linux bridge to interconnect containers. For that, you can create a custom bridge and configure it as follows. You can assign a separate subnet to the bridge, and have Dockers assigned IP addresses from the subnet. I am going to use 10.0.0.0/24 as a Docker subnet.
|
||||
|
||||
$ sudo apt-get install bridge-utils
|
||||
$ sudo brctl addbr br0
|
||||
$ sudo ifconfig br0 10.0.0.1 netmask 255.255.255.0
|
||||
|
||||
To make the custom bridge used by Docker, add "-b=br0" to DOCKER_OPTS variable in /etc/default/docker.io, and restart Docker service.
|
||||
|
||||
$ sudo service docker.io restart
|
||||
|
||||
At this point, any new container will be connected to br0, and its IP address will automatically be assigned from 10.0.0.0/24.
|
||||
|
||||
#### Other Customizations ####
|
||||
|
||||
There are several other ways to customize the default network settings of Docker, mostly by tweaking DOCKER_OPTS variable in /etc/default/docker.io.
|
||||
|
||||
- "-dns 8.8.8.8 -dns 8.8.4.4": specify the DNS servers used by a container.
|
||||
- "-icc=false": make containers isolated from each other.
|
||||
|
||||
### Troubleshooting ###
|
||||
|
||||
1. You encounter the following error when running docker.io command.
|
||||
|
||||
> dial unix /var/run/docker.sock: no such file or directory
|
||||
|
||||
The error may be because Docker daemon is not running. Check the status of Docker daemon, and make sure to start it first.
|
||||
|
||||
$ sudo service docker.io status
|
||||
$ sudo service docker.io start
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/05/manage-linux-containers-docker-ubuntu.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://linuxcontainers.org/
|
||||
[2]:https://www.docker.io/
|
||||
[3]:http://blog.docker.io/2014/04/docker-in-ubuntu-ubuntu-in-docker/
|
||||
[4]:http://www.redhat.com/about/news/press-archive/2014/4/red-hat-docker-expand-collaboration
|
||||
[5]:http://mwhiteley.com/linux-containers/2013/08/31/docker-on-i386.html
|
||||
[6]:http://xmodulo.com/go/ubuntubook
|
353
sources/tech/How to use LVM in Linux.md
Normal file
353
sources/tech/How to use LVM in Linux.md
Normal file
@ -0,0 +1,353 @@
|
||||
How to use LVM in Linux
|
||||
================================================================================
|
||||
Logical Volume Manager (LVM) is a versatile disk management system that can easily be used in Linux or similar operating systems. Traditional partitions are created in fixed sizes, and resizing them is a tedious process. On the other hand, LVM creates and manages "logical" volumes off of physical hard disks, and provides administrators the flexibility to extend and shrink logical volumes easily on demand without damaging stored data. Additional hard disks can be added to LVM at will, further increasing existing logical volumes. LVM does not need reboot as long as the kernel is aware of the existence of a partition.
|
||||
|
||||
LVM uses a hierarchical structure as it can be seen in the following diagram.
|
||||
|
||||
![](https://farm3.staticflickr.com/2910/14127487464_96b24a906b_z.jpg)
|
||||
|
||||
At the top, we have physical volumes. One or more physical volumes are used to create a volume group. Logical volumes are then created from these volume groups. As long as there is space available in the volume group, we can create logical volumes from the volume group. File system is created on these logical volumes, which are then mounted and accessible in the operating system.
|
||||
|
||||
### LVM Test Scenario ###
|
||||
|
||||
This tutorial will describe **how to use LVM to create and manage LVM volumes in Linux**. The tutorial will be divided into two parts. In the first part, we will create several logical volumes on one hard disk, and mount them in /lvm-mount directory. We will then resize the created volumes. In the second part, we will add additional volumes created from a second hard disk to LVM.
|
||||
|
||||
### Preparing Disk Partitions ###
|
||||
|
||||
Disk partitions are created using fdisk. We will create three partitions of 1 GB each, though identical sized partitions are not mandatory. Also, the partitions are created as type '8e' to make them compatible with LVM.
|
||||
|
||||
# fdisk /dev/sdb
|
||||
|
||||
----------
|
||||
|
||||
Command (m for help): n ## new
|
||||
Command action
|
||||
e extended
|
||||
p primary partition (1-4)
|
||||
p ## primary
|
||||
|
||||
Partition number (1-4): 1 ## partition number
|
||||
First cylinder (1-1044, default 1): ## hit enter
|
||||
Last cylinder, +cylinders or +size{K,M,G} (1-1044, default 1044): +1G ## size
|
||||
|
||||
Command (m for help): t ## change type
|
||||
Selected partition 1
|
||||
Hex code (type L to list codes): 8e ## code for LVM
|
||||
Changed system type of partition 1 to 8e (Linux LVM)
|
||||
|
||||
We repeat the same steps to create two other partitions. After the partitions are created, we should get an output similar to this:
|
||||
|
||||
# fdisk -l
|
||||
|
||||
----------
|
||||
|
||||
Device Boot Start End Blocks Id System
|
||||
/dev/sdb1 1 132 1060258+ 8e Linux LVM
|
||||
/dev/sdb2 133 264 1060290 8e Linux LVM
|
||||
/dev/sdb3 265 396 1060290 8e Linux LVM
|
||||
|
||||
### Preparing Physical Volumes ###
|
||||
|
||||
The newly created partitions are used to store physical volumes. LVM can work with different sized physical volumes.
|
||||
|
||||
# pvcreate /dev/sdb1
|
||||
# pvcreate /dev/sdb2
|
||||
# pvcreate /dev/sdb3
|
||||
|
||||
Physical volumes can be verified using the following command. The following section contains partial output. "/dev/sdb2" is a new physical volume of "1.01 GiB".
|
||||
|
||||
# pvdisplay
|
||||
|
||||
----------
|
||||
|
||||
--- NEW Physical volume ---
|
||||
PV Name /dev/sdb2
|
||||
VG Name
|
||||
PV Size 1.01 GiB
|
||||
Allocatable NO
|
||||
PE Size 0
|
||||
Total PE 0
|
||||
Free PE 0
|
||||
Allocated PE 0
|
||||
PV UUID jszvzz-ENA2-g5Pd-irhV-T9wi-ZfA3-0xo092
|
||||
|
||||
Physical volumes can be deleted using the following command.
|
||||
|
||||
# pvremove /dev/sdb1
|
||||
|
||||
### Preparing Volume Groups ###
|
||||
|
||||
The following command creates a volume group named 'volume-group1' by using the physical volumes /dev/sdb1, /dev/sdb2 and /dev/sdb3.
|
||||
|
||||
# vgcreate volume-group1 /dev/sdb1 /dev/sdb2 /dev/sdb3
|
||||
|
||||
Volume groups can be verified using the following command.
|
||||
|
||||
# vgdisplay
|
||||
|
||||
----------
|
||||
|
||||
--- Volume group ---
|
||||
VG Name volume-group1
|
||||
System ID
|
||||
Format lvm2
|
||||
Metadata Areas 3
|
||||
Metadata Sequence No 1
|
||||
VG Access read/write
|
||||
VG Status resizable
|
||||
MAX LV 0
|
||||
Cur LV 0
|
||||
Open LV 0
|
||||
Max PV 0
|
||||
Cur PV 3
|
||||
Act PV 3
|
||||
VG Size 3.02 GiB
|
||||
PE Size 4.00 MiB
|
||||
Total PE 774
|
||||
Alloc PE / Size 0 / 0
|
||||
Free PE / Size 774 / 3.02 GiB
|
||||
VG UUID bwd2pS-fkAz-lGVZ-qc7C-TaKv-fFUC-IzGNBK
|
||||
|
||||
We can view used/total size of the volume group from the output. Logical volumes take the space of the volume group. As long as there is free space available in the volume group, we can create logical volumes.
|
||||
|
||||
Volume groups can be deleted using the following command.
|
||||
|
||||
# vgremove volume-group1
|
||||
|
||||
### Creating Logical Volumes ###
|
||||
|
||||
The following command creates a logical volume named 'lv1' of size 100MB. We are using small sized partitions to reduce processing time. The logical volume will take its space from the volume group defined earlier.
|
||||
|
||||
# lvcreate -L 100M -n lv1 volume-group1
|
||||
|
||||
Logical volumes can be verified using the command lvdisplay.
|
||||
|
||||
# lvdisplay
|
||||
|
||||
----------
|
||||
|
||||
--- Logical volume ---
|
||||
LV Name /dev/volume-group1/lv1
|
||||
VG Name volume-group1
|
||||
LV UUID YNQ1aa-QVt1-hEj6-ArJX-I1Q4-y1h1-OFEtlW
|
||||
LV Write Access read/write
|
||||
LV Status available
|
||||
# open 0
|
||||
LV Size 100.00 MiB
|
||||
Current LE 25
|
||||
Segments 1
|
||||
Allocation inherit
|
||||
Read ahead sectors auto
|
||||
- currently set to 256
|
||||
Block device 253:2
|
||||
|
||||
Now that the logical volume is ready, we can format and mount the logical volume like any other ext2/3/4 partition.
|
||||
|
||||
# mkfs.ext4 /dev/volume-group1/lv1
|
||||
# mkdir /lvm-mount
|
||||
# mount /dev/volume-group1/lv1 /lvm-mount/
|
||||
|
||||
Once the logical volume is mounted, we can access it by reading/writing to the mount point /lvm-mount/. To create and mount additional logical volumes, we can repeat this process.
|
||||
|
||||
Finally, we can delete any logical volume with lvremove.
|
||||
|
||||
# umount /lvm-mount/
|
||||
# lvremove /dev/volume-group1/lv1
|
||||
|
||||
### Expanding an LVM Volume ###
|
||||
|
||||
The ability to resize a logical volume is the best part about using LVM. This section will discuss how we can expand an existing logical volume. We will be expanding the previously created logical volume 'lv1' to 200 MB.
|
||||
|
||||
Note that after resizing a logical volume, we also need to resize the file system to match. This extra step varies depending on which file system is created in the volume. In this tutorial, we created ext4 file system on 'lv1', so the instruction here focused on ext4 file system (it is compatible with ext2/3 file system as well). The sequence of the commands is important.
|
||||
|
||||
First, we unmount the volume.
|
||||
|
||||
# umount /lvm-mount/
|
||||
|
||||
Then, the size of the volume is set to be 200M.
|
||||
|
||||
# lvresize -L 200M /dev/volume-group1/lv1
|
||||
|
||||
Next, the disk is checked for errors.
|
||||
|
||||
# e2fsck -f /dev/volume-group1/lv1
|
||||
|
||||
After that, the ext4 information is updated.
|
||||
|
||||
# resize2fs /dev/volume-group1/lv1
|
||||
|
||||
The logical volume should be extended to 200 MB by now. We can verify it by checking the LV status.
|
||||
|
||||
# lvdisplay
|
||||
|
||||
----------
|
||||
|
||||
--- Logical volume ---
|
||||
LV Name /dev/volume-group1/lv1
|
||||
VG Name volume-group1
|
||||
LV UUID 9RtmMY-0RIZ-Dq40-ySjU-vmrj-f1es-7rXBwa
|
||||
LV Write Access read/write
|
||||
LV Status available
|
||||
# open 0
|
||||
LV Size 200.00 MiB
|
||||
Current LE 50
|
||||
Segments 1
|
||||
Allocation inherit
|
||||
Read ahead sectors auto
|
||||
- currently set to 256
|
||||
Block device 253:2
|
||||
|
||||
Now the logical volume can be mounted again, and be used just like any partition.
|
||||
|
||||
### Shrinking an LVM Volume ###
|
||||
|
||||
This section will cover the method of reducing the size of an LVM. The sequence of the commands is important. Again, this instruction is valid for ext2/3/4 file system.
|
||||
|
||||
Note that reducing the size of the logical volume to a value less than stored data will end in loss of data.
|
||||
|
||||
First, the volume is unmounted.
|
||||
|
||||
# umount /dev/volume-group1/lv1
|
||||
|
||||
Then, the volume is checked for errors.
|
||||
|
||||
# e2fsck -f /dev/volume-group1/lv1
|
||||
|
||||
Next, the ext4 information is updated.
|
||||
|
||||
# resize2fs /dev/volume-group1/lv1 100M
|
||||
|
||||
After that, the logical volume is reduced.
|
||||
|
||||
# lvresize -L 100M /dev/volume-group1/lv1
|
||||
|
||||
> WARNING: Reducing active logical volume to 100.00 MiB
|
||||
> THIS MAY DESTROY YOUR DATA (filesystem etc.)
|
||||
> Do you really want to reduce lv1? [y/n]: y
|
||||
> Reducing logical volume lv1 to 100.00 MiB
|
||||
> Logical volume lv1 successfully resized
|
||||
|
||||
Finally, the updated size of the logical volume is verified.
|
||||
|
||||
# lvdisplay
|
||||
|
||||
----------
|
||||
|
||||
--- Logical volume ---
|
||||
LV Name /dev/volume-group1/lv1
|
||||
VG Name volume-group1
|
||||
LV UUID 9RtmMY-0RIZ-Dq40-ySjU-vmrj-f1es-7rXBwa
|
||||
LV Write Access read/write
|
||||
LV Status available
|
||||
# open 0
|
||||
LV Size 100.00 MiB
|
||||
Current LE 25
|
||||
Segments 1
|
||||
Allocation inherit
|
||||
Read ahead sectors auto
|
||||
- currently set to 256
|
||||
Block device 253:2
|
||||
|
||||
### Expanding a Volume Group ###
|
||||
|
||||
This section will cover the method of expanding a volume group by adding a new physical volume to the volume group. Let us assume that our volume group 'volume-group1' is full, and needs to be expanded. Our current hard disk (sdb) does not have any spare partitions, and we have added another hard disk (sdc). We will see how we can expand the volume group by adding a partition from sdc.
|
||||
|
||||
To check the current state of VG.
|
||||
|
||||
# vgdisplay volume-group1
|
||||
|
||||
----------
|
||||
|
||||
--- Volume group ---
|
||||
VG Name volume-group1
|
||||
System ID
|
||||
Format lvm2
|
||||
Metadata Areas 3
|
||||
Metadata Sequence No 8
|
||||
VG Access read/write
|
||||
VG Status resizable
|
||||
MAX LV 0
|
||||
Cur LV 1
|
||||
Open LV 0
|
||||
Max PV 0
|
||||
Cur PV 3
|
||||
Act PV 3
|
||||
VG Size 3.02 GiB
|
||||
PE Size 4.00 MiB
|
||||
Total PE 774
|
||||
Alloc PE / Size 25 / 100.00 MiB
|
||||
Free PE / Size 749 / 2.93 GiB
|
||||
VG UUID bwd2pS-fkAz-lGVZ-qc7C-TaKv-fFUC-IzGNBK
|
||||
|
||||
First, we create a 2 GB partition sdc1 of type LVM (8e) as explained earlier in the tutorial.
|
||||
|
||||
# fdisk /dev/sdc
|
||||
|
||||
----------
|
||||
|
||||
Command (m for help): n
|
||||
Command action
|
||||
e extended
|
||||
p primary partition (1-4)
|
||||
p
|
||||
Partition number (1-4): 1
|
||||
First cylinder (1-1044, default 1):
|
||||
Using default value 1
|
||||
Last cylinder, +cylinders or +size{K,M,G} (1-1044, default 1044): +2G
|
||||
|
||||
Command (m for help): t
|
||||
Selected partition 1
|
||||
Hex code (type L to list codes): 8e
|
||||
Changed system type of partition 1 to 8e (Linux LVM)
|
||||
|
||||
Command (m for help): w
|
||||
The partition table has been altered!
|
||||
|
||||
Then, we create a physical volume /dev/sdc1.
|
||||
|
||||
# pvcreate /dev/sdc1
|
||||
|
||||
Now that the physical volume is ready, we can simply add it to the existing volume group 'volume-group1'.
|
||||
|
||||
# vgextend volume-group1 /dev/sdc1
|
||||
|
||||
We can verify it using vgdisplay.
|
||||
|
||||
# vgdisplay
|
||||
|
||||
----------
|
||||
|
||||
--- Volume group ---
|
||||
VG Name volume-group1
|
||||
System ID
|
||||
Format lvm2
|
||||
Metadata Areas 4
|
||||
Metadata Sequence No 9
|
||||
VG Access read/write
|
||||
VG Status resizable
|
||||
MAX LV 0
|
||||
Cur LV 1
|
||||
Open LV 0
|
||||
Max PV 0
|
||||
Cur PV 4
|
||||
Act PV 4
|
||||
VG Size 5.03 GiB
|
||||
PE Size 4.00 MiB
|
||||
Total PE 1287
|
||||
Alloc PE / Size 25 / 100.00 MiB
|
||||
Free PE / Size 1262 / 4.93 GiB
|
||||
VG UUID bwd2pS-fkAz-lGVZ-qc7C-TaKv-fFUC-IzGNBK
|
||||
|
||||
Note that although we have used a separate disk for demonstration, any disk of type '8e' can be used for expanding a volume group.
|
||||
|
||||
To sum up, LVM is a very powerful tool for creating and managing resizable partitions. In this tutorial, we have seen how dynamic partitions can be created and used using LVM. We have also seen the method of expanding/reducing the logical volumes and volume groups, and adding new hard disks to LVM.
|
||||
|
||||
Hope this helps.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/05/use-lvm-linux.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,123 @@
|
||||
Start Practising Linux ip command and Avoid the Habit of Using ifconfig
|
||||
================================================================================
|
||||
The linux **ip** command is similar to **ifconfig**, but more powerful and is intended to be a replacement for it. With ip you have the advantage of performing several network administration tasks with only one command. ifconfig is one of the deprecated command within net-tools that has not been maintained for many years. The functionalities of many commands is retained with more features under iproute2 suite.
|
||||
|
||||
![Net tools vs Iproute2](http://linoxide.com/wp-content/uploads/2014/05/Linux-Nettools-vs-Iproute2.png)
|
||||
|
||||
To install ip download the **iproute2 suite utility** [here][1], however most Linux distributions will come with the iproute2 tools pre-installed.
|
||||
|
||||
You can also use use git to download the source code:
|
||||
|
||||
$ git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/shemminger/iproute2.git
|
||||
|
||||
![iproute2 git clone](http://linoxide.com/wp-content/uploads/2014/04/iproute2-git-clone.png)
|
||||
|
||||
### Setting and Deleting an Ip Address ###
|
||||
|
||||
To set an IP address for your computer, the command ip can be used as follows:
|
||||
|
||||
$ sudo ip addr add 192.168.0.193/24 dev wlan0
|
||||
|
||||
Note that the IP address has a prefix, for example /24. This is used in classless inter-domain routing (CIDR) to show the subnet mask used. In this case the subnet mask is 255.255.255.0.
|
||||
|
||||
After you have set the IP address confirm with show, whether the the changes have taken effect.
|
||||
|
||||
$ ip addr show wlan0
|
||||
|
||||
![set ip address](http://linoxide.com/wp-content/uploads/2014/04/set-ip-address.png)
|
||||
|
||||
You can also use the same procedure to delete an IP address by just replacing add with del.
|
||||
|
||||
$ sudo ip addr del 192.168.0.193/24 dev wlan0
|
||||
|
||||
![delete ip address](http://linoxide.com/wp-content/uploads/2014/04/delete-ip-address.png)
|
||||
|
||||
### Show Routing Table Entry ###
|
||||
|
||||
The route object of ip command also helps you to see the route packets will take in your network as set in your routing table. The first entry is the default route which you can change as you prefer.
|
||||
|
||||
In this example there are several routes. These are a result of having a several devices connected through different network interface. These include WIFI, Ethernet and a point to point link.
|
||||
|
||||
$ ip route show
|
||||
|
||||
![ip route show](http://linoxide.com/wp-content/uploads/2014/04/ip-route-show.png)
|
||||
|
||||
Suppose now that you have an IP address which you need to know the route packets will take. You can use route option as follows:
|
||||
|
||||
$ ip route get 10.42.0.47
|
||||
|
||||
![ip route get](http://linoxide.com/wp-content/uploads/2014/04/ip-route-get.png)
|
||||
|
||||
### Changing The Default Route ###
|
||||
|
||||
To change the default route, the ip command can be used as follows:
|
||||
|
||||
$ sudo ip route add default via 192.168.0.196
|
||||
|
||||
![default route](http://linoxide.com/wp-content/uploads/2014/04/default-route.png)
|
||||
|
||||
### Show Network Statistics ###
|
||||
|
||||
The ip command can also be used to show the statistics of the various network interfaces. To do this you can use the ip command with the option -s and then specify the network device.
|
||||
|
||||
$ ip -s link
|
||||
|
||||
![ip statistics all interfaces](http://linoxide.com/wp-content/uploads/2014/04/ip-statistics-all-interfaces.png)
|
||||
|
||||
When you need to get information about a particular network interface, add the option **ls** followed by the name of the network interface. The option **-s** when used more than once gives you more information about that particular interface. This can be very useful especially when trouble shooting errors in network connectivity.
|
||||
|
||||
$ ip -s -s link ls p2p1
|
||||
|
||||
![ip link statistics](http://linoxide.com/wp-content/uploads/2014/04/ip-link-statistics-.png)
|
||||
|
||||
### ARP Entries ###
|
||||
|
||||
Address Resolution Protocol (ARP) is used to translate an IP address to its corresponding physical address, commonly known as MAC address. With ip command you can view the MAC address of the devices connected in your LAN by using the option neigh or neighbour.
|
||||
|
||||
$ ip neighbour
|
||||
|
||||
![ip neighbour](http://linoxide.com/wp-content/uploads/2014/04/ip-neighbour.png)
|
||||
|
||||
### Monitor Netlink Messages ###
|
||||
|
||||
It is also possible to view netlink messages with ip command. The monitor option allows you to see the state of your network devices. For instance a computer on your LAN could be categorized as REACHABLE or STALE depending on its status. The command can be used as follows:
|
||||
|
||||
$ ip monitor all
|
||||
|
||||
![ip monitor all](http://linoxide.com/wp-content/uploads/2014/04/ip-monitor-all.png)
|
||||
|
||||
### Activate and Deactivate Network Interface ###
|
||||
|
||||
To activate an particular interface you can use the ip command with options up and down, almost similar to how ifconfig is used.
|
||||
|
||||
In this example you can see the routing table entry when the ppp0 interface is activated and after it is deactivated and activated once again. The interface can be wlan0 or eth0. Change ppp0 to whatever interface is available in your case.
|
||||
|
||||
$ sudo ip link set ppp0 down
|
||||
|
||||
$ sudo ip link set ppp0 up
|
||||
|
||||
![ip link set up and down](http://linoxide.com/wp-content/uploads/2014/04/ip-link-set-up-and-down.png)
|
||||
|
||||
### Getting Help ###
|
||||
|
||||
In case you get stuck and do not know how a particular option works you can use the help option. The man page does not give a lot of information on how to use the ip options and this is where help comes to the rescue.
|
||||
|
||||
For example, to know more about the route option:
|
||||
|
||||
$ ip route help
|
||||
|
||||
![ip route help](http://linoxide.com/wp-content/uploads/2014/04/ip-route-help.png)
|
||||
|
||||
### Conclusion ###
|
||||
|
||||
The command ip is a must have tool for network administrators and all Linux users alike. It is time to move from ifconfig, especially when you are writing scripts.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/linux-command/use-ip-command-linux/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.linuxgrill.com/anonymous/iproute2/NEW-OSDL/
|
@ -1,29 +1,29 @@
|
||||
Atom已开源
|
||||
Atom开源了!!!
|
||||
=======================
|
||||
|
||||
今天,我们兴奋地宣布,我们在[MIT开源许可证][1]下开源Atom。我们看到Atom作为一个完美的补充对GitHub上通过共同努力构建更好的软件的首要任务。Atom是个长期的投入,GitHub将使用专门的团队继续支持其发展。但是我们也知道我们不能为Atom实现我们的愿景。在过去的30年里Emacs和Vim已经证明,如果你想建立一个围绕在文本编辑器的活跃的持续的社区,必须开源。
|
||||
今天,我们兴奋地宣布:在[MIT开源许可证][1]下,Atom开源了!我们看到,GitHub努力以构建更好的软件为首要任务,而Atom对此是一个完美的补充。Atom是个长期的投入,GitHub将继续由专门的团队支持其发展。但是我们也知道,不能独自为Atom实现我们的愿景。在过去的30年里Emacs和Vim已经证明,如果你想建立一个活跃的持续的文本编辑器社区,必须开源。
|
||||
|
||||
## Atom包含了什么?
|
||||
|
||||
Atom的许多功能是通过包来提供的,每个Atom包从我们发布beta版就已经开源。今天,我们会开源Atom其余部分,包括了核心应用程序,Atom包管理器,基于Chromium的桌面应用程序框架和Atom Shell。
|
||||
Atom的许多功能是通过包来提供的,从我们发布beta版开始所有Atom包就已经开源。今天,我们会开源Atom的剩余部分,包括核心应用程序、Atom包管理器,以及基于Chromium的桌面应用程序框架和Atom Shell。
|
||||
|
||||
### Atom核心
|
||||
|
||||
[Atom核心][2]包含不是通过包提供的部分应用程序。包括构建系统,Atom国际化环境,工作区和窗口,以及文本编辑组建。随着时间的推移,我们从Atom库提取功能可供独立使用,并且我们期望这个过程持续下去。
|
||||
[Atom核心][2]包含了包以外的应用程序部分。包括构建系统、Atom国际化环境、工作区和窗口,以及文本编辑组件。随着时间的推移,我们从Atom中把一些功能提取出来放入库中以便能独立使用,我们期望这个过程能一直持续下去。
|
||||
|
||||
### Atom包管理器
|
||||
|
||||
Atom包管理器,[`apm`][3], 是个客户端库和命令行多功能程序,可促进发布和安装Atom包。 `apm`目前是由`atom.io`提供动力,但是我们计划标准化后端API,如此你就能管理自己的注册簿。
|
||||
Atom包管理器,[`apm`][3], 是个客户端库和命令行多功能程序,用来帮助发布和安装Atom包。 `apm`目前是由`atom.io`提供支持,但是我们计划将后端API标准化,如此你就能管理自己的注册簿(registy)了。
|
||||
|
||||
### Atom Shell
|
||||
|
||||
最后,我们很兴奋[Atom Shell][4]开源。超过2.5年的开发,Atom已成为一个寄居蟹,在Cocoa `WebView`中开始它的生命,然后移居到[Chromium嵌入式框架][5], 最终安家在Atom Shell中。我们尝试短暂地使用[Node-Webkit][6],但是我们决定采用@zcbenz构建的框架。
|
||||
最后,同Atom一样,我们真的很兴奋[Atom Shell][4]也能够开源。超过2.5年的开发,Atom已成为一个寄居蟹,它首先在Cocoa `WebView`中开始生命,然后移居到[Chromium嵌入式框架][5], 最终安家在Atom Shell中。我们尝试短暂地使用[Node-Webkit][6],但是我们决定采用@zcbenz构建的框架。
|
||||
|
||||
我们采取在整洁的环境中整合Chromium和Node,维护的方式,包括在Node中发起增加[multi-context支持][7]。我们也建立了[brightray][8]和[libchromiumcontent][9],使其更易嵌入Chromium到本地应用程序作为共享库。
|
||||
我们采取在整洁、可维护的环境中整合Chromium和Node,包括在Node中发起增加[multi-context支持][7]。我们也建立了[brightray][8]和[libchromiumcontent][9],使其更易嵌入Chromium到本地应用程序作为共享库。
|
||||
|
||||
## 将来!
|
||||
## 关于未来!
|
||||
|
||||
在大量Atom 1.0版本准备发布之前。在接下来几个月,我们将集中改善性能,在Linux和Windows上发放测试,以及使API趋于稳定。我们认为开源会帮助我们更快达到目标,更重要的是,源代码将给你透明度和控制权,你能从你的工具中告诉我们你想要的。
|
||||
在Atom 1.0版本准备发布之前仍然有大量的工作要做。在接下来几个月,我们将集中改善性能,在Linux和Windows上发放测试,以及使API趋于稳定。我们认为开源会帮助我们更快达到目标,更重要的是,源代码将给你透明度和控制权,你能从你的工具中告诉我们你想要的。
|
||||
|
||||
在迄今为止的Atom beta版本中我们感谢每个参与进来的开发者。你的反馈,包和请求(PR)是无价的。如果我们不打算在我们的余生使用它,我们是不会构建一个文本编辑器的,我们很高兴把这关键一步变为现实。
|
||||
|
||||
@ -31,7 +31,7 @@ Atom包管理器,[`apm`][3], 是个客户端库和命令行多功能程序,
|
||||
|
||||
via: http://blog.atom.io/2014/05/06/atom-is-now-open-source.html
|
||||
|
||||
译者:[Vito](https://github.com/vito-L) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[Vito](https://github.com/vito-L) 校对:[Mr小眼儿](http://blog.csdn.net/tinyeyeser)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
|
@ -0,0 +1,35 @@
|
||||
2014 GPU技术大会上关于Linux的嵌入式技术和应用
|
||||
================================================================================
|
||||
![Image by opensource.com](http://opensource.com/sites/default/files/imagecache/image-full-size/images/life-uploads/gputechcon2.jpg)
|
||||
|
||||
今年我第一次参加了在加利福尼亚圣琼斯举办的[GPU技术大会][1](就在[游戏开发者大会][2]之后的星期里)。在这次由NVIDIA主办的会议上,广泛讨论了包括自动化,动画,游戏,科研,云,系统集成,和新兴公司在内的各个领域的主题。活动议程主要由三大部分组成,500场技术会议,实地编程场所和展示,以及一个展示大厅可以让参与者展示他们最新的工作成果。
|
||||
|
||||
![](http://opensource.com/sites/default/files/resize/images/life-uploads/gputechconf1-520x385.jpg)
|
||||
|
||||
第一个活动在第二天,由NVIDIA CEO黄仁勋带来的演讲。他公布了应用于公司的下一代GPGPU产品的全新架构[Pascal][3],以及被称为世界上第一台嵌入式超级电脑的[Jetson TK1][4]。Pascal将应用在下一代超级电脑或者工作站上,而Jetson主要针对嵌入式市场,这两个都普遍使用了Linux。活动中还展示了奥迪的应用了Jetson架构的无人驾驶汽车,最后以每位参与者都获赠一部应用了Android系统的NVIDIA Shield的通知结束。
|
||||
|
||||
![](http://opensource.com/sites/default/files/resize/images/life-uploads/jetson-350x466.jpg)
|
||||
|
||||
第二个活动重点是Pixar的实时渲染现场演示,展示了动画设计师们如何受益于最新的GPU技术,而更有效地在最终渲染之前获取反馈。最后的活动由Adam Gazzaley博士主持,来自加州大学三藩分校的神经学科学家,他在研究应用视频游戏来帮助增强认知。活动现场展示了使用Occulus Rift游戏头盔做的虚拟现实技术,实时电子测量/反馈数据到游戏中。
|
||||
|
||||
![](http://opensource.com/sites/default/files/resize/images/life-uploads/pixartech2-520x390.jpg)
|
||||
|
||||
我参加这次大会的主要原因之一是想更多地了解一下目前可视化领域的最新开发情况,活动中有很多会议关注这个领域以及GPGPU协同运算和可视化实时反馈。越来越多的超级电脑也开始应用GPGPU加速,例如橡树岭国家实验室的Titan。大部分会议由NVIDIA工程师和开发者主持,不过也有许多会议由研究实际问题的科学家带来(相对于渲染/可视化,大部分关注在GPGPU)。还有一场海报会议,展示大范围的各种应用,还提供了和开发之直接对话的机会。许多项目都是开源的,扩展应用了许多我们熟悉的库。
|
||||
|
||||
很明显OpenGL在这个领域很活跃,有大量令人激动的开发。有意思的是,它们之中大多数借助了游戏产业的持续增长,因为需要移植到新的基于Linux的平台比如[SteamOS][5]。在OpenGL未来会议上展示了运行在Jetson平台的现场演示,而且在之前游戏开发者大会上的[实现零驱动开销][6]的演讲在本次大会中被大量引用。一些二进制驱动的改善被提到,用来更好地支持采用nVidia的Optix平台的场景图形和实时光线跟踪技术,通过大会的一个获奖作品[HIV壳体展示][7],展示了GPU技术在科研领域带来的促进作用。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://opensource.com/life/14/4/gpu-technology-conference-2014
|
||||
|
||||
译者:[zpl1025](https://github.com/zpl1025) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.gputechconf.com/
|
||||
[2]:http://www.gdconf.com/
|
||||
[3]:http://blogs.nvidia.com/blog/2014/03/25/gpu-roadmap-pascal/
|
||||
[4]:http://www.nvidia.com/object/jetson-tk1-embedded-dev-kit.html
|
||||
[5]:http://steamcommunity.com/linux
|
||||
[6]:http://www.slideshare.net/CassEveritt/approaching-zero-driver-overhead
|
||||
[7]:http://blogs.nvidia.com/blog/2014/03/27/researchers-win-third-annual-cuda-achievement-award-three-new-cuda-fellows-named/
|
@ -0,0 +1,42 @@
|
||||
解决Ubuntu 14.04 Unity桌面环境登陆后卡机情况的
|
||||
================================================================================
|
||||
|
||||
如果你把Ubuntu从13.10更新到14.04,就会出现**用Unity桌面环境登陆时卡机的现象**.如果进入Ubuntu14.04的boot,并且验证进入后,系统也会挂断,并且卡机.如果你足够幸运,你可能会看到仅有的鼠标或者桌面背景.**没有Unity触发器,不存在顶部面板**等等.基本上你的ubuntu已经处于一种不稳定的状态了.
|
||||
|
||||
缺少Unity触发器和面板以及系统卡机的问题,需要通过重新下载Unity来解决.让我们看看怎么做:
|
||||
|
||||
### 重新下载Unity 解决系统卡机的问题###
|
||||
|
||||
好吧,既然你整纠结于一个完全冻结了的系统.按下**Ctrl+Alt+F2**.这会让你进入一个命令行接口而不是默认的用户桌面接口.切换到命令行接口后,输入用户名和密码登陆之后,使用下面的命令重装Unity桌面环境:
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install –reinstall ubuntu-desktop
|
||||
sudo apt-get install unity
|
||||
sudo shutdown -r now
|
||||
|
||||
最后一个命令是重启系统,重启之后,你的Unity就完好如初了.
|
||||
|
||||
|
||||
### 解决Nvidia显卡的Unity卡机问题###
|
||||
|
||||
我没有解决这个问题的经验,但是我找到了别人解决这个问题的方法.尽管上面的技巧对我来说有效,但是我不验证下面的命令.Nvidia的用户需要确认下面的步奏:
|
||||
|
||||
和上面一样使用**Ctrl+Alt+F2**登陆到命令行接口,输入下面的命令:
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install –reinstall ubuntu-desktop
|
||||
sudo apt-get install unity
|
||||
sudo apt-get remove –purge nvidia*
|
||||
sudo shutdown -r now
|
||||
|
||||
如果重启之后Unity恢复了,记得重新安装你的Nvidia显卡的驱动,因为你已经卸载了它.
|
||||
|
||||
我希望这些技巧能够帮助你恢复14.04的unbuntu.最后任何的问题和建议都欢迎来提.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/fix-unity-freezes-after-login-ubuntu-14-04/
|
||||
|
||||
译者:[ggaaooppeenngg](https://github.com/ggaaooppeenngg) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,114 @@
|
||||
在 Ubuntu 中用 Docker 管理 Linux Container 容器
|
||||
================================================================================
|
||||
当前,完全硬件虚拟化技术(KVM、Xen、Hyper-V 等)能在一个物理主机上很好地运行多个互相独立的操作系统,但这也带来一些问题:性能不佳,资源浪费,系统反应迟缓等。有时候对用户来说,完全的硬件虚拟化并不是最好的选择。
|
||||
|
||||
一种替代方案是使用轻量级虚拟化技术 —— 所谓的 [Linux Container 容器][1] (LXC),它提供的是系统级虚拟化。与跑虚拟机相比,LXC 可以在一个轻量级沙箱容器里面跑多个 Linux 操作系统。当你需要设置一些易于克隆的开发环境、测试环境,或想在安全沙盒里安装应用时,LXC 就非常有用了。
|
||||
|
||||
[Docker][2] 是一个开源工具,可以让用户方便地布署 Linux Container 容器。Docker 很快变成了 container 技术的非官方标准,从而被 [Ubuntu][3] 和 [Red Hat][4]等众多发行版吸收进去。
|
||||
|
||||
本教程中我会向你们演示如何在 Ubuntu 14.04 中使用 Docker 来管理 LXC。需要注意的是,本教程的一些内容可能会与其他 Ubuntu 版本下的操作会稍微有些出入。
|
||||
|
||||
当前Ubuntu 系统下的 Docker 的安装包只提供64位。如果你想运行32位的 Docker,你需要[使用源码编译32位 Docker 工具][5]。
|
||||
|
||||
### 安装 Docker ###
|
||||
|
||||
通过 apt-get 安装 Docker 简直是小菜一碟。
|
||||
|
||||
$ sudo apt-get install docker.io
|
||||
|
||||
如果你不是 root 组的用户,你可以把自己加入到 docker 用户组。下面的命令可以让没有 root 权限的用户使用 Docker:
|
||||
|
||||
$ sudo usermod -a -G docker $USER
|
||||
|
||||
重新登录,以便让你的用户组权限生效。
|
||||
|
||||
下一步是编辑 Docker 配置文件,确定 Docker 可执行文件的路径:
|
||||
|
||||
$ sudo vi /etc/default/docker.io
|
||||
|
||||
> DOCKER="/usr/bin/docker.io"
|
||||
|
||||
重启 Docker 服务:
|
||||
|
||||
$ sudo service docker.io restart
|
||||
|
||||
### 管理 Docker Container 容器 ###
|
||||
|
||||
如果你想在新的 Docker 容器下创建一个新的 Ubuntu 操作系统,你首先需要 pull 一个 [Ubuntu][6] 的 Docker 镜像。下面的命令可以通过网络下载 Docker 镜像:
|
||||
|
||||
$ docker pull ubuntu
|
||||
|
||||
你可以使用下面的命令启动 Docker 里面的 Ubuntu 系统。最后的参数“/bin/bash”表示一旦容器启动,首先会执行简单的 bash。
|
||||
|
||||
$ docker run -i -t ubuntu /bin/bash
|
||||
|
||||
上面的命令会立即启动 Ubuntu container 容器(这是一个完美的容器!),然后它会提供一个 shell 提示符运行环境给你。现在开始你可以通过这个沙箱环境访问一个完整的 Ubuntu 系统了。
|
||||
|
||||
![](https://farm6.staticflickr.com/5515/13892198519_dfb9481af6_z.jpg)
|
||||
|
||||
输入“exit”命令退出 Docker 容器。
|
||||
|
||||
你也可以用下面的命令进入不同的系统。比如 Fedora:
|
||||
|
||||
$ docker.io run -i -t fedora /bin/bash
|
||||
|
||||
如果系统中还不存在 Fedora Docker 镜像,这个命令会自动下载它,然后启动这个 Fedora 的 Docker 容器。
|
||||
|
||||
![](https://farm8.staticflickr.com/7427/14079294164_0ccabde57a.jpg)
|
||||
|
||||
如果你想要开启指定版本的系统,比如 Ubuntu 13.04,你可以使用下面的命令:
|
||||
|
||||
$ docker.io run -i -t ubuntu:13.04 /bin/bash
|
||||
|
||||
### Container 容器网络设置 ###
|
||||
|
||||
Docker 使用 Linux 桥接技术与其他容器通信,以及连通外网。安装完 Docker 后你应该可以看到 docker0 这个网桥,这是 Docker 默认创建的。你创建的每个容器都会通过这个网桥连接到网络。
|
||||
|
||||
![](https://farm6.staticflickr.com/5462/14078810715_513764848b_z.jpg)
|
||||
|
||||
#### 自定义 Linux 网桥 ####
|
||||
|
||||
如果你想自定义网桥,你可以执行以下步骤。你可以在这个网桥后面分配一个子网,并为这个子网分配地址。下面的命令会为 Docker 子网分配 10.0.0.0/24 地址段:
|
||||
|
||||
$ sudo apt-get install bridge-utils
|
||||
$ sudo brctl addbr br0
|
||||
$ sudo ifconfig br0 10.0.0.1 netmask 255.255.255.0
|
||||
|
||||
然后在 /etc/default/docker.io 文件的 DOCKER_OPTS 变量里添加“-b=br0”选项,并重启 Docker 服务:
|
||||
|
||||
$ sudo service docker.io restart
|
||||
|
||||
到目前为止,任何创建的容器都会连上 br0 网桥,它们的 IP 地址会从 10.0.0.0/24 中自动分配(译注:在10.0.0.2到10.0.0.254之间随机分配)。
|
||||
|
||||
#### 其他自定义设置 ####
|
||||
|
||||
你可以通过 /etc/default/docker.io 文件的 DOCKER_OPTS 变量设置其他一些属性:
|
||||
|
||||
- "-dns 8.8.8.8 -dns 8.8.4.4": 为容器指定 DNS 服务器。
|
||||
- "-icc=false": 将容器与其他容器隔离出来
|
||||
|
||||
### 疑难解答 ###
|
||||
|
||||
1、当你运行 docker.io 命令时,你可能会遇到以下问题:
|
||||
|
||||
> dial unix /var/run/docker.sock: no such file or directory
|
||||
|
||||
这个错误可能是由于 Docker 后台进程没有启动。检查下 Docker 后台进程的状态,确认它已经处于启动状态:
|
||||
|
||||
$ sudo service docker.io status
|
||||
$ sudo service docker.io start
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/2014/05/manage-linux-containers-docker-ubuntu.html
|
||||
|
||||
译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:https://linuxcontainers.org/
|
||||
[2]:https://www.docker.io/
|
||||
[3]:http://blog.docker.io/2014/04/docker-in-ubuntu-ubuntu-in-docker/
|
||||
[4]:http://www.redhat.com/about/news/press-archive/2014/4/red-hat-docker-expand-collaboration
|
||||
[5]:http://mwhiteley.com/linux-containers/2013/08/31/docker-on-i386.html
|
||||
[6]:http://xmodulo.com/go/ubuntubook
|
Loading…
Reference in New Issue
Block a user