Configuration files

From Wikislax

(Difference between revisions)
Jump to: navigation, search
(Created page with "The location of the configuration files depend on the specific distribution, but is usually subdirectories of, or files in <tt>'''/etc'''</tt>, <tt>'''/usr/etc'''</tt>, <tt>'''/u...")
m (Protected "Configuration files" ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 

Latest revision as of 12:53, 7 April 2012

The location of the configuration files depend on the specific distribution, but is usually subdirectories of, or files in /etc, /usr/etc, /usr/local/etc. The files are set up by installation but can be updated later. Applying the configuration change will then be a matter of restarting the corresponding daemon. The main Slackware configuration files are :

Init configuration

Command Effect
/etc/inittabcontains the default runlevel (3=multi-user, 4=graphical). On a live system, telinit n affords changing the level interactively.
/etc/fstabcontains descriptions on the filesystems used on this computer, including the device, the mount point, the filesystem type and the opening options. Use man fstab, copy, and try !
/etc/httpDirectory containing the Apache configuration files such as httpd.conf.
/etc/lilo.confused by lilo to generate a boot sector on the device or on the MBR (master boot record). If on the device and using the Windows bootloader, don't forget to copy the boot sector on a disquette so as to be able to use it from Windows.
/etc/mailDirectory containing the Sendmail configuration files such as sendmail.mc and sendmail.cf. Spamassassin configuration also goes here as a subdirectory.
/etc/profile.dthe files contained in this directory are executed at login when executable.
/etc/ld.so.conflist of additional libraries. Needs /sbin/ldconfig after adding new libraries.


The /etc/rc.d directory

The /etc/rc.d directory contains the scripts used to initialize the system services at the end of the boot. To use a specific script at startup, make it user-executable. To stop using it, remove the execution rights. Depending on the situation, scripts are called with the start, stop, or restart parameter.

Network configuration

The network configuration is done during system installation but it is possible to change it later by editing the files and restarting the right daemon:

Command Effect
/etc/rc.d/rc.inet1.confconfiguration of the network interfaces and wifi. Restart using /etc/rc.d/rc.inet1 restart.
/etc/rc.d/rc.ipforwardis a script to allow forwarding of packets between the interfaces. This is useful for a computer with several interfaces, for instance a firewall. To allow forwarding, just make the script executable.
/etc/ssh/sshd_configssh configuration. Restart using /etc/rc.d/rc.sshd restart.
/etc/hostscontains the addresses of the local hosts that bind cannot resolve, as they are in a private addressing plan. It is also possible to specify here addresses that will be chosen in lieu of their official address.
/etc/rc.d/rc.bindsetting this script as user-executable will afford running the local computer to be its own DNS.
/etc/named.confuncomment the query-source directive to suppress the port-unreachable packets on lo.
/etc/resolv.confif using local bind, append a line with nameserver 127.0.0.1.


Note : In case of network issue, it can be a good idea to check the configuration using ifconfig -a, netstat -f inet -rn, and route. The routes are kept from one boot to the other and it may become necessary to delete the existing routes using route flush, then reboot.


Linux basics Main Page IPTables
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox