摘要: a, b, c = 1, 2, 3 【对比Cpp里:c = a >b? a:b】这个写法,Python只能常规的空行,缩进吗? 人生苦短,我用python,下面介绍几种if的方便的方法。 1.常规 2.表达式 3.二维列表 ·························· 阅读全文
posted @ 2016-12-09 16:37 zhming 阅读(30713) 评论(0) 推荐(1) 编辑
摘要: CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。 1、关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firew 阅读全文
posted @ 2016-12-09 16:23 zhming 阅读(838) 评论(0) 推荐(0) 编辑
摘要: 在之前的版本中关闭防火墙等服务的命令是 service iptables stop /etc/init.d/iptables stop 在RHEL7中,其实没有这个服务 [root@rhel7 ~]# cat /etc/redhat-release Red Hat Enterprise Linux 阅读全文
posted @ 2016-12-09 16:22 zhming 阅读(1740) 评论(0) 推荐(0) 编辑
摘要: 需要安装rabbitmq-c,rabbitmq-c是一个用于C语言的,与AMQP server进行交互的client库。下载了v0.5.2版本(https://github.com/alanxz/rabbitmq-c/releases/download/v0.5.2/rabbitmq-c-0.5.2 阅读全文
posted @ 2016-12-09 16:05 zhming 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 在CentOS或RHEL中,有三种定义的主机名:a、静态的(static),b、瞬态的(transient),以及 c、灵活的(pretty)。“静态”主机名也称为内核主机名,是系统在启动时从/etc/hostname自动初始化的主机名。“瞬态”主机名是在系统运行时临时分配的主机名,例如,通过DHC 阅读全文
posted @ 2016-12-09 15:31 zhming 阅读(875) 评论(0) 推荐(0) 编辑