• pxe+preseed安装配置


    Ubuntu Server 部署手册


    pxe+tftp+vsftp+apache2


    =======================================================================

    服务器配置


    TFTP配置


    安装tftp

    apt-get install tftp-hpa tftpd-hpa ,或者

    apt-get install tftp-hpa tftpd-hpa xinetd



    配置TFTP

    TFTP有两种应用方式,一种作为独立的服务,一种作为xinetd存在。

    作为独立服务需配置/etc/default/tftpd-hpa

    ##注:要先安装xinetd,再安装tftp-hpa,tftpd-hpa

    若通过xinetd启动,需要将/etc/default/tftpd-hpa改名或删除,创建/etc/xinetd.d/tftp文件

    touch /etc/xinetd.d/tftp

    添加如下内容:

    service tftp

    {

    socket_type = dgram

    protocol = udp

    wait = yes

    user = root

    server = /usr/sbin/in.tftpd

    server_args = -s /tftpboot //指定tftp根目录

    disable = no

    per_source = 11

    cps = 100 2

    flags = IPv4

    }


    启动TFTP

    service xinetd restart

    /etc/init.d/xinetd restart

    查看TFTP状态

    netstat -tnplu |grep 69

    显示如下表明正常

    udp 0 0 0.0.0.0:69 0.0.0.0:* 25003/xinetd


    测试TFTP

    tftp localhost

    trace

    get xxx.xx


    看是否能够正常获取文件。

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    DHCP配置


    DHCP安装

    apt-get install isc-dhcp-server isc-dhcpd-common isc-dhcpd-client


    DHCP配置

    配置文件位置,/etc/dhcp/dhcpd.conf


    DHCP配置案例

    ddns-update-style none;

    option domain-name-servers 8.8.8.8; //注:若不加此行,则自动安装过程中出现问题2.C

    default-lease-time 600;

    max-lease-time 7200;

    log-facility local7;


    allow bootp;

    allow booting;


    subnet 192.168.100.0 netmask 255.255.255.0 {

    range 192.168.100.85 192.168.100.99;

    option subnet-mask 255.255.255.0;

    option routers 192.168.100.1;

    next-server 192.168.100.1; ##TFTP Server的地址

    filename "pxelinux.0"; ##文件放在tftp文件夹的根目录,即/tftpboot目录下

    }



    host client1 {

    hardware ethernet a4:1f:72:60:24:9d;

    fixed-address 192.168.100.120; #指定ip地址

    option host-name "client1"; # 指定主机名

    }



    在文件/etc/default/isc-dhcp-server中指定监听的网卡,比如


    INTERFACES="eth0"


    1

    dhcp的一些配置选项

    option(选项):
    subnet-mask
    为客户端设定子网掩码
    domain-name
    为客户端指明DNS名字
    domain-name-servers
    为客户端指明DNS服务器IP地址
    host-name
    为客户端指定主机名称
    routers
    为客户端设定默认网关
    broadcast-address
    为客户端设定广播地址
    ntp-server
    为客户端设定网络时间服务器IP地址
    time
    offset 为客户端设定和格林威治时间的偏移时间,单位是秒。



    parameters(参数):
    ddns-update-style
    配置DHCP-DNS互动更新模式
    default-lease-time
    指定缺省租赁时间的长度,单位是秒
    max-lease-time
    指定最大租赁时间长度,单位是秒
    hardware
    指定网卡接口类型和MAC地址
    server-name
    通知DHCP客户服务器名称
    get-lease-hostnames flag
    检查客户端使用的IP地址
    fixed-address ip
    分配给客户端一个固定的地址
    authritative
    拒绝不正确的IP地址的要求

    declarations(声明):
    shared-network
    用来告知是否一些子网络分享相同网络
    subnet
    描述一个IP地址是否属于该子网
    range
    起始IP 终止IP 提供动态分配IP 的范围
    host
    主机名称 参考特别的主机
    group
    为一组参数提供声明
    allow unknown-clients
    deny unknown-client 是否动态分配IP给未知的使用者
    allow bootp
    deny bootp 是否响应激活查询
    allow booting
    deny booting 是否响应使用者查询
    filename
    开始启动文件的名称,应用于无盘工作站
    next-server
    设置服务器从引导文件中装如主机名,应用于无盘工作站



    2

    一些与DHCP设定有关的问题:

    A:提示continue without a default route

    解决方法:在dhcp配置文件的subnet中添加 option routers 192.168.100.1;

    B:无法指定主机名和网路:

    解决方法:在配置文件中添加

    fixed-address 192.168.100.120; #指定ip地址

    option host-name "client1"; # 指定主机名


    C:name server addresses 提示

    解决方法,在/etc/dhcp/dhcpd.conf文件中添加

    option domain-name-servers 8.8.8.8;


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    vsftp服务的搭建


    安装

    apt-get install vsftpd


    配置

    配置文件/etc/vsftpd.conf


    listen=YES

    anonymous_enable=YES

    local_enable=YES

    dirmessage_enable=YES

    use_localtime=YES

    xferlog_enable=YES

    connect_from_port_20=YES

    secure_chroot_dir=/var/run/vsftpd/empty

    pam_service_name=vsftpd

    rsa_cert_file=/etc/ssl/private/vsftpd.pem


    no_anon_password=YES


    ##注:使用usermod -d /var/www/ubuntu ftp


    vsftpd也存在两种运行模式,xinetd(super daemon)和独立运行模式,像其它守护程序一样,vsftpd提供了standaloneinetdinetdxinetd)两种运行模式。简单解释一下, standalone一次性启动,运行期间一直驻留在内存中,优点是对接入信号反应快,缺点是损耗了一定的系统资源,因此经常应用于对实时反应要求较高的 专业FTP服务器。inetd恰恰相反,由于只在外部连接发送请求时才调用FTP进程,因此不适合应用在同时连接数量较多的系统。此外,inetd模式不 占用系统资源。除了反应速度和占用资源两方面的影响外,vsftpd还提供了一些额外的高级功能,如inetd模式支持per_IP(单一IP)限制,而 standalone模式则更有利于PAM验证功能的应用。


    在我们的系统中,默认使用standalone模式,即在/etc/xinetd.d/目录下没有vsftp文件,若要开启super daemon模式,需要

    一,修改vsftpd.conflisten=NO

    二,添加/etc/xinetd.d/vsftp文件,添加

    service ftp

    	{
            	socket_type             = stream
            	wait                    = no
            	user                    = root
            	server                  = /usr/sbin/vsftpd
            	log_on_success          += DURATION USERID
            	log_on_failure          += USERID
            	nice                    = 10
            	disable                 = no
    	}
    	三,停止vsftpd
    		service vsftpd stop
    	四,启动xinetd
    		service xinetd start
    
    
    附:
    配置文件参数说明:
    listen=<YES/NO> :设置为YESvsftpd以独立运行方式启动,设置为NO时以xinetd方式启动(xinetd是管理守护进程的,将服务集中管理,可以减少大量服务的资源消耗)
    listen_port=<port> :设置控制连接的监听端口号,默认为21
    listen_address=<ip address> :将在绑定到指定IP地址运行,适合多网卡
    connect_from_port_20=<YES/NO> :若为YES,则强迫FTPDATA的数据传送使用port 20,默认YES
    pasv_enable=<YES/NO> :是否使用被动模式的数据连接,如果客户机在防火墙后,请开启为YES
    pasv_min_port=<n>
    pasv_max_port=<m> :设置被动模式后的数据连接端口范围在nm之间,建议为5000060000端口
    message_file=<filename> :设置使用者进入某个目录时显示的文件内容,默认为 .message
    dirmessage_enable=<YES/NO> :设置使用者进入某个目录时是否显示由message_file指定的文件内容
    ftpd_banner=<message> :设置用户连接服务器后的显示信息,就是欢迎信息
    banner_file=<filename> :设置用户连接服务器后的显示信息存放在指定的filename文件中
    connect_timeout=<n> :如果客户机连接服务器超过N秒,则强制断线,默认60
    accept_timeout=<n> :当使用者以被动模式进行数据传输时,服务器发出passive port指令等待客户机超过N秒,则强制断线,默认60
    accept_connection_timeout=<n> :设置空闲的数据连接在N秒后中断,默认120
    data_connection_timeout=<n> : 设置空闲的用户会话在N秒后中断,默认300
    max_clients=<n> : 在独立启动时限制服务器的连接数,0表示无限制
    max_per_ip=<n> :在独立启动时限制客户机每IP的连接数,0表示无限制(不知道是否跟多线程下载有没干系)
    local_enable=<YES/NO> :设置是否支持本地用户帐号访问
    guest_enable=<YES/NO> :设置是否支持虚拟用户帐号访问
    write_enable=<YES/NO> :是否开放本地用户的写权限
    local_umask=<nnn> :设置本地用户上传的文件的生成掩码,默认为077
    local_max_rate<n> :设置本地用户最大的传输速率,单位为bytes/sec,值为0表示不限制
    local_root=<file> :设置本地用户登陆后的目录,默认为本地用户的主目录
    chroot_local_user=<YES/NO> :当为YES时,所有本地用户可以执行chroot
    chroot_list_enable=<YES/NO> 
    chroot_list_file=<filename> :chroot_local_user=NO chroot_list_enable=YES时,只有filename文件指定的用户可以执行chroot
    anonymous_enable=<YES/NO> :设置是否支持匿名用户访问
    anon_max_rate=<n> :设置匿名用户的最大传输速率,单位为B/s,值为0表示不限制
    anon_world_readable_only=<YES/NO> 是否开放匿名用户的浏览权限
    anon_upload_enable=<YES/NO> 设置是否允许匿名用户上传
    anon_mkdir_write_enable=<YES/NO> :设置是否允许匿名用户创建目录
    anon_other_write_enable=<YES/NO> :设置是否允许匿名用户其他的写权限(注意,这个在安全上比较重要,一般不建议开,不过关闭会不支持续传)
    anon_umask=<nnn> :设置匿名用户上传的文件的生成掩码,默认为077
    
    允许匿名用户的设置:
    打开vsftpd.conf文件,添加
    anonymous_enable=YES(允许匿名用户访问)
    允许匿名用户上传:
    write_enable=YES
    anon_mkdir_write_enable=YES
    anon_upload_enable=YES

    注意2点:

    1.匿名用户就是ftp,想要匿名用户写入,必须文件夹的权限为ftp可写。

    2.匿名用户的根目录不允许,所以根目录的权限绝对不能是ftp可写和其他用户可写,如果根目录所有者为ftp的话,所有者的权限也不能写。

    所以解决方法是建个单独的public文件夹用于上传文件,设置其为ftp可写或”其他用户可写“

    还可建个download文件夹只用于下载,设置其他用户没有写权限便可。

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    netboot设置
    1.挂在ubuntu-server.iso,并将netboot文件夹拷入/tftpboot
    mount -o loop /media/Work/LinuxDistribution/Ubuntu12.0.4/ubuntu-12.04.2-server-amd64.iso /mnt/
    cd /mnt/install/netboot
    cp * /tftpboot
    ll /tftpboot
    drwxrwxrwx  4 root root 4096  821 13:41 ./ 
    drwxr-xr-x 27 root root 4096  822 09:49 ../ 
    lrwxrwxrwx  1 root root   33  815 16:53 pxelinux.0 -> ubuntu-installer/amd64/pxelinux.0* 
    lrwxrwxrwx  1 root root   35  815 16:53 pxelinux.cfg -> ubuntu-installer/amd64/pxelinux.cfg/ 
    drwxrwxrwx 11 root root 4096  820 13:55 ubuntu/ 
    drwxrwxrwx  3 root root 4096  815 16:53 ubuntu-installer/ 
    -rwxrwxrwx  1 root root   58  815 16:53 version.info* 
    
    修改 /tftpboot/pxelinux.cfg/default文件
    # D-I config version 2.0 
    include ubuntu-installer/amd64/boot-screens/menu.cfg 
    default ubuntu-installer/amd64/boot-screens/vesamenu.c32 
    prompt 1    
    timeout 100    #超时时间是10s
    default linux 
    
    LABEL linux 
        menu label ^install from netboot 
        kernel ubuntu-installer/amd64/linux 
        append initrd=ubuntu-installer/amd64/initrd.gz ramdisk_size=100000 auto=true priority=critical interface=auto netcfg/no_default_route=true preseed/url=http://192.168.100.1/preseed.cfg 
    注:必须有auto=true priority=critical
    关于autopriority的解释
    The auto boot choice is not yet defined on all arches. The same effect may be achieved by simply adding the two parameters auto=true priority=critical to the kernel command line. The auto kernel parameter is an alias for auto-install/enable and setting it to true delays the locale and keyboard questions until after there has been a chance to preseed them, while priority is an alias for debconf/priority and setting it to critical stops any questions with a lower priority from being asked. 
    对于dhcp来说
    Additional options that may be of interest while attempting to automate an install while using DHCP are: interface=auto netcfg/dhcp_timeout=60 which makes the machine choose the first viable NIC and be more patient about getting a reply to its DHCP query. 
    Preseed文件使用web server 获取到,所以还需要安装apache,但这个配置比较简单。
    Prompt 0 不显示启动提示
    prompt 1显示启动提示
    
    
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    preseed文件
    配置例子
    # Locale sets language and country. 
    d-i debian-installer/locale string en_US #应该时zh_CN
    
    # Keyboard selection. 
    d-i console-setup/ask_detect boolean false 
    d-i console-setup/layoutcode string us 
    
    # Network configuration. #注,在netboot模式下,网络设置不起作用,需要在dhcp中设定用户名密码,
    d-i netcfg/choose_interface select eth0 
    d-i netcfg/dhcp_timeout string 60 
    d-i netcfg/get_hostname string libvert 
    d-i netcfg/get_domain string libvert 
    d-i netcfg/no_default_route boolean true 
    # Mirror settings  #安装文件镜像设置,使用ftp协议,路径必须是相对于vsftp根目录的相对路径?
    d-i mirror/protocol string ftp 
    d-i mirror/ftp/hostname string 192.168.100.1 
    d-i mirror/ftp/directory string /srv/ftp/ubuntudir 
    #d-i mirror/ftp/proxy string 
    
    # Clock and time zone setup 
    d-i clock-setup/utc boolean false 
    d-i time/zone string Asia/Shanghai 
    
    # Partitioning ###区设定,这个要注意
    d-i partman-auto/method string lvm 
    d-i partman-lvm/device_remove_lvm boolean true 
    d-i partman-md/device_remove_md boolean true 
    d-i partman-lvm/confirm boolean true 
    d-i partman/choose_partition select finish 
    d-i partman-auto-lvm/guided_size string max 
    d-i partman-auto/choose_recipe select atomic 
    d-i partman/confirm_write_new_label boolean true 
    d-i partman/confirm boolean true 
    d-i partman/confirm_nooverwrite boolean true 
    
    #add new 
    d-i partman-lvm/confirm boolean true 
    d-i partman-lvm/confirm_nooverwrite boolean true 
    d-i partman-auto-lvm/guided_size string max 
    # Base system installation 
    d-i base-installer/kernel/image string linux-generic 
    
    # Account setup 
    d-i passwd/root-login boolean true 
    d-i passwd/root-password password 123456 
    d-i passwd/root-password-again password 123456 
    d-i passwd/make-user boolean false  
    d-i user-setup/encrypt-home boolean false 
    d-i user-setup/allow-password-weak boolean true  #允许weakpassword
    
    # Package selection 
    tasksel tasksel/first multiselect standard, ubuntu-server 
    d-i pkgsel/include string openssh-server 
    d-i pkgsel/upgrade select none 
    d-i pkgsel/language-packs multiselect en, zh 
    d-i pkgsel/update-policy select none 
    
    # Boot loader installation 
    d-i grub-installer/only_debian boolean true 
    
    # Finishing up the installation 
    d-i finish-install/reboot_in_progress note 
    
    注:

    A

    初次安装时,提出# Write the changes to disks and configure LVM?

    解决办法:

    d-i partman-lvm/confirm boolean true
    d-i partman-lvm/confirm_nooverwrite boolean true
    d-i partman-auto-lvm/guided_size string max



    B 
    raid的创建:一个案例
    I fixed the problem with the following configuration:

    d-i partman-md/device_remove_md    boolean true
    d-i partman-auto/method string raid
    d-i partman-auto/disk string /dev/sda /dev/sdb
    d-i partman-auto/expert_recipe string
          multiraid ::                                        
                  10000 5000 20000 raid                       
                          $primary{ } method{ raid }          
                  .                                           
                  200 512 500 raid                            
                          $primary{ } method{ raid }          
                  .                                           
                  2000 512 4000 raid                          
                          method{ raid }                      
                  .                                           
                  10000 512 15000 raid                        
                          method{ raid }                      
                  .                                           
                  10000 10000 1000000000 raid                 
                          method{ raid }                      
                  .

    d-i partman-auto-raid/recipe string
        1 2 0 ext4 /               
              /dev/sda1#/dev/sdb1      
        .                              
        1 2 0 ext4 /boot               
              /dev/sda2#/dev/sdb2      
        .                              
        1 2 0 swap -                   
              /dev/sda5#/dev/sdb5      
        .                              
        1 2 0 ext4 /backup             
              /dev/sda6#/dev/sdb6      
        .                              
        1 2 0 ext4 /opt                
              /dev/sda7#/dev/sdb7      
        .


    d-i mdadm/boot_degraded boolean true
    d-i partman-md/confirm_nooverwrite boolean true
    d-i partman-md/confirm boolean true
    d-i partman-partitioning/confirm_write_new_label boolean true
    d-i partman/choose_partition select finish
    d-i partman/confirm boolean true
    d-i partman/confirm_nooverwrite boolean true
    初始配置:(报错) I intend to create the following RAID 1:

        Partition    Size         Filesystem
            /        20GB            ext4
            /boot    500MB            ext4
            swap    2GB            swap
           /backup    10GB            ext4
           /opt     all free size     ext4

    I have triyng this configuration:

        d-i partman-md/device_remove_md    boolean true
        d-i partman-auto/method string raid
        d-i partman-auto/disk string /dev/sda /dev/sdb
        d-i partman-auto/expert_recipe string
              multiraid ::                                        
                      10000 5000 20000 raid                       
                              $primary{ } method{ raid }          
                      .                                           
                      200 512 500 raid                            
                              method{ raid }                      
                      .                                           
                      2000 512 4000 raid                          
                              method{ raid }                      
                      .                                           
                      10000 512 15000 raid                        
                              method{ raid }                      
                      .                                           
                      10000 10000 1000000000 raid                 
                              method{ raid }                      
                      .
       
        d-i partman-auto-raid/recipe string
            1 2 0 ext4 /                   
                  /dev/sda1#/dev/sdb1      
            .                              
            1 2 0 ext4 /boot               
                  /dev/sda2#/dev/sdb2      
            .                              
            1 2 0 swap                     
                  /dev/sda3#/dev/sdb3      
            .                              
            1 2 0 ext4 /backup             
                  /dev/sda5#/dev/sdb5      
            .                              
            1 2 0 ext4 /opt                
                  /dev/sda6#/dev/sdb6      
            .
       
       
        d-i mdadm/boot_degraded boolean true
        d-i partman-md/confirm_nooverwrite boolean true
        d-i partman-md/confirm boolean true
        d-i partman-partitioning/confirm_write_new_label boolean true
        d-i partman/choose_partition select finish
        d-i partman/confirm boolean true
        d-i partman/confirm_nooverwrite boolean true

    The setup displays a RAID configuration error and ask me to check the syslog file.

    Could you help me?

    Thanks!
    C 一个raid+lvm的例子 地址: https://github.com/ahamilton55/Blog-Scripts/blob/master/debian_ubuntu_preseeds/ubuntu-raid1-lvm.preseed d-i debian-installer/locale string en_US.UTF-8 d-i debian-installer/splash boolean false d-i debian-installer/language string en d-i debain-installer/country string US d-i console-setup/ask_detect boolean false d-i console-setup/layoutcode string us d-i netcfg/get_nameservers string d-i netcfg/get_ipaddress string d-i netcfg/get_netmask string 255.255.255.0 d-i netcfg/get_gateway string d-i netcfg/confirm_static boolean true d-i netcfg/get_hostname string myhost d-i mirror/country string manual d-i mirror/http/hostname string mirrors.usc.edu d-i mirror/http/directory string /pub/linux/distributions/ubuntu d-i mirror/http/proxy string d-i partman-auto/disk string /dev/sda /dev/sdb d-i partman-auto/method string raid d-i partman-lvm/device_remove_lvm boolean true d-i partman-md/device_remove_md boolean true d-i partman-lvm/confirm boolean true d-i partman-auto/choose_recipe select boot-root d-i partman-auto-lvm/new_vg_name string vg00 d-i partman-auto-lvm/guided_size string 30GB d-i partman-auto/expert_recipe string boot-root :: 1024 30 1024 raid $lvmignore{ } $primary{ } method{ raid } . 1000 35 100000000 raid $lvmignore{ } $primary{ } method{ raid } . 19000 50 20000 ext4 $defaultignore{ } $lvmok{ } lv_name{ root } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . 2048 60 2048 swap $defaultignore{ } $lvmok{ } lv_name{ swap } method{ swap } format{ } . # Last you need to specify how the previously defined partitions will be # used in the RAID setup. Remember to use the correct partition numbers # for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported; # devices are separated using "#". # Parameters are: # <raidtype> <devcount> <sparecount> <fstype> <mountpoint> # <devices> <sparedevices> d-i partman-auto-raid/recipe string 1 2 0 ext2 /boot /dev/sda1#/dev/sdb1 . 1 2 0 lvm - /dev/sda2#/dev/sdb2 . d-i mdadm/boot_degraded boolean false d-i partman-md/confirm boolean true d-i partman-partitioning/confirm_write_new_label boolean true d-i partman/choose_partition select Finish partitioning and write changes to disk d-i partman/confirm boolean true d-i partman-md/confirm_nooverwrite boolean true d-i partman/confirm_nooverwrite boolean true d-i clock-setup/utc boolean true d-i clock-setup/ntp boolean true d-i clock-setup/ntp-server string ntp.ubuntu.com d-i time/zone string US/Los_Angeles d-i base-installer/kernel/image string linux-server d-i passwd/root-login boolean true d-i passwd/root-password-crypted password <######## enter hash here #########> d-i passwd/user-uid string d-i passwd/user-fullname string Ubuntu User d-i passwd/username string ubuntu d-i passwd/user-password-crypted password <######## enter hash here #########> d-i user-setup/allow-password-weak boolean false d-i user-setup/encrypt-home boolean false d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare d-i apt-setup/services-select multiselect security d-i apt-setup/security_host string security.ubuntu.com d-i apt-setup/security_path string /ubuntu d-i debian-installer/allow_unauthenticated string false d-i pkgsel/upgrade select safe-upgrade d-i pkgsel/language-packs multiselect d-i pkgsel/update-policy select none d-i pkgsel/updatedb boolean true tasksel tasksel/first multiselect standard, openssh-server d-i grub-installer/skip boolean false d-i lilo-installer/skip boolean false d-i grub-installer/only_debian boolean true d-i grub-installer/with_other_os boolean false d-i finish-install/keep-consoles boolean false d-i finish-install/reboot_in_progress note d-i cdrom-detect/eject boolean true d-i debian-installer/exit/halt boolean false d-i debian-installer/exit/poweroff boolean false d-i pkgsel/include string vim openssh-server postfix postfix/main_mailer_type select Local only postfix postfix/root_address string root@localhost postfix postfix/mynetworks string 127.0.0.0/8 postfix postfix/mailbox_limit string 51200000 postfix postfix/protocols select ipv4 postfix postfix/mailname string myhost.local d-i preseed/late_command string in-target sed -i 's/iface eth0 inet dhcp/iface eth0 inet static/g' /etc/network/interfaces; echo " address 192.168.105.160" >> /target/etc/network/interfaces; echo " netmask 255.255.255.0" >> /target/etc/network/interfaces; echo " " >> /target/etc/network/interfaces; echo "auto eth1" >> /target/etc/network/interfaces; echo "iface eth1 inet static" >> /target/etc/network/interfaces; echo " address 172.16.160.1" >> /target/etc/network/interfaces; echo " netmask 255.255.128.0" >> /target/etc/network/interfaces; echo " gateway 172.16.128.1" >> /target/etc/network/interfaces; mkdir /target/root/.ssh; chmod 700 /target/root/.ssh; echo "<########### Insert SSH KEY##########> >> /target/root/.ssh/authorized_keys; chmod 600 /target/root/.ssh/authorized_keys; echo "nameserver 8.8.8.8" >> /target/etc/resolv.conf; echo "nameserver 8.8.4.4" >> /target/etc/resolv.conf; wget http://<cobbler_IP>/cblr/svc/op/nopxe/system/pod01-frontend -O /dev/null;






  • 相关阅读:
    mongodb协议透传
    [转]PyInstaller2的信息文件Version的生成
    [转]使用PyInstaller2将Python脚本转化为可执行文件(中使用部分)
    Cache应用(sql依赖缓存)
    关于Cookie与Session的疑问解答
    ADO.NET Entity Framework
    WPF中的画笔功能,实现直实线、弯实线、直虚线、弯虚线
    Singleton模式之多线程
    控件回发系列一(IPostBackEventHandler)
    使用VS2010创建EntityDataModel出错
  • 原文地址:https://www.cnblogs.com/silenceli/p/3442876.html
Copyright © 2020-2023  润新知