Showing posts with label fedora. Show all posts
Showing posts with label fedora. Show all posts

Saturday, 10 January 2015

Top 10 Things To Do After Installing Fedora 21

     Several advance changes have been made to the latest version of Fedora.Following steps will help you in configuring a basic working system based on Fedora 21. This OS supports lots of applications and users can also start working as soon as Fedora is booted. 




Here are ten things which you need to do after installing Fedora 21:

1. Run command and configure GNOME Shell interface:
First make sure that you are using the latest updates from Fedora 21 repositories through this command:

$ sudo yum update.

Then configure default GNOME Shell. Use the Gnome Tweak Tool and to install run this command: 

$ sudo yum install gnome-tweak-tool. 

Open “Gnome Tweak Tool” from the applications menu, and configure the GUI options easily. You can also browse available tabs to see the available options.

2. Configure keyboard shortcuts:
There are several pre-configured shortcuts which are available with GNOME 3.14. There are some additional shortcuts too which might prove helpful for you. Search ‘keyboard’ in overview, open keyboard app and click on shortcuts tab. You can configure the existing shortcuts and you can also make additional shortcuts too by selecting custom shortcut from the bottom of the list.
 Click on + button and add the shortcut name as well as the command.

3. Install extra repositories:
The official repository of Fedora has not much software as there are patent and licensing issues. That’s why third party repositories are used just like other Linux based operating systems. Add RPMFusion repository to install applications and there are two repositories within RPMFusion. Enable the free repository and then that one which is not free. Install both the repositories.

4. Install Gnome Shell extensions:
After setting up Fedora 21 you have to include extensions. They are useful for users as these extensions will modify the GNOME Shell interface as per user requirements. Install the extensions via ‘Gnome Shell Extensions’ website. This is an official website of the Gnome project. Enter the website and choose the extensions you want. Install them with a single click only.

5. Install multimedia codecs:
Fedora doesn’t offer proprietary multimedia codecs which are important for playing media files. RPMFusion repositories have these codecs. After installing these repositories, you can install the necessary multimedia codecs through this command: 

$ sudo yum -y install gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer1-plugsins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base
6. Install VLC:
VLC is popular as it can play any video format. It also converts media formats and you can also extract audio from video files. It can also play online videos from YouTube. Install VLC by this command: 

$ sudo yum install vlc

 It can also be found in the RPMFusion repositories.

7. Install Yum fastest mirror plugin:
If you have a slow Internet connection then this plug-in can be really helpful. It automatically selects nearest mirror server available and it speeds up downloading packages process. Run this command to install it:

 $ sudo yum install yum-plugin-fastestmirror.

8. Install Flash Player:
Adobe flash player is the most popular one to view flash content. It’s a closed-source content and that’s why it’s not packed by Fedora officially. You can use the following command to add Adobe Flash Player repository to Fedora.

## Adobe Repository 32-bit x86 ##
 
$ sudo rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
 
$ sudo rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

## Adobe Repository 64-bit x86_64 ## 
$ sudo rpm -ivh http://linuxdownload.adobe.com/adobe-release/
adobe-release-x86_64-1.0-1.noarch.rpm  

$ sudo rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

Then install the flash player by running: 

$ sudo yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl

9. Install Chrome browser:
Gnome’s Epiphany has been replaced by Firefox in Fedora 21. If you want Google Chrome you can install it by downloading the binaries from the respective websites. From the Chrome download page, get the .rpm binaries as per your system’s requirement. Double click on the binaries or right click and choose ‘Open with Software Install”. Follow the given instructions there.

10. Install other desktop environments:
Some famous desktop environments such as Mate, KDE, XFCE, LXDE, etc.. are available for download from the official repositories for Fedora 21. To install Mate desktop run: $ sudo yum install @mate-desktop. To install KDE desktop run: 

$ sudo yum install @kde-desktop. 

To install XFCE desktop: 
$ sudo yum install @xfce-desktop. 

To install LXDE desktop run: 
$ sudo yum install @lxde-desktop. 

To install Cinnamon desktop run: 
$ sudo yum install @cinnamon-desktop.

Wednesday, 25 June 2014

15 Things To Do After Installing Fedora



The preference for GNOME 3 and the non-requirement for KDE is the reason for primarily selecting the Xfce desktop when trying out new distros. Xfce is ideal when productivity is on top priority, however, not at the expense of functionality.


fedora



Here are 15 things you should do to get the best out of Fedora 20 post its installation -

1. Update Fedora – The first important thing to do would be to get the system updated and this requires no more than a single command mentioned below -
 

fedora logo$ sudo yum update

The download size is going to be important based on the number of updates are present at the time of doing it.

2. Getting a better browser - Firefox + Chrome - Fedora 20 Xfce comes with the Midori. However, it’s quite bulky on high profile sites like youtube.com and crashes frequently. It would be great to get a heavy weight browser.

3. Installing Flash player - Adhering to the Fedora free software principles, there is no flash player. Firstly, you require setting up the yum repository for Adobe flash player, and then install the flash plugin package. The repository setup becomes a lot easier through an rpm provided by Adobe. You can setup the Adobe repository and download the rpm from the link here- http://get.adobe.com/flashplayer/otherversions/

4. Selecting the Greybird theme and a splash screen - Fedora Xfce has the Adwaita theme when it boots initially, but since the Shimmer GreyBird theme is present in the theme list there is no reason to keep away from it. This is among the most professional and elegant looking gtk theme. Let’s take a look at the steps below -

Go to Settings > Appearance and select the Greybird theme.
Go to Settings > Window Manager : Style tab and select Greybird from the list of themes.
Setting a startup splash window
Go to Settings > Session and Startup : Splash tab and select "Simple" from the list. This will show a splash window with status when you load from login screen to desktop. Great to have an indicator.

Tweaking the mouse

Go to Settings > Mouse and Touchpad : Behavior tab and increase Double click time to somewhere around 760 ms. This will make it comfortable when maximize windows by double clicking their title area.

Removing the lower panel

It takes up a lot of space otherwise docks will not fit well into speed+efficiency oriented desktop environments like Xfce. Right click the panel and go to Panel > Panel Preferences, select Panel 2 and click the "-" button.

Giving the Terminal some transparency

The terminal application is known as "xfce4-terminal" supporting transparency. Open a terminal, click Edit > Preferences, go to Appearances tab and in the background section choose Transparent background and set Transparency to 0.70.

5. Optimising fonts and rendering - Here's how to get gorgeous looking fonts on Ubuntu Linux:

1. Create a file named .fonts.conf inside the home directory and fill it with the font configuration found here https://gist.github.com/silv3rm00n/5599072

2. Go to Settings > Appearances and set the font size to 9.
Reduce the font size of the Terminal to 10pt.

3. Download all varieties of Droid and Noto fonts from the Google Fonts store and save them to the directory "/usr/share/fonts/". That's how you install fonts on a linux system.
4. Go to "Applications > Settings > Appearance" : Fonts tab, and enable anti-aliasing with hinting level Medium and subpixel order of RGB.

5. Jump off and login back and your fonts should now have a better appearance.
Okay, the word better is much about perspective, but I could see a huge improvement on LCDs atleast as far as readability and looks are concerned.

6. Installing some extra tools – You can see below a bunch of command line tools that you can install for convenience.
$ sudo yum install htop wget lynx powertop dconf-editor lm_sensors


7. Installing the Gnome System Monitor- The default Xfce Task Manager enlists the processes quite well, however the gui is not that attractive like Gnome System Monitor. So you can get-
$ sudo yum install gnome-system-monitor
You can launch it from Application Menu > System > System Monitor.

8. Getting an Office suite and graphics app - There is not any office suite installed by default so it’s best to get LibreOffice.
$ sudo yum install libreoffice
You may want to install gimp as well for graphics work by using the command below -
$ sudo yum install gimp
9. Installing Skype - Hangouts are more preferred, however skype is useful at times at least for the time being. You can get skype from the following url. You can opt Fedora from the distro list and the rpm file will begin to download.
http://www.skype.com/en/download-skype/skype-for-computer/
You can also open this url and begin the download directly
http://www.skype.com/en/download-skype/skype-for-linux/downloading/?type=fedora32
Or here is the direct link to the rpm file.
$ wget http://download.skype.com/linux/skype-4.2.0.11-fedora.i586.rpm
Install the rpm file with yum.
$ sudo yum install skype-4.2.0.11-fedora.i586.rpm

10. Speeding up system menus – You can make a file named .gtkrc-2.0 in your home directory and put in the following magical lines in it
gtk-menu-popup-delay = 0
gtk-menu-popdown-delay = 0
gtk-menu-bar-popup-delay = 0
gtk-enable-animations = 0
gtk-timeout-expand = 10

Saving the file, closing it, logout and login back. Now the system menus like the Application Menu on top left should be blazing fast.

11. Disconnecting mouse scroller from workspace- The mouse scroll on the desktop changes workspace and can be quite annoying if you are reading a webpage and scrolling up and down. It is best to switch it off and the reason to mention it here is, how hidden the place to configure it is.

Go to Settings > Window Manager Tweaks : Workspaces tab
Uncheck the option named "Use the mouse wheel on the desktop to switch workspaces".

12. Getting a better wallpaper- There is just one blue colored wallpaper which is quite plain. Distros including Mint and Elementary come with great wallpapers.

To extract the deb files use the ar and tar commands
$ ar -vx mint-backgrounds-petra_1.4_all.deb
This would make 3 files, namely debian-binary, control.tar.gz, data.tar.gz
The package contents are in the data.tar.gz file, so untar them.
$ tar -xzvf data.tar.gz

Now browse the directory and find the wallpapers.
Putting the wallpapers in the directory '/usr/share/backgrounds/xfce/'
Then selecting them from Desktop Settings on right click menu on the desktop.

13. Setting up rpmfusion repository- The fedora repositories do not have non-free or other proprietory software and you require third party repositories like rpmfusion to fully load your system. Nvidia graphics drivers, various multimedia codecs and players are available through rpmfusion. To view what else is there, go to Yum Extender and view the repository contents.

Run the following command to enable both free and non-free rpmfusion repositories in a single shot

su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
 
It would install two packages named rpmfusion-free-release and rpmfusion-nonfree-release that setup the correct rpmfusion repositories for your fedora system.

14. Installing VLC player -
Vlc is a great cross platform media player that can play many video formats minus the need for installing codecs separately. It comes from the rpmfusion repositories we have already setup in the previous step.
$ sudo yum install vlcOnce installed you can see the launcher in Applications Menu > Multimedia

15. Installing Dropbox- You can download the correct Fedora rpm from the dropbox site...
https://www.dropbox.com/install?os=lnx
Install the rpm file using yum
$ sudo yum install nautilus-dropbox-1.6.0-1.fedora.x86_64.rpm
Once the installation is complete, you can launch it from Applications Menu > Internet > Dropbox and it will start to download the actual installation files. Once the installation is completed you can launch it and setup your account details to start syncing files.

Friday, 4 April 2014

Step by step guide to install Hadoop and Run the Word Count Program

Step by step Guide to Install Hadoop

and Run the Word Count Program

Softwares required:

  •      Fedora
  •     Java 1.6.x and above


Steps for Enabling root login via GUI in Fedora 13:
(for ubuntu jus type sudo passwd)

Step 1. Open terminal and get into root by using command
[computer@localhost ~]#  su
Password:
Step  2.After entering the password it will switch to root user as
[root@localhost ~]#
Step 3.Now edit following files as
[root@localhost ~]#  vi /etc/pam.d/gdm
·       Search for the line – ‘auth required pam_succeed_if.so user !=root quiet’
·       Either delete the line or comment it by prefixing the character ‘#’ as below
                     #auth required pam_succeed_if.so user != root quiet
·       Now save the updated file by        Esc->:wq

·       Following the similar procedure, update the file
 /etc/pam.d/gdm-password. You should be able to login as ‘root‘ via GUI now.

[root@localhost ~]#  vi /etc/pam.d/gdm-password

Steps for installing hadoop:

here's the link to download hadoop archive file...Hadoop-0.20.2.tar.gz

Step  1. Check ur java version
      [root@localhost ~]#  java –version
Step  2. Configuring the SSH access for our  root user to access localhost without password:
      [root@localhost ~]#  ssh-keygen -t rsa -P ""
Generating public/private rsa key pair.
    Enter file in which to save the key (/root/.ssh/id_rsa):
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
2a:3e:61:08:bc:e5:9c:d7:f2:de:21:4a:6c:16:3f:fe root@localhost.localdomain

       [root@localhost ~]# cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys

Step  3. Place the hadoop archive file hadoop-0.20.2.tar.gz  in  /root/usr/local & after that type the following commands:

[root@localhost ~]# cd /usr/local
[root@localhost local]# tar xvfz hadoop-0.20.2.tar.gz
[root@localhost local]# mv hadoop-0.20.2 hadoop


Cd=change directory
Tar=archiving utility (similar to winzip)
X=extract
V=verbose (to output file names as you  r  extracting)
F=file
Z=filter archive through gzip

Step 4. Check for the JAVA_HOME path

[root@localhost local]#  echo $JAVA_HOME

If  no output then  fire up this  command


Step  5.Also edit following two files by using commands

[root@localhost ~]# vi /etc/environment

add the following line to it :

JAVA_HOME=/usr/lib/jvm/java-1.6.0

[root@localhost ~]# vi /etc/.bashrc

add the following lines to it :

JAVA_HOME=/usr/lib/jvm/java-1.6.0
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

 Step 6. For  the working of Hadoop we need to set configuration details in three main .xml files which are:

I) core-site.xml
ii) hdfs-site.xml
iii) mapred-site.xml

This files can be located at  usr/local/hadoop/conf  folder.
Open these files individually in gedit and copy-paste the entire script which  is given below

Core-site.xml:

<configuration>
               <property>
                    <name>hadoop.tmp.dir</name>
                    <value>/usr/local/hadoop-datastore</value>
                    <description>A base for other temporary directories.</description>
               </property>
                         <property>
                    <name>fs.default.name</name>
<value>hdfs://localhost:54310</value>
                    <description>The name of the default file system. A URI whose scheme and authority determine the FileSystem implementation. The uri's scheme determines the config property (fs.SCHEME.impl) naming the FileSystem implementation class. The uri's authority is used to determine the host, port, etc. for a filesystem.</description>
               </property>
          </configuration>


Map-red.xml:

<configuration>
          <property>
                    <name>mapred.job.tracker</name>
                    <value>localhost:54311</value>
                    <description>The host and port that the MapReduce job tracker runs at. If "local", then jobs are run in-process as a single map and reduce task.</description>
               </property>
</configuration>
 

Hdfs-site.xml:

<configuration>
          <property>
                    <name>dfs.replication</name>
                    <value>1</value>
                    <description>The actual number of replications can be specified when the file is created. The default is used if replication is not specified in create time.</description>
               </property>
</configuration>


Step 7. Now create hadoop temporary directories base using the following commands:

[root@localhost ~]# mkdir /usr/local/hadoop-datastore
[root@localhost ~]# chown  -hR root /usr/local/hadoop-datastore
[root@localhost ~]# chmod 750 /usr/local/hadoop-datastore

some info about above commands(useful during practical exams as external examiner is likely to ask questions related commands and there usage )
Chown: change owner and group info to root
Chmod: change file access permissions
-hR: forcibly and recursively

750  is octal (can also use )
R=4 w=2 x=1
7-full (rwx)
5-read and execute
0-no rights

Step 8.Now format the  filesystem  (it simply initializes the directory specified by   the dfs.name.dir variable)

[root@localhost local]# cd /usr/local/hadoop
[root@localhost  hadoop]#  bin/hadoop namenode –format

13/03/26 16:23:57 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = localhost.localdomain/127.0.0.1
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 0.20.2
STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707; compiled by 'chrisdo' on Fri Feb 19 08:07:34 UTC 2010
************************************************************/
13/03/26 16:23:57 INFO namenode.FSNamesystem: fsOwner=root,root,bin,daemon,sys,adm,disk,wheel
13/03/26 16:23:57 INFO namenode.FSNamesystem: supergroup=supergroup
13/03/26 16:23:57 INFO namenode.FSNamesystem: isPermissionEnabled=true
13/03/26 16:23:57 INFO common.Storage: Image file of size 94 saved in 0 seconds.
13/03/26 16:23:58 INFO common.Storage: Storage directory /usr/local/hadoop-datastore/dfs/name has been successfully formatted.
13/03/26 16:23:58 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at localhost.localdomain/127.0.0.1
************************************************************/

Step 9.Now create a sample input file as input.txt and  place  it in  /tmp/input/   folder  with  ur  txt for eg:

I live in Loni
I study in PREC
PREC  is in Loni

Step 10.Now  start the hadoop services such that all the pseudo nodes become active and working using the following command:

         [root@localhost hadoop]# bin/start-all.sh

starting namenode, logging to /usr/local/hadoop/bin/../logs/hadoop-root-namenode-localhost.localdomain.out
localhost: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-root-datanode-localhost.localdomain.out
localhost: starting secondarynamenode, logging to /usr/local/hadoop/bin/../logs/hadoop-root-secondarynamenode-localhost.localdomain.out
starting jobtracker, logging to /usr/local/hadoop/bin/../logs/hadoop-root-jobtracker-localhost.localdomain.out
localhost: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-root-tasktracker-localhost.localdomain.out


Step 10. For the input which is set, we need to transfer it from the local filesystem to the hdfs from where the mapreduce job can fetch the input. We do it as follows:

[root@localhost hadoop]#  bin/hadoop dfs -copyFromLocal /tmp/input/ /user/input/

Step 11. run the mapreduce job by selecting an example program for word-count which is provided in the hadoop jar file which we had put in /usr/local/ as follows:

[root@localhost hadoop]#  bin/hadoop jar hadoop-0.20.2-examples.jar wordcount /user/input  /user/output

13/03/26 16:34:57 INFO input.FileInputFormat: Total input paths to process : 1
13/03/26 16:34:57 INFO mapred.JobClient: Running job: job_201303261624_0001
13/03/26 16:34:58 INFO mapred.JobClient:  map 0% reduce 0%
13/03/26 16:35:07 INFO mapred.JobClient:  map 100% reduce 0%
13/03/26 16:35:19 INFO mapred.JobClient:  map 100% reduce 100%
13/03/26 16:35:21 INFO mapred.JobClient: Job complete: job_201303261624_0001
13/03/26 16:35:21 INFO mapred.JobClient: Counters: 17
13/03/26 16:35:21 INFO mapred.JobClient:   Job Counters
13/03/26 16:35:21 INFO mapred.JobClient:     Launched reduce tasks=1
13/03/26 16:35:21 INFO mapred.JobClient:     Launched map tasks=1
13/03/26 16:35:21 INFO mapred.JobClient:     Data-local map tasks=1
13/03/26 16:35:21 INFO mapred.JobClient:   FileSystemCounters
13/03/26 16:35:21 INFO mapred.JobClient:     FILE_BYTES_READ=92
13/03/26 16:35:21 INFO mapred.JobClient:     HDFS_BYTES_READ=53
13/03/26 16:35:21 INFO mapred.JobClient:     FILE_BYTES_WRITTEN=216
13/03/26 16:35:21 INFO mapred.JobClient:     HDFS_BYTES_WRITTEN=54
13/03/26 16:35:21 INFO mapred.JobClient:   Map-Reduce Framework
13/03/26 16:35:21 INFO mapred.JobClient:     Reduce input groups=8
13/03/26 16:35:21 INFO mapred.JobClient:     Combine output records=8
13/03/26 16:35:21 INFO mapred.JobClient:     Map input records=3
13/03/26 16:35:21 INFO mapred.JobClient:     Reduce shuffle bytes=0
13/03/26 16:35:21 INFO mapred.JobClient:     Reduce output records=8
13/03/26 16:35:21 INFO mapred.JobClient:     Spilled Records=16
13/03/26 16:35:21 INFO mapred.JobClient:     Map output bytes=100
13/03/26 16:35:21 INFO mapred.JobClient:     Combine input records=12
13/03/26 16:35:21 INFO mapred.JobClient:     Map output records=12
13/03/26 16:35:21 INFO mapred.JobClient:     Reduce input records=7

Step 12. After the mapreduce job is over we check the list of files present in /user/output and then display the output file using the following commands

[root@localhost hadoop]# bin/hadoop dfs -ls /user/output
Found 2 items
drwxr-xr-x   - root supergroup          0 2013-03-26 16:34 /user/output/_logs
-rw-r--r--   1 root supergroup         54 2013-03-26 16:35 /user/output/part-r-00000

Note:   the part-r-00000 file is the output file generated by the mapreduce program. But this file is in the HDFS so we get it to the our local filesystem in /root/tmp/output directory using the following commands

[root@localhost hadoop]# mkdir /tmp/output
[root@localhost hadoop]# bin/hadoop dfs -getmerge /user/output /tmp/output
[root@localhost hadoop]# cat /tmp/output/output

I                     2
Loni               2
PREC            2
in        3
is        1
live     1
study  1
[root@localhost hadoop]#




That’ it! Hope it helped you. Keep visiting this blog for regular updates and useful study material.

Like our Facebook page 

You can follow us on twitter to keep yourself updated on all the latest from techworld....

For any doubts,queries.,etc just comment below...