记录关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题,
如何仅在 CentOS/RHEL 8 中使用 dnf 列出或安装安全更新问:是否可能限制 dnf 以便仅列出或安装安全更新?如何仅使用安全勘误表修补系统?本文介绍如何使用 CentOS/RHEL 8 上的 dnf 列出和安装安全更新。列出安全更新1. 列出有关已安装软件包的较新版本(默认) 的建议:# dnf updateinfo list --security或# dnf updateinfo list --security --available2. 要列出有关已安装软件包任何版本的建议:# dnf updateinfo list --security --all3. 要列出有关相同和较旧版本的已安装软件包的建议:# dnf updateinfo list --security --installed4. 根据严重性列出安全更新(严重、重要、中等、低):# dnf updateinfo list --security --sec-severity [Severity]安装安全更新1. 在更新中包括与安全相关的包:# dnf upgrade --security2. 在更新中包括修复给定咨询或建议所需的包:# dnf upgrade --advisory ELSA-xxxx-xxxx或# dnf upgrade --advisories ELSA-xxxx-xxxx,ELSA-yyyy-yyyy3....
 
0

Redis 安全

发表者:admin分类:数据库DBA2020-07-13 10:37:22 阅读[74]
Redis 安全我们可以通过 redis 的配置文件设置密码参数,这样客户端连接到 redis 服务就需要密码验证,这样可以让你的 redis 服务更安全。实例我们可以通过以下命令查看是否设置了密码验证:127.0.0.1:6379> CONFIG get requirepass 1) "requirepass" 2) ""默认情况下 requirepass 参数是空的,这就意味着你无需通过密码验证就可以连接到 redis 服务。你可以通过以下命令来修改该参数:127.0.0.1:6379> CONFIG set requirepass "runoob" OK 127.0.0.1:6379> CONFIG get requirepass 1) "requirepass" 2) "runoob"设置密码后,客户端连接 redis 服务就需要密码验证,否则无法执行命令。语法AUTH 命令基本语法格式如下:127.0.0.1:6379> AUTH password实例127.0.0.1:6379> AUTH "runoob" OK 127.0.0.1:6379> SET mykey "Test value" OK 127.0.0.1:6379> GET mykey "Test value"
 
0

Redis 数据备份与恢复

发表者:admin分类:数据库DBA2020-07-13 09:39:21 阅读[76]
Redis 数据备份与恢复Redis SAVE 命令用于创建当前数据库的备份。语法redis Save 命令基本语法如下:redis 127.0.0.1:6379> SAVE 实例redis 127.0.0.1:6379> SAVE OK该命令将在 redis 安装目录中创建dump.rdb文件。恢复数据如果需要恢复数据,只需将备份文件 (dump.rdb) 移动到 redis 安装目录并启动服务即可。获取 redis 目录可以使用 CONFIG 命令,如下所示: redis 127.0.0.1:6379> CONFIG GET dir 1) "dir" 2) "/usr/local/redis/bin" 以上命令 CONFIG GET dir 输出的 redis 安装目录为 /usr/local/redis/bin。Bgsave创建 redis 备份文件也可以使用命令 BGSAVE,该命令在后台执行。实例127.0.0.1:6379> BGSAVE Background saving started
How to add a Custom Script to systemd in CentOS/RHEL 7如何在CentOS / RHEL 7中将自定义脚本添加到systemdThe systemd facility replaces the older System-V initialization scripts from earlier releases. The systemd is an event-driven facility which allows non-dependent subsystems to be started, controlled, or stopped in parallel. Here we explain how to add a custom script to the systemd facility.1. Write And Debug The Custom ScriptTypically a systemd script is written as a shell script. Begin by writing your custom script using the normal conventions. We will call our script my-custom-script.sh and is straightforward:#!/bin/sh echo I am a custom script2. The script must be executableLets make the script executable:# chmod 0755 my-custom-script.sh3. Describe The Custom Script To systemdWith the script written and tested manually, the script is ready to be described to the systemd system. To do this, a [name].service file is needed. The syntax uses the INI format commonly used for configurat...
环境:centos 7.1.1503 最小化安装依赖包下载:  yum -y install lrzsz zlib-devel perl gcc pam-devel1、安装openssl ,选用最新发布的版本:openssl-1.1.1g.tar.gz1)openssl下载地址:https://www.openssl.org/source/openssl-1.1.1g.tar.gz2)卸载系统预装的openssl ,这一步可以不做rpm -qa | grep openssl | grep -v libyum -y remove openssl-1.0.1e-42.el7.x86_64 3)安装步骤:tar -zxvf openssl-1.1.1g.tar.gzcd openssl-1.1.1g./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl -Wl,-rpath,/usr/local/openssl/lib sharedmake && make install4)创建软链接ln -s /usr/local/openssl/bin/openssl /usr/bin/opensslln -s /usr/local/openssl/include/openssl /usr/include/openssl5)更新系统配置echo "/usr/local/openssl/lib" >> /etc/ld.so.conf/sbin/ldconfig6)检查版本openssl version 2、安装openssh,选用最新发布的版本:openssh-8.3p1.tar.gz1)openssh下载地址:https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-8.3p1.tar.gz2)卸载系统预装的opensshrpm -qa | grep opens...
How To Shrink A Temporary Tablespace in Oracle DatabaseBy adminQuestion: How to resize the TEMPFILE(s) for a temporary tablespace after they have grown larger than needed?Large sort operations can cause temporary tablespaces to grow very large and as such there may be a need to ‘downsize’ after such operations. Until Oracle 11g there was no SQL command to release the unused allocated temporary space. One workaround for this problem is to create a new empty temporary tablespace with a smaller size, assign this new tablespace to the users and then drop the old tablespace. The disadvantage of this procedure is that it requires that no active sort operations are happening within the old temporary tablespace while it is being dropped.In Oracle 11g, a new feature was added that can be used to shrink temporary tablespaces. This command can be used to shrink only locally managed temporary tablespaces :ALTER TABLESPACE tablespace SHRINK SPACE | TEMPFILE tempfile_name [KEEP size];The&nbs...
 
0
What is MySQL Query CacheMySQL server features Query Cache Feature for a long time. When in use, the query cache stores the text of a SELECT query together with the corresponding result that is sent to a client. If another identical query is received, the server can then retrieve the results from the query cache rather than parsing and executing the same query again.It caches the full result set produced from a SELECT query:Queries executed must be identical.Cache is stored in system memory.Cache is checked before the query is parsed.Associated table updates invalidate query cache results. Prepared statements can be cached, but limitations exist. Some statements that do not use the query cache are:Queries that use nondeterministic functions.Queries that are a subquery of an outer queryQueries that are executed within the body of a stored function, trigger, or eventMySQL Query Cache SettingsThe query cache adds a few MySQL system variables for mysqld which may be set in a configuration...
Question: How to turn on scsi extended debug messages? What are the field/flag definitions of scsi_logging_level?Additional scsi logging messages can be enabled by writing to /proc/sys/dev/scsi/logging_level either via use of the echo or preferably the sysctl command. The kernel parameter consists of ten packed fields, each 3 bits in length. Each field can have a value of 0 to 7. The higher the field’s value, the more verbose the logging of messages associated with that field type.NOTE: Turning on high levels of extended logging and/or multiple types of extended logging can slow down system performance, especially during boot and shutdown. Unless needed, avoid turning on scsi logging during boot up.Run Time1. Enable :# sysctl -q -w dev.scsi.logging_level=[N]or# echo [N] > /proc/sys/dev/scsi/logging_levelWhere N specifies which fields to enable and at what level of verbosity.2. Disable:# sysctl -q -w dev.scsi.logging_level=0or# echo 0 > /p...
    总共275页,当前第8页 | 页数:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18