Articles of centos6

IPTables – 规则不起作用

我正在研究一些新的规则,但我似乎无法让他们目前的工作,我不断得到的错误是iptables: Applying firewall rules: iptables-restore: line 36 failed ,这是COMMIT 。 我确实移动COMMIT,看看我是否可以缩小这个问题,我认为它可以在-A LIMIT_INDIVIDUAL_CURRENT -m recent –update –seconds 300 –hitcount 200 -j DROP是否有任何人有一个想法。 *filter :INPUT DROP [13:672] :FORWARD DROP [0:0] :OUTPUT ACCEPT [1604:100070] :LIMIT_INDIVIDUAL_NEW – [0:0] :LIMIT_INDIVIDUAL_CURRENT – [0:0] :LIMIT_OVERALL_NEW – [0:0] -A INPUT -i lo -j ACCEPT #Apache -A INPUT -p tcp –dport 80 -m state […]

在CentOS 6.3上运行瘦服务器作为init.d脚本

我在这里跟着Slicehost教程,并能够在init.d中安装精简版,以便能够在启动时启动。 我也创build了所需的configuration文件。 在使用下面的命令以root身份login的命令行中运行瘦时,它可以很好地工作。 瘦启动-C /etc/thin/:config:.yml 但是,使用service thin start运行精简service thin start我从日志文件中获得以下内容: >> Writing PID to tmp/pids/thin.3000.pid >> Changing process privilege to apache:apache >> Using rack adapter >> Exiting! /var/www/sites/<path>/vendor/bundle/ruby/1.9.1/gems/guard-1.6.2/lib/guard.rb:23:in `expand_path': couldn't find HOME environment — expanding `~' (ArgumentError) 我怀疑有一些环境configuration设置丢失,但不知道该找什么。 有没有人能够得到这个工作或有什么我可以做什么来得到这个工作的build议?

名称服务器不parsing

我刚刚从OVH得到了一个非托pipe的专用VPS,我没有以前的设置服务器或DNS服务器的经验,但我跟随了几个馅饼,并安装了webmin,并为我的域名创buildNS区域,但现在我有一个奇怪的问题,其中mxtoolbox和intodns.com说,没有NSlogging被发现我的域名,虽然我没有注册ns1.example.com和ns2.example.com与我的域名注册机构(这是networking解决scheme在这种情况下),但它仍然保持失败,我无法访问该网站。 我一直在寻找2天的解决scheme,我还没有得到一个。 另外,我正在使用CentOs 6.3。 这是我从Webmin获得的BINDconfiguration // // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // options { listen-on port 53 { 127.0.0.1; 198.245.51.xxx;}; listen-on-v6 […]

PHP-FPM不能在Apache,CentOS 6.4上作为全局PHP处理程序工作

我试图将我的服务器上的PHP处理程序从mod_php切换到PHP-FPM。 但是,我的设置是worng。 当我试图打开server.com/info.php时,它被打开为显示文件内容的标准文本,而不是通过phpparsing: <?php phpinfo(); ?> Httpd和php-fpm日志什么都没显示。 httpd -M – 显示加载的mod_fastcgi。 系统:CentOS 6.4 x64,Apache 2.2.15。 使用这样的configuration从源代码编译的PHP-5.5.3: ./configure \ –prefix=/opt/php553-fpm \ –with-config-file-path=/opt/php553-fpm/etc \ –with-config-file-scan-dir=/opt/php553-fpm/etc/php.d \ –with-pdo-pgsql \ –with-zlib-dir \ –with-freetype-dir \ –enable-bcmath \ –enable-mbstring \ –with-libxml-dir=/usr \ –enable-soap \ –enable-calendar \ –with-curl \ –with-mcrypt \ –with-zlib \ –with-gd \ –with-pgsql \ –disable-rpath \ –enable-inline-optimization \ –with-bz2 […]

在CentOS虚拟机上的ESXI快照

在恢复到我的一个CentOS虚拟机上的快照时,显然这个date被设置回原来的快照date。 我想知道是否有人知道服务器的任何其他变化(除了date),需要改变,“可能”导致系统问题。 谢谢。

CentOS6和jbd2 / dm-0-8上长时间等待IO时间

运行CentOS 6.5和2.6.32-431.3.1.el6.i686内核的Linux机器最近由于等待IO而导致CPU峰值高达99%。 执行 while true; do date; ps auxf | awk '{if($8=="D") print $0;}'; sleep 1; done 给我这些CPU峰值: root 300 0.0 0.0 0 0 ? D 10:05 0:00 \_ [jbd2/dm-0-8] 所以它让我认为这些尖峰的来源是日记磁盘。 我发现这个话题是类似的IO等待造成这么多减速(EXT4 JDB2在99%的IO)在Mysql提交期间,但我不知道我可以find我的分区是否日记数据或不。 我的fstab看起来像 /dev/mapper/vg_ns01-lv_root / ext4 defaults 1 1 UUID=bc042a99-90a1-4d0a-a7b6-4122e9b2a201 /boot ext4 defaults 1 2 /dev/mapper/vg_ns01-lv_home /home ext4 defaults 1 2 /dev/mapper/vg_ns01-lv_swap swap swap […]

telnet无法连接到远程主机

我已经在我的一台服务器上安装了postfix和devcot来发送批量邮件(注册时系统消息,密码错误等)。 我使用php_imap函数检查反弹并标记这些电子邮件ID,以便我们不会一直发送电子邮件到那些导致反弹的地址。 我注意到php_imap函数没有读取它在testing服务器上读取的实时服务器上的反弹。 但活服务器能够发送邮件! 两台服务器都有相同的Centos 6.4 OS,并且具有相同的iptableconfiguration。 我比较了“testing”和“实时”域的DNS条目,并且它们具有必要的SPF条目。 主机提供商有必要的PTRlogging。 但是由于某种原因弹跳不能用于php_imap程序。 在这一点上,我不确定是否将反弹传递给服务器,并且dovecot无法读取它们,或者如果反弹没有传递。 所以我比较了“test”和“live”服务器的/etc/postfix/main.cf和/etc/postfix/master.cf中的条目,发现它们除了域名之外都是一样的。 确定我检查了如果postfix运行ps aux | grep后缀,它返回 在线服务器 [root@bw sridhar]# ps aux | grep postfix root 1433 0.0 0.1 13476 2696 ? Ss 09:32 0:00 /usr/libexec/postfix/master postfix 1443 0.0 0.1 13720 2836 ? S 09:32 0:00 qmgr -l -t fifo -u postfix 4724 0.0 0.1 13552 […]

内核更新后,grub.conf缺lessinitrdpath

今天早上我更新了一台服务器,并在启动时引发了最新的内核崩溃 在审查了grub.conf文件后,我发现initrdpath丢失。 有没有办法解决这个问题? 或者,我应该从grub.conf中删除最新的内核条目,并从以前的内核启动(testing工作)? grub.conf文件: # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro […]

重启后,RHEL的SELinux不会持久

所以在红帽考试中,他们希望你使用SELinux。 例如,如果您安装vsftp,则执行setsebool -P ftp_home_dir=1或setsebool -P ftp_home_dir on以允许服务器上的用户访问主目录。 然后重新启动我注意到ftp_home_dir被设置为off 。 我是我做错了什么? 这是我的步骤: getsebool -a | grep ftp getsebool -a | grep ftp → ftp_home_dir –> off setsebool -P ftp_home_dir on getsebool -a | grep ftp getsebool -a | grep ftp → ftp_home_dir –> on 重启 getsebool -a | grep ftp getsebool -a | grep ftp → […]

针对PAM的PostgreSQL用户authentication

我正在尝试通过PAM为PostgreSQL 9.3设置身份validation。 我已经设法在Ubuntu 12.04服务器上运行,但是我无法在CentOS-6上安装。 相关的pg_hba.conf行: host all all 0.0.0.0/0 pam pamservice=postgresql93 pam.d/postgressql93是官方postgresql 9.3软件包的默认configuration: #%PAM-1.0 auth include password-auth account include password-auth 当用户尝试进行身份validation时,会在secure日志中报告以下内容: hostname unix_chkpwd[31807]: check pass; user unknown hostname unix_chkpwd[31808]: check pass; user unknown hostname unix_chkpwd[31808]: password check failed for user (myuser) hostname postgres 10.1.0.1(61459) authentication: pam_unix(postgresql93:auth): authentication failure; logname= uid=26 euid=26 tty= ruser= rhost= user=myuser […]