Skip to content

Tag: centos7

How to install gcc8 using devtoolset-8-gcc

I am using CentOS Linux release 7.3.1611 which has gcc 4.8.5 20150623 installed. I am looking for a way to install a newer version of gcc, specially 8.1. I found the following site on how to install gcc v7 link 1 which describes how to install gcc v7 (using devtoolset-7-gcc*). I did follow the guidelines and …

Yum Repo Issues

My CentOS-Base.repo has the following mirrors: When I say yum install yum-utils, it fails with the error saying http://custom-url/centOS-updates/Packages/yum-utils-1.1.31-46.el7_5.noarch.rpm: [Errno 14] HTTP Error 500 – Internal Server Error Trying other mirror. Error downloading packages: yum-utils-1.1…

How to run commands on CentOS reboot

I want to run the following commands one after the other upon reboot of the server after I do shutdown -r now but not sure how to do it: getenforce setenforce 0 systemctl start httpd.service I’m running CentOS 7.x Answer Technically you can crontab it and add the line and put the 3 commands in the myscr…

error JAVA_HOME is not defined correctly

When Ii run command mvn spring-boot:run, I got error: when I check above path java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64 is not exist. My java version is: I check JAVA_HOME in /etc/environment Is it because of different version in JAVA_HOME I got the error? I try to change the JAVA_HOME path to other ver…

How to install konsole on Cent OS 7?

I have Cent OS 7. Since konsole tool is in kde package, I’ve installed it: But still konsole isn’t installed. So, how can I install it? Answer You can just install the konsole package. yum provides konsole Will return: konsole-4.10.5-4.el7.x86_64 : KDE Terminal emulator So you just have to install…

free -g with sed -n plus nth character

I am trying to create a script to display just one of the numbers from the free command. In my case, the number I want is on the 2nd line of the free -g output and at character slot 43. The original output of free -g is: So far I have gotten the 2nd line to display with: I need

Apache not seeing website – CentOS 7

I have setup a lot of Virtual Hosts in Ubuntu but today I needed to do this on a CentOS 7 server. I installed Apache and setup the VHost config but nothing appears when I view the site. I know that Apache is reading my Config files because if I add a fault in it and restart Apache, it complains