Posts

python-docx | docx | No module named 'exceptions'

If the project is using docx as a reference and installed docx package instead of the   python-docx it will lead to following error ModuleNotFoundError: No module named 'exceptions' To fix this error install python-docx and remove docx. pip install python-docx  To install python-docx package Official Documentation available here: https://pypi.org/project/python-docx/ pip uninstall docx To remove installed docx package

Time Server List

List of time server can be used to configure gadgets and desktops. NIST Sever Name  time.nist.gov Supported Protocols Network Time Protocol (RFC-1305) Daytime Protocol (RFC-867) Time Protocol (RFC-868) Ref: https://tf.nist.gov/tf-cgi/servers.cgi     NTP.ORG Server Names The NTP Pool DNS system automatically picks time servers which are geographically close for you, but if you want to choose explicitly, there are sub-zones of pool.ntp.org. The "continent" ones are: Area: HostName: Worldwide pool.ntp.org Asia asia.pool.ntp.org Europe europe.pool.ntp.org North America north-america.pool.ntp.org Oceania oceania.pool.ntp.org South America south-america.pool.ntp.org Supported Protocols Network Time Protocol ( RFC 5905 , RFC 5906 , RFC 5907 , RFC 5908 ) Simple NTP [SNTP] ( RFC 5905 ) Ref: http://ntp.org

MySQL 8 User creation and grant privileges

Environment MySQL Version: 8.0.21 OS: CentOS 7 Minimal install 64bit MySQL User MySQL user can be created using by the following command in MySQL console CREATE USER 'user1'@'localhost' IDENTIFIED BY 'password1'; If the application connects to MySQL service from a specific IP address application server IP address can be specified in create user statement. CREATE USER 'user1'@'192.168.1.1' IDENTIFIED BY 'password1'; If MySQL needs to connect from different sources using a single username and password. Wildcard(%) can be used instead of an IP address. CREATE USER 'user1'@'%' IDENTIFIED BY 'password1'; % is a wildcard - It can be used as  '%.domain.com' or '%.123.123.123'  To grant privileges to a database, the user must create a database.  Following command granting privileges to a database with name 'school' GRANT ALL ON school.* TO 'user1'@'192.168.1.1'; For localhost connect...

Get the list of RPM installed in CentOS

Enviornment CentOS 7 minimal installation Command rpm -qa -a, --all query/verify all packages -q Specify a query It lists all packages installed in system. User can filter the result by using a pipe and grep. eg Check any packages installed with name php rpm -qa | grep php

Setup Ruby on CentOS 8

This guide explains how to setup Ruby on CentOS using Ruby version manager. Prerequisite  CentOS 8 minimal installation with latest available updates Resolve Dependencies  To begin with Ruby installation, it requires a set of packages on the system. Following steps to resolve the same.  dnf install curl     dnf install gnupg2      dnf install tar Installing Ruby Version Manager ( RVM )      RVM is a command-line tool that allows us to install, manage, and work with different ruby environments.      Install the latest stable version of RVM on your system using the following command. This command will automatically download all required files and install on your system. Install GPG keys As a first step install GPG keys used to verify installation package: Key can be found at RVM website Eg : gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105...

Ruby Gem Environment Path

By running following command helps to retrieve environment of details of Ruby Gem gem environment sample output from centos 8  RubyGems Environment:   - RUBYGEMS VERSION: 3.0.8   - RUBY VERSION: 2.6.5 (2019-10-01 patchlevel 114) [x86_64-linux]   - INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.6.5   - USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.6.0   - RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-2.6.5/bin/ruby   - GIT EXECUTABLE:   - EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-2.6.5/bin   - SPEC CACHE DIRECTORY: /root/.gem/specs   - SYSTEM CONFIGURATION DIRECTORY: /usr/local/rvm/rubies/ruby-2.6.5/etc   - RUBYGEMS PLATFORMS:     - ruby     - x86_64-linux   - GEM PATHS:      - /usr/local/rvm/gems/ruby-2.6.5      - /usr/local/rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0   - GEM CONFIGURATION:      - :update_sources => true      - :verbos...

Laravel 5.1with PHP 5.6 and MySQL 8.0

MySQL server 8.0 enabled with new user authentication mechanism. This mechanism may not supported by Laravel 5.1.x with PHP 5.x versions. It also throws exception from Laravel library for database connection. Error example: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client The server requested authentication method unknown to the client [caching_sha2_password] To resolve errors, run the MySQL service with support of old authentication mechanism. Open mysql my.cnf (Path : 'C:\ProgramData\MySQL\MySQL Server 8.0' in windows 10 Pro) using any text editor. Update the value of  'default_authentication_plugin'  to  'mysql_native_password'. Restart MySQL service to make the updated configuration in effect.  Testing Environment Used. Windows 10 Pro MySql 8. PHP 5.6.0 Laravel 5.1