Posts

OpenStack Installation on RHEL7 System

Image
There's a simple "Get Started" Guide on the redhat website, which briefly outlines how to get a sample OpenStack system up and running in 5 steps.  The first, easily overlooked step is to start by installing a "minimum-install" version of RHEL7 on a physical system.  If you've already set up and configured a system that you're using for everyday tasks and/or work functions, be aware that the installation will repeatedly fail with errors due to incompatible options, missing dependencies, etc. 

Provided that you've followed the consequent steps in the guide to register the system and enable the pertinent repositories, the next step is to install and run the packstack script:

# yum install openstack-packstack # packstack --allinone
This is a rather lengthy python script that uses some puppet modules to install the necessary software components and configures the system as the OpenStack All-in-One server.  According to the packstack documentation, &q…

bash tips

- no title specified Little-known bash commands for the SysAdmin Toolbox finger  This is a user-information lookup program, which display information on system users.  If it's executed without an argument it will display a list of currently-logged in users: Login     Name       Tty      Idle  Login Time   Office     Office Phone   Host user1     user1     tty1     1:40  Jan  7 15:57                           (:0) user1     user1     pts/0          Jan  7 15:58                           (192.168.9.1) Given a username as an argument it will display extended information on that user: # finger user1 Login: user1                         Name: user1 Directory: /home/user1               Shell: /bin/bash On since Thu Jan  7 15:57 (CST) on tty1 from :0     1 hour 40 minutes idle On since Thu Jan  7 15:58 (CST) on pts/0 from 192.168.9.1    4 seconds idle No mail. No Plan. chfn Similarly, use the chfn command to change the information that the finger command displays. SYNOPSIS        chfn [-f fu…

Linux date Command: Day of Week

To find the day of week (e.g. Friday) on a particular date using the Linux version of the `date` utility, execute:

$ date -d 'Jan 03 2004' "+%a" Sat

The -dflag tells the utility to display the information only, instead of setting the date, etc.

The "+%a" options are`date`'s FORMAT options, which are listed in the manpages.
So, for example, we can also have the full name of the weekday output by changing the "+%a" to "+%A". $ date -d 'Jan 03 2004' "+%A" Saturday
DATE(1) User Commands NAME date - print or set the system date and time SYNOPSIS date [OPTION]... [+FORMAT] ... ... FORMAT controls the output. Interpreted sequences are: %% a literal % %a locale's abbreviated weekday name (e.g., Sun) %A locale's full weekday name (e.g., Sunday) %b locale's abbreviated month name (e.g., Jan) %B locale's…

SELinux Failure after Fedora22 Upgrade

SELinux got somehow mangled during upgrade process from Fedora21 -> Fedora22. Some of the modules were changed between the versions and as a result my SELinux "system" is borked. It'd be nice to have more available documentation on re-installing and/or resetting SELinux on a system.  I can't use any of the normal tools to manage SELinux, as it only prints out errors like `libsepol.permission_copy_callback...`.  Attempting to relabel a filecontext, for example results in:

# semanage fcontext -a -t system_dbusd_var_lib_t /var/lib/dbus/machine-id libsepol.context_from_record: type radicale_port_t is not defined (No such file or directory). libsepol.context_from_record: could not create context structure (Invalid argument). libsepol.port_from_record: could not create port structure for range 5232:5232 (tcp) (Invalid argument). libsepol.sepol_port_modify: could not load port range 5232 - 5232 (tcp) (Invalid argument). libsemanage.dbase_policydb_mo…

SDL2 With Eclipse on Fedora22

On a Fedora22 system with Eclipse Mars version 4.5.1 this worked for me.

Create a new C++ project (File > New > C++ Project). You will need to pick a toolchain - Linux GCC.
If you want to use C++11 do the following:

Right click your Project under “Package Explorer” and select Properties.Select (C/C++ Build > Settings > GCC C++ Compiler > Dialect) Under “Language standard” select: "ISO C++11 (-std=c++0x)". Click Apply, then OK.
Configure Eclipse to use SDL2

At this step, I'd suggest to use the system's terminal/shell to find out or verify the existence/location of the necessary files/libraries for SDL2 on your system. 

First, if you want to find the location of the necessary libraries on your system, executing the following in the terminal will provide you with the "include" location and other compiler/preprocessor flags

$ sdl2-config --cflags
Similarly, to list the libraries/linker-flags

$ sdl2-config --libs
For example, on my Fedora22 (64bit…

RHEL7 Fedora as Network Router and Gateway

Hardware Requirements:2 Ethernet Network Cards: 1 for WAN; 1 for LANOptional Wireless Router for wifi
Software Requirements:NIC Configuration Filessysctl Kernel ParametersFirewall Configurationdhcpd Server For the sake of clarity the two network cards will be called ifcfg-wan (WAN) and ifcfg-lan (LAN); make the necessary changes for your environment accordingly, e.g. eth0, ens1, enp0s77, etc., as I will not outline how to make naming changes for hardware devices.  The configuration files for the relevant network adapters/cards are located in /etc/sysconfig/network-scripts/ifcfg-wan and /etc/sysconfig/network-scripts/ifcfg-lan files.

First, make sure all the interfaces are "down" and the ethernet cables are unplugged from both adapters.  Assuming you're not using NetworkManager this can be accomplished on the commandline with "ifdown wan" and/or "ifdown lan".

Next, check the system's network activity for open ports and close them all for now:

# netst…

Troubleshoot USB-Printer Connected to Router

I had complained about a flood of error messages being continuously printed out every time a print job was sent to the USB-printer attached to my Asus AC56U router with merlin-378.55_beta1. Yesterday, after I had reverted to the official asuswrt firmware to troubleshoot the printer-sharing feature, I used nmap on my laptop to see the open common ports on the clients on my network:


Code: # nmap -T4 -F 192.168.1.0-2 The router displayed two ports related to the printer service:


Code: 192.168.1.1 Host is up (0.0065s latency). Not shown: 94 closed ports PORT STATE SERVICE 53/tcp open domain 80/tcp open http 139/tcp open netbios-ssn 445/tcp open microsoft-ds 515/tcp open printer 9100/tcp open jetdirect Anyway, long story short, I had been using the socket://192.168.1.1:9100 path to the printer; changing the configuration on my laptop (CUPS-server) to point to lpd://192.168.1.1:515/AUTO finally resulted in SUCCESS!