码迷,mamicode.com
首页 > 其他好文 > 详细

wllpxe

时间:2020-03-30 00:18:02      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:roc   mod   method   address   status   title   安装   lag   location   

1,
vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能生效
停止
systemctl stop firewalld.service
开机禁用
systemctl disable firewalld
reboot
/etc/resolv.conf dns配置
/etc/sysconfig/network-scripts/ifcfg-网卡配置
service network restart

yum -y install vim*

cd /etc/yum.repos.d/CentOS-Base.repo
mkdir文件夹 touch文件
yum clean all
yum makecache
yum update -y

阿里云yum:

CentOS-Base.repo

#

The mirror system uses the connecting IP address of the client and the

update status of each mirror to pick mirrors that are updated to and

geographically close to the client. You should use this for CentOS updates

unless you are manually picking other mirrors.

#

If the mirrorlist= does not work for you, as a fall back you can try the

remarked out baseurl= line instead.

#
#

[base]
name=CentOS-7 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/
http://mirrors.aliyuncs.com/centos/7/os/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-7 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/updates/$basearch/
http://mirrors.aliyuncs.com/centos/7/updates/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-7 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/extras/$basearch/
http://mirrors.aliyuncs.com/centos/7/extras/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/centosplus/$basearch/
http://mirrors.aliyuncs.com/centos/7/centosplus/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#contrib - packages by Centos Users
[contrib]
name=CentOS-7 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/contrib/$basearch/
http://mirrors.aliyuncs.com/centos/7/contrib/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

centos7安装tftp服务器
1.安装
su  #进入root
yum install xinetd
yum install tftp
yum install tftp-server
回到顶部(go to top)
2.配置tftp
vim /etc/xinetd.d/tftp
修改下面红框部分!
server_agrs改为自己准备存放的目录,并修改所设文件夹的权限
disable改为no

default: off

description: The tftp server serves files using the trivial file transfer \

protocol. The tftp protocol is often used to boot diskless \

workstations, download configuration files to network-aware printers, \

and to start the installation process for some operating systems.

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.重启tftp服务
systemctl restart xinetd 启动服务
systemctl enable xinetd.service
systemctl enable xinetd.service 加入开机自动启动服务
回到顶部(go to top)
4.测试tftp
windows下ping一下linux的ip看是否可以通;
ping通之后关闭linux的防火墙: systemctl stop firewalld.service
启动windows客户端。

yum install -y syslinux

cd /usr/share/syslinux/

cd /mnt/cdrom/live

vim /etc/xinetd.d/tftp
systemctl enable xinetd.service
systemctl start xinetd

yum install -y syslinux
cd /usr/share/syslinux/pxelinux.0
cp /usr/share/syslinux/pxelinux.0 /tftpboot

cd /tftpboot/
mkdir pxelinux.cfg
mkdir clonezilla

yum -y install wget

wget https://osdn.net/projects/clonezilla/downloads/72474/clonezilla-live-2.6.5-21-amd64.iso

mkdir cdrom
mount -o loop /root/clonezilla-live-2.6.5-21-amd64.iso /mnt/cdrom/
cp -r /mnt/cdrom/live /tftp
cp /mnt/cdrom/live/initrd.img /tftpboot/clonezilla/
cp /mnt/cdrom/live/vmlinuz /tftpboot/clonezilla/

cd /tftpboot/pxelinux.cfg/
touch fefault
vim default
DEFAULT vesamenu.c32
MENU TITLE ===GUAZI PXE Server ===
menu color title 1;36;44 #ffffffff #00000000 std
MENU DEFAULT
LABEL clonezilla
KERNEL /clonezilla/vmlinuz
APPEND initrd=/clonezilla/initrd.img union=overlay noswap noprompt vga=788 locales=zh_CN.UTF-8 keyboard-layouts=NONE boot=live fetch=http://IP/filesystem.squashfs ocs_repository="nfs://IP/pxenfs/iso"
MENU LABEL Clonezilla
TEXT HELP
This mode will allow you run Clonezilla to Backup/Restore OS!
ENDTEXT
PROMPT 0
TIMEOUT 1

cp /usr/share/syslinux/vesamenu.c32 /tftpboot/
vim /tftpboot/pxelinux.cfg/default

ss -tnulp | grep 111
systemctl start rpcbind
yum install -y nfs-utils

cd /
mkdir -p /pxenfs/clonezilla
mkdir -p /pxenfs/iso

cp -a /mnt/cdrom/. /pxenfs/clonezilla

vim /etc/exports
/pxenfs/clonezilla (ro,sync)
/pxenfs/iso
(rw,sync,no_root_squash)

systemctl enable rpcbind.service
systemctl enable nfs-server.service
systemctl start rpcbind.service
systemctl start nfs-server.service
rpcinfo -p
exportfs -r
exportfs
/pxenfs/clonezilla
<world>
/pxenfs/iso <world>

yum install -y lrzsz
cd /pxenfs/clonezilla/live

yum install httpd
vim /etc/httpd/conf.d/welcome.conf
<LocationMatch "^/+$">
Options +Indexes
ErrorDocument 403 /.noindex.html
</LocationMatch>

<Directory /usr/share/httpd/noindex>
AllowOverride None
Require all granted
</Directory>

vim /etc/httpd/conf/httpd.conf DocumentRoot "/pxenfs/clonezilla/live"

#

Relax access to content within /var/www.

#
<Directory "/pxenfs/clonezilla/live">
AllowOverride None

Allow open access:

Require all granted

</Directory>

Further relax access to the default document root:

<Directory "/pxenfs/clonezilla">

systemctl start httpd
systemctl restart httpd
systemctl enable httpd.service

yum -y install bash-completion

wllpxe

标签:roc   mod   method   address   status   title   安装   lag   location   

原文地址:https://blog.51cto.com/12485428/2482861

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!