Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, September 3, 2013

ls - no colors on Ubuntu

I have some older Ubuntu servers that don't display colors when executing the ls command over Putty. So I took a .bashrc file from a different Ubuntu server and copied over the relevant section that contains the ls --color command. After that I applied the ~/.bashrc file so I don't have to restart the session. This will set the foloring for grep and vi as well.


~$ vim ~/.bashrc

if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
    alias vi='vim'

else
    alias ls="ls -F"
    alias ll='ls -alF'
    alias la='ls -A'
    alias l='ls -CF'
fi


~$ source ~/.bashrc

References


Thursday, September 6, 2012

Compiling nagios-plugins-1.4.16 throws an error

I was installing Nagios on a new Ubuntu Server following this guide, but using the latest versions (Nagios 3.4.1 and Nagios Plugins 1.4.15).

Running make on the Nagios Plugins threw me the following error:
....
 check_http.c:312:9: error: ‘ssl_version’ undeclared (first use in this function)
....
make[2]: *** [check_http.o] Error 1
make[2]: Leaving directory `/home/nicadmin/nagios-plugins-1.4.16/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nicadmin/nagios-plugins-1.4.16'
make: *** [all] Error 2


A workaround is installing the libssl-dev package and reconfiguring.
root@host1:~/nagios-plugins-1.4.16# apt-get install libssl-dev
root@host1:~/nagios-plugins-1.4.16# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
root@host1:~/nagios-plugins-1.4.16# make
root@host1:~/nagios-plugins-1.4.16# make install


Source: http://sourceforge.net/mailarchive/forum.php?thread_name=0957CCC9-6B31-4081-ADF1-D04F00212EC4%40gmail.com&forum_name=nagiosplug-devel