Beginner guide of systemd on CentOS7/RHEL7

Introduction of systemd Before CentOS 7 and RHEL 7, System V was used to be the system controller. The system controller can manage all processes, services, and start task. System V has a performance problem as it is using script to manage the tasks. So it can only start the task serially, which will slow down the startup of the system. From CentOS 7, the systemd become the new system

systemctl command return 'Failed to connect to bus: No such file or directory' in a docker container

To enable and start a cron job and a httpd server in a docker container, I tried systemctl command but get an error output like this 1 2 3 4 [root@5f1f0a5cde43 app]# systemctl status crond Failed to connect to bus: No such file or directory [root@5f1f0a5cde43 app]# systemctl status httpd Failed to connect to bus: No such file or directory Fix this issue by add --privileged parameter to docker run command

How to change timezone in CentOS 7 or RHEL 7

check the current timezone status 1 2 3 4 5 6 7 8 9 [root@rhel7 ~]# timedatectl Local time: Thu 2017-08-10 05:19:53 UTC Universal time: Thu 2017-08-10 05:19:53 UTC RTC time: Thu 2017-08-10 05:19:52 Time zone: UTC (UTC, +0000) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: n/a list the avaliable timezones 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [root@rhel7 ~]# timedatectl list-timezones Asia/Aden Asia/Almaty Asia/Amman Asia/Anadyr Asia/Aqtau Asia/Aqtobe Asia/Ashgabat .

Desktop Notifier by Python

This article show how to send desktop notice using Python Install requirments we need to install notify2 by pip 1 2 3 4 5 # pip install notify2 Collecting notify2 Downloading notify2-0.3.1-py2.py3-none-any.whl Installing collected packages: notify2 Successfully installed notify2-0.3.1 Coding First we need to import notify2 1 import notify2 Then need to initialise the d-bus connection. D-Bus is a message bus system, a simple way for applications to talk to one another.

Install Chrome Browser via yum in CentOS or Fedora or RHEL

Create a google yum repository Create a file /etc/yum.repos.d/google-chrome.repo and add the following into it. 1 2 3 4 5 6 [google-chrome] name=google-chrome baseurl=$basearch enabled=1 gpgcheck=1 gpgkey= Check the google repository Run following command to check the repository is available. 1 # yum info google-chrome-stable From the output you should find the lastest version of the package google-chrome-stable 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 # yum info google-chrome-stable Fedora 26 - x86_64 - Updates 6.

OpenShift Configure authentication and User Agent using HTPasswd

As we Install the OpenShift by Ansible method, identity provider is set to Deny all by default, which will deny access from all users. To allow access for users, you must choose another identity provider and configure the master configuration file. By default, the master configuration file is located at /etc/origin/master/master-config.yaml. OpenShift has several identity providers which can help you to manager user authentication. I will use HTPasswd this time.

[OpenShift]Quick install OpenShift to multi nodes

In this article we will show you how to install OpenShift in mutliple nodes using a quick install command, atomic-openshift-installer, which is powered by ansible. Host preparation I use under virtual machines for OpenShift nodes to deploy Type CPU Mem HDD hostname OS Master 1 2 GB 20 GB RHEL 7 node 1 2 GB 20 GB RHEL 7 node 1 2 GB 20 GB node2.

How to copy text to the system clipboard in VIM

Make sure your VIM have +clipboard enabled, Add “set clipboard=unnamedplus” to .vimrc check +clipboard is enabled 1 2 3 # vim --version | grep clipboard +clipboard +job +path_extra +user_commands +eval +mouse_dec +statusline +xterm_clipboard If it shows ‘-clipboard’, you need to compile VIM with this feature. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 $ git clone https://github.

How to keep process running after log off

tmux is an opensource software that can help you to do this. There are a lot of other things tmux can do, but now let me explain how to keep process running even end the ssh session. Please follow the steps: start a tmux session by input tmux to the shell. start your process or script inside the tmux session. leave(detach) the tmux session by input Ctrl+b and then d.

[VIM] Use built in Spell Check

From version 7, VIM has a built in spell check function, but disable by default. Enable/Disable You can use :set spell and :set nospell to enable and disable it. The spell check isn’t only for English, use :echo &spelllang to confirm the current target langurage. Use:set spelllang=en_GB.UTF-8 to change the target langurage, also you can use set spelllang=en_us,nl,medical to set it to multiple langurage. Spell check Use ]s to move to the next, [s to move to the previous spell mistake.