First,Gentoo OPENRC style random startup script
- /ETC/LOCAL.D directory: *.start suffix file, normal boot, *stop suffix file, normal shutdown execution
Second, SSD tuning
- Bind large directories such as/usr/portage,/USR/SRC, etc. to directories in HDD, reducing SSD disk usage and bulk Read and write
# <fs> <mountpoint> <type> <opts> <dump/pass>/home/f/ Downloads/portage /usr/portage None bind 00
- Temporary directory mounted to TMPFS.
TMPFS /tmp TMPFSdefaults,noatime,mode= 1777 00 tmpfs/ Var/tmp tmpfs defaults,noatime,mode=1777 00
- Graphical interface Program Cache migration:/etc/profile.d/xdg_cache_home.sh
#!/bin/bashexport xdg_cache_home="/tmp/${user}/.cache"
- Install the Profile-sync-daemon and set the boot start to cache the program of the user specified in the automatic migration/etc/psd.conf to TMPFS
rc-Update add PSD defaultOR:systemctl enable PSD
Three, systemd off ctrl+alt+delete three-button restart function
- Systemctl Mask Ctrl-alt-del.target
- Or
- Rm/usr/lib/systemd/system/ctrl-alt-del.target
- Ctrl-alt-del.target is a soft link to reboot.target
Iv. Security Themes
- change the TTL of ICMP (linux default 64,windows default 128) to prevent the system type from being obtained by pinging by means of the TTL: Echo "$" >/proc/sys/net/ipv4/ip_default_ TTL
Wu, emerge
- --root=dir indicates the root directory environment when installing the package, similar to the--root=dir of the Rhel rpm
- --oneshot is installed but not added to World_set so that unless the version number is upgraded due to dependency, other actions will not be upgraded by update, etc.
- -S '%@^net-analyze.* '% refers to enabling regular search, @ refers to the inclusion of software category names in the match range, ^, $, etc. are standard meanings in regular expressions
Liu,/etc/portage/make.conf
# consult/usr/share/portage/config/ Make. conf.example forA Moredetailed example. CFLAGS="-march=haswell-o2-pipe"#-march=Nativecxxflags="${cflags}"Chost="X86_64-pc-linux-gnu"makeopts="-j9" Use="X GTK Dbus TrueType Jpeg-systemd-consolekit-networkmanager-multilib-sound-alsa-oss-wifi-bluetooth-gnome-kde -qt4-qt5-cups-experimental"cpu_flags_x86="avx2 ..."Portdir="/usr/portage"Distdir="${portdir}/distfiles"Pkgdir="${portdir}/packages"Portage_tmpdir="/ tmp"Accept_keywords="AMD64"Accept_license="-* @FREE"gentoo_mirrors="https://mirrors.tuna.tsinghua.edu.cn/gentoo/"grub_platforms="efi-64"Languas="En_us.utf8"abi_x86=" -"Video_cards="Intel"qemu_softmmu_targets="x86_64"qemu_user_targets="x86_64"
Vii. Kernel configuration files
See: Https://i.cnblogs.com/Files.aspx
gentoo/funtoo_13_ System Management "Dynamic Update"