Install ncurses-devel package when building htop

I download htop 2.0.0 and want to build it from source code on RHEL 7.1, but “./configure” outputs the following errors:

......
checking for addnwstr in -lncursesw6... no
checking for addnwstr in -lncursesw... no
checking for addnwstr in -lncurses... no
configure: error: You may want to use --disable-unicode or install libncursesw.

The solution is to install ncurses-devel package:

yum install ncurses-devel

Then the configuration & build processes are smooth.

 

How to pull docker image behind proxy on RHEL7?

My host OS is RHEL7, and running behind proxy. The output of executing docker run hello-world is like this:

# docker run hello-world
Unable to find image 'hello-world:latest' locally
Trying to pull repository registry.access.redhat.com/hello-world ... failed
Trying to pull repository docker.io/library/hello-world ... failed
Error while pulling image: Get https://index.docker.io/v1/repositories/library/hello-world/images: x509: certificate is valid for FG3K6C3A15800021, not index.docker.io

It prompts pull image failed, so I need to configure proxy to make docker work correctly:

(1) Add proxy info in /etc/sysconfig/docker file:

HTTP_PROXY="http://web-proxy.corp.xxxxxx.com:8080"
HTTPS_PROXY="http://web-proxy.corp.xxxxxx.com:8080"
http_proxy="${HTTP_PROXY}"
https_proxy="${HTTPS_PROXY}"

(2) Restart docker service:

# service docker restart

Then docker works OK now:

# docker run hello-world
Unable to find image 'hello-world:latest' locally
Trying to pull repository registry.access.redhat.com/hello-world ... not found
Trying to pull repository docker.io/library/hello-world ... latest: Pulling from library/hello-world
3f12c794407e: Pull complete
975b84d108f1: Pull complete
......

References:
Cannot download Docker images behind a proxy

Install sysdig on RHEL7

The manual of advanced installing sysdig focus on RHEL6 only. To install sysdig on RHEL7, just need to modify this step:

2) Install the EPEL repository
......
rpm -i http://mirror.us.leaseweb.net/epel/6/i386/epel-release-6-8.noarch.rpm

We should install EPEL7 for RHEL7:

yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Other steps are same! The you can play sysdig now!

 

Install right “kernel-debuginfo” package on RHEL

You need to install right “kernel-debuginfo” package on RHEL. E.g.:

# rpm -q kernel
kernel-3.10.0-229.el7.x86_64

# uname -r
3.10.0-229.el7.x86_64

# rpm -q kernel-debuginfo
package kernel-debuginfo is not installed

# rpm -ivh kernel-debuginfo-common-x86_64-3.10.0-229.el7.x86_64.rpm

# rpm -ivh kernel-debuginfo-3.10.0-229.el7.x86_64.rpm

# rpm -q kernel-debuginfo
kernel-debuginfo-3.10.0-229.el7.x86_64

If kernel is debug version, you also need to install kernel-debug-debuginfo package:

# uname -r
3.10.0-229.el7.x86_64.debug

# rpm -ivh kernel-debuginfo-common-x86_64-3.10.0-229.el7.x86_64.rpm

# rpm -ivh kernel-debug-debuginfo-3.10.0-229.el7.x86_64.rpm

Reference:

[Crash-utility] How does crash find booted kernel?.