mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
commit
bdc7f0da33
@ -1,3 +1,4 @@
|
||||
Translating by H-mudcup
|
||||
How To Use Steam Music Player on Ubuntu Desktop
|
||||
================================================================================
|
||||
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/steam-music.jpg)
|
||||
|
@ -0,0 +1,47 @@
|
||||
How to Download Music from Grooveshark with a Linux OS
|
||||
================================================================================
|
||||
> The solution is actually much simpler than you think
|
||||
|
||||
![](http://i1-news.softpedia-static.com/images/news2/How-to-Download-Music-from-Grooveshark-with-a-Linux-OS-468268-2.jpg)
|
||||
|
||||
**Grooveshark is a great online platform for people who want to listen to music, and there are a number of ways to download music from there. Groovesquid is just one of the applications that let users get music from Grooveshark, and it's multiplatform.**
|
||||
|
||||
If there is a service that streams something online, then there is a way to download the stuff that you are just watching or listening. As it turns out, it's not that difficult and there are a ton of solutions, no matter the platform. For example, there are dozens of YouTube downloaders and it stands to reason that it's not all that difficult to get stuff from Grooveshark either.
|
||||
|
||||
Now, there is the problem of legality. Like many other applications out there, Groovesquid is not actually illegal. It's the user's fault if they do something illegal with an application. The same reasoning can be applied to apps like utorrent or Bittorrent. As long as you don't touch copyrighted material, there are no problems in using Groovesquid.
|
||||
|
||||
### Groovesquid is fast and efficient ###
|
||||
|
||||
The only problem that you could find with Groovesquid is the fact that it's based on Java and that's never a good sign. This is a good way to ensure that an application runs on all the platforms, but it's an issue when it comes to the interface. It's not great, but it doesn't really matter all that much for users, especially since the app is doing a great job.
|
||||
|
||||
There is one caveat though. Groovesquid is a free application, but in order to remain free, it has to display an ad on the right side of the menu. This shouldn't be a problem for most people, but it's a good idea to mention that right from the start.
|
||||
|
||||
From a usability point of view, the application is pretty straightforward. Users can download a single song by entering the link in the top field, but the purpose of that field can be changed by accessing the small drop-down menu to its left. From there, it's possible to change to Song, Popular, Albums, Playlist, and Artist. Some of the options provide access to things like the most popular song on Grooveshark and other options allow you to download an entire playlist, for example.
|
||||
|
||||
You can download Groovesquid 0.7.0
|
||||
|
||||
- [jar][1] File size: 3.8 MB
|
||||
- [tar.gz][2] File size: 549 KB
|
||||
|
||||
You will get a Jar file and all you have to do is to make it executable and let Java do the rest.
|
||||
|
||||
![](http://i1-news.softpedia-static.com/images/news2/How-to-Download-Music-from-Grooveshark-with-a-Linux-OS-468268-3.jpg)
|
||||
|
||||
![](http://i1-news.softpedia-static.com/images/news2/How-to-Download-Music-from-Grooveshark-with-a-Linux-OS-468268-4.jpg)
|
||||
|
||||
![](http://i1-news.softpedia-static.com/images/news2/How-to-Download-Music-from-Grooveshark-with-a-Linux-OS-468268-5.jpg)
|
||||
|
||||
![](http://i1-news.softpedia-static.com/images/news2/How-to-Download-Music-from-Grooveshark-with-a-Linux-OS-468268-6.jpg)
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://news.softpedia.com/news/How-to-Download-Music-from-Grooveshark-with-a-Linux-OS-468268.shtml
|
||||
|
||||
作者:[Silviu Stahie][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://news.softpedia.com/editors/browse/silviu-stahie
|
||||
[1]:https://github.com/groovesquid/groovesquid/releases/download/v0.7.0/Groovesquid.jar
|
||||
[2]:https://github.com/groovesquid/groovesquid/archive/v0.7.0.tar.gz
|
@ -1,157 +0,0 @@
|
||||
disylee占个坑~
|
||||
Docker: Present and Future
|
||||
================================================================================
|
||||
### Docker - the story so far ###
|
||||
|
||||
Docker is a toolset for Linux containers designed to ‘build, ship and run’ distributed applications. It was first released as an open source project by DotCloud in March 2013. The project quickly became popular, leading to DotCloud rebranded as Docker Inc (and ultimately [selling off their original PaaS business][1]). [Docker 1.0][2] was released in June 2014, and the monthly release cadence that led up to the June release has been sustained since.
|
||||
|
||||
The 1.0 release marked the point where Docker Inc considered the platform sufficiently mature to be used in production (with the company and partners providing paid for support options). The monthly release of point updates shows that the project is still evolving quickly, adding new features, and addressing issues as they are found. The project has however successfully decoupled ‘ship’ from ‘run’, so images sourced from any version of Docker can be used with any other version (with both forward and backward compatibility), something that provides a stable foundation for Docker use despite rapid change.
|
||||
|
||||
The growth of Docker into one of the most popular open source projects could be perceived as hype, but there is a great deal of substance. Docker has attracted support from many brand names across the industry, including Amazon, Canonical, CenturyLink, Google, IBM, Microsoft, New Relic, Pivotal, Red Hat and VMware. This is making it almost ubiquitously available wherever Linux can be found. In addition to the big names many startups are growing up around Docker, or changing direction to be better aligned with Docker. Those partnerships (large and small) are helping to drive rapid evolution of the core project and its surrounding ecosystem.
|
||||
|
||||
### A brief technical overview of Docker ###
|
||||
|
||||
Docker makes use of Linux kernel facilities such as [cGroups][3], namespaces and [SElinux][4] to provide isolation between containers. At first Docker was a front end for the [LXC][5] container management subsystem, but release 0.9 introduced [libcontainer][6], which is a native Go language library that provides the interface between user space and the kernel.
|
||||
|
||||
Containers sit on top of a union file system, such as [AUFS][7], which allows for the sharing of components such as operating system images and installed libraries across multiple containers. The layering approach in the filesystem is also exploited by the [Dockerfile][8] DevOps tool, which is able to cache operations that have already completed successfully. This can greatly speed up test cycles by taking out the wait time usually taken to install operating systems and application dependencies. Shared libraries between containers can also reduce RAM footprint.
|
||||
|
||||
A container is started from an image, which may be locally created, cached locally, or downloaded from a registry. Docker Inc operates the [Docker Hub public registry][9], which hosts official repositories for a variety of operating systems, middleware and databases. Organisations and individuals can host public repositories for images at Docker Hub, and there are also subscription services for hosting private repositories. Since an uploaded image could contain almost anything Docker Hub provides an automated build facility (that was previously called ‘trusted build’) where images are constructed from a Dockerfile that serves as a manifest for the contents of the image.
|
||||
|
||||
### Containers versus VMs ###
|
||||
|
||||
Containers are potentially much more efficient than VMs because they’re able to share a single kernel and share application libraries. This can lead to substantially smaller RAM footprints even when compared to virtualisation systems that can make use of RAM overcommitment. Storage footprints can also be reduced where deployed containers share underlying image layers. IBM’s Boden Russel has done [benchmarking][10] that illustrates these differences.
|
||||
|
||||
Containers also present a lower systems overhead than VMs, so the performance of an application inside a container will generally be the same or better versus the same application running within a VM. A team of IBM researchers have published a [performance comparison of virtual machines and Linux containers][11].
|
||||
|
||||
One area where containers are weaker than VMs is isolation. VMs can take advantage of ring -1 [hardware isolation][12] such as that provided by Intel’s VT-d and VT-x technologies. Such isolation prevents VMs from ‘breaking out’ and interfering with each other. Containers don’t yet have any form of hardware isolation, which makes them susceptible to exploits. A proof of concept attack named [Shocker][13] showed that Docker versions prior to 1.0 were vulnerable. Although Docker 1.0 fixed the particular issue exploited by Shocker, Docker CTO Solomon Hykes [stated][14], “When we feel comfortable saying that Docker out-of-the-box can safely contain untrusted uid0 programs, we will say so clearly.”. Hykes’s statement acknowledges that other exploits and associated risks remain, and that more work will need to be done before containers can become trustworthy.
|
||||
|
||||
For many use cases the choice of containers or VMs is a false dichotomy. Docker works well within a VM, which allows it to be used on existing virtual infrastructure, private clouds and public clouds. It’s also possible to run VMs inside containers, which is something that Google uses as part of its cloud platform. Given the widespread availability of infrastructure as a service (IaaS) that provides VMs on demand it’s reasonable to expect that containers and VMs will be used together for years to come. It’s also possible that container management and virtualisation technologies might be brought together to provide a best of both worlds approach; so a hardware trust anchored micro virtualisation implementation behind libcontainer could integrate with the Docker tool chain and ecosystem at the front end, but use a different back end that provides better isolation. Micro virtualisation (such as Bromium’s [vSentry][15] and VMware’s [Project Fargo][16]) is already used in desktop environments to provide hardware based isolation between applications, so similar approaches could be used along with libcontainer as an alternative to the container mechanisms in the Linux kernel.
|
||||
|
||||
### ‘Dockerizing’ applications ###
|
||||
|
||||
Pretty much any Linux application can run inside a Docker container. There are no limitations on choice of languages or frameworks. The only practical limitation is what a container is allowed to do from an operating system perspective. Even that bar can be lowered by running containers in privileged mode, which substantially reduces controls (and correspondingly increases risk of the containerised application being able to cause damage to the host operating system).
|
||||
|
||||
Containers are started from images, and images can be made from running containers. There are essentially two ways to get applications into containers - manually and Dockerfile..
|
||||
|
||||
#### Manual builds ####
|
||||
|
||||
A manual build starts by launching a container with a base operating system image. An interactive terminal can then be used to install applications and dependencies using the package manager offered by the chosen flavour of Linux. Zef Hemel provides a walk through of the process in his article ‘[Using Linux Containers to Support Portable Application Deployment][17]’. Once the application is installed the container can be pushed to a registry (such as Docker Hub) or exported into a tar file.
|
||||
|
||||
#### Dockerfile ####
|
||||
|
||||
Dockerfile is a system for scripting the construction of Docker containers. Each Dockerfile specifies the base image to start from and then a series of commands that are run in the container and/or files that are added to the container. The Dockerfile can also specify ports to be exposed, the working directory when a container is started and the default command on startup. Containers built with Dockerfiles can be pushed or exported just like manual builds. Dockerfiles can also be used in Docker Hub’s automated build system so that images are built from scratch in a system under the control of Docker Inc with the source of that image visible to anybody that might use it.
|
||||
|
||||
#### One process? ####
|
||||
|
||||
Whether images are built manually or with Dockerfile a key consideration is that only a single process is invoked when the container is launched. For a container serving a single purpose, such as running an application server, running a single process isn’t an issue (and some argue that containers should only have a single process). For situations where it’s desirable to have multiple processes running inside a container a [supervisor][18] process must be launched that can then spawn the other desired processes. There is no init system within containers, so anything that relies on systemd, upstart or similar won’t work without modification.
|
||||
|
||||
### Containers and microservices ###
|
||||
|
||||
A full description of the philosophy and benefits of using a microservices architecture is beyond the scope of this article (and well covered in the [InfoQ eMag: Microservices][19]). Containers are however a convenient way to bundle and deploy instances of microservices.
|
||||
|
||||
Whilst most practical examples of large scale microservices deployments to date have been on top of (large numbers of) VMs, containers offer the opportunity to deploy at a smaller scale. The ability for containers to have a shared RAM and disk footprint for operating systems, libraries common application code also means that deploying multiple versions of services side by side can be made very efficient.
|
||||
|
||||
### Connecting containers ###
|
||||
|
||||
Small applications will fit inside a single container, but in many cases an application will be spread across multiple containers. Docker’s success has spawned a flurry of new application compositing tools, orchestration tools and platform as a service (PaaS) implementations. Behind most of these efforts is a desire to simplify the process of constructing an application from a set of interconnected containers. Many tools also help with scaling, fault tolerance, performance management and version control of deployed assets.
|
||||
|
||||
#### Connectivity ####
|
||||
|
||||
Docker’s networking capabilities are fairly primitive. Services within containers can be made accessible to other containers on the same host, and Docker can also map ports onto the host operating system to make services available across a network. The officially sponsored approach to connectivity is [libchan][20], which is a library that provides Go like [channels][21] over the network. Until libchan finds its way into applications there’s room for third parties to provide complementary network services. For example, [Flocker][22] has taken a proxy based approach to make services portable across hosts (along with their underlying storage).
|
||||
|
||||
#### Compositing ####
|
||||
|
||||
Docker has native mechanisms for linking containers together where metadata about a dependency can be passed into the dependent container and consumed within as environment variables and hosts entries. Application compositing tools like [Fig][23] and [geard][24] express the dependency graph inside a single file so that multiple containers can be brought together into a coherent system. CenturyLink’s [Panamax][25] compositing tool takes a similar underlying approach to Fig and geard, but adds a web based user interface, and integrates directly with GitHub so that applications can be shared.
|
||||
|
||||
#### Orchestration ####
|
||||
|
||||
Orchestration systems like [Decking][26], New Relic’s [Centurion][27] and Google’s [Kubernetes][28] all aim to help with the deployment and life cycle management of containers. There are also numerous examples (such as [Mesosphere][29]) of [Apache Mesos][30] (and particularly its [Marathon][31] framework for long running applications) being used along with Docker. By providing an abstraction between the application needs (e.g. expressed as a requirement for CPU cores and memory) and underlying infrastructure, the orchestration tools provide decoupling that’s designed to simplify both application development and data centre operations. There is such a variety of orchestration systems because many have emerged from internal systems previously developed to manage large scale deployments of containers; for example Kubernetes is based on Google’s [Omega][32] system that’s used to manage containers across the Google estate.
|
||||
|
||||
Whilst there is some degree of functional overlap between the compositing tools and the orchestration tools there are also ways that they can complement each other. For example Fig might be used to describe how containers interact functionally whilst Kubernetes pods might be used to provide monitoring and scaling.
|
||||
|
||||
#### Platforms (as a Service) ####
|
||||
|
||||
A number of Docker native PaaS implementations such as [Deis][33] and [Flynn][34] have emerged to take advantage of the fact that Linux containers provide a great degree of developer flexibility (rather than being ‘opinionated’ about a given set of languages and frameworks). Other platforms such as CloudFoundry, OpenShift and Apcera Continuum have taken the route of integrating Docker based functionality into their existing systems, so that applications based on Docker images (or the Dockerfiles that make them) can be deployed and managed alongside of apps using previously supported languages and frameworks.
|
||||
|
||||
### All the clouds ###
|
||||
|
||||
Since Docker can run in any Linux VM with a reasonably up to date kernel it can run in pretty much every cloud offering IaaS. Many of the major cloud providers have announced additional support for Docker and its ecosystem.
|
||||
|
||||
Amazon have introduced Docker into their Elastic Beanstalk system (which is an orchestration service over underlying IaaS). Google have Docker enabled ‘managed VMs’, which provide a halfway house between the PaaS of App Engine and the IaaS of Compute Engine. Microsoft and IBM have both announced services based on Kubernetes so that multi container applications can be deployed and managed on their clouds.
|
||||
|
||||
To provide a consistent interface to the wide variety of back ends now available the Docker team have introduced [libswarm][35], which will integrate with a multitude of clouds and resource management systems. One of the stated aims of libswarm is to ‘avoid vendor lock-in by swapping any service out with another’. This is accomplished by presenting a consistent set of services (with associated APIs) that attach to implementation specific back ends. For example the Docker server service presents the Docker remote API to a local Docker command line tool so that containers can be managed on an array of service providers.
|
||||
|
||||
New service types based on Docker are still in their infancy. London based Orchard labs offered a Docker hosting service, but Docker Inc said that the service wouldn’t be a priority after acquiring Orchard. Docker Inc has also sold its previous DotCloud PaaS business to cloudControl. Services based on older container management systems such as [OpenVZ][36] are already commonplace, so to a certain extent Docker needs to prove its worth to hosting providers.
|
||||
|
||||
### Docker and the distros ###
|
||||
|
||||
Docker has already become a standard feature of major Linux distributions like Ubuntu, Red Hat Enterprise Linux (RHEL) and CentOS. Unfortunately the distributions move at a different pace to the Docker project, so the versions found in a distribution can be well behind the latest available. For example Ubuntu 14.04 was released with Docker 0.9.1, and that didn’t change on the point release upgrade to Ubuntu 14.04.1 (by which time Docker was at 1.1.2). There are also namespace issues in official repositories since Docker was also the name of a KDE system tray; so with Ubuntu 14.04 the package name and command line tool are both ‘docker.io’.
|
||||
|
||||
Things aren’t much different in the Enterprise Linux world. CentOS 7 comes with Docker 0.11.1, a development release that precedes Docker Inc’s announcement of production readiness with Docker 1.0. Linux distribution users that want the latest version for promised stability, performance and security will be better off following the [installation instructions][37] and using repositories hosted by Docker Inc rather than taking the version included in their distribution.
|
||||
|
||||
The arrival of Docker has spawned new Linux distributions such as [CoreOS][38] and Red Hat’s [Project Atomic][39] that are designed to be a minimal environment for running containers. These distributions come with newer kernels and Docker versions than the traditional distributions. They also have lower memory and disk footprints. The new distributions also come with new tools for managing large scale deployments such as [fleet][40] ‘a distributed init system’ and [etcd][41] for metadata management. There are also new mechanisms for updating the distribution itself so that the latest versions of the kernel and Docker can be used. This acknowledges that one of the effects of using Docker is that it pushes attention away from the distribution and its package management solution, making the Linux kernel (and Docker subsystem using it) more important.
|
||||
|
||||
New distributions might be the best way of running Docker, but traditional distributions and their package managers remain very important within containers. Docker Hub hosts official images for Debian, Ubuntu, and CentOS. There’s also a ‘semi-official’ repository for Fedora images. RHEL images aren’t available in Docker Hub, as they’re distributed directly from Red Hat. This means that the automated build mechanism on Docker Hub is only available to those using pure open source distributions (and willing to trust the provenance of the base images curated by the Docker Inc team).
|
||||
|
||||
Whilst Docker Hub integrates with source control systems such as GitHub and Bitbucket for automated builds the package managers used during the build process create a complex relationship between a build specification (in a Dockerfile) and the image resulting from a build. Non deterministic results from the build process isn’t specifically a Docker problem - it’s a result of how package managers work. A build done one day will get a given version, and a build done another time may get a later version, which is why package managers have upgrade facilities. The container abstraction (caring less about the contents of a container) along with container proliferation (because of lightweight resource utilisation) is however likely to make this a pain point that gets associated with Docker.
|
||||
|
||||
### The future of Docker ###
|
||||
|
||||
Docker Inc has set a clear path on the development of core capabilities (libcontainer), cross service management (libswarm) and messaging between containers (libchan). Meanwhile the company has already shown a willingness to consume its own ecosystem with the Orchard Labs acquisition. There is however more to Docker than Docker Inc, with contributions to the project coming from big names like Google, IBM and Red Hat. With a benevolent dictator in the shape of CTO Solomon Hykes at the helm there is a clear nexus of technical leadership for both the company and the project. Over its first 18 months the project has shown an ability to move fast by using its own output, and there are no signs of that abating.
|
||||
|
||||
Many investors are looking at the features matrix for VMware’s ESX/vSphere platform from a decade ago and figuring out where the gaps (and opportunities) lie between enterprise expectations driven by the popularity of VMs and the existing Docker ecosystem. Areas like networking, storage and fine grained version management (for the contents of containers) are presently underserved by the existing Docker ecosystem, and provide opportunities for both startups and incumbents.
|
||||
|
||||
Over time it’s likely that the distinction between VMs and containers (the ‘run’ part of Docker) will become less important, which will push attention to the ‘build’ and ‘ship’ aspects. The changes here will make the question of ‘what happens to Docker?’ much less important than ‘what happens to the IT industry as a result of Docker?’.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.infoq.com/articles/docker-future
|
||||
|
||||
作者:[Chris Swan][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.infoq.com/author/Chris-Swan
|
||||
[1]:http://blog.dotcloud.com/dotcloud-paas-joins-cloudcontrol
|
||||
[2]:http://www.infoq.com/news/2014/06/docker_1.0
|
||||
[3]:https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
|
||||
[4]:http://selinuxproject.org/page/Main_Page
|
||||
[5]:https://linuxcontainers.org/
|
||||
[6]:http://blog.docker.com/2014/03/docker-0-9-introducing-execution-drivers-and-libcontainer/
|
||||
[7]:http://aufs.sourceforge.net/aufs.html
|
||||
[8]:https://docs.docker.com/reference/builder/
|
||||
[9]:https://registry.hub.docker.com/
|
||||
[10]:http://bodenr.blogspot.co.uk/2014/05/kvm-and-docker-lxc-benchmarking-with.html?m=1
|
||||
[11]:http://domino.research.ibm.com/library/cyberdig.nsf/papers/0929052195DD819C85257D2300681E7B/$File/rc25482.pdf
|
||||
[12]:https://en.wikipedia.org/wiki/X86_virtualization#Hardware-assisted_virtualization
|
||||
[13]:http://stealth.openwall.net/xSports/shocker.c
|
||||
[14]:https://news.ycombinator.com/item?id=7910117
|
||||
[15]:http://www.bromium.com/products/vsentry.html
|
||||
[16]:http://cto.vmware.com/vmware-docker-better-together/
|
||||
[17]:http://www.infoq.com/articles/docker-containers
|
||||
[18]:http://docs.docker.com/articles/using_supervisord/
|
||||
[19]:http://www.infoq.com/minibooks/emag-microservices
|
||||
[20]:https://github.com/docker/libchan
|
||||
[21]:https://gobyexample.com/channels
|
||||
[22]:http://www.infoq.com/news/2014/08/clusterhq-launch-flocker
|
||||
[23]:http://www.fig.sh/
|
||||
[24]:http://openshift.github.io/geard/
|
||||
[25]:http://panamax.io/
|
||||
[26]:http://decking.io/
|
||||
[27]:https://github.com/newrelic/centurion
|
||||
[28]:https://github.com/GoogleCloudPlatform/kubernetes
|
||||
[29]:https://mesosphere.io/2013/09/26/docker-on-mesos/
|
||||
[30]:http://mesos.apache.org/
|
||||
[31]:https://github.com/mesosphere/marathon
|
||||
[32]:http://static.googleusercontent.com/media/research.google.com/en/us/pubs/archive/41684.pdf
|
||||
[33]:http://deis.io/
|
||||
[34]:https://flynn.io/
|
||||
[35]:https://github.com/docker/libswarm
|
||||
[36]:http://openvz.org/Main_Page
|
||||
[37]:https://docs.docker.com/installation/#installation
|
||||
[38]:https://coreos.com/
|
||||
[39]:http://www.projectatomic.io/
|
||||
[40]:https://github.com/coreos/fleet
|
||||
[41]:https://github.com/coreos/etcd
|
@ -0,0 +1,100 @@
|
||||
The Good, The Bad And The Ugly Of Linux In 2014
|
||||
================================================================================
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/Buggest_Linux_Stories.jpeg)
|
||||
|
||||
Year 2014 is coming to an end and this is the time to summarize some of the **biggest Linux stories in year 2014**. All year round we have followed some good, some bad and some ugly stories related to Linux and Open Source. Let’ have a quick recap on how was the year 2014 for Linux.
|
||||
|
||||
### The Good ###
|
||||
|
||||
First and foremost, let’s see what were the positive stories for Linux lovers in 2014.
|
||||
|
||||
#### Netflix on Linux ####
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/netflix-linux.jpg)
|
||||
|
||||
Linux users have been trying several workaround to make Netflix work on Linux from using Wine to [using beta features in Chrome][1]. Good thing is that Netflix finally brought native support on Linux in year 2014 bringing smiles on the faces of Linux users where Netflix is available. People would still have to rely on workaround to [use Netflix outside US][2] (and other countries where Netflix is available officially).
|
||||
|
||||
#### Open Source/Linux adoption in European countries ####
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/OpenSource_World.jpg)
|
||||
|
||||
Give the credit to economic meltdown, if you want, but Linux and Open Source adoption has been gripping European cities. I am not talking about Linux adoption by individuals but by government and authorities. All year round we heard stories of how [French][3] and [Italian cities saved millions of Euro by switching to Linux][4] and Open Office. And the trend was not limited just to Italy and France, the same could be seen in Spain, [Switzerland][5] and [Germany][6].
|
||||
|
||||
#### Windows 10 takes inspiration from Linux ####
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/10/Windows10_Linux.jpg)
|
||||
|
||||
The upcoming release of Microsoft’s flagship operating system, Windows will be called Windows 10 (no Windows 9). And Windows 10 boasts of a number of new features. But these ‘new features’ are new to Microsoft world only and most of those have been existing in Linux world for years. Have a look at such [Windows 10 features copied from Linux][7].
|
||||
|
||||
### The Bad ###
|
||||
|
||||
Everything was not rosy for Linux in year 2014. Some events happened that dented the image of Linux/Open Source.
|
||||
|
||||
#### Heartbleed ####
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/heartbleed-bug.jpg)
|
||||
|
||||
In April this year, a vulnerability was detected in [OpenSSL][8]. This bug, named [Heartbleed][9], impacted over half a million ‘secured’ websites including Facebook and Google. The bug actually allowed anyone to read memory of the system and hence giving the access to the key that is used to encrypt the traffic. A [comic at xkcd explains the Heartbleed][10] in easier way. Needless to say that this vulnerability was fixed in an update to OpenSSL.
|
||||
|
||||
#### Shellshock ####
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/shellshock_Linux_check.jpeg)
|
||||
|
||||
As if Heartbleed was not enough, Linux world was further rocked in September with a vulnerability in Bash. The bug, named [Shellshock][11], further put Linux system at risk of remote attacks. The vulnerability was exploited by hackers to launch DDoS attacks. An update to Bash version supposedly fixed the issue.
|
||||
|
||||
#### Ubuntu Phone and Steam Console ####
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/Ubuntu_phone.png)
|
||||
|
||||
Promises after promises, hopes after hopes. But even in year 2014 no one saw Ubuntu Phone or Steam gaming consoles. Lots of talks were around Ubuntu Phone tough. From February 2014 release to September to December, finally it is (hopefully slotted) for February 2015 release. No information on Steam consoles though. Read more for [Ubuntu Phone specification, price and release date][12].
|
||||
|
||||
### The Ugly ###
|
||||
|
||||
Things turned ugly with war over systemd adoption.
|
||||
|
||||
### systemd controversy ###
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/Systemd_everywhere.jpg)
|
||||
|
||||
[init vs systemd][13] dispute is going on for some time. But it turned ugly in 2014 as systemd poised to replace init on several major Linux distribution including Debian, Ubuntu, OpenSUSE, Arch Linux and Fedora. It turned so ugly that it was not just limited to boycottsystemd.org like websites. Lennart Poettering (lead developer and author of systemd) claimed in a [Google Plus post][14] that anti systemd people were “collecting bitcoins to hire a hitman to kill him”. Lennart went on calling Open Source community “a sick place to be in”. People have taken this battle as far as forking Debian to a new OS named [Devuan][15].
|
||||
|
||||
### And the weird ###
|
||||
|
||||
Along with the good, the bad and the ugly comes the weird and that weird is none other than Microsoft.
|
||||
|
||||
#### Microsoft loves Linux ####
|
||||
|
||||
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/Microsoft_Loves_Linux.png)
|
||||
|
||||
Yes! You read it right. [Microsoft loves Linux][16]. The same Microsoft whose CEO Steve Ballmer had once said that [Linux is cancer][17]. Change in Microsoft leadership saw some changes in its approach towards Linux and Open Source when the new CEO Satya Nadella announced that Microsoft loves Linux. This new found love for Linux is actually Microsoft’s attempt to make [Azure][18] as a better cloud platform. For this purpose it needs Hyper-V (core of Azure) virtualization to work with Linux. This desperation has made [Microsoft, fifth biggest contributor to Linux kernel][19].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://itsfoss.com/biggest-linux-stories-2014/
|
||||
|
||||
作者:[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/watch-netflix-in-ubuntu-14-04/
|
||||
[2]:http://itsfoss.com/easiest-watch-netflix-hulu-usa/
|
||||
[3]:http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/
|
||||
[4]:http://itsfoss.com/italian-city-turin-open-source/
|
||||
[5]:http://itsfoss.com/170-primary-public-schools-geneva-switch-ubuntu/
|
||||
[6]:http://itsfoss.com/german-town-gummersbach-completes-switch-open-source/
|
||||
[7]:http://itsfoss.com/windows-10-inspired-linux/
|
||||
[8]:http://en.wikipedia.org/wiki/OpenSSL
|
||||
[9]:http://heartbleed.com/
|
||||
[10]:http://xkcd.com/1354/
|
||||
[11]:http://itsfoss.com/linux-shellshock-check-fix/
|
||||
[12]:http://itsfoss.com/ubuntu-phone-specification-release-date-pricing/
|
||||
[13]:http://www.tecmint.com/systemd-replaces-init-in-linux/
|
||||
[14]:https://plus.google.com/+LennartPoetteringTheOneAndOnly/posts/J2TZrTvu7vd
|
||||
[15]:http://debianfork.org/
|
||||
[16]:http://thenewstack.io/microsoft-professes-love-for-linux-adds-support-for-coreos-cloudera-and-host-of-new-features/
|
||||
[17]:http://www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_cancer/
|
||||
[18]:http://azure.microsoft.com/en-us/
|
||||
[19]:http://www.zdnet.com/article/top-five-linux-contributor-microsoft/
|
@ -1,307 +0,0 @@
|
||||
Translating by GOLinux!
|
||||
Setting up a ‘PXE Network Boot Server’ for Multiple Linux Distribution Installations in RHEL/CentOS 7
|
||||
================================================================================
|
||||
**PXE Server** – Preboot eXecution Environment – instructs a client computer to boot, run or install an operating system directly form a network interface, eliminating the need to burn a CD/DVD or use a physical medium, or, can ease the job of installing Linux distributions on your network infrastructure on multiple machines the same time.
|
||||
|
||||
![Setting PXE Network Boot in RHEL/CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/10/Setting-PXE-Network-Boot-in-CentOS.png)
|
||||
Setting PXE Network Boot in RHEL/CentOS 7
|
||||
|
||||
#### Requirements ####
|
||||
|
||||
- [CentOS 7 Minimal Installation Procedure][1]
|
||||
- [RHEL 7 Minimal Installation Procedure][2]
|
||||
- [Configure Static IP Address in RHEL/CentOS 7][3]
|
||||
- [Remove Unwanted Services in RHEL/CentOS 7][4]
|
||||
- [Install NTP Server to Set Correct System Time in RHEL/CentOS 7][5]
|
||||
|
||||
This article will explain how you can install and configure a **PXE Server** on **RHEL/CentOS 7** x64-bit with mirrored local installation repositories, sources provided by CentOS 7 DVD ISO image, with the help of **DNSMASQ** Server.
|
||||
|
||||
Which provides **DNS** and **DHCP** services, **Syslinux** package which provides bootloaders for network booting, **TFTP-Server**, which makes bootable images available to be downloaded via network using **Trivial File Transfer Protocol** (TFTP) and **VSFTPD** Server which will host the local mounted mirrored DVD image – which will act as an official RHEL/CentOS 7 mirror installation repository from where the installer will extract its required packages.
|
||||
|
||||
### Step 1: Install and configure DNSMASQ Server ###
|
||||
|
||||
**1.** No need to remind you that is absolutely demanding that one of your network card interface, in case your server poses more NICs, must be configured with a static IP address from the same IP range that belongs to the network segment that will provide PXE services.
|
||||
|
||||
So, after you have configured your static IP Address, updated your system and performed other initial settings, use the following command to install **DNSMASQ** daemon.
|
||||
|
||||
# yum install dnsmasq
|
||||
|
||||
![Install dnsmasq Package](http://www.tecmint.com/wp-content/uploads/2014/10/Install-dnsmasq-in-CentOS.jpg)
|
||||
Install dnsmasq Package
|
||||
|
||||
**2.** DNSMASQ main default configuration file located in **/etc** directory is self-explanatory but intends to be quite difficult to edit, do to its highly commented explanations.
|
||||
|
||||
First make sure you backup this file in case you need to review it later and, then, create a new blank configuration file using your favorite text editor by issuing the following commands.
|
||||
|
||||
# mv /etc/dnsmasq.conf /etc/dnsmasq.conf.backup
|
||||
# nano /etc/dnsmasq.conf
|
||||
|
||||
**3.** Now, copy and paste the following configurations on **dnsmasq.conf** file and assure that you change the below explained statements to match your network settings accordingly.
|
||||
|
||||
interface=eno16777736,lo
|
||||
#bind-interfaces
|
||||
domain=centos7.lan
|
||||
# DHCP range-leases
|
||||
dhcp-range= eno16777736,192.168.1.3,192.168.1.253,255.255.255.0,1h
|
||||
# PXE
|
||||
dhcp-boot=pxelinux.0,pxeserver,192.168.1.20
|
||||
# Gateway
|
||||
dhcp-option=3,192.168.1.1
|
||||
# DNS
|
||||
dhcp-option=6,92.168.1.1, 8.8.8.8
|
||||
server=8.8.4.4
|
||||
# Broadcast Address
|
||||
dhcp-option=28,10.0.0.255
|
||||
# NTP Server
|
||||
dhcp-option=42,0.0.0.0
|
||||
|
||||
pxe-prompt="Press F8 for menu.", 60
|
||||
pxe-service=x86PC, "Install CentOS 7 from network server 192.168.1.20", pxelinux
|
||||
enable-tftp
|
||||
tftp-root=/var/lib/tftpboot
|
||||
|
||||
![Dnsmasq Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/dnsmasq-configuration.jpg)
|
||||
Dnsmasq Configuration
|
||||
|
||||
The statements that you need to change are follows:
|
||||
|
||||
- **interface** – Interfaces that the server should listen and provide services.
|
||||
- **bind-interfaces** – Uncomment to bind only on this interface.
|
||||
- **domain** – Replace it with your domain name.
|
||||
- **dhcp-range** – Replace it with IP range defined by your network mask on this segment.
|
||||
- **dhcp-boot** – Replace the IP statement with your interface IP Address.
|
||||
- **dhcp-option=3,192.168.1.1** – Replace the IP Address with your network segment Gateway.
|
||||
- **dhcp-option=6,92.168.1.1** – Replace the IP Address with your DNS Server IP – several DNS IPs can be defined.
|
||||
- **server=8.8.4.4** – Put your DNS forwarders IPs Addresses.
|
||||
- **dhcp-option=28,10.0.0.255** – Replace the IP Address with network broadcast address –optionally.
|
||||
- **dhcp-option=42,0.0.0.0** – Put your network time servers – optionally (0.0.0.0 Address is for self-reference).
|
||||
- **pxe-prompt** – Leave it as default – means to hit F8 key for entering menu 60 with seconds wait time..
|
||||
- **pxe=service** – Use x86PC for 32-bit/64-bit architectures and enter a menu description prompt under string quotes. Other values types can be: PC98, IA64_EFI, Alpha, Arc_x86, Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI.
|
||||
- **enable-tftp** – Enables the build-in TFTP server.
|
||||
- **tftp-root** – Use /var/lib/tftpboot – the location for all netbooting files.
|
||||
|
||||
For other advanced options concerning configuration file feel free to read [dnsmasq manual][6].
|
||||
|
||||
### Step 2: Install SYSLINUX Bootloaders ###
|
||||
|
||||
**4.** After you have edited and saved **DNSMASQ** main configuration file, go ahead and install **Syslinx** PXE bootloader package by issuing the following command.
|
||||
|
||||
# yum install syslinux
|
||||
|
||||
![Install Syslinux Bootloaders](http://www.tecmint.com/wp-content/uploads/2014/10/install-syslinux-bootloaders.jpg)
|
||||
Install Syslinux Bootloaders
|
||||
|
||||
**5.** The PXE bootloaders files reside in **/usr/share/syslinux** absolute system path, so you can check it by listing this path content. This step is optional, but you might need to be aware of this path because on the next step, we will copy of all its content to **TFTP Server** path.
|
||||
|
||||
# ls /usr/share/syslinux
|
||||
|
||||
![Syslinux Files](http://www.tecmint.com/wp-content/uploads/2014/10/syslinux-files.jpg)
|
||||
Syslinux Files
|
||||
|
||||
### Step 3: Install TFTP-Server and Populate it with SYSLINUX Bootloaders ###
|
||||
|
||||
**6.** Now, let’s move to next step and install **TFTP-Server** and, then, copy all bootloders files provided by Syslinux package from the above listed location to **/var/lib/tftpboot** path by issuing the following commands.
|
||||
|
||||
# yum install tftp-server
|
||||
# cp -r /usr/share/syslinux/* /var/lib/tftpboot
|
||||
|
||||
![Install TFTP Server](http://www.tecmint.com/wp-content/uploads/2014/10/install-tftp-server.jpg)
|
||||
Install TFTP Server
|
||||
|
||||
### Step 4: Setup PXE Server Configuration File ###
|
||||
|
||||
**7.** Typically the **PXE Server** reads its configuration from a group of specific files (**GUID** files – first, **MAC** files – next, **Default** file – last) hosted in a folder called **pxelinux.cfg**, which must be located in the directory specified in **tftp-root** statement from DNSMASQ main configuration file.
|
||||
|
||||
Create the required directory **pxelinux.cfg** and populate it with a **default** file by issuing the following commands.
|
||||
|
||||
# mkdir /var/lib/tftpboot/pxelinux.cfg
|
||||
# touch /var/lib/tftpboot/pxelinux.cfg/default
|
||||
|
||||
**8.** Now it’s time to edit **PXE Server** configuration file with valid Linux distributions installation options. Also note that all paths used in this file must be relative to the **/var/lib/tftpboot** directory.
|
||||
|
||||
Below you can see an example configuration file that you can use it, but modify the installation images (kernel and initrd files), protocols (FTP, HTTP, HTTPS, NFS) and IPs to reflect your network installation source repositories and paths accordingly.
|
||||
|
||||
# nano /var/lib/tftpboot/pxelinux.cfg/default
|
||||
|
||||
Add the following whole excerpt to the file.
|
||||
|
||||
default menu.c32
|
||||
prompt 0
|
||||
timeout 300
|
||||
ONTIMEOUT local
|
||||
|
||||
menu title ########## PXE Boot Menu ##########
|
||||
|
||||
label 1
|
||||
menu label ^1) Install CentOS 7 x64 with Local Repo
|
||||
kernel centos7/vmlinuz
|
||||
append initrd=centos7/initrd.img method=ftp://192.168.1.20/pub devfs=nomount
|
||||
|
||||
label 2
|
||||
menu label ^2) Install CentOS 7 x64 with http://mirror.centos.org Repo
|
||||
kernel centos7/vmlinuz
|
||||
append initrd=centos7/initrd.img method=http://mirror.centos.org/centos/7/os/x86_64/ devfs=nomount ip=dhcp
|
||||
|
||||
label 3
|
||||
menu label ^3) Install CentOS 7 x64 with Local Repo using VNC
|
||||
kernel centos7/vmlinuz
|
||||
append initrd=centos7/initrd.img method=ftp://192.168.1.20/pub devfs=nomount inst.vnc inst.vncpassword=password
|
||||
|
||||
label 4
|
||||
menu label ^4) Boot from local drive
|
||||
|
||||
![Configure PXE Server](http://www.tecmint.com/wp-content/uploads/2014/10/configure-pxe-server.jpg)
|
||||
Configure PXE Server
|
||||
|
||||
As you can see CentOS 7 boot images (kernel and initrd) reside in a directory named **centos7** relative to **/var/lib/tftpboot** (on an absolute system path this would mean **/var/lib/tftpboot/centos7**) and the installer repositories can be reached by using FTP protocol on **192.168.1.20/pub** network location – in this case the repos are hosted locally because the IP address is the same as the PXE server address).
|
||||
|
||||
Also menu **label 3** specifies that the client installation should be done from a remote location via **VNC** (here replace VNC password with a strong password) in case you install on a headless client and the menu **label 2** specifies as installation sources a CentOS 7 official Internet mirror (this case requires an Internet connection available on client through DHCP and NAT).
|
||||
|
||||
**Important**: As you see in the above configuration, we’ve used CentOS 7 for demonstration purpose, but you can also define RHEL 7 images, and following whole instructions and configurations are based on CentOS 7 only, so be careful while choosing distribution.
|
||||
|
||||
### Step 5: Add CentOS 7 Boot Images to PXE Server ###
|
||||
|
||||
**9.** For this step CentOS kernel and initrd files are required. To get those files you need the **CentOS 7 DVD ISO** Image. So, go ahead and download CentOS DVD Image, put it in your DVD drive and mount the image to **/mnt** system path by issuing the below command.
|
||||
|
||||
The reason for using the DVD and not a Minimal CD Image is the fact that later this DVD content would be used to create the locally installer repositories for **FTP** sources.
|
||||
|
||||
# mount -o loop /dev/cdrom /mnt
|
||||
# ls /mnt
|
||||
|
||||
![Mount CentOS DVD](http://www.tecmint.com/wp-content/uploads/2014/10/mount-centos-dvd.jpg)
|
||||
Mount CentOS DVD
|
||||
|
||||
If your machine has no DVD drive you can also download **CentOS 7 DVD ISO** locally using **wget** or **curl** utilities from a [CentOS mirror][7] and mount it.
|
||||
|
||||
# wget http://mirrors.xservers.ro/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso
|
||||
# mount -o loop /path/to/centos-dvd.iso /mnt
|
||||
|
||||
**10.** After the DVD content is made available, create the **centos7** directory and copy CentOS 7 bootable kernel and initrd images from the DVD mounted location to centos7 folder structure.
|
||||
|
||||
# mkdir /var/lib/tftpboot/centos7
|
||||
# cp /mnt/images/pxeboot/vmlinuz /var/lib/tftpboot/centos7
|
||||
# cp /mnt/images/pxeboot/initrd.img /var/lib/tftpboot/centos7
|
||||
|
||||
![Copy CentOS Bootable Files](http://www.tecmint.com/wp-content/uploads/2014/10/copy-centos-bootable-files.jpg)
|
||||
Copy CentOS Bootable Files
|
||||
|
||||
The reason for using this approach is that, later you can create new separate directories in **/var/lib/tftpboot** path and add other Linux distributions to PXE menu without messing up the entire directory structure.
|
||||
|
||||
### Step 6: Create CentOS 7 Local Mirror Installation Source ###
|
||||
|
||||
**11.** Although you can setup **Installation Source Mirrors** via a variety of protocols such as HTTP, HTTPS or NFS, for this guide, I have chosen **FTP** protocol because is very reliable and easy to setup with the help of **vsftpd** server.
|
||||
|
||||
Further install vsftpd daemon, copy all DVD mounted content to **vsftpd** default server path (**/var/ftp/pub**) – this can take a while depending on your system resources and append readable permissions to this path by issuing the following commands.
|
||||
|
||||
# yum install vsftpd
|
||||
# cp -r /mnt/* /var/ftp/pub/
|
||||
# chmod -R 755 /var/ftp/pub
|
||||
|
||||
![Install Vsftpd Server](http://www.tecmint.com/wp-content/uploads/2014/10/install-vsftpd-in-centos.jpg)
|
||||
Install Vsftpd Server
|
||||
|
||||
![Copy Files to FTP Path](http://www.tecmint.com/wp-content/uploads/2014/10/copy-files-to-ftp-path.jpg)
|
||||
Copy Files to FTP Path
|
||||
|
||||
![Set Permissions on FTP Path](http://www.tecmint.com/wp-content/uploads/2014/10/set-permission-on-ftp-path.jpg)
|
||||
Set Permissions on FTP Path
|
||||
|
||||
### Step 7: Start and Enable Daemons System-Wide ###
|
||||
|
||||
**12.** Now that the PXE server configuration is finally finished, start **DNSMASQ** and **VSFTPD** servers, verify their status and enable it system-wide, to automatically start after every system reboot, by running the below commands.
|
||||
|
||||
# systemctl start dnsmasq
|
||||
# systemctl status dnsmasq
|
||||
# systemctl start vsftpd
|
||||
# systemctl status vsftpd
|
||||
# systemctl enable dnsmasq
|
||||
# systemctl enable vsftpd
|
||||
|
||||
![Start Dnsmasq Service](http://www.tecmint.com/wp-content/uploads/2014/10/start-dnsmasq.jpg)
|
||||
Start Dnsmasq Service
|
||||
|
||||
![Start Vsftpd Service](http://www.tecmint.com/wp-content/uploads/2014/10/start-vsftpd.jpg)
|
||||
Start Vsftpd Service
|
||||
|
||||
### Step 8: Open Firewall and Test FTP Installation Source ###
|
||||
|
||||
**13.** To get a list of all ports that needs to be open on your Firewall in order for client machines to reach and boot from PXE server, run **netstat** command and add CentOS 7 Firewalld rules accordingly to dnsmasq and vsftpd listening ports.
|
||||
|
||||
# netstat -tulpn
|
||||
# firewall-cmd --add-service=ftp --permanent ## Port 21
|
||||
# firewall-cmd --add-service=dns --permanent ## Port 53
|
||||
# firewall-cmd --add-service=dhcp --permanent ## Port 67
|
||||
# firewall-cmd --add-port=69/udp --permanent ## Port for TFTP
|
||||
# firewall-cmd --add-port=4011/udp --permanent ## Port for ProxyDHCP
|
||||
# firewall-cmd --reload ## Apply rules
|
||||
|
||||
![Check Listening Ports](http://www.tecmint.com/wp-content/uploads/2014/10/check-listening-ports.jpg)
|
||||
Check Listening Ports
|
||||
|
||||
![Open Ports in Firewall](http://www.tecmint.com/wp-content/uploads/2014/10/open-ports-on-firewall.jpg)
|
||||
Open Ports in Firewall
|
||||
|
||||
**14.** To test FTP Installation Source network path open a browser locally ([**lynx**][8] should do it) or on a different computer and type the IP Address of your PXE server with FTP protocol followed by **/pub** network location on URL filed and the result should be as presented in the below screenshot.
|
||||
|
||||
ftp://192.168.1.20/pub
|
||||
|
||||
![Access FTP Files via Browser](http://www.tecmint.com/wp-content/uploads/2014/10/browse-ftp-files.jpg)
|
||||
Access FTP Files via Browser
|
||||
|
||||
**15.** To debug PXE server for eventual misconfigurations or other information and diagnostics in live mode run the following command.
|
||||
|
||||
# tailf /var/log/messages
|
||||
|
||||
![Check PXE Logs for Errors](http://www.tecmint.com/wp-content/uploads/2014/10/check-pxe-errors.jpg)
|
||||
Check PXE Logs for Errors
|
||||
|
||||
**16.** Finally, the last required step that you need to do is to unmount CentOS 7 DVD and remove the physical medium.
|
||||
|
||||
# umount /mnt
|
||||
|
||||
### Step 9: Configure Clients to Boot from Network ###
|
||||
|
||||
**17.** Now your clients can boot and install CentOS 7 on their machines by configuring Network Boot as **primary boot device** from their systems BIOS or by hitting a specified key during **BIOS POST** operations as specified in motherboard manual.
|
||||
|
||||
In order to choose network booting. After first PXE prompt appears, press **F8** key to enter presentation and then hit **Enter** key to proceed forward to PXE menu.
|
||||
|
||||
![PXE Network Boot](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-network-boot.jpg)
|
||||
PXE Network Boot
|
||||
|
||||
![PXE Network OS Boot](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-network-os-boot.jpg)
|
||||
PXE Network OS Boot
|
||||
|
||||
**18.** Once you have reached PXE menu, choose your CentOS 7 installation type, hit **Enter** key and continue with the installation procedure the same way as you might install it from a local media boot device.
|
||||
|
||||
Please note down that using variant 2 from this menu requires an active Internet connection on the target client. Also, on below screenshots you can see an example of a client remote installation via VNC.
|
||||
|
||||
![PXE Menu](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-menu.jpg)
|
||||
PXE Menu
|
||||
|
||||
![Remote Linux Installation via VNC](http://www.tecmint.com/wp-content/uploads/2014/10/os-installation-via-vnc.jpg)
|
||||
Remote Linux Installation via VNC
|
||||
|
||||
![Remote Installation of CentOS](http://www.tecmint.com/wp-content/uploads/2014/10/remote-centos-installation.jpg)
|
||||
Remote Installation of CentOS
|
||||
|
||||
That’s all for setting up a minimal **PXE Server** on **CentOS 7**. On my next article from this series, I will discuss other issues concerning this PXE server configuration such as how to setup automated installations of **CentOS 7** using **Kickstart** files and adding other Linux distributions to PXE menu – **Ubuntu Server** and **Debian 7**.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/
|
||||
|
||||
作者:[Matei Cezar][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/cezarmatei/
|
||||
[1]:http://www.tecmint.com/centos-7-installation/
|
||||
[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/
|
||||
[3]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/
|
||||
[4]:http://www.tecmint.com/remove-unwanted-services-in-centos-7/
|
||||
[5]:http://www.tecmint.com/install-ntp-server-in-centos/
|
||||
[6]:http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
|
||||
[7]:http://isoredirect.centos.org/centos/7/isos/x86_64/
|
||||
[8]:http://www.tecmint.com/command-line-web-browsers/
|
@ -1,3 +1,5 @@
|
||||
Vic020
|
||||
|
||||
Linux FAQs with Answers--How to install Kingsoft Office on Linux
|
||||
================================================================================
|
||||
> **Question**: I heard good things about Kingsoft Office, so I would like to try it out on my Linux. How can I install Kingsoft Office on [insert your Linux distro]?
|
||||
|
@ -0,0 +1,265 @@
|
||||
Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM
|
||||
================================================================================
|
||||
**TL;DR In a local, Vagrant-based environment HHVM lost, probably due to a bug; it’s still investigated with the help of the HHVM guys! However on a DigitalOcean 4GB box it beat even the latest build of PHP-NG!**
|
||||
|
||||
![](https://kinsta.com/wp-content/uploads/2014/07/phphhvm.jpg)
|
||||
|
||||
**Update: Please take a look at the results at the end of the article! They reflect the power of HHVM better (after the JIT warmup), for some reason we cannot get these results with all setups though.
|
||||
|
||||
The tests below were done in a Vagrant/VVV environment, the results are still interesting, it might be a bug in HHVM or the Vagrant setup that’s preventing it from kicking into high speed, we’re investigating the issue with the HHVM guys.**
|
||||
|
||||
If you remember we [wrote an article a good couple of months ago][1] when WordPress 3.9 came out that HHVM was fully supported beginning with that release, and we were all happy about it. The initial benchmark results showed HHVM to be far more superior than the Zend engine that’s currently powering all PHP builds. Then the problems came:
|
||||
|
||||
- HHVM can only be run as one user, which means less security (in shared environments)
|
||||
- HHVM does not restart itself after it crashes, and unfortunately it still does that quite often
|
||||
- HHVM uses a lot of memory right from the start, and yes, it per-request memory usage will be lower once you scale compared to PHP-FPM
|
||||
|
||||
Obviously you have to compromise based on your (or rather your sites’) needs but is it worth it? How much of a performance gain can you expect by switching to HHVM?
|
||||
|
||||
At Kinsta we really like to test everything new and generally optimize everything to provide the best environment to our clients. Today I finally took the time to set up a test environment and do some tests to compare a couple of different builds with a fresh out of the box WordPress install and one that has a bunch of content added plus runs WooCommerce! To measure the script running time I simply added the
|
||||
|
||||
<?php timer_stop(1); ?>
|
||||
|
||||
line before the /body tag of the footer.php’s.
|
||||
|
||||
**Note:
|
||||
Previously this section contained benchmarks made with Vagrant/Virtualbox/Ubuntu14.04 however for some reason HHVM was really underperforming, probably due to a bug or a limitation of the virtualized environment. We feel that these test results do not reflect the reality so we re-run the tests on a cloud server and consider these valid.**
|
||||
|
||||
Here are the exact setup details of the environment:
|
||||
|
||||
- DigitalOcean 4GB droplet (2 CPU cores, 4GB RAM)
|
||||
- Ubuntu 14.04, MariaDB10
|
||||
- Test site: Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1
|
||||
- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d) and HHVM 3.2.0 (version says PHP 5.6.99-hhvm)
|
||||
|
||||
**Without further ado, these were my test results, the lower the better, values in seconds:**
|
||||
|
||||
### DigitalOcean 4GB droplet ###
|
||||
|
||||
Seconds, 10 runs, lower the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
It looks like that PHP-NG achieves its peak performance after the first run! HHVM needs a couple more reloads, but their performance seems to be almost equal! I can’t wait until PHP-NG is merged into the master! :)
|
||||
|
||||
Hits in a minute, higher the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
**PHP 5.5.15 OpCache Disabled**
|
||||
|
||||
- Transactions: **236 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.03 secs
|
||||
- Data transferred: 2.40 MB
|
||||
- Response time: 2.47 secs
|
||||
- Transaction rate: 4.00 trans/sec
|
||||
- Throughput: 0.04 MB/sec
|
||||
- Concurrency: 9.87
|
||||
- Successful transactions: 236
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 4.44
|
||||
- Shortest transaction: 0.48
|
||||
|
||||
**PHP 5.5.15 OpCache Enabled**
|
||||
|
||||
- Transactions: **441 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.55 secs
|
||||
- Data transferred: 4.48 MB
|
||||
- Response time: 1.34 secs
|
||||
- Transaction rate: 7.41 trans/sec
|
||||
- Throughput: 0.08 MB/sec
|
||||
- Concurrency: 9.91
|
||||
- Successful transactions: 441
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 2.19
|
||||
- Shortest transaction: 0.64
|
||||
|
||||
**PHP 5.6 RC2 OpCache Disabled**
|
||||
|
||||
- Transactions: **207 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.87 secs
|
||||
- Data transferred: 2.10 MB
|
||||
- Response time: 2.80 secs
|
||||
- Transaction rate: 3.46 trans/sec
|
||||
- Throughput: 0.04 MB/sec
|
||||
- Concurrency: 9.68
|
||||
- Successful transactions: 207
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 3.65
|
||||
- Shortest transaction: 0.54
|
||||
|
||||
**PHP 5.6 RC2 OpCache Enabled**
|
||||
|
||||
- Transactions: **412 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.03 secs
|
||||
- Data transferred: 4.18 MB
|
||||
- Response time: 1.42 secs
|
||||
- Transaction rate: 6.98 trans/sec
|
||||
- Throughput: 0.07 MB/sec
|
||||
- Concurrency: 9.88
|
||||
- Successful transactions: 412
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 1.93
|
||||
- Shortest transaction: 0.34
|
||||
|
||||
**HHVM 3.2.0 (version says PHP 5.6.99-hhvm)**
|
||||
|
||||
- Transactions: **955 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.69 secs
|
||||
- Data transferred: 9.18 MB
|
||||
- Response time: 0.62 secs
|
||||
- Transaction rate: 16.00 trans/sec
|
||||
- Throughput: 0.15 MB/sec
|
||||
- Concurrency: 9.94
|
||||
- Successful transactions: 955
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 0.85
|
||||
- Shortest transaction: 0.23
|
||||
|
||||
**PHP-NG OpCache Enabled (built: Jul 29 2014 )**
|
||||
|
||||
- Transactions: **849 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.88 secs
|
||||
- Data transferred: 8.63 MB
|
||||
- Response time: 0.70 secs
|
||||
- Transaction rate: 14.18 trans/sec
|
||||
- Throughput: 0.14 MB/sec
|
||||
- Concurrency: 9.94
|
||||
- Successful transactions: 849
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 1.06
|
||||
- Shortest transaction: 0.13
|
||||
|
||||
----------
|
||||
|
||||
**Note:
|
||||
These are the previous test results, they’re faulty. I left them here for future reference but please do NOT consider these values a truthful representation!**
|
||||
|
||||
Here are the exact setup details of the environment:
|
||||
|
||||
- Apple MacBook Pro mid-2011 (Intel Core i7 2 GHz 4 cores, 4GB RAM, 256GB Ocz Vertex 3 MI)
|
||||
- Current Varying Vagrant Vagrants build with Ubuntu 14.04, nginx 1.6.x, mysql 5.5.x, etc.
|
||||
- Test site 1: WordPress 3.9.1 bare minimum
|
||||
- Test site 2: Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1
|
||||
- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d) and HHVM 3.2.0 (version says PHP 5.6.99-hhvm)
|
||||
|
||||
**Default Theme, Default WordPress 3.9.1, PHP 5.5.9-1ubuntu4.3 (with OpCache 7.0.3)**
|
||||
|
||||
**Faulty results. Please read the note above!** Seconds, 10 runs, lower the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
### Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1 (OpCache Disabled) ###
|
||||
|
||||
**Faulty results. Please read the note above**! Seconds, 10 runs, lower the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
### Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1 (OpCache Enabled) ###
|
||||
|
||||
**Faulty results. Please read the note above!** Seconds, 10 runs, lower the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
**Siege
|
||||
parameters: 10 concurrent users for 1 minute: siege -c 10 -b -t 1M**
|
||||
|
||||
**Faulty results. Please read the note above!** Hits in a minute, higher the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
**PHP5.5 OpCache Disabled (PHP 5.5.15-1+deb.sury.org~trusty+1)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 35 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.04 secs
|
||||
- Data transferred: 2.03 MB
|
||||
- Response time: 14.56 secs
|
||||
- Transaction rate: 0.59 trans/sec
|
||||
- Throughput: 0.03 MB/sec
|
||||
- Concurrency: 8.63
|
||||
- Successful transactions: 35
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 18.73
|
||||
- Shortest transaction: 5.80
|
||||
|
||||
**HHVM 3.2.0 (version says PHP 5.6.99-hhvm)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 44 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.53 secs
|
||||
- Data transferred: 0.42 MB
|
||||
- Response time: 12.00 secs
|
||||
- Transaction rate: 0.74 trans/sec
|
||||
- Throughput: 0.01 MB/sec
|
||||
- Concurrency: 8.87
|
||||
- Successful transactions: 44
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 13.40
|
||||
- Shortest transaction: 2.65
|
||||
|
||||
**PHP5.5 OpCache Enabled (PHP 5.5.15-1+deb.sury.org~trusty+1 with OpCache 7.0.4-dev)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 100 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.30 secs
|
||||
- Data transferred: 5.81 MB
|
||||
- Response time: 5.69 secs
|
||||
- Transaction rate: 1.69 trans/sec
|
||||
- Throughput: 0.10 MB/sec
|
||||
- Concurrency: 9.60
|
||||
- Successful transactions: 100
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 7.25
|
||||
- Shortest transaction: 2.82
|
||||
|
||||
**PHP5.6 OpCache Enabled (PHP 5.6.0RC2 with OpCache 7.0.4-dev)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 103 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.99 secs
|
||||
- Data transferred: 5.98 MB
|
||||
- Response time: 5.51 secs
|
||||
- Transaction rate: 1.72 trans/sec
|
||||
- Throughput: 0.10 MB/sec
|
||||
- Concurrency: 9.45
|
||||
- Successful transactions: 103
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 6.87
|
||||
- Shortest transaction: 2.52
|
||||
|
||||
**PHP-NG OpCache Enabled (20140718-git-6cc487d)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 124 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.32 secs
|
||||
- Data transferred: 7.19 MB
|
||||
- Response time: 4.58 secs
|
||||
- Transaction rate: 2.09 trans/sec
|
||||
- Throughput: 0.12 MB/sec
|
||||
- Concurrency: 9.57
|
||||
- Successful transactions: 124
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 6.86
|
||||
- Shortest transaction: 2.24
|
||||
|
||||
**What do you think about this test? Did I miss something? What would you like to see in the next benchmarking article? Please leave your comment below!**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://kinsta.com/blog/real-world-wordpress-benchmarks-with-php5-5-php5-6-php-ng-and-hhvm/
|
||||
|
||||
作者:[Mark Gavalda][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://kinsta.com/blog/author/kinstadmin/
|
||||
[1]:https://kinsta.com/blog/hhvm-and-wordpress/
|
168
translated/talk/20141203 Docker--Present and Future.md
Normal file
168
translated/talk/20141203 Docker--Present and Future.md
Normal file
@ -0,0 +1,168 @@
|
||||
Docker的现状与未来
|
||||
================================================================================
|
||||
|
||||
### Docker - 故事渊源流长 ###
|
||||
|
||||
Docker是一个专为Linux容器而设计的工具集,用于‘构建,交付和运行’分布式应用。它最初是通过DotCloud作为一个开源项目在2013年3月的时候发布的。这个项目越来越受欢迎,这使得DotCloud更名为Docker公司(并最终 [出售了原有的PaaS业务][1]).[Docker 1.0][2]是在2014年6月发布的,而且延续了之前每月更新一个版本的习惯。
|
||||
|
||||
|
||||
1.0版本的发布标志着Docker公司认为这个平台的充分成熟已经足以用于生产环境中(由本公司与合作伙伴提供付费支持选项).每个月发布的更新显示,该项目正在迅速发展,增添一些新特性、解决一些他们发现的问题。然而该项目已经成功地从‘运行’和‘交付’实现分离,所以任何版本的Docker镜像源都可以与其它版本共同使用(具备向前和向后兼容的特性),这为Docker使用的快速变化提供了稳定的保障。
|
||||
|
||||
Docker之所以能够成为最受欢迎的开源项目之一除了很多人会认为是的炒作成分,也是由坚实的物质基础奠定的。Docker的影响力已经得到整个行业许多品牌的支持,包括亚马逊, Canonical公司, 世纪互联, 谷歌, IBM, 微软, New Relic, Pivotal, 红帽和VMware. 这使只要Linux可使用的地方,Docker的使用便无处不在。除了这些鼎鼎有名的大公司以外,许多初创公司也在围绕着Docker在成长,或者改变他们的发展方向来与Docker更好地结合起来。这些合作关系(无论大于小)都将帮助推动Docker核心项目及其周边生态环境的快速发展。
|
||||
|
||||
|
||||
### Docker技术的简要综述 ###
|
||||
|
||||
Docker利用Linux的一些内核工具例如[cGroups][3],命名空间和[SElinux][4]来实现容器之间的隔离。起初Docker只是[LXC][5]容器管理器子系统的前端,但是在0.9版本中引入了[libcontainer][6],这是原生go语言库用于提供用户空间和内核之间的接口。
|
||||
|
||||
容器位于联合文件系统的顶部,例如[AUFS][7],它允许跨多个容器共享例如操作系统镜和安装相关库的组件。在文件系统中的分层方法也利用[ Dockerfile ] [8]中的DevOps工具,这些工具能够成功地完成高速缓存的操作。利用等待时间来安装操作系统和相关应用程序依赖包将会极大地加速测试周期。容器之间的共享库也能够减少内存的占用。
|
||||
|
||||
一个容器是从一个镜像开始运行的,它可以本地创建,本地缓存,或者通过注册表来下载。Docker公司经营的 [Docker 公有注册库][9],这为各种操作系统、中间件和数据库提供了主机官方仓库。组织和个人可以在docker公司的为镜像创建公有库,并且也有举办私人仓库的订阅服务。由于上传的镜像会包含几乎所有Docker提供的自动化构建工具(以往称为“受信任的构建”),它的镜像是从Dockerfile创建的,而Dockerfile是镜像内容的清单。
|
||||
|
||||
### 容器 vs 虚拟机 ###
|
||||
|
||||
容器会比虚拟机更高效,因为它们能够分享一个内核和分享共享应用程序库。相比虚拟机系统,这也将使得Docker使用的内存空间很小,即使虚拟机利用了内存超量使用的技术。部署容器时共享底层的镜像层也可以减少内存的占用。IBM的Boden Russel已经做了一些[基准测试][10]说明两者的不同。
|
||||
|
||||
相比虚拟机系统,容器呈现出较低系统开销的优势,所以在容器中,应用程序的运行效率将会等效于在同样的应用程序在虚拟机中运行甚至效果更佳。IBM的一个研究团队已经发表了一本名为[虚拟机与Linux容器的性能比较]的文章[11].
|
||||
|
||||
|
||||
容器在隔离特性上要比虚拟机逊色。虚拟机可以利用ring-1[硬件隔离][12]例如Intel的VT-d和VT-x技术。这种隔离可以防止虚拟机爆发和彼此交互。而容器至今还没有任何形式的硬件隔离,这使它容易受到攻击。一个命名为[Shocker][13]的概念攻击验证表明,在之前的1.0版本中Docker是存在这种脆弱性的。尽管Docker1.0修复了许多由于Shocker漏洞引发较为的严重问题,Docker的CTO Solomon Hykes仍然[表态][14],“当我们自然而然地说Docker的开箱即用是安全的,即便包含了不收信任的uid0程序,我们将会很明确地这样表述。”Hykes的声明承认,其它的漏洞及相关的风险依旧存在,所以在容器成为受信任的工具之前将有更多的工作需要被完成。
|
||||
|
||||
对于许多用户案例而言,在容器和虚拟机两者之间选择一种是一种错误的二分法。Docker同样可以在虚拟机中很好工作,它可以被用于现有的虚拟基础措施、私有云或者公有云。同样也可以在容器里跑虚拟机,这也是谷歌使用云平台的一部分。给予一个广泛可利用的基础设施例如IaaS服务,可以为虚拟机提供合理的预期需求,这个合理的预期即容器与虚拟机一起使用的情景将会在数年后出现。容器管理和虚拟机技术有可能被集成到一起提供一个两全其美的方案;所以,位于libcontainer 容器后面的硬件信任锚微虚拟化实施例,可与前端 Docker 工具链和生态系统整合,而不同于后端使用的是能够提供更好绝缘性。微虚拟化(例如Bromium的[vSentry][15]和VMware的 [Project Fargo][16])已经在桌面环境中使用以提供应用程序之间基于硬件的隔离,所以类似的方法可以用于连接libcontainer代替Linux内核中的容器机制。
|
||||
|
||||
### ‘Dockerizing’ 应用程序 ###
|
||||
|
||||
几乎所有Linux应用程序都可以在Docker容器中运行。它们不受任何语言的选择或框架的限制。唯一在实践中受限的是从操作系统的角度来允许容器做什么。即使如此,bar可以在特权模式下通过运行容器,从而大大减少了控制(并相应地增加了容器中的应用程序,这将会导致损坏主机操作系统存在的风险)。
|
||||
|
||||
|
||||
容器都是从镜像开始运行的,而镜像也可以从运行中的容器获取。通常使用2中方法从容器中获取应用程序,分别是手动获取和Dockerfile..
|
||||
|
||||
#### 手动构建 ####
|
||||
|
||||
手动构建首先通过基础操作系统镜像启动一个基本操作。交互式的终端可以安装应用程序和用于包管理的依赖项来选择所需要的Linux风格。Zef Hemel在‘[使用Linux容器来支持便携式应用程序部署][17]’的文章中讲述了他部署的过程。一旦应用程序被安装之后,容器可以被推送至注册中心(例如Docker Hub)或者导出一个tar文件。
|
||||
|
||||
#### Dockerfile ####
|
||||
|
||||
Dockerfile是一个用于构建Docker容器的脚本化系统。每一个Dockerfile定义了开始的基础镜像,从一系列的命令在容器中运行或者一些列的文件被添加到容器中。当容器启动时默认命令会在启动时被执行,Dockerfile也可以指定对外的端口和当前工作目录。容器类似手工构建一样可以通过可推送或导出的Dockerfiles来构建。Dockerfiles也可以被用于Docker Hub的自动构建系统,使用的镜像受Docker公司的控制并且该镜像源代码是任何人可视的。
|
||||
|
||||
|
||||
####仅仅一个进程? ####
|
||||
|
||||
无论镜像是手动构建还是通过Dockerfile构建,有一个关键的考虑因素是当容器启动时,只有一个进程进程被启动。对于一个容器一对一服务的目的,例如运行一个应用服务器,运行一个单一的进程不是一个问题(有些关于容器应该只有一个单独的进程的争议)。对于一些容器需要启动多个进程的情况,必须先启动 [supervisor][18]进程,才能生成其它内部所需的进程。
|
||||
|
||||
### 容器和微服务 ###
|
||||
|
||||
一个完整的关于使用微服务结构体系的原理和好处已经远远超出了这篇文章(并已经覆盖了[InfoQ eMag: Microservices][19])的范围).然而容器是微服务捆绑和部署实例的捷径。
|
||||
|
||||
尽管大多数实际案例表明大量的微服务目前还是大多数部署在虚拟机,容器相对拥有较小的部署机会。容器具备位操作系统共享内存和硬盘占用量的能力,库常见的应用程序代码也意味着并排部署多个办法的服务是非常高效的。
|
||||
|
||||
### 连接容器 ###
|
||||
|
||||
一些小的应用程序适合放在单独的容器中,但在许多案例中应用程序将遍布多个容器。Docker的成功包括催生了一连串的新应用程序组合工具、业务流程工具和实现平台作为服务(PaaS)过程。许多工具还帮助实现缩放、容错、业务管理以及对已部署资产进行版本控制。
|
||||
|
||||
|
||||
#### 连接 ####
|
||||
|
||||
Docker的网络功能是相当原始的。在同一主机,容器内的服务和一互相访问,而且Docker也可以通过端口映射到主机操作系统使服务可以通过网络服务被调用。官方的赞助方式是连接到[libchan][20],这是一个提供给Go语言的网络服务库,类似于[channels][21]。直至libcan找到方法进入应用程序,第三方应用仍然有很大空间可提供配套的网络服务。例如,[Flocker][22]已经采取了基于代理的方法使服务实现跨主机(以及底层存储)移植。
|
||||
|
||||
#### 合成 ####
|
||||
|
||||
Docker本身拥有把容器连接在一起的机制,与元数据相关的依赖项可以被传递到相依赖的容器并用于环境变量和主机入口的消耗。应用合成工具例如[Fig][23]和[geard][24]展示出其依赖关系图在一个独立的文件中,于是多个容器可以汇聚成一个连贯的系统。世纪互联公司的[Panamax][25]合成工具类似底层Fig和 geard的方法,但新增了一些基于web的用户接口,并直接与GitHub相结合,以便于应用程序可以直接被共享。
|
||||
|
||||
#### 业务流程 ####
|
||||
|
||||
业务流程系统例如[Decking][26],New Relic公司的[Centurion][27]和谷歌公司的[Kubernetes][28]都是旨在帮助部署容器和管理其生命周期系统。也有无数的例子(例如[Apache Mesos][30](特别是[Marathon(马拉松式)持续运行很久的框架] 的 [Mesosphere][29]正在与Docker一起使用。通过为应用程序(例如传递CPU核数和内存的需求)与底层基础架构之间提供一个抽象的模型,业务流程工具提供了解耦,旨在简化应用程序开发和数据中心操作。还有各种各样的业务流程系统,因为人们已经淘汰了以前开发的内部系统,取而代之的是大量容器部署的管理系统;例如Kubernetes是基于谷歌的[Omega][32]系统,这个系统用于管理谷歌区域内的容器。
|
||||
|
||||
虽然从某种程度上来说合成工具和业务流程工具的功能存在重叠,另外这也是它们之间互补的一种方式。例如Fig可以被用于描述容器间如何实现功能交互,而Kubernetes pods可能用于提供监控和缩放。
|
||||
|
||||
|
||||
#### 平台 (类似一个服务) ####
|
||||
|
||||
大量的Docker已经实现本地PaaS安装部署,例如[Deis][33] 和 [Flynn][34]的出现并在现实中得到利用,Linux容器在很大程度上为开发人员提供了灵活性(而不是“固执己见”地给出一组语言和框架)。其它平台例如CloudFoundry, OpenShift 和 Apcera Continuum都已经采取Docker基础功能融入其现有的系统,这样基于Docker镜像(或者基于Dockerfile)的应用程序也可以用之前支持的语言和框架一起部署和管理。
|
||||
|
||||
### 支持所有的云 ###
|
||||
|
||||
由于Docker能够在任何的Linux虚拟机中运行并合理地更新内核,它几乎可以为所有云提供IaaS服务。大多数的云厂商已经宣布对码头及其生态系统提供附加支持。
|
||||
|
||||
亚马逊已经把Docker引入它们的Elastic Beanstalk系统(这是在底层IaaS的一个业务流程系统)。谷歌已经启用‘managed VMs'’,这是提供
|
||||
程序引擎PaaS和计算引擎IaaS之间的中转站。微软和IBM都已经宣布基于Kubernetes的服务,所以多容器应用程序可以在它们的云上被部署和管理。
|
||||
|
||||
为了给现有种类繁多的后端提供可用的一致接口,Docker团队已经引进[libswarm][35], 它能用于集成众多云和资源管理系统。Libswarm所阐明的目标之一是‘避免供应商通过交换任何服务锁定另一个’。这是通过呈现一组一致服务(与API相关联的)来完成的,该服务会附加执行特定的后端服务。例如装有Docker服务的服务器将对Docker命令行工具展示Docker远程API,这样容器就可以被托管在一些列的服务供应商。
|
||||
|
||||
基于Docker的新服务类型仍在起步阶段。总部位于伦敦的Orchard实验室提供了Docker的托管服务,但是Docker公司表示,收购后,Orchard的服务将不会是一个有优先事项。Docker公司也出售之前DotCloud的PaaS业务给cloudControl。基于就更早前的容器管理系统的服务例如[OpenVZ][36]已经司空见惯了,所以在一定程度上Docker需要向托管供应商证明其价值。
|
||||
|
||||
### Docker 及其发行版 ###
|
||||
|
||||
Docker已经成为大多数Linux发行版例如Ubuntu,Red Hat企业版(RHEL)和CentOS的一个标准功能。遗憾的是发布是以不同的移动速度到Docker项目,所以在发布版中找到的版本总是远远落后于可用版本。例如Ubuntu 14.04版本是对应Docker 0.9.1版本发布的,但是并没有相应的版本更改点当Ubuntu升级至14.04.1(这个时候Docker已经升至1.1.2版本)。由于Docker也是一个KDE系统托盘,所以在官方库同样存在命名问题;所以在Ubuntu14.04版本中相关安装包的名字和命令行工具都是使用‘Docker.io’命名。
|
||||
|
||||
在企业版的Linux世界中,情况也并没有因此而不同。CentOS7伴随着Docker 0.11.1的到来,该发行版本即是之前Docker公司宣布准备发行Docker 1.0版本的准备版。Linux发行版用户希望最新版本可以承诺其稳定性,性能和安全性能够更完善,并且更好地结合[安装说明][37]和使用Docker公司的库托管而不是采取包括其分布的版本库。
|
||||
|
||||
Docker的到来催生了新的Linux发行版本例如[CoreOS][38]和红帽被用于设计为运行容器最小环境的[Project Atomic][39]。这些发布版相比传统的发布版伴随着更多新内核和Docker版本的特性。它们对内存的使用和硬盘占用率更小。新的发行也配备了新的工具用于大型部署例如[fleet][40],这是‘一个分布式init系统’和[etcd][41]是用于元数据管理。也有新机制用于更新发布版本身来使得内核和Docker可以被使用。这也意味着使用Docker的影响之一是它抛开分布版和相关的包管理解决方案的关注,使Linux内核(即Docker子系统正在使用)更加重要。
|
||||
|
||||
新的发布版将是运行Docker的最好方式,但是传统的发布版本和它们的包管理对容器来说仍然是非常重要的。Docker Hub托管的官方镜像有Debian,Ubuntu和CentOS。当然也有一个‘半官方’的库用于Fedora镜像。RHEL镜像在Docker Hub中不可用,因为是从Red Hat直接发布的。这意味着在Docker Hub的自动构建机制仅仅用于那些纯粹的开源发布版不(并愿意信任基于Docker公司团队所策划镜像的出处)。
|
||||
|
||||
|
||||
虽然Docker Hub与源代码控制系统相结合,例如Git Hub和Bitbucket在构建过程中用于自动创建包管理及生成规范之间的复杂关系(在Dockerfile中),并在构建过程中建立镜像。在构建过程中的非确定性结果并非是Docker具体的问题——这个是由于软件包如何管理工作的结果。在构建完成的当天将会给出一个版本,这个构建完成的另外一次将会得到最新版本,这就是为什么软件包管理需要升级措施。容器的抽象(较少关注一个容器的内容)以及容器的分散(因为轻量级资源利用率)是更有可能与Docker获取关联的痛点。
|
||||
|
||||
### Docker的未来 ###
|
||||
|
||||
Docker公司对核心功能(libcontainer),跨服务管理(libswarm) 和容器间的信息传递(libchan)的发展提出了明确的路线。与此同时公司已经表明愿意利用自身生态系统和收购Orchard实验室。然而Docker相比Docker公司意味着更多,随着项目的壮大,越来越多对这个项目的
|
||||
大牌贡献者,其中不乏像谷歌、IBM和Red Hat这样的大公司。在仁慈独裁者CTO Solomon Hykes 掌舵的形势下,为公司和项目明确了技术领导的关系。在前18个月的项目中通过成果输出展现了快速行动的能力,而且这种趋势并没有减弱的迹象。
|
||||
|
||||
许多投资者正在寻找10年前VMware公司的ESX/vSphere平台的特征矩阵,并找出虚拟机的普及而驱动的企业预期和当前Docker生态系统两者的距离(和机会)。目前Docker生态系统正缺乏类似网络、存储和版本细粒度的管理(对容器的内容),这些都为初创企业和在职人员提供机会。
|
||||
|
||||
随着时间的推移,在虚拟机和容器(Docker的运行部分)之间的区别将变得不重要了,而关注点将会转移到‘构建’和‘交付’缓解。这些变化将会使‘Docker发生什么?’这个问题变得比‘Docker将会给IT产业带来什么?’更不重要了。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.infoq.com/articles/docker-future
|
||||
|
||||
作者:[Chris Swan][a]
|
||||
译者:[disylee](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.infoq.com/author/Chris-Swan
|
||||
[1]:http://blog.dotcloud.com/dotcloud-paas-joins-cloudcontrol
|
||||
[2]:http://www.infoq.com/news/2014/06/docker_1.0
|
||||
[3]:https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
|
||||
[4]:http://selinuxproject.org/page/Main_Page
|
||||
[5]:https://linuxcontainers.org/
|
||||
[6]:http://blog.docker.com/2014/03/docker-0-9-introducing-execution-drivers-and-libcontainer/
|
||||
[7]:http://aufs.sourceforge.net/aufs.html
|
||||
[8]:https://docs.docker.com/reference/builder/
|
||||
[9]:https://registry.hub.docker.com/
|
||||
[10]:http://bodenr.blogspot.co.uk/2014/05/kvm-and-docker-lxc-benchmarking-with.html?m=1
|
||||
[11]:http://domino.research.ibm.com/library/cyberdig.nsf/papers/0929052195DD819C85257D2300681E7B/$File/rc25482.pdf
|
||||
[12]:https://en.wikipedia.org/wiki/X86_virtualization#Hardware-assisted_virtualization
|
||||
[13]:http://stealth.openwall.net/xSports/shocker.c
|
||||
[14]:https://news.ycombinator.com/item?id=7910117
|
||||
[15]:http://www.bromium.com/products/vsentry.html
|
||||
[16]:http://cto.vmware.com/vmware-docker-better-together/
|
||||
[17]:http://www.infoq.com/articles/docker-containers
|
||||
[18]:http://docs.docker.com/articles/using_supervisord/
|
||||
[19]:http://www.infoq.com/minibooks/emag-microservices
|
||||
[20]:https://github.com/docker/libchan
|
||||
[21]:https://gobyexample.com/channels
|
||||
[22]:http://www.infoq.com/news/2014/08/clusterhq-launch-flocker
|
||||
[23]:http://www.fig.sh/
|
||||
[24]:http://openshift.github.io/geard/
|
||||
[25]:http://panamax.io/
|
||||
[26]:http://decking.io/
|
||||
[27]:https://github.com/newrelic/centurion
|
||||
[28]:https://github.com/GoogleCloudPlatform/kubernetes
|
||||
[29]:https://mesosphere.io/2013/09/26/docker-on-mesos/
|
||||
[30]:http://mesos.apache.org/
|
||||
[31]:https://github.com/mesosphere/marathon
|
||||
[32]:http://static.googleusercontent.com/media/research.google.com/en/us/pubs/archive/41684.pdf
|
||||
[33]:http://deis.io/
|
||||
[34]:https://flynn.io/
|
||||
[35]:https://github.com/docker/libswarm
|
||||
[36]:http://openvz.org/Main_Page
|
||||
[37]:https://docs.docker.com/installation/#installation
|
||||
[38]:https://coreos.com/
|
||||
[39]:http://www.projectatomic.io/
|
||||
[40]:https://github.com/coreos/fleet
|
||||
[41]:https://github.com/coreos/etcd
|
@ -0,0 +1,307 @@
|
||||
|
||||
RHEL/CentOS 7中配置用于多版本Linux安装的“PXE网络启动服务器”
|
||||
================================================================================
|
||||
**PXE服务器**——预启动执行环境——指示客户端计算机直接从网络接口启动、运行或安装操作系统,而不需要烧录CD/DVD或使用某个物理介质,它也可以减轻你网络中多台机器同时安装Linux发行版的工作。
|
||||
|
||||
![Setting PXE Network Boot in RHEL/CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/10/Setting-PXE-Network-Boot-in-CentOS.png)
|
||||
在RHEL/CentOS 7中设置PXE网络启动
|
||||
|
||||
#### 需求 ####
|
||||
|
||||
- [CentOS 7最小化安装步骤][1]
|
||||
- [RHEL 7最小化安装步骤][2]
|
||||
- [在RHEL/CentOS 7中配置静态IP地址][3]
|
||||
- [移除RHEL/CentOS 7中不要的服务][4]
|
||||
- [安装NTP服务器以设置RHEL/CentOS 7的正确时间][5]
|
||||
|
||||
本文将介绍如何在配置有本地镜像安装仓库的**RHEL/CentOS 7** 64位上安装并配置一台**PXE服务器**,仓库源由CentOS 7 DVD ISO镜像提供,并由**DNSMASQ**服务器提供解析。
|
||||
|
||||
该机器提供了**DNS**和**DHCP**服务,用于网络启动引导的**Syslinux**包,**TFTP-Server**——提供了可通过网络使用**小文件传输协议**下载的可启动镜像,以及提供本地挂载DVD镜像的**VSFTPD**服务器——它将扮演官方RHEL/CentOS 7镜像安装仓库的角色,安装器将从这里提取所需的包。
|
||||
|
||||
### 步骤1: 安装并配置DNSMASQ服务器 ###
|
||||
|
||||
**1.** 不需要提醒你来确定你的网络接口卡吧,除非你的服务器上有多个网络接口卡,该网卡必须配置有静态IP地址,该IP地址必须处于你要提供PXE服务的网段中。
|
||||
|
||||
那么,在你配置好静态IP地址后,更新你的系统并进行其它初始设置。请使用以下命令来安装**DNSMASQ**进程。
|
||||
|
||||
# yum install dnsmasq
|
||||
|
||||
![Install dnsmasq Package](http://www.tecmint.com/wp-content/uploads/2014/10/Install-dnsmasq-in-CentOS.jpg)
|
||||
安装dnsmasq包
|
||||
|
||||
**2.** DNSMASQ的默认主配置文件位于**/etc**目录中,虽然不需要任何说明就能看懂,但编辑起来确实相当困难的,即使有很详细的说明性注释。
|
||||
|
||||
首先,确保你备份了该文件,以便你需要在以后对它进行恢复。然后使用你喜爱的文本编辑器创建一个新的空配置文件,命令如下。
|
||||
|
||||
# mv /etc/dnsmasq.conf /etc/dnsmasq.conf.backup
|
||||
# nano /etc/dnsmasq.conf
|
||||
|
||||
**3.** 现在,复制并粘贴以下配置到**dnsmasq.conf**文件中,并确保根据如下说明进行相应修改,以适应你的网络设置。
|
||||
|
||||
interface=eno16777736,lo
|
||||
#bind-interfaces
|
||||
domain=centos7.lan
|
||||
# DHCP range-leases
|
||||
dhcp-range= eno16777736,192.168.1.3,192.168.1.253,255.255.255.0,1h
|
||||
# PXE
|
||||
dhcp-boot=pxelinux.0,pxeserver,192.168.1.20
|
||||
# Gateway
|
||||
dhcp-option=3,192.168.1.1
|
||||
# DNS
|
||||
dhcp-option=6,92.168.1.1, 8.8.8.8
|
||||
server=8.8.4.4
|
||||
# Broadcast Address
|
||||
dhcp-option=28,10.0.0.255
|
||||
# NTP Server
|
||||
dhcp-option=42,0.0.0.0
|
||||
|
||||
pxe-prompt="Press F8 for menu.", 60
|
||||
pxe-service=x86PC, "Install CentOS 7 from network server 192.168.1.20", pxelinux
|
||||
enable-tftp
|
||||
tftp-root=/var/lib/tftpboot
|
||||
|
||||
![Dnsmasq Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/dnsmasq-configuration.jpg)
|
||||
Dnsmasq配置
|
||||
|
||||
你需要修改的声明有以下这些:
|
||||
|
||||
- **interface** – 服务器需要监听并提供服务的网络接口。
|
||||
- **bind-interfaces** – 取消注释来绑定到该网络接口
|
||||
- **domain** – 替换为你的域名。
|
||||
- **dhcp-range** – 替换为你的网络掩码定义的网段。
|
||||
- **dhcp-boot** – 替换该IP地址为你的网络接口IP地址。
|
||||
- **dhcp-option=3,192.168.1.1** – 替换该IP地址为你的网段的网关。
|
||||
- **dhcp-option=6,92.168.1.1** – 替换该IP地址为你的DNS服务器IP——可以定义多个IP地址。
|
||||
- **server=8.8.4.4** – 这里放置DNS转发服务器IP地址。
|
||||
- **dhcp-option=28,10.0.0.255** – 替换该IP地址为网络广播地址——可选项。
|
||||
- **dhcp-option=42,0.0.0.0** – 这里放置网络时钟服务器——可选项(0.0.0.0地址表示参考自身)。
|
||||
- **pxe-prompt** – 保持默认——按F8进入菜单,60秒等待时间。
|
||||
- **pxe=service** – 使用x86PC作为32为/64位架构,并在字符串引述中输入菜单描述提示。其它类型值可以是:PC98,IA_EFI,Alpha,Arc_x86,Intel_Lean_Client,IA32_EFI,BC_EFI,Xscale_EFI和X86-64_EFI。
|
||||
- **enable-tftp** – 启用内建TFTP服务器。
|
||||
- **tftp-root** – 使用/var/lib/tftpboot——所有网络启动文件所在位置。
|
||||
|
||||
其它和配置文件相关的高级选项,请参阅[dnsmasq手册][6]。
|
||||
|
||||
### 步骤2: 安装SYSLINUX启动加载器 ###
|
||||
|
||||
**4.** 在编辑并保存**DNSMASQ**主配置文件后,我们将继续安装**Syslinux** PXE启动加载器,命令如下。
|
||||
|
||||
# yum install syslinux
|
||||
|
||||
![Install Syslinux Bootloaders](http://www.tecmint.com/wp-content/uploads/2014/10/install-syslinux-bootloaders.jpg)
|
||||
安装Syslinux启动加载器
|
||||
|
||||
**5.** PXE启动加载器文件位于**/usr/share/syslinux**系统绝对路径下,你可以通过列出该路径下的内容来查看。该步骤不是必须的,但你可能需要知道该路径,因为在下一步中,我们将拷贝该路径下的所有内容到**TFTP服务器**路径下。
|
||||
|
||||
# ls /usr/share/syslinux
|
||||
|
||||
![Syslinux Files](http://www.tecmint.com/wp-content/uploads/2014/10/syslinux-files.jpg)
|
||||
Syslinux文件
|
||||
|
||||
### 步骤3: 安装TFTP-Server并加入SYSLINUX加载启动器 ###
|
||||
|
||||
**6.** 现在,让我们进入下一步,安装**TFTP-Server**。然后,拷贝上述位置中Syslinux包提供所有启动加载器文件到**/var/lib/tftpboot**路径中,命令如下。
|
||||
|
||||
# yum install tftp-server
|
||||
# cp -r /usr/share/syslinux/* /var/lib/tftpboot
|
||||
|
||||
![Install TFTP Server](http://www.tecmint.com/wp-content/uploads/2014/10/install-tftp-server.jpg)
|
||||
安装TFTP服务器
|
||||
|
||||
### 步骤4: 设置PXE服务器配置文件 ###
|
||||
|
||||
**7.** 通常,**PXE服务器**从位于**pxelinux.cfg**文件夹中一组指定的文件中读取配置(首先是**GUID**文件,接下来是**MAC**文件,最后是**Default**文件),该文件夹必须位于DNSMASQ主配置文件中**tftp-root**声明指定的目录中。
|
||||
|
||||
创建需要的目录**pxelinux.cfg**,然后添加**default**文件到该目录中,命令如下。
|
||||
|
||||
# mkdir /var/lib/tftpboot/pxelinux.cfg
|
||||
# touch /var/lib/tftpboot/pxelinux.cfg/default
|
||||
|
||||
**8.** 现在,该来编辑**PXE服务器**配置文件了,为它添加合法的Linux发行版安装选项。请注意,该文件中使用的所有路径必须是相对于**/var/lib/tftpboot**目录的。
|
||||
|
||||
下面,你可以看到配置文件的样例,你可以使用该模板,但请修改安装镜像(kernel和initrd文件)、协议(FTP、HTTP、HTTPS、NFS)以及映射你网络安装源仓库和路径的IP地址。
|
||||
|
||||
# nano /var/lib/tftpboot/pxelinux.cfg/default
|
||||
|
||||
添加一下整个节录到文件中。
|
||||
|
||||
default menu.c32
|
||||
prompt 0
|
||||
timeout 300
|
||||
ONTIMEOUT local
|
||||
|
||||
menu title ########## PXE Boot Menu ##########
|
||||
|
||||
label 1
|
||||
menu label ^1) Install CentOS 7 x64 with Local Repo
|
||||
kernel centos7/vmlinuz
|
||||
append initrd=centos7/initrd.img method=ftp://192.168.1.20/pub devfs=nomount
|
||||
|
||||
label 2
|
||||
menu label ^2) Install CentOS 7 x64 with http://mirror.centos.org Repo
|
||||
kernel centos7/vmlinuz
|
||||
append initrd=centos7/initrd.img method=http://mirror.centos.org/centos/7/os/x86_64/ devfs=nomount ip=dhcp
|
||||
|
||||
label 3
|
||||
menu label ^3) Install CentOS 7 x64 with Local Repo using VNC
|
||||
kernel centos7/vmlinuz
|
||||
append initrd=centos7/initrd.img method=ftp://192.168.1.20/pub devfs=nomount inst.vnc inst.vncpassword=password
|
||||
|
||||
label 4
|
||||
menu label ^4) Boot from local drive
|
||||
|
||||
![Configure PXE Server](http://www.tecmint.com/wp-content/uploads/2014/10/configure-pxe-server.jpg)
|
||||
配置PXE服务器
|
||||
|
||||
正如你所见,CentOS 7启动镜像(kernel和initrd)位于名为**centos7**的目录,该目录是**/var/lib/tftpboot**目录的相对路径(其系统绝对路径为**/var/lib/tftpboot/centos7**),而安装器仓库位于可通过FTP协议访问的**192.168.1.20/pub**网络位置中——在本例中,这些仓库位于本地,因为IP地址和PXE服务器地址相同。
|
||||
|
||||
同时,菜单**label 3**指定客户端安装应该通过**VNC**从一个远程位置实现(这里替换VNC密码为一个健壮的密码),如果你在一台没有输入输出的客户端上安装,菜单**label 2**指定了作为安装源的一个CentOS 7官方互联网镜像(这种情况要求客户端通过DHCP和NAT连接到互联网)。
|
||||
|
||||
**重要**:正如你在上述配置中说看到的,我们使用了CentOS 7进行演示,但是你也可以定义RHEL 7镜像。而下面的完整说明和配置都只是基于CentOS 7的,所以在选在发行版时要当心。
|
||||
|
||||
### 步骤5: 添加CentOS 7启动镜像到PXE服务器 ###
|
||||
|
||||
**9.** 对于此步骤,需要用到CentOS的kernel和initrd文件。要获取这些文件,你需要**CentOS 7 DVD ISO**镜像。所以,去下载CentOS DVD镜像吧,然后把它放入你的DVD驱动器并挂载镜像到**/mnt**路径,命令见下面。
|
||||
|
||||
使用DVD,而不是最小化CD镜像的原因在于,在后面我们将使用该DVD的内容为**FTP**源创建本地安装器仓库。
|
||||
|
||||
# mount -o loop /dev/cdrom /mnt
|
||||
# ls /mnt
|
||||
|
||||
![Mount CentOS DVD](http://www.tecmint.com/wp-content/uploads/2014/10/mount-centos-dvd.jpg)
|
||||
挂载CentOS DVD
|
||||
|
||||
如果你的机器没有DVD驱动器,你也可以使用**wget**或**curl**工具从[CentOS镜像站][7]下载**CentOS 7 DVD ISO**到本地并挂载。
|
||||
|
||||
# wget http://mirrors.xservers.ro/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso
|
||||
# mount -o loop /path/to/centos-dvd.iso /mnt
|
||||
|
||||
**10.** 在DVD内容可供使用后,创建**centos7**目录并将CentOS 7可启动kernel和initrd映像文件从DVD挂载位置拷贝到centos7文件夹。
|
||||
|
||||
# mkdir /var/lib/tftpboot/centos7
|
||||
# cp /mnt/images/pxeboot/vmlinuz /var/lib/tftpboot/centos7
|
||||
# cp /mnt/images/pxeboot/initrd.img /var/lib/tftpboot/centos7
|
||||
|
||||
![Copy CentOS Bootable Files](http://www.tecmint.com/wp-content/uploads/2014/10/copy-centos-bootable-files.jpg)
|
||||
拷贝CentOS可启动文件
|
||||
|
||||
使用该方法的原因在于,今后你可能会在**/var/lib/tftpboot**路径中创建新的独立的目录,并添加其它Linux发行版到PXE菜单中,你就不会将整个目录结构弄得一团糟了。
|
||||
|
||||
### 步骤6: 创建CentOS 7本地镜像安装源 ###
|
||||
|
||||
**11.** 虽然你可以通过多种协议设置**安装源镜像**,如HTTP、HTTPS或NFS,但对于本指南,我选择使用**FTP**协议。因为通过**vsftpd**,你可以很便捷地配置,而且它也很稳定。
|
||||
|
||||
接下里,安装vsftpd进程,然后复制所有DVD挂载目录中的内容到**vsftpd**默认服务器路径下(**/var/ftp/pub**)——这会花费一些时间,这取决于你的系统资源。然后为该路径设置可读权限,命令如下。
|
||||
|
||||
# yum install vsftpd
|
||||
# cp -r /mnt/* /var/ftp/pub/
|
||||
# chmod -R 755 /var/ftp/pub
|
||||
|
||||
![Install Vsftpd Server](http://www.tecmint.com/wp-content/uploads/2014/10/install-vsftpd-in-centos.jpg)
|
||||
安装Vsftpd服务器
|
||||
|
||||
![Copy Files to FTP Path](http://www.tecmint.com/wp-content/uploads/2014/10/copy-files-to-ftp-path.jpg)
|
||||
拷贝Files到FTP路径
|
||||
|
||||
![Set Permissions on FTP Path](http://www.tecmint.com/wp-content/uploads/2014/10/set-permission-on-ftp-path.jpg)
|
||||
设置FTP路径的权限
|
||||
|
||||
### 步骤7: 在系统范围内启动并启用进程 ###
|
||||
|
||||
**12.** 既然PXE服务器配置已经完成,那么就来启动**DNSMASQ**和**VSFTPD**服务器吧。验证它们的状况并在系统范围内启用,以便让这些服务在每次系统重启后都能随系统启动,命令如下。
|
||||
|
||||
# systemctl start dnsmasq
|
||||
# systemctl status dnsmasq
|
||||
# systemctl start vsftpd
|
||||
# systemctl status vsftpd
|
||||
# systemctl enable dnsmasq
|
||||
# systemctl enable vsftpd
|
||||
|
||||
![Start Dnsmasq Service](http://www.tecmint.com/wp-content/uploads/2014/10/start-dnsmasq.jpg)
|
||||
启动Dnsmasq服务
|
||||
|
||||
![Start Vsftpd Service](http://www.tecmint.com/wp-content/uploads/2014/10/start-vsftpd.jpg)
|
||||
启动Vsftpd服务
|
||||
|
||||
### 步骤8: 打开防火墙并测试FTP安装源 ###
|
||||
|
||||
**13.** 要获取需要在防火墙打开的端口列表,以便让客户机可访问并从PXE服务器启动,请运行**netstat**命令并根据dnsmasq和vsftpd监听列表添加CentOS 7防火墙规则。
|
||||
|
||||
# netstat -tulpn
|
||||
# firewall-cmd --add-service=ftp --permanent ## Port 21
|
||||
# firewall-cmd --add-service=dns --permanent ## Port 53
|
||||
# firewall-cmd --add-service=dhcp --permanent ## Port 67
|
||||
# firewall-cmd --add-port=69/udp --permanent ## Port for TFTP
|
||||
# firewall-cmd --add-port=4011/udp --permanent ## Port for ProxyDHCP
|
||||
# firewall-cmd --reload ## Apply rules
|
||||
|
||||
![Check Listening Ports](http://www.tecmint.com/wp-content/uploads/2014/10/check-listening-ports.jpg)
|
||||
检查监听端口
|
||||
|
||||
![Open Ports in Firewall](http://www.tecmint.com/wp-content/uploads/2014/10/open-ports-on-firewall.jpg)
|
||||
在防火墙上开启端口
|
||||
|
||||
**14.** 要测试FTP安装源网络路径,请在本地或另外一台计算机上打开浏览器([**lynx**][8]就可以做此事),然后输入你架设有FTP服务的PXE服务器的IP地址,并在填入的URL后面加上**/pub**网络位置,结果应该和截图中看到的一样。
|
||||
|
||||
ftp://192.168.1.20/pub
|
||||
|
||||
![Access FTP Files via Browser](http://www.tecmint.com/wp-content/uploads/2014/10/browse-ftp-files.jpg)
|
||||
通过浏览器访问FTP文件
|
||||
|
||||
**15.** 要解决PXE服务器最终的配置或其它信息产生的问题,请在live模式下诊断,命令如下:
|
||||
|
||||
# tailf /var/log/messages
|
||||
|
||||
![Check PXE Logs for Errors](http://www.tecmint.com/wp-content/uploads/2014/10/check-pxe-errors.jpg)
|
||||
检查PXE日志错误
|
||||
|
||||
**16.** 最后,最后所需的步骤就是卸载CentOS 7 DVD,并移除物理介质。
|
||||
|
||||
# umount /mnt
|
||||
|
||||
### 步骤9: 配置客户端从网络启动 ###
|
||||
|
||||
**17.** 现在,你的客户端可以通过它们的系统BIOS或在**BIOS开机自检**时按指定键来配置网络启动作为**首要启动设备**,具体方法见主板说明手册。
|
||||
|
||||
为了选择网络启动,在第一次PXE提示符出现时,请按下**F8**键进入到PXE安装界面,然后敲**回车**键继续进入PXE菜单。
|
||||
|
||||
![PXE Network Boot](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-network-boot.jpg)
|
||||
PXE网络启动
|
||||
|
||||
![PXE Network OS Boot](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-network-os-boot.jpg)
|
||||
PXE网络OS启动
|
||||
|
||||
**18.** 一旦你进入PXE菜单,请选择你的CentOS 7安装类型,敲**回车**键继续安装过程,就像你使用本地启动介质安装一样。
|
||||
|
||||
请记下这一点,使用菜单中的变体2需要激活目标客户端上的互联网连接。在下面的屏幕截图中,你可以通过VNC看到远程安装的实例。
|
||||
|
||||
![PXE Menu](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-menu.jpg)
|
||||
PXE菜单
|
||||
|
||||
![Remote Linux Installation via VNC](http://www.tecmint.com/wp-content/uploads/2014/10/os-installation-via-vnc.jpg)
|
||||
通过VNC远程安装Linux
|
||||
|
||||
![Remote Installation of CentOS](http://www.tecmint.com/wp-content/uploads/2014/10/remote-centos-installation.jpg)
|
||||
远程安装CentOS
|
||||
|
||||
以上是**CentOS 7**上配置最小化**PXE服务器**的所有内容。在我的本系列下一篇文章中,我将讨论其它PXE服务器配置过程中的其它问题,如怎样使用**Kickstart**文件来配置自动化安装**CentOS 7**,以及添加其它Linux发行版到PXE菜单——**Ubuntu Server**和**Debian 7**。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/
|
||||
|
||||
作者:[Matei Cezar][a]
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/cezarmatei/
|
||||
[1]:http://www.tecmint.com/centos-7-installation/
|
||||
[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/
|
||||
[3]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/
|
||||
[4]:http://www.tecmint.com/remove-unwanted-services-in-centos-7/
|
||||
[5]:http://www.tecmint.com/install-ntp-server-in-centos/
|
||||
[6]:http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
|
||||
[7]:http://isoredirect.centos.org/centos/7/isos/x86_64/
|
||||
[8]:http://www.tecmint.com/command-line-web-browsers/
|
Loading…
Reference in New Issue
Block a user