Log in as
(Clean up your known_hosts file because your new box has generated a new definitive hostkey) $ nano -w ~/.ssh/known_hosts(Look for the IP of your new PC and delete the line, then save the file and exit nano) (Use the IP address of your new box) $ ssh root@192.168.1.10 The authenticity of host '192.168.1.10 (192.168.1.10)' can't be established. RSA key fingerprint is 96:e7:2d:12:ac:9c:b0:94:90:9f:40:89:b0:45:26:8f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.1.10' (RSA) to the list of known hosts. Password:type_the_password
mybox ~ # adduser -g users -G lp,wheel,audio,cdrom,portage,cron -m john mybox ~ # passwd john New UNIX password:Set John's password Retype new UNIX password:Type John's password again passwd: password updated successfully
Start by selecting nearby mirrors either by defining the
mybox ~ # emerge mirrorselect mybox ~ # mirrorselect -i -o >> /etc/make.conf mybox ~ # mirrorselect -i -r -o >> /etc/make.conf(Usually, (the number of processors + 1) is a good value) mybox ~ # echo 'MAKEOPTS="-j2"' >> /etc/make.conf
Now is a good time to enable or disable some USE flags. Run
mybox ~ # emerge -vpe world(Portage displays the packages and their USE flags, as an example, let's disable ipv6 and fortran, and enable unicode) mybox ~ # echo 'USE="nptl nptlonly -ipv6 -fortran unicode"' >> /etc/make.conf
Recent versions of glibc use
mybox ~ # cd /etc mybox etc # nano -w locale.gen mybox etc # locale-gen
Last but not least, you may want to alter the
You may also want to switch to ~x86. You should only do this if you can
deal with the odd broken ebuild or package. If you'd rather keep your system
stable,
mybox etc # nano -w make.conf(Set -march to your CPU type in CFLAGS) CFLAGS="-O2 -march=athlon-xp -pipe"(Add the following line) FEATURES="ccache"(Only add the following if you know what you're doing) ACCEPT_KEYWORDS="~x86"
You might want to recompile your whole system twice to make full use of your
latest configuration changes. It would take quite a long time to complete and
yield minimal speed benefits. You can let your system optimise itself gradually
over time when new versions of packages are released. However, recompiling is
a still good idea from the standpoint of maintaining system consistency. Please
see the
Recompiling only the packages that have already been updated since the release
or that are affected by your new USE flags will take enough time. You might
also have to remove packages that block your upgrade. Look for "[blocks
(Install ccache) mybox etc # emerge ccache(Please note that the switch to ~x86 causes many packages to be upgraded) mybox etc # emerge -vpuD --newuse world(Take a good look at the package list and their USE flags, remove blocking packages if any, and start the lengthy process) mybox etc # time emerge -vuD --newuse world(79 packages have been (re)compiled) real 180m13.276s user 121m22.905s sys 36m31.472s(Remerge libtool to avoid further potential problems) mybox etc # emerge --oneshot libtool(Update config files, make sure you do not let dispatch-conf update config files you have edited) mybox etc # dispatch-conf(If perl has been updated, you should run the perl-cleaner script) mybox etc # time perl-cleaner all real 1m6.495s user 0m42.699s sys 0m10.641s(In case of a major upgrade of python, you should run the python-updater script) mybox etc # python-updater
Depending on what your new Gentoo machine is supposed to do, you will probably
want to install server applications or a desktop system. Just as an example,
You should check our
mybox etc # emerge -vp gnome(Look at the list of packages and their USE flags, then edit make.conf if required. mybox etc # nano -w /etc/make.conf(The following USE flags have been defined) USE="nptl nptlonly -ipv6 -fortran unicode svg hal dbus \ -kde -qt3 -qt4 -arts -eds -esd gnome gstreamer gtk firefox" mybox etc # time emerge gnome(326 packages have been emerged) real 520m44.532s user 339m21.144s sys 146m22.337s
mybox etc # emerge -vp kde-meta(Look at the list of packages and their USE flags, then edit make.conf if required. mybox etc # nano -w /etc/make.confThe following USE flags have been defined) USE="nptl nptlonly -ipv6 -fortran unicode svg hal dbus \ kde qt3 qt4 -arts -eds -esd -gnome -gstreamer -gtk -firefox" mybox etc # time emerge kde-meta(391 packages have been emerged) real 1171m25.318s user 851m26.393s sys 281m45.629s