How to Install GCC on Linux Fedora 16 Server

In this post, i will show quick steps to install gcc on linux Fedora 16 server. The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages. The compiler is designed to support multiple front-ends and multiple back-ends by translating first into Register Transfer Language and from there into assembly code for the target architecture. Assume that you have installed minimal installation type Fedora 16 and has setup your own local yum repository.

To install gcc on Fedora 16, simply run the following command :

[root@fedora16 ~]# yum install gcc -y
Fedora16-Repository                                                                    | 3.7 kB     00:00 ...
Fedora16-Repository/primary_db                                                         | 2.3 MB     00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i686 0:4.6.2-1.fc16 will be installed
--> Processing Dependency: cpp = 4.6.2-1.fc16 for package: gcc-4.6.2-1.fc16.i686
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.6.2-1.fc16.i686
--> Processing Dependency: binutils >= 2.20.51.0.2-12 for package: gcc-4.6.2-1.fc16.i686
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.6.2-1.fc16.i686
--> Processing Dependency: libmpfr.so.4 for package: gcc-4.6.2-1.fc16.i686
--> Processing Dependency: libmpc.so.2 for package: gcc-4.6.2-1.fc16.i686
--> Running transaction check
---> Package binutils.i686 0:2.21.53.0.1-2.fc16 will be installed
---> Package cloog-ppl.i686 0:0.15.9-3.fc15 will be installed
--> Processing Dependency: libppl.so.9 for package: cloog-ppl-0.15.9-3.fc15.i686
--> Processing Dependency: libppl_c.so.4 for package: cloog-ppl-0.15.9-3.fc15.i686
---> Package cpp.i686 0:4.6.2-1.fc16 will be installed
---> Package glibc-devel.i686 0:2.14.90-14 will be installed
--> Processing Dependency: glibc-headers = 2.14.90-14 for package: glibc-devel-2.14.90-14.i686
--> Processing Dependency: glibc-headers for package: glibc-devel-2.14.90-14.i686
---> Package libmpc.i686 0:0.9-1.fc16 will be installed
---> Package mpfr.i686 0:3.0.0-4.fc15 will be installed
--> Running transaction check
---> Package glibc-headers.i686 0:2.14.90-14 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.14.90-14.i686
--> Processing Dependency: kernel-headers for package: glibc-headers-2.14.90-14.i686
---> Package ppl.i686 0:0.11.2-3.fc16 will be installed
--> Processing Dependency: libpwl.so.5 for package: ppl-0.11.2-3.fc16.i686
--> Running transaction check
---> Package kernel-headers.i686 0:3.1.0-7.fc16 will be installed
---> Package ppl-pwl.i686 0:0.11.2-3.fc16 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package                   Arch            Version                       Repository                      Size
==============================================================================================================
Installing:
 gcc                       i686            4.6.2-1.fc16                  Fedora16-Repository             11 M
Installing for dependencies:
 binutils                  i686            2.21.53.0.1-2.fc16            Fedora16-Repository            3.5 M
 cloog-ppl                 i686            0.15.9-3.fc15                 Fedora16-Repository             93 k
 cpp                       i686            4.6.2-1.fc16                  Fedora16-Repository            3.9 M
 glibc-devel               i686            2.14.90-14                    Fedora16-Repository            983 k
 glibc-headers             i686            2.14.90-14                    Fedora16-Repository            612 k
 kernel-headers            i686            3.1.0-7.fc16                  Fedora16-Repository            768 k
 libmpc                    i686            0.9-1.fc16                    Fedora16-Repository             49 k
 mpfr                      i686            3.0.0-4.fc15                  Fedora16-Repository            167 k
 ppl                       i686            0.11.2-3.fc16                 Fedora16-Repository            1.4 M
 ppl-pwl                   i686            0.11.2-3.fc16                 Fedora16-Repository             35 k

Transaction Summary
==============================================================================================================
Install      11 Packages

Total download size: 23 M
Installed size: 61 M
Downloading Packages:
--------------------------------------------------------------------------------------------------------------
Total                                                                          20 MB/s |  23 MB     00:01
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : kernel-headers-3.1.0-7.fc16.i686                                                          1/11
  Installing : mpfr-3.0.0-4.fc15.i686                                                                    2/11
  Installing : glibc-headers-2.14.90-14.i686                                                             3/11
  Installing : libmpc-0.9-1.fc16.i686                                                                    4/11
  Installing : glibc-devel-2.14.90-14.i686                                                               5/11
  Installing : cpp-4.6.2-1.fc16.i686                                                                     6/11
  Installing : ppl-pwl-0.11.2-3.fc16.i686                                                                7/11
  Installing : ppl-0.11.2-3.fc16.i686                                                                    8/11
  Installing : cloog-ppl-0.15.9-3.fc15.i686                                                              9/11
  Installing : binutils-2.21.53.0.1-2.fc16.i686                                                         10/11
  Installing : gcc-4.6.2-1.fc16.i686                                                                    11/11

Installed:
  gcc.i686 0:4.6.2-1.fc16

Dependency Installed:
  binutils.i686 0:2.21.53.0.1-2.fc16   cloog-ppl.i686 0:0.15.9-3.fc15    cpp.i686 0:4.6.2-1.fc16
  glibc-devel.i686 0:2.14.90-14        glibc-headers.i686 0:2.14.90-14   kernel-headers.i686 0:3.1.0-7.fc16
  libmpc.i686 0:0.9-1.fc16             mpfr.i686 0:3.0.0-4.fc15          ppl.i686 0:0.11.2-3.fc16
  ppl-pwl.i686 0:0.11.2-3.fc16

Complete!

How to Configure Static IP Address on Linux Fedora 16 Server

This post will show the quick steps to configure static ip address on linux Fedora 16 server. By default the linux Fedora 16 server will auto get the ip from DHCP server. DHCP is not recommended if you use as a server. This steps including the configuration of ip address, netmask, gateway and dns server.

Open network configuration file as below :

[root@fedora16 ~]# vi /etc/sysconfig/network-scripts/ifcfg-p3p1

At first, the setting will look like this :

DEVICE="p3p1"
HWADDR="00:0C:29:6F:37:B5"
BOOTPROTO="dhcp"
ONBOOT="yes"
NM_CONTROLLED="yes"

This examples shows how you can configure static ip address, netmask and dns server on Fedora 16 server :

DEVICE="p3p1"
HWADDR="00:0C:29:6F:37:B5"
BOOTPROTO="none"
ONBOOT="yes"
NM_CONTROLLED="yes"
IPADDR=192.168.1.47
NETMASK=255.255.255.0
DNS1=8.8.8.8
DNS2=8.8.4.4
TYPE=Ethernet
IPV6INIT=no
USERCTL=no

Configure the server gateway :

[root@fedora16 ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=fedora16.ehowstuff.com
GATEWAY=192.168.1.1

Start the network service :

[root@fedora16 ~]# systemctl restart network.service

Set network auto start at boot :

[root@fedora16 ~]# chkconfig network on

How to Install Perl on Linux Fedora 16 server

In this post i will show the quick step to install perl on linux Fedora 16 server. Perl is an interpreted language that is very popular in the Unix community because it has a rich and powerful feature set, but is still easy to use.

Simply run the following command to install perl on linux Fedora 16 server :

[root@fedora16 ~]# yum install perl -y
Fedora16-Repository                                                                    | 3.7 kB     00:00 ...
Fedora16-Repository/primary_db                                                         | 2.3 MB     00:01 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl.i686 4:5.14.1-188.fc16 will be installed
--> Processing Dependency: perl-libs = 4:5.14.1-188.fc16 for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(File::Spec) >= 0.8 for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(threads::shared) >= 1.21 for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(List::Util) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(threads::shared) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl-macros for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl-libs for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: libperl.so for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(File::Spec) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(Pod::Simple::RTF) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(Pod::Simple::XMLOutStream) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(threads) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(Cwd) for package: 4:perl-5.14.1-188.fc16.i686
--> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.14.1-188.fc16.i686
--> Running transaction check
---> Package perl-Module-Pluggable.noarch 1:3.90-188.fc16 will be installed
---> Package perl-PathTools.i686 0:3.33-188.fc16 will be installed
---> Package perl-Pod-Simple.noarch 1:3.16-188.fc16 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.16-188.fc16.noarch
---> Package perl-Scalar-List-Utils.i686 0:1.23-188.fc16 will be installed
---> Package perl-libs.i686 4:5.14.1-188.fc16 will be installed
---> Package perl-macros.i686 4:5.14.1-188.fc16 will be installed
---> Package perl-threads.i686 0:1.83-188.fc16 will be installed
---> Package perl-threads-shared.i686 0:1.37-188.fc16 will be installed
--> Running transaction check
---> Package perl-Pod-Escapes.noarch 1:1.04-188.fc16 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package                        Arch           Version                      Repository                   Size
==============================================================================================================
Installing:
 perl                           i686           4:5.14.1-188.fc16            Fedora16-Repository         9.9 M
Installing for dependencies:
 perl-Module-Pluggable          noarch         1:3.90-188.fc16              Fedora16-Repository          44 k
 perl-PathTools                 i686           3.33-188.fc16                Fedora16-Repository         101 k
 perl-Pod-Escapes               noarch         1:1.04-188.fc16              Fedora16-Repository          36 k
 perl-Pod-Simple                noarch         1:3.16-188.fc16              Fedora16-Repository         219 k
 perl-Scalar-List-Utils         i686           1.23-188.fc16                Fedora16-Repository          52 k
 perl-libs                      i686           4:5.14.1-188.fc16            Fedora16-Repository         627 k
 perl-macros                    i686           4:5.14.1-188.fc16            Fedora16-Repository          29 k
 perl-threads                   i686           1.83-188.fc16                Fedora16-Repository          65 k
 perl-threads-shared            i686           1.37-188.fc16                Fedora16-Repository          55 k

Transaction Summary
==============================================================================================================
Install      10 Packages

Total download size: 11 M
Installed size: 30 M
Downloading Packages:
--------------------------------------------------------------------------------------------------------------
Total                                                                         9.9 MB/s |  11 MB     00:01
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:perl-Pod-Escapes-1.04-188.fc16.noarch                                                   1/10
  Installing : perl-PathTools-3.33-188.fc16.i686                                                         2/10
  Installing : 1:perl-Pod-Simple-3.16-188.fc16.noarch                                                    3/10
  Installing : perl-threads-shared-1.37-188.fc16.i686                                                    4/10
  Installing : perl-Scalar-List-Utils-1.23-188.fc16.i686                                                 5/10
  Installing : 4:perl-libs-5.14.1-188.fc16.i686                                                          6/10
  Installing : perl-threads-1.83-188.fc16.i686                                                           7/10
  Installing : 1:perl-Module-Pluggable-3.90-188.fc16.noarch                                              8/10
  Installing : 4:perl-macros-5.14.1-188.fc16.i686                                                        9/10
  Installing : 4:perl-5.14.1-188.fc16.i686                                                              10/10

Installed:
  perl.i686 4:5.14.1-188.fc16

Dependency Installed:
  perl-Module-Pluggable.noarch 1:3.90-188.fc16             perl-PathTools.i686 0:3.33-188.fc16
  perl-Pod-Escapes.noarch 1:1.04-188.fc16                  perl-Pod-Simple.noarch 1:3.16-188.fc16
  perl-Scalar-List-Utils.i686 0:1.23-188.fc16              perl-libs.i686 4:5.14.1-188.fc16
  perl-macros.i686 4:5.14.1-188.fc16                       perl-threads.i686 0:1.83-188.fc16
  perl-threads-shared.i686 0:1.37-188.fc16

Complete!

To check perl version, run this command :

[root@fedora16 ~]# perl -v

This is perl 5, version 14, subversion 1 (v5.14.1) built for i386-linux-thread-multi

Copyright 1987-2011, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.