问题描述 昨天一台开发服务器出现了很奇怪的问题,项目网站无法访问,ssh登录时非常慢,半分钟才进去,在命令行敲命令几乎没有反应,要耐心的等待 进去后用 top 查看系统状态,结果很吓人,平均负载值在360,Tasks数量超级大(具体值忘了),用VI编辑文件都有异常提示,系统几乎瘫痪 解决过程 决定先降低负载,好能正常操作,不然连输入命令都费劲,然后再找原因,从根解决 执行 top 时,在进程列表中看到了大量的 postdrop 进程,很明显这个有问题 先把他停了,让系统有个喘气的机会 #ps
这两天看到几台服务器比较异常,平常流量跑满,突然就没有了流量,TCP 连接也没了。于是登录上服务器查看,首先想重启 nginx 服务,结果报错,大致意思就是磁盘空间已满。通过 df -h 命令查看,发现各个分区还有很充足的空间,然后 df -i 一看,发现分区 inode 已经满了。
早上到公司,发现邮箱内有报警信息显示CPU和IO使用都已超标。 报警内容如下: 主机: test-server-192.168.1.18 时间: 2015.11.15 15:25:17 状态: PROBLEM 级别:Warning 报警原因: Processor load is too high on test-server 内容: Processor load (1 min average per core):value=52.53 原始事件ID: 30605 主机: test-server-192.
前几天的时候,有个同事问我一个问题,大体的意思是突然收到报警,服务器的进程数翻了好几倍,其实那个服务器也没有任何操作。所以想让我帮忙看看。 他自己也做了一些简单的分析,可以看出,里面含有大量的CRONTD进程,sendmail进程等,大概占用了近4000的进程。 $ ps -ef|grep sendmail |wc -l 1317 $ ps -ef|grep postdrop|wc -l 1317 $ ps -ef|grep C
现在系统监控的工作处于过渡期,即对于Oracle的还是保留了gridcontrol的监控和报警,同时也保留了zabbix的报警,在发生问题的时候想看看哪个能监控的更到位一些,是否稳定等等,其实这个还真不好说,监控的好与不好都在于使用的情况,标准也不一样,不过从今天这个案例来看,系统级的监控还是zabbix要灵活一些。 今天收到的报警邮件如下: ZABBIX-监控系统: ------------------------------------ 报警内容: Too many OS processes on
MAILTO是针对用户配置的,于是将该参数加入/var/spool/cron/internal下;
在某台 centos7 主机上设置了某个 crontab 任务,但是到时间后运行 mail 后提示 No mail,即cron没有将任务的执行结果发送邮件通知到用户
最近某服务器磁盘空间告警,在排查过程中发现"/var/spool/postfix/maildrop"目录下堆积了很多小文件,起初想直接删除,但是使用rm删除是提示“参数列表过长”,后来使用rsync来清楚垃圾文件:
笔记内容:CentOS7下搭建postfix邮箱服务器并实现extmail的web访问
#useradd postfix -u 501 -g postfix -G postdrop
同样的也会弹出一个界面让你选择需要传递到Linux上的文件,文件保存的路径是你Linux当前输入此命令的路径
用户组的名称,由字母或数字构成。与/etc/passwd中的登录名一样,组名不应重复。
rsync [args] SRC [DEST]情形:同时维护着两份不同的data_center,但以old_data_center为标准。因为权限的缘故没有开启rsync自动同步,只是每隔一段时间手动同步一下。SRC和DEST都是采用mount形式,如果每一次都完整地copy,耗时很长,这时候就想到采用增量同步的方法,因为两份data_center同时由不同人维护,所以内容略有不同,data_center同步的时候不光要完全同步old_data_center的所有内容,而且要删除自身多余的内容,保持完全一致。
一,安装Postfix postfix-2.6.5.tar.gz postfix-2.6.5-vda-ng.patch.gz 二,rpm包安装Cyrus-SASL+cyrus-IMAPD 三,Postfix基本配置 [root@Postfix ~]# cat /etc/postfix/main.cf alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 html_directory = no inet_interfaces = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = localhost, localhost.$mydomain, $myhostname, $mydomain mydomain = example.com myhostname = example.com mynetworks = 111.111.111.111/28 , 127.0.0.0/8 myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix relay_domains = example.com,163.com,gmail.com,qq.com,yahoo.com.cn,126.com,hotmail.com,sina.com,sohu.com,tom.com,yahoo.com,189.com,baidu.com,qq163.com sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550 smtpd_client_connection_count_limit = 1024 smtpd_client_connection_rate_limit = 5 #Cyrus-SASL smtpd_client_restrictions = permit_sasl_authenticated smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_invalid_hostname smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes #Cyrus-imapd mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp readme_directory = no sample_directory = /etc/postfix #data_directory = /var/lib/postfix 四,用户邮箱管理 [root@Postfix ~]# cyradm -u cyrus localhost IMAP Password: localhost.localdomain> cm user.test localhost.localdomain> cm user.test.Send localhost.localdomain> cm user.test.Trash localhost.localdomain> cm user.test.Drafts localhost.localdomain> sq user.test 51200 //(kb,50M)设置配额: quota:51200 五,开机自动启动 六,邮箱日常维护 新建邮箱设置 1,建账户 [root@images ~]# useradd -g postfix -M -s /sbin/nologin test [root@images ~]# passwd test 2,建邮箱 [ro
使用 useradd 命令就删除了,但是,,,问题来了,当我们再次创建 gubeiqing 这个用户时:
一般来说,我们要备份的就是网站目录和数据库文件,对于宝塔用户而言,备份网站和备份数据库很简单。因为在计划任务这里。都有,只需要配置好时间即可。当然了,很关键的一点是,宝塔备份是备份在了服务器本机。然而如果备份在服务器本机,那和不备份实际上区别也不大。
一、基础知识梳理 MUA (Mail User Agent) MUA 既是"邮件使用者代理人",因为除非你可以直接利用类似 telnet 之类的软件登入邮件主机来主动发出信件,否则您就得要透过 MUA 来帮你送信到邮件主机上头去。 最常见的 MUA 像是 Mozilla 推出的Thunderbird ( 雷鸟 ) 自由软件, 或者是 Linux 桌面 KDE 常见的 Kmail ,及Windows 内件的 Outlook Express (OE) 等 。MUA 主要的功能就是收受邮件主机的电子邮件,以及提供用户浏览与编写邮件的功能!
若postfix已安装好,则会支持这两个功能,若不支持,表示postfix未安装好;CentOS 7开始默认系统自带postfix
大家应该都知道,在Linux系统中,1000以下的UID是系统保留的UID。随意修改系统上某些帐号的 UID 很可能会导致某些程序无法进行,甚至导致系统无法顺利运行。我们可以通过/usr/share/doc/setup-2.8.71/uidgid来查看具体对应关系,当然不同的版本路径可能不一样,可以用/usr/share/doc/setup*/uidgid来通配。
*本文原创作者:yangyangwithgnu,本文属FreeBuf原创奖励计划,未经许可禁止转载
Unix like 系统和 windows 的最大区别就是有一套标准的系统信息数据文件,一般存放在 /etc/ 目录下,并且提供了一组近似的接口访问和查询信息,这些基础设施让系统管理看起来井井有条,下面就来盘点一下。
Linux用户只有两个等级:root及非root。Linux中还有一部分用户,如:apache、mysql、nobody、ftp等,这些也都是非root用户,即普通用户。Linux的权限实际是上不同用户所能访问的文件的不同产生的假象。而这些假象的造成,还要涉及到另外一个概念:用户组
说到 linux 上的文件权限,其实我们在说两个实体,一是文件,二是进程。一个进程能不能访问一个文件,其实由三部分内容决定:
脚本来源:https://github.com/xiaoyunjie/Shell_Script
ansible特性 1.模块化设计,调用特定的模块来完成特定任务 2.基于python语言实现 3.其模块支持JSON、YAML等标准输出格式 4.支持playbook
默认权限需要换算成字母再相减,所有建立文件之后的默认权限,为666减去umask的值
puppet在自动化配置管理方面有很强大的优势,这里就不做过多介绍了,下面记录下几个简单的puppet管理配置: 一、首先在服务端和客户端安装puppet和facter 1)服务端 安装Puppet Labs # rpm -ivh http://yum.puppetlabs.com/el/6.5/products/x86_64/puppetlabs-release-6-12.noarch.rpm 安装Puppet和facter # yum install puppet puppet-server fact
描述:相信各位看友都看了UP主上一篇《Linux运维学习之文件目录属性及权限管理笔记》了吧,此篇将针对文件目录特殊权限等相关命令进行详细讲解,包括文件基本权限与特殊权限。
领取专属 10元无门槛券
手把手带您无忧上云