forked from mirrors/thatmattlove-hyperglass
139 lines
4 KiB
Text
Executable file
139 lines
4 KiB
Text
Executable file
---
|
|
id: getting-started
|
|
title: Getting Started
|
|
sidebar_label: Getting Started
|
|
keywords: [install, configuration]
|
|
description: Getting started with hyperglass
|
|
---
|
|
|
|
import Tabs from "@theme/Tabs";
|
|
import TabItem from "@theme/TabItem";
|
|
|
|
## Automatic installation
|
|
|
|
If your system runs on:
|
|
|
|
- Ubuntu Linux
|
|
- ~~CentOS/Red Had Linux~~
|
|
- macOS (requires [homebrew](https://brew.sh))
|
|
|
|
You should be able to proceed with the automatic installation:
|
|
|
|
```shell-session
|
|
$ curl https://install.hyperglass.dev | sudo bash
|
|
```
|
|
|
|
:::caution Piping to bash
|
|
You should be <i>very</i> worried when someone asks you to do what I just did. Downloading a bash script from the internet and piping it to `bash` with root privileges is a terrible idea, unless you fully trust the source. Please don't trust me - go [look at the code](https://github.com/thatmattlove/hyperglass/blob/v1.0.0/install.sh) and determine for your self if it's safe to execute. If you feel it's not, please proceed with the manual installation (and [tell me why](https://github.com/thatmattlove/hyperglass/issues), so I can fix it).
|
|
:::
|
|
|
|
## Manual Installation
|
|
|
|
### System Dependencies
|
|
|
|
#### Python
|
|
|
|
hyperglass is written in Python 3 and requires Python version 3.6 as a minimum dependency.
|
|
|
|
If you're confident upgrading your system's version of Python won't break your system (many Linux operating systems rely heavily on Python for package management and other system functions), you can install Python 3.6:
|
|
|
|
<Tabs
|
|
defaultValue="debian"
|
|
values={[
|
|
{ label: 'Debian/Ubuntu', value: 'debian' },
|
|
{ label: 'RHEL/CentOS', value: 'rhel' }]}>
|
|
|
|
<TabItem value="debian">
|
|
|
|
```shell-session
|
|
$ sudo apt install -y python3-dev python3-pip
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
<TabItem value="rhel">
|
|
|
|
Documentation for CentOS is still in-progress. However, it's been determined that these dependencies _may_ also be required, depending on the version of CentOS:
|
|
|
|
```shell-session
|
|
$ sudo yum install libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel \
|
|
freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \
|
|
harfbuzz-devel fribidi-devel libraqm-devel libimagequant-devel \
|
|
libxcb-devel ncurses-devel
|
|
```
|
|
|
|
Until further testing with CentOS can be done, you should install the above dependencies _before_ installing Python 3. You may have to uninstall and re-install Python 3 if these dependencies weren't already installed.
|
|
|
|
You can install python from the CentOS 7 repository:
|
|
|
|
```shell-session
|
|
$ sudo yum install python3-devel python3-pip
|
|
```
|
|
|
|
But you can also use the [SCL repository](https://www.softwarecollections.org/en/scls/rhscl/rh-python36/)
|
|
|
|
```shell-session
|
|
$ sudo yum install centos-release-scl
|
|
$ sudo yum install rh-python36
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
</Tabs>
|
|
|
|
You can then verify your Python 3 version:
|
|
|
|
```shell-session
|
|
$ python3 --version
|
|
Python 3.6.9
|
|
```
|
|
|
|
#### Other Dependencies
|
|
|
|
The hyperglass UI is written in [ReactJS](https://reactjs.org/). As such, some Javascript dependencies are required. hyperglass also relies on [Redis](https://redis.io/) for caching purposes.
|
|
|
|
<Tabs
|
|
defaultValue="debian"
|
|
values={[
|
|
{ label: 'Debian/Ubuntu', value: 'debian' },
|
|
{ label: 'RHEL/CentOS', value: 'rhel' }]}>
|
|
|
|
<TabItem value="debian">
|
|
|
|
```shell-session
|
|
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
|
|
|
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
|
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
|
|
|
$ sudo apt update
|
|
$ sudo apt install -y nodejs yarn redis-server
|
|
|
|
$ sudo systemctl enable redis-server
|
|
$ sudo systemctl restart redis-server
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
<TabItem value="rhel">
|
|
|
|
```shell-session
|
|
$ curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
|
|
$ curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
|
|
$ sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
|
|
|
|
$ sudo yum -y install gcc-c++ make nodejs yarn redis
|
|
|
|
$ sudo systemctl enable redis
|
|
$ sudo systemctl restart redis
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
</Tabs>
|
|
|
|
### Application
|
|
|
|
```shell-session
|
|
$ pip3 install hyperglass
|
|
```
|