Configuring Glibc
We need to create the /etc/nsswitch.conf file. Although glibc should
provide defaults when this file is missing or corrupt, its defaults don't work
well with networking. That is dealt with in a later chapter. Also, our
timezone needs to be set up.
Create a new file /etc/nsswitch.conf by running the
following:
cat > /etc/nsswitch.conf << "EOF"
# Begin /etc/nsswitch.conf
passwd: files
group: files
shadow: files
publickey: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: db files
# End /etc/nsswitch.conf
EOF
The tzselect script has to be run and the
questions regarding your timezone have to be answered.
When you're done, the script will give the
location of the needed timezone file.
Create the /etc/localtime symlink
by running:
ln -sf ../usr/share/zoneinfo/<tzselect's output> /etc/localtime
tzselect's output can be something like EST5EDT or
Canada/Eastern.
The symlink you'd create with that information would be:
ln -sf ../usr/share/zoneinfo/EST5EDT /etc/localtime
Or:
ln -sf ../usr/share/zoneinfo/Canada/Eastern /etc/localtime
Configuring Dynamic Loader
By default, the dynamic loader
(/lib/ld-linux.so.2) searches through /lib and /usr/lib for dynamic libraries that are needed
by programs when you run them. However, if there are libraries in
directories other than /lib and
/usr/lib, you need to add them to
the /etc/ld.so.conf file for the dynamic
loader to find them. Two directories that are commonly known to contain
additional libraries are /usr/local/lib and /opt/lib, so we add those directories to the
dynamic loader's search path.
Create a new file /etc/ld.so.conf by running the
following:
cat > /etc/ld.so.conf << "EOF"
# Begin /etc/ld.so.conf
/usr/local/lib
/opt/lib
# End /etc/ld.so.conf
EOF