湖濱散記部落格的樹心幽徑[login][主頁]
249:20120913設定SELinux

[webadm@dns ~]$ mkdir lnx
[webadm@dns ~]$ su
密碼:
[root@dns webadm]# system-config-network-tui
[root@dns webadm]# /etc/rc.d/init.d/network restart
Restarting network (via systemctl):                        [  確定  ]
[root@dns webadm]#
[root@dns webadm]# /etc/rc.d/init.d/network restart
Restarting network (via systemctl):                        [  確定  ]
[root@dns webadm]# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 252  bytes 21668 (21.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 252  bytes 21668 (21.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

p5p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::5ef3:fcff:fe2b:eabf  prefixlen 64  scopeid 0x20<link>
        ether 5c:f3:fc:2b:ea:bf  txqueuelen 1000  (Ethernet)
        RX packets 215917  bytes 20775982 (19.8 MiB)
        RX errors 0  dropped 9068  overruns 0  frame 0
        TX packets 396  bytes 43590 (42.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  memory 0x91a80000-91aa0000 

p7p1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 5c:f3:fc:2b:ea:c0  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  memory 0x91980000-919a0000 

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.95.120  netmask 255.255.255.0  broadcast 169.254.95.255
        inet6 fe80::5cf3:fcff:fe2b:eac2  prefixlen 64  scopeid 0x20<link>
        ether 5e:f3:fc:2b:ea:c2  txqueuelen 1000  (Ethernet)
        RX packets 13925  bytes 940556 (918.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7006  bytes 339933 (331.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether ae:b4:59:27:39:d3  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@dns webadm]# reboot


[root@dns webadm]# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 436  bytes 38574 (37.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 436  bytes 38574 (37.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

p5p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 163.25.20.81  netmask 255.255.255.0  broadcast 163.25.20.255
        inet6 fe80::5ef3:fcff:fe2b:eabf  prefixlen 64  scopeid 0x20<link>
        ether 5c:f3:fc:2b:ea:bf  txqueuelen 1000  (Ethernet)
        RX packets 103637  bytes 149627915 (142.6 MiB)
        RX errors 0  dropped 274  overruns 0  frame 0
        TX packets 57157  bytes 4207471 (4.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  memory 0x91a80000-91aa0000 

p7p1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::5ef3:fcff:fe2b:eac0  prefixlen 64  scopeid 0x20<link>
        ether 5c:f3:fc:2b:ea:c0  txqueuelen 1000  (Ethernet)
        RX packets 312  bytes 33176 (32.3 KiB)
        RX errors 0  dropped 18  overruns 0  frame 0
        TX packets 59  bytes 9644 (9.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  memory 0x91980000-919a0000 

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.95.120  netmask 255.255.255.0  broadcast 169.254.95.255
        inet6 fe80::5cf3:fcff:fe2b:eac2  prefixlen 64  scopeid 0x20<link>
        ether 5e:f3:fc:2b:ea:c2  txqueuelen 1000  (Ethernet)
        RX packets 450  bytes 30618 (29.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 226  bytes 23028 (22.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether ea:59:61:13:9a:f9  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@dns webadm]# ping 163.25.20.1
PING 163.25.20.1 (163.25.20.1) 56(84) bytes of data.
64 bytes from 163.25.20.1: icmp_req=1 ttl=128 time=0.307 ms
64 bytes from 163.25.20.1: icmp_req=2 ttl=128 time=0.330 ms
^C
--- 163.25.20.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.307/0.318/0.330/0.021 ms



[root@dns webadm]# vi /etc/sysconfig/selinux
[root@dns webadm]# cat /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
# SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted


[root@dns webadm]#




select id,article_id,topic,text from lt_articles_text where article_id =249; ok. update lt_articles set num_reads=num_reads +1 where id=249; ok.