Skip to content

Instantly share code, notes, and snippets.

@leosaa
leosaa / chronycfreebsd.md
Last active April 22, 2024 16:57
Chronyc in FreeBSD

Install chrony in FreeBSD

chrony is a versatile implementation of the Network Time Protocol (NTP). It can synchronise the system clock with NTP servers. Chrony is an accurate network time daemon and an alternate implementation of the Network Time Protocol (NTP) compared to ntp.org's NTPd.

Chrony has quite a few advantages over the other NTP implementations, check the chrony ntp comparison page for more details.

Installing

FreeBSD 12 supports Chrony v3.5 which allows privilege separation. The installer will create the user chronyd. So the Chrony daemon will running as the the unprivileged user chronyd

Installing moodle on Centos 7 with nginx, php-fpm and mariadb

I am going to use use a Centos 7 minimal install virtual box machine. So the first step is to clone the VM with new mac address.

set the environment

CentOS: 7.7

php: 7.3.16

mariadb: 10.1.41

Setting ssh tunnel

In order to connect to MySQL over a ssh tunnel, you have to set your ssh config as follow:

edit your config file.

Edit your .ssh/config file and add the following lines:

 Host chinoserver
 Hostname 192.168.100.200

Enable Epel

dnf install epel-release
Last metadata expiration check: 0:01:11 ago on Wed 01 Apr 2020 10:54:30 PM MDT.
Dependencies resolved.
============================================================================================================================
 Package                          Architecture               Version                       Repository                  Size
@leosaa
leosaa / ChronycRHEL8.md
Last active April 20, 2020 23:44
Setting chronic in Red Hat/Centos 8

Setting chrony in Red Hat/Centos 8

Red Hat has moved the Network Time Protocol implementation from ntp package to chrony(*)

Set your timezone

The system’s timezone is set during the install process, but it can be easily changed at a later time.

timedatectl is the command to set time and date. An example on how to set and check the timezone for Mount Time Zone or America/Denver (MDT)

@leosaa
leosaa / Install_TensorFlow.md
Last active September 14, 2018 20:54
Installing TensorFlow locally over Python 3.6.4 on RHEL 7.5
@leosaa
leosaa / Python3_7_0_onRHEL_Centos_6.md
Last active April 4, 2024 17:26
install python 3.7.0 on RHEL/Centos 6.9

How to install Python 3.7.0 on RHEL/Centos 6.9

This is an introduction to building and installing Python 3.7.0 from source on Red Hat or Centos 6. Unfortunately python 3.7.0 requires specifics version of openssl and RHEL/Centos 6.9 does not provides this versions: So previous to configure pyhton, you have to configure zlib and then openssl.

Requirements

  • zlib 1.1.3 (better 1.1.4) or upper
  • openssl 1.1.0 or upper
  • Also, you will need libffi-devel rpm

How to install python packages locally

There are (at least) three possible ways to install a python package in your $HOME/.local directory, and I will review two of the. All of them have to be followed by a configuration of your environment, more specifically the PYTHONPATH

install with PIP

pip is the easy way to install python packages

pip install numpy --user
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/1a/2e/4e298c92b1fced64a4414ada9af3253a91083b92b131c2b10c057c507982/numpy-1.15.1-cp37-cp37m-manylinux1_x86_64.whl (13.8MB)
    100% |################################| 13.9MB 1.7MB/s