Posts

Showing posts from May, 2012

dhcp and bootup server

There is currently a howto on configuring a DHCP server but it is three years old, however the DHCP server version 2-0 or later from the Internet Software Consortium comes with good documentation. There may be some quirks in the install depending on your system and what you are trying to do. My installation is Redhat 6.1 and I will mainly cover that, but will give alternatives that should cover most Linux versions. Pre-installation and Kernel setup Before you do an install, or configuration for DHCP you need the following kernel options installed. TCP/IP networking enabled MULTICAST enabled - To check to see if MULTICAST is enabled, type "ifconfig -a". You should see "MULTICAST" listed in your outputs for your ethernet devices. CONFIG_PACKET=y CONFIG_FILTER=y If you need to re-compile your kernel, follow the instructions on the section or the howto on the kernel. If you make the CONFIG_PACKET and CONFIG_FILTER options modular, you will ne

Linux Kernel

The Kernel and its Modules Most kernels are compiled so modular support is required except many used on floppy boot disks. The package modules.tar.gz contains all the programs needed to manage modules. This should already be installed on most distributions. The kernel modules are usually in a directory pertinent to the kernel version in /lib/modules. Modules can be found in "lib/modules/2.2.12-20" for kernel version 2.2.12-20. They are loadable modules ending in ".o" that are used to support the kernel. To load a module type "insmod module" where "module" is the name of the module to load. Ex: insmod /lib/modules/2.2.12-20/misc/ftape.o Programs used to manage modules are: lsmod - Lists all the currently loaded kernel modules rmmod - Unloads modules, Ex: rmmod ftape depmod - Creates a dependency file, "modules.dep", later used by modprobe to automatically load the relevant modules. modprobe - Used to load a modul

Openldap quick setup guide for rhel/centos/sl/oracle linux 5

Install openldap by issuing yum command : # yum install *openldap* -y set the slap password #slappasswd edit the openldap configuration file. #vi /etc/openldap/slapd.conf copy generated password  from slappasswd  paste it and do neccessary changes. # vi /etc/openldap/ldap.conf add line HOST  127.0.0.1 BASE dc=example,dc=com save and exit #cp /etc/openldap/DB_CONFIG.example /ver/lib/ldap/DB_CONFIG #chkconfig --levels 235 ldap on #vi /usr/share/openldap/migration/migrate_common.ph change default mail domain and default base #/usr/share/openldap/migration/migrate_base.pl > /etc/openldap/example.ldif bellow is the command for adding an entry from a ldif file # ldapadd -a -W -x -D "cn=Manager,dc=example,dc=com" -f /etc/openldap/example.ldif enterpassword: restart the service #service ldap restart

set up Samba for file-sharing

A very basic smb.conf file will look like this:  [global]     workgroup = MYGROUP     server string = Samba Server Version %v     log file = /var/log/samba/log.%m     max log size = 50     security = user     passdb = tdbsam [homes]     comment = Home Directories     browseable =no     writable = yes This is an absolutely basic configuration file. If you already have a workgroup defined, change the “workgroup” value to whatever you have already defined for the network. The rest can remain as-is. This will allow you the ability to connect to the server and mount your home directory on the server from any other machine on the network. The next step is to create the local passwords. Because Samba does not use the authentication credentials of the system (i.e., via PAM), you need to add the user to the Samba user database: # smbpasswd -a user Provide the password for the user in question. Also note that this user must also exist on the system, so if this is a new u

Setting UP nFS Server and Client..

I'm using two CentOS systems here: NFS Server: server.example.com , IP address: 192.168.0.100 NFS Client: client.example.com , IP address: 192.168.0.101 2 Installing NFS Server side  : #yum install nfs-utils nfs-utils-lib #chkconfig --levels 235 nfs on #/etc/init.d/nfs start  Client Side: # yum install nfs-utils nfs-utils-lib Creating NFS Share : I'd like to make the directories /home and /var/nfs accessible to the client; therefore we must "export" them on the server. When a client accesses an NFS share, this normally happens as the user nobody . Usually the /home directory isn't owned by nobody (and I don't recommend to change its ownership to nobody !), and because we want to read and write on /home , we tell NFS that accesses should be made as root (if our /home share was read-only, this wouldn't be necessary). The /var/nfs directory doesn't exist, so we can create it and change its ownership; in my tests the user and g

Linux Hardlinks and Softlinks

What is symbolic link or symlink? Symbolic link , often called symlink or softlink , is very similar to what we know from Windows - a shortcut . They are kind of shortcuts in the Linux/Unix world. Well, symbolic link can exist in the Windows world too, but for the simplicity of our explanation, let's just work with the comparison that symlink is kind of a shortcut for now. We will get into more details later. Symbolic link contains information about the destination of the target file. What is hard link? Hard link (often also called hardlink ) is a bit different object when compared to a symlink. Hard link is a directory reference or pointer to a file. Hardlink is a label stored in a directory structure that refers the operating system to the file data when it is accessed. The important part is that hard link is closely tied together with its originating file. If you make changes to a hard link, you automatically make changes to the underlying file that the hardlin

How to configure syslog server or a centralized log server in redhat linux rhel5 or centos

Instaltion Package is sysklogd [root@apache ~]# rpm -q sysklogd sysklogd-1.4.1-44.el5 [root@apache ~]# Or you can check as follows: [root@apache ~]# rpm -qf /etc/syslog.conf sysklogd-1.4.1-44.el5 [root@apache ~]# Starting the syslog daemon [root@apache ~]# /etc/init.d/syslog start Starting system logger:                                    [  OK  ] Starting kernel logger:                                    [  OK  ] [root@apache ~]# Checking the process name. it is syslogd [root@apache ~]# ps -ax | grep syslog Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ  5190 ?        Ss     0:00 syslogd -m 0  5210 pts/0    S+     0:00 grep syslog [root@apache ~]# Configuration of server machine(syslog server) Service name: syslog configuration file: /etc/sysconfig/syslog Steps: 1. Open the /etc/sysconfig/syslog file and add "-r" option to the variable SYSLOGD_OPTIONS as shown below. [root@server

Linux boot process

Image
Roadmap Power Cycle -> CPU Reset -> BIOS -> Boot Device -> MBR -> IPL ->/ boot/grub/grub.conf -> /etc/inittab -> /etc/rc.d/rcX.d -> /etc/rc.local -> /etc/isuue -> /etc/motd Power Cycle When we power on the system, it'll go to SMPS and will reset chips in CPU. Power On Self Test (POST) The computer power-on self-test tests the computer to make sure it meets the necessary system requirements and that all hardware is working properly before starting the remainder of the boot process. If the computer passes the POST, the computer may have a single beep as the computer starts and the computer will continue to start normally, Passing the control to the BIOS. BIOS [Basic Input Output System] The BIOS is the first code run by a PC when powered on. The primary function of the BIOS is to load and start an operating system. When the PC starts up, the first job for the BIOS is to initialize and identify sys