ssh –x ip开启远程终端桌面

1、需要右击打开终端,需装这个包:rpm –qa | grep terminal

nautilus-open-terminal-0.17-4.el6.x86_64

gnome-terminal-2.31.3-7.el6.x86_64

下午开始:要求打开SElinux,开机有效:

#vim /etc/sysconfig/selinux

ELINUX=enforcing

#sentenforce 1 (这样做Samba时可以验证是否正确)

1、开启路由转发:

#vim/etc/sysctl.conf

net.ipv4.ip_forword=1(cd/proc/sys/net/ipv4 ,l sip*)

# sysctl-p

1、计划任务:CRON.DNEY

vim /etc/cron.deny

tom

su –tom

验证:cron -e

1FTP允许匿名用户下载:

除去XXX都不允许访问FTPiptables –F ,iptables -X

#iptables –I INPUT –p tcp--dport 21 –s 网段/24–jACCEPT

#iptables–AINPUT–ptcp--dport 21-jREJECT

或者

#iptables –I INPUT –p tcp –dport 21 !-s 网段/24–jREJECT

Service iptables save

1、收发邮件

1

Cd /etc/postfix

vimmain.cf (要改5行,79,83)

79.myhostname = server.domainX.example.com

83 mydomian = domain.example.com

99 myorigin = $mydomain发送邮件的后缀

inet_interfaces = all允许连接的方式(网络)

mydes tination = $myhostname, $mydomain接受邮件的域

发信:mail from: rcpt to: data;

dovecot配置文件要改一处:cd/etc/dovecot/conf.d

[root@ser5 conf.d]# vim 10-mail.conf

mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u

收件:user用户名;pass 密码list retr 序号

1、邮件别名

[root@ser5 ~]# vim /etc/aliases编辑文件

songsongge,songge1209添加指定别名

[root@ser5 ~]# newaliases立即生效

1Samba

[root@ser5 ~]# mkdir /common

[root@ser5 ~]# vim /etc/samba/smb.conf

要复制:# To set a label use the following: chcon -tsamba_share_t /path

workgroup = STAFF

hosts allow = 127. 192.168.12. 192.168.13.

[root@ser5 ~]# vim /etc/samba/smb.conf

[common]

path = /common

browseable = yes

valid users = tom,jim

write list = tom

[root@ser5 ~]# smbpasswd -a tom若报错10行左右

[root@ser5 ~]# smbpasswd -x tom删掉

root@ser5 ~]# smbclient -L 172.16.9.25

做出来SELINUX

[root@ser5 ~]# chcon -t samba_share_t/common

1NFS 共享 /common

[root@ser5 etc]# vim /etc/exports

启动nfs前先启动RPC服务(6.3中提供rpc服务的软件叫rpcbind

Service rpcbind start

Service nfs restart

Showmount –e IP

1SSH

1题不做,直接做第二题

iptables –L I NPUT –p tcp –dport 22 –s172.0.0.1/24–jREJECT

serviceiptablessave

十一1Apache虚拟主机----拒绝某个IP访问子网(***/abc)

  1. 下载主页index.html

  2. 做两个虚拟主机验证:curl http://域名

  3. 两个虚拟主机根目录下都做:

<Directory“****/abc”>

Orderaloow ,deny

Allowfromip

Allowfrom 127.0.0.1

</Directory >

十二1、脚本:case,报错,参数,回显

#!/bin/bash

case$1in

kernel)

echo”user”

;;

user)

echo“kernel”

;;

*)

echo”Usage:$0kernel1|user”

esac

请创建一个/root/program脚本,XXX

chmod+x/root/program

.

Vim /etc/fatab

/root/*/mnt/*iso9660default,loop0 0

Vim /boot/grub/grub.conf

Kernel后面添加panic =1(panic内核崩溃多久重启)

iscsi

mkfs.vsft