CentOS ’ 目录归档

Docker 部署 ossec-server 及输出 Graylog 记录查看日志

Linux 上使用 Docker 部署 ossec-server,Windows server 上安装 ossec-agent,然后配合之前部署的 Graylog 存储查看日志
ossec 官网下载需要的软件 https://www.ossec.net/download-ossec/

下载并启动 ossec-server

  • 先下载最新 ossec 镜像;
    docker pull atomicorp/ossec-docker
    
  • 创建 ossec-server 数据存储目录,以便永久存储 ossec-server 配置;
    mkdir /home/project/ossec/data
    
  • 运行 ossec-server
    docker run -d -p 1514:1514/udp -p 1515:1515/tcp -v /home/project/ossec/data:/var/ossec/data --name ossec-server atomicorp/ossec-docker
    

阅读全文

  • Docker 部署 ossec-server 及输出 Graylog 记录查看日志已关闭评论

Docker 部署 Graylog + Opensearch + MongoDB docker-compose.yml 配置文件

  • 首先拉取官方镜像,然后查看确认镜像是否下载完成
    [root@localhost graylog]# docker images
    REPOSITORY                     TAG       IMAGE ID       CREATED         SIZE
    graylog/graylog                5.2       7f62f560e26c   4 days ago      538MB
    mongo                          latest    2e123a0ccb4b   2 weeks ago     757MB
    opensearchproject/opensearch   latest    c88bc2cd4d18   5 weeks ago     1.22GB
    

    阅读全文

  • Docker 部署 Graylog + Opensearch + MongoDB docker-compose.yml 配置文件已关闭评论

Linux 虚拟机磁盘扩容(Esxi 6.7)

  • Esxi 编辑设置,将硬盘 10G 修改为 20G;
  • 重启服务器reboot
  • 查看硬盘,确认已生效
    [root@localhost ~]# fdisk -l
    
    Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0x000db710
    
    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048     2099199     1048576   83  Linux
    /dev/sda2         2099200    10485759     4193280   8e  Linux LVM
    /dev/sda3        10485760    20971519     5242880   8e  Linux LVM
    
    Disk /dev/mapper/cl-root: 9118 MB, 9118416896 bytes, 17809408 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    Disk /dev/mapper/cl-swap: 536 MB, 536870912 bytes, 1048576 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    

    Disk /dev/sda: 21.5 GB
    阅读全文

  • Linux 虚拟机磁盘扩容(Esxi 6.7)已关闭评论

更新 Mysql 报错 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

报错信息如下:

The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


 Failing package is: mysql-community-server-5.7.37-1.el7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
PS:Mysql 升级 GPG 导致密钥配置失败

出现上述提示原因是 Mysql 的 GPG 升级了,需要重新获取

解决办法,更新证书

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

重新安装 Mysql 正常

  • 更新 Mysql 报错 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql已关闭评论

[CentOS7] 运行 [asp.net] [mono+nginx] 配置

  1. Add the Mono repository to your system
    The package repository hosts the packages you need, add it with the following commands in a root shell.
    Note:the packages should work on newer CentOS/RHEL versions too but we only test the ones listed below.
    CentOS/RHEL 8(x86_64)
rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" 
su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo' 

CentOS/RHEL 7(x86_64)

rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" 
su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo' 

CentOS/RHEL 6(x86_64, i686)

rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" 
su -c 'curl https://download.mono-project.com/repo/centos6-stable.repo | tee /etc/yum.repos.d/mono-centos6-stable.repo' 
  1. Install Mono
yum install mono-devel

(The package mono-devel should be installed to compile code. ) 阅读全文

  • [CentOS7] 运行 [asp.net] [mono+nginx] 配置已关闭评论

[Centos 7][Python] 安装pip

在虚拟机上安装了 centOs7 最小化方式安装后,登陆系统发现没有pip,现在给出简单方法安装如下:

yum -y install epel-release
yum install python-pip
  • [Centos 7][Python] 安装pip已关闭评论

return top