标签:roc mod method address status title 安装 lag location
1,yum -y install vim*
cd /etc/yum.repos.d/CentOS-Base.repo
mkdir文件夹 touch文件
yum clean all
yum makecache
yum update -y
阿里云yum:
#
#
#
#
[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
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"
#
#
<Directory "/pxenfs/clonezilla/live">
AllowOverride None
Require all granted
</Directory>
<Directory "/pxenfs/clonezilla">
systemctl start httpd
systemctl restart httpd
systemctl enable httpd.service
yum -y install bash-completion
标签:roc mod method address status title 安装 lag location
原文地址:https://blog.51cto.com/12485428/2482861