RHEL 6 Linux Bset Gude

RHEL 6 Linux  Bset Gude
Ajay Saxena

Sunday 14 April, 2013

Configure FTP Server

FTP (File Transfer Protocol):- It is a server used to download & Upload files from server.
FTP Port No. 20 & 21 [21 is main], SSH Port No. 22 
How to Configure FTP Server 
  • Go inside of Packages folder 
  • #rpmᶲ-ivhᶲvsftpd_____ (Press Tab only one time) ← Run this command for install FTP (Server) Package. 
  • #cdᶲ/var/ftp ← Here ftp is default directory. You can create here your any data like files. And then if you’ll access your ftp server on client side with his IP, then you can get that all ftp folder data.
  • But firstly you need to start that server services.
  • #serviceᶲvsftpdᶲrestart← for restart FTP (Server) services.
  • #chkconfigᶲvsftpdᶲon← for ON FTP (Server) services.
  • #systemᶲconfigᶲfirewall← It is most important to check firstly Firewall Disable or not. If it’ll enable so you can’t access that FTP on client side.
  • ftp://192.168.0.2 ← now go to client side and open any Internet Browser and type there FTP Server URL (Path of FTP Server). 
How to Access FTP through to Terminal 

  • Firstly we need to install on client side of that FTP Client Package. 
  • #rpmᶲ-ivhᶲftp_____ (Press Tab only one time) ← Go to Client side and run this command for install FTP (Client) Package. 
  • #ftpᶲ192.168.0.2← 
  • Go inside of Packages Folder 
  • #rpmᶲ-ivhᶲftp(_______) it means press two time tab ← That’ll show you all ftp Packages. 
  • serviceᶲftpᶲrestart← For restart service. 
  • chkconfigᶲftpᶲon← For On Service. 
  • System-config-firewall← Check Firewall and Disable. 
  • Open your Terminal 
  • Check firstly is in there both are proper Pinging or not. Then 
  • Type in Terminal ftpᶲ192.168.0.1← (Server IP) ← For Access FTP server data through Terminal.

Basic of RHEL

Anaconda is an Installer.

Basically we give 200 MB for Boot but in there used only 24 MB, because it’s total files size are 24 MB. 

Types of Partition 
  • Standard Partition 
  • RAID Partition
  • LVM Partition 
Types of Login Mode 
  • In their 6 types of login mode = Alt +Ctrl +F1 to F6 
  • F1 GUI Mode [Graphical User Interface] 
  • F2 to F6 TUI Mode [Terminal User Interface] 
Symbol of Location 
  • ~ = Home Directory 
  • / = Root Directory 
  • # = Root user login 
  • $ = Normal User login 
(root@localhost~)# = In there Root is User, Localhost is machine name and “ ~ ” this symbol shows that right now you are in home directory

Boot into Single User-mode

Single user mode is a mode in which a multiuser computer operating system boots into a single superuser. It is mainly used for maintenance of multi-user environments, Basically single user mode in unix based systems is known as runlevel 1.

Some tasks may require exclusive access to shared resources, for example running fsck on a network share or to retrieve a lost superuser password or any maintenance task.

For gaining access to #(root) prompt what you need to do is ?
  • Once your machine is booting, for getting access to # prompt your just need to edit the bootloader i.e. in case of RHEL6 its GRUB (GRand Unified Bootloader). 
  • Once your machine is booting just press a key couple of time so that you are brought to the GRUB menu.
  • The GRUB menu appears like the image shown below:
  • The values which are show in this window are the kernerl(s) which are installed in your machine.
  • Use the cursor keys to switch between kernels (if you have more than 1 installed) to choose the one you want to boot.
  • Press "e" to edit the kernel commands before booting.
  • Press "a" to modify the kernel arguments.
  • Press "c" to go to a command-line, for extended troubleshooting etc.
  • Once you pressed "e" while the kernel of your choice is highlighted, you get a second menu like the one shown on below screen.
  • Highlight the second line which starts with kernel /vmlinuz_______, Just press "e".
  • It will bring to a screen in which you just need to press a space once followed by 1 or single.
  • Make sure to hit “enter” to actually add the argument and to return to the boot menu. Escape does get you back to the same menu as well, but it does not add the argument, so your work will be undone actually.
  • Once you are back to your previous menu just press "b" to boot the kernel, Once your OS is booted you can see a screen something like this:
  • Now at the bottom of you screen you can see that you are on # prompt i.e. root prompt, Just type a command: passwd this will change your root password.
  • [root@sunny1 /]# passwd

Structure of Linux OS ?


In Linux the file system is based on one root directory, or hierarchical top point with sub-directories below it. In which each sub-directories has its own importance like some act as mount points, some for log messages, some for all hardware devices etc.
You can find a brief description of all the directories and sub directories below
  • You can find a brief description of all the directories and sub directories below:
/ :-         Its the top most directory in any of the Unix based system.
/bin:-     Essential command binaries that need to be available in single user mode; for all users, e.g., cat, ls, cp.
/boot:-   Boot loader files, e.g., kernels, initrd etc.
/dev:-    Information of all the hardware devices.
/etc:-     All the config files.
/home:- Home directories of all the users in a particular machine.
/media:-Mount points for removable media such as USB, CD etc.
/mnt:-    For temporary mount points.
/opt:-     Optional software packages like openoffice etc.
/root:-    Home directory of root user.
/sbin:-    System binaries like init, ip etc.
/tmp:-     Temporary files. Often not preserved between system reboots.
/var:-      Variable files—files whose content is expected to continually change during normal operation of the system—such as logs, spool files, and temporary e-mail files.
/usr:-      Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.
/lib:-        Libraries essential for the binaries in
 /bin and /sbin.