Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Preparing CentOS 6.8 for Work

 

March 14, 2017
Sergey Iryupin
Related topics:
Linux
Related products:
Red Hat Enterprise Linux

Share:

    I came across Linux in 2005, it was Debian. Then followed a love affair with Ubuntu, for which in March 2009 I purchased a netbook Asus EeePC 1000. In 2010, I began to contribute to ALT Linux participating in the “School Project” and even became a basic256 package maintainer.

    The last few years my EeePC with Ubuntu peacefully rested deep in my cupboard. Then there was a chance to clean off the dust. There was a task to get acquainted with CentOS Linux and test examples for my webinar “Apache Ant – quick start”.

    Visiting centos.org, I stop at version 6.8. On http://isoredirect.centos.org/altarch/7/isos/i386/ page I selected the server with disk images and download files CentOS-6.8-i386-LiveCD.iso. With the help of Rufus create a bootable USB and successfully install the CentOS 6.8 on my Asus EeePC. The process is very simple. The dark-blue colors of the good old GNOME are pleasing to my eyes.

    What tools (programs/packages) do I need? So far, I need only three: Java JDK, Apache Ant, and Git. I begin to synchronize and update package index files, keeping in mind that instead of apt-get (in Ubuntu) on CentOS they use yum:

    [lamp@localhost ~]$ sudo yum update
    [sudo] password for lamp:
    lamp is not in the sudoers file. This incident will be reported.

    Here is the news… Unlike Ubuntu, the unprivileged user cannot use by default via sudo the commands with root privilege. Learning https://wiki.centos.org/TipsAndTricks/BecomingRoot I decide to use the “quick and dirty way” by editing the file /etc/sudoers. To do this the root has visudo command (thanks to tips of experienced colleagues). I pass on in the root account (after su command I enter the root password, which I have set during the installation):

    [lamp@localhost ~]$ su
    Password:
    [root@localhost lamp]# visudo

    I find the line “root ALL=(ALL) ALL” in the file and add (pre-pressing the “I” and entering into insert mode) a similar line, but instead of root I'm writing lamp, it turns this way:

    root ALL=(ALL) ALL
    lamp ALL=(ALL) ALL

    I press Esc and go out with saving (:wq). I leave root account using exit. Now I can give privilege using sudo and my password. And I repeat:

    [lamp@localhost ~]$ sudo yum update
    [sudo] password for lamp:

    I enter my password, everything works. The yum updates indexes, and offers to upgrade some packages by downloading about 197 MB. I answer N (No); it can wait a little.

    Time turn to Java JDK. In front of me, there is a dilemma: install the oracle-jdk or openjdk. Thanks to the advice of more experienced colleagues I'm inclined to get openjdk. I use the command yum search to find the name of the package to be installed. Surely, I take the latest version:

    [lamp@localhost ~]$ sudo yum search jdk
    ...
    java-1.8.0-openjdk-devel.i686 : OpenJDK Development Environment
    ...
    [lamp@localhost ~]$ sudo yum install java-1.8.0-openjdk-devel
    ...
    [lamp@localhost ~]$ javac -version
    javac 1.8.0_121
    [lamp@localhost ~]$ java -version
    openjdk version "1.8.0_121"
    OpenJDK Runtime Environment (build 1.8.0_121-b13)
    OpenJDK Server VM (build 25.121-b13, mixed mode)

    JDK is there, now it is the time for Apache Ant. I'm trying to get it from a repository:

    [lamp@localhost ~]$ sudo yum install ant

    …in addition, yum offers to download about 60 MB and install 10 dependency packages, where ant takes only 2.2 MB. However, Google slightly hints – is will be the version 1.7.1 which does not suit me at all (it nas no junit). After a short search, I find a suitable script that allows me to download and install the latest version. I edit it a little for myself:

    # download and install
    antname=apache-ant
    antserver=http://apache-mirror.rbc.ru/pub/apache
    antversion=1.10.1
    wget ${antserver}/ant/binaries/${antname}-${antversion}-bin.tar.gz
    sudo tar xvfvz ${antname}-${antversion}-bin.tar.gz -C /opt
    sudo ln -sfn /opt/${antname}-${antversion} /opt/ant
    sudo sh -c 'echo ANT_HOME=/opt/ant >> /etc/environment'
    sudo ln -sfn /opt/ant/bin/ant /usr/bin/ant

    # check installation
    ant -version

    # cleanup
    rm ${antname}-${antversion}-bin.tar.gz

    I save the script in the home directory and then run:

    [lamp@localhost ~]$ chnod +x installantoncentos.sh
    [lamp@localhost ~]$ ./installantoncentos.sh

    I see the last line, which is the result of ant -version command:

    Apache Ant(TM) version 1.10.1 compiled on February 2 2017

    I take Git from the repository:

    [lamp@localhost ~]$ sudo yum install git
    [lamp@localhost ~]$ git --version
    git version 1.7.1

    So, the tools are ready and I can start testing examples for my webinar. But this is another story…


    As a developer, you can get a no-cost Red Hat Enterprise Linux Developer Suite subscription, which includes Red Hat Enterprise Linux 7 server, a collection of development tools, and much more.

    Last updated: October 20, 2023

    Recent Posts

    • Storage considerations for OpenShift Virtualization

    • Upgrade from OpenShift Service Mesh 2.6 to 3.0 with Kiali

    • EE Builder with Ansible Automation Platform on OpenShift

    • How to debug confidential containers securely

    • Announcing self-service access to Red Hat Enterprise Linux for Business Developers

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue