linux乱记

#查看防火墙状态

[root@CentOs57 ~]# /etc/init.d/iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination        

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination        

 

#启动防火墙

[root@CentOs57 ~]# /etc/init.d/iptables start
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading iptables modules:                                [  OK  ]
[root@CentOs57 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        

#设置防火墙开机启动

[root@CentOs57 ~]# chkconfig iptables on

 

#设置开机启动是否成功(2到5均为on表示成功)
[root@CentOs57 ~]# chkconfig --list iptables
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off


[root@CentOs57 ~]#

 

在线安装openldap

[root@CentOs57 ~]# rpm -qa|grep openldap
openldap-devel-2.3.43-3.el5
openldap-2.3.43-3.el5
openldap-clients-2.3.43-3.el5
You have new mail in /var/spool/mail/root
[root@CentOs57 ~]# yum install openldap openldap-servers openldap-clients

#更改默认邮寄发送程序

[root@CentOs57 pam.d]# alternatives --config mta

There are 2 programs which provide 'mta'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/sbin/sendmail.sendmail
   2           /usr/sbin/sendmail.postfix

Enter to keep the current selection[+], or type selection number:
[1]+  Stopped                 alternatives --config mta
You have new mail in /var/spool/mail/root

 

#linux查找某文件

[root@redhat170 dovecot-2.0.2]# find / -name dovecot.conf

 

#sasldb创建账号

[root@redhat170 skel]# saslpasswd2 -c -u `postconf -h myhostname` test
Password:
Again (for verification):

 

#查看sasldb已有账号

[root@redhat170 skel]# sasldblistusers2
test@redhat: userPassword

 

#OpenLDAP使用的ldif文件示例, 注意空格

dn: dc=example,dc=com
objectclass: dcobject
objectclass: organization
o: example
dc: example

dn: cn=Jephe Wu,dc=example,dc=com
objectclass: inetorgperson
cn: Jephe Wu
sn: Wu
mail: jephe_wu@yourdomain.com

 

#导入ldif文件

ldapadd -x -D "cn=Manager,dc=example,dc=com" -w password -f example.ldif

 #查找所有object

ldapsearch -x -b 'dc=example,dc=com' '(objectclass=*)'

 

#查看postfix是否编译了dovecot, 如果看到了dovecot。即是编译了

[root@alattin sasl2]# postconf -a
cyrus
dovecot

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值