我们大学机房使用的 Fedora 系统
Fedora 机房 大学
![](/data/attachment/album/201612/13/180300lwzwdzpj8wwmddn7.jpg)


在[塞尔维亚共和国诺维萨德大学的自然科学系和数学与信息学系](http://www.dmi.rs/)，我们教学生很多东西。从编程语言的入门到机器学习，所有开设的课程最终目的是让我们的学生能够像专业的开发者和软件工程师一样思考。课程时间紧凑而且学生众多，所以我们必须对现有可利用的资源进行合理调整以满足正常的教学。最终我们决定将机房计算机系统换为 Fedora。


### 以前的设置


我们过去的解决方案是在 Ubuntu 系统上面安装 Windows [虚拟机](https://en.wikipedia.org/wiki/Virtual_machine)并在虚拟机下安装好教学所需的开发软件。这在当时看起来是一个很不错的主意。然而，这种方法有很多弊端。首先，运行虚拟机导致了严重的计算机性能的浪费，因此导致操作系统性能和运行速度降低。此外，虚拟机有时候会在另一个用户会话里面同时运行。这会导致计算机工作严重缓慢。我们不得不在启动电脑和启动虚拟机上花费宝贵的时间。最后，我们意识到我们的大部分教学所需软件都有对应的 Linux 版本。虚拟机不是必需的。我们需要寻找一个更好的解决办法。


### 进入 Fedora!


![Computer lab in Serbia powered by Fedora](/data/attachment/album/201612/13/180311pzcs3pdktdsklx35.jpg)


*默认运行 Fedora 工作站版本的一个机房的照片*


我们考虑使用一种简洁的安装替代以前的 Windows 虚拟机方案。我们最终决定使用 Fedora，这有很多原因。


#### 发展的前沿


在我们所教授的课程中，我们会用到很多各种各样的开发工具。因此，能够及时获取可用的最新、最好的开发工具很重要。在 Fedora 下，我们发现我们用到的开发工具有 95% 都能够在官方的软件仓库中找到！只有少量的一些工具，我们才需要手动安装。这在 Fedora 下很简单，因为你能获取到几乎所有的现成的开发工具。


在这个过程中我们意识到我们使用了大量自由、开源的软件和工具。保证这些软件总是能够及时更新通常需要做大量的工作，然而 Fedora 没有这个问题。


#### 硬件兼容性


我们机房选择 Fedora 的第二个原因是硬件兼容性。机房现在的电脑还是比较崭新的。过去比较低的内核版本总有些问题。在 Fedora 下，我们总能获得最新的内核版本。正如我们预期的那样，一切运行良好，没有任何问题。


我们决定使用带有 [GNOME 桌面环境](https://www.gnome.org/)的 Fedora [工作站版本](https://getfedora.org/workstation/)。学生们发现它很容易、直观，可以快速上手。对我们来说，学生有一个简单的环境很重要，这样他们会更多的关注自己的任务和课程本身，而不是一个复杂的或者运行缓慢的用户界面。


#### 自主的技术支持


最后一个原因，我们院系高度赞赏自由、开放源代码的软件。使用这些软件，学生们即便在毕业后和工作的时候，仍然能够继续自由地使用它们。在这个过程中，他们通常也对 Fedora 和自由、开源的软件有了一定了解。


### 转换机房


我们找来其中的一台电脑，完全手动安装好。包括准备所有必要的脚本和软件，设置远程控制权限和一些其他的重要组成部分。我们也为每一门课程单独设置一个用户账号以方便学生存储他们的文件。


一台电脑安装配置好后，我们使用一个强大的、免费的、开源的叫做 [CloneZilla](http://clonezilla.org/) 的工具。 CloneZilla 能够制作硬盘镜像以做恢复用。镜像大小约为 11 G。我们用一些带有高速 USB 3.0 接口的闪存来还原磁盘镜像到其余的电脑。我们仅仅利用若干个闪存设备花费了 75 分钟设置好其余的 24 台电脑。


### 将来的工作


我们机房现在所有的电脑都完全使用 Fedora （没有虚拟机）。剩下的工作是设置一些管理脚本方便远程安装软件，电脑的开关等等。


我们由衷地感谢所有 Fedora 的维护人员、软件包管理人员和其他贡献者。我们希望我们的工作能够鼓励其他的学校和大学像我们一样将机房电脑的操作系统转向 Fedora。我们很高兴地确认 Fedora 完全适合我们，同时我们也保证 Fedora 同样会适合您！




---


via: <https://fedoramagazine.org/fedora-computer-lab-university/>


作者：[Nemanja Milošević](https://fedoramagazine.org/author/nmilosev/) 译者：[WangYueScream](https://github.com/WangYueScream)，[LemonDemo](https://github.com/LemonDemo) 校对：[jasminepeng](https://github.com/jasminepeng)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
At the [University of Novi Sad in Serbia, Faculty of Sciences, Department of Mathematics and Informatics](http://www.dmi.rs), we teach our students a lot of things. From an introduction to programming to machine learning, all the courses make them think like great developers and software engineers. The pace is fast and there are many students, so we must have a setup on which we can rely on. We decided to switch our computer lab to Fedora.


## Previous setup

Our previous solution was keeping our development software in Windows [virtual machines](https://en.wikipedia.org/wiki/Virtual_machine) installed on Ubuntu Linux. This seemed like a good idea at the time. However, there were a couple of drawbacks. Firstly, there were serious performance losses because of running virtual machines. Performance and speed of the operating system was impacted because of this. Also, sometimes virtual machines ran concurrently in another user’s session. This led to serious slowdowns. We were losing precious time on booting the machines and then booting the virtual machines. Lastly, we realized that most of our software was Linux-compatible. Virtual machines weren’t necessary. We had to find a better solution.

## Enter Fedora!

![Computer lab in Serbia powered by Fedora](https://cdn.fedoramagazine.org/wp-content/uploads/2016/10/jxXtuFO-1024x576.jpg)

Picture of a computer lab running Fedora Workstation by default

We thought about replacing the virtual machines with a “bare bones” installation for a while. We decided to go for Fedora for several reasons.

#### Cutting edge of development

In our courses, we use many different development tools. Therefore, it is crucial that we always use the latest and greatest development tools available. In Fedora, we found 95% of the tools we needed in the official software repositories! For a few tools, we had to do a manual installation. This was easy in Fedora because you have almost all development tools available out of the box.

What we realized in this process was that we used a lot of free and open source software and tools. Having all that software always up to date was always going to be a lot of work – but not with Fedora.

#### Hardware compatibility

The second reason for choosing Fedora in our computer lab was hardware compatibility. The computers in the lab are new. In the past, there were some problems with older kernel versions. In Fedora, we knew that we would always have a recent kernel. As we expected, everything worked out of the box without any issues.

We decided that we would go for the [Workstation edition](https://getfedora.org/workstation/) of Fedora with [GNOME desktop environment](https://www.gnome.org/). Students found it easy, intuitive, and fast to navigate through the operating system. It was important for us that students have an easy environment where they could focus on the tasks at hand and the course itself rather than a complicated or slow user interface.

#### Powered by freedom

Lastly, in our department, we value free and open source software greatly. By utilizing such software, students are able to use it freely even when they graduate and start working. In the process, they also learn about Fedora and free and open source software in general.

## Switching the computer lab

We took one of the computers and fully set it up manually. That included preparing all the needed scripts and software, setting up remote access, and other important components. We also made one user account per course so students could easily store their files.

After that one computer was ready, we used a great, free and open source tool called [CloneZilla](http://clonezilla.org/). CloneZilla let us make a hard drive image for restoration. The image size was around 11GB. We used some fast USB 3.0 flash drives to restore the disk image to the remaining computers. We managed to fully provision and setup twenty-four computers in one hour and fifteen minutes, with just a couple of flash drives.

## Future work

All the computers in our computer lab are now exclusively using Fedora (with no virtual machines). The remaining work is to set up some administration scripts for remotely installing software, turning computers on and off, and so forth.

We would like to thank all Fedora maintainers, packagers, and other contributors. We hope our work encourages other schools and universities to make a switch similar to ours. We happily confirm that Fedora works great for us, and we can also vouch that it would work great for you!

## Rodd Clarkson

I’ve been using Fedora on the desktop in the computer lab I run at my school for about 4 years now.

I’ve got a simple shell script that runs the same command on multiple machines, allowing me to maintain the machines remotely.

It uses ssh connections, authenticated using ssh-copy-id, to run a wide range of commands, including poweroff and dnf.

I’d be happy to share it with you if you’re interested.

## chris

Is there a reason you are using a shellscript instead of something like ansible? Seems a little bit dangerous and overcomplicated.

## James

Chris, Ansible ad-hoc is also what came to mind as I read. The Ansible docs use almost this exact scenario

“For instance, if you wanted to power off all of your lab for Christmas vacation, you could execute a quick one-liner in Ansible without writing a playbook.”

Nemanja, it’s worth checking out for ease of use and configuration management. http://docs.ansible.com/ansible/intro_adhoc.html

## Nemanja Milošević

We will definitely look into Ansible but I’m not sure if it is worth it for our use case. 🙂

I wrote some Python scripts for management over SSH, and it is a closed network, so we will stick with that for now.

Thanks for your comments! 🙂

## Adam Williamson

Ansible basically

is‘python scripts for management over ssh’, only with a dedicated development team so you don’t have to develop it, and a whole bunch of awesome features and modules for managing different things, and more being added all the time by a big user community. It’s also very easy to get started with. Really do look into it! you want it!This is a great story, btw, really happy to see Fedora is working out for you!

## Nemanja Milošević

Well, if my personal Fedora hero adamw is suggesting it, I will definitely try to learn more about Ansible and how we can use it. 🙂

Thanks!

## Cornel Panceac

“We managed to fully provision and setup twenty-four computers in one hour and fifteen minutes, with just a couple of flash drives.”

You can also do it over the network but again, the machines must be booted . PXE can be at help here. You setup a Clonezilla server on the first configured machine, then boot the clients with PXE from the Clonezilla server, and just do the cloning.

## Nemanja Milošević

We considered this, and actually tried to do it over network, however our network gear is limited to 100Mbps and it took around 30 minutes to deploy that single machine. Compare that to around 6-7 minutes restore time from a fast USB3 drive. 🙂

We actually had just one drive with CloneZilla (boot to RAM, then take it) and three USB flash drives with the image. All in all it would take I think around 12-13h to do it over network, especially if we tried to do it all at once, so this was just faster for us.

Thanks for your comment! 🙂

## Nemanja Milošević

We tried doing it over network (w/o PXE just using scp to get the image) but it was really slow. Partly because our network gear is a bit older (100 Mbps) and partly because the machines were fighting for resources. In the end the solution with flash drives worked better for us, especially because you can boot CloneZilla to RAM and just yank the drive out. 🙂

Thanks for the suggestion, though!

## BOb

How do you handle updates? You’ve made an image , that’s out of date pretty much as soon as you’ve finished making it. Do you have a process by which updates are applied as soon as Clonezilla has written the image? How did you handle Dirty COW?

Did you consider using Kickstart and if so, what made you chose creating an image instead?

“We also made one user account per course so students could easily store their files.”

So users are per-course rather than per, well, user. Where are students storing their files? Are those files being backed up? What prevents a student accessing or modifying another student’s files?

## Nemanja Milošević

We will be trying to update machines frequently over SSH (with an automation script). The image was used just as a base. 🙂

We considered using a kickstart, however, some of the software needed compilation and additional setting up. Also this seemed faster at the time – but maybe not as ‘pure’ Fedora way. 🙂

About user files, students usually use the same computers, because they tend to sit at the same place during the semester. They store their files inside home directory – optionally they can make a folder with their name. Nothing prevents students from accessing files from other students (in one course) but this is not the concern because tests are handled differently.

Thanks for your comment! 🙂

## Honigmelone

The computer lab I work in (as a student) also uses fedora machines. However the fast update cycles of fedora make it hard for the staff to keep up with fedora development. Testing if an upgrade breaks anything is a substantial effort, thus Fedora 22 is still running and I don’t know of any upgrade plan.

## chris

I feel like the right way to do this is to have ansible configured for multiple batches (e.g. updated, a week old, last fedora version). Then show a message with the hint that if something is broken on this machines they should shoot an email to IT, which machines still have the old configuration and a list of known problems (to avoid multiple reports or the feeling of ‘it surely has been reported’) on the login-screen. (this can easily be updated via ansible as well).

I feel like this is way saver then running an eol-version and keeps the amount of testwork in place.

## Florian H

How do you guys realize screen sharing the instructor’s screen?

## Nemanja Milošević

Not sure what you mean, we have one “teacher” workstation which is connected via HDMI to the projector. You can actually see it in the first picture on the wall. 🙂

## chris

I think he means something like having a vnc server running on the students PCs, so the teacher can connect if he has the feeling a student is struggeling.

Can be pretty usefull

## Wallyk

Nemanja, It would be illuminating if you described what sort of use students are making of Fedora. Is it surfing the web or writing webservers? Writing email or weather modeling? Etc.

## Nemanja Milošević

Uh, hard to sum it all up. Our faculty offers BSc, MSc, and PhD studies in Computer Science. So there is actually everything between really low level assembly programming and high-level software engineering. Of course, that’w what we are trying to teach, but occasionally they are just reading emails and surfing the web just like you said. 🙂

## Smalltownnetadmin

Nemanja, first of all, congratulations on successfully overhauling your lab! I am curious whether Ubuntu was not keeping up with the development tools as well or there were more packages to install manually? I have been running Fedora since 2007 and haven’t felt the need to “shop around much”.

I’d also like to mention another clone/imaging utility here though there are quite a few. Since Cornel mentioned a Clonezilla server, another analogue to that is FOG (Free Opensource Ghost). It has been developed as a mixed environment, network imaging solution. From the features section of their wiki:

Imaging of Windows (XP, Vista, 7, 8/8.1, 10), Linux and Mac OS X

Partitions, full disk, multiple disks, resizable, raw

There is much more to this project. In my office we run Windows

ahemmore often than not and FOG has fairly heavily developed management for Windows clients:Printer management

Change hostname and join domain

Track user access on computers, automatic log off and shutdown on idle timeouts

Anti-Virus

Disk wiping

Restore deleted files

Bad blocks scan

Sadly, I can’t say how much attention has been given to Mac and Linux in these areas as I haven’t had time or clients to explore this with.

A few things are worth mentioning at this point for newer Administrators supporting Microsoft clients. First, make sure you have imaging rights (should be common for volume licensing) for the licenses you are using. Second, if you are not familiar with the process, research Sysprepping before creating your image, Generalizing your image can easily save you numerous headaches down the road. Third, do not activate the image you are sysprepping. Either find a Microsoft supported dummy “license” key to insert into the sysprep process or skip the license key entirely until deployment. At this point enter your

Actuallicense key to the deployed image for your activation to register itself properly with MS.I hate to end on a sour note for FOG but it should be noted that (at least with regards to PXE. Does this affect Clonezilla as well?) there may be some work involved finding which of their kernels will boot the majority of your equipment. The packaged kernel handles a reasonably broad set of equipment but, as with any package, it is not impossible to say find a graphics card that is not supported in that kernel.

## Edward O'Callaghan

Hi,

You guys may find it very useful to integrate FreeIPA into your stack so you can manage user accounts without so much fuss.

Cheers,

Edward.

## Nemanja Milošević

Thanks for the suggestion, I will definitely look it up it looks very interesting!

Thanks!

## Glenn L. Jenkins

We’re running Fedora 24 in our Linux lab (which dual boots Window 7). I’ve been using Ansible to mange the lab for the last year or so and there are significant advantages. For example mid way though the year I need to install some libraries for OpenAL for one of my modules, I added these to the Ansible playbook containing the list of software for the lab I used to setup the original machine and ran it against the lab. Contrast this with our technician going from machine to machine installing software for Windows.

Some other useful software, we use Ganglia to monitor the machines in the labs, ganglia-gmond in the Linux lab and on the servers and host sflow in the Windows 7 labs reporting back to ganglia-gmond collectors for each room. Essentially our dashboard shows each room as a cluster within a grid and we have another grid for servers (active directory, various web and database servers used by the students etc.)

To setup the dual boot lab we create one image using Clonezilla then cast this to the other machines using clonzilla server (which uses DRBL and PXE boot).

This year we’re using connecting the machines to active director for login, we have in the past run a separate IPA server but a single sign on suits the students better. Future work on this setup will hopefully include a auto mounted share so they can store their Linux work on a central server.

## P.D.Sandaruwan

we are also with fedora in our computer lab Computer science Dept. university of Ruhuna Sri Lanka. its nice. really…