如何快速上手CentOS8( 二 )


  1. dnf install nodejs
  2. dnf install python2
  3. dnf install python3
  4. dnf install golang
  5. dnf install php
  6. dnf install ruby
  7. dnf install perl
  8. dnf install java-1.8.0
  9. dnf install java-11
  10. dnf install maven
  11. dnf install scala
  12. dnf install cargo
  13. dnf install rust
  14. dnf install clang
  15. dnf install freeradius
  16. dnf install dpdk
  17. dnf install Docker
  18. dnf install MySQL-server
  19. dnf install podman
这里我们注意到没有pip 这个命令 , CentOS8 都是严格区分pip2 和pip3 , 分别对应包python2-pip和python3-pip
golang 默认安装  , GOPATH在/root/go下 , 没有配置go proxy 和也没有开启go module 功能 , 需要自行配置 。
  1. [root@pangu ~]# go version
  2. go version go1.11.5 linux/amd64
  3.  
  4. vi /etc/profile
  5.  
  6. export GO111MODULE=on
  7. export GOPROXY=https://goproxy.cn
  8.  
  9. source /etc/profile
  10.  
  11. go env
mysql8.0 命令行进入是不需要密码的, 从 mysql 官方安装的话 , 随机密码会记录到日志 , 首次登陆也是需要密码的 , 红帽很贴心 , 告别首次配置输密码的问题 。
  1. systemctl start mysqld
  2.  
  3. [root@pangu ~]# mysql
  4. Welcome to the MySQL monitor. Commands end with ; or g.
  5. Your MySQL connection id is 9
  6. Server version: 8.0.13 Source distribution
  7.  
  8. Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  9.  
  10. Oracle is a registered trademark of Oracle Corporation and/or its
  11. affiliates. Other names may be trademarks of their respective
  12. owners.
  13.  
  14. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
  15.  
  16. mysql>
php默认是7.2.11版本 , 加密库 默认使用了libsodium  , 如何找到以前的php-mcrypt
  1. dnf install php-pear php-devel make
  2.  
  3. pecl install mcrypt
  4.  
  5.  
  6. vi /etc/php.ini
  7. extension=mcrypt.so
  8.  
  9. php -m |grep mcrypt
魔性的cockpitcockpit是一个开源项目 , 不仅仅CenOS8 可以使用 。ubuntu 和CentOS7 也是可以使用的 。具体可以参考https://cockpit-project.org/ , CentOS 8 把 cockpit 从扩展yum源 移动到基础yum 源里了,可见对cockpit的期望很高 。
那cockpit可以做什么呢
1). 支持web终端 , 在web中关闭防火墙 , selinux ,  如图2
如何快速上手CentOS8

文章插图
2). 支持虚拟机管理 , 需要安装cockpit-machines 如图3
如何快速上手CentOS8

文章插图
3). 支持docker管理 , 需要安装cockpit-docker
4). 支持k8s dashboard管理 , 需要安装 cockpit-kubernetes
5). 支持web界面配置网卡bond , 如图4
如何快速上手CentOS8

文章插图
等等
cockpit 安装
  1. dnf install cockpit
  2. dnf install cockpit-machines
  3. systemctl enable --now cockpit.socket
cockpit-docker 在CentOS8 中不支持了
Redhat7.6 引入了Podman 。Podman通过提供与Docker命令行类似的功能 。我们对比发现 CentOS8 中 cockpit-docker 不见了 。可能Redhat 更推荐用自家的podman 。CentOS7 和 CentOS8 cockpit 相关软件包对比如下:
  • CentOS7
  1. [root@pangu]# yum list |grep cockpit
  2. cockpit.x86_64 195.1-1.el7.centos.0.1 @extras
  3. cockpit-bridge.x86_64 195.1-1.el7.centos.0.1 @extras
  4. cockpit-kubernetes.x86_64 195.1-1.el7.centos.0.1 @extras
  5. cockpit-machines.noarch 195.1-1.el7.centos.0.1 @extras
  6. cockpit-system.noarch 195.1-1.el7.centos.0.1 @extras
  7. cockpit-ws.x86_64 195.1-1.el7.centos.0.1 @extras
  8. cockpit-composer.noarch 1-1.el7 extras
  9. cockpit-dashboard.x86_64 195.1-1.el7.centos.0.1 extras
  10. cockpit-doc.x86_64 195.1-1.el7.centos.0.1 extras
  11. cockpit-docker.x86_64 195.1-1.el7.centos.0.1 extras
  12. cockpit-machines.x86_64 176-4.el7.centos extras
  13. cockpit-machines-ovirt.noarch 195.1-1.el7.centos.0.1 extras
  14. cockpit-packagekit.x86_64 176-4.el7.centos extras
  15. cockpit-packagekit.noarch 195.1-1.el7.centos.0.1 extras
  16. cockpit-pcp.x86_64 195.1-1.el7.centos.0.1 extras
  17. cockpit-storaged.noarch 195.1-1.el7.centos.0.1 extras
  18. cockpit-subions.noarch 160-1.el7.centos extras
  19. cockpit-tests.x86_64 195.1-1.el7.centos.0.1 extras


    推荐阅读