Saturday, 26 November 2016

Install XDebug in Fedora25 and configure Netbeans

Installation

It is definitelly worth to read oficial installation docs before proceeding, it's quite short and it can help to avoid basic mistakes that are sometimes recomended elsewhere. You don't have to read it all - just pick the part which you need - pecl  - homebrew - from source.

Installation of XDebug in Fedora is really simple as there is the newest version in Fedora repositories. We can simply use the pecl installation.
> sudo dnf install php-pecl-xdebug


XDebug Configuration

This type of installation already enables xdebug extension. At least in my case the file /etc/php.d/15-xdebug.ini was already there after installation.

Wednesday, 23 November 2016

Cntlm proxy - my experience

When you work in a company where you have to use proxy, some things can get more complicated. In this article I'd like to summarize my settings and experience of using proxy on my linux Fedora27 laptop.

Linux - configuration of a proxy 

Settings of a proxy on linux machines differs per distribution. On some user friendly distributions you can use a Graphical interface and on others, you do it in a configuration file.

The easiest way to find it out for your distribution is to put a phrase like "Fedora 24 proxy configuration" into google, where you replace Fedora 24 with your distribution ;)

For example I use for my proxy configuration file /etc/profile.d/proxy.sh
And it looks almost like the first example file which you'll find via google.
MY_PROXY_URL="http://prox.srv.world:3128/"
HTTP_PROXY=$MY_PROXY_URL
HTTPS_PROXY=$MY_PROXY_URL
FTP_PROXY=$MY_PROXY_URL
http_proxy=$MY_PROXY_URL
https_proxy=$MY_PROXY_URL
ftp_proxy=$MY_PROXY_URL
export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
Additionaly (in Fedora) you have to specify proxy for dnf in a separate file - /etc/dnf/dnf.conf
For those who don't know dnf is a package manager - similar to apt-get in debian-like distributions.

Saturday, 19 November 2016

/etc/resolv.conf hostname domain name and search configuration option

Until recently I had no idea about search configuration option of /etc/resolv.conf and because I find it interesting, I decided to write about it on my blog.

I'm connected to a company network with domain exampldom.com. Our servers has cool host names like apolo01, apolo-p02 etc. Full domain names of those servers are apolo01.exampldom.com etc.

My colleagues with Windows OS were able to accces those servers just with their hostname, but I, from my Fedora24 laptop, I always had to specify a "long host name" to be able to access them for example via ssh.

I was wondering how this automatic adding of a domain to a hostname works and after a while I found it out.

At first I thought I will solve it via creating an aliases for those "short names". Because instead of using proper naming and realizing that I have host name and domain name in front of my eyes, I called it short name and long name with domain or mayble little bit differenty but still not correctly ;)  Therefore I was googling things like "linux alias for a domain" or similar. But with this I was only getting results about what can and can't be done via /etc/hosts file. After a while I asked a colleague who takes care of linux servers and he pointed me to the right direction.

The secret (it's not a secret ;) lies in configuraton of resolver - file /etc/resolv.conf.

When I opened that file on my PC I saw:
» cat /etc/resolv.conf 
# Generated by NetworkManager
search rz.exampldom.com
nameserver 100.100.128.12
nameserver 100.100.128.9
After reading man pages for "resolv.conf" it was quite clear.