In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to install Ubuntu 16.04. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
Network Installation Ubuntu 16.04 Build PXE Server
PXE stands for Pre-boot Execution Environment. Is the most important step in installing any linux system over the network. First, set up a PXE server, and then place the PXE server on the same local area network as the host on which Ubuntu 16.04 is installed. The last setup is to install the host in pxe mode. There's an article that explains the principle very clearly http://www.cnblogs.com/zhangjianghua/p/5872269.html
install dhcp (not dhcp3)sudo apt-get install isc-dhcp-server
The requested URL/etc/default/isc-dhcp-server/was not found on this server. (default is empty string)
Configure dhcpd, edit sudo vi /etc/dhcp/dhcpd.conf file
option domain-name "localhost"; #must be changed, otherwise syslog reports exception, pxe client IP cannot get option domain-name-servers local IP address; #must be changed allow booting;allow bootp;subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.10 192.168.1.30; option subnet-mask 255.255.255.0; option routers Native IP address; option broadcast-address 192.168.1.255; next-server Local IP address; filename "pxelinux.0";}#It is OK not to write below, just to specify the host anyname { hardware ethernet is installed host MAC address; filename "pxelinux.0";}
The above tests are valid. Note: Both ends with a semicolon; the local IP address must also be in segment 192.168.1.0/24.
start the DHCP service
sudo /etc/init.d/isc-dhcp-server start
Note: in order not to affect the company's local area network, finally disconnect from the external local area network, only connect the pxe server and the installed host with the switch. Or use a different network segment than the company.
install tftp service sudo apt-get install tftpd-hpasudo apt-get install tftp-hpasudo apt-get install ineutils-inetd
The command is/usr/sbin/in.tftpd, and the script it serves is/etc/init.d/tftpd. So you can start this service by following.
sudo service tftpd-hpa start
After the service is started, you can test whether the tftpd service is running properly by using the tftp client command. How do you test it? First create a new test file and place it in/var/lib/tftpboot/directory. Then enter the following command:
sudo tftp localhost> get > quit
If the file is downloaded to the current directory, the test is successful. Many articles on the Internet say that you need to modify the configuration file/etc/default/tftpd-hpa. The modifications are as follows:
TFTP_USERNAME="tftp"TFTP_DIRECTORY="/var/lib/tftpboot"TFTP_ADDRESS=":69"TFTP_OPTIONS="--secure"#The following is newly added, but I don't know why I want to add it, I guess it's OK not to write RUN_DAEMON="yes"OPTIONS="-l -s /var/lib/tftpboot" Install apache2
I don't like NFS very much, it feels too slow, apache is faster.
sudo apt-get install apache2
I am using Oracle VirtualBox installed ubuntu16.04 system as pxe server, so I need to change the network to bridge network, do not restart the virtual machine, as long as the ubuntu system can restart the network. Run/etc/init.d/networking restart to get the most recent IP address. Visit http://host_ip/to display the apache default home page. (Apache starts automatically after installation)
download the ISO
Put ubuntu's ISO in/var/www/html (apache's web root).
sudo wget https://mirror.tuna.tsinghua.edu.cn/ubuntu-releases/16.04/ubuntu-16.04.2-server-amd64.iso
The file is approximately 829M.
ISO cannot be used directly unless nfs is used. Need to mount first
sudo mount -o loop ubuntu.iso /mnt
Then copy everything from install/netboot to/var/lib/tftpboot.
Download the netboot file (do not do this step, it is too pit, replace it with install/netboot in ISO)
The netboot file is downloaded and placed in the/var/lib/tftpboot directory to boot the installed host.
cd /var/lib/tftpbootwget http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/netboot.tar.gz
The file is approximately 20M. Download and start decompressing.
sudo tar -xzvf netboot.tar.gz
After decompression, the pxelinux.0 file will appear.
The pxe for the new version of ubuntu is no longer in the file/var/lib/tftpboot/pxelinux.cf/default, but in the file/var/lib/tftpboot/ubuntu-installer/i386/boot-screens/txt.cfg. The label is not Linux, but install. Change what follows append.
append vga=788 initrd=ubuntu-installer/i386/initrd.img ks=http://192.168.1.10/ks.cfg #Tell the system where to get the ks.cfg file
The above configuration instructions use ks.cfg to install ubuntu, so this ks.cfg should be placed in the/var/www/html directory.
install Ubuntu
Power up the installed host, enter BIOS, and select Boot from NIC (or PXE). Then you enter the DHCP acquisition phase. If there is a problem at this time, you can check the/var/log/syslog error message on the pxe server. If there is no information, see if the firewall is closed.
If it's normal, it prints out
dhcpd[process ID] DHCPDISCOVER from MAC address via NIC name dhcpd[process ID] DHCPOFFER on assigned IP address to MAC address via NIC name dhcpd[process ID] DHCPREQUEST for assigned IP address (DHCP service IP address) from MAC address via NIC name dhcpd[process ID] DHCPACK on assigned IP address to MAC address via NIC name
After installation the host will display a graphical menu. Selecting install actually downloads images from cn.archive.ubuntu.com instead of my pxe server.
Too many holes encountered during installation.
First of all, the network card cannot be recognized---> It is found that netboot is not the same as the ISO estimate, and it is possible to overwrite/var/lib/tftpboot with install/netboot in ISO.
After that, there was an Installation step failed error. I checked http://www.example.com on the Internet. www.michaelm.info/blog/? p=1378 says the solution, but what the hell is d-i? I checked it again and found this http://mole1230.blog.51cto.com/837625/1430489. Forget it. There's no time for that.
summary
First mount the ISO to/mnt directory, copy the contents cp -avr /mnt/* /var/www/html/ubuntu/to apache.
Use netboot: cp -avr /mnt/install/netboot/* /var/lib/tftpboot from ISO
Ks.cfg may be needed, directly using ISO is not possible (things out of the loose), unless the use of nfs mode (this I did not test).
vi /var/lib/tftpboot/pxelinux.cfg/default#Add label linux at the end kernel ubuntu-installer/amd64/linux append ks=http://192.168.1.20/ks.cfg vga=normal initrd=ubuntu-installer/amd64/initrd.gz There is also a label linux kernel ubuntu-installer/amd64/linux append vga=798 initrd=ubuntu-installer/amd64/initrd.gz url=http:///preseed.seed
The preseed.seed file is located in/var/www/html and reads as follows:
d-i clock-setup/utc boolean trued-i time/zone string Europe/Ljubljanad-i console-setup/ask_detect boolean falsed-i console-setup/layoutcode string sld-i debian-installer/language string Englishd-i debian-installer/country string SId-i debian-installer/locale string en_US.UTF-8d-i keyboard-configuration/layout select Sloveniand-i keyboard-configuration/variant select Sloveniand-i keyboard-configuration/layoutcode string sld-i keyboard-configuration/xkb-keymap select sld-i mirror/country string manuald-i mirror/http/hostname string netboot.abakus.si (replace your) d-i mirror/http/directory string /iso/ubuntus1404_64 (replace your) d-i mirror/http/proxy stringd-i apt-setup/restricted boolean trued-i apt-setup/universe boolean trued-i apt-setup/backports boolean trued-i apt-setup/services-select multiselect securityyd-i apt-setup/security_host string netboot.abakus.sid-i apt-setup/security_path string /iso/ubuntus1404_64/(replace yours) d-i live-installer/net-image string http://iso/install/filesystem.squashfs#d-i debian-installer/allow_unauthenticated boolean trued-i preset/late_command string wget http://boot/sources.list-O /target/etc/apt/sources.list
See http://linux.opm.si/programska-opprema/ubuntu-14-04-network-install for the above procedure. I don't know if it works.:D
If there is a problem in the middle process, you can click Continue to continue the installation. If you cannot continue, then... Admit bad luck
Later, I learned that dnsmasq can replace dhcp+ ftp software.
People who don't have time to toss, try not to use pxe installation.
Finally, it was installed through ubuntu on the public network, and the local installation did not pass the test. That is to say, ubuntu is booted up through local pxe, and the files required for the installation process are downloaded from the Internet.
Thank you for reading! About "how to install Ubuntu 16.04" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.