CentOS7.8和CentOS8.1的区别

IT
IT
IT
335
文章
1
评论
2020年6月12日20:52:42 评论 5,687 10273字阅读34分14秒

系统内核

  • centos7.8
[root@bind ~]# uname -a
Linux bind 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • centos8.1
[root@lucky ~]# uname -a
Linux lucky 4.18.0-147.el8.x86_64 #1 SMP Wed Dec 4 21:51:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

python

  • centos7.8默认带python2.7
[root@bind ~]# python
Python 2.7.5 (default, Apr  2 2020, 13:16:51) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
  • centos8.1取消了python2,直接默认python3.6
[root@lucky ~]# python
bash: python: 未找到命令...
文件搜索失败: Cannot update read-only repo
[root@lucky ~]# python3
Python 3.6.8 (default, Nov 21 2019, 19:31:34) 
[GCC 8.3.1 20190507 (Red Hat 8.3.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

ssh版本

  • centos7.8
[root@bind ~]# ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
  • centos8.1
[root@lucky ~]# ssh -V
OpenSSH_8.0p1, OpenSSL 1.1.1c FIPS  28 May 2019

查看网卡

  • centos7
[root@bind ~]# ifconfig
-bash: ifconfig: 未找到命令
  • centos8.1
[root@lucky ~]# ifconfig
enp0s5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.31.143  netmask 255.255.255.0  broadcast 192.168.31.255
        inet6 fe80::90dd:a62d:d634:73d3  prefixlen 64  scopeid 0x20<link>
        ether 00:1c:42:5f:37:57  txqueuelen 1000  (Ethernet)
        RX packets 42551  bytes 3257067 (3.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 849  bytes 80616 (78.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 192  bytes 17088 (16.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 192  bytes 17088 (16.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:e5:06:85  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

selinux

  • 7和8是一样的
[root@lucky ~]# cat  /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

firewalld

  • 7和8的firewalld一样,不过8系列过渡成nftables 了。firewalld还是可以继续使用。
[root@lucky ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-06-12 20:38:30 CST; 3h 10min ago
     Docs: man:firewalld(1)
 Main PID: 836 (firewalld)
    Tasks: 2 (limit: 5008)
   Memory: 4.7M
   CGroup: /system.slice/firewalld.service
           └─836 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopid

6月 12 20:38:29 lucky systemd[1]: Starting firewalld - dynamic firewall daemon...
6月 12 20:38:30 lucky systemd[1]: Started firewalld - dynamic firewall daemon.

软件安装

  • centos7.8使用yum
[root@bind ~]# yum  install nginx
  • centos8.1可以使用yum或dnf安装
[root@lucky ~]# dnf install nginx
[root@lucky ~]# yum install nginx

时间同步

  • centos7.8可以使用ntp
[root@bind ~]# yum  install ntp
[root@bind ~]# ntpdate ntp.aliyun.com
  • centos8.1不能使用ntp,只能使用chrony
[root@lucky ~]# yum install ntp
上次元数据过期检查:0:06:54 前,执行于 2020年06月13日 星期六 02时13分10秒。
未找到匹配的参数: ntp
错误:没有任何匹配: ntp
[root@lucky ~]# dnf install chrony -y
[root@lucky ~]# vim /etc/chrony.conf
server ntp.aliyun.com iburst
[root@lucky ~]# systemctl restart chronyd
[root@lucky ~]# date
2020年 06月 13日 星期六 02:26:56 CST

mysql

  • centos7.8自带的是mariadb
[root@bind ~]# yum list grep mariadb
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
已安装的软件包
grep.x86_64 2.20-3.el7 @anaconda
可安装的软件包
mariadb.x86_64 1:5.5.65-1.el7 base
  • centos8.1自带的是mysql8.0
[root@lucky ~]# yum list grep  mysql*
上次元数据过期检查:12:32:49 前,执行于 2020年06月13日 星期六 02时13分10秒。
已安装的软件包
grep.x86_64                                                     3.1-6.el8                                                                        @anaconda
可安装的软件包
mysql.x86_64                                                    8.0.17-3.module_el8.0.0+181+899d6349                                             AppStream
mysql-common.x86_64                                             8.0.17-3.module_el8.0.0+181+899d6349                                             AppStream
mysql-devel.x86_64                                              8.0.17-3.module_el8.0.0+181+899d6349                                             AppStream
mysql-errmsg.x86_64                                             8.0.17-3.module_el8.0.0+181+899d6349                                             AppStream
mysql-libs.x86_64                                               8.0.17-3.module_el8.0.0+181+899d6349                                             AppStream
mysql-server.x86_64                                             8.0.17-3.module_el8.0.0+181+899d6349                                             AppStream
mysql-test.x86_64                                               8.0.17-3.module_el8.0.0+181+899d6349                                             AppStream
  • centos8.1默认mariadb10.3
[root@lucky ~]# yum list grep  mariadb*
上次元数据过期检查:12:33:39 前,执行于 2020年06月13日 星期六 02时13分10秒。
已安装的软件包
grep.x86_64                                                          3.1-6.el8                                                                   @anaconda
可安装的软件包
mariadb.x86_64                                                       3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-backup.x86_64                                                3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-common.x86_64                                                3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-connector-c.i686                                             3.0.7-1.el8                                                                 AppStream
mariadb-connector-c.x86_64                                           3.0.7-1.el8                                                                 AppStream
mariadb-connector-c-config.noarch                                    3.0.7-1.el8                                                                 AppStream
mariadb-connector-c-devel.i686                                       3.0.7-1.el8                                                                 AppStream
mariadb-connector-c-devel.x86_64                                     3.0.7-1.el8                                                                 AppStream
mariadb-connector-odbc.x86_64                                        3.0.7-1.el8                                                                 AppStream
mariadb-devel.x86_64                                                 3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-embedded.x86_64                                              3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-embedded-devel.x86_64                                        3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-errmsg.x86_64                                                3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-gssapi-server.x86_64                                         3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-java-client.noarch                                           2.2.5-2.el8                                                                 AppStream
mariadb-oqgraph-engine.x86_64                                        3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-server.x86_64                                                3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-server-galera.x86_64                                         3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-server-utils.x86_64                                          3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream
mariadb-test.x86_64                                                  3:10.3.17-1.module_el8.1.0+257+48736ea6                                     AppStream

openjdk

  • centos7.8Java的最低版本是1.6
[root@bind ~]# yum list grep java*
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
已安装的软件包
grep.x86_64 2.20-3.el7 @anaconda
可安装的软件包
java-1.6.0-openjdk.x86_64 1:1.6.0.41-1.13.13.1.el7_3 base 
java-1.6.0-openjdk-demo.x86_64 1:1.6.0.41-1.13.13.1.el7_3 base 
java-1.6.0-openjdk-devel.x86_64 1:1.6.0.41-1.13.13.1.el7_3 base 
java-1.6.0-openjdk-javadoc.x86_64 1:1.6.0.41-1.13.13.1.el7_3 base 
java-1.6.0-openjdk-src.x86_64 1:1.6.0.41-1.13.13.1.el7_3 base 
java-1.7.0-openjdk.x86_64 1:1.7.0.261-2.6.22.2.el7_8 updates 
java-1.7.0-openjdk-accessibility.x86_64 1:1.7.0.261-2.6.22.2.el7_8 updates 
java-1.7.0-openjdk-demo.x86_64 1:1.7.0.261-2.6.22.2.el7_8 updates 
java-1.7.0-openjdk-devel.x86_64 1:1.7.0.261-2.6.22.2.el7_8 updates 
java-1.7.0-openjdk-headless.x86_64 1:1.7.0.261-2.6.22.2.el7_8 updates 
java-1.7.0-openjdk-javadoc.noarch 1:1.7.0.261-2.6.22.2.el7_8 updates 
java-1.7.0-openjdk-src.x86_64 1:1.7.0.261-2.6.22.2.el7_8 updates 
java-1.8.0-openjdk.i686 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk.x86_64 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-accessibility.i686 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-accessibility.x86_64 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-demo.i686 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-demo.x86_64 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-devel.i686 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-devel.x86_64 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-headless.i686 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-javadoc.noarch 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-javadoc-zip.noarch 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-src.i686 1:1.8.0.252.b09-2.el7_8 updates 
java-1.8.0-openjdk-src.x86_64 1:1.8.0.252.b09-2.el7_8 updates 
java-11-openjdk.i686 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk.x86_64 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-demo.i686 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-demo.x86_64 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-devel.i686 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-devel.x86_64 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-headless.i686 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-headless.x86_64 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-javadoc.i686 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-javadoc.x86_64 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-javadoc-zip.i686 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-javadoc-zip.x86_64 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-jmods.i686 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-jmods.x86_64 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-src.i686 1:11.0.7.10-4.el7_8 updates 
java-11-openjdk-src.x86_64 1:11.0.7.10-4.el7_8 updates 
java-atk-wrapper.i686 0.30.4-5.el7 base 
java-atk-wrapper.x86_64 0.30.4-5.el7 base 
java_cup.noarch 1:0.11a-16.el7 base 
java_cup-javadoc.noarch 1:0.11a-16.el7 base 
java_cup-manual.noarch 1:0.11a-16.el7 base 
javacc.noarch 5.0-10.el7 base 
javacc-demo.noarch 5.0-10.el7 base 
javacc-javadoc.noarch 5.0-10.el7 base 
javacc-manual.noarch 5.0-10.el7 base 
javacc-maven-plugin.noarch 2.6-17.el7 base 
javacc-maven-plugin-javadoc.noarch 2.6-17.el7 base 
javamail.noarch 1.4.6-8.el7 base 
javamail-javadoc.noarch 1.4.6-8.el7 base 
javapackages-tools.noarch 3.4.1-11.el7 base 
javassist.noarch 3.16.1-10.el7 base 
javassist-javadoc.noarch 3.16.1-10.el7 base
  • centos8.1默认jdk是1.8
[root@lucky ~]# yum list grep  java*
上次元数据过期检查:0:00:07 前,执行于 2020年06月13日 星期六 14时48分55秒。
已安装的软件包
grep.x86_64                                                                3.1-6.el8                                                             @anaconda
可安装的软件包
java-1.8.0-openjdk.x86_64                                                  1:1.8.0.252.b09-2.el8_1                                               AppStream
java-1.8.0-openjdk-accessibility.x86_64                                    1:1.8.0.252.b09-2.el8_1                                               AppStream
java-1.8.0-openjdk-demo.x86_64                                             1:1.8.0.252.b09-2.el8_1                                               AppStream
java-1.8.0-openjdk-devel.x86_64                                            1:1.8.0.252.b09-2.el8_1                                               AppStream
java-1.8.0-openjdk-headless.x86_64                                         1:1.8.0.252.b09-2.el8_1                                               AppStream
java-1.8.0-openjdk-javadoc.noarch                                          1:1.8.0.252.b09-2.el8_1                                               AppStream
java-1.8.0-openjdk-javadoc-zip.noarch                                      1:1.8.0.252.b09-2.el8_1                                               AppStream
java-1.8.0-openjdk-src.x86_64                                              1:1.8.0.252.b09-2.el8_1                                               AppStream
java-11-openjdk.x86_64                                                     1:11.0.7.10-1.el8_1                                                   AppStream
java-11-openjdk-demo.x86_64                                                1:11.0.7.10-1.el8_1                                                   AppStream
java-11-openjdk-devel.x86_64                                               1:11.0.7.10-1.el8_1                                                   AppStream
java-11-openjdk-headless.x86_64                                            1:11.0.7.10-1.el8_1                                                   AppStream
java-11-openjdk-javadoc.x86_64                                             1:11.0.7.10-1.el8_1                                                   AppStream
java-11-openjdk-javadoc-zip.x86_64                                         1:11.0.7.10-1.el8_1                                                   AppStream
java-11-openjdk-jmods.x86_64                                               1:11.0.7.10-1.el8_1                                                   AppStream
java-11-openjdk-src.x86_64                                                 1:11.0.7.10-1.el8_1                                                   AppStream
java-atk-wrapper.x86_64                                                    0.33.2-6.el8                                                          AppStream
javapackages-filesystem.noarch                                             5.3.0-1.module_el8.0.0+11+5b8c10bd                                    AppStream
javapackages-tools.noarch                                                  5.3.0-1.module_el8.0.0+11+5b8c10bd                                    AppStream

CentOS 8和7版本对比

CentOS7.8和CentOS8.1的区别

 

继续阅读
  • 我的QQ
  • QQ扫一扫
  • weinxin
  • 我的头条
  • 头条扫一扫
  • weinxin
CentOS 最后更新:2020-6-13
IT
  • 本文由 发表于 2020年6月12日20:52:42
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
Eureka同步到nacos Nacos

Eureka同步到nacos

官方介绍文档地址 https://nacos.io/zh-cn/docs/nacos-sync.html 官方安装文档地址 https://nacos.io/zh-cn/docs/nacos-sync...
Eureka指定应用的instanceId为IP CentOS

Eureka指定应用的instanceId为IP

痛点 现在所有的应用指定的是服务器默认机器名称,对查看是哪一个服务IP或者单节点自动剔除服务不友好。 像如上图所示,想知道是哪一个节点,还得点开才能获取IP。 改造 全部改成自动获取服务器IP为ins...
阿里云网盘 CentOS

阿里云网盘

申请内测地址 https://survey.aliyun.com/apps/zhiliao/_o6XQjioM 官网地址 https://www.teambition.com/products/pan...
GitLab或Jenkins集成构建工具 CentOS

GitLab或Jenkins集成构建工具

集成构建工具 构建工具是用来将代码编译打包成制品的工具。例如前端项目我们一般使用npm进行打包,后端java项目我们一般使用maven、gradle进行打包。构建工具很多很多,但是集成到gitlab中...