translated

This commit is contained in:
geekpi 2019-10-12 08:43:57 +08:00
parent c7e94cd202
commit 107179e7e4
2 changed files with 127 additions and 127 deletions

View File

@ -1,127 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Install and Use Cockpit on CentOS 8 / RHEL 8)
[#]: via: (https://www.linuxtechi.com/install-use-cockpit-tool-centos8-rhel8/)
[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/)
How to Install and Use Cockpit on CentOS 8 / RHEL 8
======
**Cockpit** is a Web based server management tool available for CentOS and RHEL systems, recently **CentOS 8** and **RHEL 8** are released where cockpit is kept as default server management tool. Its package is available in the default CentOS 8 and RHEL 8 package repositories. Cockpit is a useful Web based GUI tool through which sysadmins can monitor and manage their Linux servers, it can also used to manage networking and storage on servers, containers, virtual machines and inspections of system and applications logs.
In this article we will demonstrate how to install and setup Cockpit on CentOS 8 and RHEL 8 system.
### Installation and setup of Cockpit on CentOS 8 / RHEL 8 System
Login to your CentOS8 / RHEL 8 system and open the terminal and execute the following dnf command,
```
[root@linuxtechi ~]# dnf install cockpit -y
```
Run the following command to enable and start cockpit service,
```
[root@linuxtechi ~]# systemctl start cockpit.socket
[root@linuxtechi ~]# systemctl enable cockpit.socket
```
Allow Cockpit ports in OS firewall using following command,
```
[root@linuxtechi ~]# firewall-cmd --permanent --add-service=cockpit
[root@linuxtechi ~]# firewall-cmd --reload
```
Verify whether cockpit service is up and running or not, execute the following commands,
```
[root@linuxtechi ~]# systemctl status cockpit.socket
[root@linuxtechi ~]# ss -tunlp | grep cockpit
[root@linuxtechi ~]# ps auxf|grep cockpit
```
![cockpit-status-centos8-rhel8][1]
### Access Cockpit on CentOS 8 / RHEL 8 system
As we can see in above commands output that cockpit is listening on tcp port 9090, open your system web browser and type url :
https://<Your-CentOS8/RHEL8-System-IP>:9090
[![CentOS8-cockpit-login-screen][1]][2]
Cockpit Login Screen for RHEL 8,
[![RHEL8-Cockpit-Login-Screen][1]][3]
Use the user name which has admin rights, or we can also use the root users credentials to login. In case you want to assign admin rights to any local user, execute the following command,
```
[root@linuxtechi ~]# usermod -G wheel pkumar
```
here pkumar is my local user,
Once you enter the users credentials, choose “**Reuse my password for privileged tasks**” and then click on “**Log In**” option after that we will get following screen,
[![cockpit-dashboard-centos8][1]][4]
On the Left-hand side bar, we can see what things can be monitored and configured via cockpit GUI,
Lets assume if you wish to check whether there are any updates available for your CentOS 8 / RHEL 8 system, click on “**System Updates**” option,
[![Software-Updates-Cockpit-GUI-CentOS8-RHEL8][1]][5]
To Install all updates, click on “**Install All Updates**”
[![Install-Software-Updates-CentOS8-RHEL8][1]][6]
If wish to modify networking and want to add Bond interface and Bridge, then click on “**Networking**”
[![Networking-Cockpit-Dashboard-CentOS8-RHEL8][1]][7]
As we can in above window, we have the options to create Bond interface, Bridge and VLAN tagged interface.
Lets assume we want to create a bridge as “**br0**” and want to add **enp0s3** as port to it, click on “**Add Bridge**” option,
Specify the bridge name as “br0” and port as “enp0s3” and then click on apply
[![Add-Bridge-Cockpit-CentOS8-RHEL8][1]][8]
In the next screen we will see that our bridge is active and got the same IP as of enp0s3 interface,
[![Bridge-Details-Cockpit-Dashboard-CentOS8-RHEL8][1]][9]
If you wish to inspect system logs then click on “**Logs**” options, there we can view logs based on their severity
[![System-Logs-Cockpit-Dashboard-CentOS8-RHEL8][1]][10]
Thats all from this article, similarly sysadmins can use remaining other options of cockpit to monitor and manage their CentOS 8 and RHEL 8 server. In case these steps help you to setup cockpit on your Linux server then please do share your feedback and comments in the comments section below.
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/install-use-cockpit-tool-centos8-rhel8/
作者:[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]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[2]: https://www.linuxtechi.com/wp-content/uploads/2019/09/CentOS8-cockpit-login-screen.jpg
[3]: https://www.linuxtechi.com/wp-content/uploads/2019/09/RHEL8-Cockpit-Login-Screen.jpg
[4]: https://www.linuxtechi.com/wp-content/uploads/2019/09/cockpit-dashboard-centos8.jpg
[5]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Software-Updates-Cockpit-GUI-CentOS8-RHEL8.jpg
[6]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Install-Software-Updates-CentOS8-RHEL8.jpg
[7]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Networking-Cockpit-Dashboard-CentOS8-RHEL8.jpg
[8]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Add-Bridge-Cockpit-CentOS8-RHEL8.jpg
[9]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Bridge-Details-Cockpit-Dashboard-CentOS8-RHEL8.jpg
[10]: https://www.linuxtechi.com/wp-content/uploads/2019/09/System-Logs-Cockpit-Dashboard-CentOS8-RHEL8.jpg

View File

@ -0,0 +1,127 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Install and Use Cockpit on CentOS 8 / RHEL 8)
[#]: via: (https://www.linuxtechi.com/install-use-cockpit-tool-centos8-rhel8/)
[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/)
如何在 CentOS 8/RHEL 8 上安装和使用 Cockpit
======
**Cockpit** 是一个基于 Web 的服务器管理工具,可用于 CentOS 和 RHEL 系统,最近发布了**CentOS 8** 和 **RHEL 8**,其中 cockpit 是默认的服务器管理工具。它的软件包在默认的 CentOS 8 和 RHEL 8 仓库中就有。Cockpit 是一个有用的基于 Web 的 GUI 工具,系统管理员可以通过该工具监控和管理 Linux 服务器,它还可用于管理服务器、容器、虚拟机中的网络和存储以及系统和应用日志的检查。
在本文中,我们将演示如何在 CentOS 8 和 RHEL 8 中安装和设置 Cockpit。
### 在 CentOS 8/RHEL 8 上安装和设置Cockpit
登录你的 CentOS8/RHEL 8打开终端并执行以下 dnf 命令,
```
[root@linuxtechi ~]# dnf install cockpit -y
```
运行以下命令启用并启动 cockpit 服务。
```
[root@linuxtechi ~]# systemctl start cockpit.socket
[root@linuxtechi ~]# systemctl enable cockpit.socket
```
使用以下命令在系统防火墙中允许 Cockpit 端口,
```
[root@linuxtechi ~]# firewall-cmd --permanent --add-service=cockpit
[root@linuxtechi ~]# firewall-cmd --reload
```
验证 cockpit 服务是否已启动和运行,执行以下命令,
```
[root@linuxtechi ~]# systemctl status cockpit.socket
[root@linuxtechi ~]# ss -tunlp | grep cockpit
[root@linuxtechi ~]# ps auxf|grep cockpit
```
![cockpit-status-centos8-rhel8][1]
### 在 CentOS 8/RHEL 8 上访问 Cockpit
正如我们在上面命令的输出中看到的cockpit 正在监听 tcp 9090 端口,打开你的 Web 浏览器并输入 url
https://<Your-CentOS8/RHEL8-System-IP>:9090
[![CentOS8-cockpit-login-screen][1]][2]
RHEL 8 中的 Cockpit 登录页面
[![RHEL8-Cockpit-Login-Screen][1]][3]
使用有管理员权限的用户名,或者我们也可以使用根用户的密码登录。如果要将管理员权限分配给任何本地用户,请执行以下命令,
```
[root@linuxtechi ~]# usermod -G wheel pkumar
```
这里 pkumar 是我的本地用户,
在输入用户密码后,选择“**Reuse my password for privileged tasks**”,然后单击 “**Log In**”,然后我们看到以下页面,
[![cockpit-dashboard-centos8][1]][4]
在左侧栏上,我们可以看到可以通过 cockpit GUI 监控和配置的内容,
假设你要检查 CentOS 8/RHEL 8 中是否有任何可用更新,请单击 “**System Updates**”,
[![Software-Updates-Cockpit-GUI-CentOS8-RHEL8][1]][5]
要安装所有更新,点击 “**Install All Updates**”
[![Install-Software-Updates-CentOS8-RHEL8][1]][6]
如果想要修改网络并要添加 Bond 接口和网桥,请单击 “**Networking**”
[![Networking-Cockpit-Dashboard-CentOS8-RHEL8][1]][7]
如上所见,我们有创建 Bond 接口、网桥和 VLAN 标记接口的选项。
假设我们像创建一个 **br0** 网桥,并要为它添加 **enp0s3** 端口,单击 “**Add Bridge**”,
将网桥名称指定为 “br0”将端口指定为 “enp0s3”然后单击应用。
[![Add-Bridge-Cockpit-CentOS8-RHEL8][1]][8]
在下个页面,我们将看到网桥处于活动状态,并且获得了与 enp0s3 接口相同的 IP
[![Bridge-Details-Cockpit-Dashboard-CentOS8-RHEL8][1]][9]
如果你想检查系统日志,单击 ”**Logs**“,我们可以根据严重性查看日志。
[![System-Logs-Cockpit-Dashboard-CentOS8-RHEL8][1]][10]
本文就是这些了,类似地,系统管理员可以使用 cockpit 的其他功能来监控和管理 CentOS 8 和 RHEL 8 服务器。如果这些步骤可以帮助你在 Linux 服务器上设置 cockpit请在下面的评论栏分享你的反馈和意见。
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/install-use-cockpit-tool-centos8-rhel8/
作者:[Pradeep Kumar][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/pradeep/
[b]: https://github.com/lujun9972
[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[2]: https://www.linuxtechi.com/wp-content/uploads/2019/09/CentOS8-cockpit-login-screen.jpg
[3]: https://www.linuxtechi.com/wp-content/uploads/2019/09/RHEL8-Cockpit-Login-Screen.jpg
[4]: https://www.linuxtechi.com/wp-content/uploads/2019/09/cockpit-dashboard-centos8.jpg
[5]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Software-Updates-Cockpit-GUI-CentOS8-RHEL8.jpg
[6]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Install-Software-Updates-CentOS8-RHEL8.jpg
[7]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Networking-Cockpit-Dashboard-CentOS8-RHEL8.jpg
[8]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Add-Bridge-Cockpit-CentOS8-RHEL8.jpg
[9]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Bridge-Details-Cockpit-Dashboard-CentOS8-RHEL8.jpg
[10]: https://www.linuxtechi.com/wp-content/uploads/2019/09/System-Logs-Cockpit-Dashboard-CentOS8-RHEL8.jpg