Articles of centos7

rkhunter:经过一段时间,我得到了“自上次运行以来,系统已经改为不使用预连接”。

我们在这里运行一个(新的)CentOS 7系统。 为了观察系统,防止每天晚上运行rkhunter的无效更改/黑客攻击。 在每次(yum)更新之后,我们预先链接所有并运行“rkhunter –propupd”。 这运行良好。 但过了一段时间,我们得到以下错误: [03:55:02] Warning: WARNING! It is the users responsibility to ensure that when the '–propupd' option is used, all the files on their system are known to be genuine, and installed from a reliable source. The rkhunter '–check' option will compare the current file properties against previously stored values, […]

Centos 7,Kickstart,在安装过程中设置基础存储库时出错

我正在尝试在vmware 12上使用kickstart安装centos 7.我已经下载了iso并安装了许多使用相同iso软件包的虚拟机。 我收到错误:设置基本存储库时出错 我正在执行kickstart的步骤。 mount / dev / sr0 / webdir / rhel // CD rom iso安装在这里 chown -R root:root / website / rhel chmod 755 /webdir/ks.cfg 我的踢球开始文件 #version=RHEL7 # System authorization information auth –enableshadow –passalgo=sha512 # Use CDROM installation media #cdrom url –url http://192.168.1.201/rhel # Use graphical install graphical # Run the Setup […]

允许SELinux,Nginx读取本地文件并进行出站连接

我是一个使用CentOS 7,nginix和php-fpm的服务器的新pipe理员。 有一个Web表单需要读取本地文件(prod.pem),然后build立一个出站连接: gateway.push.apple.com:2195 gateway.sandbox.push.apple.com:2195 在audit.log中,我看到以下两个条目: type=AVC msg=audit(1465918007.693:406): avc: denied { read } for pid=1796 comm="php-fpm" name="prod.pem" dev="dm-0" ino=19554 type=SYSCALL msg=audit(1465918007.693:406): arch=c000003e syscall=2 success=no exit=-13 a0=7fff2ee13570 a1=0 a2=1b6 a3=24 items=0 ppid=1213 pid=1796 auid=4294967295 uid=997 gid=996 euid=997 suid=997 fsuid=997 egid=996 sgid=996 fsgid=996 tty=(none) ses=4294967295 comm="php-fpm" exe="/usr/sbin/php-fpm" subj=system_u:system_r:httpd_t:s0 key=(null) 我的/etc/selinux/config : SELINUX=enforcing SELINUXTYPE=targeted 我如何configurationSELinux以允许读取文件并进行出站连接? 我也想确保这些在重新启动时保留。

如何在Centos 7中禁用自动fsck?

当在XFS文件系统上运行时,有没有办法在启动CentOS 7时禁用自动fsck。 我知道在旧版本中,我们使用touch /forcefsck , tune2fs -c0 -i0 /dev/FILESXX等在引导/重启时禁用fsck。 任何有关如何在systemd / xfs系统中完成的想法?

ldapsearch适用于ldaps,但gent passwd'user'在Centos 7最小OpenLDAP服务器上不会返回任何内容

我已经在最低限度的centos 7上安装了openldap,并成功地为用户添加了newuser01数据库。 ldapsearch可以正常使用这种格式的主服务器和客户端: ldapsearch -H ldaps://provider.example.com -x -D "cn=Manager,dc=example,dc=com" -W 但是getent passwd -s sss newuser01或getent passwd newuer01在客户端和主服务器上都getent passwd newuer01返回任何内容。 这里是我看到的文件,我不知道他们是否正确configuration,如果有其他人我应该看看,非常感谢你的努力: /etc/nsswitch.conf /etc/openldap/ldap.conf /etc/sssd/sssd.conf /etc/openldap/slapd.conf#对于centos 7已经弃用了 将/etc/pam.d/system-auth 主人: /etc/nsswitch.conf包含: passwd: files sss shadow: files sss group: files sss hosts: files dns bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files rpc: files services: […]

CentOS 7连接问题

我有第二个CentOS 7盒,连接起来很麻烦。 基本上,我们运行的是WHMCS,但是一个域名查找一直在失败。 所以问题是IPv6连接。 [root@da01 ~]# yum install telnet -y -q -e 0 [root@da01 ~]# telnet whois.crsnic.net 43 Trying 2001:503:e8ef:1000::74… 它试图通过IPv6连接。 我们一直在移动我们的colo服务器,并获得了一个IPv6范围(10个地址),但是这还没有在系统中设置 – 因此连接超时。 [root@da01 ~]# telnet whois.crsnic.net 43 Trying 2001:503:e8ef:1000::74… telnet: connect to address 2001:503:e8ef:1000::74: Connection timed out 解决scheme是暂时禁用整个系统的IPv6连接。 所以简单地继续,select你想禁用IPv6的networking接口: [root@da01 ~]# vi /etc/sysconfig/network-scripts/ifcfg-em2 然后将所有与IPv6相关的configuration值更改为“no”,如下所示: IPV6INIT="no" IPV6_AUTOCONF="no" IPV6_DEFROUTE="no" IPV6_FAILURE_FATAL="no" IPV6_PEERDNS="no" IPV6_PEERROUTES="no" IPV6_PRIVACY="no" 最后,重新启动networking相关的服务。 [root@da01 […]

Rsyslog不logging事件

我试图站起来一个系统日志服务器接收来自一个networking设备的事件,但我似乎无法得到它实际login事件到磁盘。 我可以确认连接正在成功,rsyslogd正在获取事件,我只是不知道为什么它没有做任何事情。 唯一被logging的是rsyslogd本身的启动。 configuration和debugging输出如下,这最初是从rsyslog厨师食谱生成的,但我添加了一些调整,以解决它所抱怨的超级弃用的语法。 rsyslog.conf : $MaxMessageSize 2k $PreserveFQDN off $ModLoad imuxsock $ModLoad imklog $ModLoad imtcp $InputTCPServerRun 514 $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat $RepeatedMsgReduction on $WorkDirectory /var/spool/rsyslog $FileOwner root $FileGroup root $FileCreateMode 0640 $DirCreateMode 0755 $Umask 0022 $IncludeConfig /etc/rsyslog.d/*.conf rsyslog.d/* : $DirGroup root $DirCreateMode 0755 $FileGroup root $template PerHostAuth,"/var/log/rsyslog/%HOSTNAME%/auth.log" $template PerHostCron,"/var/log/rsyslog/%HOSTNAME%/cron.log" $template PerHostSyslog,"/var/log/rsyslog/%HOSTNAME%/syslog" $template PerHostDaemon,"/var/log/rsyslog/%HOSTNAME%/daemon.log" $template PerHostKern,"/var/log/rsyslog/%HOSTNAME%/kern.log" $template […]

MV失败,但CP成功的NFS安装

我正在尝试将文件从本地目录移动到CentOS 7服务器上的nfs挂载目录。 这个出口是由FreeNAS提供的。 这两个目录都由当前用户拥有至less755(nfs显示为777,但我不知道我相信它)。 我的fstab看起来像这样 host:/path/to/export /mnt/nfs nfs defaults 0 0 我无法移动文件 mv /local/file /mnt/nfs/file mv: cannot create regular file 'file': Operation not permitted 但是我可以复制并删除它 cp /local/file /mnt/nfs/file rm /local/file mount输出 host:/path/to/export on /mnt/nfs type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=host,mountvers=3,mountport=908,mountproto=udp,local_lock=none,addr=host) 客户端上的目录权限 ls -ld /local /mnt/nfs drwxrwxrwx. 15 user user 17 Nov 28 08:32 /mnt/nfs/ drwxrwxrwx. 2 root root […]

如何在CentOS 7中为Docker启用CONFIG_NETFILTER_XT_MATCH_IPVS?

当我运行wget https://raw.githubusercontent.com/docker/docker/master/contrib/check-config.sh一个工具,检查Dockerconfiguration错误,我得到一个错误,说CONFIG_NETFILTER_XT_MATCH_IPVS丢失。 我如何在CentOS 7中安装/启用这个function? ./check-config.sh info: reading kernel config from /proc/config.gz … Generally Necessary: – cgroup hierarchy: properly mounted [/sys/fs/cgroup] – CONFIG_NAMESPACES: enabled – CONFIG_NET_NS: enabled – CONFIG_PID_NS: enabled – CONFIG_IPC_NS: enabled – CONFIG_UTS_NS: enabled – CONFIG_CGROUPS: enabled – CONFIG_CGROUP_CPUACCT: enabled – CONFIG_CGROUP_DEVICE: enabled – CONFIG_CGROUP_FREEZER: enabled – CONFIG_CGROUP_SCHED: enabled – CONFIG_CPUSETS: enabled – CONFIG_MEMCG: […]

Centos 7使用未分配的空间扩展分区

我有centos 7服务器(CentOS Linux release 7.3.1611 (Core))当我更新我的服务器,我看到错误,你需要额外的空间。 但我有20GB的磁盘服务器时,我检查磁盘空间,我看到只有4.5GB分区创build和16GB分区是可用空间没有未分配。 我如何从16GB的可用空间扩展分区? lsblk: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT fd0 2:0 1 4K 0 disk sda 8:0 0 20G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 4.5G 0 part ├─centos-root 253:0 0 4G 0 lvm / └─centos-swap 253:1 0 512M 0 lvm [SWAP] […]