DIỄN ĐÀN NÂNG TẦM TRI THỨC
Would you like to react to this message? Create an account in a few clicks or log in to continue.

CẤU HÌNH CƠ BẢN TRÊN CENTOS 6.0

Go down

CẤU HÌNH CƠ BẢN TRÊN CENTOS 6.0 Empty CẤU HÌNH CƠ BẢN TRÊN CENTOS 6.0

Post  chantroitinhoc Sun Sep 18, 2011 10:50 pm

1. Tắt Firewall:
[root@dns ~]# /etc/rc.d/init.d/iptables stop
[root@dns ~]# chkconfig iptables off
[root@dns ~]# chkconfig ip6tables off

2. Tắt SELinux:
[root@dns ~]# vi /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 - SELinux is fully disabled.

SELINUX=disabled

# SELINUXTYPE= type of policy in use. Possible values are:
#targeted - Only targeted network daemons are protected.
#strict - Full SELinux protection.

SELINUXTYPE=targeted

3. Cấu hình IP tĩnh cho máy Server:
[root@dns ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=00:50:43:00:3B:AE
ONBOOT=yes
# add lines as follows
BOOTPROTO=none
# this server's IP address
IPADDR=192.168.100.100
# subnet mask
NETMASK=255.255.255.0
TYPE=Ethernet
# default gateway
GATEWAY=192.168.100.1
# DNS server's IP address
DNS1=192.168.100.101
IPV6INIT=no
USERCTL=no

[root@dns ~]# /etc/rc.d/init.d/network restart

[root@dns ~]# chkconfig network on

[root@dns ~]# ifconfig

4. Thay đổi tên máy:
[root@dns ~]# hostname
[root@dns ~]# uname -n
[root@dns ~]# dnsdomainname

[root@dns ~]# vi /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=dns.ispace.com

[root@dns ~]# reboot

Chúng ta có thể bắt tự cập nhật mà không cần phải khởi động lại
[root@dns ~]# source /etc/sysconfig/network
[root@dns ~]# hostname $HOSTNAME
chantroitinhoc
chantroitinhoc
Admin

Posts : 149
Join date : 2008-01-16

http://chantroitinhoc.niceboard.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum