mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
0c03362841
@ -1,148 +1,125 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11587-1.html)
|
||||
[#]: subject: (7 Best Open Source Tools that will help in AI Technology)
|
||||
[#]: via: (https://opensourceforu.com/2019/11/7-best-open-source-tools-that-will-help-in-ai-technology/)
|
||||
[#]: author: (Nitin Garg https://opensourceforu.com/author/nitin-garg/)
|
||||
|
||||
7 个对 AI 技术有帮助的最佳开源工具
|
||||
7 个有助于 AI 技术的最佳开源工具
|
||||
======
|
||||
|
||||
[![][1]][2]
|
||||
![][1]
|
||||
|
||||
_人工智能是一种紧跟未来道路的卓越技术。在这个进步的时代,它吸引了所有跨国组织的关注。谷歌、IBM、Facebook、亚马逊、微软等业内知名公司不断投资于这种新时代技术。_
|
||||
> 人工智能是一种紧跟未来道路的卓越技术。在这个不断发展的时代,它吸引了所有跨国组织的关注。谷歌、IBM、Facebook、亚马逊、微软等业内知名公司不断投资于这种新时代技术。
|
||||
|
||||
利用人工智能预测业务需求,并在另一个层面上进行研发。这项先进技术正成为提供超智能解决方案的研发组织不可或缺的一部分。它可以帮助你保持准确性并以更好的结果提高生产率。
|
||||
预测业务需求需要利用人工智能,并在另一个层面上进行研发。这项先进技术正成为提供超智能解决方案的研发组织不可或缺的一部分。它可以帮助你保持准确性并以更好的结果提高生产率。
|
||||
|
||||
AI 开源工具和技术以频繁且准确的结果吸引了每个行业的关注。这些工具可帮助你分析性能,同时为你带来更大的收益。
|
||||
AI 开源工具和技术以频繁且准确的结果吸引了每个行业的关注。这些工具可帮助你分析绩效,同时为你带来更大的收益。
|
||||
|
||||
事不宜迟,这里我们列出了一些最佳的开源工具,来帮助你更好地了解人工智能。
|
||||
无需赘言,这里我们列出了一些最佳的开源工具,来帮助你更好地了解人工智能。
|
||||
|
||||
**1\. TensorFlow**
|
||||
### 1、TensorFlow
|
||||
|
||||
TensorFlow 是用于人工智能的开源机器学习框架。它主要是为了进行机器学习和深度学习的研究和生产而开发。TensorFlow 允许开发者创建数据流图形结构,它会在网络或系统节点中移动,图形提供数据的多维数组或张量。
|
||||
TensorFlow 是用于人工智能的开源机器学习框架。它主要是为了进行机器学习和深度学习的研究和生产而开发的。TensorFlow 允许开发者创建数据流的图结构,它会在网络或系统节点中移动,图提供了数据的多维数组或张量。
|
||||
|
||||
TensorFlow 是一个出色的工具,它有无数的优势。
|
||||
|
||||
* 简化数值计算
|
||||
* TensorFlow 在多种模型上提供了灵活性。
|
||||
* TensorFlow 提高了业务效率
|
||||
* 高度可移植
|
||||
* 自动区分能力
|
||||
* 简化数值计算
|
||||
* TensorFlow 在多种模型上提供了灵活性。
|
||||
* TensorFlow 提高了业务效率
|
||||
* 高度可移植
|
||||
* 自动区分能力
|
||||
|
||||
|
||||
|
||||
|
||||
**2\. Apache SystemML**
|
||||
### 2、Apache SystemML
|
||||
|
||||
Apache SystemML 是由 IBM 创建的非常流行的开源机器学习平台,它提供了使用大数据的良好平台。它可以在 Apache Spark 上高效运行,并自动扩展数据,同时确定代码是否可以在磁盘或 Apache Spark 集群上运行。不仅如此,它丰富的功能使其在行业产品中脱颖而出;
|
||||
|
||||
* 算法定制
|
||||
* 多种执行模式
|
||||
* 自动优化
|
||||
|
||||
|
||||
* 算法自定义
|
||||
* 多种执行模式
|
||||
* 自动优化
|
||||
|
||||
它还支持深度学习,让开发者更有效率地实现机器学习代码并优化。
|
||||
|
||||
**3\. OpenNN**
|
||||
### 3、OpenNN
|
||||
|
||||
OpenNN 是用于渐进式分析的开源人工智能神经网络库。它可帮助你使用 C++ 和 Python 开发健壮的模型,它还包含用于处理机器学习解决方案(如预测和分类)的算法和程序。它还涵盖了回归和关联,可提供业界的高性能和技术演化。
|
||||
|
||||
它有丰富的功能,如:
|
||||
|
||||
* 数字化协助
|
||||
* 预测分析
|
||||
* 快速的性能
|
||||
* 虚拟个人协助
|
||||
* 语音识别
|
||||
* 高级分析
|
||||
|
||||
|
||||
* 数字化协助
|
||||
* 预测分析
|
||||
* 快速的性能
|
||||
* 虚拟个人协助
|
||||
* 语音识别
|
||||
* 高级分析
|
||||
|
||||
它可帮助你设计实现数据挖掘的先进方案,而从取得丰硕结果。
|
||||
|
||||
**4\. Caffe**
|
||||
### 4、Caffe
|
||||
|
||||
Caffe(快速特征嵌入的卷积结构)是一个开源深度学习框架。它优先考虑速度、模块化和表达式。Caffe 最初由加州大学伯克利分校视觉和学习中心开发,它使用 C++ 编写,带有一个 python 界面。能在 Linux、macOS 和 Windows 上正常运行。
|
||||
Caffe(快速特征嵌入的卷积结构)是一个开源深度学习框架。它优先考虑速度、模块化和表达式。Caffe 最初由加州大学伯克利分校视觉和学习中心开发,它使用 C++ 编写,带有 Python 接口。能在 Linux、macOS 和 Windows 上顺利运行。
|
||||
|
||||
Caffe 中的一些有助于 AI 技术的关键特性。
|
||||
|
||||
1. 具有表现力的结构
|
||||
2. 具有扩展性的代码
|
||||
3. 大型社区
|
||||
4. 开发活跃
|
||||
5. 性能快速
|
||||
|
||||
|
||||
1. 具有表现力的结构
|
||||
2. 具有扩展性的代码
|
||||
3. 大型社区
|
||||
4. 开发活跃
|
||||
5. 性能快速
|
||||
|
||||
它可以帮助你激发创新,同时引入刺激性增长。充分利用此工具来获得所需的结果。
|
||||
|
||||
**5\. Torch**
|
||||
### 5、Torch
|
||||
|
||||
Torch 是一个开源机器学习库,通过提供多种方便的功能,帮助你简化序列化、面向对象编程等复杂任务。它在机器学习项目中提供了最大的灵活性和速度。Torch 使用脚本语言 Lua 编写,底层使用 C 实现。它被用于多个组织和研究实验室中。
|
||||
Torch 是一个开源机器学习库,通过提供多种方便的功能,帮助你简化序列化、面向对象编程等复杂任务。它在机器学习项目中提供了最大的灵活性和速度。Torch 使用脚本语言 Lua 编写,底层使用 C 实现。它用于多个组织和研究实验室中。
|
||||
|
||||
Torch 有无数的优势,如:
|
||||
|
||||
* 快速高效的 GPU 支持
|
||||
* 线性代数子程序
|
||||
* 支持 iOS 和 Android 平台
|
||||
* 数值优化子程序
|
||||
* N 维数组
|
||||
* 快速高效的 GPU 支持
|
||||
* 线性代数子程序
|
||||
* 支持 iOS 和 Android 平台
|
||||
* 数值优化子程序
|
||||
* N 维数组
|
||||
|
||||
### 6、Accord .NET
|
||||
|
||||
|
||||
**6\. Accord .NET**
|
||||
|
||||
Accord .NET 是著名的免费开源 AI 开发工具之一。它有一组库,用于组合用 C# 编写的音频和图像处理库。从计算机视觉到计算机听觉、信号处理和统计应用,它可以帮助你构建一切来用于商业用途。它附带了一套全面的示例应用来快速运行各类库。
|
||||
Accord .NET 是著名的自由开源 AI 开发工具之一。它有一组库,可以用来组合使用 C# 编写的音频和图像处理库。从计算机视觉到计算机听觉、信号处理和统计应用,它可以帮助你构建用于商业用途一切需求。它附带了一套全面的示例应用来快速运行各类库。
|
||||
|
||||
你可以使用 Accord .NET 引人注意的功能开发一个高级应用,例如:
|
||||
|
||||
* 统计分析
|
||||
* 数据接入
|
||||
* 自适应
|
||||
* 深度学习
|
||||
* 二阶神经网络学习算法
|
||||
* 数字协助和多语言
|
||||
* 语音识别
|
||||
* 统计分析
|
||||
* 数据接入
|
||||
* 自适应
|
||||
* 深度学习
|
||||
* 二阶神经网络学习算法
|
||||
* 数字协助和多语言
|
||||
* 语音识别
|
||||
|
||||
### 7、Scikit-Learn
|
||||
|
||||
|
||||
**7\. Scikit-Learn**
|
||||
|
||||
Scikit-Learn 是流行的有助于 AI 技术的开源工具之一。它是 Python 中用于机器学习的一个很有价值的库。它包括机器学习和统计建模(包括分类、聚类、回归和降维)等高效工具。
|
||||
Scikit-Learn 是流行的辅助 AI 技术的开源工具之一。它是 Python 中用于机器学习的一个很有价值的库。它包括机器学习和统计建模(包括分类、聚类、回归和降维)等高效工具。
|
||||
|
||||
让我们了解下 Scikit-Learn 的更多功能:
|
||||
|
||||
* 交叉验证
|
||||
* 聚类和分类
|
||||
* 流形学习
|
||||
* 机器学习
|
||||
* 虚拟流程自动化
|
||||
* 工作流自动化
|
||||
|
||||
|
||||
* 交叉验证
|
||||
* 聚类和分类
|
||||
* 流形学习
|
||||
* 机器学习
|
||||
* 虚拟流程自动化
|
||||
* 工作流自动化
|
||||
|
||||
从预处理到模型选择,Scikit-learn 可帮助你处理所有问题。它简化了从数据挖掘到数据分析的所有任务。
|
||||
|
||||
**最后的想法**
|
||||
### 总结
|
||||
|
||||
这些是一些流行的开源 AI 工具,它们提供了全面的功能。在开发新时代应用之前,必须选择其中一个工具并做相应的工作。这些工具提供先进的人工智能解决方案,并紧跟最新趋势。
|
||||
这些是一些流行的开源 AI 工具,它们提供了全面的功能。在开发新时代应用之前,人们必须选择其中一个工具并做相应的工作。这些工具提供先进的人工智能解决方案,并紧跟最新趋势。
|
||||
|
||||
人工智能在全球范围内被应用,标志着它在世界各地的存在。借助 Amazon Alexa、Siri 等应用,AI 为客户提供了很好的用户体验。它在吸引用户关注的行业中具有显著优势。在医疗保健、银行、金融、电子商务等所有行业中,人工智能在促进增长和生产力的同时节省了大量的时间和精力。
|
||||
人工智能在全球范围内应用,无处不在。借助 Amazon Alexa、Siri 等应用,AI 为客户提供了很好的用户体验。它在吸引用户关注的行业中具有显著优势。在医疗保健、银行、金融、电子商务等所有行业中,人工智能在促进增长和生产力的同时节省了大量的时间和精力。
|
||||
|
||||
选择这些开源工具中的任何一个,获得更好的用户体验和令人难以置信的结果。它将帮助你成长,并在质量和安全性方面获得更好的结果。
|
||||
|
||||
![Avatar][3]
|
||||
|
||||
[Nitin Garg][4]
|
||||
|
||||
作者是 BR Softech(一家商业智能软件公司) 的 CEO 兼联合创始人。喜欢通过博客分享他对 IT 行业的看法。他的兴趣是写最新的和先进的 IT 技术,包括物联网、VR 和 AR 应用开发,网络和应用开发服务。此外,他还为 RPA、大数据和网络安全服务提供咨询。
|
||||
|
||||
[![][6]][7]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensourceforu.com/2019/11/7-best-open-source-tools-that-will-help-in-ai-technology/
|
||||
@ -150,7 +127,7 @@ via: https://opensourceforu.com/2019/11/7-best-open-source-tools-that-will-help-
|
||||
作者:[Nitin Garg][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (MjSeven)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,213 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Getting started with PostgreSQL)
|
||||
[#]: via: (https://opensource.com/article/19/11/getting-started-postgresql)
|
||||
[#]: author: (Greg Pittman https://opensource.com/users/greg-p)
|
||||
|
||||
Getting started with PostgreSQL
|
||||
======
|
||||
Install, set up, create, and start using your first PostgreSQL database.
|
||||
![Guy on a laptop on a building][1]
|
||||
|
||||
Everyone has things that would be useful to collect in a database. Even if you're obsessive about keeping paperwork or electronic files, they can become cumbersome. Paper documents can be lost or completely disorganized, and information you need to access in electronic files may be buried in depths of paragraphs and pages of information.
|
||||
|
||||
When I was practicing medicine, I used [PostgreSQL][2] to keep track of my hospital patient list and to submit information about my hospital patients. I carried a printout of my daily patient list in my pocket for quick reference and to make quick notes about any changes in the patients' room, diagnosis, or other details.
|
||||
|
||||
I thought that was all behind me, until last year when my wife decided to get a new car, and I "inherited" her previous one. She had kept a folder of car repair and maintenance service receipts, but over time, it lost any semblance of organization. It takes time to sift through all the slips of paper to figure out what was done when, and I thought PostgreSQL would be a better way to keep track of this information.
|
||||
|
||||
### Install PostgreSQL
|
||||
|
||||
It had been a while since I last used PostgreSQL, and I had forgotten how to get going with it. In fact, I didn't even have it on my computer. Installing it was step one. I use Fedora, so in a console, I ran:
|
||||
|
||||
|
||||
```
|
||||
`dnf list postgresql*`
|
||||
```
|
||||
|
||||
Notice that you don't need to use sudo to use the **list** option. This command returned a long list of packages; after scanning them, I decided I only wanted three: postgresql, postgresql-server, and postgresql-docs.
|
||||
|
||||
To find out what I needed to do next, I decided to consult the [PostgreSQL docs][3]. The docs are a very extensive reference—so extensive, in fact, that it is rather daunting. Fortunately, I found some notes I made in the past when I was upgrading Fedora and wanted to efficiently export my database, restart PostgreSQL on the new version, and import my old database.
|
||||
|
||||
### Set up PostgreSQL
|
||||
|
||||
Unlike most other software, you can't just install PostgreSQL and start using it. You must carry out two basic steps beforehand: First, you need to set up PostgreSQL, and second, you need to start it. You must do these as the **root** user (sudo will not work here).
|
||||
|
||||
To set it up, enter:
|
||||
|
||||
|
||||
```
|
||||
`postgresql-setup –initdb`
|
||||
```
|
||||
|
||||
This establishes the location of the PostgreSQL databases on the computer. Then (still as **root**), enter these two commands:
|
||||
|
||||
|
||||
```
|
||||
systemctl start postgresql.service
|
||||
systemctl enable postgresql.service
|
||||
```
|
||||
|
||||
The first command starts PostgreSQL for the current session on your computer (if you turn it off, PostgreSQL shuts down). The second command causes PostgreSQL to automatically start on subsequent reboots.
|
||||
|
||||
### Create a user
|
||||
|
||||
PostgreSQL is running, but you still can't use it because you haven't been named a user yet. To do this, you need to switch to the special user **postgres**. While you are still running as **root**, type:
|
||||
|
||||
|
||||
```
|
||||
`su postgres`
|
||||
```
|
||||
|
||||
Since you're doing this as **root**, you don't need to enter a password. The **root** user can operate as any user without knowing their password; this is part of what makes it so powerful—and dangerous.
|
||||
|
||||
Now that you're **postgres**, run two commands like the following example (which creates the user **gregp**) to create your user:
|
||||
|
||||
|
||||
```
|
||||
createuser gregp
|
||||
createdb gregp
|
||||
```
|
||||
|
||||
You will probably get an error message like: **Could not switch to /home/gregp**. This just means that the user **postgres** doesn't have access to that directory. Nonetheless, your user and the database have been created. Next, type **Exit** and **Enter** twice so you're back to being yourself again.
|
||||
|
||||
### Set up a database
|
||||
|
||||
To start using PostgreSQL, type **psql** on the command line. You should see something like **gregp=>** to the left of each line to show that you're using PostgreSQL and can only use commands that it understands. You automatically have a database (mine is named **gregp**)—with absolutely nothing in it. A database, in the sense of PostgreSQL, is just a space to work. Inside that space, you create _tables_. A table contains a list of variables, and underneath each variable is the data that makes up your database.
|
||||
|
||||
Here is how I set up my auto-service database:
|
||||
|
||||
|
||||
```
|
||||
CREATE TABLE autorepairs (
|
||||
date date,
|
||||
repairs varchar(80),
|
||||
location varchar(80),
|
||||
cost numeric(6,2)
|
||||
);
|
||||
```
|
||||
|
||||
I could have typed this continuously on a single line, but I broke it up to illustrate the parts better and to show that the white space of tabs and line feeds is not interpreted by PostgreSQL. The data points are contained within parentheses, each variable name and data type is separated from the next by a comma (except for the last), and the command ends with a semicolon. All commands must end with a semicolon!
|
||||
|
||||
The first variable name is **date**, and its datatype is also **date**, which is OK with PostgreSQL. The second and third variables, **repairs** and **location**, are both datatype **varchar(80)**, which means they can be any mixture of up to 80 characters (letters, numbers, whatever). The last variable, **cost**, uses the **numeric** datatype. The numbers in parentheses indicate there is a maximum of six digits and two of them are decimals. At first, I tried the **real** datatype, which would be a floating-point number. The problem with **real** as a datatype comes in more advanced commands using a **WHERE** clause, like **WHERE cost = 0** or any other specific number. Since there is some imprecision in **real** values, specific numbers will never match anything.
|
||||
|
||||
### Enter data
|
||||
|
||||
Next, you can add some data (in PostgreSQL called a **row**) with the command **INSERT INTO**:
|
||||
|
||||
|
||||
```
|
||||
`INSERT INTO autorepairs VALUES ('2017-08-11', 'airbag recall', 'dealer', 0);`
|
||||
```
|
||||
|
||||
Notice that the parentheses form a container for the values, which must be in the correct order, separated by commas, and with a semicolon at the end of the command. The value for the **date** and **varchar(80)** datatypes must be enclosed in single quotes, but number values like **numeric** do not. As feedback, you should see:
|
||||
|
||||
|
||||
```
|
||||
`INSERT 0 1`
|
||||
```
|
||||
|
||||
Just as in your regular terminal session, you will have a history of entered commands, so often you can save a great deal of time when entering subsequent rows by pressing the Up arrow key to show the last command and editing the data as needed.
|
||||
|
||||
What if you get something wrong? Use **UPDATE** to change a value:
|
||||
|
||||
|
||||
```
|
||||
`UPDATE autorepairs SET date = '2017-11-08' WHERE repairs = 'airbag recall';`
|
||||
```
|
||||
|
||||
Or maybe you no longer want something in your table. Use **DELETE**:
|
||||
|
||||
|
||||
```
|
||||
`DELETE FROM autorepairs WHERE repairs = 'airbag recall';`
|
||||
```
|
||||
|
||||
and the whole row will be deleted.
|
||||
|
||||
One last thing: Even though I used all caps in the PostgreSQL commands (which is also done in most documentation), you can type them in lowercase, which is what I generally do.
|
||||
|
||||
### Output data
|
||||
|
||||
If you want to show your data, use **SELECT**:
|
||||
|
||||
|
||||
```
|
||||
`SELECT * FROM autorepairs ORDER BY date;`
|
||||
```
|
||||
|
||||
Without the **ORDER BY** option, the rows would appear however they were entered. For example, here's a selection of my auto-service data as it's output in my terminal:
|
||||
|
||||
|
||||
```
|
||||
SELECT date, repairs FROM autorepairs ORDER BY date;
|
||||
|
||||
date | repairs
|
||||
\-----------+-----------------------------------------------------------------
|
||||
2008-08-08 | oil change, air filter, spark plugs
|
||||
2011-09-30 | 35000 service, oil change, rotate tires/balance wheels
|
||||
2012-03-07 | repl battery
|
||||
2012-11-14 | 45000 maint, oil/filter
|
||||
2014-04-09 | 55000 maint, oil/filter, spark plugs, air/dust filters
|
||||
2014-04-21 | replace 4 tires
|
||||
2014-04-21 | wheel alignment
|
||||
2016-06-01 | 65000 mile service, oil change
|
||||
2017-05-16 | oil change, replce oil filt housing
|
||||
2017-05-26 | rotate tires
|
||||
2017-06-05 | air filter, cabin filter,spark plugs
|
||||
2017-06-05 | brake pads and rotors, flush brakes
|
||||
2017-08-11 | airbag recall
|
||||
2018-07-06 | oil/filter change, fuel filter, battery svc
|
||||
2018-07-06 | transmission fl, p steering fl, rear diff fl
|
||||
2019-07-22 | oil & filter change, brake fluid flush, front differential flush
|
||||
2019-08-20 | replace 4 tires
|
||||
2019-10-09 | replace passenger taillight bulb
|
||||
2019-10-25 | replace passenger taillight assembly
|
||||
(19 rows)
|
||||
```
|
||||
|
||||
To send this to a file, change the output with:
|
||||
|
||||
|
||||
```
|
||||
`\o autorepairs.txt`
|
||||
```
|
||||
|
||||
then run the **SELECT** command again.
|
||||
|
||||
### Exit PostgreSQL
|
||||
|
||||
Finally, to get out of PostgreSQL mode in the terminal, type:
|
||||
|
||||
|
||||
```
|
||||
`quit`
|
||||
```
|
||||
|
||||
or its shorthand version:
|
||||
|
||||
|
||||
```
|
||||
`\q`
|
||||
```
|
||||
|
||||
While this is just a brief introduction to PostgreSQL, I hope it demonstrates that it's neither difficult nor time-consuming to use the database for a simple task like this.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/11/getting-started-postgresql
|
||||
|
||||
作者:[Greg Pittman][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://opensource.com/users/greg-p
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_code_programming_laptop.jpg?itok=ormv35tV (Guy on a laptop on a building)
|
||||
[2]: https://www.postgresql.org/
|
||||
[3]: http://www.postgresql.org/docs
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,160 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Install VirtualBox 6.0 on CentOS 8 / RHEL 8)
|
||||
[#]: 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
|
||||
======
|
||||
|
||||
**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 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.
|
||||
|
||||
### Installation steps of VirtualBox 6.0 on CentOS 8 / RHEL 8
|
||||
|
||||
#### Step:1) Enable VirtualBox and EPEL Repository
|
||||
|
||||
Login to your CentOS 8 or RHEL 8 system and open terminal and execute the following commands to enable VirtualBox and EPEL package repository.
|
||||
|
||||
```
|
||||
[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
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# rpm --import https://www.virtualbox.org/download/oracle_vbox.asc
|
||||
```
|
||||
|
||||
Enable EPEL repo using following dnf command,
|
||||
|
||||
```
|
||||
[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
|
||||
|
||||
Run the following command to install all VirtualBox build tools and dependencies,
|
||||
|
||||
```
|
||||
[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,
|
||||
|
||||
#### Step:3) Install VirtualBox 6.0 on CentOS 8 / RHEL 8
|
||||
|
||||
If wish to list available versions of VirtualBox before installing it , then execute the following [dnf command][1],
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# dnf search virtualbox
|
||||
Last metadata expiration check: 0:14:36 ago on Sun 17 Nov 2019 04:13:16 AM GMT.
|
||||
=============== Summary & Name Matched: virtualbox =====================
|
||||
VirtualBox-5.2.x86_64 : Oracle VM VirtualBox
|
||||
VirtualBox-6.0.x86_64 : Oracle VM VirtualBox
|
||||
[root@linuxtechi ~]#
|
||||
```
|
||||
|
||||
Let’s install latest version of VirtualBox 6.0 using following dnf command,
|
||||
|
||||
```
|
||||
[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.
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# usermod -aG vboxusers pkumar
|
||||
```
|
||||
|
||||
#### Step:4) Access VirtualBox on CentOS 8 / RHEL 8
|
||||
|
||||
There are two ways to access VirtualBox, from the command line type “**virtualbox**” then hit enter
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# virtualbox
|
||||
```
|
||||
|
||||
From Desktop environment, Search “VirtualBox” from Search Dash.
|
||||
|
||||
[![Access-VirtualBox-CentOS8][2]][3]
|
||||
|
||||
Click on VirtualBox icon,
|
||||
|
||||
[![VirtualBox-CentOS8][2]][4]
|
||||
|
||||
This confirms that VirtualBox 6.0 has been installed successfully, let’s install its extension pack.
|
||||
|
||||
#### Step:5) Install VirtualBox 6.0 Extension Pack
|
||||
|
||||
As the name suggests, VirtualBox extension pack is used to extend the functionality of VirtualBox. It adds the following features:
|
||||
|
||||
* USB 2.0 & USB 3.0 support
|
||||
* Virtual RDP (VRDP)
|
||||
* Disk Image Encryption
|
||||
* Intel PXE Boot
|
||||
* Host WebCam
|
||||
|
||||
|
||||
|
||||
Use below wget command to download virtualbox extension pack under download folder,
|
||||
|
||||
```
|
||||
[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,
|
||||
|
||||
[![Install-VirtualBox-Extension-Pack-CentOS8][2]][5]
|
||||
|
||||
Click on “Install” to start the installation of extension pack.
|
||||
|
||||
[![Accept-VirtualBox-Extension-Pack-License-CentOS8][2]][6]
|
||||
|
||||
Click on “I Agree” to accept VirtualBox Extension Pack License.
|
||||
|
||||
After successful installation of VirtualBox extension pack, we will get following screen, Click on Ok and start using 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]**
|
||||
|
||||
* [Facebook][9]
|
||||
* [Twitter][10]
|
||||
* [LinkedIn][11]
|
||||
* [Reddit][12]
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linuxtechi.com/install-virtualbox-6-centos-8-rhel-8/
|
||||
|
||||
作者:[Pradeep Kumar][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.linuxtechi.com/author/pradeep/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.linuxtechi.com/dnf-command-examples-rpm-management-fedora-linux/
|
||||
[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[3]: https://www.linuxtechi.com/wp-content/uploads/2019/11/Access-VirtualBox-CentOS8.jpg
|
||||
[4]: https://www.linuxtechi.com/wp-content/uploads/2019/11/VirtualBox-CentOS8.jpg
|
||||
[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
|
||||
[12]: http://www.reddit.com/submit?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
|
213
translated/tech/20191112 Getting started with PostgreSQL.md
Normal file
213
translated/tech/20191112 Getting started with PostgreSQL.md
Normal file
@ -0,0 +1,213 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Getting started with PostgreSQL)
|
||||
[#]: via: (https://opensource.com/article/19/11/getting-started-postgresql)
|
||||
[#]: author: (Greg Pittman https://opensource.com/users/greg-p)
|
||||
|
||||
PostgreSQL 入门
|
||||
======
|
||||
安装,设置,创建和开始使用 PostgreSQL 数据库。
|
||||
![Guy on a laptop on a building][1]
|
||||
|
||||
每人或许都有需要在数据库中保存的东西。即使你沉迷于使用文书或电子文件,它们也会变得很麻烦。纸质文档可能会丢失或混乱,你需要访问的电子信息可能会隐藏在段落和页面的深处。
|
||||
|
||||
在我从事医学工作的时候,我使用 [PostgreSQL][2] 来跟踪我的住院患者名单并提交有关住院患者的信息。我将我的每日患者名单打印在口袋里,以便快速了解并就患者房间、诊断或其他细节的任何变化做出快速记录。
|
||||
|
||||
我以为一切没问题,直到去年我妻子决定买一辆新车,我“继承”了她以前的那辆车。她保留了汽车维修和保养服务收据的文件夹,但随着时间的流逝,它变得杂乱。花时间筛选所有纸条以弄清楚什么时候做了什么,我认为 PostgreSQL 将是更好的跟踪此信息的方法。
|
||||
|
||||
### 安装 PostgreSQL
|
||||
|
||||
自上次使用 PostgreSQ L以来已经有一段时间了,我忘记了如何使用它。实际上,我甚至没有在计算机上安装它。安装它是第一步。我使用 Fedora,因此在控制台中运行:
|
||||
|
||||
|
||||
```
|
||||
`dnf list postgresql*`
|
||||
```
|
||||
|
||||
请注意,你无需使用 sudo 即可使用 **list** 选项。该命令返回了很长的软件包列表。看了眼后,我决定只需要三个:postgresql、postgresql-server 和 postgresql-docs。
|
||||
|
||||
为了了解下一步需要做什么,我决定查看 [PostgreSQL 文档][3]。文档参考内容非常广泛,实际上,广泛到令人生畏。幸运的是,我发现我在升级 Fedora 时曾经做过的一些笔记,希望有效地导出数据库,在新版本上重新启动 PostgreSQL,以及导入旧数据库。
|
||||
|
||||
### 设置 PostgreSQL
|
||||
|
||||
与大多数其他软件不同,你不能只是安装 PostgreSQL 并开始使用它。你必须预先执行两个基本步骤:首先,你需要设置 PostgreSQL,第二,你需要启动它。你必须以 **root** 用户身份执行这些操作(sudo 在这里不起作用)。
|
||||
|
||||
要设置它,请输入:
|
||||
|
||||
|
||||
```
|
||||
`postgresql-setup –initdb`
|
||||
```
|
||||
|
||||
这将确定 PostgreSQL 数据库在计算机上的位置。然后(仍为 **root**)输入以下两个命令:
|
||||
|
||||
|
||||
```
|
||||
systemctl start postgresql.service
|
||||
systemctl enable postgresql.service
|
||||
```
|
||||
|
||||
第一个命令为当前会话启动 PostgreSQL(如果你关闭它,那么 PostgreSQL 就将关闭)。第二个命令使 PostgreSQL 在随后的重启中自动启动。
|
||||
|
||||
### 创建用户
|
||||
|
||||
PostgreSQL 正在运行,但是你仍然不能使用它,因为你还没有用户。为此,你需要切换到特殊用户 **postgres**。当你仍以 **root** 身份运行时,输入:
|
||||
|
||||
|
||||
```
|
||||
`su postgres`
|
||||
```
|
||||
|
||||
由于你是以 **root** 的身份执行此操作的,因此无需输入密码。root 用户可以在不知道密码的情况下以任何用户身份操作;这就是使其强大而危险的原因之一。
|
||||
|
||||
现在你就是 **postgres** 了,请运行下面两个命令,如下所示创建用户(创建用户 **gregp**):
|
||||
|
||||
|
||||
```
|
||||
createuser gregp
|
||||
createdb gregp
|
||||
```
|
||||
|
||||
你可能会看到错误消息,如:**Could not switch to /home/gregp**。这只是意味着用户 **postgres**不能访问该目录。尽管如此,你的用户和数据库已创建。接下来,输入 **Exit** 和 **Enter** 两次,这样就回到了原来的状态。
|
||||
|
||||
### 设置数据库
|
||||
|
||||
要开始使用 PostgreSQL,请在命令行输入 **psql**。你应该在每行左侧看到类似 **gregp=>** 的内容,以显示你使用的是 PostgreSQL,并且只能使用它理解的命令。你自动获得一个数据库(我的名为 **gregp**),它里面完全没有内容。对 PostgreSQL 来说,数据库只是一个工作空间。在空间内,你创建_表_。表包含变量列表,每个变量的下面是构成数据库的数据。
|
||||
|
||||
以下是我设置汽车服务数据库的方式:
|
||||
|
||||
|
||||
```
|
||||
CREATE TABLE autorepairs (
|
||||
date date,
|
||||
repairs varchar(80),
|
||||
location varchar(80),
|
||||
cost numeric(6,2)
|
||||
);
|
||||
```
|
||||
|
||||
我本可以在一行内输入入,但为了更好地说明结构,并表明 PostgreSQL 不会解释制表符和换行的空白,我分成了多行。字段包含在括号中,每个变量名和数据类型与下一个变量用逗号分隔(最后一个逗号除外),命令以分号结尾。所有命令都必须以分号结尾!
|
||||
|
||||
第一个变量名是 **date**,它的数据类型也是 **date**,这在 PostgreSQL 中没关系。第二个和第三个变量 **repairs** 和 **location** 都是 **varchar(80)** 类型,这意味着它们可以是最多 80 个任意字符(字母、数字等)。最后一个变量 **cost** 使用 **numeric** 类型。括号中的数字表示最多有六位数字,其中两位是小数。最初,我尝试了 **real** 类型,这将是一个浮点数。**real** 作为数据类型在使用时,在遇到 **WHERE** 子句,类似 **WHERE cost = 0** 或其他任何特定数字。由于 **real** 值有些不精确,因此特定数字将永远不会匹配。
|
||||
|
||||
### 输入数据
|
||||
|
||||
接下来,你可以使用 **INSERT INTO** 命令添加一些数据(在 PostgreSQL 中称为**行**):
|
||||
|
||||
|
||||
```
|
||||
`INSERT INTO autorepairs VALUES ('2017-08-11', 'airbag recall', 'dealer', 0);`
|
||||
```
|
||||
|
||||
请注意,括号为值构成一个容器,它必须以正确的顺序,用逗号分隔,并在命令末尾加上分号。 **date** 和 **varchar(80)** 类型的值必须包含在单引号中,但数字值(如 **numeric**)不用。作为反馈,你应该会看到:
|
||||
|
||||
|
||||
```
|
||||
`INSERT 0 1`
|
||||
```
|
||||
|
||||
与常规终端会话一样,你将有输入命令的历史记录,因此,在输入后续行时,通常可以按向上箭头键来显示最后一个命令并根据需要编辑数据,从而节省大量时间。
|
||||
|
||||
如果出了什么问题怎么办?使用 **UPDATE** 更改值:
|
||||
|
||||
|
||||
```
|
||||
`UPDATE autorepairs SET date = '2017-11-08' WHERE repairs = 'airbag recall';`
|
||||
```
|
||||
|
||||
或者,也许你不再需要表中的行。使用 **DELETE**:
|
||||
|
||||
|
||||
```
|
||||
`DELETE FROM autorepairs WHERE repairs = 'airbag recall';`
|
||||
```
|
||||
|
||||
这将删除整行。
|
||||
|
||||
最后一件事:即使我在 PostgreSQL 命令中一直使用大写字母(在大多数文档中也这么做),你也可以用小写字母输入,这是我常做的。
|
||||
|
||||
### 输出数据
|
||||
|
||||
如果你想展示数据,使用 **SELECT**:
|
||||
|
||||
|
||||
```
|
||||
`SELECT * FROM autorepairs ORDER BY date;`
|
||||
```
|
||||
|
||||
没有 **ORDER BY** 的话,行将不管你输入的内容来显示。例如,以下就是我终端中输出的我的汽车服务数据:
|
||||
|
||||
|
||||
```
|
||||
SELECT date, repairs FROM autorepairs ORDER BY date;
|
||||
|
||||
date | repairs
|
||||
\-----------+-----------------------------------------------------------------
|
||||
2008-08-08 | oil change, air filter, spark plugs
|
||||
2011-09-30 | 35000 service, oil change, rotate tires/balance wheels
|
||||
2012-03-07 | repl battery
|
||||
2012-11-14 | 45000 maint, oil/filter
|
||||
2014-04-09 | 55000 maint, oil/filter, spark plugs, air/dust filters
|
||||
2014-04-21 | replace 4 tires
|
||||
2014-04-21 | wheel alignment
|
||||
2016-06-01 | 65000 mile service, oil change
|
||||
2017-05-16 | oil change, replce oil filt housing
|
||||
2017-05-26 | rotate tires
|
||||
2017-06-05 | air filter, cabin filter,spark plugs
|
||||
2017-06-05 | brake pads and rotors, flush brakes
|
||||
2017-08-11 | airbag recall
|
||||
2018-07-06 | oil/filter change, fuel filter, battery svc
|
||||
2018-07-06 | transmission fl, p steering fl, rear diff fl
|
||||
2019-07-22 | oil & filter change, brake fluid flush, front differential flush
|
||||
2019-08-20 | replace 4 tires
|
||||
2019-10-09 | replace passenger taillight bulb
|
||||
2019-10-25 | replace passenger taillight assembly
|
||||
(19 rows)
|
||||
```
|
||||
|
||||
要将此发送到文件,将输出更改为:
|
||||
|
||||
|
||||
```
|
||||
`\o autorepairs.txt`
|
||||
```
|
||||
|
||||
然后再次运行 **SELECT** 命令。
|
||||
|
||||
### 退出 PostgreSQL
|
||||
|
||||
最后,在终端中退出 PostgreSQL,输入:
|
||||
|
||||
|
||||
```
|
||||
`quit`
|
||||
```
|
||||
|
||||
或者它的缩写版:
|
||||
|
||||
|
||||
```
|
||||
`\q`
|
||||
```
|
||||
|
||||
虽然这只是 PostgreSQL 的简要介绍,但我希望它展示了将数据库用于这样的简单任务既不困难也不费时。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/11/getting-started-postgresql
|
||||
|
||||
作者:[Greg Pittman][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://opensource.com/users/greg-p
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_code_programming_laptop.jpg?itok=ormv35tV (Guy on a laptop on a building)
|
||||
[2]: https://www.postgresql.org/
|
||||
[3]: http://www.postgresql.org/docs
|
Loading…
Reference in New Issue
Block a user