diff --git a/published/20191120 How to Use TimeShift to Backup and Restore Ubuntu Linux.md b/published/20191120 How to Use TimeShift to Backup and Restore Ubuntu Linux.md new file mode 100644 index 0000000000..e40aebfa8d --- /dev/null +++ b/published/20191120 How to Use TimeShift to Backup and Restore Ubuntu Linux.md @@ -0,0 +1,155 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11619-1.html) +[#]: subject: (How to Use TimeShift to Backup and Restore Ubuntu Linux) +[#]: via: (https://www.linuxtechi.com/timeshift-backup-restore-ubuntu-linux/) +[#]: author: (James Kiarie https://www.linuxtechi.com/author/james/) + +如何使用 TimeShift 备份和还原 Ubuntu Linux +====== + +你是否曾经想过如何备份和还原 Ubuntu 或 Debian 系统?Timeshift 是一款自由开源工具,可让你创建文件系统的增量快照。你可以使用 RSYNC 或 BTRFS 两种方式创建快照。 + +![](https://img.linux.net.cn/data/attachment/album/201911/27/235959fejmb080e7z0jnu0.jpg) + +让我们深入研究并安装 Timeshift。在本教程,我们将安装在 Ubuntu 18.04 LTS 系统上。 + +### 在 Ubuntu / Debian Linux 上安装 TimeShift + +TimeShift 尚未正式托管在 Ubuntu 和 Debian 仓库中。考虑到这一点,我们将运行以下命令来添加 PPA: + +``` +# add-apt-repository -y ppa:teejee2008/ppa +``` + +![Add timeshift repository][3] + +接下来,使用以下命令更新系统软件包: + +``` +# apt update +``` + +成功更新系统后,使用以下 `apt` 命令安装 Timeshift: + +``` +# apt install timeshift +``` + +![apt install timeshift][4] + +### 准备备份存储设备 + +最佳实践要求我们将系统快照保存在系统硬盘之外的单独的存储卷上。对于本指南,我们将使用 16GB 闪存作为第二个驱动器,并在该驱动器上保存快照。 + +``` +# lsblk | grep sdb +``` + +![lsblk sdb ubuntu][5] + +为了将闪存用作快照的备份位置,我们需要在设备上创建一个分区表。运行以下命令: + +``` +# parted /dev/sdb mklabel gpt +# parted /dev/sdb mkpart primary 0% 100% +# mkfs.ext4 /dev/sdb1 +``` + +![create partition table on drive ubuntu][6] + +在 USB 闪存上创建分区表后,我们可以开始创建文件系统的快照! + +### 使用 Timeshift 创建快照 + +要启动 Timeshift,使用应用程序菜单搜索 “Timeshift”。 + +![Access timeshift][7] + +单击 Timeshift 图标,系统将提示你输入管理员密码。提供密码,然后单击验证。 + +![Authentication required][8] + +接下来,选择你喜欢的快照类型。 + +![Select rsync option][9] + +点击 “Next”。选择快照的目标驱动器。在这里,我的位置是标记为 `/dev/sdb` 的外部 USB 驱动器。 + +![Select snapshot location][10] + +接下来,定义快照级别。级别是指创建快照的时间间隔。你可以选择每月、每周、每天或每小时的快照级别。 + +![Select snapshot levels][11] + +点击 “Finish”。 + +在下一个窗口中,单击 “Create” 按钮开始创建快照。此后,系统将开始创建快照。 + +![Create snapshot][12] + +最后,你的快照将显示如下: + +![Snapshot created][13] + +### 从快照还原 Ubuntu / Debian + +创建系统快照后,现在让我们看看如何从同一快照还原系统。在同一个 Timeshift 中,单击快照,然后单击 “Restore” 按钮,如图所示。 + +![Restore snapshot][14] + +接下来,将提示你选择目标设备。保留默认选择,然后点击 “Next”。 + +![Select target device][15] + +恢复过程开始之前,Timeshift 将会试运行。 + +![Comparing files dry run][16] + +在下一个窗口中,点击 “Next” 按钮确认显示的操作。 + +![Confirm actions][17] + +如图所示,你会看到警告和免责声明。点击 “Next” 初始化恢复过程。 + +此后,将开始还原过程,最后,系统之后将重新启动到快照定义的早期版本。 + +![Restoring snapshot][18] + +### 总结 + +如你所见,使用 TimeShift 从快照还原系统非常容易。在备份系统文件时,它非常方便,并允许你在系统故障时进行恢复。因此,不要害怕修改系统或弄乱系统。TimeShift 使你能够返回到一切运行平稳的时间点。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/timeshift-backup-restore-ubuntu-linux/ + +作者:[James Kiarie][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/james/ +[b]: https://github.com/lujun9972 +[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[2]: https://www.linuxtechi.com/wp-content/uploads/2019/11/TimeShift-Backup-Restore-Tool-Ubuntu.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Add-timeshift-repository.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2019/11/apt-install-timeshift.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2019/11/lsblk-sdb-ubuntu.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2019/11/create-partition-table-on-drive-ubuntu.jpg +[7]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Access-Timeshift-Ubuntu.jpg +[8]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Authentication-required-ubuntu.jpg +[9]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Select-Rsync-option-timeshift.jpg +[10]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Select-snapshot-location.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Select-snapshot-levels-Timeshift.jpg +[12]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Create-snapshot-timeshift.jpg +[13]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Snapshot-created-TimeShift.jpg +[14]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Restore-snapshot-timeshift.jpg +[15]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Select-target-device-timeshift.jpg +[16]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Comparing-files-Dry-Run-timeshift.jpg +[17]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Confirm-actions-timeshift.jpg +[18]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Restoring-snapshot-timeshift.png diff --git a/sources/tech/20190602 How to Install LEMP (Linux, Nginx, MariaDB, PHP) on Fedora 30 Server.md b/sources/tech/20190602 How to Install LEMP (Linux, Nginx, MariaDB, PHP) on Fedora 30 Server.md index e3a533b3b2..cc749f3877 100644 --- a/sources/tech/20190602 How to Install LEMP (Linux, Nginx, MariaDB, PHP) on Fedora 30 Server.md +++ b/sources/tech/20190602 How to Install LEMP (Linux, Nginx, MariaDB, PHP) on Fedora 30 Server.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20191125 How to Install Ansible (Automation Tool) on CentOS 8-RHEL 8.md b/sources/tech/20191125 How to Install Ansible (Automation Tool) on CentOS 8-RHEL 8.md index 973fff72c6..44def2d57b 100644 --- a/sources/tech/20191125 How to Install Ansible (Automation Tool) on CentOS 8-RHEL 8.md +++ b/sources/tech/20191125 How to Install Ansible (Automation Tool) on CentOS 8-RHEL 8.md @@ -7,41 +7,42 @@ [#]: via: (https://www.linuxtechi.com/install-ansible-centos-8-rhel-8/) [#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) -How to Install Ansible (Automation Tool) on CentOS 8/RHEL 8 +如何在 CentOS 8/RHEL 8 上安装 Ansible(自动化工具) ====== -**Ansible** is an awesome automation tool for Linux sysadmins. It is an open source configuration tool which allows sysadmins to manage hundreds of servers from one centralize node i.e **Ansible Server**. Ansible is the preferred configuration tool when it is compared with similar tools like **Puppet**, **Chef** and **Salt** because it doesn’t need any agent and it works on SSH and python. +**Ansible** 是给 Linux 系统管理员使用的出色自动化工具。它是一种开源配置工具,能让系统管理员可以从一个中心节点(即 **Ansible 服务器**)管理数百台服务器。将 Ansible 与 **Puppet**、**Chef** 和 **Salt**等类似工具进行比较时,它是首选的配置工具,因为它不需要任何代理,并且可以工作在 SSH 和 python 上。 [![Install-Ansible-CentOS8-RHEL8][1]][2] -In this tutorial we will learn how to install and use Ansible on CentOS 8 and RHEL 8 system +在本教程中,我们将学习如何在 CentOS 8 和 RHEL 8 系统上安装和使用 Ansble -Ansible Lab Details: +Ansible 实验环境信息: - * Minimal CentOS 8 / RHEL 8 Server (192.168.1.10) with Internet Connectivity - * Two Ansible Nodes – Ubuntu 18.04 LTS (192.168.1.20) & CentOS 7 (192.168.1.30) + * Minimal CentOS 8 / RHEL 8 服务器(192.168.1.10),且有互联网连接 + * 两个 Ansible 节点 - Ubuntu 18.04 LTS (192.168.1.20) 和 CentOS 7 (192.168.1.30) -### Ansible Installation steps on CentOS 8  +### CentOS 8 上的 Ansible 安装步骤 -Ansible package is not available in default CentOS 8 package repository. so we need to enable [EPEL Repository][3] by executing the following command, + +Ansible 包不在 CentOS 8 默认的软件包仓库中。因此,我们需要执行以下命令启用 [EPEL 仓库][3], ``` [root@linuxtechi ~]$ sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y ``` -Once the epel repository is enabled, execute the following dnf command to install Ansible +启用 epel 仓库后,执行以下 dnf 命令安装 Ansble。 ``` [root@linuxtechi ~]$ sudo dnf install ansible ``` -Output of above command : +上面命令的输出: ![dnf-install-ansible-centos8][1] -Once the ansible is installed successfully, verify its version by running the following command +成功安装 ansible 后,运行以下命令验证它的版本。 ``` [root@linuxtechi ~]$ sudo ansible --version @@ -49,39 +50,39 @@ Once the ansible is installed successfully, verify its version by running the fo ![Ansible-version-CentOS8][1] -Above output confirms that Installation is completed successfully on CentOS 8. +上面的输出确认在 CentOS 8 上安装完成。 -Let’s move to RHEL 8 system +让我们看下 RHEL 8 系统。 -### Ansible Installation steps on RHEL 8 +### RHEL 8 上的 Ansible 安装步骤 -If you have a valid RHEL 8 subscription then use following subscription-manager command to enable Ansible Repo, +如果你有有效的 RHEL 8 订阅,请使用以下订阅管理器命令启用 Ansble 仓库, ``` [root@linuxtechi ~]$ sudo subscription-manager repos --enable ansible-2.8-for-rhel-8-x86_64-rpms ``` -Once the repo is enabled then execute the following dnf command to install Ansible, +启用仓库后,执行以下 dnf 命令安装 Ansible, ``` [root@linuxtechi ~]$ sudo dnf install ansible -y ``` -Once the ansible and its dependent packages are installed then verify ansible version by executing the following command, +安装 ansible 及其依赖包后,执行以下命令来验证它的版本, ``` [root@linuxtechi ~]$ sudo ansible --version ``` -### Alternate Way to Install Ansible via pip3 on CentOS 8 / RHEL 8 +### 在 CentOS 8 / RHEL 8 上通过 pip3 安装 Ansible 的可选方法 -If you wish to install Ansible using **pip** (**python’s package manager**) then first install pyhton3 and python3-pip packages using following command, +如果你希望使用 **pip**(python 的包管理器)安装 Ansible,请首先使用以下命令安装 pyhton3 和 python3-pip 包, ``` [root@linuxtechi ~]$ sudo dnf install python3 python3-pip -y ``` -After pyhthon3 installation, verify its version by running +安装 python3 后,运行以下命令来验证它的版本。 ``` [root@linuxtechi ~]$ python3 -V @@ -89,23 +90,23 @@ Python 3.6.8 [root@linuxtechi ~]$ ``` -Now run below pip3 command to install Ansible, +命令下面的 pip3 命令安装 Ansible, ``` [root@linuxtechi ~]$ pip3 install ansible --user ``` -Output, +输出, ![Ansible-Install-pip3-centos8][1] -Above output confirms that Ansible has been installed successfully using pip3. Let’s see how we can use Ansible +上面的输出确认 Ansible 已成功使用 pip3 安装。让我们看下如何使用 Ansible。 -### How to Use Ansible Automation Tool? +### 如何使用 Ansible 自动化工具? -When we install Ansible using yum or dnf command then its configuration file, inventory file and roles directory created automatically under /etc/ansible folder. +当我们使用 yum 或 dnf 命令安装 Ansible 时,它的配置文件、清单文件和角色目录会自动在 /etc/ansible 文件夹下创建。 -So, let’s add a group with name “**labservers**” and under this group add ubuntu 18.04 and CentOS 7 System’s ip address in **/etc/ansible/hosts** file +让我们添加一个名称为 “**labservers**” 的组,并在 **/etc/ansible/hosts** 文件中给该组添加 Ubuntu 18.04 和 CentOS 7 的系统 IP 地址。 ``` [root@linuxtechi ~]$ sudo vi /etc/ansible/hosts @@ -116,9 +117,10 @@ So, let’s add a group with name “**labservers**” and under this group add … ``` -Save & exit file. +保存并退出文件。 Once the inventory file (/etc/ansible/hosts) is updated then exchange your user’s ssh public keys with remote systems which are part of “labservers” group. +更新清单文件(/etc/ansible/hosts)后,将用户的 ssh 公钥与作为 “”组一部分的远程系统交换。 Let’s first generate your local user’s public and private key using ssh-keygen command, diff --git a/sources/tech/20191126 5 Commands to Find the IP Address of a Domain in the Linux Terminal.md b/sources/tech/20191126 5 Commands to Find the IP Address of a Domain in the Linux Terminal.md index e26dd79244..866d5df482 100644 --- a/sources/tech/20191126 5 Commands to Find the IP Address of a Domain in the Linux Terminal.md +++ b/sources/tech/20191126 5 Commands to Find the IP Address of a Domain in the Linux Terminal.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20191127 Displaying dates and times your way.md b/sources/tech/20191127 Displaying dates and times your way.md new file mode 100644 index 0000000000..725e94cb0c --- /dev/null +++ b/sources/tech/20191127 Displaying dates and times your way.md @@ -0,0 +1,180 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Displaying dates and times your way) +[#]: via: (https://www.networkworld.com/article/3481602/displaying-dates-and-times-your-way-with-linux.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +Displaying dates and times your way +====== +The Linux date command provides more options for displaying dates and times than you can shake a stick at (without hurting your wrist anyway). Here are some of the more useful choices. +Thinkstock / Tomislav Jakupec + +The date command on Linux systems is very straightforward. You type “date” and the date and time are displayed in a useful way. It includes the day-of-the-week, calendar date, time and time zone: + +``` +$ date +Tue 26 Nov 2019 11:45:11 AM EST +``` + +As long as your system is configured properly, you’ll see the date and current time along with your time zone. + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] + +The command, however, also offers a lot of options to display date and time information differently. For example, if you want to display dates in the most useful format for sorting, you might want to use a command like this: + +[][2] + +BrandPost Sponsored by HPE + +[Take the Intelligent Route with Consumption-Based Storage][2] + +Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. + +``` +$ date "+%Y-%m-%d" +2019-11-26 +``` + +In this case, the year, month and day are arranged in that order. Note that we use a capital Y to get a four-digit year. If we use a lowercase y, we’d see only a two-digit year (e.g., 19). Don’t let this induce you into thinking that if %m gives you a numeric month, **%**M might give you the name of the month. No, **%**M will report on minutes. To get the month in abbreviated name format, you would use **%**b and for a fully spelled out month, you would use **%**B. + +``` +$ date "+%b %B" +Nov November +``` + +Alternately, you might want to display the date in this commonly used format: + +``` +$ date +%D +11/26/19 +``` + +If you need a four-digit year, you can do this: + +``` +$ date "+%x" +11/26/2019 +``` + +Here’s an example that might be useful. Say that you need to create a daily report and have the file name include the date, you could use a command like this to create the file – probably in a script: + +``` +touch Report-`date "+%Y-%m-%d"` +``` + +When you list your reports, they’ll list in date order or reverse date order if you add -r. + +``` +$ ls -r Report* +Report-2019-11-26 +Report-2019-11-25 +Report-2019-11-22 +Report-2019-11-21 +Report-2019-11-20 +``` + +You can add other details to your date strings as well. The variety of options available is surprising. You could show which quarter of the year you’re in by using **date "+%q"** or display the date it was two months ago with a command like this: + +``` +$ date --date="2 months ago" +Thu 26 Sep 2019 09:02:43 AM EDT +``` + +Want to see what next Thursday’s date will be? You can use a command like **date --date="next thu"**, but understand that, for Linux, next Thursday means whatever Thursday follows today. That’s tomorrow if today is Wednesday – not Thursday of next week. However, you can specify Thursday of next week as in the second command below. + +``` +$ date --date="next thu" +Thu 28 Nov 2019 12:00:00 AM EST +$ date --date="next week thu" +Thu 05 Dec 2019 12:00:00 AM EST +``` + +The man page for the date command lists all of its options. The list is fairly mind boggling, but you’ll probably find some date/time display options that work really well for you. Here are some that you might find interesting. + +The date in universal time (UTC): + +``` +$ date -u +Tue 26 Nov 2019 01:13:59 PM UTC +``` + +The number of seconds since Jan 1, 1970 (related to how dates are stored on Linux systems): + +``` +$ date +%s +1574774137 +``` + +Here's a full listing of the date command's options. As I said, it's a lot more extensive than most of us likely imagine. + +``` +%% a literal % +%a locale's abbreviated weekday name (e.g., Sun) +%A locale's full weekday name (e.g., Sunday) +%b locale's abbreviated month name (e.g., Jan) +%B locale's full month name (e.g., January) +%c locale's date and time (e.g., Thu Mar 3 23:05:25 2005) +%C century; like %Y, except omit last two digits (e.g., 20) +%d day of month (e.g., 01) +%D date; same as %m/%d/%y +%e day of month, space padded; same as %_d +%F full date; same as %Y-%m-%d +%g last two digits of year of ISO week number (see %G) +%G year of ISO week number (see %V); normally useful only with %V +%h same as %b +%H hour (00..23) +%I hour (01..12) +%j day of year (001..366) +%k hour, space padded ( 0..23); same as %_H +%l hour, space padded ( 1..12); same as %_I +%m month (01..12) +%M minute (00..59) +%n a newline +%N nanoseconds (000000000..999999999) +%p locale's equivalent of either AM or PM; blank if not known +%P like %p, but lower case +%q quarter of year (1..4) +%r locale's 12-hour clock time (e.g., 11:11:04 PM) +%R 24-hour hour and minute; same as %H:%M +%s seconds since 1970-01-01 00:00:00 UTC +%S second (00..60) +%t a tab +%T time; same as %H:%M:%S +%u day of week (1..7); 1 is Monday +%U week number of year, with Sunday as first day of week (00..53) +%V ISO week number, with Monday as first day of week (01..53) +%w day of week (0..6); 0 is Sunday +%W week number of year, with Monday as first day of week (00..53) +%x locale's date representation (e.g., 12/31/99) +%X locale's time representation (e.g., 23:13:48) +%y last two digits of year (00..99) +%Y year +%z +hhmm numeric time zone (e.g., -0400) +%:z +hh:mm numeric time zone (e.g., -04:00) +%::z +hh:mm:ss numeric time zone (e.g., -04:00:00) +%:::z numeric time zone with : to necessary precision (e.g., -04, +05:30) +%Z alphabetic time zone abbreviation (e.g., EDT) +``` + +Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3481602/displaying-dates-and-times-your-way-with-linux.html + +作者:[Sandra Henry-Stocker][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/newsletters/signup.html +[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE20773&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) +[3]: https://www.facebook.com/NetworkWorld/ +[4]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20191117 How to Install VirtualBox 6.0 on CentOS 8 - RHEL 8.md b/translated/tech/20191117 How to Install VirtualBox 6.0 on CentOS 8 - RHEL 8.md similarity index 51% rename from sources/tech/20191117 How to Install VirtualBox 6.0 on CentOS 8 - RHEL 8.md rename to translated/tech/20191117 How to Install VirtualBox 6.0 on CentOS 8 - RHEL 8.md index ffbf7103ee..e1b325f4d4 100644 --- a/sources/tech/20191117 How to Install VirtualBox 6.0 on CentOS 8 - RHEL 8.md +++ b/translated/tech/20191117 How to Install VirtualBox 6.0 on CentOS 8 - RHEL 8.md @@ -7,48 +7,48 @@ [#]: via: (https://www.linuxtechi.com/install-virtualbox-6-centos-8-rhel-8/) [#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) -How to Install VirtualBox 6.0 on CentOS 8 / RHEL 8 +如何在 CentOS 8 / RHEL 8 上安装 VirtualBox 6.0 ====== -**VirtualBox** is a free and open source **virtualization tool** which allows techies to run multiple virtual machines of different flavor at the same time. It is generally used at desktop level (Linux and Windows), it becomes very handy when someone try to explore the features of new Linux distribution or want to install software like **OpenStack**, **Ansible** and **Puppet** in one VM, so in such scenarios one can launch a VM using VirtualBox. +**VirtualBox** 是一款免费的开源**虚拟化工具**,它允许技术人员同时运行多个不同风格的虚拟机。它通常用于运行桌面(Linux 和 Windows),当人们尝试探索新的 Linux 发行版的功能或希望在 VM 中安装 **OpenStack**、**Ansible** 和 **Puppet** 等软件时,它会非常方便,在这种情况下,我们可以使用 VirtualBox 启动 VM。 -VirtualBox is categorized as **type 2 hypervisor** which means it requires an existing operating system, on top of which VirtualBox software will be installed. VirtualBox provides features to create our own custom host only network and NAT network. In this article we will demonstrate how to install latest version of VirtualBox 6.0 on CentOS 8 and RHEL 8 System and will also demonstrate on how to install VirtualBox Extensions. +VirtualBox 被分类为**2 类虚拟机管理程序**,这意味着它需要一个现有的操作系统,在上面安装 VirtualBox 软件。VirtualBox 提供功能来创建本机网络或 NAT 网络。在本文中,我们将演示如何在 CentOS 8 和 RHEL 8 系统上安装最新版本的 VirtualBox 6.0,并演示如何安装 VirtualBox 扩展。 -### Installation steps of VirtualBox 6.0 on CentOS 8 / RHEL 8 +### 在 CentOS 8 / RHEL 8 上安装 VirtualBox 6.0 的安装步骤 -#### Step:1) Enable VirtualBox and EPEL Repository +#### 步骤 1: 启用 VirtualBox 和 EPEL 仓库 -Login to your CentOS 8 or RHEL 8 system and open terminal and execute the following commands to enable VirtualBox and EPEL package repository. +登录到你的 CentOS 8 或 RHEL 8 系统并打开终端,执行以下命令并启用 VirtualBox 和 EPEL 包仓库。 ``` [root@linuxtechi ~]# dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo ``` -Use below rpm command to import Oracle VirtualBox Public Key +使用以下 rpm 命令导入 Oracle VirtualBox 公钥 ``` [root@linuxtechi ~]# rpm --import https://www.virtualbox.org/download/oracle_vbox.asc ``` -Enable EPEL repo using following dnf command, +使用以下 dnf 命令启用 EPEL 仓库, ``` [root@linuxtechi ~]# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y ``` -#### Step:2) Install VirtualBox Build tools and dependencies +#### 步骤 2: 安装 VirtualBox 构建工具和依赖项 -Run the following command to install all VirtualBox build tools and dependencies, +运行以下命令来安装所有 VirtualBox 构建工具和依赖项, ``` [root@linuxtechi ~]# dnf install binutils kernel-devel kernel-headers libgomp make patch gcc glibc-headers glibc-devel dkms -y ``` -Once above dependencies and build tools are installed successfully then proceed with VirtualBox installation using dnf command, +成功安装上面的依赖项和构建工具后,使用 dnf 命令继续安装 VirtualBox, -#### Step:3) Install VirtualBox 6.0 on CentOS 8 / RHEL 8 +#### 步骤 3: 在 CentOS 8 / RHEL 8 上安装 VirtualBox 6.0 -If wish to list available versions of VirtualBox before installing it , then execute the following [dnf command][1], +如果希望在安装之前列出 VirtualBox 的可用版本,请执行以下 [dnf 命令][1], ``` [root@linuxtechi ~]# dnf search virtualbox @@ -59,72 +59,71 @@ VirtualBox-6.0.x86_64 : Oracle VM VirtualBox [root@linuxtechi ~]# ``` -Let’s install latest version of VirtualBox 6.0 using following dnf command, +让我们使用以下 dnf 命令安装最新版本的 VirtualBox 6.0, ``` [root@linuxtechi ~]# dnf install VirtualBox-6.0 -y ``` -If any local user want to attach usb device to VirtualBox VMs then he/she should be part “**vboxuser**s ” group, use the beneath usermod command to add local user to “vboxusers” group. +如果有本地用户希望将 usb 设备连接到 VirtualBox VM,那么他/她应该是 “**vboxusers**” 组的一员,请使用下面的 usermod 命令将本地用户添加到 “vboxusers” 组。 + ``` [root@linuxtechi ~]# usermod -aG vboxusers pkumar ``` -#### Step:4) Access VirtualBox on CentOS 8 / RHEL 8 +#### 步骤 4: 访问 CentOS 8 / RHEL 8 上的 VirtualBox -There are two ways to access VirtualBox, from the command line type “**virtualbox**” then hit enter +有两种方法可以访问 VirtualBox,在命令行输入 “**virtualbox**” 然后回车: ``` [root@linuxtechi ~]# virtualbox ``` -From Desktop environment, Search “VirtualBox” from Search Dash. +在桌面环境中,在搜索框中搜索 “VirtualBox”。 [![Access-VirtualBox-CentOS8][2]][3] -Click on VirtualBox icon, +单击 VirtualBox 图标, [![VirtualBox-CentOS8][2]][4] -This confirms that VirtualBox 6.0 has been installed successfully, let’s install its extension pack. +这确认 VirtualBox 6.0 已成功安装,让我们安装它的扩展包。 -#### Step:5) Install VirtualBox 6.0 Extension Pack +#### 步骤 5: 安装 VirtualBox 6.0 扩展包 -As the name suggests, VirtualBox extension pack is used to extend the functionality of VirtualBox. It adds the following features: +顾名思义,VirtualBox 扩展包用于扩展 VirtualBox 的功能。它添加了以下功能: - * USB 2.0 & USB 3.0 support - * Virtual RDP (VRDP) - * Disk Image Encryption - * Intel PXE Boot - * Host WebCam + * USB 2.0 和 USB 3.0 支持 + * 虚拟 RDP(VRDP) + * 磁盘镜像加密 + * Intel PXE 启动 + * 主机网络摄像头 -Use below wget command to download virtualbox extension pack under download folder, +使用下面的 wget 命令下载 Virtualbox 扩展包到下载文件夹中, ``` [root@linuxtechi ~]$ cd Downloads/ [root@linuxtechi Downloads]$ wget https://download.virtualbox.org/virtualbox/6.0.14/Oracle_VM_VirtualBox_Extension_Pack-6.0.14.vbox-extpack ``` -Once it is downloaded, access VirtualBox and navigate **File** –>**Preferences** –> **Extension** then click on + icon to add downloaded extension pack, +下载后,打开 VirtualBox 并依次点击 **File** –>**Preferences** –> **Extension**,然后点击 “+” 号图标添加下载的扩展包, [![Install-VirtualBox-Extension-Pack-CentOS8][2]][5] -Click on “Install” to start the installation of extension pack. +单击 “Install” 开始安装扩展包。 [![Accept-VirtualBox-Extension-Pack-License-CentOS8][2]][6] -Click on “I Agree” to accept VirtualBox Extension Pack License. +单击 "I Agree" 接受 VirtualBox 扩展包许可证。 -After successful installation of VirtualBox extension pack, we will get following screen, Click on Ok and start using VirtualBox. +成功安装 VirtualBox 扩展包后,我们将看到下面的页面,单击 OK 并开始使用 VirtualBox。 [![VirtualBox-Extension-Pack-Install-Message-CentOS8][2]][7] -That’s all from this article, I hope these steps help you install VirtualBox 6.0 on your CentOS 8 and RHEL 8 system. Please do share your valuable feedback and comments. - -**Also Read**: **[How to Manage Oracle VirtualBox Virtual Machines from Command Line][8]** +本文就是这些了,我希望这些步骤可以帮助你在 CentOS 8 和 RHEL 8 系统上安装 VirtualBox 6.0。请分享你的宝贵反馈和意见。 * [Facebook][9] * [Twitter][10] @@ -139,7 +138,7 @@ via: https://www.linuxtechi.com/install-virtualbox-6-centos-8-rhel-8/ 作者:[Pradeep Kumar][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -153,7 +152,6 @@ via: https://www.linuxtechi.com/install-virtualbox-6-centos-8-rhel-8/ [5]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Install-VirtualBox-Extension-Pack-CentOS8.jpg [6]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Accept-VirtualBox-Extension-Pack-License-CentOS8.jpg [7]: https://www.linuxtechi.com/wp-content/uploads/2019/11/VirtualBox-Extension-Pack-Install-Message-CentOS8.jpg -[8]: https://www.linuxtechi.com/manage-virtualbox-virtual-machines-command-line/ [9]: http://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.linuxtechi.com%2Finstall-virtualbox-6-centos-8-rhel-8%2F&t=How%20to%20Install%20VirtualBox%206.0%20on%20CentOS%208%20%2F%20RHEL%208 [10]: http://twitter.com/share?text=How%20to%20Install%20VirtualBox%206.0%20on%20CentOS%208%20%2F%20RHEL%208&url=https%3A%2F%2Fwww.linuxtechi.com%2Finstall-virtualbox-6-centos-8-rhel-8%2F&via=Linuxtechi [11]: http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.linuxtechi.com%2Finstall-virtualbox-6-centos-8-rhel-8%2F&title=How%20to%20Install%20VirtualBox%206.0%20on%20CentOS%208%20%2F%20RHEL%208 diff --git a/translated/tech/20191120 How to Use TimeShift to Backup and Restore Ubuntu Linux.md b/translated/tech/20191120 How to Use TimeShift to Backup and Restore Ubuntu Linux.md deleted file mode 100644 index cd234c7277..0000000000 --- a/translated/tech/20191120 How to Use TimeShift to Backup and Restore Ubuntu Linux.md +++ /dev/null @@ -1,150 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Use TimeShift to Backup and Restore Ubuntu Linux) -[#]: via: (https://www.linuxtechi.com/timeshift-backup-restore-ubuntu-linux/) -[#]: author: (James Kiarie https://www.linuxtechi.com/author/james/) - -如何使用 TimeShift 备份和还原 Ubuntu Linux -====== - -你是否曾经想过如何备份和还原 **Ubuntu** 或 **Debian** 系统? **Timeshift**是一款免费的开源工具,可让你创建文件系统的增量快照。你也可以使用 **RSYNC** 或 **BTRFS** 创建快照。 - -[![TimeShift-Backup-Restore-Tool-Ubuntu][1]][2] - -让我们深入研究并安装 Timeshift。对于本教程,我们将安装在 Ubuntu 18.04 LTS 系统上。 - -### 在 Ubuntu / Debian Linux 上安装 TimeShift - -TimeShift 尚未正式托管在 Ubuntu 和 Debian 仓库中。考虑到这一点,我们将运行以下命令来添加 PPA: - -``` -# add-apt-repository -y ppa:teejee2008/ppa -``` - -![Add-timeshift-repository][1] - -接下来,使用以下命令更新系统软件包: - -``` -# apt update -``` - -成功更新系统后,使用以下 apt 命令安装 Timeshift: - -``` -# apt install timeshift -``` - -![apt-install-timeshift][1] - -### 准备备份存储设备 - -最佳实践要求我们将系统快照保存在系统硬盘之外的单独的存储卷上。对于本指南,我们将使用 16GB 闪存作为辅助存储,并在该辅助存储上保存快照。 - -``` -# lsblk | grep sdb -``` - -![lsblk-sdb-ubuntu][1] - -为了将闪存用作快照的备份位置,我们需要在设备上创建一个分区表。运行以下命令: - -``` -# parted /dev/sdb mklabel gpt -# parted /dev/sdb mkpart primary 0% 100% -# mkfs.ext4 /dev/sdb1 -``` - -![create-partition-table-on-drive-ubuntu][1] - -在 USB 闪存上创建分区表后,我们可以开始创建文件系统的快照! - -### 使用 Timeshift 创建快照 - -要启动 Timeshift,使用应用程序菜单搜索 Timeshift。 - -![Access-Timeshift-Ubuntu][1] - -单击 Timeshift 图标,系统将提示你输入管理员密码。提供密码,然后单击验证 - -![Authentication-required-ubuntu][1] - -接下来,选择你喜欢的快照类型。 - -![Select-Rsync-option-timeshift][1] - -点击 “**Next**”。选择快照的目标驱动器。在这里,我的位置是标记为 **/dev/sdb** 的外部 USB 驱动器 - -![Select-snapshot location][1] - -接下来,定义快照级别。级别是指创建快照的时间间隔。你可以选择每月、每周、每天或每小时的快照级别。 - -![Select-snapshot-levels-Timeshift][1] - -点击 “Finish” - -在下一个窗口中,单击 “**Create**” 按钮开始创建快照。此后,系统将开始创建快照。 - -![Create-snapshot-timeshift][1] - -最后,你的快照将显示如下: - -![Snapshot-created-TimeShift][1] - -### 从快照还原 Ubuntu / Debian - -创建系统快照后,现在让我们看看如何从同一快照还原系统。在同一个 Timeshift 中,单击快照,然后单击 “**Restore**” 按钮,如图所示。 - -![Restore-snapshot-timeshift][1] - -接下来,将提示你选择目标设备。保留默认选择,然后点击 “**Next**”。 - -![Select-target-device-timeshift][1] - -恢复过程开始之前,Timeshift 将试运行。 - -![Comparing-files-Dry-Run-timeshift][1] - -在下一个窗口中,点击 “**Next**” 按钮确认显示的操作。 - -![Confirm-actions-timeshift][1] - -如图所示,你会看到警告和免责声明。点击 “**Next**” 初始化恢复过程。 - -此后,将开始还原过程,最后,系统之后将重新启动到快照定义的早期版本。 - -![Restoring-snapshot-timeshift][1] - -**总结** - -如你所见,使用 TimeShift 从快照还原系统非常容易。在备份系统文件时,它非常方便,并允许你在系统故障时进行恢复。因此,不要害怕修改系统或弄乱系统。TimeShift 使你能够返回到一切运行平稳的时间点。 - - * [Facebook][3] - * [Twitter][4] - * [LinkedIn][5] - * [Reddit][6] - - - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/timeshift-backup-restore-ubuntu-linux/ - -作者:[James Kiarie][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linuxtechi.com/author/james/ -[b]: https://github.com/lujun9972 -[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[2]: https://www.linuxtechi.com/wp-content/uploads/2019/11/TimeShift-Backup-Restore-Tool-Ubuntu.png -[3]: http://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.linuxtechi.com%2Ftimeshift-backup-restore-ubuntu-linux%2F&t=How%20to%20Use%20TimeShift%20to%20Backup%20and%20Restore%20Ubuntu%20Linux -[4]: http://twitter.com/share?text=How%20to%20Use%20TimeShift%20to%20Backup%20and%20Restore%20Ubuntu%20Linux&url=https%3A%2F%2Fwww.linuxtechi.com%2Ftimeshift-backup-restore-ubuntu-linux%2F&via=Linuxtechi -[5]: http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.linuxtechi.com%2Ftimeshift-backup-restore-ubuntu-linux%2F&title=How%20to%20Use%20TimeShift%20to%20Backup%20and%20Restore%20Ubuntu%20Linux -[6]: http://www.reddit.com/submit?url=https%3A%2F%2Fwww.linuxtechi.com%2Ftimeshift-backup-restore-ubuntu-linux%2F&title=How%20to%20Use%20TimeShift%20to%20Backup%20and%20Restore%20Ubuntu%20Linux