mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge remote-tracking branch 'LCTT/master'
# Conflicts: # sources/talk/20170219 Windows wins the desktop, but Linux takes the world.md
This commit is contained in:
parent
0dc5395578
commit
acbabc0e98
@ -1,56 +1,39 @@
|
||||
|
||||
如何在Vim中实现搜索
|
||||
超酷的 Vim 搜索技巧
|
||||
================================
|
||||
|
||||
### 本页中
|
||||
|
||||
1. [自定义你的搜索][5]
|
||||
|
||||
[1\.1\.高亮搜索结果][1]
|
||||
|
||||
[1\.2\.使搜索不区分大小写][2]
|
||||
|
||||
[1\.3\.智能大小写搜索][3]
|
||||
|
||||
[1\.4\.递进搜索][4]
|
||||
|
||||
2. [其他很酷的在Vim中搜索的小技巧][6]
|
||||
|
||||
3. [结语][7]
|
||||
|
||||
尽管目前我们已经[涉及][8] Vim 的多种特性,但此编辑器的特征集如此庞大,不管我们学习多少,似乎仍然远远不足。承接我们的 Vim 教程系列,本文我们将讨论 Vim 提供的多种搜索技术。
|
||||
尽管目前我们已经[涉及][8] Vim 的多种特性,但此编辑器的特性集如此庞大,不管我们学习多少,似乎仍然远远不足。承接我们的 Vim 教程系列,本文我们将讨论 Vim 提供的多种搜索技术。
|
||||
|
||||
不过在此之前,请注意文中涉及到的所有的例子、命令、指令均是在 Ubuntu 14.04,Vim 7.4 下测试的。
|
||||
|
||||
### Vim 中的基础搜索操作
|
||||
|
||||
当你在 Vim 中打开一个文件并且想要搜索一个特定的单词或模板,第一步你必须要先从插入模式中退出(如果你正处于插入模式中)。之后输入 ‘**/**’(不带引号)并紧接着输入你要搜索的单词或模板。
|
||||
当你在 Vim 中打开一个文件并且想要搜索一个特定的单词或模板,第一步你必须要先按下 `Esc` 键从插入模式中退出(如果你正处于插入模式中)。之后输入 `/` 并紧接着输入你要搜索的单词或搜索模式。
|
||||
|
||||
例如,如果你想要搜索的单词是 ’linux',下图显示的就是在 Vim 窗口底部的搜索命令:
|
||||
例如,如果你想要搜索的单词是 `linux`,下图显示的就是在 Vim 窗口底部的搜索命令:
|
||||
|
||||
[![Search for words in vim](https://www.howtoforge.com/images/perform-search-operations-in-vim/vim-basic-search.png) ][9]
|
||||
|
||||
敲击回车键之后,你会看到 Vim 会将光标停留在从光标在插入模式中的位置开始,找到的包含此单词的第一行。如果你刚刚打开一个文件并且立即开始了搜索操作,搜索将从文件的首行开始。
|
||||
|
||||
如果想要移动到下一处包含被搜索单词位置,按 ‘**n**' 键。当你遍历完所有被搜索模板所在之处,继续按 ’**n**' 键 Vim将重复搜索操作,光标将回到第一次搜索结果出现位置。
|
||||
如果想要移动到下一处包含被搜索单词位置,按 `n` 键。当你遍历完所有被搜索模板所在之处,继续按 `n` 键 Vim 将重复搜索操作,光标将回到第一次搜索结果出现位置。
|
||||
|
||||
[ ![Move to next search hit](https://www.howtoforge.com/images/perform-search-operations-in-vim/vim-search-end.png) ][10]
|
||||
|
||||
在遍历搜索结果时,如果你想要回到上一匹配处,按 '**N**' (shift + n)。同时,值得注意的是不管在什么时候,你都可以输入 '**ggn**' 来跳转到第一个匹配处,或者 ’**GN**' 来跳转到最后一处。
|
||||
在遍历搜索结果时,如果你想要回到上一匹配处,按 `N` (即 `shift` + `n`)。同时,值得注意的是不管在什么时候,你都可以输入 `ggn` 来跳转到第一个匹配处,或者 `GN` 来跳转到最后一处。
|
||||
|
||||
当你恰好在文件的底部,而且想要逆向搜索的情况下,使用 **?** 代替 **/** 来开始搜索。下图是一个例子:
|
||||
当你恰好在文件的底部,而且想要逆向搜索的情况下,使用 `?` 代替 `/` 来开始搜索。下图是一个例子:
|
||||
|
||||
[![search backwards](https://www.howtoforge.com/images/perform-search-operations-in-vim/vim-search-back.png)][11]
|
||||
|
||||
### 自定义你的搜索
|
||||
|
||||
### 1\. 高亮搜索结果
|
||||
#### 1、 高亮搜索结果
|
||||
|
||||
尽管通过 ‘n' 或 'N' 从被搜索单词 / 模板的匹配处跳转到另一处很简单,但是如果匹配处能够高亮就更加人性化了。例如,请看下附截图:
|
||||
尽管通过 `n` 或 `N` 从被搜索单词或模式的匹配处跳转到另一处很简单,但是如果匹配处能够高亮就更加人性化了。例如,请看下附截图:
|
||||
|
||||
[![Search Highlighting in VIM](https://www.howtoforge.com/images/perform-search-operations-in-vim/vim-highlight-search.png) ][12]
|
||||
|
||||
这可以通过设置 ’hlsearch‘ 变量来实现,例如在普通/命令行模式中执行下述命令:
|
||||
这可以通过设置 `hlsearch` 变量来实现,例如在普通/命令行模式中执行下述命令:
|
||||
|
||||
```
|
||||
:set hlsearch
|
||||
@ -58,47 +41,49 @@
|
||||
|
||||
[![set hlsearch](https://www.howtoforge.com/images/perform-search-operations-in-vim/vim-set-hlsearch.png) ][13]
|
||||
|
||||
### 2\. 使搜索不区分大小写
|
||||
#### 2、使搜索不区分大小写
|
||||
|
||||
在 Vim 中进行搜索默认是区分大小写的。这就意味着如果我要搜索 ’linux',那么 ‘Linux’ 是不会匹配的。然而,如果这不是你想要的搜索方式,你可以使用如下命令来使搜索变得不区分大小写:
|
||||
在 Vim 中进行搜索默认是区分大小写的。这就意味着如果我要搜索 `linux`,那么 `Linux` 是不会匹配的。然而,如果这不是你想要的搜索方式,你可以使用如下命令来使搜索变得不区分大小写:
|
||||
|
||||
```
|
||||
:set ignorecase
|
||||
```
|
||||
所以当我设置 ignorecase 变量后再使用前边提到的命令,搜索 'linux',那么 ’Linux‘ 所在处也会被高亮。
|
||||
所以当我设置 `ignorecase` 变量后再使用前边提到的命令,搜索 `linux`,那么 `Linux` 所在处也会被高亮。
|
||||
|
||||
[![search case-insensitive](https://www.howtoforge.com/images/perform-search-operations-in-vim/vim-search-case.png) ][14]
|
||||
|
||||
### 3\. 智能大小写搜索
|
||||
#### 3、智能大小写搜索
|
||||
|
||||
Vim 提供了一个功能,只有当要搜索的单词 / 模板包含大写字母时,编辑器才会区分大小写。要想实现这种功能,必须先设置 ‘ignorecase',再接着设置 ‘smartcase' 变量。
|
||||
Vim 提供了一个功能,只有当要搜索的单词 / 模板包含大写字母时,编辑器才会区分大小写。要想实现这种功能,必须先设置 `ignorecase`,再接着设置 `smartcase` 变量。
|
||||
|
||||
```
|
||||
:set ignorecase
|
||||
:set smartcase
|
||||
```
|
||||
例如,如果一个文件中既包含 ’LINUX‘ 也包含 ’linux',在开启智能大小写搜索功能时,如果使用 ‘/LINUX' 进行搜索,只有单词LINUX处会被搜到。反之,如果搜索 ’/linux',那么不论大小写的搜索结果都会被匹配。
|
||||
|
||||
### 4\. 递进搜索
|
||||
例如,如果一个文件中既包含 `LINUX` 也包含 `linux`,在开启智能大小写搜索功能时,如果使用 `/LINUX` 进行搜索,只有单词 `LINUX` 处会被搜到。反之,如果搜索 `/linux`,那么不论大小写的搜索结果都会被匹配。
|
||||
|
||||
#### 4、递进搜索
|
||||
|
||||
就如谷歌一样,随着你输入查询字串(字串随你每输入一个字符不断更新)显示不同的搜索结果,Vim 也同样提供了递进搜索。要想使用这种特性,你必须在搜索前执行下述命令:
|
||||
|
||||
```
|
||||
:set incsearch
|
||||
```
|
||||
### 一些很酷的在Vim中搜索的小技巧
|
||||
|
||||
### 一些很酷的在 Vim 中搜索的小技巧
|
||||
|
||||
你可能会发现还有一些其他的与搜索相关的小技巧很有用。
|
||||
|
||||
开始吧!如果你想要搜索一个文件中的一个单词,但是又不想输入它,你只需要将你的光标移到这个单词下然后按 ***** (或者 **shift + 8**)。如果你想要启动一次部分搜索(例如:同时搜索 ‘in' 和 ’terminal'),那你需要将光标移到到单词(在本例中, ‘in')下,然后通过在键盘上按 **g*** (按一次 ’g'然后不断按 * )。
|
||||
开始吧!如果你想要搜索一个文件中的一个单词,但是又不想输入它,你只需要将你的光标移到这个单词下然后按 `*` (或者 `shift` + `8`)。如果你想要启动一次部分搜索(例如:同时搜索 `in` 和 `terminal`),那你需要将光标移到到单词(在本例中, `in`)下,然后通过在键盘上按 `g*` (按一次 `g` 然后不断按 `*` )。
|
||||
|
||||
注意:按 **#** 或者 **g#** 如果你想要逆向搜索。
|
||||
注意:如果你想要逆向搜索,按 `#` 或者 `g#` 。
|
||||
|
||||
下一个,只要你想要,你可以获得所有被搜索单词 / 模板匹配处所在的行和行号的一个列表。这可以在你开始搜索后通过按 **[I** 来实现。如下图是一个列表结果如何在 Vim 窗口底部被分组和显示的例子:
|
||||
下一个,只要你想要,你可以获得所有被搜索单词或模式匹配处所在的行和行号的一个列表。这可以在你开始搜索后通过按 `[I` 来实现。如下图是一个列表结果如何在 Vim 窗口底部被分组和显示的例子:
|
||||
|
||||
[![grouped search results](https://www.howtoforge.com/images/perform-search-operations-in-vim/vim-results-list.png) ][15]
|
||||
|
||||
接下来,你可能已经得知,Vim 默认是环形搜索的,意味着在到达文件结尾处(或者被搜索单词的最后一处匹配)时,如果继续按 “搜索下一个”会将光标再次带回第一处匹配处。如果你希望禁止环形搜索,可以使用如下命令:
|
||||
接下来,你可能已经得知,Vim 默认是环形搜索的,意味着在到达文件结尾处(或者被搜索单词的最后一处匹配)时,如果继续按 “搜索下一个” 会将光标再次带回第一处匹配处。如果你希望禁止环形搜索,可以使用如下命令:
|
||||
|
||||
```
|
||||
:set nowrapscan
|
||||
@ -109,9 +94,10 @@ Vim 提供了一个功能,只有当要搜索的单词 / 模板包含大写字
|
||||
```
|
||||
:set wrapscan
|
||||
```
|
||||
最后,假设你想要对文件中已经存在的单词做一点小小的修改,然后对修改后的单词执行搜索操作,一种方法是输入 **/** 与要搜索的单词。但是如果这个单词又长又复杂,那么可能需要一点时间来输入它。
|
||||
|
||||
一个简单的办法是将光标移到你想要略微修改的单词下,按 ‘/' 之后再按 Ctrl - r 最后按 Ctrl - w。这个在光标下的单词不仅仅会被拷贝,也会被复制到 ’/' 后,允许你对它进行修改并且继续进行搜索操作。
|
||||
最后,假设你想要对文件中已经存在的单词做一点小小的修改,然后对修改后的单词执行搜索操作,一种方法是输入 `/` 与要搜索的单词。但是如果这个单词又长又复杂,那么可能需要一点时间来输入它。
|
||||
|
||||
一个简单的办法是将光标移到你想要略微修改的单词下,按 `/` 之后再按 `Ctrl` + `r` 最后按 `Ctrl` + `w`。这个在光标下的单词不仅仅会被拷贝,也会被复制到 `/` 后,允许你对它进行修改并且继续进行搜索操作。
|
||||
|
||||
如果想要获得更多小技巧(包括如何使用鼠标来使在 Vim 中的操作变得简单),请前往 [Vim 官方文档][16]。
|
||||
|
||||
@ -127,7 +113,7 @@ via: https://www.howtoforge.com/tutorial/perform-search-operations-in-vim/
|
||||
|
||||
作者:[Himanshu Arora][a]
|
||||
译者:[xiaow6](https://github.com/xiaow6)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -32,22 +32,26 @@
|
||||
|
||||
然后在这个文件底部添加脚本。
|
||||
|
||||
下图说明如何分别使用 **cron** 任务和 **rc.local** 运行两个示例脚本(`/home/gacanepa/script1.sh` 和 `/home/gacanepa/script2.sh`)。
|
||||
下图说明如何分别使用 cron 任务和 rc.local 运行两个示例脚本(`/home/gacanepa/script1.sh` 和 `/home/gacanepa/script2.sh`)。
|
||||
|
||||
script1.sh:
|
||||
|
||||
script1.sh:
|
||||
```
|
||||
#!/bin/bash
|
||||
DATE=$(date +'%F %H:%M:%S')
|
||||
DIR=/home/gacanepa
|
||||
echo "Current date and time: $DATE" > $DIR/file1.txt
|
||||
```
|
||||
script2.sh:
|
||||
|
||||
script2.sh:
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
SITE="Tecmint.com"
|
||||
DIR=/home/gacanepa
|
||||
echo "$SITE rocks... add us to your bookmarks." > $DIR/file2.txt
|
||||
```
|
||||
|
||||
[
|
||||
![启动时执行 Linux 脚本](http://www.tecmint.com/wp-content/uploads/2017/02/Run-Linux-Commands-at-Startup.png)
|
||||
][3]
|
||||
@ -65,7 +69,7 @@ $ chmod +x /home/gacanepa/script2.sh
|
||||
|
||||
要在登录或注销时执行脚本,分别需要使用 `~.bash_profile` 和 `~.bash_logout` 文件。多数情况下,后者需要手动创建。在每个文件的底部,添加调用脚本代码,如前面例中所示,就可以实现这个功能。
|
||||
|
||||
##### 总结
|
||||
### 总结
|
||||
|
||||
本文主要介绍如何在启动、登录以及注销系统时执行脚本。如果你有其他的方法可以补充,请使用下面的评论表给我们指出,我们期待您的回应!
|
||||
|
145
published/20170213 Orange Pi as Time Machine Server.md
Normal file
145
published/20170213 Orange Pi as Time Machine Server.md
Normal file
@ -0,0 +1,145 @@
|
||||
使用 Orange Pi 搭建 Time Machine 服务器
|
||||
=================================
|
||||
|
||||
![Orange Pi as Time Machine Server](https://i1.wp.com/piboards.com/wp-content/uploads/2017/02/OPiTM.png?resize=960%2C450)
|
||||
|
||||
我的工作之一是为各类家用计算机安排进行自动备份,包括存放重要数据的一组 Mac 计算机。我决定使用运行 [Armbian Linux][4] 的便宜的 [Orange Pi][3] 做实验,目的是希望 [Time Machine][5] 可以通过网络使用挂载在 Orange Pi 主板上的 USB 驱动器。在这种情况下,我找到并成功地安装了 Netatalk。
|
||||
|
||||
[Netatalk][6] 是一个用作苹果文件服务器的开源软件。通过 [Avahi][7] 和 Netatalk 配合运行,你的 Mac 设备能够识别网络上的 Orange Pi 设备,甚至会将 Orange pi 设备当作 “Mac” 类型的设备。这使得你能够手动连接到该网络设备,更重要的是使得 Time Machine 能够发现并使用远程驱动器。如果你想在 Mac 上设置类似的备份机制,下面的指南也许能够帮到你。
|
||||
|
||||
### 准备工作
|
||||
|
||||
为了配置该 USB 驱动器,我首先尝试了 HFS+ 格式文件系统,不幸的是我没能成功写入。所以我选择创建一个 EXT4 文件系统,并确保用户 `pi` 有读写权限。Linux 有很多格式化磁盘的方法,但是我最喜欢(而且推荐)的仍然是 [gparted][8]。由于 gparted 已经集成在 Armbian 桌面了,所以我直接使用了该工具。
|
||||
|
||||
我需要当 Orange Pi 启动或者 USB 驱动连接的时候,这个设备能够自动挂载到相同的位置。于是我创建了一个目录(`timemachine`)用于挂载:在其下新建一个 `tm` 目录用于真正的备份路径,并将 `tm` 的所有者更改为用户 `pi`。
|
||||
|
||||
```
|
||||
cd /mnt
|
||||
sudo mkdir timemachine
|
||||
cd timemachine
|
||||
sudo mkdir tm
|
||||
sudo chown pi:pi tm
|
||||
```
|
||||
|
||||
下一步,我打开一个终端并编辑 `/etc/fstab` 文件。
|
||||
|
||||
```
|
||||
sudo nano /etc/fstab
|
||||
```
|
||||
|
||||
并在该文件末尾添加了一行我的设备信息(根据我的设备情况,设置为 `sdc2`):
|
||||
|
||||
```
|
||||
/dev/sdc2 /mnt/timemachine ext4 rw,user,exec 0 0
|
||||
```
|
||||
|
||||
你需要通过命令行预装一些包,可能其中一些已经安装在你的系统上了:
|
||||
|
||||
```
|
||||
sudo apt-get install build-essential libevent-dev libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libtdb-dev libmysqlclient-dev avahi-daemon libavahi-client-dev libacl1-dev libldap2-dev libcrack2-dev systemtap-sdt-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libio-socket-inet6-perl tracker libtracker-sparql-1.0-dev libtracker-miner-1.0-dev hfsprogs hfsutils avahi-daemon
|
||||
```
|
||||
|
||||
### 安装并配置 Netatalk
|
||||
|
||||
下一步是下载 Netatalk,解压下载的文件,然后切换到 Netatalk 目录:
|
||||
|
||||
```
|
||||
wget https://sourceforge.net/projects/netatalk/files/netatalk/3.1.10/netatalk-3.1.10.tar.bz2
|
||||
tar xvf netatalk-3.1.10.tar.bz2
|
||||
cd netatalk-3.1.10
|
||||
```
|
||||
|
||||
然后需要顺序执行 `./configure`,`make`,`make install` 命令安装软件。在 netatalk-3.1.10 目录中执行 如下的 `./configure` 命令,这个命令需要花点时间才能执行完。
|
||||
|
||||
```
|
||||
./configure --with-init-style=debian-systemd --without-libevent --without-tdb --with-cracklib --enable-krbV-uam --with-pam-confdir=/etc/pam.d --with-dbus-daemon=/usr/bin/dbus-daemon --with-dbus-sysconf-dir=/etc/dbus-1/system.d --with-tracker-pkgconfig-version=1.0
|
||||
```
|
||||
|
||||
`./configure` 运行完成后执行 `make`:
|
||||
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
执行完 `make` 命令需要花较长时间,可以考虑喝杯咖啡或者做点其他什么。之后,执行以下命令:
|
||||
|
||||
```
|
||||
sudo make install
|
||||
```
|
||||
|
||||
这个命令能够快速执行完成。现在你可以通过下面两个命令验证安装是否成功,同时找到配置文件位置。
|
||||
|
||||
```
|
||||
sudo netatalk -V
|
||||
sudo afpd -V
|
||||
```
|
||||
|
||||
然后你需要编辑 `afp.conf` 配置文件并在其中指定 Time Machine 备份路径,可以访问的帐号名并指定是否使用 [Spotlight][9] 为备份建立索引。
|
||||
|
||||
```
|
||||
sudo nano /usr/local/etc/afp.conf
|
||||
```
|
||||
|
||||
下面是 `afp.conf` 的配置示例:
|
||||
|
||||
```
|
||||
[My Time Machine Volume]
|
||||
path = /mnt/timemachine/tm
|
||||
valid users = pi
|
||||
time machine = yes
|
||||
spotlight = no
|
||||
```
|
||||
|
||||
最后,启用 Avahi 和 Netatalk 并启动它们。
|
||||
|
||||
```
|
||||
sudo systemctl enable avahi-daemon
|
||||
sudo systemctl enable netatalk
|
||||
sudo systemctl start avahi-daemon
|
||||
sudo systemctl start netatalk
|
||||
```
|
||||
|
||||
### 连接到网络驱动器
|
||||
|
||||
此时,你的 Mac 可能已经发现并识别了你的 Pi 设备和网络驱动器。打开 Mac 中的 Finder,看看是否有像下面的内容:
|
||||
|
||||
![](https://i2.wp.com/piboards.com/wp-content/uploads/2017/02/TM_drive.png?resize=241%2C89)
|
||||
|
||||
当然你也可以通过主机名或者 ip 地址访问,比如:
|
||||
|
||||
```
|
||||
afp://192.168.1.25
|
||||
```
|
||||
|
||||
### Time Machine 备份
|
||||
|
||||
最后,打开 Mac 上的 Time Machine,然后“选择硬盘”,选择你的 Orange pi。
|
||||
|
||||
![](https://i1.wp.com/piboards.com/wp-content/uploads/2017/02/OPiTM.png?resize=579%2C381)
|
||||
|
||||
这样设置肯定有效,Orange Pi 能够很好的处理进程,不过这可能并不是最快速的备份方式。但是,这个方法比较简单且便宜,并且正如其展示的一样能够正常工作。如果对这些设置你已经成功或者进行了改进,请在下面留言或者发送消息给我。
|
||||
|
||||
![](https://i0.wp.com/piboards.com/wp-content/uploads/2017/02/backup_complete.png?resize=300%2C71)
|
||||
|
||||
Amazon 上有售卖 Orange Pi 主板。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://piboards.com/2017/02/13/orange-pi-as-time-machine-server/
|
||||
|
||||
作者:[MIKE WILMOTH][a]
|
||||
译者:[beyondworld](https://github.com/beyondworld)
|
||||
校对:[jasminepeng](https://github.com/jasminepeng)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://piboards.com/author/piguy/
|
||||
[1]:http://piboards.com/author/piguy/
|
||||
[2]:http://piboards.com/2017/02/13/orange-pi-as-time-machine-server/
|
||||
[3]:https://www.amazon.com/gp/product/B018W6OTIM/ref=as_li_tl?ie=UTF8&tag=piboards-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B018W6OTIM&linkId=08bd6573c99ddb8a79746c8590776c39
|
||||
[4]:https://www.armbian.com/
|
||||
[5]:https://support.apple.com/kb/PH25710?locale=en_US
|
||||
[6]:http://netatalk.sourceforge.net/
|
||||
[7]:https://en.wikipedia.org/wiki/Avahi_(software)
|
||||
[8]:http://gparted.org/
|
||||
[9]:https://support.apple.com/en-us/HT204014
|
@ -1,27 +1,27 @@
|
||||
Linux 游戏最好的操作系统:该选哪个以及为什么?
|
||||
哪个 Linux 系统最适合玩游戏?
|
||||
============================================================
|
||||
|
||||
### 告诉我们哪个 Linux 发型版对游戏支持的最好
|
||||
> 告诉我们哪个 Linux 发型版对游戏支持的最好
|
||||
|
||||
在过去几个月中,出于游戏目的,我们尝试了多种 GNU/Linux 发行版,我们得出的结论是没有专为 Linux 游戏设计的完美的操作系统。
|
||||
|
||||
我们都知道,游戏世界在 Nvidia 和 AMD 用户之间分裂。现在,如果你使用的是 Nvidia 显卡,即使是五年前的一块显卡,也可以在大多数基于 Linux 的操作系统上使用,因为 Nvidia 为大多数(如果不是全部的话)GPU 提供了最新的视频驱动程序。
|
||||
我们都知道,游戏世界分成 Nvidia 和 AMD 两个阵营。现在,如果你使用的是 Nvidia 显卡,即使是五年前的一块显卡,也可以在大多数基于 Linux 的操作系统上使用,因为 Nvidia 差不多为其所有的 GPU 都提供了最新的视频驱动程序。
|
||||
|
||||
当然,这意味着如果你有一块 Nvidia GPU,在大多数 GNU/Linux 发行版上你不会有什么大问题。至少与游戏中的图形或其他性能问题无关,这将严重影响你的游戏体验。
|
||||
当然,这意味着如果你有一块 Nvidia GPU,在大多数 GNU/Linux 发行版上你不会有什么大问题。至少与游戏中的图形或其他性能问题无关,这种问题将严重影响你的游戏体验。
|
||||
|
||||
<q class="subhead" style="font-size: 18px; line-height: 26px; margin-top: 30px; margin-bottom: 10px; position: relative; display: block; font-weight: 700; letter-spacing: -0.6px; color: rgb(0, 40, 115); font-family: museo_slab, serif;">AMD Radeon 用户最好的游戏发行版</q>
|
||||
### AMD Radeon 用户最好的游戏发行版
|
||||
|
||||
如果你使用 AMD Radeon GPU,事情会是完全不同的。我们都知道,AMD 的专有显卡驱动程序仍然需要大量的工作来兼容最新的 GNU/Linux 发行版本,所有的 AMD GPU,以及最新的 X.Org 服务端和 Linux 内核版本。
|
||||
如果你使用 AMD Radeon GPU,事情会是完全不同的。我们都知道,AMD 的专有显卡驱动程序仍然需要大量的工作来兼容最新的 GNU/Linux 发行版本。所有的 AMD GPU ,即便是在最新的 X.Org 服务端和 Linux 内核版本上都是这样。
|
||||
|
||||
目前,AMDGPU-PRO 视频驱动程序只能在 Ubuntu 16.04 LTS、CentOS 6.8/7.3、Red Hat Enterprise Linux 6.8/7.3、SUSE Linux Enterprise Desktop 和 Server 12 SP2 上运行。除了 Ubuntu 16.04 LTS 之外,我们不知道为什么 AMD 为所有这些面向服务器和企业级的操作系统提供支持。
|
||||
|
||||
我们不相信有 Linux 玩家会在这些系统上面玩游戏。[最新的 AMDGPU-PRO 更新][1]终于支持了HD 7xxx 和 8xxx 系列的 AMD Radeon GPU,但是如果我们不想使用 Ubuntu 16.04 LTS 呢?
|
||||
我们不相信有 Linux 玩家会在这些系统上面玩游戏。[最新的 AMDGPU-PRO 更新][1]终于支持了 HD 7xxx 和 8xxx 系列的 AMD Radeon GPU,但是如果我们不想使用 Ubuntu 16.04 LTS 呢?
|
||||
|
||||
另外,我们有 Mesa 3D 图形库,这在大多数发行版上都有。Mesa 图形栈为我们的 AMD GPU 提供了功能强大的开源 Radeon 和 AMDGPU 驱动程序,但是为了享受最好的游戏体验,你还需要拥有最新的 X.Org 服务端和 Linux 内核。
|
||||
|
||||
并不是所有的 Linux 操作系统都附带最新的 Mesa(13.0)、X.Org 服务端(1.19)和 Linux 内核(4.9)版本,它们支持较旧的 AMD GPU。有些系统只有一两种技术,但我们这些都需要,而且内核需要编译 AMD Radeon Southern Islands 和 Sea Island 来支持 AMDGPU 驱动程序工作。
|
||||
并不是所有的 Linux 操作系统都附带最新的 Mesa(13.0)、X.Org 服务端(1.19)和 Linux 内核(4.9)版本,它们支持较旧的 AMD GPU。有些系统只有其中一两种技术,但我们这些都需要,而且内核需要编译进 AMD Radeon Southern Islands 和 Sea Island 驱动来支持 AMDGPU。
|
||||
|
||||
我们发现整个情况相当令人沮丧,至少对于一些使用 AMD Radeon 老式显卡的玩家。现在,我们发现,使用 AMD Radeon HD 8xxx GPU 的最佳游戏体验只能通过使用 Git 和 Linux 内核 4.10 RC 的 Mesa 17 来实现。
|
||||
我们发现整个情况相当令人沮丧,至少对于一些使用 AMD Radeon 老式显卡的玩家来说是这样的。现在,我们发现,使用 AMD Radeon HD 8xxx GPU 的最佳游戏体验只能通过使用 Git 获取到的 Mesa 17 以及 Linux 内核 4.10 RC 来实现。
|
||||
|
||||
所以我们现在请求你 - 如果你找到了玩游戏的完美的 GNU/Linux 发行版,无论你使用的是 AMD Radeon 还是 Nvidia GPU,但我们最感兴趣的是那些使用 AMD GPU 的玩家,请告知我们你使用的是什么发行版,设置是什么,能不能玩最新的游戏,或者有无体验问题。谢谢!
|
||||
|
||||
@ -29,7 +29,7 @@ Linux 游戏最好的操作系统:该选哪个以及为什么?
|
||||
|
||||
via: http://news.softpedia.com/news/the-best-operating-system-for-linux-gaming-which-one-do-you-use-and-why-512861.shtml
|
||||
|
||||
作者:[Marius Nestor ][a]
|
||||
作者:[Marius Nestor][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[jasminepeng](https://github.com/jasminepeng)
|
||||
|
@ -1,7 +1,7 @@
|
||||
如何在 Debian 和 Ubuntu 上安装 MariaDB 10
|
||||
============================================================
|
||||
|
||||
MariaDB 是深受欢迎的数据库管理服务器软件 MySQL 的一个免费并且开源的分支。它由 MySQL 的原开发者在 GPLv2(通用公共许可证 2 版)下开发,并保持开源。
|
||||
MariaDB 是深受欢迎的数据库管理服务器软件 MySQL 的一个自由开源的分支。它由 MySQL 的原开发者在 GPLv2(通用公共许可证 2 版)下开发,并保持开源。
|
||||
|
||||
它被设计来实现 MySQL 的高兼容性。对于初学者,可以阅读 [MariaDB vs MySQL][5] 来了解关于它们的特性的更多信息。更重要的是,它被一些大公司/组织使用,比如 Wikipedia、WordPress.com 和 Google plus ,除此之外还有更多的。
|
||||
|
||||
@ -9,9 +9,9 @@ MariaDB 是深受欢迎的数据库管理服务器软件 MySQL 的一个免费
|
||||
|
||||
### 在 Debian 和 Ubuntu 上安装 MariaDB
|
||||
|
||||
1. 在安装之前 MariaDB 之前,你需要通过下面的命令导入仓库密匙并获取 MariaDB 仓库
|
||||
1、在安装之前 MariaDB 之前,你需要通过下面的命令导入仓库密匙并获取 MariaDB 仓库
|
||||
|
||||
#### 在 Debian 10(Sid) 上
|
||||
**在 Debian 10 (Sid) 上**
|
||||
|
||||
```
|
||||
$ sudo apt-get install software-properties-common
|
||||
@ -19,7 +19,7 @@ $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1
|
||||
$ sudo add-apt-repository 'deb [arch=amd64,i386] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian sid main'
|
||||
```
|
||||
|
||||
#### 在 Debian 9(Stretch) 上
|
||||
**在 Debian 9 (Stretch) 上**
|
||||
|
||||
```
|
||||
$ sudo apt-get install software-properties-common
|
||||
@ -27,7 +27,7 @@ $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1
|
||||
$ sudo add-apt-repository 'deb [arch=amd64] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian stretch main'
|
||||
```
|
||||
|
||||
#### 在 Debian 8(Jessie) 上
|
||||
**在 Debian 8 (Jessie) 上**
|
||||
|
||||
```
|
||||
$ sudo apt-get install software-properties-common
|
||||
@ -35,7 +35,7 @@ $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943
|
||||
$ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian jessie main'
|
||||
```
|
||||
|
||||
#### 在 Debian 7(Wheezy) 上
|
||||
**在 Debian 7 (Wheezy) 上**
|
||||
|
||||
```
|
||||
$ sudo apt-get install python-software-properties
|
||||
@ -43,7 +43,7 @@ $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943
|
||||
$ sudo add-apt-repository 'deb [arch=amd64,i386] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian wheezy main'
|
||||
```
|
||||
|
||||
#### 在 Ubuntu 16.10(Yakkety Yak) 上
|
||||
**在 Ubuntu 16.10 (Yakkety Yak) 上**
|
||||
|
||||
```
|
||||
$ sudo apt-get install software-properties-common
|
||||
@ -51,7 +51,7 @@ $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656
|
||||
$ sudo add-apt-repository 'deb [arch=amd64,i386] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu yakkety main'
|
||||
```
|
||||
|
||||
#### 在 Ubuntu 16.04 (Xenial Xerus) 上
|
||||
**在 Ubuntu 16.04 (Xenial Xerus) 上**
|
||||
|
||||
```
|
||||
$ sudo apt-get install software-properties-common
|
||||
@ -59,7 +59,7 @@ $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656
|
||||
$ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu xenial main'
|
||||
```
|
||||
|
||||
#### 在 Ubuntu 14.04 (Trusty) 上
|
||||
**在 Ubuntu 14.04 (Trusty) 上**
|
||||
|
||||
```
|
||||
$ sudo apt-get install software-properties-common
|
||||
@ -67,7 +67,7 @@ $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb0
|
||||
$ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu trusty main'
|
||||
```
|
||||
|
||||
2. 然后,更新系统安装包列表,并像下面这样安装 MariaDB 服务器:
|
||||
2、 然后,更新系统安装包列表,并像下面这样安装 MariaDB 服务器:
|
||||
|
||||
```
|
||||
$ sudo apt-get update
|
||||
@ -80,18 +80,18 @@ $ sudo apt-get install mariadb-server
|
||||
![Set New Root Password for MariaDB](http://www.tecmint.com/wp-content/uploads/2017/02/Set-New-Root-Password-for-MariaDB.png)
|
||||
][6]
|
||||
|
||||
为 MariaDB 设置新的 Root 密码
|
||||
*为 MariaDB 设置新的 Root 密码*
|
||||
|
||||
重新输入密码并按下 [ENTER] 键来继续安装。
|
||||
再次输入密码并按下回车键来继续安装。
|
||||
|
||||
|
||||
[
|
||||
![Repeat MariaDB Password](http://www.tecmint.com/wp-content/uploads/2017/02/Repeat-MariaDB-Password.png)
|
||||
][7]
|
||||
|
||||
再次输入 MariaDB 密码
|
||||
*再次输入 MariaDB 密码*
|
||||
|
||||
当 MariaDB 安装包安装完成以后,启动数据库服务器 daemon,同时启用它,使得在下次开机时它能够像下面这样自动启动:
|
||||
当 MariaDB 安装包安装完成以后,启动数据库服务器守护进程,同时启用它,使得在下次开机时它能够像下面这样自动启动:
|
||||
|
||||
```
|
||||
------------- On SystemD Systems -------------
|
||||
@ -109,15 +109,15 @@ $ sudo service mysql status
|
||||
![Start MariaDB Service](http://www.tecmint.com/wp-content/uploads/2017/02/Start-MariaDB-Service.png)
|
||||
][8]
|
||||
|
||||
开启 MariaDB 服务
|
||||
*开启 MariaDB 服务*
|
||||
|
||||
4. 然后,运行 `mysql_secure_installation` 脚本来保护数据库,在这儿你可以:
|
||||
4、 然后,运行 `mysql_secure_installation` 脚本来保护数据库,在这儿你可以:
|
||||
|
||||
1. 设置 root 密码(如果在上面的配置环节你没有进行设置的话)。
|
||||
2. 禁止远程 root 登录
|
||||
3. 移除测试数据库
|
||||
4. 移除匿名用户
|
||||
5. 重装特权
|
||||
5. 重载权限配置
|
||||
|
||||
```
|
||||
$ sudo mysql_secure_installation
|
||||
@ -126,9 +126,9 @@ $ sudo mysql_secure_installation
|
||||
![Secure MariaDB Installation](http://www.tecmint.com/wp-content/uploads/2017/02/sudo-mysql-secure-installation.png)
|
||||
][9]
|
||||
|
||||
保护 MariaDB 安装
|
||||
*保护 MariaDB 安装*
|
||||
|
||||
5. 一旦数据库服务器受保护以后,可以使用下面的 shell 命令查看已安装版本和登录 MariaDB:
|
||||
5、 一旦数据库服务器受保护以后,可以使用下面的 shell 命令查看已安装版本和登录 MariaDB:
|
||||
|
||||
```
|
||||
$ mysql -V
|
||||
@ -138,7 +138,7 @@ $ mysql -u root -p
|
||||
![Check MariaDB Version](http://www.tecmint.com/wp-content/uploads/2017/02/Check-MariaDB-Version.png)
|
||||
][10]
|
||||
|
||||
查看 MariaDB 版本
|
||||
*查看 MariaDB 版本*
|
||||
|
||||
开始学习 MySQL/MariaDB, 请阅读:
|
||||
|
||||
@ -153,20 +153,17 @@ $ mysql -u root -p
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
作者简介:
|
||||
|
||||
Aaron Kili 是 Linux 和 F.O.S.S 爱好者,将来的 Linux 系统管理员和网络开发人员,目前是 TecMint 的内容创作者,他喜欢用电脑工作,并坚信分享知识。
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/install-mariadb-in-ubuntu-and-debian/
|
||||
|
||||
作者:[Aaron Kili][a]
|
||||
译者:[ucasFL](https://github.com/ucasFL)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,131 +1,137 @@
|
||||
7 Ways to Determine the File System Type in Linux (Ext2, Ext3 or Ext4)
|
||||
Linux 中 7 个判断文件系统类型的方法
|
||||
============================================================
|
||||
|
||||
文件通过文件系统在磁盘及分区上命名、存储、检索以及更新,文件系统是在磁盘上组织文件的方式。
|
||||
|
||||
A file system is the way in which files are named, stored, retrieved as well as updated on a storage disk or partition; the way files are organized on the disk.
|
||||
文件系统分为两个部分:用户数据和元数据(文件名、创建时间、修改时间、大小以及目录层次结构中的位置等)。
|
||||
|
||||
A file system is divided in two segments called: User Data and Metadata (file name, time it was created, modified time, it’s size and location in the directory hierarchy etc).
|
||||
在本指南中,我们将用 7 种方法来识别你的 Linux 文件系统类型,如 Ext2、Ext3、Ext4、BtrFS、GlusterFS 等等。
|
||||
|
||||
In this guide, we will explain seven ways to identify your Linux file system type such as Ext2, Ext3, Ext4, BtrFS, GlusterFS plus many more.
|
||||
### 1、 使用 df 命令
|
||||
|
||||
### 1\. Using df Command
|
||||
|
||||
df command reports file system disk space usage, to include the file system type on a particular disk partition, use the `-T` flag as below:
|
||||
`df` 命令报告文件系统磁盘空间利用率,要显示特定的磁盘分区的文件系统类型,像下面那样使用 `-T` 标志:
|
||||
|
||||
```
|
||||
$ df -Th
|
||||
OR
|
||||
或者
|
||||
$ df -Th | grep "^/dev"
|
||||
```
|
||||
|
||||
[
|
||||
![df Command - Find Filesystem Type](http://www.tecmint.com/wp-content/uploads/2017/03/Find-Filesystem-Type-Using-df-Command.png)
|
||||
][3]
|
||||
|
||||
df Command – Find Filesystem Type
|
||||
*df 命令 – 找出文件系统类型*
|
||||
|
||||
For a comprehensive guide for df command usage go through our articles:
|
||||
要更好理解 `df` 命令,阅读下面的文章:
|
||||
|
||||
1. [12 Useful “df” Commands to Check Disk Space in Linux][1]
|
||||
2. [Pydf – An Alternative ‘df’ Command That Shows Disk Usage in Colours][2]
|
||||
1. [12 个有用的 df 命令来检查 Linux 中的磁盘空间][1]
|
||||
2. [Pydf - 一个替代 df 的命令,用颜色显示磁盘使用率][2]
|
||||
|
||||
### 2\. Using fsck Command
|
||||
### 2、 使用 fsck 命令
|
||||
|
||||
fsck is used to check and optionally [repair Linux file systems][4], it can also print the [file system type on specified disk partitions][5].
|
||||
`fsck` 用来检查以及[修复 Linux 文件系统][4],它也可以输出[指定磁盘分区的文件系统类型][5]。
|
||||
|
||||
The flag `-N` disables checking of file system for errors, it just shows what would be done (but all we need is the file system type):
|
||||
`-N` 标志禁用检查文件系统错误,它只是显示会做什么(但是我们只需要文件系统类型):
|
||||
|
||||
```
|
||||
$ fsck -N /dev/sda3
|
||||
$ fsck -N /dev/sdb1
|
||||
```
|
||||
|
||||
[
|
||||
![fsck - Print Linux Filesystem Type](http://www.tecmint.com/wp-content/uploads/2017/03/fsck-Print-Linux-Filesystem-Type.png)
|
||||
][6]
|
||||
|
||||
fsck – Print Linux Filesystem Type
|
||||
*fsck – 打印 Linux 文件系统类型*
|
||||
|
||||
### 3\. Using lsblk Command
|
||||
### 3、 使用 lsblk 命令
|
||||
|
||||
lsblk displays block devices, when used with the `-f` option, it prints file system type on partitions as well:
|
||||
`lsblk` 会显示块设备,当使用 `-f` 选项时,它也会打印分区的文件系统类型:
|
||||
|
||||
```
|
||||
$ lsblk -f
|
||||
```
|
||||
|
||||
[
|
||||
![lsblk - Shows Linux Filesystem Type](http://www.tecmint.com/wp-content/uploads/2017/03/lsblk-Shows-Linux-Filesystem-Type.png)
|
||||
][7]
|
||||
|
||||
lsblk – Shows Linux Filesystem Type
|
||||
*lsblk – 显示 Linux 文件系统类型*
|
||||
|
||||
### 4\. Using mount Command
|
||||
### 4、 使用 mount 命令
|
||||
|
||||
mount command is used to [mount a file system in Linux][8], it can also be used to [mount an ISO image][9], [mount remote Linux filesystem][10] and so much more.
|
||||
`mount` 命令用来[在 Linux 中挂载文件系统][8],它也可以用来[挂载一个 ISO 镜像][9],[挂载远程 Linux 文件系统][10]等等。
|
||||
|
||||
When run without any arguments, it prints [info about disk partitions][11] including the file system type as below:
|
||||
当不带任何参数运行时,它会打印包含文件系统类型在内的[磁盘分区的信息][11]:
|
||||
|
||||
```
|
||||
$ mount | grep "^/dev"
|
||||
```
|
||||
|
||||
[
|
||||
![Mount - Show Filesystem Type in Linux](http://www.tecmint.com/wp-content/uploads/2017/03/Mount-Show-Filesystem-Type.png)
|
||||
][12]
|
||||
|
||||
Mount – Show Filesystem Type in Linux
|
||||
*Mount – 在 Linux 中显示文件系统类型*
|
||||
|
||||
### 5\. Using blkid Command
|
||||
### 5、 使用 blkid 命令
|
||||
|
||||
blkid command is used to [find or print block device properties][13], simply specify the disk partition as an argument like so:
|
||||
`blkid` 命令用来[找出或打印块设备属性][13],只要将磁盘分区作为参数就行了:
|
||||
|
||||
```
|
||||
$ blkid /dev/sda3
|
||||
```
|
||||
|
||||
[
|
||||
![blkid - Find Filesystem Type](http://www.tecmint.com/wp-content/uploads/2017/03/blkid-Find-Filesystem-Type.png)
|
||||
][14]
|
||||
|
||||
blkid – Find Filesystem Type
|
||||
*blkid – 找出文件系统类型*
|
||||
|
||||
### 6\. Using file Command
|
||||
### 6、 使用 file 命令
|
||||
|
||||
file command identifies file type, the `-s` flag enables reading of block or character files and `-L` enables following of symlinks:
|
||||
`file` 命令会识别文件类型,使用 `-s` 标志启用读取块设备或字符设备,`-L` 启用符号链接跟随:
|
||||
|
||||
```
|
||||
$ sudo file -sL /dev/sda3
|
||||
```
|
||||
|
||||
[
|
||||
![file - Identifies Filesystem Type](http://www.tecmint.com/wp-content/uploads/2017/03/file-command-identifies-filesystem-type.png)
|
||||
][15]
|
||||
|
||||
file – Identifies Filesystem Type
|
||||
*file – 识别文件系统类型*
|
||||
|
||||
### 7\. Using fstab File
|
||||
### 7、 使用 fstab 文件
|
||||
|
||||
The /etc/fstab is a static file system info (such as mount point, file system type, mount options etc) file:
|
||||
`/etc/fstab` 是一个静态文件系统信息(比如挂载点、文件系统类型、挂载选项等等)文件:
|
||||
|
||||
```
|
||||
$ cat /etc/fstab
|
||||
```
|
||||
|
||||
[
|
||||
![Fstab - Shows Linux Filesystem Type](http://www.tecmint.com/wp-content/uploads/2017/03/fstab-shows-filesystem-types.png)
|
||||
][16]
|
||||
|
||||
Fstab – Shows Linux Filesystem Type
|
||||
*fstab – 显示 Linux 文件系统类型*
|
||||
|
||||
That’s it! In this guide, we explained seven ways to identify your Linux file system type. Do you know of any method not mentioned here? Share it with us in the comments.
|
||||
就是这样了!在这篇指南中,我们用 7 种方法来识别你的 Linux 文件系统类型。你还知道这里没有提到的其他方法么?在评论中与我们分享。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
作者简介:
|
||||
|
||||
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.
|
||||
Aaron Kili是一名 Linux 和 F.O.S.S 的爱好者,未来的 Linux 系统管理员、网站开发人员,目前是 TecMint 的内容创作者,他喜欢用电脑工作,并乐于分享知识。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/find-linux-filesystem-type/
|
||||
|
||||
作者:[Aaron Kili][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,92 @@
|
||||
如何在 Ubuntu 中升级到最新内核
|
||||
============================================================
|
||||
|
||||
每过段时间,就有新的设备和技术出来,因此如果我们想要充分利用它,保持最新的 Linux 内核就显得很重要。此外,更新系统内核将使我们能够利用新的内核优化,并且它还可以帮助我们避免在早期版本中发现的漏洞。
|
||||
|
||||
**建议阅读:** [如何升级 CentOS 7内核][1]
|
||||
|
||||
准备好了在 Ubuntu 16.04 或其衍生版本(如 Debian 和 Linux Mint)中更新你的内核了么?如果准备好了,请你继续阅读!
|
||||
|
||||
### 第一步:检查安装的内核版本
|
||||
|
||||
要发现当前系统安装的版本,我们可以:
|
||||
|
||||
```
|
||||
$ uname -sr
|
||||
```
|
||||
|
||||
下面的截图显示了在 Ubuntu 16.04 server 中上面命令的输出:
|
||||
|
||||
[
|
||||
![Check Kernel Version in Ubuntu](http://www.tecmint.com/wp-content/uploads/2017/03/Check-Kernel-Version-in-Ubuntu.png)
|
||||
][2]
|
||||
|
||||
*在 Ubuntu 中检查内核版本*
|
||||
|
||||
### 第二步:在 Ubuntu 16.04 中升级内核
|
||||
|
||||
要升级 Ubuntu 16.04 的内核,打开 [http://kernel.ubuntu.com/~kernel-ppa/mainline/][3] 并选择列表中需要的版本(发布此文时最新内核是 4.10.1)。
|
||||
|
||||
接下来,根据你的系统架构下载 `.deb` 文件:
|
||||
|
||||
对于 64 位系统:
|
||||
```
|
||||
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001_4.10.1-041001.201702260735_all.deb
|
||||
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001-generic_4.10.1-041001.201702260735_amd64.deb
|
||||
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-image-4.10.1-041001-generic_4.10.1-041001.201702260735_amd64.deb
|
||||
|
||||
```
|
||||
|
||||
这是 32 位系统的:
|
||||
```
|
||||
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001_4.10.1-041001.201702260735_all.deb
|
||||
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb
|
||||
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-image-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb
|
||||
```
|
||||
|
||||
下载完成这些所有内核文件后,如下安装:
|
||||
|
||||
```
|
||||
$ sudo dpkg -i *.deb
|
||||
```
|
||||
|
||||
安装完成后,重启并验证新的内核已经被使用了:
|
||||
|
||||
```
|
||||
$ uname -sr
|
||||
```
|
||||
|
||||
就是这样。你下载就可以使用比 Ubuntu 16.04 默认安装的内核的更新版本了。
|
||||
|
||||
### 总结
|
||||
|
||||
本文我们展示了如何在 Ubuntu 系统上轻松升级Linux内核。这里还有另一个流程,但我们在这里没有展示,因为它需要从源代码编译内核,这不推荐在生产 Linux 系统上使用。
|
||||
|
||||
如果你仍然有兴趣编译内核作为一个学习经验,你可以在 [Kernel Newbies][4] 网站中得到指导该如何做。
|
||||
|
||||
一如既往,如果你对本文有任何问题或意见,请随时使用下面的评论栏。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
作者简介:
|
||||
|
||||
Gabriel Cánepa - 一位来自阿根廷圣路易斯梅塞德斯镇 (Villa Mercedes, San Luis, Argentina) 的 GNU/Linux 系统管理员,Web 开发者。就职于一家世界领先级的消费品公司,乐于在每天的工作中能使用 FOSS 工具来提高生产力。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/upgrade-kernel-in-ubuntu/
|
||||
|
||||
作者:[Gabriel Cánepa][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/gacanepa/
|
||||
|
||||
[1]:http://www.tecmint.com/install-upgrade-kernel-version-in-centos-7/
|
||||
[2]:http://www.tecmint.com/wp-content/uploads/2017/03/Check-Kernel-Version-in-Ubuntu.png
|
||||
[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/
|
||||
[4]:https://kernelnewbies.org/KernelBuild
|
||||
[5]:http://www.tecmint.com/author/gacanepa/
|
||||
[6]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
|
||||
[7]:http://www.tecmint.com/free-linux-shell-scripting-books/
|
@ -0,0 +1,396 @@
|
||||
LXD 2.0 系列(十二):调试,及给 LXD 做贡献
|
||||
================
|
||||
|
||||
![LXD logo](https://linuxcontainers.org/static/img/containers.png)
|
||||
|
||||
### 介绍
|
||||
|
||||
终于要结束了!这个大约一年前开始的[这系列文章][3]的最后一篇博文。
|
||||
|
||||
如果你从一开始就关注了这个系列,你应该已经使用了 LXD 相当长的时间了,并且非常熟悉它的日常操作和功能。
|
||||
|
||||
但如果出现问题怎么办?你可以做什么来自己跟踪问题?如果你不能,你应该记录什么信息,以便上游可以跟踪问题?
|
||||
|
||||
如果你想自己解决问题或通过实现你需要的功能来帮助改善LXD怎么办?如何构建,测试和贡献 LXD 代码库?
|
||||
|
||||
### 调试 LXD 并填写 bug 报告
|
||||
|
||||
#### LXD 日志文件
|
||||
|
||||
`/var/log/lxd/lxd.log`:
|
||||
|
||||
这是 LXD 日志的主文件。为了避免它快速充满你的磁盘,默认只会记录 `INFO`、`WARNING` 或者 `ERROR` 级别的日志。你可以在 LXD 守护进程中使用 `–debug` 改变其行为。
|
||||
|
||||
`/var/log/lxd/CONTAINER/lxc.conf`:
|
||||
|
||||
每当你启动容器时,此文件将更新为传递给 LXC 的配置。
|
||||
|
||||
这里会展示容器将如何配置,包括其所有的设备、绑定挂载等等。
|
||||
|
||||
`/var/log/lxd/CONTAINER/forkexec.log`:
|
||||
|
||||
这个文件包含 LXC 命令执行失败时产生的错误。这个情况是非常罕见的,因为 LXD 通常会在发生之前处理大多数错误。
|
||||
|
||||
`/var/log/lxd/CONTAINER/forkstart.log`:
|
||||
|
||||
这个文件包含 LXC 在启动容器时的错误信息。含 LXC 命令执行失败时产生的错误。
|
||||
|
||||
#### CRIU 日志 (对于实时迁移)
|
||||
|
||||
如果使用 CRIU 进行容器实时迁移或实时快照,则每次生成 CRIU 转储或恢复转储时都会记录额外的日志文件。
|
||||
|
||||
这些日志也可以在 `/var/log/lxd/CONTAINER/` 中找到,并且有时间戳,以便你可以找到与你最近的操作所匹配的那些日志。它们包含 CRIU 转储和恢复的所有内容的详细记录,并且比典型的迁移/快照错误消息更容器理解。
|
||||
|
||||
#### LXD 调试消息
|
||||
|
||||
如上所述,你可以使用 `-debug` 选项将守护进程切换为执行调试日志记录。另一种方法是连接到守护进程的事件接口,它将显示所有日志条目,而不管配置的日志级别(即使是远程工作)。
|
||||
|
||||
举例说,对于 `lxc init ubuntu:16.04 xen` 来说,
|
||||
|
||||
`lxd.log` 会是这样:
|
||||
|
||||
```
|
||||
INFO[02-24|18:14:09] Starting container action=start created=2017-02-24T23:11:45+0000 ephemeral=false name=xen stateful=false used=1970-01-01T00:00:00+0000
|
||||
INFO[02-24|18:14:10] Started container action=start created=2017-02-24T23:11:45+0000 ephemeral=false name=xen stateful=false used=1970-01-01T00:00:00+0000
|
||||
```
|
||||
|
||||
而 `lxc monitor –type=logging` 会是:
|
||||
|
||||
```
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'New events listener: 9b725741-ffe7-4bfc-8d3e-fe620fc6e00a'
|
||||
timestamp: 2017-02-24T18:14:01.025989062-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /1.0
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.341283344-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StorageCoreInit
|
||||
timestamp: 2017-02-24T18:14:09.341536477-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /1.0/containers/xen
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.347709394-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: PUT
|
||||
url: /1.0/containers/xen/state
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.357046302-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'New task operation: 2e2cf904-c4c4-4693-881f-57897d602ad3'
|
||||
timestamp: 2017-02-24T18:14:09.358387853-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'Started task operation: 2e2cf904-c4c4-4693-881f-57897d602ad3'
|
||||
timestamp: 2017-02-24T18:14:09.358578599-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /1.0/operations/2e2cf904-c4c4-4693-881f-57897d602ad3/wait
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.366213106-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StoragePoolInit
|
||||
timestamp: 2017-02-24T18:14:09.369636451-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StoragePoolCheck
|
||||
timestamp: 2017-02-24T18:14:09.369771164-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
container: xen
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: ContainerMount
|
||||
timestamp: 2017-02-24T18:14:09.424696767-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
name: xen
|
||||
level: dbug
|
||||
message: ContainerUmount
|
||||
timestamp: 2017-02-24T18:14:09.432723719-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
container: xen
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: ContainerMount
|
||||
timestamp: 2017-02-24T18:14:09.721067917-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
action: start
|
||||
created: 2017-02-24 23:11:45 +0000 UTC
|
||||
ephemeral: "false"
|
||||
name: xen
|
||||
stateful: "false"
|
||||
used: 1970-01-01 00:00:00 +0000 UTC
|
||||
level: info
|
||||
message: Starting container
|
||||
timestamp: 2017-02-24T18:14:09.749808518-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /1.0
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.792551375-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StorageCoreInit
|
||||
timestamp: 2017-02-24T18:14:09.792961032-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /internal/containers/23/onstart
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.800803501-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StoragePoolInit
|
||||
timestamp: 2017-02-24T18:14:09.803190248-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StoragePoolCheck
|
||||
timestamp: 2017-02-24T18:14:09.803251188-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
container: xen
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: ContainerMount
|
||||
timestamp: 2017-02-24T18:14:09.803306055-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'Scheduler: container xen started: re-balancing'
|
||||
timestamp: 2017-02-24T18:14:09.965080432-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
action: start
|
||||
created: 2017-02-24 23:11:45 +0000 UTC
|
||||
ephemeral: "false"
|
||||
name: xen
|
||||
stateful: "false"
|
||||
used: 1970-01-01 00:00:00 +0000 UTC
|
||||
level: info
|
||||
message: Started container
|
||||
timestamp: 2017-02-24T18:14:10.162965059-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'Success for task operation: 2e2cf904-c4c4-4693-881f-57897d602ad3'
|
||||
timestamp: 2017-02-24T18:14:10.163072893-05:00
|
||||
type: logging
|
||||
```
|
||||
|
||||
`lxc monitor` 的格式有点不同于每个条目都缩合成一行的日志文件,但更重要的是,你可以看到所有 `level:dbug` 条目。
|
||||
|
||||
### 如何报告 bug
|
||||
|
||||
#### LXD 的 bug
|
||||
|
||||
最好报告 bug 的地方是 [https://github.com/lxc/lxd/issues][4]。确保完整填写了 bug 报告模板中的内容,这些信息可以节省我们我们时间来复现环境。
|
||||
|
||||
#### Ubuntu 的 bug
|
||||
|
||||
如果你发现 Ubuntu 包本身有问题,无法安装、升级或删除。或者遇到 LXD init 脚本的问题。报告此类错误的最好是在 Launchpad 上。
|
||||
|
||||
在 Ubuntu 系统上,你可以使用:`ubuntu-bug lxd` ,它将自动包括一些日志文件和包信息供我们查看。
|
||||
|
||||
#### CRIU 的 bug
|
||||
|
||||
与 CRIU 相关的 Bug,你可以通过 CRIU 的错误输出发现,你应该在 Launchpad 上报告这些:`ubuntu-bug criu`
|
||||
|
||||
请注意,通过 LXD 使用 CRIU 属于测试版功能,除非你愿意通过 Canonical 的支持合同付费支持,要么可能需要一段时间才能查看你的错误报告。
|
||||
|
||||
### 贡献给 LXD
|
||||
|
||||
LXD 用 [Go][5] 写成并[托管在 Github][6]。我们欢迎任外部的贡献。为 LXD 贡献不需要 CLA 或类似的法律协议签署,只是通常的开发者所有权证书(`Signed-off-by:` 行)。
|
||||
|
||||
在我们的问题追踪器工具中,我们列有许多潜在的功能需求,新的贡献者可以以此作为良好的起点。通常最好在开始处理代码先发出 issue,这样每个人都知道你正在做这项工作,以便我们可以提供一些早期反馈。
|
||||
|
||||
#### 从源码源码构建 LXD
|
||||
|
||||
这里有上游的维护说明:[https://github.com/lxc/lxd#building-from-source][7]
|
||||
|
||||
你需要在 Github 上 fork 上游仓库,然后将你的更改推送到你的分支。我们建议每天 rebase 上游的 LXD,因为我们倾向于定期合并更改。
|
||||
|
||||
#### 运行测试套件
|
||||
|
||||
LXD 维护了两套测试集,单元测试和集成测试。你可以用下面的命令测试所有:
|
||||
|
||||
```
|
||||
sudo -E make check
|
||||
```
|
||||
|
||||
要只运行单元测试,使用:
|
||||
|
||||
```
|
||||
sudo -E go test ./...
|
||||
```
|
||||
|
||||
要运行集成测试,使用:
|
||||
|
||||
```
|
||||
cd test
|
||||
sudo -E ./main.sh
|
||||
```
|
||||
|
||||
后者支持相当多的环境变量来测试各种存储后端、禁用网络测试、使用 ramdisk 或只是调整日志输出。其中一些是:
|
||||
|
||||
* `LXD_BACKEND`:`btrfs`、`dir`、`lvm` 或 `zfs`” 之一(默认为 `dir`)
|
||||
运行 LXD 存储驱动程序相关的所有测试。
|
||||
* `LXD_CONCURRENT`:`true` 或 `false`(默认为 `false`)
|
||||
这启用一些额外的并发测试。
|
||||
* `LXD_DEBUG`:`true` 或 `false`(默认为 `false`)
|
||||
记录所有 shell 命令,并在调试模式下运行所有 LXD 命令。
|
||||
* `LXD_INSPECT`:`true` 或 `false`(默认为 `false`)
|
||||
测试程序会在故障时挂起,以便你可以检查环境。
|
||||
* `LXD_LOGS`:将所有 `LXD` 日志文件转储到的目录(默认为 “”)
|
||||
所有生成的 LXD 守护进程的 `logs` 目录将被复制到此路径。
|
||||
* `LXD_OFFLINE`:`true` 或 `false`(默认为 `false`)
|
||||
禁用任何依赖于外部网络连接的测试。
|
||||
* `LXD_TEST_IMAGE`: unified 格式的 LXD 镜像的路径(默认为 “”)
|
||||
可以使用自定义测试镜像,而不是默认的最小 busybox 镜像。
|
||||
* `LXD_TMPFS`:`true` 或 `false`(默认为 `false`)
|
||||
在 `tmpfs` 安装中运行整个测试套件,这会使用相当多的内存,但会使测试速度明显更快。
|
||||
* `LXD_VERBOSE`:`true` 或 `false`(默认为 `false`)
|
||||
不太极端的 `LXD_DEBUG` 版本。shell 命令仍然会记录,但 `-debug` 不会传递给 LXC 命令,LXD 守护进程只能使用 `-verbose` 运行。
|
||||
|
||||
测试程序将在实际运行之前提醒你任何缺失的依赖项。在相当快的机器上运行该测试可在 10 分钟内完成。
|
||||
|
||||
#### 发送你的分支
|
||||
|
||||
发送拉取请求(PR)之前,你需要确认:
|
||||
|
||||
* 你已经 rebase 了上游分支
|
||||
* 你的所有提交信息都包括 `Signed-off-by: First Last <email>` 这行
|
||||
* 已删除任何你的临时调试代码
|
||||
* 你已经将相关的提交 squash 在一起,以保持你的分支容易审查
|
||||
* 单元和集成测试全部通过
|
||||
|
||||
一切完成后,在 Github 上发起一个拉取请求。我们的 [Jenkins][8] 将验证提交是否全部有 `signed-off`,在 MacOS 和 Windows 上的测试将自动执行,如果看起来不错,我们将触发一个完整的 Jenkins 测试,它将在所有存储后端、32 位和 64 位以及我们关心的所有 Go 版本上测试你的分支。
|
||||
|
||||
假设我们有人触发了 Jenkins,这通常需要不到一个小时的时间。
|
||||
|
||||
一旦所有测试完成,我们对代码本身感到满意,你的分支将会被合并,你的代码会出现在下一个 LXD 发布中。如果更改适用于 LXD stable-2.0 分支,我们将为你向后移植。
|
||||
|
||||
### 总结
|
||||
|
||||
我希望这个系列的博客文章有助于你了解什么是 LXD,以及它可以做什么!
|
||||
|
||||
本系列的范围仅限于 LXD(2.0.x),但我们也为那些想要最新功能的用户提供每月功能版本。你可以找到一些其他涵盖了原来的 [LXD 2.0系列文章][9]中列出的功能的博客文章。
|
||||
|
||||
### 额外的信息
|
||||
|
||||
LXD 的主站在: [https://linuxcontainers.org/lxd][10]
|
||||
LXD 的 GitHub 开发仓库: [https://github.com/lxc/lxd][11]
|
||||
LXD 的邮件列表: [https://lists.linuxcontainers.org][12]
|
||||
LXD 的 IRC 频道:#lxcontainers on irc.freenode.net
|
||||
在线尝试 LXD: [https://linuxcontainers.org/lxd/try-it][13]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://stgraber.org/2017/02/27/lxd-2-0-debugging-and-contributing-to-lxd-1212/
|
||||
|
||||
作者:[Stéphane Graber][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://stgraber.org/author/stgraber/
|
||||
[1]:https://stgraber.org/author/stgraber/
|
||||
[2]:https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/
|
||||
[3]:https://stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/
|
||||
[4]:https://github.com/lxc/lxd/issues
|
||||
[5]:https://golang.org/
|
||||
[6]:https://github.com/lxc/lxd
|
||||
[7]:https://github.com/lxc/lxd#building-from-source
|
||||
[8]:https://jenkins.linuxcontainers.org/
|
||||
[9]:https://stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/
|
||||
[10]:https://linuxcontainers.org/lxd
|
||||
[11]:https://github.com/lxc/lxd
|
||||
[12]:https://lists.linuxcontainers.org/
|
||||
[13]:https://linuxcontainers.org/lxd/try-it
|
||||
[14]:https://stgraber.org/2017/02/27/lxd-2-0-debugging-and-contributing-to-lxd-1212/
|
@ -1,8 +1,9 @@
|
||||
# Linux 是什么?一个简短的描述
|
||||
Linux 发行版简介系列:Linux 是什么?
|
||||
===================
|
||||
|
||||
正如上面的问题所述,我们将要了解:
|
||||
|
||||
**Linux 是什么?**
|
||||
### Linux 是什么?
|
||||
|
||||
简单来说, Linux 是一个基于 Unix 的开源操作系统。
|
||||
|
||||
@ -10,20 +11,21 @@
|
||||
|
||||
1991 年 10 月 5 日, Linus Torvalds 首次发布 Linux 内核。 Linux 内核是 Linux 系统的一个非常重要的组成部分。目前, Linux 主要用于多种服务器和超级计算机等。它也被用于手机操作系统,比如 Android 操作系统是基于 Linux 内核的。
|
||||
|
||||
在早期, Linux 作为一个免费的操作系统被用于基于 Intel ×86 的个人电脑上。因为 Linux 是一个开源操作系统,所以它的源代码可以被修改或使用,也可以在有许可证,比如 GNU(通用公共许可证)的情况下被任何人发布。简而言之,如果具备一定知识,知道自己在干什么,那么任何人都可以从 Linux 那儿获得自己的操作系统。正因此,才有了许多 Linux 发行版。
|
||||
在早期,Linux 作为一个免费的操作系统被用于基于 Intel ×86 的个人电脑上。因为 Linux 是一个开源操作系统,所以它的源代码可以被修改或使用,也可以在有 GPL(通用公共许可证)这样许可证下被任何人发布。简而言之,如果具备一定知识,知道自己在干什么,那么任何人都可以从 Linux 那儿获得自己的操作系统。正因此,才有了许多 Linux 发行版。
|
||||
|
||||
**现在, Linux 发行版是什么?**
|
||||
### 那么, Linux 发行版是什么?
|
||||
|
||||
它是基于 Linux 内核的一个操作系统。它加载有用户可以访问的软件集合。更多的,它还包含系统管理包。目前有许多 Linux 发行版。因为我们不能数清目前所有的 Linux 发行版,所以我们来看一下一些有名的版本:
|
||||
它是基于 Linux 内核的一个操作系统。它带有用户可以使用的软件集合。更多的,它还包含系统管理包。目前有许多 Linux 发行版。因为我们不能数清目前所有的 Linux 发行版,所以我们来看一下一些有名的版本:
|
||||
Ubuntu、Fedora、Opensuse、Red hat Linux 和 Debian 等是几个非常受欢迎的 Linux 发行版。
|
||||
|
||||
[
|
||||
[
|
||||
![](https://3.bp.blogspot.com/-8ckfHXqKaPA/U2o2ufvZ0nI/AAAAAAAAAN0/Frd4OS7m7dk/s280/image_1.png)
|
||||
][1]
|
||||
|
||||
> Ubuntu, 一个非常受欢迎的 Linux 发行版和第三受欢迎的操作系统
|
||||
|
||||
|
||||
Linux 发行版是一个已经准备好可以在个人电脑上安装的完整包。一旦用户在桌面或者服务器上安装了 Linux 发行版,就可以使用各种现成的软件和应用程序。现在,很多 Linux 发行版都具有很好的图形用户界面(GUI),这使得它们成为 windows 系统或 Mac 系统的一个很好的替代品。
|
||||
Linux 发行版是一个已经准备好可以在个人电脑上安装的完整包。一旦用户在桌面或者服务器上安装了 Linux 发行版,就可以使用各种现成的软件和应用程序。现在,很多 Linux 发行版都具有很好的图形用户界面(GUI),这使得它们成为 Windows 系统或 Mac 系统的一个很好的替代品。
|
||||
|
||||
目前, Linux 发行版在性能、界面、可访问性以及最重要的 - 用户友好性等方面都有了很大的提高。一些发行版比如 Ubuntu 和 Linux mint 等,随着用户数量的一天天增加,赢得了很好的市场地位。 Ubuntu 是紧随 Windows 和 Mac 第三受欢迎的操作系统。
|
||||
|
||||
@ -33,9 +35,9 @@ Linux 发行版是一个已经准备好可以在个人电脑上安装的完整
|
||||
|
||||
via: http://www.techphylum.com/2014/05/what-is-linux-brief-description.html?m=1
|
||||
|
||||
作者:[sumit rohankar ][a]
|
||||
作者:[sumit rohankar][a]
|
||||
译者:[ucasFL](https://github.com/ucasFL)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,3 +1,4 @@
|
||||
【翻译中】
|
||||
How Linux Helped Me Become an Empowered Computer User
|
||||
============================================================
|
||||
|
||||
|
@ -0,0 +1,69 @@
|
||||
Meditator-hkx 翻译中...
|
||||
|
||||
|
||||
|
||||
Windows wins the desktop, but Linux takes the world
|
||||
============================================================
|
||||
|
||||
The city with the highest-profile Linux desktop projects is turning back to Windows, but the fate of Linux isn't tied to the PC anymore.
|
||||
|
||||
|
||||
![munich2.jpg](http://zdnet3.cbsistatic.com/hub/i/r/2017/02/10/9befc3d2-7931-48df-8114-008d23f1941d/resize/770xauto/02ca33958e5288c81a85d3dac546f621/munich2.jpg)
|
||||
>The fate of Munich's Linux project is only part of the story of open source software.
|
||||
>Image: Getty Images/iStockphoto
|
||||
|
||||
After a nearly decade-long project to move away from Windows onto Linux, Munich has all but decided on a dramatic u-turn. It's likely that, by 2021, the city council will start to replace PCs running LiMux (its custom version of Ubuntu) [with Windows 10][4].
|
||||
|
||||
Going back maybe 15 or 20 years, it was seriously debated as to when Linux would overtake Windows on the desktop. When Ubuntu was created in 2004, for example, it was with the [specific intention of replacing Windows][5] as the standard desktop operating system.
|
||||
|
||||
Spoiler: it didn't happen.
|
||||
|
||||
Linux on the desktop has about a two percent market share today and is viewed by many as complicated and obscure. Meanwhile, Windows sails on serenely, currently running on 90 percent of PCs in use. There will likely always be a few Linux desktops around in business -- particularly for developers or data scientists.
|
||||
|
||||
But it's never going to be mainstream.
|
||||
|
||||
There has been lots of interest in Munich's Linux project because it's one of the biggest around. Few large organizations have switched from Windows to Linux, although there are some others, like [the French Gendarmerie and the city of Turin][6]. But [Munich was the poster child][7]: losing it as a case study will undoubtedly be a blow to those still [championing Linux on the desktop][8].
|
||||
|
||||
But the reality is that most companies are happy to go with the dominant desktop OS, given all of the advantages around integration and familiarity that come with it.
|
||||
|
||||
It's not entirely clear how much of the problems that some staff have complained about are down to the LiMux software and how much the operating system is being blamed for unrelated issues. But whatever Munich finally decides to do, Linux's fate is not going to be decided on the desktop -- Linux lost the desktop war years ago.
|
||||
|
||||
That's probably OK because Linux won the smartphone war and is doing pretty well on the cloud and Internet of Things battlefields too.
|
||||
|
||||
There's a four-in-five chance that there's a Linux-powered smartphone in your pocket (Android is based on the Linux kernel) and plenty of IoT devices are Linux-powered too, even if you don't necessarily notice it.
|
||||
|
||||
Devices [like the Raspberry Pi,][9] running a vast array of different flavours of Linux, are creating an enthusiastic community of makers and giving startups a low-cost way to power new types of devices.
|
||||
|
||||
Much of the public cloud is running on Linux in one form or another, too; even Microsoft has warmed up to open-source software. Regardless of your views about one software platform or another, having a rich set of options for developers and users is good for choice and good for innovation.
|
||||
|
||||
The dominance of the desktop is not what it once was: it's now just one computing platform among many. Indeed, the software on the PC becomes less and less relevant as more apps become device- and OS-independent, residing in the cloud instead.
|
||||
|
||||
The twists and turns of the Munich saga and the adventures of Linux on the desktop are fascinating, but they don't tell the full story.
|
||||
|
||||
_Agree? Disagree? Join the debate by posting a comment below._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.zdnet.com/article/windows-wins-the-desktop-but-linux-takes-the-world/
|
||||
|
||||
作者:[Steve Ranger ][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.zdnet.com/meet-the-team/uk/steve-ranger/
|
||||
[1]:http://www.techrepublic.com/resource-library/whitepapers/why-munich-made-the-switch-from-windows-to-linux-and-may-be-reversing-course/
|
||||
[2]:http://www.zdnet.com/article/windows-wins-the-desktop-but-linux-takes-the-world/#comments-c2df091a-2ecf-4e55-84f6-fd3309cf917d
|
||||
[3]:http://www.techrepublic.com/resource-library/whitepapers/why-munich-made-the-switch-from-windows-to-linux-and-may-be-reversing-course/
|
||||
[4]:http://www.techrepublic.com/article/linux-champion-munich-takes-decisive-step-towards-returning-to-windows/
|
||||
[5]:http://www.techrepublic.com/article/how-mark-shuttleworth-became-the-first-african-in-space-and-launched-a-software-revolution/
|
||||
[6]:http://www.techrepublic.com/pictures/10-projects-ditching-microsoft-for-open-source-plus-one-switching-back/
|
||||
[7]:http://www.techrepublic.com/article/how-munich-rejected-steve-ballmer-and-kicked-microsoft-out-of-the-city/
|
||||
[8]:http://www.techrepublic.com/resource-library/whitepapers/why-munich-made-the-switch-from-windows-to-linux-and-may-be-reversing-course/
|
||||
[9]:http://www.zdnet.com/article/hands-on-raspberry-pi-7-inch-touch-display-and-case/
|
||||
[10]:http://intent.cbsi.com/redir?tag=medc-content-top-leaderboard&siteId=2&rsid=cnetzdnetglobalsite&pagetype=article&sl=en&sc=as&topicguid=&assetguid=c2df091a-2ecf-4e55-84f6-fd3309cf917d&assettype=content_article&ftag_cd=LGN-10-10aaa0h&devicetype=desktop&viewguid=5d31a1e5-4a88-4002-ac70-1c0ca3e33bb3&q=&ctype=docids;promo&cval=33159648;7214&ttag=&ursuid=&bhid=&destUrl=http%3A%2F%2Fwww.techrepublic.com%2Fresource-library%2Fwhitepapers%2Fgraphic-design-bootcamp%2F%3Fpromo%3D7214%26ftag%3DLGN-10-10aaa0h%26cval%3Dcontent-top-leaderboard
|
||||
[11]:http://intent.cbsi.com/redir?tag=medc-content-top-leaderboard&siteId=2&rsid=cnetzdnetglobalsite&pagetype=article&sl=en&sc=as&topicguid=&assetguid=c2df091a-2ecf-4e55-84f6-fd3309cf917d&assettype=content_article&ftag_cd=LGN-10-10aaa0h&devicetype=desktop&viewguid=5d31a1e5-4a88-4002-ac70-1c0ca3e33bb3&q=&ctype=docids;promo&cval=33159648;7214&ttag=&ursuid=&bhid=&destUrl=http%3A%2F%2Fwww.techrepublic.com%2Fresource-library%2Fwhitepapers%2Fgraphic-design-bootcamp%2F%3Fpromo%3D7214%26ftag%3DLGN-10-10aaa0h%26cval%3Dcontent-top-leaderboard
|
||||
[12]:http://www.zdnet.com/meet-the-team/uk/steve-ranger/
|
||||
[13]:http://www.zdnet.com/meet-the-team/uk/steve-ranger/
|
||||
[14]:http://www.zdnet.com/topic/enterprise-software/
|
@ -1,145 +0,0 @@
|
||||
(翻译中 by runningwater)
|
||||
15 JavaScript frameworks and libraries
|
||||
============================================================
|
||||
![15 JavaScript frameworks and libraries](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/code_javascript.jpg?itok=a4uULCF0 "15 JavaScript frameworks and libraries")
|
||||
|
||||
>Image credits : Photo by Jen Wike Huger
|
||||
|
||||
JavaScript is the future.
|
||||
|
||||
The language is supported by a number of technololgy leaders, one of whom is WordPress's founder Matt Mullenweg, who hinted that [WordPress developers][18]should learn it, clearly sending a message to the WordPress community as to it future importance. The mention was well received. The transition to better technology will enable WordPress to keep up with future challenges.
|
||||
|
||||
JavaScript’s open source stance is also one of the best. Contrary to popular belief, JavaScript is not a project, but a specification with an open standard where the language is evolved and maintained by its core team. [ECMAScript][19], another fancy name of JavaScript, is not open source, but it too has an open standard.
|
||||
|
||||
You can easily see evidence of JavaScript's popularity when you look at both at GitHub. JavaScript is the top programming language when it comes to the[number of repositories][20]. Its prominance is also evident on Livecoding.tv, where members are diligently creating more videos on JavaScript than any other topic. At the time of this writing, the self-dubbed edutainment site hosts [45,919 JavaScript videos][21].
|
||||
|
||||
### Top open source JavaScript frameworks and libraries
|
||||
|
||||
Getting back to the topic, JavaScript is blessed with a large community that thrives on improving the technology. Hundreds of JavaScript frameworks and libraries are available to developers, and the good news is that the best ones are open source. For a JavaScript developer, using the best framework or libraries for rapid development is now a necessity. The current market demands rapid development. Also, reinventing the wheel is not a good idea in the current market. Regardless of whether you are new to JavaScript or an experienced JavaScript developer, using libraries and frameworks improves your work significantly.
|
||||
|
||||
Let’s get started.
|
||||
|
||||
### 1\. Angular.js
|
||||
|
||||
[Angular.js][1] is one of the most popular JavaScript frameworks. It is used by developers to create complex web apps. The idea behind Angular.js is its one-page app model. It also supports MVC architecture. With Angular.js, the developer can use JavaScript code in the front end, literally extending the HTML vocabulary.
|
||||
|
||||
Angular.js has improved a great deal since its inception in 2009\. The current stable version of Angular 1 is 1.5.8/1.2.30\. You can also try out Angular 2, a significant improvement over Angular 1, but this framework is still not yet adopted by developers across the world.
|
||||
|
||||
Angular.js uses data binding as one of the main concepts to get work done. The user interacts with the interface. When the interaction is done, the view is then updated with the new values, which in turn interact with the model and ensure everything is synchronized. The DOM gets updated after the underlying logic is executed in the model.
|
||||
|
||||
### 2\. Backbone.js
|
||||
|
||||
Not everyone intends to build a complex web application. Simpler web application frameworks such as [Backbone.js][2] are a great fit for those learning web app development. Backbone.js is a straightforward framework that makes building simple web apps fun and speedy. Just like Angular.js, Backbone.js also comes with MVC support. Other key features of Backbone.js are routing, RESTful API’s support, proper state management, and much more. You can also use Backbone.js to build single page apps.
|
||||
|
||||
The current stable version is 1.3.3 and is available from [GitHub][22].
|
||||
|
||||
### 3\. D3.js
|
||||
|
||||
[D3.js][3] is an excellent JavaScript library that enables developers to create rich web pages with data manipulation features. D3.js uses SVG, HTML, and CSS to make the magic happen. With D3.js, you can bind data to DOM easily and enable data-driven events. With D3.js, you also can create high-quality data-driven web pages that offer a better understanding of data coupled with great visuals. Check[Hamiltonian Graphs from LCF notation][23], powered by D3.js.
|
||||
|
||||
### 4\. React.js
|
||||
|
||||
[React.js][4] is an interesting JavaScript framework to work with. Unlike other JavaScript frameworks, React.js is ideal for building highly scalable front-end user interfaces. React.js came into existence in 2013 under a BSD license and is growing rapidly thanks to the advantages that it brings to developing complex yet beautiful user interfaces.
|
||||
|
||||
The core idea behind React.js is the virtual DOM. Virtual DOM acts as a mediator between the client-side and the server-side, bringing improved performance. The changes made in the virtual DOM are matched with the server DOM, and only the needed elements are updated, making the process much faster than a traditional UI update.
|
||||
|
||||
You can also use material design with React, enabling you to develop modern web apps with unparalleled performance.
|
||||
|
||||
Check out mittax from Munich, Germany working on React Material-UI in the video below.
|
||||
|
||||
### 6\. jQuery
|
||||
|
||||
[jQuery][5] is a very popular JavaScript library with features such as event handling, animation, and much more. When working on a web project, you don’t want to waste time writing code for simple tasks. jQuery frees you from this with its easy-to-use API. It also works with all the popular web browsers. With jQuery, you can seamlessly control the DOM and also develop an Ajax application, which is in high demand for the last few years. With jQuery, developers don’t have to worry about low-level interactions and can easily develop their web applications faster and easier.
|
||||
|
||||
jQuery also facilitates the separation of HTML and JavaScript code, enabling developers to write clean code with cross-browser compatibility. Moreover, web apps created using jQuery are easily improved and extended in the future.
|
||||
|
||||
### 7\. Ember.js
|
||||
|
||||
[Ember.js][6] is a mix of Angular.js and React.js when it comes to functionality. You can easily see the popularity of Ember.js when observing the support community. New features are added constantly. It works similar to Angular.js when it comes to syncing data. The two-way data exchange ensures that the app is fast and scalable. It also helps developers to create front-end elements.
|
||||
|
||||
When it comes to React.js for similarities, Ember.js provides similar server-side Virtual DOM for better performance and scalability. Ember.js also encourages minimal code writing, offers excellent APIs to work with, and has an excellent community.
|
||||
|
||||
### 8\. Polymer.js
|
||||
|
||||
If you ever thought of creating your own HTML5 elements, you can do so with the help of [Polymer.js][7]. Polymer’s main focus is to provide extended functionality to web developers by giving them the ability to create their own tags. For example, you can create a <my_video> element with its own functionality that is similar to the <video> element in HTML5.
|
||||
|
||||
Polymer was introduced in the year 2013 by Google and is covered under [3-Clause BSD][24].
|
||||
|
||||
### 9\. Three.js
|
||||
|
||||
[Three.js][8] is yet another JavaScript library, with a focus on 3D development. If you are into animation and game development, you can use Three.js to your advantage. Under the hood, Three.js uses WebGL and can easily be used to render 3D objects on the screen. A popular example of the power of Three.js is HexGL, a futuristic racing game.
|
||||
|
||||
### 10\. PhantomJS
|
||||
|
||||
Working with JavaScript can also mean working with different browsers, and, when we talk about browsers, resource management comes into the discussion easily. With [PhantomJS][25], you can monitor the performance of your web app thanks to the headless WebKit provided. The headless WebKit is part of the rendering engine used in Chrome and Safari.
|
||||
|
||||
The entire process is automated, and all you need to is set up your web application using the available APIs.
|
||||
|
||||
### 11\. BabylonJS
|
||||
|
||||
[BabylonJS][9] stands in the territory of Three.js, providing JavaScript APIs to create seamless, powerful 3D web apps. It is open source and is based on JavaScript and the power of WebGL. Creating simple 3D objects such as a sphere is easy and you can do so with just a few lines of code. You can get a good grasp of what the library has to offer by going through its [documentation][10]. The homepage also offers excellent demos for inspiration purposes. Do check them out by visiting the official website.
|
||||
|
||||
### 12\. Boba.js
|
||||
|
||||
Web apps always have one need in common, analytics. If you have struggled to insert analytics into your JavaScript web app, then look to [Boba.js][11]. Boba.js can help you insert analytics into your web app with support for the old ga.js. You can also integrate metrics with Boba.js. The only requirement is jQuery.
|
||||
|
||||
### 13\. Underscore.js
|
||||
|
||||
[Underscore.js][12] is the answer to your blank HTML editor file. When you start a project, feeling lost or doing a series of steps that repeat what you have done in earlier projects is common. To simplify the process of starting a project and to give you a head start, the Underscore.js JavaScript library provides you with a set of functions. For example, you can use your favorite Backbone.js suspenders or with jQuery functions that you use in your projects frequently.
|
||||
|
||||
Functional helpers such as "filter" and "invoke the map" provide you with a good head start so you can dive into your work as quickly as possible. Underscore.js also comes with a suite for easy testing purposes.
|
||||
|
||||
### 14\. Meteor.js
|
||||
|
||||
[Meteor.js][13] is a fast way to get started building JavaScript apps. It is open source in nature and can be used to create apps for desktop, mobile, and the web. Meteor.js is a full-stack framework and enables end-to-end development for multiple platforms. You can create back-end and front-end features with Meteor.js, and also keep tabs on the performance of the application. The community surrounding Meteor.js is huge, so there are frequent feature and bug fix updates. Meteor.js is also modular in nature and can be equipped with amazing APIs.
|
||||
|
||||
### 15\. Knockout.js
|
||||
|
||||
[Knockout.js][14] is clearly the most underrated framework out there. It was developed by [Steve Sanderson][15] as an open source JavaScript Framework and is available under license from MIT. The framework is based on the MVVM design.
|
||||
|
||||
### Notable Mention: Node.js
|
||||
|
||||
[Node.js][16] is a powerful runtime environment for JavaScript. It can be used to build fast, scalable applications with real world data. It is neither a framework nor a library, but a runtime environment that is based on Google Chrome’s JavaScript V8 Engine. You can use Node.js to create diversified JavaScript applications, including single page applications, real-time web applications, and much more. Technically, Node.js supports asynchronous I/O with the help of its event-driven architecture. This approach makes it an excellent choice for developing highly scalable solutions. View [Node.js][17] videos on livecoding.tv.
|
||||
|
||||
### Conclusion
|
||||
|
||||
JavaScript is the lingua franca of the web. It has grown rapidly not only because of what it offers, but also because of the open source community surrounding it. The above-mentioned frameworks and libraries are must-checks for any JavaScript developer. All of them provide some way to explore JavaScript and front-end development. Most of the above-mentioned libraries and frameworks are frequently used on Livecoding.tv by software engineers who are interested in JavaScript and its associated technologies.
|
||||
|
||||
If you have something to add, please comment below and let us know. We are eager to see which framework and library you use for projects and also want to know the reason behind it.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/16/11/15-javascript-frameworks-libraries
|
||||
|
||||
作者:[Dr. Michael J. Garbade ][a]
|
||||
译者:[runningwater](https://github.com/runningwater)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://opensource.com/users/drmjg
|
||||
[1]:https://opensource.com/article/16/11/www.angularjs.org
|
||||
[2]:https://opensource.com/article/16/11/www.backbone.js
|
||||
[3]:https://opensource.com/article/16/11/www.d3js.org
|
||||
[4]:https://facebook.github.io/react/
|
||||
[5]:http://jquery.com/
|
||||
[6]:http://emberjs.com/
|
||||
[7]:https://www.polymer-project.org/1.0/
|
||||
[8]:https://threejs.org/
|
||||
[9]:http://www.babylonjs.com/
|
||||
[10]:https://doc.babylonjs.com/
|
||||
[11]:http://boba.space150.com/
|
||||
[12]:http://underscorejs.org/
|
||||
[13]:https://www.meteor.com/
|
||||
[14]:http://knockoutjs.com/
|
||||
[15]:http://blog.stevensanderson.com/
|
||||
[16]:https://nodejs.org/en/
|
||||
[17]:https://www.livecoding.tv/learn/node-js/
|
||||
[18]:http://wesbos.com/learn-javascript/
|
||||
[19]:http://stackoverflow.com/questions/5520245/is-javascript-an-open-source-project
|
||||
[20]:https://github.com/blog/2047-language-trends-on-github
|
||||
[21]:https://www.livecoding.tv/learn/javascript/
|
||||
[22]:https://github.com/jashkenas/backbone/
|
||||
[23]:http://christophermanning.org/projects/building-cubic-hamiltonian-graphs-from-lcf-notation
|
||||
[24]:https://en.wikipedia.org/wiki/BSD_licenses#3-clause
|
||||
[25]:https://phantomjs.org/
|
@ -1,3 +1,5 @@
|
||||
cycoe Translating
|
||||
|
||||
5 Linux Music Players You Should Consider Switching To
|
||||
============================================================
|
||||
|
||||
|
@ -1,147 +0,0 @@
|
||||
beyondworld translating
|
||||
|
||||
Orange Pi as Time Machine Server
|
||||
============================================================
|
||||
|
||||
![Orange Pi as Time Machine Server](https://i1.wp.com/piboards.com/wp-content/uploads/2017/02/OPiTM.png?resize=960%2C450)
|
||||
|
||||
One of my projects has been to organize automated backups of the various computers in the house. This includes a couple Macs with some precious data on them. So, I decided to put my inexpensive [Orange Pi][3] with [Armbian][4] Linux to the test, with the goal of getting [Time Machine][5] working over the network to a USB drive attached to the pi board. That being the case, I discovered and successfully installed Netatalk.
|
||||
|
||||
[Netatalk][6] is open source software that acts as an Apple file server. With a combination of [Avahi][7] and Netatalk running, your Mac can discover your pi board on the network and will even consider it to be a “Mac” type device. This enables you to connect manually to the network drive but more importantly it enables Time Machine to find and use the remote drive. The below guidance may help if you if you wish to set up a similar backup capability for your Macs.
|
||||
|
||||
### Preparations
|
||||
|
||||
To set up the USB drive, I first experimented with an HFS+ formatted file system. Unfortunately, I could never get write permissions working. So, I opted instead to create an EXT4 filesystem and ensured that my user “pi” had read/write permissions. There are many ways to format a drive but my preferred (and recommended) method is to use [gparted][8] whenever possible. Since gparted is included with the Armbian desktop, that I what I used.
|
||||
|
||||
I wanted this drive to be automatically mounted to the same location every time the pi board boots or the USB drive is connected. So, I created a location for it to be mounted, made a “tm” directory for the actual backups, and changed the ownership of “tm” to user pi:
|
||||
|
||||
```
|
||||
cd /mnt
|
||||
sudo mkdir timemachine
|
||||
cd timemachine
|
||||
sudo mkdir tm
|
||||
sudo chown pi:pi tm
|
||||
```
|
||||
|
||||
Then I opened a terminal and edited /etc/fstab…
|
||||
|
||||
```
|
||||
sudo nano /etc/fstab
|
||||
```
|
||||
|
||||
…and added a line at the end for the device (in my case, is it sdc2):
|
||||
|
||||
```
|
||||
/dev/sdc2 /mnt/timemachine ext4 rw,user,exec 0 0
|
||||
```
|
||||
|
||||
You will need to install some prerequisites packages via command line, some of which may already be installed on your system:
|
||||
|
||||
```
|
||||
sudo apt-get install build-essential libevent-dev libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libtdb-dev libmysqlclient-dev avahi-daemon libavahi-client-dev libacl1-dev libldap2-dev libcrack2-dev systemtap-sdt-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libio-socket-inet6-perl tracker libtracker-sparql-1.0-dev libtracker-miner-1.0-dev hfsprogs hfsutils avahi-daemon
|
||||
```
|
||||
|
||||
### Install & Configure Netatalk
|
||||
|
||||
The next action is to download Netatalk, extract the downloaded archive file, and navigate to the Netatalk software directory:
|
||||
|
||||
```
|
||||
wget https://sourceforge.net/projects/netatalk/files/netatalk/3.1.10/netatalk-3.1.10.tar.bz2
|
||||
tar xvf netatalk-3.1.10.tar.bz2
|
||||
cd netatalk-3.1.10
|
||||
```
|
||||
|
||||
Now you need to configure, make, and make install the software. In the netatalk-3.1.10 directory, run the following configure command and be prepared for it to take a bit of time:
|
||||
|
||||
```
|
||||
./configure --with-init-style=debian-systemd --without-libevent --without-tdb --with-cracklib --enable-krbV-uam --with-pam-confdir=/etc/pam.d --with-dbus-daemon=/usr/bin/dbus-daemon --with-dbus-sysconf-dir=/etc/dbus-1/system.d --with-tracker-pkgconfig-version=1.0
|
||||
```
|
||||
|
||||
When that finishes, run:
|
||||
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
Be prepared for this to take a rather long time to complete. Seriously, grab a cup of coffee or something. When that is finally done, run the following command:
|
||||
|
||||
```
|
||||
sudo make install
|
||||
```
|
||||
|
||||
That should complete in a brief moment. Now you can verify installation and also find the location of configuration files with the following two commands:
|
||||
|
||||
```
|
||||
sudo netatalk -V
|
||||
sudo afpd -V
|
||||
```
|
||||
|
||||
You will need to edit your afp.conf file so that your time machine backup location is defined, your user account has access to it, and to specify whether or not you want [Spotlight][9] to index your backups.
|
||||
|
||||
```
|
||||
sudo nano /usr/local/etc/afp.conf
|
||||
```
|
||||
|
||||
As an example, my afp.conf includes the following:
|
||||
|
||||
```
|
||||
[My Time Machine Volume]
|
||||
path = /mnt/timemachine/tm
|
||||
valid users = pi
|
||||
time machine = yes
|
||||
spotlight = no
|
||||
```
|
||||
|
||||
Finally, enable and start up Avahi and Netatalk:
|
||||
|
||||
```
|
||||
sudo systemctl enable avahi-daemon
|
||||
sudo systemctl enable netatalk
|
||||
sudo systemctl start avahi-daemon
|
||||
sudo systemctl start netatalk
|
||||
```
|
||||
|
||||
### Connecting to the Network Drive
|
||||
|
||||
At this point, your Mac may have already discovered your pi board and network drive. Open Finder on the Mac and see if you have something like this:
|
||||
|
||||
![](https://i2.wp.com/piboards.com/wp-content/uploads/2017/02/TM_drive.png?resize=241%2C89)
|
||||
|
||||
You can also connect to the server by host name or IP address, for example:
|
||||
|
||||
```
|
||||
afp://192.168.1.25
|
||||
```
|
||||
|
||||
### Time Machine Backup
|
||||
|
||||
And at last…open Time Machine on the Mac, and select disk, and choose your Orange Pi.
|
||||
|
||||
![](https://i1.wp.com/piboards.com/wp-content/uploads/2017/02/OPiTM.png?resize=579%2C381)
|
||||
|
||||
This set up will definitely work and the Orange Pi handles the process like a champ, but keep in mind this may not be the fastest of backups. But it is easy, inexpensive, and ‘just works’ like it should. If you have success or improvements for this type of set up, please comment below or send me a note.
|
||||
|
||||
![](https://i0.wp.com/piboards.com/wp-content/uploads/2017/02/backup_complete.png?resize=300%2C71)
|
||||
|
||||
Orange Pi boards are available at Amazon (affiliate links):
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://piboards.com/2017/02/13/orange-pi-as-time-machine-server/
|
||||
|
||||
作者:[MIKE WILMOTH][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://piboards.com/author/piguy/
|
||||
[1]:http://piboards.com/author/piguy/
|
||||
[2]:http://piboards.com/2017/02/13/orange-pi-as-time-machine-server/
|
||||
[3]:https://www.amazon.com/gp/product/B018W6OTIM/ref=as_li_tl?ie=UTF8&tag=piboards-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B018W6OTIM&linkId=08bd6573c99ddb8a79746c8590776c39
|
||||
[4]:https://www.armbian.com/
|
||||
[5]:https://support.apple.com/kb/PH25710?locale=en_US
|
||||
[6]:http://netatalk.sourceforge.net/
|
||||
[7]:https://en.wikipedia.org/wiki/Avahi_(software)
|
||||
[8]:http://gparted.org/
|
||||
[9]:https://support.apple.com/en-us/HT204014
|
@ -1,267 +0,0 @@
|
||||
#rusking translating
|
||||
Create a Shared Directory on Samba AD DC and Map to Windows/Linux Clients – Part 7
|
||||
============================================================
|
||||
|
||||
|
||||
This tutorial will guide you on how to create a shared directory on Samba AD DC system, map this Shared Volume to Windows clients integrated into the domain via GPO and manage share permissions from Windows domain controller perspective.
|
||||
|
||||
It will also cover how to access and mount the file share from a Linux machine enrolled into domain using a Samba4 domain account.
|
||||
|
||||
#### Requirements:
|
||||
|
||||
1. [Create an Active Directory Infrastructure with Samba4 on Ubuntu][1]
|
||||
|
||||
### Step 1: Create Samba File Share
|
||||
|
||||
1. The process of creating a share on Samba AD DC is a very simple task. First create a directory you want to share via SMB protocol and add the below permissions on the filesystem in order to allow a Windows AD DC admin acount to modify the share permissions accordingly to what permissions Windows clients should see.
|
||||
|
||||
Assuming that the new file share on the AD DC would be the `/nas` directory, run the below commands to assign the correct permissions.
|
||||
|
||||
```
|
||||
# mkdir /nas
|
||||
# chmod -R 775 /nas
|
||||
# chown -R root:"domain users" /nas
|
||||
# ls -alh | grep nas
|
||||
```
|
||||
[
|
||||
![Create Samba Shared Directory](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][2]
|
||||
|
||||
Create Samba Shared Directory
|
||||
|
||||
2. After you’ve created the directory that will be exported as a share from Samba4 AD DC, you need to add the following statements to samba configuration file in order to make the share available via SMB protocol.
|
||||
|
||||
```
|
||||
# nano /etc/samba/smb.conf
|
||||
```
|
||||
|
||||
Go to the bottom of the file and add the following lines:
|
||||
|
||||
```
|
||||
[nas]
|
||||
path = /nas
|
||||
read only = no
|
||||
```
|
||||
[
|
||||
![Configure Samba Shared Directory](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][3]
|
||||
|
||||
Configure Samba Shared Directory
|
||||
|
||||
3. The last thing you need to do is to restart Samba AD DC daemon in order to apply the changes by issuing the below command:
|
||||
|
||||
```
|
||||
# systemctl restart samba-ad-dc.service
|
||||
```
|
||||
|
||||
### Step 2: Manage Samba Share Permissions
|
||||
|
||||
4. Since we’re accessing this shared volume from Windows, using domain accounts (users and groups) that are created on Samba AD DC (the share is not meant to be accessed by Linux system users).
|
||||
|
||||
The process of managing permissions can be done directly from Windows Explorer, in the same way permissions are managed for any folder in Windows Explorer.
|
||||
|
||||
First, log on to Windows machine with a Samba4 AD account with administrative privileges on the domain. In order to access the share from Windows and set the permissions, type the IP address or host name or FQDN of the Samba AD DC machine in Windows Explorer path field, preceded by two back slashes, and the share should be visible.
|
||||
|
||||
```
|
||||
\\adc1
|
||||
Or
|
||||
\\192.168.1.254
|
||||
Or
|
||||
\\adc1.tecmint.lan
|
||||
```
|
||||
[
|
||||
![Access Samba Share Directory from Windows](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][4]
|
||||
|
||||
Access Samba Share Directory from Windows
|
||||
|
||||
5. To modify permissions just right click on the share and choose Properties. Navigate to Security tab and proceed with altering domain users and group permissions accordingly. Use Advanced button in order to fine tune permissions.
|
||||
|
||||
[
|
||||
![Configure Samba Share Directory Permissions](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][5]
|
||||
|
||||
Configure Samba Share Directory Permissions
|
||||
|
||||
Use the below screenshot as an excerpt on how to tune permissions for specific Samba AD DC authenticated accounts.
|
||||
|
||||
[
|
||||
![Manage Samba Share Directory User Permissions](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][6]
|
||||
|
||||
Manage Samba Share Directory User Permissions
|
||||
|
||||
6. Other method you can use to manage the share permissions is from Computer Management -> Connect to another computer.
|
||||
|
||||
Navigate to Shares, right click on the share you want to modify permissions, choose Properties and move to Security tab. From here you can alter permissions in any way you want just as presented in the previous method using file share permissions.
|
||||
|
||||
[
|
||||
![Connect to Samba Share Directory Machine](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][7]
|
||||
|
||||
Connect to Samba Share Directory Machine
|
||||
|
||||
[
|
||||
![Manage Samba Share Directory Properties](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][8]
|
||||
|
||||
Manage Samba Share Directory Properties
|
||||
|
||||
[
|
||||
![Assign Samba Share Directory Permissions to Users](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][9]
|
||||
|
||||
Assign Samba Share Directory Permissions to Users
|
||||
|
||||
### Step 3: Map the Samba File Share via GPO
|
||||
|
||||
7. To automatically mount the exported samba file share via domain Group Policy, first on a machine with [RSAT tools installed][10], open AD UC utility, right click on your domain name and, then, choose New -> Shared Folder.
|
||||
|
||||
[
|
||||
![Map Samba Share Folder](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][11]
|
||||
|
||||
Map Samba Share Folder
|
||||
|
||||
8. Add a name for the shared volume and enter the network path where your share is located as illustrated on the below image. Hit OK when you’ve finished and the share should now be visible on the right plane.
|
||||
|
||||
[
|
||||
![Set Samba Shared Folder Name Location](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][12]
|
||||
|
||||
Set Samba Shared Folder Name Location
|
||||
|
||||
9. Next, open Group Policy Management console, expand to your domain Default Domain Policy script and open the file for editing.
|
||||
|
||||
On the GPM Editor navigate to User Configuration -> Preferences -> Windows Settings and right click on Drive Maps and choose New -> Mapped Drive.
|
||||
|
||||
[
|
||||
![Map Samba Share Folder in Windows](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][13]
|
||||
|
||||
Map Samba Share Folder in Windows
|
||||
|
||||
10. On the new window search and add the network location for the share by pressing the right button with three dots, check Reconnect checkbox, add a label for this share, choose the letter for this drive and hit OK button to save and apply configuration.
|
||||
|
||||
[
|
||||
![Configure Network Location for Samba Share Directory](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][14]
|
||||
|
||||
Configure Network Location for Samba Share Directory
|
||||
|
||||
11. Finally, in order to force and apply GPO changes on your local machine without a system restart, open a Command Prompt and run the following command.
|
||||
|
||||
```
|
||||
gpupdate /force
|
||||
```
|
||||
[
|
||||
![Apply GPO Changes](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][15]
|
||||
|
||||
Apply GPO Changes
|
||||
|
||||
12. After the policy has been successfully applied on your machine, open Windows Explorer and the shared network volume should be visible and accessible, depending on what permissions you’ve granted for the share on previous steps.
|
||||
|
||||
The share will be visible for other clients on your network after they reboot or re-login onto their systems if the group policy will not forced from command line.
|
||||
|
||||
[
|
||||
![Samba Shared Network Volume on Windows](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][16]
|
||||
|
||||
Samba Shared Network Volume on Windows
|
||||
|
||||
### Step 4: Access the Samba Shared Volume from Linux Clients
|
||||
|
||||
13. Linux users from machines that are enrolled into Samba AD DC can also access or mount the share locally by authenticating into the system with a Samba account.
|
||||
|
||||
First, they need to assure that the following samba clients and utilities are installed on their systems by issuing the below command.
|
||||
|
||||
```
|
||||
$ sudo apt-get install smbclient cifs-utils
|
||||
```
|
||||
|
||||
14. In order to list the exported shares your domain provides for a specific domain controller machine use the below command:
|
||||
|
||||
```
|
||||
$ smbclient –L your_domain_controller –U%
|
||||
or
|
||||
$ smbclient –L \\adc1 –U%
|
||||
```
|
||||
[
|
||||
![List Samba Share Directory in Linux](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][17]
|
||||
|
||||
List Samba Share Directory in Linux
|
||||
|
||||
15. To interactively connect to a samba share from command line with a domain account use the following command:
|
||||
|
||||
```
|
||||
$ sudo smbclient //adc/share_name -U domain_user
|
||||
```
|
||||
|
||||
On command line you can list the content of the share, download or upload files to the share or perform other tasks. Use ? to list all available smbclient commands.
|
||||
|
||||
[
|
||||
![Connect Samba Share Directory in Linux](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][18]
|
||||
|
||||
Connect Samba Share Directory in Linux
|
||||
|
||||
16. To mount a samba share on a Linux machine use the below command.
|
||||
|
||||
```
|
||||
$ sudo mount //adc/share_name /mnt -o username=domain_user
|
||||
```
|
||||
[
|
||||
![Mount Samba Share Directory in Linux](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][19]
|
||||
|
||||
Mount Samba Share Directory in Linux
|
||||
|
||||
Replace the host, share name, mount point and domain user accordingly. Use mount command piped with grep to filter only by cifs expression.
|
||||
|
||||
As some final conclusions, shares configured on a Samba4 AD DC will work only with Windows access control lists (ACL), not POSIX ACLs.
|
||||
|
||||
Configure Samba as a Domain member with file shares in order to achieve other capabilities for a network share. Also, on an Additional Domain Controller [configure Windbindd daemon][20] – Step Two – before you start exporting network shares.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
作者简介:
|
||||
|
||||
I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: 网址
|
||||
|
||||
作者:[Matei Cezar][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/cezarmatei/
|
||||
|
||||
[1]:http://www.tecmint.com/install-samba4-active-directory-ubuntu/
|
||||
[2]:http://www.tecmint.com/wp-content/uploads/2017/02/Create-Samba-Shared-Directory.png
|
||||
[3]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-Samba-Shared-Directory.png
|
||||
[4]:http://www.tecmint.com/wp-content/uploads/2017/02/Access-Samba-Share-Directory-from-Windows.png
|
||||
[5]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-Samba-Share-Directory-Permissions.png
|
||||
[6]:http://www.tecmint.com/wp-content/uploads/2017/02/Manage-Samba-Share-Directory-User-Permissions.png
|
||||
[7]:http://www.tecmint.com/wp-content/uploads/2017/02/Connect-to-Samba-Share-Directory-Machine.png
|
||||
[8]:http://www.tecmint.com/wp-content/uploads/2017/02/Manage-Samba-Share-Directory-Properties.png
|
||||
[9]:http://www.tecmint.com/wp-content/uploads/2017/02/Assign-Samba-Share-Directory-Permissions-to-Users.png
|
||||
[10]:http://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat/
|
||||
[11]:http://www.tecmint.com/wp-content/uploads/2017/02/Map-Samba-Share-Folder.png
|
||||
[12]:http://www.tecmint.com/wp-content/uploads/2017/02/Set-Samba-Shared-Folder-Name-Location.png
|
||||
[13]:http://www.tecmint.com/wp-content/uploads/2017/02/Map-Samba-Share-Folder-in-Windows.png
|
||||
[14]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-Network-Location-for-Samba-Share-Directory.png
|
||||
[15]:http://www.tecmint.com/wp-content/uploads/2017/02/Apply-GPO-Changes.png
|
||||
[16]:http://www.tecmint.com/wp-content/uploads/2017/02/Samba-Shared-Network-Volume-on-Windows.png
|
||||
[17]:http://www.tecmint.com/wp-content/uploads/2017/02/List-Samba-Share-Directory-in-Linux.png
|
||||
[18]:http://www.tecmint.com/wp-content/uploads/2017/02/Connect-Samba-Share-Directory-in-Linux.png
|
||||
[19]:http://www.tecmint.com/wp-content/uploads/2017/02/Mount-Samba-Share-Directory-in-Linux.png
|
||||
[20]:http://www.tecmint.com/manage-samba4-active-directory-linux-command-line/
|
||||
[21]:http://www.tecmint.com/author/cezarmatei/
|
||||
[22]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
|
||||
[23]:http://www.tecmint.com/free-linux-shell-scripting-books/
|
@ -1,120 +0,0 @@
|
||||
Introduction to LaTeXila - a multi-language LaTeX editor for Linux
|
||||
============================================================
|
||||
|
||||
### On this page
|
||||
|
||||
1. [Why LaTeX?][1]
|
||||
2. [Starting work on a new document and setting up the structure][2]
|
||||
3. [LaTeXila ease of use and mathematics][3]
|
||||
4. [From .tex to .rtf][4]
|
||||
5. [Conclusion][5]
|
||||
|
||||
LaTeXila is a multi-language LaTeX editor for Linux users who prefer the GTK+ looks. The software is simple, easy to use, adequately powerful and customizable, so if you’re interested in LaTeX you should give this tool a try. In the following quick guide, I will showcase how to get started with LaTeXila and what its main features are. But first...
|
||||
|
||||
### Why LaTeX?
|
||||
|
||||
So, if I want to create a text document, why wouldn’t I simply use the standard LibreOffice or Abiword tools? The answer is because LaTeX editors in general offer more powerful formatting tools than your standard text editor, while the process of writing the content remains simple and pivotal. LaTeX is a document preparation system that is actually meant to simplify the formatting procedures for the most common forms of publishing like books and scientific reports that may contain a lot of mathematical formulas, multi-lingual typesetting elements, cross-references and citations, indexes, bibliographies, etc. While all of these things can actually be done in LibreOffice, they are way easier in LaTeXila while the end result is bound to be of a higher quality if done right.
|
||||
|
||||
### Starting work on a new document and setting up the structure
|
||||
|
||||
First, we need to create a new file on LaTeXila, and this can be done by clicking on the “New File” icon located on the upper left. This will open a dialog that allows us to select a template and get started quickly.
|
||||
|
||||
[
|
||||
![Start the LaTex Editor](https://www.howtoforge.com/images/introduction-to-latexila/pic_1.png)
|
||||
][6]
|
||||
|
||||
Let’s suppose that I will write a book so I select the book template, add the title and author in the corresponding brackets as shown in the following screenshot:
|
||||
|
||||
[
|
||||
![Open the book template](https://www.howtoforge.com/images/introduction-to-latexila/pic_2.png)
|
||||
][7]
|
||||
|
||||
Now let me explain a few things about the structure. I know it looks like coding, and if you are a writer and not a coder it may look strange to work like that but bear with me and I’ll explain.
|
||||
|
||||
Between the first line and the ninth line, we have all the stuff that define some basic factors for the whole document. In the first line for example, we can define the paper format and the font size by changing the “[a4paper,11pt]” accordingly. More options can be added inside this particular square brackets space separated by commas.
|
||||
|
||||
Between lines two and four, we can see entries that start with “\userpackage” followed by the options in square brackets and the command in brackets. These are enhancement packages that LaTeXila has installed by default in our system and uses them by default in most templates. The particular ones concern the font encoding, character encoding, and fonts quality respectively.
|
||||
|
||||
Proceeding to the “\maketitle” row, here we can add a separate title page beyond the first one that will be placed on the top by default. Similarly, the row containing the “\tableofcontents” command is for the automatic creation of a table of contents for the book.
|
||||
|
||||
Finally, we can name the chapter as we like by adding a title in the brackets next to the “\chapter”. This first chapter will be automatically marked as chapter one. You may add your content in the following lines, and the chapter ends when the next one begins by \chapter again on a new line. This new chapter will be automatically marked as chapter two, and so on.
|
||||
|
||||
[
|
||||
![LaTex Formatting](https://www.howtoforge.com/images/introduction-to-latexila/pic_3.png)
|
||||
][8]
|
||||
|
||||
Chapters can also be separated into smaller chunks by using the command “\section” and then even more with the command “\subsection”. Both sections and chapters should be automatically detected by the “\tableofcontents” command which will use their title and page number. See the following screenshot to correlate the way chapters and sections work for your book.
|
||||
|
||||
[
|
||||
![LaTex preview](https://www.howtoforge.com/images/introduction-to-latexila/pic_4.png)
|
||||
][9]
|
||||
|
||||
If you want to get an overview of the structure, you may change the left sidebar to the “Structure” setting and ensure that all is structured as intended. From the same tool, you may control any data tables or images that are placed in each section.
|
||||
|
||||
[
|
||||
![LaTex structure](https://www.howtoforge.com/images/introduction-to-latexila/pic_5.png)
|
||||
][10]
|
||||
|
||||
Talking about these, some people want to include the location of tables and images into their table of contents. To do this, you may add the following lines below the “\tableofcontents”:
|
||||
|
||||
\listoffigures
|
||||
\listoftables
|
||||
|
||||
The final command that signifies the end of the book is the “\end{document}” so your structure must always end with this.
|
||||
|
||||
### LaTeXila ease of use and mathematics
|
||||
|
||||
While LaTeX is a document creation system based on commands that are independent of the editor one uses, it is important to note that LaTeXila offers a set of helpful tools that will save you time and effort while writing your report or book. For example, there’s an auto-completion function for LaTeX commands as that is conveniently activated every time you start typing a command.
|
||||
|
||||
[
|
||||
![Mathematic Formulas in LaTex](https://www.howtoforge.com/images/introduction-to-latexila/pic_6.png)
|
||||
][11]
|
||||
|
||||
There’s an integrated spell checking system based on gspell that you may set to the right language from the “Tools” menu on the top bar, and there’s the top toolbar that contains buttons for almost anything that you’ll need. From left to right, you can add chapters and parts, add cross-references, fiddle with the character size and styling for a selected part, add bullet lists, and mathematical functions. These can be done manually, but it is always nicer to have them one click away instead.
|
||||
|
||||
For the creation of the mathematical formulas, you can use a combination of the toolbar options with the sidebar characters that are added with a simple click. Just select the “Symbols” in the left sidebar and you’ll find the relevant categories of “Relations”, “Greek symbols”, “Operators” etc. See the following screenshot as an example of what can be done:
|
||||
|
||||
[
|
||||
![Greek Symbols and Operators](https://www.howtoforge.com/images/introduction-to-latexila/pic_7.png)
|
||||
][12]
|
||||
|
||||
These graphical lists of symbols really make the creation of formulas and mathematical expressions a walk in the park.
|
||||
|
||||
### From .tex to .rtf
|
||||
|
||||
By default, LaTeXila saves your work in the standard “.tex” format which we can use to build a “rich text format” document that we can open with a word editor like LibreOffice. To do this, we need to install a package named “latex2rtf” which is available in all distributions. We then hop into the file destination, open a terminal there and type “latex2rtf filename” as shown:
|
||||
|
||||
[
|
||||
![LaTEX to RTF export](https://www.howtoforge.com/images/introduction-to-latexila/pic_8.png)
|
||||
][13]
|
||||
|
||||
Of course, LaTeXila offers its own building tools that you can access from the top toolbar or the top panel (Build), but I am giving you latex2rtf in case something goes wrong with the other system which in my case didn’t work.
|
||||
|
||||
### Conclusion
|
||||
|
||||
If the above sparked your interest to go ahead and discover the power of LaTeX, then good. My intention was to present a tool that is good for newcomers in the sense that it is easy to use and write on. If only LaTeXila had a dual screen mode with a live previewer, and it would be perfect…
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/
|
||||
|
||||
作者:[Bill Toulas][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/
|
||||
[1]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#why-latex
|
||||
[2]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#starting-work-on-a-new-document-and-setting-up-the-structure
|
||||
[3]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#latexila-ease-of-use-and-mathematics
|
||||
[4]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#from-tex-to-rtf
|
||||
[5]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#conclusion
|
||||
[6]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_1.png
|
||||
[7]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_2.png
|
||||
[8]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_3.png
|
||||
[9]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_4.png
|
||||
[10]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_5.png
|
||||
[11]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_6.png
|
||||
[12]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_7.png
|
||||
[13]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_8.png
|
@ -1,243 +0,0 @@
|
||||
translating by DockerChen
|
||||
|
||||
Setting Up a Secure FTP Server using SSL/TLS on Ubuntu
|
||||
============================================================
|
||||
|
||||
Download Your Free eBooks NOW - [10 Free Linux eBooks for Administrators][13] | [4 Free Shell Scripting eBooks][14]
|
||||
|
||||
In this tutorial, we will describe how to secure a FTP server (VSFTPD stands for “Very Secure FTP Daemon”) using SSL/TLS in Ubuntu 16.04/16.10.
|
||||
|
||||
If you’re looking to setup a secure FTP server for CentOS based distributions, you can read – [Secure an FTP Server Using SSL/TLS on CentOS][2]
|
||||
|
||||
After following the various steps in this guide, we will have learned the fundamentals of enabling encryption services in a FTP server for secure data transfers is crucial.
|
||||
|
||||
#### Requirements
|
||||
|
||||
1. You must [Install and Configure a FTP Server in Ubuntu][1]
|
||||
|
||||
Before we move further, make sure that all commands in this article will be run as root or [sudo privileged account][3].
|
||||
|
||||
### Step 1: Generating SSL/TLS Certificate for FTP on Ubuntu
|
||||
|
||||
1. We will begin by creating a subdirectory under: /etc/ssl/ to store the SSL/TLS certificate and key files if it doesn’t exist:
|
||||
|
||||
```
|
||||
$ sudo mkdir /etc/ssl/private
|
||||
```
|
||||
|
||||
2. Now let’s generate the certificate and key in a single file, by running the command below.
|
||||
|
||||
```
|
||||
$ sudo openssl req -x509 -nodes -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem -days 365 -newkey rsa:2048
|
||||
```
|
||||
|
||||
The above command will prompt you to answer the questions below, don’t forget to enter values that applicable to your scenario.
|
||||
|
||||
```
|
||||
Country Name (2 letter code) [XX]:IN
|
||||
State or Province Name (full name) []:Lower Parel
|
||||
Locality Name (eg, city) [Default City]:Mumbai
|
||||
Organization Name (eg, company) [Default Company Ltd]:TecMint.com
|
||||
Organizational Unit Name (eg, section) []:Linux and Open Source
|
||||
Common Name (eg, your name or your server's hostname) []:tecmint
|
||||
Email Address []:admin@tecmint.com
|
||||
```
|
||||
|
||||
### Step 2: Configuring VSFTPD to Use SSL/TLS on Ubuntu
|
||||
|
||||
3. Before we perform any VSFTPD configurations, for those who have [UFW firewall enabled][4], you have to open the ports 990 and 40000-50000 to allow TLS connections and the port range of passive ports to set in the VSFTPD configuration file respectively:
|
||||
|
||||
```
|
||||
$ sudo ufw allow 990/tcp
|
||||
$ sudo ufw allow 40000:50000/tcp
|
||||
$ sudo ufw status
|
||||
```
|
||||
|
||||
4. Now, open the VSFTPD config file and define the SSL details in it:
|
||||
|
||||
```
|
||||
$ sudo vi /etc/vsftpd/vsftpd.conf
|
||||
OR
|
||||
$ sudo nano /etc/vsftpd/vsftpd.conf
|
||||
```
|
||||
|
||||
Then, add or locate the option `ssl_enable` and set its value to YES to activate the use of SSL, again, because TLS is more secure than SSL, we will restrict VSFTPD to use TLS instead, by enabling the `ssl_tlsv1` option:
|
||||
|
||||
```
|
||||
ssl_enable=YES
|
||||
ssl_tlsv1=YES
|
||||
ssl_sslv2=NO
|
||||
ssl_sslv3=NO
|
||||
```
|
||||
|
||||
5. Next, comment out the lines below using the `#` character as follows:
|
||||
|
||||
```
|
||||
#rsa_cert_file=/etc/ssl/private/ssl-cert-snakeoil.pem
|
||||
#rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
|
||||
```
|
||||
|
||||
Afterwards, add the lines below to define the location of the SSL certificate and key file:
|
||||
|
||||
```
|
||||
rsa_cert_file=/etc/ssl/private/vsftpd.pem
|
||||
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
|
||||
```
|
||||
|
||||
6. Now, we also have to prevent anonymous users from using SSL, then force all non-anonymous logins to use a secure SSL connection for data transfer and to send the password during login:
|
||||
|
||||
```
|
||||
allow_anon_ssl=NO
|
||||
force_local_data_ssl=YES
|
||||
force_local_logins_ssl=YES
|
||||
```
|
||||
|
||||
7. Furthermore, we can use the options below to add more security features in the FTP server. With option `require_ssl_reuse=YES`, all SSL data connections are required to exhibit SSL session reuse; proving that they know the same master secret as the control channel. So, we should disable it.
|
||||
|
||||
```
|
||||
require_ssl_reuse=NO
|
||||
```
|
||||
|
||||
In addition, we can set which SSL ciphers VSFTPD will permit for encrypted SSL connections with the `ssl_ciphers` option. This will help frustrate any efforts by attackers who try to force a specific cipher which they possibly discovered vulnerabilities in:
|
||||
|
||||
```
|
||||
ssl_ciphers=HIGH
|
||||
```
|
||||
|
||||
8. Then, let’s define the port range (min and max port) of passive ports.
|
||||
|
||||
```
|
||||
pasv_min_port=40000
|
||||
pasv_max_port=50000
|
||||
```
|
||||
|
||||
9. To enable SSL debugging, meaning openSSL connection diagnostics are recorded to the VSFTPD log file, we can use the `debug_ssl` option:
|
||||
|
||||
```
|
||||
debug_ssl=YES
|
||||
```
|
||||
|
||||
Finally save the file and close it. Then restart VSFTPD service:
|
||||
|
||||
```
|
||||
$ systemctl restart vsftpd
|
||||
```
|
||||
|
||||
### Step 3: Verify FTP with SSL/TLS Connections on Ubuntu
|
||||
|
||||
10. After performing all the above configurations, test if VSFTPD is now using SSL/TLS connections by trying to [use FTP from the command line][5] as below.
|
||||
|
||||
From the output below, there is an error message telling us VSFTPD can only permit users (non-anonymous) to login from secure clients which support encryption services.
|
||||
|
||||
```
|
||||
$ ftp 192.168.56.10
|
||||
Connected to 192.168.56.10 (192.168.56.10).
|
||||
220 Welcome to TecMint.com FTP service.
|
||||
Name (192.168.56.10:root) : ravi
|
||||
530 Non-anonymous sessions must use encryption.
|
||||
Login failed.
|
||||
421 Service not available, remote server has closed connection
|
||||
ftp>
|
||||
```
|
||||
|
||||
The command line doesn’t support encryption services thus resulting to the error above. Therefore, to securely connect to a FTP server with encryption services enabled, we need a FTP client that supports SSL/TLS connections by default, such as FileZilla.
|
||||
|
||||
### Step 4:Install FileZilla On Clients to Connect FTP Securely
|
||||
|
||||
FileZilla is a powerful, widely used cross-platform FTP client which supports FTP over SSL/TLS and more. To install FileZilla on a Linux client machine, use the following command.
|
||||
|
||||
```
|
||||
--------- On Debian/Ubuntu ---------
|
||||
$ sudo apt-get install filezilla
|
||||
--------- On CentOS/RHEL/Fedora ---------
|
||||
# yum install epel-release filezilla
|
||||
--------- On Fedora 22+ ---------
|
||||
$ sudo dnf install filezilla
|
||||
```
|
||||
|
||||
12. Once the installation completes, open it and go to File=>Sites Manager or (press Ctrl+S) to get the Site Manager interface below.
|
||||
|
||||
[
|
||||
![Filezilla Site Manager](http://www.tecmint.com/wp-content/uploads/2017/02/Filezilla-Site-Manager.png)
|
||||
][6]
|
||||
|
||||
Filezilla Site Manager
|
||||
|
||||
13. Now, define the host/site name, add the IP address, define the protocol to use, encryption and logon type as in the screen shot below (use values that apply to your scenario):
|
||||
|
||||
Click on New Site button to configure a new site/host connection.
|
||||
|
||||
```
|
||||
Host: 192.168.56.10
|
||||
Protocol: FTP – File Transfer Protocol
|
||||
Encryption: Require explicit FTP over #recommended
|
||||
Logon Type: Ask for password #recommended
|
||||
User: username
|
||||
```
|
||||
[
|
||||
![Configure New FTP Site on Filezilla](http://www.tecmint.com/wp-content/uploads/2017/02/Configure-New-FTP-Site-on-Filezilla.png)
|
||||
][7]
|
||||
|
||||
Configure New FTP Site on Filezilla
|
||||
|
||||
14. Then click on Connect from the interface above to enter the password, and then verify the certificate being used for the SSL/TLS connection, and click OK once more to connect to the FTP server:
|
||||
|
||||
[
|
||||
![Verify FTP SSL Certificate](http://www.tecmint.com/wp-content/uploads/2017/02/Verify-FTP-SSL-Certificate-1.png)
|
||||
][8]
|
||||
|
||||
Verify FTP SSL Certificate
|
||||
|
||||
15. Now, you should have logged successfully into the FTP server over a TLS connection, check the connection status section for more information from the interface below.
|
||||
|
||||
[
|
||||
![Connected to Ubuntu FTP Server](http://www.tecmint.com/wp-content/uploads/2017/02/Connected-Ubuntu-FTP-Server.png)
|
||||
][9]
|
||||
|
||||
Connected to Ubuntu FTP Server
|
||||
|
||||
16. Lastly, let’s [transfer files from the local machine to the FTP sever][10] in the files folder, take a look at the lower end of the FileZilla interface to view reports concerning file transfers.
|
||||
|
||||
[
|
||||
![Secure FTP File Transfer using Filezilla](http://www.tecmint.com/wp-content/uploads/2017/02/Transfer-Files-Securely-using-FTP.png)
|
||||
][11]
|
||||
|
||||
Secure FTP File Transfer using Filezilla
|
||||
|
||||
That’s all! Always remember that installing a FTP server without enabling encryption services has certain security implications. As we explained in this tutorial, you can configure a FTP server to use SSL/TLS connections to implement security in Ubuntu 16.04/16.10.
|
||||
|
||||
If you face any issues in setting up SSL/TLS on FTP server, do use the comment form below to share your problems or thoughts concerning this tutorial/topic.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
作者简介:
|
||||
|
||||
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/secure-ftp-server-using-ssl-tls-on-ubuntu/
|
||||
|
||||
作者:[Aaron Kili][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/aaronkili/
|
||||
|
||||
[1]:http://www.tecmint.com/install-ftp-server-in-ubuntu/
|
||||
[2]:http://www.tecmint.com/axel-commandline-download-accelerator-for-linux/
|
||||
[3]:http://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/
|
||||
[4]:http://www.tecmint.com/how-to-install-and-configure-ufw-firewall/
|
||||
[5]:http://www.tecmint.com/sftp-command-examples/
|
||||
[6]:http://www.tecmint.com/wp-content/uploads/2017/02/Filezilla-Site-Manager.png
|
||||
[7]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-New-FTP-Site-on-Filezilla.png
|
||||
[8]:http://www.tecmint.com/wp-content/uploads/2017/02/Verify-FTP-SSL-Certificate-1.png
|
||||
[9]:http://www.tecmint.com/wp-content/uploads/2017/02/Connected-Ubuntu-FTP-Server.png
|
||||
[10]:http://www.tecmint.com/sftp-command-examples/
|
||||
[11]:http://www.tecmint.com/wp-content/uploads/2017/02/Transfer-Files-Securely-using-FTP.png
|
||||
[12]:http://www.tecmint.com/author/aaronkili/
|
||||
[13]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
|
||||
[14]:http://www.tecmint.com/free-linux-shell-scripting-books/
|
@ -1,401 +0,0 @@
|
||||
# LXD 2.0: Debugging and contributing to LXD [12/12]
|
||||
|
||||
|
||||
![LXD logo](https://linuxcontainers.org/static/img/containers.png)
|
||||
|
||||
### Introduction
|
||||
|
||||
|
||||
This is finally it! The last blog post in this [series of 12][3] that started almost a year ago.
|
||||
|
||||
If you followed the series from the beginning, you should have been using LXD for quite a bit of time now and be pretty familiar with its day to day operation and capabilities.
|
||||
|
||||
But what if something goes wrong? What can you do to track down the problem yourself? And if you can’t, what information should you record so that upstream can track down the problem?
|
||||
|
||||
And what if you want to fix issues yourself or help improve LXD by implementing the features you need? How do you build, test and contribute to the LXD code base?
|
||||
|
||||
## Debugging LXD & filing bug reports
|
||||
|
||||
### LXD log files
|
||||
|
||||
#### /var/log/lxd/lxd.log
|
||||
|
||||
This is the main LXD log file. To avoid filling up your disk very quickly, only log messages marked as INFO, WARNING or ERROR are recorded there by default. You can change that behavior by passing “–debug” to the LXD daemon.
|
||||
|
||||
#### /var/log/lxd/CONTAINER/lxc.conf
|
||||
|
||||
Whenever you start a container, this file is updated with the configuration that’s passed to LXC.
|
||||
This shows exactly how the container will be configured, including all its devices, bind-mounts, …
|
||||
|
||||
#### /var/log/lxd/CONTAINER/forkexec.log
|
||||
|
||||
This file will contain errors coming from LXC when failing to execute a command.
|
||||
It’s extremely rare for anything to end up in there as LXD usually handles errors much before that.
|
||||
|
||||
#### /var/log/lxd/CONTAINER/forkstart.log
|
||||
|
||||
This file will contain errors coming from LXC when starting the container.
|
||||
It’s extremely rare for anything to end up in there as LXD usually handles errors much before that.
|
||||
|
||||
### CRIU logs (for live migration)
|
||||
|
||||
If you are using CRIU for container live migration or live snapshotting there are additional log files recorded every time a CRIU dump is generated or a dump is restored.
|
||||
|
||||
Those logs can also be found in /var/log/lxd/CONTAINER/ and are timestamped so that you can find whichever matches your most recent attempt. They will contain a detailed record of everything that’s dumped and restored by CRIU and are far better for understanding a failure than the typical migration/snapshot error message.
|
||||
|
||||
### LXD debug messages
|
||||
|
||||
As mentioned above, you can switch the daemon to doing debug logging with the –debug option.
|
||||
An alternative to that is to connect to the daemon’s event interface which will show you all log entries, regardless of the configured log level (even works remotely).
|
||||
|
||||
An example for “lxc init ubuntu:16.04 xen” would be:
|
||||
**lxd.log:**
|
||||
|
||||
```
|
||||
INFO[02-24|18:14:09] Starting container action=start created=2017-02-24T23:11:45+0000 ephemeral=false name=xen stateful=false used=1970-01-01T00:00:00+0000
|
||||
INFO[02-24|18:14:10] Started container action=start created=2017-02-24T23:11:45+0000 ephemeral=false name=xen stateful=false used=1970-01-01T00:00:00+0000
|
||||
```
|
||||
|
||||
**lxc monitor –type=logging:**
|
||||
|
||||
```
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'New events listener: 9b725741-ffe7-4bfc-8d3e-fe620fc6e00a'
|
||||
timestamp: 2017-02-24T18:14:01.025989062-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /1.0
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.341283344-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StorageCoreInit
|
||||
timestamp: 2017-02-24T18:14:09.341536477-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /1.0/containers/xen
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.347709394-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: PUT
|
||||
url: /1.0/containers/xen/state
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.357046302-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'New task operation: 2e2cf904-c4c4-4693-881f-57897d602ad3'
|
||||
timestamp: 2017-02-24T18:14:09.358387853-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'Started task operation: 2e2cf904-c4c4-4693-881f-57897d602ad3'
|
||||
timestamp: 2017-02-24T18:14:09.358578599-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /1.0/operations/2e2cf904-c4c4-4693-881f-57897d602ad3/wait
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.366213106-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StoragePoolInit
|
||||
timestamp: 2017-02-24T18:14:09.369636451-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StoragePoolCheck
|
||||
timestamp: 2017-02-24T18:14:09.369771164-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
container: xen
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: ContainerMount
|
||||
timestamp: 2017-02-24T18:14:09.424696767-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
name: xen
|
||||
level: dbug
|
||||
message: ContainerUmount
|
||||
timestamp: 2017-02-24T18:14:09.432723719-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
container: xen
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: ContainerMount
|
||||
timestamp: 2017-02-24T18:14:09.721067917-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
action: start
|
||||
created: 2017-02-24 23:11:45 +0000 UTC
|
||||
ephemeral: "false"
|
||||
name: xen
|
||||
stateful: "false"
|
||||
used: 1970-01-01 00:00:00 +0000 UTC
|
||||
level: info
|
||||
message: Starting container
|
||||
timestamp: 2017-02-24T18:14:09.749808518-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /1.0
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.792551375-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StorageCoreInit
|
||||
timestamp: 2017-02-24T18:14:09.792961032-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
ip: '@'
|
||||
method: GET
|
||||
url: /internal/containers/23/onstart
|
||||
level: dbug
|
||||
message: handling
|
||||
timestamp: 2017-02-24T18:14:09.800803501-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StoragePoolInit
|
||||
timestamp: 2017-02-24T18:14:09.803190248-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: StoragePoolCheck
|
||||
timestamp: 2017-02-24T18:14:09.803251188-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
container: xen
|
||||
driver: storage/zfs
|
||||
level: dbug
|
||||
message: ContainerMount
|
||||
timestamp: 2017-02-24T18:14:09.803306055-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'Scheduler: container xen started: re-balancing'
|
||||
timestamp: 2017-02-24T18:14:09.965080432-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context:
|
||||
action: start
|
||||
created: 2017-02-24 23:11:45 +0000 UTC
|
||||
ephemeral: "false"
|
||||
name: xen
|
||||
stateful: "false"
|
||||
used: 1970-01-01 00:00:00 +0000 UTC
|
||||
level: info
|
||||
message: Started container
|
||||
timestamp: 2017-02-24T18:14:10.162965059-05:00
|
||||
type: logging
|
||||
|
||||
metadata:
|
||||
context: {}
|
||||
level: dbug
|
||||
message: 'Success for task operation: 2e2cf904-c4c4-4693-881f-57897d602ad3'
|
||||
timestamp: 2017-02-24T18:14:10.163072893-05:00
|
||||
type: logging
|
||||
```
|
||||
|
||||
The format from “lxc monitor” is a bit different from what you’d get in a log file where each entry is condense into a single line, but more importantly you see all those “level: dbug” entries
|
||||
|
||||
## Where to report bugs
|
||||
|
||||
### LXD bugs
|
||||
|
||||
The best place to report LXD bugs is upstream at [https://github.com/lxc/lxd/issues][4].
|
||||
Make sure to fill in everything in the bug reporting template as that information saves us a lot of back and forth to reproduce your environment.
|
||||
|
||||
### Ubuntu bugs
|
||||
|
||||
If you find a problem with the Ubuntu package itself, failing to install, upgrade or remove. Or run into issues with the LXD init scripts. The best place to report such bugs is on Launchpad.
|
||||
|
||||
On an Ubuntu system, you can do so with: ubuntu-bug lxd
|
||||
This will automatically include a number of log files and package information for us to look at.
|
||||
|
||||
### CRIU bugs
|
||||
|
||||
Bugs that are related to CRIU which you can spot by the usually pretty visible CRIU error output should be reported on Launchpad with: ubuntu-bug criu
|
||||
|
||||
Do note that the use of CRIU through LXD is considered to be a beta feature and unless you are willing to pay for support through a support contract with Canonical, it may take a while before we get to look at your bug report.
|
||||
|
||||
## Contributing to LXD
|
||||
|
||||
LXD is written in [Go][5] and [hosted on Github][6].
|
||||
We welcome external contributions of any size. There is no CLA or similar legal agreement to sign to contribute to LXD, just the usual Developer Certificate of Ownership (Signed-off-by: line).
|
||||
|
||||
We have a number of potential features listed on our issue tracker that can make good starting points for new contributors. It’s usually best to first file an issue before starting to work on code, just so everyone knows that you’re doing that work and so we can give some early feedback.
|
||||
|
||||
### Building LXD from source
|
||||
|
||||
Upstream maintains up to date instructions here: [https://github.com/lxc/lxd#building-from-source][7]
|
||||
|
||||
You’ll want to fork the upstream repository on Github and then push your changes to your branch. We recommend rebasing on upstream LXD daily as we do tend to merge changes pretty regularly.
|
||||
|
||||
### Running the testsuite
|
||||
|
||||
LXD maintains two sets of tests. Unit tests and integration tests. You can run all of them with:
|
||||
|
||||
```
|
||||
sudo -E make check
|
||||
```
|
||||
|
||||
To run the unit tests only, use:
|
||||
|
||||
```
|
||||
sudo -E go test ./...
|
||||
```
|
||||
|
||||
To run the integration tests, use:
|
||||
|
||||
```
|
||||
cd test
|
||||
sudo -E ./main.sh
|
||||
```
|
||||
|
||||
That latter one supports quite a number of environment variables to test various storage backends, disable network tests, use a ramdisk or just tweak log output. Some of those are:
|
||||
|
||||
* LXD_BACKEND: One of “btrfs”, “dir”, “lvm” or “zfs” (defaults to “dir”)
|
||||
Lets your run the whole testsuite with any of the LXD storage drivers.
|
||||
* LXD_CONCURRENT: “true” or “false” (defaults to “false”)
|
||||
This enables a few extra concurrency tests.
|
||||
* LXD_DEBUG: “true” or “false” (defaults to “false”)
|
||||
This will log all shell commands and run all LXD commands in debug mode.
|
||||
* LXD_INSPECT: “true” or “false” (defaults to “false”)
|
||||
This will cause the testsuite to hang on failure so you can inspect the environment.
|
||||
* LXD_LOGS: A directory to dump all LXD log files into (defaults to “”)
|
||||
The “logs” directory of all spawned LXD daemons will be copied over to this path.
|
||||
* LXD_OFFLINE: “true” or “false” (defaults to “false”)
|
||||
Disables any test which relies on outside network connectivity.
|
||||
* LXD_TEST_IMAGE: path to a LXD image in the unified format (defaults to “”)
|
||||
Lets you use a custom test image rather than the default minimal busybox image.
|
||||
* LXD_TMPFS: “true” or “false” (defaults to “false”)
|
||||
Runs the whole testsuite within a “tmpfs” mount, this can use quite a bit of memory but makes the testsuite significantly faster.
|
||||
* LXD_VERBOSE: “true” or “false” (defaults to “false”)
|
||||
A less extreme version of LXD_DEBUG. Shell commands are still logged but –debug isn’t passed to the LXC commands and the LXD daemon only runs with –verbose.
|
||||
|
||||
The testsuite will alert you to any missing dependency before it actually runs. A test run on a reasonably fast machine can be done under 10 minutes.
|
||||
|
||||
### Sending your branch
|
||||
|
||||
Before sending a pull request, you’ll want to confirm that:
|
||||
|
||||
* Your branch has been rebased on the upstream branch
|
||||
* All your commits messages include the “Signed-off-by: First Last <email>” line
|
||||
* You’ve removed any temporary debugging code you may have used
|
||||
* You’ve squashed related commits together to keep your branch easily reviewable
|
||||
* The unit and integration tests all pass
|
||||
|
||||
Once that’s all done, open a pull request on Github. Our [Jenkins][8] will validate that the commits are all signed-off, a test build on MacOS and Windows will automatically be performed and if things look good, we’ll trigger a full Jenkins test run that will test your branch on all storage backends, 32bit and 64bit and all the Go versions we care about.
|
||||
|
||||
This typically takes less than an hour to happen, assuming one of us is around to trigger Jenkins.
|
||||
|
||||
Once all the tests are done and we’re happy with the code itself, your branch will be merged into master and your code will be in the next LXD feature release. If the changes are suitable for the LXD stable-2.0 branch, we’ll backport them for you.
|
||||
|
||||
# Conclusion
|
||||
|
||||
I hope this series of blog post has been helpful in understanding what LXD is and what it can do!
|
||||
|
||||
This series’ scope was limited to the LTS version of LXD (2.0.x) but we also do monthly feature releases for those who want the latest features. You can find a few other blog posts covering such features listed in the original [LXD 2.0 series post][9].
|
||||
|
||||
# Extra information
|
||||
|
||||
The main LXD website is at: [https://linuxcontainers.org/lxd
|
||||
][10]Development happens on Github at: [https://github.com/lxc/lxd][11]
|
||||
Mailing-list support happens on: [https://lists.linuxcontainers.org][12]
|
||||
IRC support happens in: #lxcontainers on irc.freenode.net
|
||||
Try LXD online: [https://linuxcontainers.org/lxd/try-it][13]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://stgraber.org/2017/02/27/lxd-2-0-debugging-and-contributing-to-lxd-1212/
|
||||
|
||||
作者:[Stéphane Graber ][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://stgraber.org/author/stgraber/
|
||||
[1]:https://stgraber.org/author/stgraber/
|
||||
[2]:https://www.stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/
|
||||
[3]:https://stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/
|
||||
[4]:https://github.com/lxc/lxd/issues
|
||||
[5]:https://golang.org/
|
||||
[6]:https://github.com/lxc/lxd
|
||||
[7]:https://github.com/lxc/lxd#building-from-source
|
||||
[8]:https://jenkins.linuxcontainers.org/
|
||||
[9]:https://stgraber.org/2016/03/11/lxd-2-0-blog-post-series-012/
|
||||
[10]:https://linuxcontainers.org/lxd
|
||||
[11]:https://github.com/lxc/lxd
|
||||
[12]:https://lists.linuxcontainers.org/
|
||||
[13]:https://linuxcontainers.org/lxd/try-it
|
||||
[14]:https://stgraber.org/2017/02/27/lxd-2-0-debugging-and-contributing-to-lxd-1212/
|
@ -1,3 +1,6 @@
|
||||
|
||||
beyondworld translating
|
||||
|
||||
How to Install and Secure MariaDB 10 in CentOS 7
|
||||
============================================================
|
||||
|
||||
|
@ -1,91 +0,0 @@
|
||||
How to Upgrade Kernel to Latest Version in Ubuntu
|
||||
============================================================
|
||||
|
||||
|
||||
Periodically new devices and technology coming out and it’s important to keep our Linux system kernel up-to-date if we want to get the most of out it. Moreover, updating system kernel will ease us to take advantage of new kernel fuctions and also it helps us to protect ourselves from vulnerabilities that have been found in earlier versions.
|
||||
|
||||
**Suggested Read:** [How to Upgrade Kernel in CentOS 7][1]
|
||||
|
||||
Ready to update your kernel on Ubuntu 16.04 or one of their derivatives such as Debian and Linux Mint? If so, keep reading!
|
||||
|
||||
### Step 1: Check Installed Kernel Version
|
||||
|
||||
To find the current version of installed kernel on our system we can do:
|
||||
|
||||
```
|
||||
$ uname -sr
|
||||
```
|
||||
|
||||
The following image shows the output of the above command in a Ubuntu 16.04 server:
|
||||
|
||||
[
|
||||
![Check Kernel Version in Ubuntu](http://www.tecmint.com/wp-content/uploads/2017/03/Check-Kernel-Version-in-Ubuntu.png)
|
||||
][2]
|
||||
|
||||
Check Kernel Version in Ubuntu
|
||||
|
||||
### Step 2: Upgrading Kernel in Ubuntu 16.04
|
||||
|
||||
To upgrade the kernel in Ubuntu 16.04, go to [http://kernel.ubuntu.com/~kernel-ppa/mainline/][3] and choose the desired version from the list by clicking on it.
|
||||
|
||||
Next, download the `.deb` files for your system architecture (see highlighted in yellow below for a 32-bit system):
|
||||
|
||||
```
|
||||
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.13/linux-headers-4.9.13-040913_4.9.13-040913.201702260631_all.deb
|
||||
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.13/linux-headers-4.9.13-040913-generic_4.9.13-040913.201702260631_i386.deb
|
||||
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.13/linux-image-4.9.13-040913-generic_4.9.13-040913.201702260631_i386.deb
|
||||
```
|
||||
|
||||
Once you’ve downloaded all the above kernel files, now install them as follows:
|
||||
|
||||
```
|
||||
$ sudo dpkg -i *.deb
|
||||
```
|
||||
|
||||
Once the installation is complete, reboot your machine and verify that the new kernel version is being used:
|
||||
|
||||
```
|
||||
$ uname -sr
|
||||
```
|
||||
|
||||
And that’s it. You are now using a much more recent kernel version than the one installed by default with Ubuntu 16.04.
|
||||
|
||||
##### Summary
|
||||
|
||||
In this article we’ve shown how to easily upgrade the Linux kernel on Ubuntu system. There is yet another procedure which we haven’t showed here as it requires compiling the kernel from source, which is not recommended on production Linux systems.
|
||||
|
||||
If you’re still interested in compiling the kernel as a learning experience, you will get the instructions on how to do it at the [Kernel Newbies][4] page.
|
||||
|
||||
As always, feel free to use the form below if you have any questions or comments about this article.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
作者简介:
|
||||
|
||||
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
作者简介:
|
||||
|
||||
Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/upgrade-kernel-in-ubuntu/
|
||||
|
||||
作者:[Gabriel Cánepa][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/gacanepa/
|
||||
|
||||
[1]:http://www.tecmint.com/install-upgrade-kernel-version-in-centos-7/
|
||||
[2]:http://www.tecmint.com/wp-content/uploads/2017/03/Check-Kernel-Version-in-Ubuntu.png
|
||||
[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/
|
||||
[4]:https://kernelnewbies.org/KernelBuild
|
||||
[5]:http://www.tecmint.com/author/gacanepa/
|
||||
[6]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
|
||||
[7]:http://www.tecmint.com/free-linux-shell-scripting-books/
|
@ -1,58 +0,0 @@
|
||||
How to make release notes count
|
||||
============================================================
|
||||
|
||||
![How to make release notes count](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/rh_003784_02_os.comcareers_resume_rh1x.png?itok=CK6VJq5w "How to make release notes count")
|
||||
>Image by : opensource.com
|
||||
|
||||
Congratulations! You're ready to ship the latest release of your software package. Now you need to make sure your release notes are in order. Sure, you could just slap "bug fixes and performance improvements" on the box and call it a day, but that doesn't really tell your users anything.
|
||||
|
||||
Release notes are for both support and marketing. They tell your current users why this new release is important to them and showcase your software to potential users. Thus, you want to make the content clear, understandable, and most importantly, relevant. There's no one way to write release notes, so this is general advice, not an edict.
|
||||
|
||||
One popular trend is to make the release notes a narrative that includes a lot of silliness. If that's your thing, go for it—just remember that jokes are often context-sensitive, and what you think is hilarious might be totally lost on your readers. And, of course, you can't forget to include the important information.
|
||||
|
||||
### Getting started
|
||||
|
||||
Perhaps the single most important takeaway from this article is to write your release notes for the people who will read them. For user-facing software, focus on the user-facing behavior instead of the internal implementation. For example, say, "Clicking the 'Cancel' button will light your computer on fire," instead of "thermalEventTrigger defaulted to True in the cancelThatThing function."
|
||||
|
||||
Try to limit each note to a sentence or two. The point is to highlight the important part, not give a detailed explanation. If you have a public issue tracker, include a link (or at least an issue number) where readers can go find details if they're so inclined.
|
||||
|
||||
You don't have to lay out your release notes this way, but I like the following format. Start with the version number and release date. For major releases, you might also include a few sentences to highlight the major theme. For example, "This release focuses on adding an email client, because that's the eventual end state of all software."
|
||||
|
||||
### Compatibility changes
|
||||
|
||||
If the new release introduces changes in compatibility or default behavior, highlight those explicitly. Your users will thank you, as will anyone who provides user support. Describe the cases where the behavior change will be encountered, how to address the change, and what happens if the user doesn't act on the change. For minor releases, you probably don't have any incompatible changes, so you can leave out this section.
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
Now is the time to brag about all of the cool, new stuff your software does, but remember to focus on the user's perspective. For example, "The software now supports the automatic detection of pictures of lunch and posts them to Instagram."
|
||||
|
||||
### Issues resolved
|
||||
|
||||
No software is perfect, and this is the section where you tell readers about all of the hard work your team did to make the project a little better. Write these notes in the past tense, because the bad behavior is dead and gone. If it's clear where the bug was introduced, include that information. Some projects include bugs in the documentation in this section as well.
|
||||
|
||||
### Known issues
|
||||
|
||||
Because no software is perfect, there are always bugs left unsquashed. This section is the place to list those. You don't have to confess everything; focus on the bugs that impact functionality, especially if they were discovered since the last release. Write these in the future tense, and when you've addressed it, you just have to change the verb tense and it's ready to move up a section.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
作者简介:
|
||||
|
||||
Ben Cotton - Ben Cotton is a meteorologist by training and a high-performance computing engineer by trade. Ben works as a technical evangelist at Cycle Computing. He is a Fedora user and contributor, co-founded a local open source meetup group, and is a member of the Open Source Initiative and a supporter of Software Freedom Conservancy. Find him on Twitter (@FunnelFiasco)
|
||||
|
||||
|
||||
--------------
|
||||
|
||||
via: https://opensource.com/article/17/3/how-to-improve-release-notes
|
||||
|
||||
作者:[Ben Cotton][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://opensource.com/users/bcotton
|
||||
[1]:https://opensource.com/article/17/3/how-to-improve-release-notes?rate=81ry_1MGfmsPXV6_y_4St2DQI4XyJAqIzs4yTNtUrpA
|
||||
[2]:https://opensource.com/user/30131/feed
|
||||
[3]:https://opensource.com/article/17/3/how-to-improve-release-notes#comments
|
||||
[4]:https://opensource.com/users/bcotton
|
@ -1,38 +0,0 @@
|
||||
zschong 翻译中
|
||||
### What is Debian? A brief introduction
|
||||
|
||||
Hello buddies.!!
|
||||
|
||||
Today we have something interesting for you. We are gonna introduce the Linux world to you slowly and steadily.
|
||||
|
||||
YOU MAY ALSO LIKE- [What is Linux? A brief description.][2]
|
||||
and [How to install Desktop Gadgets in Linux using screenlets? ][1]
|
||||
So here's the first piece of our intro series. Today we are going to know about Debian. It is one of the first Linux distribution. Debian was initially launched at 1993 August. The name Debian was given by the creator of Debian, Ian Murdock and his wife Debra.
|
||||
|
||||
Debian is a huge set of open-source packages. Debian also supports installation of non-free packages, but the number is big in free packages. According to official source Debian contains about 37500 free packages in its repository. And Debian provides all this for free of cost. A team of around thousand or more people work on Debian to make it better.
|
||||
|
||||
The latest stable release of Debian is 7.5 Wheezy. Debian has also released the alpha 8.0 Jesse for further development. By default, Debian uses Gnome desktop environment. But it also gives an option to choose between Gnome, KDE, Xfce and LXDE environments too. Debian is very easy to install due to its graphical installer.
|
||||
|
||||
Debian is robust and secure Operating system. Debian supports most of hardware and architectures, so you usually don't have to worry about whether it will run on your PC or not. Now the thing is drivers? you must be wondering how to get drivers for Debian. Do not worry, for most of new and old hardware the community of Debian has made drivers. So you don't have to wait for your vendor to make drivers for your hardware. And once again as it's open-source, so it's all for free.
|
||||
|
||||
Debian is supported by the community. So you can be assured that your problem will definitely get solved as there are actual users of Debian supporting you. Debian has wide range of software to choose from, which is of course free of cost. Debian is also very stable and powerful OS, which will give you amazing performance, security, a good Graphical user Interface (GUI) and also ease of use.
|
||||
|
||||
When it comes to stability, we mean less crash and hangs but more performance. Debian fulfill this role very well. Debian is also very easy to upgrade. The Debian team has worked hard to compile all the packages in there repository so that we can easily find them and install in our system.
|
||||
|
||||
So overall, it's been 20 years for Debian. So we can see the hard work and dedication of Debian team to keep it in the best condition for users. Debian can be installed either via buying a DVD or by downloading ISO files. So we would like to suggest you to give Debian a try. It has lots of things on grand scale to provide you.
|
||||
|
||||
Debian is the first one in our Introduction of Linux world section. We will be back with another Linux distribution next time. Stay tuned, there is lot more in Linux world. Till then, ciao.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.techphylum.com/2014/05/what-is-debian-brief-introduction.html
|
||||
|
||||
作者:[sumit rohankar ][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/112160169713374382262
|
||||
[1]:http://www.techphylum.com/2014/05/desktop-gadgets-in-linux-ubuntu.html
|
||||
[2]:http://www.techphylum.com/2014/05/what-is-linux-brief-description.html?m=1
|
@ -52,7 +52,7 @@ Ron Amadeo 供图
|
||||
音乐应用终于得到了一直以来都需要的完全重新设计。
|
||||
Ron Amadeo 供图
|
||||
|
||||
尽管音乐应用之前有得到一些小的加强,但这是自安卓 0.9 以来它第一次受到正视。重新设计的亮点是一个“别叫它封面流滚动 3D 专辑封面视图”,称作“最新和最近”。导航由操作栏的下拉框解决,取代了安卓 2.1 引入的标签页导航。尽管“最新和最近”有个 3D 滚动专辑封面,“专辑”使用的是专辑略缩图的平面方阵。另一个部分也有个完全不同的设计。“歌曲”使用了垂直滚动的文本列表,“播放列表”,“年代”和“艺术家”用的是堆砌专辑显示。
|
||||
尽管音乐应用之前有得到一些小的加强,但这是自安卓 0.9 以来它第一次受到正视。重新设计的亮点是一个“不叫滚动封面的 3D 专辑封面视图”,称作“最新和最近”。导航由操作栏的下拉框解决,取代了安卓 2.1 引入的标签页导航。尽管“最新和最近”有个 3D 滚动专辑封面,“专辑”使用的是专辑略缩图的平面方阵。另一个部分也有个完全不同的设计。“歌曲”使用了垂直滚动的文本列表,“播放列表”,“年代”和“艺术家”用的是堆砌专辑显示。
|
||||
|
||||
在几乎每个视图中,每个单独的项目有它自己单独的菜单,通常在每项的右下角有个小箭头。眼下这里只会显示“播放”和“添加到播放列表”,但这个版本的谷歌音乐是为未来搭建的。谷歌不久后就要发布音乐服务,这些独立菜单在像是在音乐商店里浏览该艺术家的其它内容,或是管理云存储和本地存储时将会是不可或缺的。
|
||||
|
||||
@ -64,7 +64,7 @@ Ron Amadeo 供图
|
||||
|
||||
谷歌地图也为大屏幕进行了重新设计。这个设计将会持续一段时间,它对所有的控制选项用了一个半透明的黑色操作栏。搜索再次成为主要功能,占据了操作栏显要位置,但这回可是真的搜索栏,你可以在里面输入关键字,不像以前那个搜索栏形状的按钮会打开完全不同的界面。谷歌最终还是放弃了给缩放控件留屏幕空间,仅仅依靠手势来控制地图显示。尽管 3D 建筑轮廓这个特性已经被移植到了旧版本的地图中,蜂巢依然是拥有这个特性的第一个版本。双指在地图上向下拖放会“倾斜”地图的视角,展示建筑的侧面。你可以随意旋转,建筑同样会跟着进行调整。
|
||||
|
||||
并不是所有部分都进行了重新设计。导航自姜饼以来就没动过,还有些界面的核心部分,像是路线,直接从安卓 1.6 的设计拿出来,放到一个小盒子里居中放置,仅此而已。
|
||||
并不是所有部分都进行了重新设计。导航自姜饼以来就没动过,还有些界面的核心部分,比如路线,直接从安卓 1.6 的设计拿出来,放到一个小盒子里居中放置,仅此而已。
|
||||
|
||||
----------
|
||||
|
||||
@ -78,7 +78,7 @@ Ron Amadeo 供图
|
||||
|
||||
via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/17/
|
||||
|
||||
译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[alim0x](https://github.com/alim0x) 校对:[Bestony](https://github.com/Bestony)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
|
141
translated/tech/20161128 JavaScript frameworks and libraries.md
Normal file
141
translated/tech/20161128 JavaScript frameworks and libraries.md
Normal file
@ -0,0 +1,141 @@
|
||||
一些 JavaScript 的框架和库
|
||||
============================================================
|
||||
![JavaScript frameworks and libraries](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/code_javascript.jpg?itok=a4uULCF0 "JavaScript frameworks and libraries")
|
||||
|
||||
>来源 : 图片来自 Jen Wike Huger
|
||||
|
||||
JavaScript 即未来趋势所在。
|
||||
|
||||
Javascript 拥有众多的技术领导者的拥护和支持,其中一位就是 WordPress 的作者 Matt Mullenweg , 他表示 [WordPress 开发者][18] 应该学习 JavaScript , 这也清晰地向 WordPress 社区传达了 JavaScript 在未来的重要性。 同时,这一观点也被普遍接受。向着更先进的技术靠拢与过渡也同时保证了 WordPress 在未来的挑战中不会落于人后。
|
||||
|
||||
JavaScript 同时也是众多站在开源立场的技术中的佼佼者。与现在所流行的观点相反,JavaScript 不是一个工程,而是一个由其核心团队共同制定和维护的开放标准。[ECMAScript][19] , 另一个和 JavaScript 相关的名字, 它虽然不是开源的,但它也有一个开放的标准。
|
||||
|
||||
当你在浏览 GitHub 的时候你就可以发现 JavaScript 在当今有多么流行了。而且就 [repository 的数量][20] 而言,JavaScript 绝对位于所有的编程语言当中最顶尖的那一层次。 同时,在 Livecoding.tv 上你也能看出 JavaScript 有多么突出,这里的用户发布的关于 JavaScript 的视频的数量比其他的话题多得多。在写这篇文章的时候(原作者写下这篇文章的日期,非译者翻译日期),Livecoding.tv 上已经有 [45,919 个 用户原创的 JavaScript 视频教程][21] 。
|
||||
|
||||
### 热门的开源 JavaScript 框架和库
|
||||
|
||||
回归到主题, 庞大的社区是 JavaScript 的一个得天独厚的优势,同时这也驱动了 JavaScript 的蓬勃发展。这里有数以百千计的成熟的 JavaScript 框架和库供开发者使用,同时这些最优秀的框架和库都是开源的。对当前的 JavaScript 开发者来说,能够使用这些优秀的框架和库来进行快速开发已经是必须技能了。当今的市场需要快速开发,但是,重复造轮子是没有必要的。不论你是一个 JavaScript 新手还是一个资深的 JavaScript 开发者,使用框架和库都能极大提高你的工作效率。
|
||||
|
||||
好了,让我们开始吧!
|
||||
|
||||
### 1\. Angular.js
|
||||
|
||||
[Angular.js][1] 是目前最热门的 JavaScript 框架之一。它用于开发者构建复杂的 web 应用。Angular.js 背后的思想是它的单页应用 model。同时它 也支持 MVC 架构。在 Angular.js 中 ,开发者可以在前端中使用 JavaScript 代码,并从字面上扩展 HTML词汇。
|
||||
|
||||
Angular.js 自 2009 年出现以来已经有了很大的改进。Angular 1 当前的稳定版本是 1.5.8/1.2.30 。你也可以试一试 Angular 2 ,相对于 Angular 1 来说它有了重大的改进,但这个新版本仍未在全球范围内被普遍使用。
|
||||
|
||||
在 Angular.js 中,数据绑定是完成作业的一个重要概念。在用户与接口的交互中,当交互完成 view 就会自动更新新值,随即新值与 model 交互以确保一切都是同步的。在底层的逻辑在 model 中执行完成后,DOM 也会随即更新。
|
||||
|
||||
### 2\. Backbone.js
|
||||
|
||||
复杂 web 应用并不适用于所有场景。一些较简单的 web 应用框架例如 [Backbone.js][2] 就非常适合学习 web app 开发。Backbone.js 是一个简单的框架,可以快速方便地构建简单的 web 应用。和 Angular.js 一样,Backbone.js 也支持 MVC 。Backbone.js 还有一些其它关键特性如路由,RESTful API 支持,适当的状态管理等等。你甚至还可以用 Backbone.js 来构建单页应用。
|
||||
|
||||
当前的稳定版本是 1.3.3,可以在 [GitHub][22] 中找到。
|
||||
|
||||
### 3\. D3.js
|
||||
|
||||
[D3.js][3] 是一个优秀的 JavaScript 库,它允许开发者创建具有数据处理功能的富 web 页面。D3.js 使用 SVG, HTML 和 CSS 来实现这一切功能。使用 D3.js ,你可以更轻松地将数据绑定到 DOM 及启用数据驱动事件。使用 D3.js ,你还可以创建高质量的数据驱动的 web 页面来提供一个更易于理解的视觉效果来呈现数据。查看示例 : [LCF 符号哈密顿图][23] ,由 D3.js 强力驱动。
|
||||
|
||||
### 4\. React.js
|
||||
|
||||
[React.js][4] 是一个使用起来很有趣的 JavaScript 框架。和其它的 JavaScript 框架不同,React.js 志在构建一个高可扩展的前端用户界面。React.js 出现于 2013 年,它采用了 BSD 开源协议。它以其能够开发复杂且漂亮的用户界面所带来的优势而迅速发展壮大。
|
||||
|
||||
React.js 背后的核心思想是虚拟 DOM 。虚拟 DOM 在客户端和服务端之间扮演着一个中间人的角色并带来了显著的性能提升。虚拟 DOM 的改变和 server DOM 一样,只需要更新所需的元素,相对于传统的 UI 渲染来说极大提升了渲染速度。
|
||||
|
||||
你还可以使用 Recat 来实现 meterial 风格的设计,使你能够开发具有无与伦比的性能的 web 应用。
|
||||
|
||||
### 5\. jQuery
|
||||
|
||||
[jQuery][5] 是一个非常流行的 JavaScript 库,它拥有众多特性例如事件处理,动画等。当你在做一个 web 项目的时候,你不会想要把时间浪费在为一些简单的功能写代码上。jQuery 为减少你的工作量提供了一些易于使用的 API 。这些 API 在所有的常见的浏览器中都能够使用。使用 jQuery, 你可以无缝地控制 DOM 以及 Ajax 这样在近几年来拥有高需求的作业。使用 jQuery, 开发者不必担心一些低级的交互,同时可以使他们的 web 应用的开发更加容易与迅速。
|
||||
|
||||
jQuery 同时便于分离 HTML 和 JavaScript 代码,使开发者能够编写简洁同时跨浏览器兼容的代码。并且使用 jQuery 创建的 web 应用在将来也易于改善和扩展。
|
||||
|
||||
### 6\. Ember.js
|
||||
|
||||
[Ember.js][6] 是一个 Angular.js 和 React.js 的功能的混合体。当你在浏览社区的时候你能明显地感受到 Ember.js 的热门程度。Ember.js 的新特性也不断地在添加。它在数据同步方面与 Angular.js 很像。 双向的数据交换可以确保应用的快速性和可扩展性。同时,它还能够帮助开发者创建一些前端元素。
|
||||
|
||||
和 React.js 的相似之处在于,Ember.js 提供了同样的服务端虚拟 DOM 以确保高性能和高可扩展。同时, Ember.js 提倡简化代码,提供了丰富的 API。Ember.js 还有非常优秀的社区。
|
||||
|
||||
### 7\. Polymer.js
|
||||
|
||||
如果你曾想过创建你自己的 HTML5 元素,那么你可以使用[Polymer.js][7] 来做这些事。 Polymer 主要集中于通过给 web 开发者提供创建自己的标签的功能来提供扩展功能。例如,你可以创建一个和 HTML5 中的 \<video> 类似的具有自己的功能的 <my_video> 元素。
|
||||
|
||||
Polymer 在 2013 年被 Google 引入并处于 [3-Clause BSD][24] 协议之下。
|
||||
|
||||
### 8\. Three.js
|
||||
|
||||
[Three.js][8] 又是另一个 JavaScript 库is yet another JavaScript library,主要用于 3D 效果开发。如果你在做游戏开发的动画效果,那么你可以利用 Three.js 的优势。Three.js 在底层中使用 WebGL 使 Three.js 可以轻松地被用于在屏幕上渲染 3D 物体。举一个比较知名的使用 Three.js 的例子就是 HexGLA,一个未来派赛车游戏。
|
||||
|
||||
### 9\. PhantomJS
|
||||
|
||||
使用 JavaScript 工作就意味着和不同的浏览器打交道,同时,当提及浏览器的时候,就不得不讨论资源管理。在 [PhantomJS][25] 中,由于有 headless WebKit 的支持,所以你可以随时监测你的 web 应用。Headless WebKit 是 Chrome 和 Safari 使用的渲染引擎中的一部分。
|
||||
|
||||
这整个过程是自动化的,你所需要做的只是使用这个 API 来构建你的 web 应用。
|
||||
|
||||
### 10\. BabylonJS
|
||||
|
||||
[BabylonJS][9] 与 Three.js 不相伯仲, 提供了 JavaScript API 来创建无缝且强有力的 3D web 应用。它是开源的,且基于 JavaScript 和 WebGL 。创建一个简单的 3D 物体比如一个球体是非常简单的,你只需要写短短几行代码。通过这个库提供的 [文档][10],你可以很好地掌握它的内容。 同时 BabylonJS 的主页上也提供了一些优秀的 demo 来当作参考。在其官网上你可以找到这些 Demo。
|
||||
|
||||
### 11\. Boba.js
|
||||
|
||||
Web 应用总是有一个共通的需求,那就是分析。如果你还在苦于将数据的分析与统计插入到 JavaScript 的 web 应用中,那么你可以试一下 [Boba.js][11]。Boba.js 可以帮助你将分析的数据插入到你的 web 应用中并且支持旧的 ga.js 。你甚至可以把 metrics 和 Boba.js 集成在一起,只需要依赖 jQuery 即可。
|
||||
|
||||
### 12\. Underscore.js
|
||||
|
||||
[Underscore.js][12] 解决了 “当我面对一个空白 HTML 页面并希望即刻开始工作,我需要什么” 这个问题。当你刚开始一个项目, 你可能会感到失落或者重复一系列你在之前项目中常做的步骤。 为了简化开启一个项目的过程和给你起个头,Underscore.js 这个 JavaScript 库给你提供了一系列的方法。例如,你可以使用你在之前项目中常用的 Backbone.js 中的 suspender 或者 jQuery 的一些方法。
|
||||
|
||||
一些实用的帮助例如 "filter" 和 "invoke the map" 给你起了个好头,以助于你尽可能快的投入到工作中。 Underscore.js 同时还自带了一个套件来简化你的测试工作。
|
||||
|
||||
### 13\. Meteor.js
|
||||
|
||||
[Meteor.js][13] 是一个快速构建 JavaScript 应用的框架。它是开源的且它能够用于构建桌面应用,移动应用和 web 应用。Meteor.js 是一个全栈的框架同时允许多平台的端到端开发。 你可以使用 Meteor.js 来实现前端和后端功能,同时它也能密切监视应用的性能。Meteor.js 的社区非常庞大,所以它会有不断的新特性更新或者是 bug 修复。Meteor.js 也是模块化的,同时它能配合一些其它的优秀的 API 使用。
|
||||
|
||||
### 14\. Knockout.js
|
||||
|
||||
[Knockout.js][14] 在这些库中可能是最被低估的一个。它是一个基于 MIT 开源协议的开源 JavaScript 框架。作者是 [Steve Sanderson][15]。它基于 MVVM 模式。
|
||||
|
||||
### 值得注意的是: Node.js
|
||||
|
||||
[Node.js][16] 是一个强有力的 JavaScript 运行时环境。它可以被用于使用真实世界书局来构建快速且可扩展的应用。它既不是一个框架也不是一个库,而是一个基于 Google Chrome 的 V8 引擎的运行时环境。你可以用 Node.js 来创建多元化的 JavaScript 应用,包括单页应用,即时 web 应用等等。从技术层面上来讲,由于它的事件驱动式架构,所以 Node.js 支持异步 I/O 。这种做法使得它成为开发高可扩展应用的一个极好的解决方案的选择。查看 [Node.js][17]在 livecoding.tv 上的视频。
|
||||
|
||||
### 总结
|
||||
|
||||
JavaScript 是 web 开发中的通用语言。它之所以快速发展不仅仅是因为它所提供的内容,更多的是因为它的庞大的开源社区的支持。以上提到的框架和库对任何一个 JavaScript 开发者来说都是必须知道的。它们都提供了一些途径来探索 JavaScript 和前端开发。上面提及的大部分框架和库频繁地在 Livecoding.tv 上出现,大部分来自对 JavaScript 及其相关技术感兴趣的软件工程师。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/16/11/15-javascript-frameworks-libraries
|
||||
|
||||
作者:[Dr. Michael J. Garbade ][a]
|
||||
译者:[chenxinlong](https://github.com/chenxinlong)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://opensource.com/users/drmjg
|
||||
[1]:https://opensource.com/article/16/11/www.angularjs.org
|
||||
[2]:https://opensource.com/article/16/11/www.backbone.js
|
||||
[3]:https://opensource.com/article/16/11/www.d3js.org
|
||||
[4]:https://facebook.github.io/react/
|
||||
[5]:http://jquery.com/
|
||||
[6]:http://emberjs.com/
|
||||
[7]:https://www.polymer-project.org/1.0/
|
||||
[8]:https://threejs.org/
|
||||
[9]:http://www.babylonjs.com/
|
||||
[10]:https://doc.babylonjs.com/
|
||||
[11]:http://boba.space150.com/
|
||||
[12]:http://underscorejs.org/
|
||||
[13]:https://www.meteor.com/
|
||||
[14]:http://knockoutjs.com/
|
||||
[15]:http://blog.stevensanderson.com/
|
||||
[16]:https://nodejs.org/en/
|
||||
[17]:https://www.livecoding.tv/learn/node-js/
|
||||
[18]:http://wesbos.com/learn-javascript/
|
||||
[19]:http://stackoverflow.com/questions/5520245/is-javascript-an-open-source-project
|
||||
[20]:https://github.com/blog/2047-language-trends-on-github
|
||||
[21]:https://www.livecoding.tv/learn/javascript/
|
||||
[22]:https://github.com/jashkenas/backbone/
|
||||
[23]:http://christophermanning.org/projects/building-cubic-hamiltonian-graphs-from-lcf-notation
|
||||
[24]:https://en.wikipedia.org/wiki/BSD_licenses#3-clause
|
||||
[25]:https://phantomjs.org/
|
@ -0,0 +1,270 @@
|
||||
Create a Shared Directory on Samba AD DC and Map to Windows/Linux Clients – Part 7
|
||||
============================================================
|
||||
在 Samba AD DC 服务器上创建共享目录并映射到 Windows/Linux 客户机 ——(七)
|
||||
|
||||
这篇文章将指导你如何在 Samba AD DC 服务器上创建共享目录,然后通过 GPO 把共享目录挂载到域中的其它 Windows 成员机,并且从 Windows 域控的角度来管理共享权限。
|
||||
|
||||
这篇文章也包括在加入域的 Linux 机器上如何使用 Samba4 域帐号来访问及挂载共享文件。
|
||||
|
||||
#### 需求:
|
||||
|
||||
1. [在 Ubuntu 系统上使用 Samba4 创建活动目录架构][1]
|
||||
|
||||
### 第一步:创建 Samba 文件共享
|
||||
|
||||
1、在 Samba AD DC 服务器上创建共享非常简单。首先创建一个你想通过 SMB 协议来分享文件的目录,然后添加下面的文件系统权限,这是为了让 Windows AD DC 管理员给 Windows 客户端分配相应的共享权限。
|
||||
|
||||
假设在 AD DC 服务器上有一个新的共享目录 '/nas' ,执行下面的命令来授予必要的权限。
|
||||
|
||||
```
|
||||
# mkdir /nas
|
||||
# chmod -R 775 /nas
|
||||
# chown -R root:"domain users" /nas
|
||||
# ls -alh | grep nas
|
||||
```
|
||||
[
|
||||
![Create Samba Shared Directory](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][2]
|
||||
|
||||
创建 Samba 共享目录
|
||||
|
||||
2、当你在 Samba4 AD DC 服务器上创建完成共享目录之后,你还得修改 samba 配置文件,添加下面的参数以允许通过 SMB 协议来共享文件。
|
||||
|
||||
```
|
||||
# nano /etc/samba/smb.conf
|
||||
```
|
||||
|
||||
在配置文件末尾添加以下内容:
|
||||
|
||||
```
|
||||
[nas]
|
||||
path = /nas
|
||||
read only = no
|
||||
```
|
||||
[
|
||||
![Configure Samba Shared Directory](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][3]
|
||||
|
||||
配置 Samba 共享目录
|
||||
|
||||
3、最后,你需要通过下面的命令重启 Samba AD DC 服务,以让修改的配置生效:
|
||||
|
||||
```
|
||||
# systemctl restart samba-ad-dc.service
|
||||
```
|
||||
|
||||
### 第二步:管理 Samba 共享权限
|
||||
|
||||
4、我们准备使用在 Samba AD DC 服务器上创建的域帐号(包括用户和组)来访问这个共享目录(禁止 Linux 系统用户访问共享目录)。
|
||||
|
||||
可以直接通过 Windows 资源管理器来完成 Samba 共享权限的管理,就跟你在 Windows 资源管理器中设置其它文件夹权限的方法一样。
|
||||
|
||||
首先,使用具有管理员权限的 Samba4 AD 域帐号登录到 Windows 机器。然而在 Windows 机器上的资源管理器中输入双斜杠和 Samba AD DC 服务器的 IP 地址或主机名或者是 FQDN 来访问共享文件和设置权限。
|
||||
|
||||
```
|
||||
\\adc1
|
||||
Or
|
||||
\\192.168.1.254
|
||||
Or
|
||||
\\adc1.tecmint.lan
|
||||
```
|
||||
[
|
||||
![Access Samba Share Directory from Windows](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][4]
|
||||
|
||||
从 Windows 机器访问 Samba 共享目录
|
||||
|
||||
5、右键单击共享文件,选择属性来设置权限。打开安全选项卡,依次修改域账号和组权限。使用高级选项来调整权限。
|
||||
|
||||
[
|
||||
![Configure Samba Share Directory Permissions](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][5]
|
||||
|
||||
配置 Samba 共享目录权限
|
||||
|
||||
可参考下面的截图来为指定 Samba AD DC 认证用户设置权限。
|
||||
|
||||
[
|
||||
![Manage Samba Share Directory User Permissions](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][6]
|
||||
|
||||
设置 Samba 共享目录用户权限
|
||||
|
||||
6、你也可以使用其它方法来设置共享权限,打开计算机管理-->连接到另外一台计算机。
|
||||
|
||||
找到共享目录,右键单击你想修改权限的目录,选择属性,打开安全选项卡。你可以在这里修改任何权限,就跟上图的修改共享文件夹权限的方法一样。
|
||||
|
||||
[
|
||||
![Connect to Samba Share Directory Machine](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][7]
|
||||
|
||||
连接到 Samba 共享目录服务器
|
||||
|
||||
[
|
||||
![Manage Samba Share Directory Properties](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][8]
|
||||
|
||||
管理 Samba 共享目录属性
|
||||
|
||||
[
|
||||
![Assign Samba Share Directory Permissions to Users](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][9]
|
||||
|
||||
为域用户授予共享目录权限
|
||||
|
||||
### 第三步:通过 GPO 来映射 Samba 文件共享
|
||||
|
||||
7、要想通过域组策略来挂载 Samba 共享的目录,你得先到一台[已安装了 RSAT 工具][10] 的服务器上,打开 AD DC 工具,右键单击域名,选择新建-->共享文件平。
|
||||
|
||||
[
|
||||
![Map Samba Share Folder](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][11]
|
||||
|
||||
映射 Samba 共享文件夹
|
||||
|
||||
8、为共享文件夹添加一个名字,然后输入共享文件夹的网络路径,如下图所示。完成后单击 OK 按钮,你就可以在右侧看到文件夹了。
|
||||
|
||||
[
|
||||
![Set Samba Shared Folder Name Location](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][12]
|
||||
|
||||
设置 Samba 共享文件夹名称及路径
|
||||
|
||||
9、下一步,打开组策略管理控制台,找到当前域的默认域策略脚本,然后打开并编辑该文件。
|
||||
|
||||
在 GPM 编辑器界面,打开 GPM 编辑器,找到用户配置 --> 首选项 --> Windows 设置,然而右键单击驱动器映射,选择新建 --> 映射驱动。
|
||||
|
||||
[
|
||||
![Map Samba Share Folder in Windows](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][13]
|
||||
|
||||
在 Windows 机器上映射 Samba 共享文件夹
|
||||
|
||||
10、通过单击右边的三个小点,在新窗口中查询并添加共享目录的网络位置,勾选重新连接复选框,为该目录添加一个标签,选择驱动盘符,然后单击 OK 按钮来保存和应用配置。
|
||||
|
||||
[
|
||||
![Configure Network Location for Samba Share Directory](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][14]
|
||||
|
||||
配置 Samba 共享目录的网络位置
|
||||
|
||||
11、最后,为了在本地机器上强制应用 GPO 更改而不重启系统,打开命令行提示符,然而执行下面的命令。
|
||||
|
||||
```
|
||||
gpupdate /force
|
||||
```
|
||||
[
|
||||
![Apply GPO Changes](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][15]
|
||||
|
||||
应用 GPO 更改
|
||||
|
||||
12、当你在本地机器上成功应用策略后,打开 Windows 资源管理器,你就可以看到并访问共享的网络文件夹了,能否正常访问共享目录取决于你在前一步的授权操作。
|
||||
|
||||
如果没有在命令行下强制应用组策略,你网络中的其它客户机需要重启或重新登录系统才可以看到共享目录。
|
||||
|
||||
[
|
||||
![Samba Shared Network Volume on Windows](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][16]
|
||||
|
||||
Windows 机器上挂载的 Samba 网络磁盘
|
||||
|
||||
### 第四步:从 Linux 客户端访问 Samba 共享目录
|
||||
|
||||
13、已加入 Samba AD DC 中的 Linux 成员机上的系统用户也可以可以使用 Samba 帐号访问或在本地挂载共享目录。
|
||||
|
||||
首先,你得通过下面的命令来确保 Samba 客户端和工具已经安装完成。
|
||||
|
||||
```
|
||||
$ sudo apt-get install smbclient cifs-utils
|
||||
```
|
||||
|
||||
14、为了列出域环境中的共享目录,你可以通过下面的命令加入指定的域控服务器主机名来查询:
|
||||
|
||||
```
|
||||
$ smbclient –L your_domain_controller –U%
|
||||
or
|
||||
$ smbclient –L \\adc1 –U%
|
||||
```
|
||||
[
|
||||
![List Samba Share Directory in Linux](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][17]
|
||||
|
||||
在 Linux 机器上列出 Samba 共享目录
|
||||
|
||||
15、在命令行下使用域帐号以交互试方式连接到 Samba 共享目录:
|
||||
|
||||
```
|
||||
$ sudo smbclient //adc/share_name -U domain_user
|
||||
```
|
||||
|
||||
在命令行下,你可以列出共享目录内容,下载或上传文件到共享目录,或者执行其它操作。使用 ? 来查询所有可用的 smbclient 命令。
|
||||
|
||||
[
|
||||
![Connect Samba Share Directory in Linux](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][18]
|
||||
|
||||
在 Linux 机器上连接 Samba 共享目录
|
||||
|
||||
16、在 Linux 机器上使用下面的命令来挂载 samba 共享目录。
|
||||
|
||||
```
|
||||
$ sudo mount //adc/share_name /mnt -o username=domain_user
|
||||
```
|
||||
[
|
||||
![Mount Samba Share Directory in Linux](http://www.tecmint.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
][19]
|
||||
|
||||
在 Linux 机器上挂载 samba 共享目录
|
||||
|
||||
根据实际情况,依次替换主机名、共享目录名、挂载点和域帐号。使用 mount 命令加上管道符和 grep 参数来过滤出 cifs 类型的文件系统。
|
||||
|
||||
通过上面的测试,我们可以看出,在 Samba4 AD DC 服务器上配置共享目录仅使用 Windows 访问控制列表( ACL ),而不是 POSIX ACL 。
|
||||
|
||||
通过文件共享把 Samba 配置为域成员以使用其它网络共享功能。同时,在另一个域控制器上[配置 Windbindd 服务][20] ——第二步——在你开始发起网络共享文件之前。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
作者简介:
|
||||
|
||||
我是一个电脑迷,开源 Linux 系统和软件爱好者,有 4 年多的 Linux 桌面、服务器系统使用和 Base 编程经验。
|
||||
|
||||
译者简介:
|
||||
春城初春/春水初生/春林初盛/春風十裏不如妳
|
||||
[rusking](https://github.com/rusking)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/create-shared-directory-on-samba-ad-dc-and-map-to-windows-linux/
|
||||
|
||||
作者:[Matei Cezar][a]
|
||||
译者:[rusking](https://github.com/rusking)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/cezarmatei/
|
||||
|
||||
[1]:http://www.tecmint.com/install-samba4-active-directory-ubuntu/
|
||||
[2]:http://www.tecmint.com/wp-content/uploads/2017/02/Create-Samba-Shared-Directory.png
|
||||
[3]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-Samba-Shared-Directory.png
|
||||
[4]:http://www.tecmint.com/wp-content/uploads/2017/02/Access-Samba-Share-Directory-from-Windows.png
|
||||
[5]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-Samba-Share-Directory-Permissions.png
|
||||
[6]:http://www.tecmint.com/wp-content/uploads/2017/02/Manage-Samba-Share-Directory-User-Permissions.png
|
||||
[7]:http://www.tecmint.com/wp-content/uploads/2017/02/Connect-to-Samba-Share-Directory-Machine.png
|
||||
[8]:http://www.tecmint.com/wp-content/uploads/2017/02/Manage-Samba-Share-Directory-Properties.png
|
||||
[9]:http://www.tecmint.com/wp-content/uploads/2017/02/Assign-Samba-Share-Directory-Permissions-to-Users.png
|
||||
[10]:http://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat/
|
||||
[11]:http://www.tecmint.com/wp-content/uploads/2017/02/Map-Samba-Share-Folder.png
|
||||
[12]:http://www.tecmint.com/wp-content/uploads/2017/02/Set-Samba-Shared-Folder-Name-Location.png
|
||||
[13]:http://www.tecmint.com/wp-content/uploads/2017/02/Map-Samba-Share-Folder-in-Windows.png
|
||||
[14]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-Network-Location-for-Samba-Share-Directory.png
|
||||
[15]:http://www.tecmint.com/wp-content/uploads/2017/02/Apply-GPO-Changes.png
|
||||
[16]:http://www.tecmint.com/wp-content/uploads/2017/02/Samba-Shared-Network-Volume-on-Windows.png
|
||||
[17]:http://www.tecmint.com/wp-content/uploads/2017/02/List-Samba-Share-Directory-in-Linux.png
|
||||
[18]:http://www.tecmint.com/wp-content/uploads/2017/02/Connect-Samba-Share-Directory-in-Linux.png
|
||||
[19]:http://www.tecmint.com/wp-content/uploads/2017/02/Mount-Samba-Share-Directory-in-Linux.png
|
||||
[20]:http://www.tecmint.com/manage-samba4-active-directory-linux-command-line/
|
||||
[21]:http://www.tecmint.com/author/cezarmatei/
|
||||
[22]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
|
||||
[23]:http://www.tecmint.com/free-linux-shell-scripting-books/
|
@ -0,0 +1,120 @@
|
||||
LaTeXila 简介 - Linux 下一个多语言 LaTeX 编辑器
|
||||
============================================================
|
||||
|
||||
### 在本文中你将看到
|
||||
|
||||
1. [为何选择使用 LaTeX?][1]
|
||||
2. [创建新文档并设定文档的基本结构][2]
|
||||
3. [LaTeXila 简单易用,公式齐全][3]
|
||||
4. [将 .tex 文件转换为 .rtf 文件][4]
|
||||
5. [结论][5]
|
||||
|
||||
LaTeXila 是一个多语言 LaTeX 编辑器,专为那些偏爱 GTK+ 外观的 Linux 用户设计。这个软件简单,但有足够强大,可定制性良好,所以如果你对 LaTeX 感兴趣,那么你就应该尝试一下这个工具。在下面的快速指南中,我将展示如何使用 LaTeXila 并介绍其主要功能。但在开始之前你可能要问:
|
||||
|
||||
### 为何选择使用 LaTeX?
|
||||
|
||||
假如我想创建一个文本文档,为什么我不使用 LibreOffice 或者 Abiword 这些常规的工具呢?这个问题的答案是相比于常规的文本编辑器,LaTeX 编辑器一般来说都会提供更多功能强大的格式化工具,让你在写作期间专注于文档的内容。LaTeX 是一个文档准备系统,实际上这意味着它简化了大多数常见出版物的处理过程,这些出版物包括书籍或者科学报告,它们通常都包含很多数学公式,多语言排版元素,交叉引用及引文,参考文献等等需要处理的元素。尽管上面的那些元素也可以用 LibreOffice 来处理,但如果要保证最后处理过的文档是高质量的,相比于使用 LibreOffice,使用 LaTeXila 则要相对简单一些。
|
||||
|
||||
### 在一个新文档上开始工作并设定文章结构
|
||||
|
||||
首先,我们需要在 LaTeXila 中创建一个新文件,这个可以通过点击位于左上角的 “新建文件” 图标来实现,接着它将打开一个对话框,让我们选择一个模板从而快速地开始写作。
|
||||
|
||||
[
|
||||
![打开 LaTex 编辑器](https://www.howtoforge.com/images/introduction-to-latexila/pic_1.png)
|
||||
][6]
|
||||
|
||||
在这里假设我将写一本书,所以我应该选择书籍模板,像下面的截图那样在相应的括号中添上标题和作者:
|
||||
|
||||
[
|
||||
![打开书籍模板](https://www.howtoforge.com/images/introduction-to-latexila/pic_2.png)
|
||||
][7]
|
||||
|
||||
现在就让我来解释一些关于文章结构的事情。我知道这看起来就像编代码,如若你是一位作家而非程序员,那么像下面那样工作或许很是奇怪,但请先容我讲完,下面我将对此进行解释。
|
||||
|
||||
在第一行和第九行之间,我们已经写好了书写整个文档所需的所有基本要素。例如在第一行中,我们可以通过修改“[a4paper,11pt]”来定义纸张和字体的大小,在这个方括号中,我们可以添加更多的选项,选项之间以逗号来分隔。
|
||||
|
||||
在第二行和第四行之间,我们可以看到一些条目,它们都以“\userpackage”打头,紧接着的是用方括号包裹的选项和用括号包裹的命令。这些命令都是一些增强宏包,LaTeXila 默认已经安装它们到我们的系统上了,并且在大多数模板中都将使用它们。需要特别注意的是字体编码,字符编码和字体的类型。
|
||||
|
||||
紧着让我们看看 "\maketitle" 这一行,这里我们可以添加一个单独的标题页,且默认情况下标题的内容将被放置在第一页的顶部。类似的,包含“\tableofcontents”的那行将会自动生成书籍的目录。
|
||||
|
||||
最后,我们可以自己命名章节的名称,这可以通过在“\chapter”后的括号中添加章节名称来实现。第一个章节将会被自动地标记为第一章。你可以在接下来的行中添加内容,一直到下一个以 "\chapter" 开头的新行为止,这些都将是这个章节的内容。新的章节将会被自动地标记为第二章,以此类推。
|
||||
|
||||
[
|
||||
![LaTex 的格式](https://www.howtoforge.com/images/introduction-to-latexila/pic_3.png)
|
||||
][8]
|
||||
|
||||
章节之间还可以用命令“\section”来划分为更小的块,甚至还可以使用“\subsection”来划分为更小的部分。各个小节和章都将被“\tableofcontents”自动检测到,并将使用它们的标题和页码来填充目录的内容。看看下面的截图就可以看到章和小节是如何在你的书中被排版的。
|
||||
|
||||
[
|
||||
![LaTex 预览](https://www.howtoforge.com/images/introduction-to-latexila/pic_4.png)
|
||||
][9]
|
||||
|
||||
假如你想看看结构的大致布局,你可以将左边的工具栏更换到“结构”选项,并确保所有的内容用缩进隔开了。在工具栏中,你还可以可能控制位于各个小节中的任意数据表格和图片。
|
||||
|
||||
[
|
||||
![LaTex 结构](https://www.howtoforge.com/images/introduction-to-latexila/pic_5.png)
|
||||
][10]
|
||||
|
||||
讲到这里,有人或许想将表格和图片的位置也包含在目录中。要达到此目的,你需要将下面的两行添加到“\tableofcontents” 之后:
|
||||
|
||||
\listoffigures
|
||||
\listoftables
|
||||
|
||||
最后标志着书籍结束的信号是“\end{document}”。所以你的布局应该总是以此为结尾。
|
||||
|
||||
### LaTeXila 简单易用,公式齐全
|
||||
|
||||
LaTeX 是一个基于命令的文档生成系统,它与使用的编辑器没有多少关联。这里需要强调的是 LaTeXila 提供了一系列强大的工具,使得在你书写报告或书籍时能够节省一些时间和精力。例如对于 LaTex 命令,它提供了自动补全功能,这个功能将在你每次开始输入命令时被激活。
|
||||
|
||||
[
|
||||
![LaTeX 中的数学公式](https://www.howtoforge.com/images/introduction-to-latexila/pic_6.png)
|
||||
][11]
|
||||
|
||||
LaTeXila 还集成有基于 gspell 的拼写检测系统,你可以在最上面的“工具”菜单中设定合适的语言。最上面的工具栏里几乎包含了你要用到的所有按钮。从左到右,你可以完成添加章节,交叉引用,调整字符的大小,格式化被选取的部分,添加无序列表和数学函数等等。这些都可以手动地输入,但通过点击相应按钮来完成或许更加方便。
|
||||
|
||||
对于生成数学公式,结合侧边栏上的工具栏选项,你只需轻轻一点就可以添加相应的数学符号。点击位于左边的侧边栏中“符号”框,你就可以看到相关的符号分类,例如”关系运算符“,”希腊字母“,”算子“等等。下面的截图就是一些符号的示例:
|
||||
|
||||
[
|
||||
![希腊字母和算子符号](https://www.howtoforge.com/images/introduction-to-latexila/pic_7.png)
|
||||
][12]
|
||||
|
||||
这些符号的图形化列表使得公式和数学表达式的生成犹如在公园中散步那样舒适。
|
||||
|
||||
### 将 .tex 文件转换为 .rtf 文件
|
||||
|
||||
默认情况下,LaTeXila 会将你的文档保存为标准的 `.tex` 文档,而我们可以使用 `.tex` 文档来生成一个”富文本“文档,这些富文本文档可以使用像 LibreOffice 那样的文本编辑器打开。要达到此目的,我们需要安装一个名为 `latex2rtf` 的工具,它在所有的 Linux 发行版本中都可以被获取到。像下面那样在文本所在的目录打开虚拟终端, 并输入 `latex2rtf 文件名称` :
|
||||
|
||||
[
|
||||
![由 LaTeX 文档生成 RTF 文档](https://www.howtoforge.com/images/introduction-to-latexila/pic_8.png)
|
||||
][13]
|
||||
|
||||
当然 LLaTeXila 也提供了它自己的构建工具,这些工具可以在上面的工具栏或者最上面的面板(构建)中看到。但我向你推荐 latex2rtf 是以防在其他的操作系统上出现某些意想不到的问题。
|
||||
|
||||
### 结论
|
||||
|
||||
假如上面的介绍激发了你探索 LaTeX 的兴趣,那就再好不过了。我写这篇文章的目的是向新手介绍一款简单易用且适合他们写作的工具。要是 LaTeXila 还带有实时预览的双屏模式的话,它就更加完美了。。。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/
|
||||
|
||||
作者:[Bill Toulas][a]
|
||||
译者:[FSSlc](https://github.com/FSSlc)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/
|
||||
[1]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#why-latex
|
||||
[2]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#starting-work-on-a-new-document-and-setting-up-the-structure
|
||||
[3]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#latexila-ease-of-use-and-mathematics
|
||||
[4]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#from-tex-to-rtf
|
||||
[5]:https://www.howtoforge.com/tutorial/introduction-to-latexila-latex-editor/#conclusion
|
||||
[6]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_1.png
|
||||
[7]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_2.png
|
||||
[8]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_3.png
|
||||
[9]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_4.png
|
||||
[10]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_5.png
|
||||
[11]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_6.png
|
||||
[12]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_7.png
|
||||
[13]:https://www.howtoforge.com/images/introduction-to-latexila/big/pic_8.png
|
@ -1,491 +1,495 @@
|
||||
How to install Arch Linux on VirtualBox
|
||||
============================================================
|
||||
|
||||
### On this page
|
||||
|
||||
1. [Arch Linux Repositories][8]
|
||||
2. [Install Arch Linux on Virtual Box][9]
|
||||
1. [Download Arch Linux][1]
|
||||
2. [Initializing Installation with Oracle VM VirtualBox Manager][2]
|
||||
3. [Partition the hard disk][3]
|
||||
4. [Bootstrap Arch Linux][4]
|
||||
5. [Setup hostname and networking][5]
|
||||
6. [Install the Bootloader][6]
|
||||
7. [Boot into the installed ArchLinux operating system][7]
|
||||
|
||||
Arch Linux is a Linux-based operating system that is designed for i689 and 86-64 computers. Its unique package manager is responsible for providing updates to the latest software applications using “pacman” with complete tracking. Pacman is the package manager that is used to install, update, and remove the software packages. It is designed entirely for free and open-source software, along with the support from the Linux community.
|
||||
|
||||
Arch Linux is also popular for having a comprehensive documentation in form of the community wiki known as ArchWiki. This Linux operating system is based on binary packages that are targeted for i832, 64-bit, and 32-bit systems and optimized for the best performance on the modern hardware systems.
|
||||
|
||||
You can install Arch Linux directly to your home computer by following this guide but you can also install it on a virtual machine on your Windows computer by using VirtualBox.
|
||||
|
||||
### Arch Linux Repositories
|
||||
|
||||
To install Arch Linux on Virtual Box, you must know the basic repositories of this Linux-based operating system. A repository is a storage location from where the software packages are retrieved during the installation process. There are multiple repositories available for Arch Linux, which are accessible via pacman and maintained by package maintainers. Here is a list of some of the basic repositories used to install Arch Linux on Virtual Box:
|
||||
|
||||
* The **core **repository contains all the packages that are needed to setup the base system like booting Arch Linux, and building packages.
|
||||
|
||||
* The **extra **repository contains extra packages that do not fit in the core involving desktop environment.
|
||||
|
||||
* The **community **repositoryhas packages that are adopted by trusted Linux community users, and most of them will transfer to the core or extra repository.
|
||||
|
||||
* The **Multilib **repository contains 32-bit software and libraries for 32-bit application installation on 64-bit system.
|
||||
|
||||
* The **testing **repository contains packages that are destined for core or extra repositories.
|
||||
|
||||
* The **community-testing** repository is for the Linux community.
|
||||
|
||||
* The **multilib testing **repositoryis similar to the testing repository, but for multilib candidates.
|
||||
|
||||
* The **gnome-unstable **repository has the latest GNOME desktop environment.
|
||||
|
||||
* The **kde-unstable **repository contains the latest KDE software before they are been released.
|
||||
|
||||
### Install Arch Linux on Virtual Box
|
||||
|
||||
### Download Arch Linux
|
||||
|
||||
To install Arch Linux on Virtual Box, you must have the latest Arch Linux version that you can download from their [official website][10]. You can pick either the direct download option or torrent download, which is on a secure server. Before the installation, make sure you have 20 MB of free disk space and 1 GB of RAM in your system.
|
||||
|
||||
[
|
||||
![Download Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/1212.png)
|
||||
][11]
|
||||
|
||||
### Initializing Installation with Oracle VM VirtualBox Manager
|
||||
|
||||
Open the Oracle VM VirtualBox manager, click on new, and type in the name of the new operating system you want to create; in this case, it is Arch Linux. The system will automatically pick up the type and version of the Arch Linux, based on your system’s configuration. Click on _next_ .
|
||||
|
||||
[
|
||||
![Open VirtualBox](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12121.png)
|
||||
][12]
|
||||
|
||||
Allocate the desired RAM size to your new operating system, which is ideally 1024 MB. Click on _next _ and then click on _create_ , to create a virtual disk now.
|
||||
|
||||
[
|
||||
![Set RAM size](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12122.png)
|
||||
][13]
|
||||
|
||||
On the nextpage, you will be asked to select the type of hard disk file you want for your new operating system. Select VirtualBox Disk Image usually.
|
||||
|
||||
[
|
||||
![Select disk file type](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12123.png)
|
||||
][14]
|
||||
|
||||
Choose dynamically allocated and click _next_ .
|
||||
|
||||
[
|
||||
![Allocate disk space dynamically](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12124.png)
|
||||
][15]
|
||||
|
||||
Allocate 20 GB hard disk file location and size.
|
||||
|
||||
[
|
||||
![Choose a hard disk size of 20GB](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12125.png)
|
||||
][16]
|
||||
|
||||
Now you can see that your Arch Linux operating system is created. Now you can click _start_ .
|
||||
|
||||
[
|
||||
![Start the Virtual Machine](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12126.png)
|
||||
][17]
|
||||
|
||||
Click on 'browser' and select the startup disk, which you downloaded from the Arch Linux official website.
|
||||
|
||||
[
|
||||
![Choose Arch Linux Disk image](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12127.png)
|
||||
][18]
|
||||
|
||||
[
|
||||
![Browse for disk image file](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12128.png)
|
||||
][19]
|
||||
|
||||
Click on _start_ and then open the full-screen view.
|
||||
|
||||
[
|
||||
![Open the full-screen view](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12129.png)
|
||||
][20]
|
||||
|
||||
[
|
||||
![Start the Arch Linux VM](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121210.png)
|
||||
][21]
|
||||
|
||||
### **Booting to Install Arch Linux on Virtual Box**
|
||||
|
||||
You will see the first opening page of Arch Linux. Click on “Boot Arch Linux (x86_64), which is for 64-bit or click on “Boot Arch Linux (i686)”, which is for 32-bit.
|
||||
|
||||
[
|
||||
![Choose to boot Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121211.png)
|
||||
][22]
|
||||
|
||||
As soon as you click on the first option, the system will start booting. While it completes the temporary boot, we are basically moving into the live version and are logged in as root user.
|
||||
|
||||
[
|
||||
![Booting into Arch Linux live version](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121212.png)
|
||||
][23]
|
||||
|
||||
Check the Internet connection by typing in the following command.
|
||||
|
||||
_ping google.com_
|
||||
|
||||
The word ping stands for packet internet gopher. You will soon see the response that means Arch Linux has activated the Internet connection. This is essential to perform certain installation steps.
|
||||
|
||||
[
|
||||
![Test internet connectivity with ping](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121213.png)
|
||||
][24]
|
||||
|
||||
Clear the command by typing
|
||||
|
||||
_clear_
|
||||
|
||||
Before we start the installation, you should partition your drive. Type _# fdisk – 1 _ and you will see the current system’s disk partition. Focus on the 20 GB hard drives that you allocated to Arch in the beginning.
|
||||
|
||||
[
|
||||
![Partition the harddisk](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121214.png)
|
||||
][25]
|
||||
|
||||
### Partition the hard disk
|
||||
|
||||
We are going to partition this 20 GB space into three partitions. The first one is the primary root partition that will be of 10 GB. The second will be the swap partition, which will be twice the initial RAM allocation that will be 2048 MB. The third will be the logical partition that will be 8 GB allocated.
|
||||
|
||||
[
|
||||
![Create 3 disk partitions](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121215.png)
|
||||
][26]
|
||||
|
||||
Type the command:
|
||||
|
||||
_cfdisk_
|
||||
|
||||
You will see gpt, dos, sgi, and sun. Select the _dos _ option and press _enter_ .
|
||||
|
||||
[
|
||||
![Create a partition of type DOS](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121216.png)
|
||||
][27]
|
||||
|
||||
Here you will see the main disk space, which is 20 GB. To change this, press <enter> on the free space and type 10G.
|
||||
|
||||
[
|
||||
![Choose 10GB partition size](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121217.png)
|
||||
][28]
|
||||
|
||||
Press _enter _ and then click on the “primary” partition.
|
||||
|
||||
[
|
||||
![](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121218.png)
|
||||
][29]
|
||||
|
||||
Now select the “bootable” type by pressing enter on bootable.
|
||||
|
||||
[
|
||||
![Make partition bootable.](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121219.png)
|
||||
][30]
|
||||
|
||||
Go to _write _ and press enter, to write partition to disk.
|
||||
|
||||
[
|
||||
![Write partition to disk](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121220.png)
|
||||
][31]
|
||||
|
||||
Then type _yes_ to make the changes, successfully.
|
||||
|
||||
[
|
||||
![Confirm changes](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121221.png)
|
||||
][32]
|
||||
|
||||
Now the 10 GB partition is created. Click on _free space _ and then enter the partition size of 2048 M.
|
||||
|
||||
[
|
||||
![Create the 2GB swap partition](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121222.png)
|
||||
][33]
|
||||
|
||||
Now follow the same steps to create the logical partition. Then press enter on _quit_ and clear the command by typing
|
||||
|
||||
_clear_ .
|
||||
|
||||
[
|
||||
![quit cfdisk](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121223.png)
|
||||
][34]
|
||||
|
||||
Format the newly partitioned disk by typing:
|
||||
|
||||
_mkfs.ext4 /dev/sda1_
|
||||
|
||||
Here _sda1 _ is the partition name. Repeat this for the second drive by typing:
|
||||
|
||||
_mkfs.ext4 /dev/sda3_
|
||||
|
||||
and for the swap partition,
|
||||
|
||||
_mkswap/dev/sda2_ .
|
||||
|
||||
[
|
||||
![Format the swap partition with mkswap](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121224.png)
|
||||
][35]
|
||||
|
||||
Activate the swap by typing:
|
||||
|
||||
_swapon/ dev/ sda2_
|
||||
|
||||
and clear the command by typing:
|
||||
|
||||
_clear_ .
|
||||
|
||||
[
|
||||
![Enable swap](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121225.png)
|
||||
][36]
|
||||
|
||||
Mount the primary partition to start the installation part by typing:
|
||||
|
||||
_mount /dev/ sda1 / mnt._
|
||||
|
||||
[
|
||||
![Mount the partitions](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121226.png)
|
||||
][37]
|
||||
|
||||
### Bootstrap Arch Linux
|
||||
|
||||
Bootstrap the system by typing:
|
||||
|
||||
_pacstrap /mnt base base-devel_
|
||||
|
||||
You can see that it is synchronizing the data packages.
|
||||
|
||||
[
|
||||
![Bootstrap Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121227.png)
|
||||
][38]
|
||||
|
||||
The installation will start and will take a few minutes.
|
||||
|
||||
[
|
||||
![Arch Linux installation has been started](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121228.png)
|
||||
][39]
|
||||
|
||||
After the base installation create the fstab file by tying:
|
||||
|
||||
_genfstab /mnt>> /mnt/etc/fstab_
|
||||
|
||||
[
|
||||
![Generating /etc/fstab](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121229.png)
|
||||
][40]
|
||||
|
||||
Configure locale, time and root password
|
||||
|
||||
Change the system root to the Arch Linux installation directory by typing:
|
||||
|
||||
_arch-chroot /mnt /bin /bash_
|
||||
|
||||
Now to configure the language settings:
|
||||
|
||||
_nano /etc / local.gen_
|
||||
|
||||
[
|
||||
![Set language in Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121230.png)
|
||||
][41]
|
||||
|
||||
Select the following language configuration by deleting the # and pressing _control + x, _ press _y_ , and press _enter_ .
|
||||
|
||||
[
|
||||
![select language](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121231.png)
|
||||
][42]
|
||||
|
||||
Now activate it by typing:
|
||||
|
||||
_locale-gen_
|
||||
|
||||
and press _enter_ .
|
||||
|
||||
[
|
||||
![Generate the locales in Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121232.png)
|
||||
][43]
|
||||
|
||||
Create the /etc/locale.conf file by typing:
|
||||
|
||||
_nano /etc/locale.conf_
|
||||
|
||||
then press _enter_ . Now you can add your language to the system by adding this line to the file:
|
||||
|
||||
```
|
||||
LANG=en_US.UTF-8
|
||||
```
|
||||
|
||||
Then press _control + x _ and press _y_ , and press _enter_ .
|
||||
|
||||
[
|
||||
![Set default language](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/1.png)
|
||||
][44]
|
||||
|
||||
Synchronize the zone information by typing:
|
||||
|
||||
ls user/share/zoneinfo_
|
||||
|
||||
and you will find a list of all the zones of the world.
|
||||
|
||||
[
|
||||
![Set System language default](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/11.png)
|
||||
][45]
|
||||
|
||||
To select your zone, type:
|
||||
|
||||
_ln –s /usr/share/zoneinfo/Asia/Kolkata/etc/localtime_
|
||||
|
||||
or you can select any name from the below list.
|
||||
|
||||
[
|
||||
![](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12.png)
|
||||
][46]
|
||||
|
||||
Set the time standard using the command.
|
||||
|
||||
_hwclock --systohc –utc_
|
||||
|
||||
And the hardware clock is synchronized.
|
||||
|
||||
[
|
||||
![Set time](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/13.png)
|
||||
][47]
|
||||
|
||||
Set the root user password by typing:
|
||||
|
||||
_passwd_
|
||||
|
||||
And press _enter_ . Then type your password and press enter.
|
||||
|
||||
[
|
||||
![Set the root password](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/14.png)
|
||||
][48]
|
||||
|
||||
### Setup hostname and networking
|
||||
|
||||
Enter the host name of the network by typing:
|
||||
|
||||
_nano /etc/hostname_
|
||||
|
||||
and press _enter_ . Now type any name and then press _control + x _ and press _y_ , and press _enter_ .
|
||||
|
||||
[
|
||||
![Set the hostname](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/15.png)
|
||||
][49]
|
||||
|
||||
Enable the dhcpcd by typing:
|
||||
|
||||
_systemctl enable dhcpcd_
|
||||
|
||||
and it will be started at next boot time to fetch an IP address automatically.
|
||||
|
||||
[
|
||||
![Enable dhcpd](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/16.png)
|
||||
][50]
|
||||
|
||||
### Install the Bootloader
|
||||
|
||||
The final step, initiate the grub installation. Type:
|
||||
|
||||
_pacman –S grub os-rober_
|
||||
|
||||
then press _y _ and the download part will begin.
|
||||
|
||||
[
|
||||
![Configure grub](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/17.png)
|
||||
][51]
|
||||
|
||||
Install the grub boot loader to the hard disk by typing:
|
||||
|
||||
_grub-install /dev/sd_
|
||||
|
||||
and configure it:
|
||||
|
||||
_grub-mkconfig –o/ boot/ grub/ grub.cfg_
|
||||
|
||||
[
|
||||
![Install and configure grub boot loader](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/18.png)
|
||||
][52]
|
||||
|
||||
Finally reboot the system by typing:
|
||||
|
||||
_reboot_
|
||||
|
||||
and press _enter._
|
||||
|
||||
[
|
||||
![Reboot the system](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/19.png)
|
||||
][53]
|
||||
|
||||
### Boot into the installed ArchLinux operating system
|
||||
|
||||
Choose “Boot Existing OS” to boot Arch Linux on Virtual Box.
|
||||
|
||||
[
|
||||
![Boot Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/110.png)
|
||||
][54]
|
||||
|
||||
Login with your root name and password, and you will enter your new Arch Linux operating system.
|
||||
|
||||
[
|
||||
![Arch Linux installed successfully](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/111.png)
|
||||
][55]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/
|
||||
|
||||
作者:[Dimitris][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/
|
||||
[1]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#download-arch-linux
|
||||
[2]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#initializing-installation-with-oracle-vm-virtualbox-manager
|
||||
[3]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#partition-the-hard-disk
|
||||
[4]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#bootstrap-arch-linux
|
||||
[5]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#setup-hostname-and-networking
|
||||
[6]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#install-the-bootloader
|
||||
[7]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#boot-into-the-installed-archlinux-operating-system
|
||||
[8]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#arch-linux-repositories
|
||||
[9]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#install-arch-linux-on-virtual-box
|
||||
[10]:https://www.archlinux.org/
|
||||
[11]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/1212.png
|
||||
[12]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12121.png
|
||||
[13]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12122.png
|
||||
[14]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12123.png
|
||||
[15]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12124.png
|
||||
[16]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12125.png
|
||||
[17]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12126.png
|
||||
[18]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12127.png
|
||||
[19]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12128.png
|
||||
[20]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12129.png
|
||||
[21]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121210.png
|
||||
[22]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121211.png
|
||||
[23]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121212.png
|
||||
[24]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121213.png
|
||||
[25]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121214.png
|
||||
[26]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121215.png
|
||||
[27]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121216.png
|
||||
[28]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121217.png
|
||||
[29]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121218.png
|
||||
[30]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121219.png
|
||||
[31]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121220.png
|
||||
[32]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121221.png
|
||||
[33]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121222.png
|
||||
[34]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121223.png
|
||||
[35]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121224.png
|
||||
[36]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121225.png
|
||||
[37]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121226.png
|
||||
[38]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121227.png
|
||||
[39]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121228.png
|
||||
[40]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121229.png
|
||||
[41]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121230.png
|
||||
[42]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121231.png
|
||||
[43]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121232.png
|
||||
[44]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/1.png
|
||||
[45]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/11.png
|
||||
[46]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12.png
|
||||
[47]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/13.png
|
||||
[48]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/14.png
|
||||
[49]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/15.png
|
||||
[50]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/16.png
|
||||
[51]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/17.png
|
||||
[52]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/18.png
|
||||
[53]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/19.png
|
||||
[54]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/110.png
|
||||
[55]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/111.png
|
||||
How to install Arch Linux on VirtualBox
|
||||
============================================================
|
||||
在 VirtualBox 虚拟机中安装 Arch Linux 系统指南
|
||||
|
||||
### 本文导航
|
||||
|
||||
1、[Arch Linux 软件仓库][8]
|
||||
2、[在 VirtualBox 虚拟机中安装 Arch Linux 系统][9]
|
||||
1、[下载 Arch Linux 系统][1]
|
||||
2、[在 Oracle VirtualBox 管理界面初始化安装][2]
|
||||
3、[磁盘分区][3]
|
||||
4、[引导 Arch Linux 启动][4]
|
||||
5、[设置主机名和网络][5]
|
||||
6、[安装引导加载程序][6]
|
||||
7、[启动进入 Arch Linux 系统][7]
|
||||
|
||||
Arch Linux 是专门为 i689 和 86-64 架构的计算机而设计的基于 Linux 内核的操作系统。其特有的软件包管理器使用 “pacman" 命令的完整追踪方式来将系统应用软件升级到最新版本。 Pacman 是一个用于安装、升级和卸载软件包的管理器。这是一款完全免费和开源的软件,由 Linux 开源社区提供支持。
|
||||
|
||||
Arch Linux 也因其丰富的 Wiki 帮助文档而大受推崇。该系统基于二进制的软件包,这些软件包主要是为 i832、64 位和 32 位的系统而开发的,同时也为现代的硬件系统提供最佳的性能优化。
|
||||
|
||||
你可以参考这篇教程直接在你的本地电脑上安装 Arch Linux 系统,或者你也可以使用你的 Windows 电脑中的 VirtualBox 虚拟机来安装。
|
||||
|
||||
### Arch Linux 软件仓库
|
||||
|
||||
要在 VirtualBox 中安装 Arch Linux 系统,你得知道该系统的基础软件仓库。软件仓库用于在安装的过程中获取软件包。对于 Arch Linux 系统来说,有很多可用的软件仓库,可以使用 pacman 工具来进行维护。下面列出的是在 VirtualBox 中安装 Arch Linux 系统时用到的一些基础软件仓库列表:
|
||||
|
||||
* **core ** 软件仓库包括所有的用于对系统进行基本设置的一些软件包,比如启动 Arch Linux 系统和编译软件包。
|
||||
|
||||
* **extra ** 软件仓库包括 core 软件仓库以外的其它软件包以及与桌面环境相关的软件包。
|
||||
|
||||
* **community ** 软件仓库包含的是受信任的 Linux 社区用户采用的软件包,其中的大多数的软件包都会被迁移到核心软件仓库或者额外软件仓库中。
|
||||
|
||||
* **Multilib ** 软件仓库包括 32 位的软件包以及在 64 位操作系统中安装 32 位应用程序的类库。
|
||||
|
||||
* **testing ** 软件仓库包括那些即将成为核心或额外的软件包。
|
||||
|
||||
* **community-testing** 软件仓库主要用于 Linux 社区测试。
|
||||
|
||||
* **multilib testing ** 软件仓库跟测试软件仓库类似,但是它包含多种类型的类库。
|
||||
|
||||
* **gnome-unstable ** 软件仓库包括最新的 GNOME 桌面环境。
|
||||
|
||||
* **kde-unstable ** 软件仓库包括 KDE 最新的发布前的软件包。
|
||||
|
||||
### 在 VirtualBox 虚拟机中安装 Arch Linux 系统
|
||||
|
||||
### 下载 Arch Linux 系统
|
||||
|
||||
要在 VirtualBox 虚拟机中安装 Arch Linux 系统,你最好使用[官网][10]下载的新版 Arch Linux 系统。你可以选择直接下载或是种子方式下载系统文件,这是一个很安全的下载方式。在安装之前,确保你系统中有 20 MB 的剩余空间和 1 GB 的内存。
|
||||
|
||||
[
|
||||
![Download Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/1212.png)
|
||||
][11]
|
||||
|
||||
### 在 Oracle VirtualBox 虚拟机管理界面初始化系统安装
|
||||
|
||||
打开 Oracle VirtualBox 虚拟机管理界面,点击新建,输入你想创建的新系统的名称;这里输入的是 Arch Linux 。系统会自动选择 Arch Linux 的版本和类型,这取决于你的系统配置。单击_下一步_。
|
||||
|
||||
[
|
||||
![Open VirtualBox](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12121.png)
|
||||
][12]
|
||||
|
||||
为你的新系统分配内存,最好是 1024 MB 。单击_下一步_,然后点击_新建_来创建一个虚拟磁盘。
|
||||
|
||||
[
|
||||
![Set RAM size](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12122.png)
|
||||
][13]
|
||||
|
||||
在下一步中,你将会被经询问为新系统选择磁盘类型。通常选择 VirtualBox 磁盘镜像。
|
||||
|
||||
[
|
||||
![Select disk file type](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12123.png)
|
||||
][14]
|
||||
|
||||
选择动态分配,单击_下一步_。
|
||||
|
||||
[
|
||||
![Allocate disk space dynamically](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12124.png)
|
||||
][15]
|
||||
|
||||
分配 20 GB 的硬盘大小及位置
|
||||
|
||||
[
|
||||
![Choose a hard disk size of 20GB](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12125.png)
|
||||
][16]
|
||||
|
||||
现在你可以看到 Arch Linux 系统已创建完成了。点击_开始_。
|
||||
|
||||
[
|
||||
![Start the Virtual Machine](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12126.png)
|
||||
][17]
|
||||
|
||||
单击 ‘浏览’ 然后选择你从官网下载的启动磁盘。
|
||||
|
||||
[
|
||||
![Choose Arch Linux Disk image](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12127.png)
|
||||
][18]
|
||||
|
||||
[
|
||||
![Browse for disk image file](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12128.png)
|
||||
][19]
|
||||
|
||||
点击_启动_,然后打开全屏模式。
|
||||
|
||||
[
|
||||
![Open the full-screen view](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12129.png)
|
||||
][20]
|
||||
|
||||
[
|
||||
![Start the Arch Linux VM](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121210.png)
|
||||
][21]
|
||||
|
||||
### **在 VirtualBox 中启动并安装 Arch Linux 系统**
|
||||
|
||||
你将会看到 Arch Linux 系统第一个打开界面。单击 “启动 Arch Linux (x86_64)”,用于 64 位系统,或者单击”Boot Arch Linux (i686)”,用于 32 位系统。
|
||||
|
||||
[
|
||||
![Choose to boot Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121211.png)
|
||||
][22]
|
||||
|
||||
当你单击第一次选项后,系统将开始启动。实际上只是进入到一个临时启动状态,即进入到 Arch Linux 的自生系统,并以 root 帐号登录了。
|
||||
|
||||
[
|
||||
![Booting into Arch Linux live version](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121212.png)
|
||||
][23]
|
||||
|
||||
输入下面的命令来检查网络连接。
|
||||
|
||||
_ping google.com_
|
||||
|
||||
这个单词 Ping 表示网路封包搜寻。你将会看到下面的返回信息,表明 Arch Linux 已经连接到外网了。这是执行安装过程中的很关键的一点。
|
||||
|
||||
[
|
||||
![Test internet connectivity with ping](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121213.png)
|
||||
][24]
|
||||
|
||||
输入如下命令清屏:
|
||||
|
||||
_clear_
|
||||
|
||||
在开始安装之前,你得先为硬盘分区。输入 _# fdisk – 1 _ ,你将会看到当前系统的磁盘分区情况。注意一开始你给 Arch Linux 系统分配的 20 GB 存储空间。
|
||||
|
||||
[
|
||||
![Partition the harddisk](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121214.png)
|
||||
][25]
|
||||
|
||||
### 硬盘分区
|
||||
|
||||
我们打算把这个 20 GB 的磁盘分成三个分区。第一个主分区为 root 分区,大小为 10 GB 。第二个分区为 swap 分区,大小为内存的两倍,为 2048 MB 。第三个是逻辑分区,大小为 8 GB 。
|
||||
|
||||
[
|
||||
![Create 3 disk partitions](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121215.png)
|
||||
][26]
|
||||
|
||||
输入下面的命令:
|
||||
|
||||
_cfdisk_
|
||||
|
||||
你将看到 gpt , dos , sgi 和 sun 类型,选择 _dos _ 选项,然后按 _enter_ 。
|
||||
|
||||
[
|
||||
![Create a partition of type DOS](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121216.png)
|
||||
][27]
|
||||
|
||||
这里你将看到主磁盘空间,大小为 20 GB 。在剩余空间外按 <enter> 来修改分区大小,输入 10 GB 。
|
||||
|
||||
[
|
||||
![Choose 10GB partition size](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121217.png)
|
||||
][28]
|
||||
|
||||
按 _enter _ 并单击 “主分区” 。
|
||||
|
||||
[
|
||||
![](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121218.png)
|
||||
][29]
|
||||
|
||||
在可引导选项按 Enter 键选择 ”可引导“类型。
|
||||
|
||||
[
|
||||
![Make partition bootable.](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121219.png)
|
||||
][30]
|
||||
|
||||
在 _写入_ 选项按 Enter 键将分区信息写入磁盘。
|
||||
|
||||
[
|
||||
![Write partition to disk](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121220.png)
|
||||
][31]
|
||||
|
||||
之后输入 _yes_ 来应用更改。
|
||||
|
||||
[
|
||||
![Confirm changes](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121221.png)
|
||||
][32]
|
||||
|
||||
现在已经创建完成 10 GB 的分区。单击 _剩余空间_ ,输入分区大小 2048 M 。
|
||||
|
||||
[
|
||||
![Create the 2GB swap partition](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121222.png)
|
||||
][33]
|
||||
|
||||
以同样的方式创建逻辑方式。在 _退出_ 选项按 Enter 键,然后输入下面的命令来清屏:
|
||||
|
||||
_clear_ .
|
||||
|
||||
[
|
||||
![quit cfdisk](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121223.png)
|
||||
][34]
|
||||
|
||||
输入下面的命令来格式化新建的分区:
|
||||
|
||||
_mkfs.ext4 /dev/sda1_
|
||||
|
||||
这里的 _sda1 _ 是分区名。使用同样的命令来格式化第二个分区 sda3 :
|
||||
|
||||
_mkfs.ext4 /dev/sda3_
|
||||
|
||||
格式化 swap 分区:
|
||||
|
||||
_mkswap/dev/sda2_ .
|
||||
|
||||
[
|
||||
![Format the swap partition with mkswap](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121224.png)
|
||||
][35]
|
||||
|
||||
使用下面的命令来激活 swap 分区:
|
||||
|
||||
_swapon/ dev/ sda2_
|
||||
|
||||
输入 clear 命令清屏:
|
||||
|
||||
_clear_ .
|
||||
|
||||
[
|
||||
![Enable swap](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121225.png)
|
||||
][36]
|
||||
|
||||
输入下面的命令来挂载主分区以开始系统安装:
|
||||
|
||||
_mount /dev/ sda1 / mnt._
|
||||
|
||||
[
|
||||
![Mount the partitions](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121226.png)
|
||||
][37]
|
||||
|
||||
### 引导 Arch Linux 启动
|
||||
|
||||
输入下面的命令来引导系统启动:
|
||||
|
||||
_pacstrap /mnt base base-devel_
|
||||
|
||||
可以看到系统正在同步数据包。
|
||||
|
||||
[
|
||||
![Bootstrap Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121227.png)
|
||||
][38]
|
||||
|
||||
几分钟后将会开始安装系统。
|
||||
|
||||
[
|
||||
![Arch Linux installation has been started](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121228.png)
|
||||
][39]
|
||||
|
||||
系统基本软件安装完成后,输入下面的命令来创建 fstab 文件:
|
||||
|
||||
_genfstab /mnt>> /mnt/etc/fstab_
|
||||
|
||||
[
|
||||
![Generating /etc/fstab](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121229.png)
|
||||
][40]
|
||||
|
||||
配置区域、时间和 root 帐号密码。
|
||||
|
||||
输入下面的命令来更改系统的根目录为 Arch Linux 的安装目录:
|
||||
|
||||
_arch-chroot /mnt /bin /bash_
|
||||
|
||||
现在来更改语言配置:
|
||||
|
||||
_nano /etc / local.gen_
|
||||
|
||||
[
|
||||
![Set language in Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121230.png)
|
||||
][41]
|
||||
|
||||
通过删除 # 以及按 _control + x ,按 _y_ ,然后再按 _enter_ 键来选择下面的语言配置:
|
||||
|
||||
[
|
||||
![select language](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121231.png)
|
||||
][42]
|
||||
|
||||
输入下面的命令来激活:
|
||||
|
||||
_locale-gen_
|
||||
|
||||
按 _enter_ 键。
|
||||
|
||||
[
|
||||
![Generate the locales in Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/121232.png)
|
||||
][43]
|
||||
|
||||
使用下面的命令来创建 /etc/locale.conf 配置文件:
|
||||
|
||||
_nano /etc/locale.conf_
|
||||
|
||||
然后按 _enter_ 。现在你就可以在配置文件中输入下面一行内容来为系统添加语言:
|
||||
|
||||
```
|
||||
LANG=en_US.UTF-8
|
||||
```
|
||||
|
||||
然后按 _control + x ,按 _y_ ,再按 _enter_ 。
|
||||
|
||||
[
|
||||
![Set default language](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/1.png)
|
||||
][44]
|
||||
|
||||
输入下面的命令来同步时区:
|
||||
|
||||
ls user/share/zoneinfo_
|
||||
|
||||
下面你将整个世界的时区列表。
|
||||
|
||||
[
|
||||
![Set System language default](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/11.png)
|
||||
][45]
|
||||
|
||||
输入下面的命令来选择你所在的时区:
|
||||
|
||||
_ln –s /usr/share/zoneinfo/Asia/Kolkata/etc/localtime_
|
||||
|
||||
或者你可以从下面的列表中选择其它名称。
|
||||
|
||||
[
|
||||
![](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/12.png)
|
||||
][46]
|
||||
|
||||
使用下面的命令来设置标准时间:
|
||||
|
||||
_hwclock --systohc –utc_
|
||||
|
||||
硬件时钟已同步。
|
||||
|
||||
[
|
||||
![Set time](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/13.png)
|
||||
][47]
|
||||
|
||||
设置 root 帐号密码:
|
||||
|
||||
_passwd_
|
||||
|
||||
按 _enter_ 。 然而输入你想设置的密码,按 enter 键确认。
|
||||
|
||||
[
|
||||
![Set the root password](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/14.png)
|
||||
][48]
|
||||
|
||||
### 设置主机名和网络
|
||||
|
||||
使用下面的命令来设置主机名:
|
||||
|
||||
_nano /etc/hostname_
|
||||
|
||||
然后按 _enter_ 。输入你想设置的主机名称,按 _control + x ,按 _y_ ,再按 _enter_ 。
|
||||
|
||||
[
|
||||
![Set the hostname](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/15.png)
|
||||
][49]
|
||||
|
||||
启用 dhcpcd :
|
||||
|
||||
_systemctl enable dhcpcd_
|
||||
|
||||
这样在下一次系统启动时, dhcpcd 将会自动启动,并自动获取一个 IP 地址:
|
||||
|
||||
[
|
||||
![Enable dhcpd](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/16.png)
|
||||
][50]
|
||||
|
||||
### 安装引导加载程序
|
||||
|
||||
最后一步,输入以下命令来初始化 grub 安装。输入以下命令:
|
||||
|
||||
_pacman –S grub os-rober_
|
||||
|
||||
然后按 _y _ ,将会下载相关程序。
|
||||
|
||||
[
|
||||
![Configure grub](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/17.png)
|
||||
][51]
|
||||
|
||||
使用下面的命令来将启动加载程序安装到硬盘上:
|
||||
|
||||
_grub-install /dev/sd_
|
||||
|
||||
然后进行配置:
|
||||
|
||||
_grub-mkconfig –o/ boot/ grub/ grub.cfg_
|
||||
|
||||
[
|
||||
![Install and configure grub boot loader](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/18.png)
|
||||
][52]
|
||||
|
||||
最后重启系统:
|
||||
|
||||
_reboot_
|
||||
|
||||
然后按 _enter 。_
|
||||
|
||||
[
|
||||
![Reboot the system](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/19.png)
|
||||
][53]
|
||||
|
||||
### 启动进入到已安装完成的 Arch Linux 系统
|
||||
|
||||
选择“启动已存在的操作系统”选项来启动 Virtual Box 虚拟机中的 Arch Linux 系统。
|
||||
|
||||
[
|
||||
![Boot Arch Linux](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/110.png)
|
||||
][54]
|
||||
|
||||
使用 root 帐号和密码登录后,你将进入全新安装好的 Arch Linux 操作系统。
|
||||
|
||||
[
|
||||
![Arch Linux installed successfully](https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/111.png)
|
||||
][55]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/
|
||||
|
||||
译者简介:
|
||||
春城初春/春水初生/春林初盛/春風十裏不如妳
|
||||
|
||||
作者:[Dimitris][a]
|
||||
译者:[rusking](https://github.com/rusking)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/
|
||||
[1]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#download-arch-linux
|
||||
[2]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#initializing-installation-with-oracle-vm-virtualbox-manager
|
||||
[3]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#partition-the-hard-disk
|
||||
[4]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#bootstrap-arch-linux
|
||||
[5]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#setup-hostname-and-networking
|
||||
[6]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#install-the-bootloader
|
||||
[7]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#boot-into-the-installed-archlinux-operating-system
|
||||
[8]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#arch-linux-repositories
|
||||
[9]:https://www.howtoforge.com/tutorial/install-arch-linux-on-virtualbox/#install-arch-linux-on-virtual-box
|
||||
[10]:https://www.archlinux.org/
|
||||
[11]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/1212.png
|
||||
[12]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12121.png
|
||||
[13]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12122.png
|
||||
[14]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12123.png
|
||||
[15]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12124.png
|
||||
[16]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12125.png
|
||||
[17]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12126.png
|
||||
[18]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12127.png
|
||||
[19]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12128.png
|
||||
[20]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12129.png
|
||||
[21]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121210.png
|
||||
[22]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121211.png
|
||||
[23]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121212.png
|
||||
[24]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121213.png
|
||||
[25]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121214.png
|
||||
[26]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121215.png
|
||||
[27]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121216.png
|
||||
[28]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121217.png
|
||||
[29]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121218.png
|
||||
[30]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121219.png
|
||||
[31]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121220.png
|
||||
[32]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121221.png
|
||||
[33]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121222.png
|
||||
[34]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121223.png
|
||||
[35]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121224.png
|
||||
[36]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121225.png
|
||||
[37]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121226.png
|
||||
[38]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121227.png
|
||||
[39]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121228.png
|
||||
[40]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121229.png
|
||||
[41]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121230.png
|
||||
[42]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121231.png
|
||||
[43]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/121232.png
|
||||
[44]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/1.png
|
||||
[45]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/11.png
|
||||
[46]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/12.png
|
||||
[47]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/13.png
|
||||
[48]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/14.png
|
||||
[49]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/15.png
|
||||
[50]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/16.png
|
||||
[51]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/17.png
|
||||
[52]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/18.png
|
||||
[53]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/19.png
|
||||
[54]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/110.png
|
||||
[55]:https://www.howtoforge.com/images/install_arch_linux_on_virtual_box/big/111.png
|
@ -0,0 +1,244 @@
|
||||
|
||||
|
||||
在Ubuntu上使用SSL/TLS搭建一个安全的FTP服务器
|
||||
============================================================
|
||||
|
||||
立即下载你的免费电子书 - [10本免费的Linux管理员电子书][13] | [4本免费的shell脚本电子书][14]
|
||||
|
||||
在本教程中,我们将介绍如何使用Ubuntu 16.04 / 16.10中的SSL / TLS保护FTP服务器(VSFTPD代表“非常安全的FTP守护进程”)。
|
||||
|
||||
如果你想为基于CentOS的发行版安装一个安全的FTP服务器,你可以阅读 – [在CentOS上使用SSL / TLS保护FTP服务器][2]
|
||||
|
||||
在遵循本指南中的各个步骤之后,我们将了解在FTP服务器中启用加密服务的基本原理,以确保安全的数据传输至关重要。
|
||||
|
||||
|
||||
####要求
|
||||
|
||||
1. 你必须 [在Ubuntu上安装和配置一个FTP服务器][1]
|
||||
|
||||
在我们进行下一步之前,确保本文中的所有命令都将以root身份运行或者
|
||||
Before we move further, make sure that all commands in this article will be run as root or [sudo特权账号][3].
|
||||
|
||||
### 第一步:在Ubuntu上为FTP生成SSL/TLS证书
|
||||
1.我们将首先在/etc/ssl/下创建一个子目录,来存储SSL/TLS证书和密钥文件,如果它不存在:
|
||||
|
||||
```
|
||||
$ sudo mkdir /etc/ssl/private
|
||||
```
|
||||
|
||||
2. 现在我们在这个单一的文件中生成证书和密钥,通过运行下面的命令。
|
||||
|
||||
```
|
||||
$ sudo openssl req -x509 -nodes -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem -days 365 -newkey rsa:2048
|
||||
```
|
||||
|
||||
上面的命令将提示你回答以下问题,不要忘了输入合适于脚本的值。
|
||||
```
|
||||
Country Name (2 letter code) [XX]:IN
|
||||
State or Province Name (full name) []:Lower Parel
|
||||
Locality Name (eg, city) [Default City]:Mumbai
|
||||
Organization Name (eg, company) [Default Company Ltd]:TecMint.com
|
||||
Organizational Unit Name (eg, section) []:Linux and Open Source
|
||||
Common Name (eg, your name or your server's hostname) []:tecmint
|
||||
Email Address []:admin@tecmint.com
|
||||
```
|
||||
|
||||
### 第二步:在Ubuntu上配置VSFTPD来使用SSL/TLS
|
||||
|
||||
3.在我们进行VSFTPD配置之前,对于[UFW防火墙已启用][4]的用户,你们必须打开端口990和40000-50000,来允许在VSFTD配置文件中分别设置TLS连接和被动端口的端口范围:
|
||||
```
|
||||
$ sudo ufw allow 990/tcp
|
||||
$ sudo ufw allow 40000:50000/tcp
|
||||
$ sudo ufw status
|
||||
```
|
||||
|
||||
4. 现在,打开VSFTPD配置文件并定义SSL详细信息:
|
||||
|
||||
```
|
||||
$ sudo vi /etc/vsftpd/vsftpd.conf
|
||||
OR
|
||||
$ sudo nano /etc/vsftpd/vsftpd.conf
|
||||
```
|
||||
|
||||
然后,添加或定位选项`ssl_enable`并将它的值设置为YES来激活SSL的使用,同样,因为TLS比SSL更安全,我们将通过启用`ssl_tlsv1`选项限制VSFTPD使用TLS:
|
||||
|
||||
|
||||
```
|
||||
ssl_enable=YES
|
||||
ssl_tlsv1=YES
|
||||
ssl_sslv2=NO
|
||||
ssl_sslv3=NO
|
||||
```
|
||||
|
||||
5. 接下来,使用`#`字符注释掉下面的行,如下所示:
|
||||
|
||||
```
|
||||
#rsa_cert_file=/etc/ssl/private/ssl-cert-snakeoil.pem
|
||||
#rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
|
||||
```
|
||||
|
||||
然后,添加以下行以定义SSL证书和密钥文件的位置:
|
||||
|
||||
```
|
||||
rsa_cert_file=/etc/ssl/private/vsftpd.pem
|
||||
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
|
||||
```
|
||||
|
||||
6.现在,我们也可以阻止匿名的用户使用SSL登陆,并且迫使所有的非匿名登陆使用一个安全的SSL链接来传输数据,而且在登陆的期间发送密码:
|
||||
|
||||
```
|
||||
allow_anon_ssl=NO
|
||||
force_local_data_ssl=YES
|
||||
force_local_logins_ssl=YES
|
||||
```
|
||||
|
||||
7.此外,我们可以使用以下选项在FTP服务器中添加更多的安全功能 。使用选项`require_ssl_reuse=YES`,所用的SSL数据链接都需要展示SSL会话重用;证明他们知道和控制信道相同的主秘密。所以,我们应该禁用它。
|
||||
|
||||
|
||||
```
|
||||
require_ssl_reuse=NO
|
||||
```
|
||||
|
||||
此外,我们可以设置VSFTPD允许使用`ssl_ciphers`选项进行加密SSL连接的SSL密码。 这将有助于挫败攻击者的任何努力尝试强制得到一个特定的密码,来发现的漏洞:
|
||||
|
||||
```
|
||||
ssl_ciphers=HIGH
|
||||
```
|
||||
|
||||
|
||||
8. 然后,我们定义被动端口的端口范围(最小和最大端口)。
|
||||
|
||||
```
|
||||
pasv_min_port=40000
|
||||
pasv_max_port=50000
|
||||
```
|
||||
|
||||
9. 要启用SSL调试,意味着openSSL连接诊断记录到VSFTPD日志文件,我们可以使用`debug_ssl`选项:
|
||||
```
|
||||
debug_ssl=YES
|
||||
```
|
||||
|
||||
最后,保存文件并且关闭它。然后重启VSFTPD服务:
|
||||
|
||||
```
|
||||
$ systemctl restart vsftpd
|
||||
```
|
||||
|
||||
### 第三步:在Ubuntu上使用SSL / TLS连接验证FTP
|
||||
|
||||
10. 执行所有上述配置后,通过尝试[使用命令行中的FTP] [5]测试VSFTPD是否现在使用SSL / TLS连接,如下所示。
|
||||
|
||||
从下面的输出来看,这里有一个错误的信息告诉我们VSFTPD仅允许用户(非匿名用户)从支持加密服务的安全客户端登陆。
|
||||
|
||||
|
||||
```
|
||||
$ ftp 192.168.56.10
|
||||
Connected to 192.168.56.10 (192.168.56.10).
|
||||
220 Welcome to TecMint.com FTP service.
|
||||
Name (192.168.56.10:root) : ravi
|
||||
530 Non-anonymous sessions must use encryption.
|
||||
Login failed.
|
||||
421 Service not available, remote server has closed connection
|
||||
ftp>
|
||||
```
|
||||
|
||||
这个命令行不支持加密服务从而导致了上述错误。因此,要安全连接到启用了加密服务的FTP服务器,我们需要一个默认支持SSL/TLS连接的FTP客户端,例如FileZilla。
|
||||
|
||||
### 第四步:在客户端上安装FileZillaStep来安全地连接FTP
|
||||
|
||||
FileZilla是一个强大的,广泛使用的跨平台FTP客户端,支持在SSL/TLS上的FTP。为了在Linux客户端机器上安装FileZilla,使用下面的命令。
|
||||
|
||||
```
|
||||
--------- On Debian/Ubuntu ---------
|
||||
$ sudo apt-get install filezilla
|
||||
--------- On CentOS/RHEL/Fedora ---------
|
||||
# yum install epel-release filezilla
|
||||
--------- On Fedora 22+ ---------
|
||||
$ sudo dnf install filezilla
|
||||
```
|
||||
|
||||
12. 一旦安装完成,打开它然后点击File=>Sites Manager或者(按Ctrl+S)来获取下面的Site Manager。
|
||||
|
||||
[
|
||||
![Filezilla Site Manager](http://www.tecmint.com/wp-content/uploads/2017/02/Filezilla-Site-Manager.png)
|
||||
][6]
|
||||
|
||||
Filezilla Site Manager
|
||||
|
||||
13. 现在,定义主机/站点名字,添加IP地址,定义使用的协议,加密和登陆类型,如下面的屏幕(使用适用于你方案的值):
|
||||
|
||||
点击New Site按钮来配置一个新的站点/主机连接。
|
||||
|
||||
```
|
||||
Host: 192.168.56.10
|
||||
Protocol: FTP – File Transfer Protocol
|
||||
Encryption: Require explicit FTP over #recommended
|
||||
Logon Type: Ask for password #recommended
|
||||
User: username
|
||||
```
|
||||
[
|
||||
![在Filezilla上配置新的FTP站点](http://www.tecmint.com/wp-content/uploads/2017/02/Configure-New-FTP-Site-on-Filezilla.png)
|
||||
][7]
|
||||
|
||||
在Filezilla上配置新的FTP站点
|
||||
|
||||
14. 然后从上面的界面单击连接以输入密码,然后验证用于SSL / TLS连接的证书,并再次单击确定以连接到FTP服务器:
|
||||
[
|
||||
![验证FTP的SSL证书](http://www.tecmint.com/wp-content/uploads/2017/02/Verify-FTP-SSL-Certificate-1.png)
|
||||
][8]
|
||||
|
||||
验证FTP的SSL证书
|
||||
|
||||
15.现在,你应该通过TLS连接成功地登陆到FTP服务器,检查连接状态部分,来获取有关下面接口的更多信息。
|
||||
|
||||
[
|
||||
![连接Ubuntu的FTP服务器](http://www.tecmint.com/wp-content/uploads/2017/02/Connected-Ubuntu-FTP-Server.png)
|
||||
][9]
|
||||
|
||||
连接Ubuntu的FTP服务器
|
||||
|
||||
16. 最后,让我们[从本地的机器传送文件到FTP服务器][10]在文件夹中, 查看FileZilla接口的下端来查看有关文件传输的报告。
|
||||
|
||||
[
|
||||
![使用Filezilla安全的传输FTP文件](http://www.tecmint.com/wp-content/uploads/2017/02/Transfer-Files-Securely-using-FTP.png)
|
||||
][11]
|
||||
|
||||
使用Filezilla安全的传输FTP文件
|
||||
|
||||
就这样! 始终记住,安装FTP服务器而不启用加密服务具有某些安全隐患。 正如我们在本教程中解释的,您可以配置FTP服务器使用SSL / TLS连接来实现Ubuntu 16.04 / 16.10中的安全性。
|
||||
|
||||
如果你在FTP服务器上设置SSL/TLS遇到任何问题,请使用以下注释表单来分享您对本教程/主题的问题或想法。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
作者简介:
|
||||
|
||||
Aaron Kili是Linux和F.O.S.S爱好者,即将推出的Linux SysAdmin网络开发人员,目前是TecMint的内容创作者,他喜欢与电脑合作,并坚信分享知识。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/secure-ftp-server-using-ssl-tls-on-ubuntu/
|
||||
|
||||
作者:[Aaron Kili][a]
|
||||
译者:[译者ID](https://github.com/DockerChen)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/aaronkili/
|
||||
|
||||
[1]:http://www.tecmint.com/install-ftp-server-in-ubuntu/
|
||||
[2]:http://www.tecmint.com/axel-commandline-download-accelerator-for-linux/
|
||||
[3]:http://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/
|
||||
[4]:http://www.tecmint.com/how-to-install-and-configure-ufw-firewall/
|
||||
[5]:http://www.tecmint.com/sftp-command-examples/
|
||||
[6]:http://www.tecmint.com/wp-content/uploads/2017/02/Filezilla-Site-Manager.png
|
||||
[7]:http://www.tecmint.com/wp-content/uploads/2017/02/Configure-New-FTP-Site-on-Filezilla.png
|
||||
[8]:http://www.tecmint.com/wp-content/uploads/2017/02/Verify-FTP-SSL-Certificate-1.png
|
||||
[9]:http://www.tecmint.com/wp-content/uploads/2017/02/Connected-Ubuntu-FTP-Server.png
|
||||
[10]:http://www.tecmint.com/sftp-command-examples/
|
||||
[11]:http://www.tecmint.com/wp-content/uploads/2017/02/Transfer-Files-Securely-using-FTP.png
|
||||
[12]:http://www.tecmint.com/author/aaronkili/
|
||||
[13]:http://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/
|
||||
[14]:http://www.tecmint.com/free-linux-shell-scripting-books/
|
65
translated/tech/20170307 How to make release notes count.md
Normal file
65
translated/tech/20170307 How to make release notes count.md
Normal file
@ -0,0 +1,65 @@
|
||||
如何写出绝佳的发行说明
|
||||
============================================================
|
||||
|
||||
![如何写出绝佳的发行说明](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/rh_003784_02_os.comcareers_resume_rh1x.png?itok=CK6VJq5w "How to make release notes count")
|
||||
|
||||
*图像来源: opensource.com*
|
||||
|
||||
恭喜!你已经准备发布你的软件包的最新版本了。现在,你需要保证你的发行说明整洁有序。当然,你可以写上“bug 修复以及性能改进”然后就算完成,但这并不能给你的用户传达任何信息。
|
||||
|
||||
发行说明同时用于支持和营销。它可以告诉你的的用户,为什么这个发布版本对他们很重要,并可以向潜在用户展示你的软件。所以,你会希望它的内容简洁、易懂,最重要的是:目的明确。写发行说明的方式不止一种,所以本文只是一般提议,并不是一个强制要求。
|
||||
|
||||
现在一个流行的趋势,是将发行说明写成包含一堆愚蠢事的叙事文。如果你想这么写,那请自便 —— 不过要记住,笑话通常是上下文相关的,你觉得很滑稽的内容,可能在你的读者眼里会变得索然无味。而且,不要忘了将那些重要信息写进来。
|
||||
|
||||
### 入门
|
||||
|
||||
你能从本文里学到的最主要的经验,可能就是这一条:你的发行说明要写给读它的人看。对于面向用户的软件,发行说明中要注重面向用户的行为,而不是软件的内部实现。举个例子:写“点击‘取消’按钮会把你的电脑点着”,而不要写“在 cancelThatThing 函数中,thermalEventTrigger 的默认值被设为 True”。
|
||||
|
||||
尝试将每一条说明限制在一到两句话。重点在于突出强调重要部分,而不是给出详尽的解释。如果你有一个公开的问题追踪页面,你可以在说明中包含问题链接(或者问题编号),这样关注此问题的读者可以通过链接来查看问题的详细内容。
|
||||
|
||||
你并不需要严格按照这种方法来写发行说明,但我比较喜欢下面的格式。开头写上版本号,以及发布日期。对于主要版本,你可能要再写几句话,来突出本次发布的主题。比如,“本次发布的重点在于添加了邮件客户端,因为这是所有软件的最终结束状态。”
|
||||
|
||||
### 兼容性更改
|
||||
|
||||
如果新版本中包含兼容性或默认行为的变更,你最好将它们着重写出。你的用户、以及提供用户支持的人会感谢你的。在发行说明中描述会遇到行为变更的场景,如何处理变更,以及如果用户对变更不采取行动会导致的后果。对于某些次要版本,你可能没有任何会导致不兼容的变更,那你可以省略此部分。
|
||||
|
||||
### 功能及改进
|
||||
"
|
||||
现在,你该炫耀你的软件包含的那些酷的、新奇的东西了,但是要记得站在用户的角度来写。比如,“该软件现在支持自动发现午餐照片,并将其发布到 Instagram 上。”
|
||||
|
||||
### 已解决的问题
|
||||
|
||||
没有软件是完美的,所以在这部分中你需要告诉读者,你的团队为了使这个项目更好一点而做的所有努力工作。因为那些不好的行为已经被解决了,所以应该用过去式来写这一部分。如果某个 bug 的产生原因很明确,写上相关信息。一些项目还在文档此节中包含修复的 bug。
|
||||
|
||||
### 已知问题
|
||||
|
||||
因为没有软件是完美的,所以永远会存在未解决的 bug。在这一节中,你需要列出这些已知的问题。你不需要列出所有的问题;主要是影响功能的错误,尤其是那些在上个版本发布后发现的 bug。这一部分的文字用将来时态写出。当你把这些问题解决,你只需要改变动词的时态,然后把它们移到上个部分即可。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
作者简介:
|
||||
|
||||
Ben Cotten - Ben Cotten 是一个受过专业训练的气象学家,但他现在是一位高性能计算工程师。Ben 是一位[循环计算][5]领域的布道者。他是 Fedora 的用户及贡献者,与他人一同创办了一个本地开源会议组,是开源计划的成员,还是软件自由保护的支持者。你可以在 Twitter 上找到他(@FunnelFiasco)。
|
||||
|
||||
--------------
|
||||
|
||||
译者简介:
|
||||
|
||||
[StdioA](https://www.stdioa.com/) —— Pythoner, Player.
|
||||
|
||||
--------------
|
||||
|
||||
via: https://opensource.com/article/17/3/how-to-improve-release-notes
|
||||
|
||||
作者:[Ben Cotton][a]
|
||||
译者:[StdioA](https://github.com/StdioA)
|
||||
校对:[jasminepeng](https://github.com/jasminepeng)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://opensource.com/users/bcotton
|
||||
[1]:https://opensource.com/article/17/3/how-to-improve-release-notes?rate=81ry_1MGfmsPXV6_y_4St2DQI4XyJAqIzs4yTNtUrpA
|
||||
[2]:https://opensource.com/user/30131/feed
|
||||
[3]:https://opensource.com/article/17/3/how-to-improve-release-notes#comments
|
||||
[4]:https://opensource.com/users/bcotton
|
||||
[5]:https://cyclecomputing.com/
|
@ -0,0 +1,36 @@
|
||||
###Debian 是什么?一个关于 Debian 的简介
|
||||
|
||||
大家好!!
|
||||
|
||||
今天给大家带来点有意思的东西。我们准备给大家仔细讲讲 Linux 世界里的东西。
|
||||
|
||||
想必你们对[Linux 是什么?一个关于 Linux 的简介][2]和[怎么在 Linux 下用 screenlets 工具来安装一些桌面小程序][1]这两篇文章也感趣。这篇文章就当是这一系列的文章的第一部分。来给大家讲讲 Debian 这个 Linux 发行版。作为 Linux 的第一个发行版,Debian 是在1993年才初步发行的。Debian 这个名字是由 Debian 发行版的创作者给起的,这俩人是夫妻,男的叫 Ian Murdock 女的叫 Debra。
|
||||
|
||||
Debian 是个庞大的开源软件包的集合体。说 Debian 是开源软件包的集合,其实它也支持一些非自由软件包,不过相对来说 Debian 软件包集合里大部分是开源的。根据 Debian 的官方数据统计,Debian 库里总共囊括了37500个自由软件包。这些软件都是由 Debian 官方免费提供的。目前全世界大概有一千多人在为打造一个更好的 Debian 发行版努力。
|
||||
|
||||
目前为止 Debian 最新的稳定发行版是 7.5 命名为 Wheezy 。给开发测试用的最新的测试发行版 8.0 也出来了,命令为 Jesse 。Debian 发行版默认使用 Gnome 做为桌面环境。当然也不是只有 Gnome ,KDE 、Xfce 和 LXDE 这些桌面环境都是可选的。因为 Debian 的安装工具是可视化的图形界面,所以安装 Debian 这事很易容完成。
|
||||
|
||||
Debian 是一个稳健而且安全性高的操作系统。Debian 支持决大部分的架构的硬件平台,所以你们不用担心它能不能在你的PC上运行。另外你是不是要问驱动怎么办?想知道从哪里可以找到能跟你的 Debian 想匹配的驱动。这些问题都不需要太担心,Debian 社区已经把决大部分的现有新老设备的驱动准备好了。这样一来你也不用再等设备生产商给你制作相应的设备驱动了。还有更牛逼的一点就是,这些驱动都是开源的,都是可以免费获取的。
|
||||
|
||||
Debian 是由一个社区来维护的,就管它叫 Debian社区吧。因为有了这个社区,你可以相信你在使用 Debian 过程种遇到的问题肯定是可以在社区里找到其它用户来给你提供解决办法的。Debian 软件库里有大把的软件供你选择,而且都是免费的。Debian 是一个功能强大的操作系统。它具备稳定、高效、安全的特性,另外它的用户界面是一个友好的图形界面,所以它易用性也很强。
|
||||
|
||||
我们一般所说的稳定,是指这个系统极少出现崩溃或者挂死现象,还能兼顾高效率。Debian 正是这种系统的代表。Debian 的升级也相当容易实现。Debian 团队已经把软件库里的众多软件件源码包编译好,所以我们可以轻松的找到我们想要的软件,并且安装到咱们的系统里。
|
||||
|
||||
不管怎么说,Debian 诞生到现在已经有20个年头了。能持续到现在,说明了 Debian 团队一直在为给用户提供一最好的发行版而不懈努力着。Debian 可以通过购买DVD的方式进行安装,也可以直接在网上下载ISO镜像来进行安装。所以我们推荐你试一下 Debian。它可以给你提供非常多的东西。
|
||||
|
||||
Debian 是我们“介绍 Linux 世界”系列里的第一个内容。我们会接下来会给你们介绍另外一个 Linux 发行版。保持关注哦,后面还有更多内容在我们“Linux 世界”栏目。到时候再见咯。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.techphylum.com/2014/05/what-is-debian-brief-introduction.html
|
||||
|
||||
作者:[sumit rohankar ][a]
|
||||
译者:[zschong](https://github.com/zschong)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/112160169713374382262
|
||||
[1]:http://www.techphylum.com/2014/05/desktop-gadgets-in-linux-ubuntu.html
|
||||
[2]:http://www.techphylum.com/2014/05/what-is-linux-brief-description.html?m=1
|
Loading…
Reference in New Issue
Block a user