Linux and X11

I run my Linux servers with a minimal install and no user interface. This usually doesn’t cause an issue because I can do 99+% of my work from the command line. Even most of the applications I use have “-console” interfaces.

However, every once in a while, like once/year, I run into an application that only runs with a graphical user interface. When this happens I go into my “how did I do this the last time.” Very simply, it turns out.

I run RHEL 7.x on VMware Workstation 10 on a Windows 7 laptop. It is an i7 quad-core CPUwith 32 GB RAM and (2) 1 Tb SSD drives. It does the job fairly well.

A solution to the problem that works well for me is:

1) Download and install XMing (notes are available here) on Windows 7 laptop.

2) Run XMing and then view the log file.

Xming view log

The IP address is shown in the file as “XdmcpRegisterConnection: newAddress 172.20.10.3”. It is also the IP (one of them anyways) for the laptop that can be determined in several ways.

The DISPLAY value is shown in the file as “DISPLAY=127.0.0.1:0.0”.

Combine the 2 so that you get DISPLAY=172.20.10.3:0.0.

3) Use Putty, from Windows 7 laptop, y to open a SSH connection with X11 forwarding.

Putty

4) On the Linux server enter “export DISPLAY=172.20.10.3:0.0” on the command line.

5) Now you can run the application that requires a graphical user interface.

 

RHEL 7 Network Manager

In RHEL 7 the default networking service is provided by NetworkManager. NetworkManager is a dynamic network control and configuration daemon that attempts to keep network devices and connections up and active when they are available.

The NetworkManager Command Line tool, nmcli, is used to control the NetworkManager.

Two good nmcli resources are from Red Hat product documentation and CertDepot.

Example – create a DHCP network connection:

  • nmcli c add type ethernet con-name nat-conn ifname ens33
  • nmcli c up nat-conn
  • more /etc/sysconfig/network-scripts/ifcfg-nat-conn
  • ip addr show

VMWare and Active Directory Domains

I have some Windows 2008 R2 Servers that I use to prototype software installations. I usually use them in stand-alone mode – meaning, not part of a common domain. Because of this I had created one, updated it, activated it, and then saved it as a baseline for any new servers that I needed. This has been working fine for me for years now.

Well, I finally needed to install some software in a domain configuration. So I took some of these images, made one the domain controller, joined the other ones to the domain, and everything seemed happy. But when I tried to reconfigure SQL Server to use a domain user account I kept getting an error that was something like – No mapping between account names and security IDs was done.

No matter what I tried I couldn't get it to work. Finally, it hit me like a ton of bricks – the classic Duh! moment. All of these servers were copies of each other and therefore had the same SIDs. I hadn't reset the SIDs when I created a new server because it never mattered before.

So, if you are using any virtualization software and you are used to using stand-alone servers – make sure you watch out for this issue if you ever decide to move them to a domain.

Calculating Website Bandwidth and Concurrent Users

I find these equations to be handy when determining hosting requirements.

The number of concurrent users = # users per day / (24 hrs * 60 min / number min per session)

Bandwidth calculation 1 using  bytes transferred:

Bandwidth required (bits / sec) = (bytes transferred per hour * 12) / 3,600 sec per hr (12 = 8 bits per byte plus 4 bits of overhead)

Bandwidth calculation 2 using connections and average document size

Bandwidth required (bits / sec) = (avg connections per day / 86,400 secs per day) * (avg document size * 12)

Note: KB = bits / 1,024.