In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "detailed installation steps of Gentoo system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Download the image
Generally speaking, I use domestic mirror sources, no matter whether it is centos,ubuntu or gentoo, it must be faster than abroad.
The code is as follows:
# download address
Mirrors.163.com/gentoo/
# I use x86
Http://mirrors.163.com/gentoo/releases/x86/current-iso/
# need to download, for example, the latest domestic version, this address http://mirrors.163.com/gentoo/releases/x86/current-iso/
The code is as follows:
Install-x86-minimal-20140318.iso
Stage3-i486-20140318.tar.bz2
# http://mirrors.163.com/gentoo/snapshots/ download
Portage-latest.tar.bz2
My general installation habit is to add stage3-i486-20140318.tar.bz2 and portage-latest.tar.bz2 packages to the image install-x86-minimal-20140318.iso to save the trouble of downloading later. For example, I use UltraISO to compress those two packages into the image, as shown in the following figure.
Then you can write to the flash drive, boot and load livecd and OK, and then we start the installation.
Start
Boot appears in the launch interface: you can press enter directly, or enter the hardware options that you have enabled. See the bottom appendix.
Configure the network
The code is as follows:
Ifconfig # check the network card, because not all network cards are called eth0. For example, I use iwconfig for wireless network cards.
The code is as follows:
> ifconfig enp0s3 192.168.1.127 netmask 255.255.255.0 # enp0s3 is your network card, followed by ip
> route add default gw 192.168.1.1 # Gateway
> echo "nameserver 192.168.1.1" > > / etc/resolv.conf # configure DNS
> ping www.baidu.com # Test that the network is unreachable
Start ssh
The code is as follows:
/ etc/init.d/sshd start # start ssh or use service sshd start
Passwd root # enter your account number and password, and then you can log in remotely using ssh. Of course, you don't need a computer at all.
Zoning
The code is as follows:
Fdisk-l # to see the hard disk and capacity that can be partitioned, which I tested with 8G Sata
The code is as follows:
> fdisk / dev/sda
Command (m for help): n # enter n, Xianjian partition
Partition type:
P primary (0 primary, 0 extended, 4 free)
E extended
Select (default p): P # Select the primary partition
Partition number (1-4, default 1): # enter
Using default value 1
First sector (2048-16777215, default 2048): # enter
Using default value 2048
Last sector, + sectors or + size {KMagneMMagneG} (2048-16777215, default 16777215): + 200m # 200m boot
Partition 1 of type Linux and of size 200 MiB is set
The last input w is saved
The code is as follows:
Command (m for help): W
The partition table has been altered!
Calling ioctl () to re-read partition table.
Syncing disks.
You can partition yourself according to the above method. My partition is 200m boot 7G / 512m swap.
Format Partition
The code is as follows:
Mkfs.ext4 / dev/sda1
Mkfs.ext4 / dev/sda2
Mkswap / dev/sda3 # format swap
Swapon / dev/sda3 # Mount swap
Mount partition
The code is as follows:
Mount / dev/sda2 / mnt/gentoo # your share /
Mkdir / mnt/gentoo/boot
Mount / dev/sda1 / mnt/gentoo/boot # you are ready to mount the partition of boot
Install Stage Tarball
The code is as follows:
# configure time
Date 032714382014 year-by-year order on the date of January 2014
Since we compressed stage3-i686-20140304.tar.bz2 and portage-20140310.tar.bz2 into the image before, we don't need to download them.
The code is as follows:
Cd / mnt/cdrom
Cp * .tar.bz2 / mnt/gentoo # copy two files to / mnt/gentoo
Under the cd / mnt/gentoo # gentoo directory
Tar xvjpf stage3-*.tar.bz2 # decompress stage3
Tar xvjf / mnt/gentoo/portage-*.tar.bz2-C / mnt/gentoo/usr # decompress portage to / mnt/gentoo/usr
If according to the official document, make.conf is under / mnt/gentoo/etc/make.conf, but I am in / mnt/gentoo/etc/portage/make.conf, please pay attention to your position.
# the single-core configuration is as follows, limiting the number of parallel compilations
The code is as follows:
MAKEOPTS= "- J2"
Chroot
Mirrorselect-I-o > > / mnt/gentoo/etc/portage/make.conf # this is the location of your own make.conf. Select the mirror source. I choose 163and enter.
Cp-L / etc/resolv.conf / mnt/gentoo/etc/ # copy dns information
Mount / proc and / dev file systems
The code is as follows:
Mount-t proc none / mnt/gentoo/proc
Enter a new system environment
The code is as follows:
Chroot / mnt/gentoo / bin/bash
Env-update
Source / etc/profile
Update the Portage tree
The code is as follows:
Emerge-sync-quiet
# verify the system profile
Eselect profile list
Configure time zone
The code is as follows:
Ls / usr/share/zoneinfo # View time zone
Cp / usr/share/zoneinfo/Asia/Shanghai / etc/localtime # I use Shanghai
Install the kernel
The code is as follows:
Emerge gentoo-sources # install kernel source code
Ls-l / usr/src/linux # View kernel connections
Manual configuration
The code is as follows:
Cd / usr/src/linux
Make menuconfig
Note: I am a 32-bit system. So the * in front of the 64-bit kernel must be removed.
To be configured, press ↓ to File System and enter. Because I use ext4, EXt4 debugging support is selected.
Then Tab chooses to enter save, then enter OK,Exit, and then select Exit to launch.
Compile the kernel
The code is as follows:
Make & & make modules_install # enter and wait for the compilation to be completed. After the compilation is completed, there will be the location information of bzImage
Install the kernel
The code is as follows:
Cd / usr/src/linux
Cp arch/x86/boot/bzImage / boot/kernel-3.12.13-gentoo
Configuration system
Configure the file system
The code is as follows:
Nano-w / etc/fstab # configure according to your own partition
/ dev/sda1 / boot ext4 defaults,noatime 1 2
/ dev/sda2 / ext4 noatime 0 1
/ dev/sda3 none swap sw 0 0
/ dev/cdrom / mnt/cdrom auto noauto,ro 0 0
Modify host name
The code is as follows:
Nano-w / etc/conf.d/hostname
Configure the network
The code is as follows:
Nano-w / etc/conf.d/net # according to my own network card configuration, my ifconfig network card is enp0s3
Config_enp0s3= ("192.168.1.126 netmask 255.255.255.0 brd 192.168.1.255")
Routes_enp0s3= ("default via 192.168.1.1")
Ln-s / etc/init.d/net.lo / etc/init.d/net.enp0s3
Rc-update add net.enp0s3 default # set boot up
Configure root password
The code is as follows:
Passwd root # enter your account password
Install system tools
The code is as follows:
Emerge syslog-ng # Syslog tool
Rc-update add syslog-ng default
Emerge vixie-cron # Cron daemon
Rc-update add vixie-cron default
Emerge sys-apps/mlocate # installs the file index locate. Remember to create a new library in updatedb after reboot.
Configure the bootstrapper
Install grub
The code is as follows:
Emerge grub # install grub
Configure grub
After my emerge grub installation is completed, grub2 is installed. If it is grub2, the configuration is as follows
The code is as follows:
/ usr/sbin/grub2-install-- no-floppy / dev/sda # installation
/ usr/sbin/grub2-mkconfig-o / boot/grub/grub.cfg # generate configuration
Restart installation complete
The code is as follows:
Exit # launches chroot
Reboot # restart
The code is as follows:
Rc-update add sshd default # set ssh to boot
Service sshd start # enable ssh
Appendix start item
Acpi=on
Load support for ACPI and start the acpid daemon while booting the CD. This option is needed only if your system needs ACPI to function properly. This option is not required to enable support for hyperthreading.
Acpi=off
Shut down ACPI completely. This is useful on some older systems and is a necessary option for using Advanced Power Management (APM). This will also turn off hyperthreading support for your processor.
Console=X
This option sets the serial port access of the CD. The first option is the device, which is usually ttyS0 on x86, followed by other options and separated by commas. The default option is 9600, 8, 6, 7, 6, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Dmraid=X
This option is used to pass parameters to the device mapper RAID subsystem. The parameters passed must be enclosed in quotation marks.
Doapm
This option loads Advanced Power Management (APM) driver support. This requires that you also use the acpi=off option.
Dopcmcia
This option loads support for PCMCIA and Cardbus hardware and also enables the cardmgr of the pcmcia card to run when the CD is booted. This option is only needed when booting from a PCMCIA/Cardbus device.
Doscsi
This option loads support for most SCSI controllers. This option is also needed when most USB devices boot, because USB devices use the SCSI subsystem in the kernel.
Sda=stroke
This option allows you to partition the entire hard drive, even if your BIOS cannot handle large hard drives. This option is only used on machines that use the old BIOS. Replace sda with the device that requires this option when using it.
Ide=nodma
This option forces DMA in the kernel to be turned off, which is required by some IDE and CDROM drivers. If your system is having trouble reading the optical drive with the IDE interface, you can try this option. This option also turns off the default settings for hdparm.
Noapic
This option turns off advanced programmable interrupt controllers that exist on some new motherboards. It can cause some problems on some old hardware.
Nodetect
This option will turn off all automatic detection done by the CD, including device detection and DHCP detection. This is useful when debugging problematic CDs or drivers.
Nodhcp
This option disables DHCP probing on the detected Nic. This is useful for networks with only static addresses.
Nodmraid
Device mapping RAID support is turned off, such as the controller for onboard IDE/SATA RAID.
Nofirewire
This option turns off Firewire module loading. This option is needed only if your Firewire hardware causes problems with CD boot.
Nogpm
This option turns off gpm console mouse support.
Nohotplug
This option turns off the loading of hot plug (hotplug) and cold plug (coldplug) startup scripts at startup. This option is useful when debugging failed CDs and drivers.
Nokeymap
This option disables keyboard layout selection.
Nolapic
This option turns off the native APIC on the uniprocessor core.
Nosata
This option turns off the loading of serial ATA (SATA) modules. This option is useful when there is a problem with your system's SATA subsystem.
Nosmp
This option turns off SMP functionality in kernels that support SMP (symmetric multiprocessing). This option is used to debug SMP-related problems on specific drivers and motherboards.
Nosound
This option turns off sound support and volume settings. This option is useful for systems that have problems with sound support.
Nousb
This option turns off the automatic loading of the USB module. This option is useful when debugging USB problems.
Slowusb
This option adds some extra pauses during startup, mainly for slow USB CDROM, such as IBM BladeCenter.
This is the end of the content of "detailed installation steps of Gentoo system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.