Thursday, 3 November 2011

Configuration of FTP Server in LINUX

Ftp server is designed for uploading and downloading the files, when ftp server users log's in, they get their home folder at client side and if public/anonymous user log's in they get data stored in /var/ftp folderSteps to Configure FTP Server in LINUX Step:--1.  Check and install required PackagesCheck the packages are installed or not by rpm/yum command[root@server ~]# rpm -q vsftpdRemove the packages and old data if required[root@server ~]# yum remove vsftpd* -yInstall the PackagesNote: Here my file is at Desktop. So i was changing the path to Desktop.[root@server ~]# cd /root/Desktop/[root@server Desktop]# lsFileZilla3  tomcat  vsftpd-2.0.5-10.el5.i386.rpm[root@server Desktop]# chmod 777 vsftpd-2.0.5-10.el5.i386.rpm[root@server Desktop]# rpm -ivh vsftpd-2.0.5-10.el5.i386.rpmwarning:...

Wednesday, 2 November 2011

Network Configurations in Linux

Assigning a static IP address --- temporarilySyntax:--[root@server ~]# ifconfig <devicename> <IP address>Example:-- To Assign the static IP address as 192.168.10.121[root@server ~]# ifconfig eth0 192.168.10.121To check the IP assigned[root@server ~]# ifconfigeth0      Link encap:Ethernet  HWaddr 00:08:02:F7:33:6A          inet addr:192.168.10.121  Bcast:192.168.10.255  Mask:255.255.255.0          inet6 addr: fe80::208:2ff:fef7:336a/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:773 errors:0 dropped:0 overruns:0...

Tuesday, 1 November 2011

Networking in LINUX

Introduction to Networking in LinuxTo check the system hostname[root@localhost ~]# hostnamelocalhost.localdomainAssigning the hostname - temporarlySyntax:- [root@localhost ~]# hostname <computer>EX:- To assign the hostname as server.linuxnunixhelp.com[root@localhost ~]# hostname server.linuxnunixhelp.comTo check the hostname assigned[root@localhost ~]# hostnameserver.linuxnunixhelp.comAssigning hostname ---- PermanentlyEdit the configuration file /etc/sysconfig/networkNETWORKING=yesHOSTNAME=server.linuxnunixhelp.com:...

System Process Commands in Linux

TO check the Process id of any application, command etc[root@localhost ~]# ps -auxTo kill a process normally[root@localhost ~]# kill <process_id>ex: -- [root@localhost ~]# kill 2521To kill the process forcefully use stamp value as '9'[root@localhost ~]# kill -9 <process_id>[root@localhost ~]# kill -9 2521To see the cpu & process status[root@localhost ~]# topTo see the open port number and service name[root@localhost ~]# netstat -antpActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program nametcp       ...

To Recover Root Password in Linux

1. Restart the PC while restarting press any key to get Grub Screen2. Press 'e'3. Select kernal /vmlinuz-2.6.18.-8.el5 ro root=LABEL=/ rhgb quiet4. Again Press 'e' to edit5. Edit kernal /vmlinuz-2.6.18.-8.el5 ro root=/ rhgb quiet line and erase quite and type single6. Press enter7. Press b to boot8. At shell prompt type the commands sh-3.00# passwdChanging Password for user rootNew UNIX Password:123456Retype new UNIX Password: 123456Passwd: all authentication tokens updated Successfully.Now type the following command to Restart the system to the normal Loginsh-3.00# init...

Usage of chkconfig command

To view the status of the the services in all runlevels  [root@localhost ~]# chkconfig --list To view the status of the Particular services.For example Bluetooth [root@localhost ~]# chkconfig --list bluetoothbluetooth       0:off   1:off   2:off   3:off   4:off   5:off   6:off To put the service at all runlevel as on [root@localhost ~]# chkconfig bluetooth on To view the status [root@localhost ~]# chkconfig --list bluetoothbluetooth       0:off   1:off   2:on    3:on    4:on    5:on    6:off To put the service at all runlevel as off [root@localhost ~]# chkconfig bluetooth off To...

Monday, 31 October 2011

Boot Process in Linux

To View the default runlevel while booting the Linux Operating System[root@tsmservertest ~]# vi /etc/inittabid:5:initdefault:  (End of the line in Fedora OS)Note: It means that OS by default always boot to GUI mode.To View the current runlevel[root@tsmservertest ~]# runlevelN 5To Switch to another runlevel and check the runlevl[root@tsmservertest ~]# init 3[root@tsmservertest ~]# runlevel5 3[root@tsmservertest ~]# init 2[root@tsmservertest ~]# runlevel3 2[root@tsmservertest ~]# init 1[root@tsmservertest ~]# runlevel1 S[root@tsmservertest ~]# init 6To View the grup configuration file[root@localhost ~]# cat /boot/grub/grub.c...

Saturday, 22 October 2011

Backup and Recovery

Create a folder for EX:-- /myfolder [root@tsmservertest ~]# mkdir /myfolder [root@tsmservertest ~]# cd /myfolder/ Now create Some files and folders inside it. [root@tsmservertest myfolder]# mkdir dir1 [root@tsmservertest myfolder]# touch 1 songs tom_file [root@tsmservertest myfolder]# ls 1  dir1  songs  tom_file Use the tar command to tape archive the folder [root@tsmservertest ~]# tar -cvf /opt/myfolder.tar /myfolder tar: Removing leading `/' from member names /myfolder/ /myfolder/tom_file /myfolder/dir1/ /myfolder/songs /myfolder/1 [root@tsmservertest ~]# cd /opt/ [root@tsmservertest opt]# ls -l total 12 -rw-r--r-- 1 root root 10240 Oct 22 13:01 myfolder.tar To Create a tar file with zip [root@tsmservertest opt]# cd [root@tsmservertest ~]# tar -cvzf /opt/myfolder.tar.gz...

Friday, 9 September 2011

Disk Quotas in Linux

1. Create 4 users as below           a. Ravi with the default properties           b. Sunil whose primary group is sales           c. Tom whose primary group is sales           d. Rani whose secondary group is sales 2. Create a partition and mount it with users and group quotas enabled. 3. Apply quotas to the user Ravi and the group sales and check. Create a Group Example:- To create a group called as sales  [root@test119 ~]# groupadd sales Create the Users Example:- Create users and add some to sales group [root@test119 ~]# useradd ravi [root@test119 ~]# useradd -g sales sunil [root@test119 ~]# useradd...

Sunday, 28 August 2011

Permissions in Linux

Create three users: Example: [root@test119 ~]# useradd kavita [root@test119 ~]# useradd ramu [root@test119 ~]# useradd srinu Make ramu the member of the group kavita Example: [root@test119 ~]# gpasswd -a ramu kavita Adding user ramu to group kavita Create a directory Example: [root@test119 ~]# mkdir /linux Check the default permission of the above created directory [root@test119 ~]# ls -ld /linux/ drwxr-xr-x 2 root root 4096 Aug 28 11:26 /linux/ Give full permissions to the above created directory Example using absolute mode [root@test119 ~]# chmod 777 /linux/                          (or) Example using symbolic mode [root@test119 ~]# chmod ugo=rwx /linux/ Check...

Friday, 26 August 2011

Group Membership in Linux

Syntax:-  [root@localhost~]# gpasswd <option> <arguments> <groupname> Options: -M -- Add multiple users to a group -A -- Add a group Administrator -a -- Add a single user to a group -d -- Delete a user from a group Example:- Add multiple users (ravi, sunil) to the group marketing Note: Before doing this the group marketing should be exists. [root@test119 ~]# gpasswd -M ravi,sunil marketing To check if the users are added to the group [root@test119 ~]# grep marketing /etc/group marketing:x:2006:ravi,sunil Example:- Add user rani as the administrator for the group marketing [root@test119 ~]# useradd rani [root@test119 ~]# gpasswd -A rani marketing To check if rani has been added as the administrator for the group marketing [root@test119 ~]# grep marketing...

Group Administration in Linux

Creating a Group Syntax:-  [root@localhost~]# groupadd <groupname>                           (or) [root@localhost~]# groupadd <option> <argument> <groupname> Options: -g -- Group ID -0 -- Override Example:- Creating a group Sales with default options [root@test119 ~]# groupadd sales To check if the group has been created [root@test119 ~]# tail -5 /etc/group avdefs:x:504: ali:x:2001: tom:x:2002: anu:x:2003: sales:x:2004: Example:- Creating a group mktg whose group id (GID) is 750 [root@test119 ~]# groupadd -g 750 mktg To check if the group has been created [root@test119 ~]# tail -5 /etc/group ali:x:2001: tom:x:2002: anu:x:2003: sales:x:2004: mktg:x:750: Modifying...

Thursday, 25 August 2011

Creating an User

Syntax :- [roort@localhost~]# useradd <username> or [roort@localhost~]# useradd <option> <argument> <username> Options: -u -- UID                                                        -c -- comment -g -- Primary Group Name or GID                  -d -- Home directory -o -- Override                                                ...

Wednesday, 24 August 2011

Basic Commands - 2.1

To View the calender Example : To see the current month [root@localhost ~] # cal      August 2011   Su Mo Tu We Th Fr Sa     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Example : -   TO see the past, current and next month [root@localhost ~] # cal -3        July 2011            August 2011         September 2011  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa                 1  2      1 ...

Basic Commands - 2.0

Copying files and Directories [root@localhost ~]# cp <option> <source> <destination> Example :- To copy a file [root@localhost ~]# cp completereport /opt To check if the file has been copied [root@localhost ~]# cd /opt [root@localhost ~]# ls completereport Example :- To copy a directory [root@localhost ~]# cp -r directory1/ /opt/ To check if the directory has been copied [root@localhost ~]# cd /opt [root@localhost ~]# ls completereport directory1 Moving files and directories Syntax :- [root@localhost ~]# mv <option> <source> <destination> Example :- To Move a file [root@localhost ~]# salesreport /opt To check if the file has been moved completereport directory1 salesreport Example :- To move a directory [root@localhost ~]# mv...

Monday, 22 August 2011

Creating Directories & Directory Navigation

Syntax :- [root@localhost~]# mkdir <option> <directory name> Example :- Creating a single directory [root@localhost~]# mkdir directory1 Example :- Creating multiple directories [root@localhost~]# mkdir direcoty2 directory3 directory4 To check if the directories have been created [root@localhost~]# ls -d directory* directory1  directory2  directory3  directory4 Example :- To create nested directories (Sub directories inside directories) [root@localhost~]# mkdir -p d1/d2/d3/d4 To check if the nested directories have been created [root@localhost~]# ls -R d1 /d1: d2 /d1/d2: d3 /d1/d2/d3: d4 /d1/d2/d3/d4: Note :- To list the contents and create a file or directory in a location different from the present working directory, Specify the complete path (example...

Basic Commands -1.2

Creating files and adding data using cat command Syntax :- [root@localhost~]# cat <option> <arguments> Example :- To create a file along with some data [root@localhost~]# cat > salesreport This file contains the sales report for the month Aug. ( Now press Ctrl+d to Save ) Example :- To create one more  file along with some data [root@localhost~]# cat > mktgreport This file contains the mktg report for the month of Aug. ( Now press Ctrl+d to Save ) Example :- To read the contents of a file [root@localhost~]# cat salesreport This file contains the sales report for the month of Aug. Example : - To append (add) to a file [root@localhost~]# cat >> mktgreport This year the efforts in mktg have increased. Ctrl+D Check the contents of the file mktgreport [root@localhost~]#...

Sunday, 21 August 2011

Basic Commands -1.1

To check the Present working directory Syntax :- [root@localhost`]# pwd Example :- [root@localhost~]# pwd /root To See the contents of a directory (folder) Syntax :- [root@localhost~]# ls <option> <argument> Options: -l          Long list including attributes  -a         All files and directories including hidden -d         To check for a particular file or directory -R        Recursively, to see the contents in a tree structure Example :- To list the contents of the present working Directory [root@localhost~]# ls  anaconda-ks.cfg    install.log.syslog  POOL.logpid Desktop         ...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews