Articles of centos

CentOS 6 Yum更新问题

当我尝试在shell中运行“yum-complete-transaction”时出现此错误: [root@namesvr ~]# yum-complete-transaction Loaded plugins: fastestmirror mirror speeds from cached hostfile Loading mirror speeds from cached hostfile There are 1 outstanding transactions to complete. Finishing the most recent one The remaining transaction had 35 elements left to run Package 1:httpd-tools-2.2.15-31.el6.centos.vm.x86_64 already installed and latest version Package 2:mod_ssl-2.2.15-31.el6.centos.vm.x86_64 already installed and latest version Package wbm-virtual-server-4.09.gpl-1.noarch […]

chroot 64位 – > 32位='找不到命令'

很明显,32位不能chroot到64位,但我有信心,我已经成功chrooted从64位到32位使用Gentoo,但当我 [root@localhost ~]# mount /dev/vg_atom1/lv_root /mnt/lvm -o exec [root@localhost ~]# mount -t proc proc /mnt/lvm/proc [root@localhost ~]# mount –rbind /dev /mnt/lvm/dev [root@localhost ~]# mount –rbind /sys /mnt/lvm/sys [root@localhost ~]# chroot /mnt/lvm /bin/bash bash: uname: command not found [root@localhost /]# source /etc/profile 我明白了 bash: uname: command not found [root@localhost /]# cp -L /etc/resolv.conf /mnt/lvm/etc/ bash: cp: […]

CentOS 6的无状态NAT

我正在设置以下内容: —[IVR 1] | (internet)—-[CentOS box]—+—[IVR 2] | —[IVR 3] CentOS盒子的内部接口是192.168.110.1,IVR是192.168.110.101-103。 我想要做的是将一串外部UDP端口映射到每个IVR – 例如,端口10000-14999映射到IVR 1,15000-19999映射到IVR 2等。我遇到的问题是即端口必须直接映射 – 即从互联网到端口10000的内容将被发送到IVR上的端口10000,IVR 1中的端口10000发送的内容将从networking上的端口10000发送出去,面向CentOS盒子的界面。 iptables的NAT的东西都带有警告,它会尽量不重新映射端口,但可能不得不。 现在,我的选项如下所示: 单独映射端口(15,000 iptables行,每个端口一个) ipables -t nat -A PREROUTING -i eth0 -p udp –dport 10000 -j DNAT –to 192.168.110.101:10000 在UDP conntrack超时的情况下build立一个内核 这两者都非常有吸引力。 我错过了什么?

NSLCD只在debugging模式下连接到LDAP服务器

嘿家伙,我在stackexchange上search了一下,但可以find我的问题的帮助。 我正在尝试将LDAP身份validation集成到一个centos 7客户端上,但我无法正常工作,而且我找不到原因。 这是一些信息 我明确安装了centos 7 进入/etc/sysconfig/authconfig并更改 FORCELEGACY=no 至 FORCELEGACY=yes 所以authconfig不使用SSSD,因为我不会使用TSL / SSL为我的连接,据我所知这是使用SSSD的要求。 然后我运行authconfig-tui来填充/etc/openldap/ldap.conf SASL_NOCANON on URI ldap://172.16.0.5:390 BASE dc=mosek,dc=zentyal 现在我去了/etc/nslcd.confg手动填充它 uid nslcd gid ldap uri ldap://172.16.0.5:390 ldap_version 3 base dc=mosek,dc=zentyal binddn cn=zentyalro,dc=mosek,dc=zentyal bindpw secret scope sub base group ou=Groups,dc=mosek,dc=zentyal base passwd ou=Users,dc=mosek,dc=zentyal base shadow ou=Users,dc=mosek,dc=zentyal ssl no 我再次运行authconfig-tui以确保nslcd拿起新的configuration 我检查了我的/etc/nsswitch.conf ,看它是否configuration正确: passwd: files ldap shadow: […]

CentOs CPU使用率由sync_supers 100%

我看到它在top -c 然后我运行这个过程strace ,看到很多select(8, [3], NULL, NULL, {0, 0}) = 0 (Timeout) 接下来我应该做什么? 我怎么find这个的原因? 任何帮助非常感谢

TokuDB存储引擎重启后丢失

我正在使用MariaDB-server 10.0.14,只是停电和硬重启。 当回来时,我不得不手动重新挂载驱动器等,但一切似乎完好无损,除非我有一个错误,当试图访问TokuDB表'未知的存储引擎'TokuDB'。 任何线索怎么会发生?

firewalld服务正在运行,但firewall-cmd不起作用

我是Centos 7 / Serverpipe理新手。 我想弄清楚如何使用firewalld。 我的内核版本是:2.6.32-042stab084.20(OpenVZ) 和: #firewall-cmd –version #0.3.9 问题是我无法从firewall-cmd中获得任何function。 以下是我尝试过的一些命令: # systemctl status firewalld -l firewalld.service – firewalld – dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled) Active: active (running) since …; Main PID: 120 CGroup: /system.slice/firewalld.service └─120 /usr/bin/python -Es /usr/sbin/firewalld –nofork –nopid systemd[1]: Starting firewalld – dynamic firewall daemon… systemd[1]: Started firewalld – […]

SELinux – logrotate不会旋转NGINX日志

我正在使用CentOS,NGINX和Passenger来服务Rails应用程序。 我有SELinux激活,并有一系列与logrotate的问题。 我已经能够通过在线提供各种build议来解决大部分问题。 不幸的是,logrotate没有成功的旋转我的NGINX日志文件。 NGINX安装在/ opt / nginx中 这是我的logrotateconfiguration文件: /opt/nginx/logs/*log { daily rotate 30 missingok notifempty sharedscripts delaycompress postrotate [ ! -f /opt/nginx/logs/nginx.pid ] || kill -USR1 `cat /opt/nginx/logs/nginx.pid` endscript } 这些是我在/ var / log / messages中收到的消息 Mar 9 03:49:14 localhost setroubleshoot: SELinux is preventing /usr/sbin/logrotate from rename access on the file logrotate_temp.RTg4y3. For complete […]

Nginx不开始使用systemctl

我已经为它的目录中的虚拟服务器定义了一个自定义的error_log,如下所示: server { listen 80; server_name www.example.com; root /home/www.example.com; error_log /home/www.example.com/error.log; } 这是我的nginx.conf: user nginx; pid /run/nginx.pid; worker_processes 1; Nginx以root身份启动,没有任何问题: nginx -t nginx 但是当我尝试使用systemctl启动它时,它不会启动,状态显示如下: nginx: [emerg] open() "/home/www.example.com/error.log" failed (13: Permission denied) 这是我的nginx.service: [Unit] Description=The nginx HTTP and reverse proxy server After=syslog.target network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/run/nginx.pid ExecStartPre=/usr/sbin/nginx -t ExecStart=/usr/sbin/nginx ExecReload=/bin/kill -s HUP $MAINPID […]

Fail2ban严重exception – 不会阻止ips

我试图在CentOS7上运行fail2ban(没有SELinux),它使用firewalld。 我的目标是将其设置为禁止Asterisk密码失败。 安装程序是默认的yum install fail2ban configuration方面我只加了jail.local以下内容: [DEFAULT] backend = systemd banaction = firewallcmd-ipset destemail = [email protected] sender = [email protected] [asterisk] enabled = true #filter = asterisk #logpath = /var/log/asterisk/messages maxretry = 5 bantime = 86400 现在,当我重新启动fail2ban服务,我得到这样的fail2ban.log条目: 2015-04-26 13:35:18,149 fail2ban.server [2820]: INFO Changed logging target to /var/log/fail2ban.log for Fail2ban v0.9.1 2015-04-26 13:35:18,151 fail2ban.database [2820]: INFO Connected […]