Tutoriale Online

Tutoriale Online Invata Online cum se face si cum este corect. Learn Online How Must To Do !

Archive for the ‘Configuration Help’ Category

Tutoriale Online Package Management

Posted by ascultradio on September 4, 2009

Slackware’s packaging system uses ordinary compressed tar files. The system allows you to keep track of the packages you install, making it easy to upgrade or remove them down the road.

Slackware provides an interactive program for managing your packages. You can use pkgtool to handle adding and removing packages from your system.

Screenshot of Pkgtool

You can also use these command line utilities to work with packages. Below is a brief overview of the commands, however, you should always consult the man pages before using them.

installpkgBy typing installpkg [packagename].tgz you can install packages on your system. There are a few command line options as well:

-warn Generates a report of what would happen if you installed the package and sends the report to standard out.
-m Make the contents of the current directory and subdirectories into a package with the name you specify.
-r Install the contents of the current directory and subdirectories as a package with the name you specify.
removepkgIn it’s simplest form, removepkg will remove the package name you specify. The general syntax is removepkg packagename. There are a few command line options that you can specify:

-warn Generates a report of what would happen if you removed the package and sends the report to standard out. It does not remove the package.
-preserve This option will reconstruct the package subtree under /tmp/preserved_packages/packagename, where packagename is the name is you specify.
-copy Construct a copy of the package under /tmp/preserved_packages/packagename, but do not remove it (same effect as -warn -preserve).
-keep Save the temporary files created by removepkg. Useful for debugging purposes.
upgradepkgUpgrades a currently installed package with the package specified. If the packages have the same name, then you only need to run upgradepkg packagename to perform the upgrade. If the new package has a different name than the currently installed package, you must use this syntax:

upgradepkg oldpackagename%newpackagename

Do not add any extra whitespace between pairs of old/new package names.

makepkgCreates a new Slackware compatible package. The program uses the contents of the current directory to create the package. Be sure to take a look at the manpage for makepkg for information about the embedded scripts that you can put in a Slackware package.
explodepkgExtracts the contents of a Slackware compatible package to the current directory. It does not execute the embedded scripts in the package. This utility is most useful for maintenance purposes (exploding a package, updating it, then rebuilding with makepkg).


Converts an RPM (RedHat Package Manager) to a Slackware-compatible package. In case you ever run across the need to obtain something that is only in RPM format, this program may come in handy. The syntax is:

rpm2targz [filename].rpm

NOTE: Running rpm2targz will create a .tar.gz file, while running rpm2tgz will create a .tgz file. The files are exactly the same, the only difference is the extension format (some people prefer one over the other).

Posted in Configuration Help, Package Management, Slackware Linux Server | Tagged: | Leave a Comment »

Tutoriale Online System Initialization

Posted by ascultradio on September 4, 2009

System Initialization

Slackware Linux uses the BSD-style file layout for its system initialization files. These files are organized and easy to edit. All of the system initialization files are stored in the /etc/rc.d directory. To prevent a script from executing at startup you can remove the execute permission on the file and Slackware will not execute it. The following is a general description of what the different files do.

System StartupThe first program to run under Slackware besides the Linux kernel is init. This program reads /etc/inittab file to see how to run the system. It runs the /etc/rc.d/rc.S script to prepare the system before going into your desired runlevel. The rc.S file enables your virtual memory, mounts your filesystems, cleans up certain log directories, initializes Plug and Play devices, loads kernel modules, configures PCMCIA devices, sets up serial ports, and runs System V init scripts (if found). There are some scripts in /etc/rc.d that rc.S will call on to complete its work:

rc.S This is the actual system initialization script.
rc.acpid Starts the acpi daemon
rc.hotplug This script starts hotpluggable subsystems
rc.modules Loads kernel modules. Things like your network card, PPP support, and other things are loaded here. If this script finds rc.netdevice, it will run that as well.
rc.pcmcia Probes for and configures any PCMCIA devices that you might have on your system. This is most useful for laptop users, who probably have a PCMCIA modem or network card.
rc.serial Configures your serial ports by running the appropriate setserial commands.
rc.sysvinit Looks for System V init scripts for the desired runlevel and runs them. This is discussed more in detail below.
RunlevelsAfter system initialization is complete, init moves on to runlevel initialization. A runlevel describes the state that your machine will be running in. Sound redundant? Well, the runlevel tells init if you will be accepting multiuser logins or just a single user, whether or not you want network services, and if you will be using the X Window System or agetty to handle logins. The files below define the different runlevels in Slackware Linux.

rc.0 Halt the system (runlevel 0). By default, this is symlinked to rc.6.
rc.4 Multiuser startup (runlevel 4), but in X11 with KDM, GDM, or XDM as the login manager.
rc.6 Reboot the system (runlevel 6).
rc.K Startup in single user mode (runlevel 1).
rc.M Multiuser mode (runlevel 2 and 3), but with the standard text-based login. This is the default runlevel in Slackware.
Network InitializationRunlevels 2, 3, and 4 will startup the network services if you have that enabled. The following files are responsible for the network initialization:

rc.inetd Starts up inetd, the BSD Internet super-daemon.
rc.inet1 This script is used to bring up the various network interfaces.
rc.inet1.conf Modified by netconfig, this file is responsible for configuring the actual network interfaces.
rc.ip_forward Activates IP packet forwarding.
rc.inet2 Runs after rc.inet1 and starts up basic network services.
rc.wireless This script sets up PCI, USB, and 32-bit Cardbus wireless devices – NOT 16-bit PCMCIA cards (those are configured in /etc/pcmcia/).
rc.wireless.conf Wireless LAN adapter configuration.
rc.atalk Starts up AppleTalk services.
rc.bind Starts up the BIND name server (named).
rc.httpd Starts up the Apache web server.
rc.mysqld Starts up the MySQL server.
rc.news Starts up the news server.
rc.nfsd Starts up the NFS server.
rc.portmap Starts up the RPC portmapper.
rc.samba Starts up Windows file and print sharing services.
rc.sshd Starts up the secure shell server (sshd).
System V CompatibilitySince version 7.0, Slackware includes System V init compatibility. Many other Linux distributions make use of this style instead of the BSD style. Basically each runlevel is given a subdirectory for init scripts, whereas BSD style gives one init script to each runlevel.

The rc.sysvinit script will search for any System V init scripts you have in /etc/rc.d and run them, if the runlevel is appropriate. This is useful for certain commercial software packages that install System V init scripts and scripts for BSD style init.

Other Files

The scripts described below are the other system initialization scripts. They are typically run from one of the major scripts above, so all you need to do is edit the contents.

rc.cdrom If enabled, this script will scan for a CD-ROM in a drive and mount it under /cdrom if it finds one.
rc.gpm Starts up general purpose mouse services. Allows you to cut and paste at the Linux console.
rc.ibcs2 Starts up the Intel Binary Compatibility support.
rc.font Loads the custom screen font for the console.
rc.local Contains any specific startup commands for your system. This is empty after a fresh install, as it is reserved for local administrators. This script is run after all other initialization has taken place.

Posted in Configuration Help, Slackware Linux Server, System Initialization | Tagged: , | Leave a Comment »

Tutoriale Online User Administration

Posted by ascultradio on September 4, 2009

Slackware Linux is setup to use shadow passwords, so in addition to the standard /etc/passwd and /etc/group files, there is also an /etc/shadow file. Below is a list of files and programs you should be familiar with in order to successfully manage your users.

Adding a UserSlackware Linux makes adding a new user easy. All you have to do is run the /usr/sbin/adduser script. It will present you with a series of questions and then it will complete all of the necessary steps to get the account working.

After the account is setup, you can use the following programs to manage the account:

  • /usr/bin/passwd – Changes the password.
  • /usr/bin/chfn – Changes the finger information.
  • /usr/bin/chsh – Changes the user’s login shell.
Removing a UserRemoving a user is as simple as adding it; to do so you can either use the userdel command, or do it by hand.

userdel can’t remove an account if the user is currently logged in; so you must kill any running processes which belong to the user you are deleting.
Also, you have to run userdel -r (notice the -r flag) if you want to get rid of the home dir and mail spool of the user as well.

Removing a user manually requires editing a few files and removing some things, but it’s really quite simple. These steps a necessary to remove a user from the system:

  1. Remove the line in /etc/passwd. As root open the file /etc/passwd and find the line corresponding to the account you are removing and delete it.
  2. Remove the user name from /etc/group. You need to remove the username from any groups in the /etc/group file.
  3. Remove the line in /etc/shadow. Same process as in step 1.
  4. Delete the home directory. As root do an rm -rf on the home directory for the account.
  5. Delete the mail spool file. As root you need to delete /var/spool/mail/{USERNAME}.

Disabling a User

Disabling an account is easy and sometimes preferrable in certain situations. From the passwd(1) man page:

User accounts may be locked and unlocked with the -l and -u flags. The -l option disables an account by changing the password to a value which matches no possible encrypted value. The -u option re-enables an account by changing the password back to its previous value.

Posted in Configuration Help, Slackware Linux Server, User Administration | Tagged: , | Leave a Comment »

Tutoriale Online netconfig

Posted by ascultradio on September 4, 2009


The preferred way of setting up your network connection is through the use of the netconfig program. Run this as root and you will be presented with a series of questions to answer. The program will then edit the rc.inet1.conf file.

You will also need kernel support for your network card. The netconfig program can probe your system for a network card and enable it. Or you can edit /etc/rc.d/rc.modules and select your card.

You can, of course, edit the network configuration files by hand. They are /etc/rc.d/rc.inet1.conf and >/etc/rc.d/rc.inet2, which are discussed in greater detail below.

DHCP supportStarting with Slackware 7.0, the netconfig program will ask if you want to use DHCP for your network setup. Or you can edit rc.inet1.conf to run /sbin/dhcpd for you. Be sure that you have kernel support for your network card enabled (netconfig can do this for you).

rc.inet1’s role is simple: it configures your networking devices and sets up your routing. Essentially, rc.inet1 is the file that gives you a network in the first place, reading config options from its config file: rc.inet1.conf.

This configuration file is pretty simple, it supports up to 3 different networking devices. For each device there’s a section like the following:

# Config information for eth0:

Your IP address (IPADDR) you can get from your network administrator. The netmask is almost always going to be, unless your machine is at the top of the subnet (in which case you probably don’t need this page). USE_DHCP and DHCP_HOSTNAME are used if you lease an IP address from a DHCP server.

At the bottom of rc.inet1.conf you’ll find:

# Default gateway IP address:

# Change this to “yes” for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you’ll only see debugging output
# when rc.inet1 is called directly.

GATEWAY is usually going to be the first machine on your subnet (though it may not be… ask your network admin.). DEBUG_ETH_UP can be used for debugging purposes.


rc.inet1 gives you a network; rc.inet2 finishes the job of network configuration by running stuff on that network. Any services or daemons that use the network should be started from this file. Most of the rc scripts in charge of starting daemons like inetd, sshd, bind, nfs, etc get called from rc.inet2.

Other daemons (httpd, mysql, samba, etc) get called by init scripts run from rc.M, so that’s where you may want to look at, if you need to disable them (or see how it works 😉

Posted in Configuration Help, netconfig, Slackware Linux Server | Tagged: | Leave a Comment »

Tutoriale Online X Window System

Posted by ascultradio on September 4, 2009

X Window System

Starting with Slackware-10.0, the X Window environment in Slackware is provided by Xorg. X is responsible for providing a graphical user interface. It is independent from the operating system, unlike Windows or the MacOS.

The X Window System is implemented through many programs that run in userland. The two main components are the server and the window manager. The server provides the lowlevel functions for interacting with your video hardware, thus it is system specific. The window manager sits on top of the server and provides the user interface. The advantage to this is you can have many different graphical interfaces by simply changing the window manager you use.

Configuring the X Server<!–If you select the XF86_FBDev server, then you’re done. Just make sure that you have selected your desired video mode during the LILO configuration (run liloconfig as root). The server will use that video mode. If you prefer to use a regular X server, you’ll need to build an /etc/XF86Config file specific to your system. The easiest way to do this is to run /usr/X11R6/bin/XF86Setup as root. It’s a graphical setup program for X. If that does not work, you can always use /usr/X11R6/bin/xf86config. The setup program allows you to pick your server, resolutions, color depths, and monitor settings. Be sure to enter the correct information for your system.–> Configuring X can be a complex task. The reason for this is the vast numbers of video cards available for the PC architecture, most of which use different programming interfaces. Luckily, most cards today support basic video standards known as VESA, and if your card is among them you’ll be able to start X using the “startx” command right out of the box.

If this doesn’t work with your card, or if you’d like to take advantage of the high-performance features of your video card such as hardware acceleration or 3-D hardware rendering, then you’ll need to reconfigure X.

To configure X, you’ll need to make an /etc/X11/xorg.conf file. This file contains lots of details about your video hardware, mouse, and monitor. It’s a very complex configuration file, but fortunately there are several programs to help create one for you. We’ll mention a few of them here.

xorgsetupThis is a simple menu driven frontend that’s similar in feel to the Slackware installer. It simply tells the X server to take a look at the card, and then set up the best initial configuration file it can make based on the information it gathers. The generated /etc/X11/xorg.conf file should be a good starting point for most systems (and should work without modification).
xorgconfigThis is a text-based X configuration program that’s designed for the advanced system administrator. Here’s a sample walkthrough using xorgconfig. First, start the program:

# xorgconfig

This will present a screenful of information about xorgconfig. To continue, press enter. xorgconfig will ask you to verify you have set your PATH correctly. It should be fine, so go ahead and hit enter.

Next, select your mouse from the menu presented. If you don’t see your serial mouse listed, pick the Microsoft protocol — it’s the most common and will probably work. Next xorgconfig will ask you about using ChordMiddle and Emulate3Buttons. You’ll see these options described in detail on the screen. Use them if the middle button on your mouse doesn’t work under X, or if your mouse only has two buttons (Emulate3Buttons lets you simulate the middle button by pressing both buttons simultaneously). Then, enter the name of your mouse device. The default choice, /dev/mouse, should work since the link was configured during Slackware setup. If you’re running GPM (the Linux mouse server) in repeater mode, you can set your mouse type to /dev/gpmdata to have X get information about the mouse through gpm. In some cases (with busmice especially) this can work better, but most users shouldn’t do this.

xorgconfig will ask you about enabling special key bindings. If you need this say “y”. Most users can say “n” — enter this if you’re not sure.

In the next section you enter the sync range for your monitor. To start configuring your monitor, press enter. You will see a list of monitor types — choose one of them. Be careful not to exceed the specifications of your monitor. Doing so could damage your hardware. Specify the vertical sync range for your monitor (you should find this in the manual for the monitor). xorgconfig will ask you to enter strings to identify the monitor type in the xorg.conf file. Enter anything you like on these 3 lines (including nothing at all).

Now you have the opportunity to look at the database of video card types. You’ll want to do this, so say “y”, and select a card from the list shown. If you don’t see your exact card, try selecting one that uses the same chipset and it will probably work fine. Then choose an X server. You should have installed the server recommended for your card, but if not, you can always go back and install that later. Choose option (5) to use the X server recommended for your video card’s chipset.

Next, tell xorgconfig how much RAM you have on your video card. xorgconfig will want you to enter some more descriptive text about your video card. If you like, you can enter descriptions on these three lines.

You’ll be asked next about your RAMDAC and clock generator settings. You may enter them if you know the values, but the X server will probably successfully probe for these values. The next option is to run X -probeonly to find the clock settings for the card. You can try this, and if it works it will speed up X’s startup time. If it fails, it’s not usually a big problem. If it causes problems with your card, don’t use it.

You’ll then be asked which display resolutions you want to use. Again, going with the provided defaults should be fine to start with. Later on, you can edit the /etc/X11/xorg.conf file and rearrange the modes so 1024×768 (or whatever mode you like) is the default.

At this point, the xorgconfig program will ask if you’d like to save the current configuration file. Answer yes, and the X configuration file is saved, completing the setup process. You can start X now with the ‘startx’ command.

Picking a Window Manager

The last thing to do to setup your graphical environment is to select a window manager. There are dozens available, and we include a handful of them with Slackware. Run the xwmconfig program to set the default window manager for your system. This program will present a list of installed window managers and let you pick one.

Screenshot of xwmconfig

Desktop environments can also be grouped into this category, as they are most closely related to a window manager. KDE and GNOME are examples of desktop environments, having a standard set of programs that look and act the same.

Posted in Configuration Help, Slackware Linux Server, X Window System | Tagged: | Leave a Comment »

Tutoriale Online PPP

Posted by ascultradio on September 4, 2009


Most people connect to the Internet through some kind of dialup connection. The common one is PPP, though SLIP is still occasionally used. Setting up your system to speak PPP to a remote server is pretty easy. We’ve included a few tools to help you in setting it up.

pppsetupIn Slackware we have included a program called pppsetup to configure your system to use your dialup account. It shares a look and feel similar to our netconfig program.

To run the program, make sure you are logged in as root. Then type pppsetup to run it. You should see a screen like this:

Screenshot of pppsetupThe program will present a series of questions, to which you will feed it appropriate answers. Things like your modem device, the modem initialization string, and the ISP phone number. Some items will have a default, which you can accept in most cases.

After the program runs, it will create a ppp-go program and a ppp-off program. These are used to start and stop, respectively, the PPP connection. The two programs are located in /usr/sbin and need root priviledges to run.


For most users, running pppsetup will be sufficient. However, there may be an instance where you want to tweak some of the values used by the PPP daemon.

All of the configuration information is kept in /etc/ppp. Here is a list of what the different files are for:

ip-down This script is run by pppd after the PPP connection is ended.
ip-up This script is run by pppd when there’s a successful ppp connection. Put any commands you want run after a successful connection in this file.
options General configuration options for pppd.
options.demand General configuration options for pppd when run in demand dialing mode.
pppscript The commands sent to the modem.
pppsetup.txt A log of what you entered when you ran pppsetup.

NOTE: Most of these files won’t be there until after you run pppsetup.

Posted in Configuration Help, PPP, Slackware Linux Server | Tagged: , | Leave a Comment »

Tutoriale Online Directory

Posted by ascultradio on September 4, 2009


What’s in it?
/bin Basic user-related programs are here. Command shells and programs such as ls.
/boot LILO boot-related files
/dev Block and character device files.
/etc Configuration and system initialization files.
/home User home directories, except root.
/lib Essential libraries (like the system C library and kernel modules).
/mnt Generic mountpoint for fixing filesystems.
/opt Optional software packages. Slackware installs KDE to this location.
/proc Proc filesystem mountpoint for kernel interaction.
/root Root’s home directory.
/sbin System binaries. Programs run by root or at boot time.
/tmp Temporary directory. Everyone has read+write permissions here.
/usr User-related programs such as X11, netscape, and pine.
/var System log files, lock files, mail spools, and printer spools.

In addition to these basic directories, there may be some others. For example, you may have a /mnt/cdrom directory for mounting your CD-ROM drive or /mnt/floppy for mounting a floppy diskette.

Posted in Configuration Help, Directory, Slackware Linux Server | Tagged: | Leave a Comment »