mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Translated
This commit is contained in:
parent
ba3d73ea08
commit
40d639439c
@ -1,179 +0,0 @@
|
||||
MidnightBSD Could Be Your Gateway to FreeBSD
|
||||
======
|
||||
![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/midnight_4_0.jpg?itok=T2gpLVui)
|
||||
|
||||
[FreeBSD][1] is an open source operating system that descended from the famous [Berkeley Software Distribution][2]. The first version of FreeBSD was released in 1993 and is still going strong. Around 2007, Lucas Holt wanted to create a fork of FreeBSD that made use of the [GnuStep][3] implementation of the OpenStep (now Cocoa) Objective-C frameworks, widget toolkit, and application development tools. To that end, he began development of the MidnightBSD desktop distribution.
|
||||
|
||||
MidnightBSD (named after Lucas’s cat, Midnight) is still in active (albeit slow) development. The latest stable release (0.8.6) has been available since August, 2017. Although the BSD distributions aren’t what you might call user-friendly, getting up to speed on their installation is a great way to familiarize yourself with how to deal with an ncurses installation and with finalizing an install via the command line.
|
||||
|
||||
In the end, you’ll wind up with desktop distribution of a very reliable fork of FreeBSD. It’ll take a bit of work, but if you’re a Linux user looking to stretch your skills… this is a good place to start.
|
||||
|
||||
I want to walk you through the process of installing MidnightBSD, how to add a graphical desktop environment, and then how to install applications.
|
||||
|
||||
### Installation
|
||||
|
||||
As I mentioned, this is an ncurses installation process, so there is no point-and-click to be found. Instead, you’ll be using your keyboard Tab and arrow keys. Once you’ve downloaded the [latest release][4], burn it to a CD/DVD or USB drive and boot your machine (or create a virtual machine in [VirtualBox][5]). The installer will open and give you three options (Figure 1). Select Install (using your keyboard arrow keys) and hit Enter.
|
||||
|
||||
|
||||
![MidnightBSD installer][7]
|
||||
|
||||
Figure 1: Launching the MidnightBSD installer.
|
||||
|
||||
[Used with permission][8]
|
||||
|
||||
At this point, there are quite a lot of screens to go through. Many of those screens are self-explanatory:
|
||||
|
||||
1. Set non-default key mapping (yes/no)
|
||||
|
||||
2. Set hostname
|
||||
|
||||
3. Add optional system components (documentation, games, 32-bit compatibility, system source code)
|
||||
|
||||
4. Partitioning hard drive
|
||||
|
||||
5. Administrator password
|
||||
|
||||
6. Configure networking interface
|
||||
|
||||
7. Select region (for timezone)
|
||||
|
||||
8. Enable services (such as secure shell)
|
||||
|
||||
9. Add users (Figure 2)
|
||||
|
||||
|
||||
|
||||
|
||||
![Adding a user][10]
|
||||
|
||||
Figure 2: Adding a user to the system.
|
||||
|
||||
[Used with permission][8]
|
||||
|
||||
After you’ve added the user(s) to the system, you will then be dropped to a window (Figure 3), where you can take care of anything you might have missed or you want to re-configure. If you don’t need to make any changes, select Exit, and your configurations will be applied.
|
||||
|
||||
In the next window, when prompted, select No, and the system will reboot. Once MidnightBSD reboots, you’re ready for the next phase of the installation.
|
||||
|
||||
### Post install
|
||||
|
||||
When your newly installed MidnightBSD boots, you’ll find yourself at a command prompt. At this point, there is no graphical interface to be found. To install applications, MidnightBSD relies on the mport tool. Let’s say you want to install the Xfce desktop environment. To do this, log into MidnightBSD and issue the following commands:
|
||||
```
|
||||
sudo mport index
|
||||
|
||||
sudo mport install xorg
|
||||
|
||||
```
|
||||
|
||||
You now have the Xorg window server installed, which will allow you to install the desktop environment. Installing Xfce is handled with the command:
|
||||
```
|
||||
sudo mport install xfce
|
||||
|
||||
```
|
||||
|
||||
Xfce is now installed. However, we must enable it to run with the command startx. To do this, let’s first install the nano editor. Issue the command:
|
||||
```
|
||||
sudo mport install nano
|
||||
|
||||
```
|
||||
|
||||
With nano installed, issue the command:
|
||||
```
|
||||
nano ~/.xinitrc
|
||||
|
||||
```
|
||||
|
||||
That file need only contain a single line:
|
||||
```
|
||||
exec startxfce4
|
||||
|
||||
```
|
||||
|
||||
Save and close that file. If you now issue the command startx, the Xfce desktop environment will start. You should start to feel a bit more at home (Figure 4).
|
||||
|
||||
![ Xfce][12]
|
||||
|
||||
Figure 4: The Xfce desktop interface is ready to serve.
|
||||
|
||||
[Used with permission][8]
|
||||
|
||||
Since you don’t want to always have to issue the command startx, you’ll want to enable the login daemon. However, it’s not installed. To install this subsystem, issue the command:
|
||||
```
|
||||
sudo mport install mlogind
|
||||
|
||||
```
|
||||
|
||||
When the installation completes, enable mlogind at boot by adding an entry to the /etc/rc.conf file. At the bottom of the rc.conf file, add the following:
|
||||
```
|
||||
mlogind_enable=”YES”
|
||||
|
||||
```
|
||||
|
||||
Save and close that file. Now, when you boot (or reboot) the machine, you should be greeted by the graphical login screen. At the time of writing, after logging in, I wound up with a blank screen and the dreaded X cursor. Unfortunately, it seems there’s no fix for this at the moment. So, to gain access to your desktop environment, you must make use of the startx command.
|
||||
|
||||
### Installing
|
||||
|
||||
Out of the box, you won’t find much in the way of applications. If you attempt to install applications (using mport), you’ll quickly find yourself frustrated, as very few applications can be found. To get around this, we need to check out the list of available mport software, using the svnlite command. Go back to the terminal window and issue the command:
|
||||
```
|
||||
svnlite co http://svn.midnightbsd.org/svn/mports/trunk mports
|
||||
|
||||
```
|
||||
|
||||
Once you do that, you should see a new directory named ~/mports. Change into that directory (with the command cd ~/.mports. Issue the ls command and you should see a number of categories (Figure 5).
|
||||
|
||||
![applications][14]
|
||||
|
||||
Figure 5: The categories of applications now available for mport.
|
||||
|
||||
[Used with permission][8]
|
||||
|
||||
Say you want to install Firefox? If you look in the www directory, you’ll see a listing for linux-firefox. Issue the command:
|
||||
```
|
||||
sudo mport install linux-firefox
|
||||
|
||||
```
|
||||
|
||||
You should now see an entry for Firefox in the Xfce desktop menu. Go through all of the categories and install all of the software you need, using the mport command.
|
||||
|
||||
### A sad caveat
|
||||
|
||||
One sad little caveat is that the only version of an office suite to be found for mport (via svnlite) is OpenOffice 3. That’s quite out of date. And although Abiword is found in the ~/mports/editors directory, it seems it’s not available for installation. Even after installing OpenOffice 3, it errors out with an Exec format error. In other words, you won’t be doing much in the way of office productivity with MidnightBSD. But, hey, if you have an old Palm Pilot lying around, you can always install pilot-link. In other words, the available software doesn’t make for an incredibly useful desktop distribution… at least not for the average user. However, if you want to develop on MidnightBSD, you’ll find plenty of available tools, ready to install (check out the ~/mports/devel directory). You could even install Drupal with the command:
|
||||
|
||||
sudo mport install drupal7
|
||||
|
||||
Of course, after that you’ll need to create a database (MySQL is already installed), install Apache (sudo mport install apache24) and configure the necessary Apache directives.
|
||||
|
||||
Clearly, what is installed and what can be installed is a bit of a hodgepodge of applications, systems, and servers. But with enough work, you could wind up with a distribution that could serve a specific purpose.
|
||||
|
||||
### Enjoy the *BSD Goodness
|
||||
|
||||
And that is how you can get MidnightBSD up and running into a somewhat useful desktop distribution. It’s not as quick and easy as many other Linux distributions, but if you want a distribution that’ll make you think, this could be exactly what you’re looking for. Although much of the competition has quite a bit more available software titles ready for installation, MidnightBSD is certainly an interesting challenge that every Linux enthusiast or admin should try.
|
||||
|
||||
Learn more about Linux through the free ["Introduction to Linux" ][15]course from The Linux Foundation and edX.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/learn/intro-to-linux/2018/5/midnightbsd-could-be-your-gateway-freebsd
|
||||
|
||||
作者:[Jack Wallen][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.linux.com/users/jlwallen
|
||||
[1]:https://www.freebsd.org/
|
||||
[2]:https://en.wikipedia.org/wiki/Berkeley_Software_Distribution
|
||||
[3]:https://en.wikipedia.org/wiki/GNUstep
|
||||
[4]:http://www.midnightbsd.org/download/
|
||||
[5]:https://www.virtualbox.org/
|
||||
[6]:/files/images/midnight1jpg
|
||||
[7]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/midnight_1.jpg?itok=BRfGIEk_ (MidnightBSD installer)
|
||||
[8]:/licenses/category/used-permission
|
||||
[9]:/files/images/midnight2jpg
|
||||
[10]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/midnight_2.jpg?itok=xhxHlNJr (Adding a user)
|
||||
[11]:/files/images/midnight4jpg
|
||||
[12]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/midnight_4.jpg?itok=DNqA47s_ ( Xfce)
|
||||
[13]:/files/images/midnight5jpg
|
||||
[14]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/midnight_5.jpg?itok=LpavDHQP (applications)
|
||||
[15]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux
|
@ -0,0 +1,175 @@
|
||||
MidnightBSD 可能是你通往 FreeBSD 的大门
|
||||
======
|
||||
![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/midnight_4_0.jpg?itok=T2gpLVui)
|
||||
|
||||
[FreeBSD][1] 是一个开源操作系统,衍生自著名的 [Berkeley Software Distribution,伯克利软件套件][2]。FreeBSD 的第一个版本在 1993 年发布,并且仍然很强大。2007 年左右,Lucas Holt 想创建一个 FreeBSD 的分支,利用 OpenStep (现在是 Cocoa) 的 Objective-C 框架,widget 工具包和应用程序开发工具的 [GnuStep][3] 的实现。为此,他开始开发 MidnightBSD 桌面发行版。
|
||||
|
||||
MidnightBSD (以 Lucas 的猫命名,Midnight) 仍然在积极地(尽管缓慢)开发。自2017年8月可以获得最新的稳定发布版本 (0.8.6) 。尽管 BSD 发行版不是你所说的用户友好型发行版,通过命令行来加速它们的安装速度是一个你自己熟悉如何处理一个文本( ncurses )安装和最后完成安装的非常好的方法。
|
||||
|
||||
为此,你最终会得到一个非常可靠的 FreeBSD 分支的桌面发行版。但是如果你是一名 Linux 用户正在寻找扩展你的技能的方法,它将做一点工作,… 这是一个很好的起始地方。
|
||||
|
||||
我想带你走过安装 MidnightBSD 的工艺流程,如何添加一个图形桌面环境,然后如何安装应用程序。
|
||||
|
||||
### 安装
|
||||
|
||||
正如我所提到的,这是一个文本( ncurses ) 安装过程,因此在这里没有找到可用的鼠标。相反,你将使用你键盘的 Tab 和箭头按键。在你下载 [最新的发布版本][4] 后,将它刻录到一个 CD/DVD 或 USB 驱动器,并启动你的机器(或者在 [VirtualBox][5] 中创建一个虚拟机)。安装器将打开并给你三个选项(图 1)。选择安装(使用你的键盘的箭头按键),并敲击 Enter 键。
|
||||
|
||||
|
||||
![MidnightBSD installer][6]
|
||||
|
||||
图 1: 启动 MidnightBSD 安装器。
|
||||
|
||||
|
||||
在这点上,在这里要经历相当多的屏幕。其中很多屏幕是一目了然的:
|
||||
|
||||
1. 设置非默认键盘映射(是/否)
|
||||
|
||||
2. 设置主机名称
|
||||
|
||||
3. 添加可选系统组件(文档,游戏,32位兼容性,系统源码代码)
|
||||
|
||||
4. 分区硬盘
|
||||
|
||||
5. 管理员密码
|
||||
|
||||
6. 配置网络接口
|
||||
|
||||
7. 选择地区(时区)
|
||||
|
||||
8. 启用服务(例如获得 shell)
|
||||
|
||||
9. 添加用户(图 2)
|
||||
|
||||
|
||||
|
||||
|
||||
![Adding a user][7]
|
||||
|
||||
图 2: 向系统添加一个用户。
|
||||
|
||||
|
||||
在你向系统添加用户后,你将被拖拽到一个窗口中(图 3),在这里,你可以处理任何你可能忘记的或你想重新配置的东西。如果你不需要作出任何更改,选择 Exit ,然后你的配置将被应用。
|
||||
|
||||
![Applying your configurations][8]
|
||||
|
||||
图 3: 应用你的配置。
|
||||
|
||||
在接下来的窗口中,当出现提示时,选择 No ,接下来系统将重启。在 MidnightBSD 重启后,你已经为下一阶段的安装做好了准备。
|
||||
|
||||
### Post 安装
|
||||
|
||||
当你最新安装的 MidnightBSD 启动时,你将发现你自己在一个命令提示符中。在这一点上,在这里未找到图形界面。我安装应用程序,MidnightBSD 依赖于 mport 工具。比如说你想安装 Xfce 桌面环境。为此,登录到 MidnightBSD 中,并发出下面的命令:
|
||||
```
|
||||
sudo mport index
|
||||
|
||||
sudo mport install xorg
|
||||
|
||||
```
|
||||
|
||||
你现在有已经安装的 Xorg 窗口服务器,它将允许你来安装桌面环境。使用命令来安装 Xfce :
|
||||
```
|
||||
sudo mport install xfce
|
||||
|
||||
```
|
||||
|
||||
现在已经安装 Xfce 。不过,我们需要和命令 startx 一起运行来启用它。为此,让我们先安装 nano 编辑器。发出命令:
|
||||
```
|
||||
sudo mport install nano
|
||||
|
||||
```
|
||||
|
||||
随着 nano 已安装,发出命令:
|
||||
```
|
||||
nano ~/.xinitrc
|
||||
|
||||
```
|
||||
|
||||
这个文件仅包含一行:
|
||||
```
|
||||
exec startxfce4
|
||||
|
||||
```
|
||||
|
||||
保存并关闭这个文件。如果你现在发出命令 startx, Xfce 桌面环境将启动。你应该会感到一点在家里的感觉(图 4).
|
||||
|
||||
![ Xfce][9]
|
||||
|
||||
图 4: Xfce桌面界面已准备好服务。
|
||||
|
||||
因为你不想总是必需发出命令 startx ,你希望启用登录守护进程。然而,却没有安装。要安装这个子系统,发出命令:
|
||||
```
|
||||
sudo mport install mlogind
|
||||
|
||||
```
|
||||
|
||||
当完成安装后,通过在 /etc/rc.conf 文件中添加一个项目来在启动时启用 mlogind 。在 rc.conf 文件的底部,添加以下内容:
|
||||
```
|
||||
mlogind_enable=”YES”
|
||||
|
||||
```
|
||||
|
||||
保存并关闭该文件。现在,当你启动(或重启)机器时,你应该会看到图形登录屏幕。在写这篇文章的时候,在登录后,我最后得到一个空白屏幕和不想要的 X 光标。不幸的是,目前似乎并没有这个问题的解决方法。所以,要访问你的桌面环境,你必需使用 startx 命令。
|
||||
|
||||
### 安装
|
||||
|
||||
开箱即用,你将不能找到很多能使用的应用程序。如果你尝试安装应用程序(使用 mport ),你将很快发现你自己的沮丧,因为只能找到很少的应用程序。为解决这个问题,我们需要使用 svnlite 命令来查看检查出可用的 mport 软件列表。回到终端窗口,并发出命令:
|
||||
```
|
||||
svnlite co http://svn.midnightbsd.org/svn/mports/trunk mports
|
||||
|
||||
```
|
||||
|
||||
在你完成这些后,你应该看到一个命名为 ~/mports 的新的命令。 更改到这个目录(使用命令 cd ~/.mports 。发出 ls 命令,然后你应该看到许多的类别(图 5)。
|
||||
|
||||
![applications][10]
|
||||
|
||||
图 5: 对于 mport 现在可用的应用程序类别。
|
||||
|
||||
你想安装 Firefox ?如果你查看 www 目录,你将看到一个 linux-firefox 列表。发出命令:
|
||||
```
|
||||
sudo mport install linux-firefox
|
||||
|
||||
```
|
||||
|
||||
现在你应该会在 Xfce 桌面菜单中看到一个 Firefox 项目。翻找所有的类别,并使用 mport 命令来安装你需要的所有软件。
|
||||
|
||||
### 一个悲哀的警告
|
||||
|
||||
一个悲哀的小警告是, mport (通过via svnlite) 仅能找到的一个 office 套件的版本是 OpenOffice 3 。那是非常过时的。尽管 在 ~/mports/editors 目录中找到 Abiword ,但是它看起来不可用于安装。甚至在安装 OpenOffice 3 后,它会输出一个 Exec 格式错误。换句话说,你将不能使用 MidnightBSD 在 office 生产效率方面做很多的事情。但是,嘿嘿,如果你周围躺有一个旧的 Palm 导航器,你也安装 pilot 链接。换句话说,可用的软件不能生成一个极其有用的桌面发行版… 至少对普通用户不是。但是,如果你想在 MidnightBSD 上开发,你将找到很多可用的工具,准备安装(查看 ~/mports/devel 目录)。你甚至可以使用命令安装 Drupal :
|
||||
|
||||
```
|
||||
sudo mport install drupal7
|
||||
```
|
||||
|
||||
当然,在此之后,你将需要创建一个数据库( MySQL 已经安装),安装 Apache (sudo mport install apache24) ,并配置必需的 Apache 指令。
|
||||
|
||||
显然地,已安装的和能够安装什么是一个已经应用程序,系统和服务的大杂烩。但是随着足够多的工作,你最终可以得到一个能够服务特殊目的的发行版。
|
||||
|
||||
### 享受 *BSD 优良
|
||||
|
||||
这就是你如何使 MidnightBSD 启动,并在一个有点用的桌面发行版中运行。它不像很多其它的 Linux 发行版一样快速容易,但是如果你想要一个你想要的发行版,这可能正是你正在寻找的。尽管很多竞争对手有很多为安装而准备的可用的软件标题,MidnightBSD 无疑是一个 Linux 爱好者或管理员应该尝试的有趣的挑战。
|
||||
|
||||
通过来自 Linux 基金会和 edX 的免费的[" Linux 简介" ][11]课程学习更多关于 Linux 的信息。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/learn/intro-to-linux/2018/5/midnightbsd-could-be-your-gateway-freebsd
|
||||
|
||||
作者:[Jack Wallen][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.linux.com/users/jlwallen
|
||||
[1]:https://www.freebsd.org/
|
||||
[2]:https://en.wikipedia.org/wiki/Berkeley_Software_Distribution
|
||||
[3]:https://en.wikipedia.org/wiki/GNUstep
|
||||
[4]:http://www.midnightbsd.org/download/
|
||||
[5]:https://www.virtualbox.org/
|
||||
[6]:https://lcom.static.linuxfound.org/sites/lcom/files/midnight_1.jpg (MidnightBSD installer)
|
||||
[7]:https://lcom.static.linuxfound.org/sites/lcom/files/midnight_2.jpg (Adding a user)
|
||||
[8]:https://lcom.static.linuxfound.org/sites/lcom/files/mightnight_3.jpg (Applying your configurations)
|
||||
[9]:https://lcom.static.linuxfound.org/sites/lcom/files/midnight_4.jpg (Xfce)
|
||||
[10]:https://lcom.static.linuxfound.org/sites/lcom/files/midnight_5.jpg (applications)
|
||||
[11]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux
|
Loading…
Reference in New Issue
Block a user