Вы находитесь на странице: 1из 24

RHEL 4(2.

6 95EL) INSTALLATION STEPS

Date: 14-10-2008

Insert the Red hat cd in the system. Change the setting in BIOS boot with cd and follow the instruction. To install or upgrade in graphical mode, press the <Enter> key To install or upgrade in text mode, type: Linux text <enter> Use the function keys listed below for more information Boot: I have pressed enter key

Cd media test will occur either we can test or skip the same. I have skipped

Welcome window click next Language selection English Click next Select the appropriate keyboard for the system U.S. English

Options to select automatic or manual partitions I have chosen manual partitions.

While creating partition you will be having the following options. New, Edit, Delete, Reset, RAID, LVM Go to New and select mount point. File system options: ext3, physical volume (LVM), software RAID, SWAP, VFAT

1st partition = /boot = 100mb select ext3 2nd partition = / =8 GB select ext3 3rd SWAP = 11/2 half of the Main RAM Rest of the partition based on project requirement Note: only three primary partitions can be created and rest will be considered as extended. After partitions click on next, you will get GRUB window where you can edit boot loader You can configure the boot loader to boot with other operating systems. It will allow you to select an operating system to boot form the list. To add the additional operating systems, which are not automatically detected? It will be having the following default options. Add, Edit, Delete. Even you can set the boot loader password: prevents users form changing options passed to the kernel. Clic Next, Network devices You will get an option to configure eth0 DHCP or STATIC ip. Next Firewall Configuration No Firewall Enable Firewall I have chosen no firewall. If we enable the firewall following options/services are get enabled by default Remote Login (SSH) Web server (HTTP, HTTPS) File Transfer (FTP) Mail Server (SMTP)

There is a one more options is SELinux. Additional language support English (U.S.A) Time Zone selection: Asia/Calcutta Set Root Password Package Installation Defaults: you will get two options Its a server OR customizes installation. Desktops options: Default or customize X Window system Gnome desktop environment KDE( K desktop environment) Applications Editors Engineering and scientific Graphical Internet Text-based Internet Office/Productivity Sound and video Authoring and publishing Graphics Games and entertainment Servers Server configuration tools Web server Mail server Windows file server DNS name server ftp server postgreSQL database MySQL Database News Server Network servers Legacy network server

Development Development tools X Software Development Gnome software development KDE s/w development Legacy s/w development System Administration Tools System Tools Printing Support Miscellaneous Everything Minimal Click next, installation will start and ask for appropriate cds.

NOTE: Default installation will take 20 minutes.

Command: Red color Examples : Green color Paths : blue color

Basic setting Changing host name


$ hostname name By executing the above command it will set temporarily system name but once you restart the system it will take his old system name. To set the permanent system name we need to enter the system name in the network file which is located in the below path. $ Vi /etc/sysconfig/network Example: [renukka@edsm5cae01 ~]$ cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=edsm5cae01 # Here we enter the host name. NISDOMAIN=qgblrnis Even enter the ipaddr with host name in /etc/hosts file with. Configuring IP address We can configure the ip addr using 3 steps 1. Using command 2. by editing the network files 3. by running the setup command or by graphical window

Command: Ifconfig eth0 192.168.1.10 netmask 255.255.255.0 route add default gw 192.168.1.254 eth0 After restarting system or network service, ip configured through command will be vanished. To set permanent an entry has to be done in the below mention path. Path: /etc/sysconfig/network-scripts Edit the file: ifcfg-eth0 Or run a $ setup command

Example: DEVICE=eth0 BOOTPROTO=none HWADDR=00:1d:09:64:a2:81 ONBOOT=yes IPADDR=10.124.5.220 NETMASK=255.255.255.0 GATEWAY=10.124.5.1 TYPE=Ethernet USERCTL=no IPV6INIT=no PEERDNS=yes #ETHTOOL_OPTS="speed 100 duplex full" ETHTOOL_OPTIONS="speed=100 duplex=full"

$ domainname : to check which domain

NFS
Configuring User home directory using NFS Make full path of dir(shareable) entries in /etc/exports. Example [renukka@edsm5cae01 ~]$ cat /etc/exports # /home/user1 *(rw,async,insecure_locks,insecure,no_root_squash) /home/tmp1 *(rw,async,insecure_locks,insecure,no_root_squash) /home/CAE_projects *(rw,async,insecure_locks,insecure,no_root_squash) NOTE : need to know about : *(rw,async,insecure_locks,insecure,no_root_squash) [renukka@edsm5cae01 ~]$ Reload the service nfs $service nfs reload ( other wise it is not possible to mount) $exportfs a $exportsfs v $exportsfs r [root@edsm5cae01 ~]# exportfs -v /home/CAE_projects <world>(rw,async,wdelay,insecure,no_root_squash,no_subtree _check,insecure_locks,anonuid=65534, /home/user1 <world>(rw,async,wdelay,insecure,no_root_squash,no_subtree_check,ins ecure_locks,anonuid=65534, /home/tmp1 <world>(rw,async,wdelay,insecure,no_root_squash,no_subtree_check,ins ecure_locks,anonuid=65534, Note: dont mount directly on root dir

I have done the same and faced problem to login and not able to umount. Start the below mention demons Nfs Nfslock Portmap

In client machine check by mounting the shared folder. If we made entry in fstab mount -a command activate the mount

Configuring nfs with automount.


Step1: Enter the share name and file (auto.user) in /etc/auto.master file. FILE name : where we enter the path of the dir Example: [renukka@edsm5cae01 ~]$ cat /etc/auto.master # $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $ # Sample auto.master file # Format of this file: # mountpoint map options # For details of the format look at autofs(8). # /misc /etc/auto.misc --timeout=60 #/home /etc/auto.home --timeout=60 # # /user auto.user --timeout=60 /proj auto.proj --timeout=60 # /proj auto.proj --timeout=60 /admin auto.admin --timeout=60 Step2: Create a auto.user file in /etc Enter the users entries and login path in auto.user file.

Example:kirdede renukka kiransh kiranhub kiruan vuppala srigaan -rw,soft,intr edsm5cae01:/home/user1/& -rw,soft,intr edsm5cae01:/home/user1/& -rw,soft,intr edsm5cae01:/home/user1/& -rw,soft,intr edsm5cae01:/home/user1/& -rw,soft,intr edsm5cae01:/home/user1/& -rw,soft,intr edsm5cae01:/home/user1/& -rw,soft,intr edsm5cae01:/home/user1/&

Note : Need to edit the exact path in /etc/passwd also then only users home dir will mount in remote dir.

Problem faced:
We configure the autofs, where user home dir should mount on the client. But when we try to login it through the below error. Error: No directory /user/san! Logging in with home = /. -basg-3.00$ pwd / When we check logs in NIS server it through the below message. Vi /var/log/messages Error: Dec 17 10:18:26 edsm5cae01 ypserv[2259]: refused connect from 192.168.1.13:1013 to procedure ypproc_match (qgblrniz,auto.user;-4) Solution:

We need make entries even in Makefile, which updates databases frequently. Vi /var/yp/Makefile Step 3: Enter the auto.user file name in /var/yp/Makefile Vi Makefile

Need to put entry in this line # These are the files from which the NIS databases are built. You may edit # these to taste in the event that you wish to keep your NIS source files # seperate from your NIS server's actual configuration files. NETID = $(YPSRCDIR)/netid AMD_HOME = $(YPSRCDIR)/amd.home AUTO_MASTER = $(YPSRCDIR)/auto.master AUTO_PROJ = $(YPSRCDIR)/auto.proj AUTO_ADMIN = $(YPSRCDIR)/auto.admin AUTO_USER = $(YPSRCDIR)/auto.user AUTO_APPS_LINUX = $(YPSRCDIR)/auto.apps.linux AUTO_APPS_HPUX = $(YPSRCDIR)/auto.apps.hpux AUTO_APPS_IA64 = $(YPSRCDIR)/auto.apps.ia64 AUTO_HOME = $(YPSRCDIR)/auto.home AUTO_LOCAL = $(YPSRCDIR)/auto.local TIMEZONE = $(YPSRCDIR)/timezone LOCALE = $(YPSRCDIR)/locale NETMASKS = $(YPSRCDIR)/netmasks

Second entry all: passwd group hosts rpc services netid protocols mail \ auto.master auto.proj auto.user auto.apps.linux auto.apps.hpux \ auto.apps.ia64 auto.admin \ # netgrp shadow publickey networks ethers bootparams printcap \ # amd.home auto.master auto.home auto.local passwd.adjunct \

# timezone locale netmasks` 3rd entry Copy the auto.master and below lines and edit the copied one. auto.master: $(AUTO_MASTER) $(YPDIR)/Makefile @echo "Updating $@..." -@sed -e "/^#/d" -e s/#.*$$// $(AUTO_MASTER) | $(DBLOAD) \ -i $(AUTO_MASTER) -o $(YPMAPDIR)/$@ - $@ -@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@ auto.user: $(AUTO_USER) $(YPDIR)/Makefile @echo "Updating $@..." -@sed -e "/^#/d" -e s/#.*$$// $(AUTO_USER) | $(DBLOAD) \ -i $(AUTO_USER) -o $(YPMAPDIR)/$@ - $@ -@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@ Step 4: go to /var/yp Run the command make

NOTE : When we configuring the home dir mounting using autofs entery should be altered in the passwd file as by share name with respect to profile path Autofs is a depended on yp server, becoz when i made entry in auto.master until I run make command it dint display in client when I run service autofs reaload and status Profiles Bash shell: .bashrc : Aliases and functions .bash_profile : Specific environment and startup programs

I have creatd alias in .bashrc and setted env path in .bash_profile. I login to another machine alias worked but env dint worked. Vi .bash_profile PATH=$PATH:$HOME/bin:/super/tmp :wq /super/tmp need to be mount on client system then only I can execute the command/script which is there in the /super/tmp Copied the .bashrc and .bash_profile to /etc/skel and created new account and it worked as expected.

DHCP CONFIGURATION
RPM Required: 1. dhcpv6_client-0.10-8 2. dhcp-3.0.1-12_EL STEP 1: Install the above RPMs Rmp ivh rmp name aid STEP 2: Copy the dhcpd .conf.sample file to /etc/ and rename to dhcpd.conf Dhcpd.conf.sample file will be located in the below path /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample cp /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf STEP 3: configure the dhpcd.conf file. Vi /etc/dhcpd.conf Orginal file : Ddns-update-style interim Ignore client-updates;

Subnet 192.168.0.0 netmask 255.255.255.0 { ! --- default gateway Option routers Option subnet-mask 192.168.0.1; 255.255.255.0;

Option nis-domain domain.org; Option domain-name domain.org; Option domain-name-servers 192.168.1.1; Option time-offset -18000; # Eastern Standard Time # option ntp-servers 192.168.1.1; # option netbios-name-servers 192.168.1.1; # --- Selects point-to-point node (default is hybrid). Dont change this unless # -- you understand Netbios very well # option netbios-node-typ 2; Range dynamic-bootp 192.168.0.128 192.168.0.254; Default-lease-time 21600; Max-lease-time 43200; # we want the nameserver to appear at a fixed address Host ns { Next-server marvin.redhat.com; Hardware Ethernet 1:34:56:78:AB:CD; Fixed-address 207.175.42.254; } }

Configured Vi /etc/dhcpd.conf Ddns-update-style interim Ignore client-updates; Subnet 192.168.1.0 netmask 255.255.255.0 { ! --- default gateway

Option routers Option subnet-mask

192.168.1.1; 255.255.255.0;

Option nis-domain qgblrnis; Option domain-name blrm5dns2.REDHAT.COM; Option domain-name-servers 192.168.1.13; Option time-offset -18000; # Eastern Standard Time # option ntp-servers 192.168.1.1; # option netbios-name-servers 192.168.1.1; # --- Selects point-to-point node (default is hybrid). Dont change this unless # -- you understand Netbios very well # option netbios-node-typ 2; Range dynamic-bootp 192.168.1.2 192.168.1.254; Default-lease-time 21600; Max-lease-time 43200; # we want the nameserver to appear at a fixed address Host ns { Next-server marvin.redhat.com; Hardware Ethernet 1:34:56:78:AB:CD; Fixed-address 207.175.42.254; } } :wq STEP 4: on the server dhcpd service and start the same Chkconfig dhcpd on Service dhcpd start Note: when we make changes in dhcpd.conf file we should restart the dhcpd service. Find the below log of the server when it issues the ip addr to client. DHCP server log when it issues ip addr to client machine Vi /var/log/messages

Jan 7 12:01:01 blrm5dns2 dhcpd: DCPDISCOVER from 00:0c:f1:d6:5e:70 via eth0 Jan 7 12:01:01 blrm5dns2 dhcpd: DHCPOFFER on 192.168.1.254 to 00:0c:f1:d6:5e:70 via eht0 Jan 7 12:01:01 blrm5dns2 dhcpd: DHPCREQUEST for 192.168.1.254 (192.168.1.13) from 00:0c:f1:d6:5e:70 via eht0 Jan 7 12:01:01 blrm5dns2 dhcpd: DHCPACK on 192.168.1.254 to 00:0c:f1:d6:5e:70 via eht0

SAMBA CONFIGURATION Rpm required Samba-3.0.10-1.4E

22-01-09

Smbd V : To know which version is installed. By default this RPM will be installed. Agenda: To make the share folder accessible to windows machine. Note: samba file will be in the following path /etc/samba/smb.conf Step1: Start the samba service. Service smb start Step2: Browse the samba server through windows machine Go to run and type \\samb machine name It will display with printer shared. Without DNS and host entries client is able to ping server by name.

If smb service is stop and restart the client system, it will stop ping. Again if I start the smb service it starts ping no idea frm where its resolving. Step3 : Share any folder in samba server. Vi /etc/samba/smb.conf Under the share definations

[tmp] Comment = Temporary file space Path = /home/tmp1 Public = yer/no Read only = yes/no Writable = yes/no Browseable = yes/no Create mask = 0777 Directory mask = 0770 testpram linki for support : http://www.samba.netfirms.com/PDC.htm Agenda: Configuring Samba as a pdc domain. Step1: Edit the smb.conf file. Note: I have commented all the lines in smb.conf only required file to configure pdc I will edit. By this configuration u can just add the windows system to samba server as client machine.

Vi /etc/samba/smb.conf Under global settings Workgroup = QGSBLR Server string = samba server running ---- optional Domain master = yes - optional

Preferred master = yes - optional domain logons = yes - need to check weather it is required or not. then save this file :wq We faced a problem while adding the system to domain it was not asking any authentication. Then in smb.conf we un commented the domain logons and assigned value yes. After that it started asking authentication but still not able to add. Solution: We need to create machine account in the samba server like user id. Step3: Creating machine account. Syntax : Useradd d /dev/null g groupname s /bin/false M systemname Smbpasswd m a systemname$ Useradd d /dev/null g systems s /bin/false M node4 //create linux account Rename the node4 node4$ in passwd file Vi /etc/passwd Node4$:X:508:506::/dev/null:/bin/false

:wq Smbpasswd m a node4$ // This will create samba account

Step4: Add the windows system to samba domain. Right click on mycomputerselect propertiesselect computername Click on change button under the member of select domain option. Mention the name of the domain qgsblr and click on ok

It will ask for the aunthentation then user the below syntax Domainname/root Provide the root passward NOTE: before that we need to create samba user id(root) in server. Smbpasswd a root Step5: Even samba users can abale to login but it through the error message Error: Windows cannot locate the server copy of roaming profile and is attempting to log you on with your local profile. Attempting to save any thing will be copied locally Please contact u r system administrator. Problem : I loged in by root in client machine, when I checked in document and setting the profile name was TEMP To check I logged in with another user id but the result was TEMP.QGSBLR And I have logged with one more user id the result was TEMP.QGSBLR.000

Solution : HOME option should be un comment Example: [homes] Comment = Home Directories Browseable = no Writable = yes NOTE: DNS is not required for adding to domain. We will see later on user login problem with TEMP Other settings in samba Its stores separate log file for each machine that connects and it stores in the below path. Log file = /var/log/samba/%m.log

All log information will store in one file. Log file = /var/log/samba/smbd.log Put a capping on the size of the log files (in KB) Max log size = 50 Problem: We checked to change the password from client machine but it throughs the below error Error: No NetWare NDS trees were detected, unable to perform change password operation.

Error1: You may need to change your password separately on Netware 2.x and 3.x servers that are not part of a password synchronization scheme. Use SETPASS (located in the SYS\PUBLIC director on Netware servers) to do this.

#uncomment this if you want a guest account , you must add this to /etc/passwd otherwise the user nobody is used. #---- guest account = pcguest Problem : If I uncomment guset, we cannot login into the client machine with using none of the user id. If comment we can login Solution: We need to create the pcguest account in the sytem. NOT UNDER STAND #---Password level allows matching of _n_ characters of the password for all combinations of upper and lower case. Password level = 10 Username level = 8 Agenda : How to share a folder in linux through samba Step1: Edit sam.conf Go to share definition category Under that there will be so much standard shares will be there with some of them is commented. To a share a simple folder

[projects] comment = Data Server path = /proj public = yes writable = yes browseable = yes create mask = 0770 directory mask = 0770 # vfs object = extd_audit recycle # recycle:repository=.recycle # recycle:versions=True # recycle:keeptree=True Trouble shooting . 1.Samba has a test utility called testparm that alerts you to errors in the smb.conf file. If you used SWAT to edit the file, you will usually pass the test successfully, as shown:
[root@bigboy tmp]# testparm -s Load smb config files from /etc/samba/smb.conf Processing section "[homes]" Processing section "[printers]" Loaded services file OK. ...

3. 1. Make sure your Samba server can see all the shares available on the network with the smbclient -l samba_server command. Press the Enter key when prompted for a password. Failure of this test may mean that Samba isn't running on the server at all and may need to be started Example : copy from the laptop $ smbclient L edsm5cae01 ( server name) Out put :
Sharename --------tmp IPC$ ADMIN$ root Type ---Disk IPC IPC Disk Comment ------Temporary file space IPC Service (SANTHOSH SAMBA SERVER RUNNING) IPC Service (SANTHOSH SAMBA SERVER RUNNING) Home Directories

Server --------Workgroup --------QGSBLR

Comment ------Master ------EDSM5CAE01

4. 2. Use the nmblookup -B samba-server-IP-address _SAMBA_ command on the server to determine if the samba software is running correctly. This should return the server's IP address if is running correctly. Example : Nmblookup B 192.168.10 __SAMBA__ Out put :
querying __SAMBA__ on 192.168.1.10 192.168.1.10 __SAMBA__<00>

5. 3. Use the nmblookup -B client-IP-address "*"command on the server to determine whether the client is accepting Samba queries. This should return the client's IP address if is running correctly. If the test fails, check to see whether the client is running firewall software that could prevent communication. Another source of the problem could be that the "Client for Microsoft Windows" or "File and Printer Sharing for Microsoft Networks" settings on the client's NIC card haven't been selected. You also could have entered an incorrect IP address. Example : Syntax : nmblookup B client ipaddr * Nmblookup B 192.168.1.15 * Out put :
querying * on 192.168.1.15 192.168.1.15 *<00>

6. Use the nmblookup -d 2 "*" command on the server to tell it to broadcast a query message to the network. This should return answers from all locally connected clients

and servers. This test actually sends out a broadcasted request for information, it usually fails if either your client or server has an incorrect subnet mask configured on their NIC cards. Example: Syntax : Nmblookup d 2 Out put :
added interface ip=192.168.1.10 bcast=192.168.1.255 nmask=255.255.255.0 Got a positive name query response from 192.168.1.10 ( 192.168.1.10 ) Got a positive name query response from 192.168.1.15 ( 192.168.1.15 ) querying * on 192.168.1.255 192.168.1.10 *<00> 192.168.1.15 *<00>

7. 5. Use the smbclient //samba-server/tmp command to attempt a command-line login to the Samba server. When prompted for a password, use the Linux password of the account with which you logged in. You can test other accounts can be achieved by adding the -U accountname option at the end of the command line. This should return message that the login was login successful. If you are doing this as user root, press the <Enter> key when prompted for a password. 5. Use the smbclient //sambaserver/tmp command to attempt a command-line login to the Samba server. When prompted for a password, use the Linux password of the account with which you logged in. You can test other accounts can be achieved by adding the -U accountname option at the end of the command line. This should return message that the login was login successful. If you are doing this as user root, press the <Enter> key when prompted for a password. Syntax : smbclient //samba_servername/TMP Smbclient //edsm5cae01/TMP
Anonymous login successful tree connect failed: NT_STATUS_ACCESS_DENIED Anonymous login successful tree connect failed: NT_STATUS_ACCESS_DENIED

6. Log into the Windows workstation as a Samba user. (In the example below, the username is peter). Use the net view \\samba-server command to log into the Samba server from the command line and get a listing of your shares.

If it fails, then make sure your hosts allow, hosts deny and invalid users parameters are set correctly in your smb.conf file. This test attempts to login using the username and password with which you logged into the PC. Make sure the corresponding Samba user has been created. A "Network name not found" message usually points to an incorrect NetBIOS configuration on the client

Checking the Samba Logs


Samba stores all its log files in the /var/log/samba directory. If you find yourself having difficulties, try searching the nmbd.log and smbd.log files for clues.

Samba is not fully completed.

Вам также может понравиться