UPD Readme

This commit is contained in:
Thomas Kuschel 2024-06-12 19:41:16 +02:00
parent d6d9d15c4f
commit 5733f5808b

View File

@ -6,9 +6,12 @@
## Prerequisites
1. A running Linux system, e.g. Debian, Arch, etc.
0. User has administrative access via sudo
0. Python Version >3
0. Selenium for Python
0. Chromium Web browser (headless)
0. Selenium for Python via Webdriver Manager
0. Optional: User has an ssh key pair
0. Optional: git, ? wget, ? curl
## Installation of Python, Selenium, Chromium
@ -38,7 +41,20 @@ Upgrade your Debian installation if the version is lower than the above value.
$ sudo apt update
$ sudo apt upgrade
If this does not work, then the user \<username\> must be added to the sudo group with :
$ su -
Password:
root@debian:~# usermod -aG sudo <username>
For the group membership to take effect, the user must log out and log in again or the system must be restarted.
#### Python3
Check if Python is already installed in Debian:
$ python3 --version
Python 3.11.2
If it is not already installed, then:
$ sudo apt install python3
@ -46,7 +62,74 @@ Upgrade your Debian installation if the version is lower than the above value.
$ sudo apt install chromium
### Arch Linux
#### Manager (selenium)
Afterwards, selenium is installed:
$ sudo apt install python3-selenium
#### SSH key generation
The program `openssh` is preinstalled on Debian systems. But there is no private/public key installed yet. Best practices generating the key pair:
$ ssh-keygen -t ed25519 -C "your_email@example.com"
Personally, I don't use a different name for the keys, I just click through the process.
The same applies to the passphrase.
Now go to the website https://git.kuschel.at and copy the content of the public key from ~/.ssh/id__ed25519.pub to the "Manage SSH keys" -- via "Add Key".
$ cat .ssh/id_ed25519.pub
#### Git installation and clone the scripts from git.kuschel.at
$ sudo apt install git
You have to globally configure your `git` with:
$ git config --global user.name "John Doe"
$ git config --global user.email your_email@example.com
Checking the git configuration with:
$ git config -l
user.name=<your name>
user.email=<your e-mail>
etc.
Now create a folder and cd into it
$ mkdir gitea
$ cd gitea
Clone the repository `script` to your site with:
~/gitea$ git clone ssh://git@kuschel.at:21861/public/scripts.git
Ensure you can run `pip` from command line
$ python3 -m pip --version
If pip isnt already installed ("No module named pip"), then first try to bootstrap it from the standard library
$ python3 -m ensurepip --default-pip
If this does not work, install the package
$ sudo apt install python3-pip
Also `sudo apt install pip` should work.
$ pip install webdriver-manager
### Arch Linux (@todo)
#### Check Version