远程安装CentOS


远程安装CentOS(请先把防火墙和SELinux关掉)
说明默认情况下面是Fedora是开启SELinux,如果dhcp已经开始,客户端一直获取不到,有可能是SELinux没有关闭
centos和RedHat关闭SELinux比较简单,fedora说明下
1、查看SELinux是否启动
getenforce (如果为Enforcing,表示SELinux已经启动)
2、进入 vim /etc/selinux/config
SELINUX=disabled
下次启动的时候,selinux就关掉了
3、停止 SELinux
setenforce 0

getenforce(显示为Permissive)e

 

一、配置服务

1、安装dhcpd 服务(本机的ip为:192.168.5.2,如果不同做相应的修改)
rpm -qa|grep dhcp
rpm -ivh dhcp-3.0.5-23.el5.i386.rpm
vim /etc/dhcpd.conf

option space PXE; #DHCP对PXE的TFTP(琐碎文件传输协议)应答选项
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
filename "pxelinux.0"; #指定客户端所需要的的bootstrap(引导器)文件名
next-server 192.168.5.2; #指定TFTP服务器的IP地址
}

ddns-update-style interim;
ignore client-updates;
default-lease-time 1200;
max-lease-time 9200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.5.255;
option routers 192.168.5.254;
option domain-name-servers 192.168.5.254;
subnet 192.168.5.0 netmask 255.255.255.0 {
range 192.168.5.100 192.168.5.150;
}

2、安装tftpboot
rpm -qa|grep tftp
tftp-server-0.49-2.el5.centos
rpm -ivh tftp-server-0.49-2.el5.centos.i386.rpm
(说明如果xinetd没有安装,要先把xinetd安装)
修改配置:disable = yes(改为no)
查看server_args 目录,如果不是/tftpboot,改为/tftpboot目录
vim /etc/xinetd.d/tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}

3、安装vsftp
rpm -qa|grep vsftp
vsftpd-2.0.5-16.el5_4.1
测试vsftp:
[root@GD-CentOS ~]# ftp 127.0.0.1
Connected to 127.0.0.1.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (127.0.0.1:root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

  • 1
  • 2
  • 下一页

相关内容

    暂无相关文章