CentOS / RHEL 7: Install GCC (C and C++ Compiler) and Development Tools

Originally published at: https://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/

How do I install gnu gcc compiler and related tools such as autoconf, automake, flex, c++ compiler, and bison on a CentOS 7 or Red Hat Enterprise Linux version 7 server?

Create foo.c file like geek :sunglasses: ,
type:

cat > foo.c << EOF
#include<stdio.h>
int main(void){
 printf("Hello World!\n");
 return 0;
}
EOF

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki