§2023-09-13
¶0. emerge-webrsync
# mkdir /etc/portage/repos.conf/
# nano /etc/portage/repos.conf/gentoo.conf, as
- /etc/portage/repos.conf/gentoo.conf
[gentoo]
location = /var/db/repos/gentoo
sync-type = rsync
sync-uri = rsync://rsync.namerica.gentoo.org/gentoo-portage
auto-sync = yes
priority = 10
- then run
emerge-webrsync
even I added
PermitRootLogin yes
in /etc/ssh/sshd_config` I can not login as root
¶1. add user alexlai
# useradd -m -u 1026 alexlai
# passwd alexlai
# ls -l /home
total 8
drwxr-xr-x 3 alexlai alexlai 4096 Sep 13 09:52 alexlai
- ssh in as alexlai
$ id alexlai
uid=1026(alexlai) gid=1026(alexlai) groups=1026(alexlai)
¶2. emerge-webrsync
- still on termial
- /etc/portage/repos.conf directory is still missing
mkdir /etc/portage/repos.conf`
- nano /etc/portage/repos.conf/gentoo.conf
[gentoo]
location = /var/db/repos/gentoo
sync-type = rsync
sync-uri = rsync://rsync.namerica.gentoo.org/gentoo-portage
auto-sync = yes
priority = 10
# emerge-webrsync
-
emerge-webrsync
-
install sudo
# emerge --search sudo
# emerge -av app-admin/sudo
# visudo --> ucomment `%wheel ALL=(ALL:ALL) ALL`
# usermod -G wheel alexlai
以下: use alexlai and sudo
¶2. emerge net-misc/dhcpcd
$ sudo emerge net-misc/dhcpcd
$ emerge net-misc/dhcpcd
$ qlist dhcpcd
/lib64/dhcpcd/dev/udev.so
/lib/dhcpcd/dhcpcd-run-hooks
/lib/dhcpcd/dhcpcd-hooks/01-test
/lib/dhcpcd/dhcpcd-hooks/20-resolv.conf
/lib/dhcpcd/dhcpcd-hooks/50-yp.conf
/lib/dhcpcd/dhcpcd-hooks/30-hostname
/lib/dhcpcd/dhcpcd-hooks/50-ntp.conf
/lib/systemd/system/dhcpcd.service
/sbin/dhcpcd
/var/lib/dhcpcd/.keep_net-misc_dhcpcd-0
/etc/dhcpcd.conf
/etc/init.d/dhcpcd
/usr/share/man/man5/dhcpcd.conf.5.bz2
/usr/share/man/man8/dhcpcd-run-hooks.8.bz2
/usr/share/man/man8/dhcpcd.8.bz2
/usr/share/dhcpcd/hooks/15-timezone
/usr/share/dhcpcd/hooks/29-lookup-hostname
/usr/share/dhcpcd/hooks/50-yp.conf
/usr/share/dhcpcd/hooks/10-wpa_supplicant
/usr/share/doc/dhcpcd-10.0.2/README.md.bz2
alexlai@rpi4Gentoo ~ $ sudo rm /bin/dhcpcd <-- remove the one I borrowed from manj ls /etc/dhcpcd.conf
alexlai@rpi4Gentoo ~ $ ls -l /etc/dhcpcd.conf
-rw-r--r-- 1 root root 1531 Jul 11 07:30 /etc/dhcpcd.conf
sudo reboot now
- failed to start
- systemd-networks.service does not like /etc/systemd/network/50-dhcp.network
- failed to start
$ cat /etc/systemd/network/50-dhcp.network
[Match]
Name=end0 <-- name instead of Name
[Network]
DHCP=yes
$ cat /etc/systemd/network/50-static.network
[Match]
Name=enp1s0u1u3u4
[Network]
Address=192.168.48.7/24
Gateway=192.168.48.254
DNS=8.8.8.8
-
etc-update
-
reboot again, - OK, -
sudo systemctl enable sshd