Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Preparing CentOS 6.8 for Work

<p>&nbsp;</p> <quillbot-extension-portal></quillbot-extension-portal>

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

    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

    • Red Hat Hardened Images: Top 5 benefits for software developers

    • How EvalHub manages two-layer Kubernetes control planes

    • Tekton joins the CNCF as an incubating project

    • Federated identity across the hybrid cloud using zero trust workload identity manager

    • Confidential virtual machine storage attack scenarios

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    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
    © 2026 Red Hat

    Red Hat legal and privacy links

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

    Chat Support

    Please log in with your Red Hat account to access chat support.