25-03-2025
This commit is contained in:
19
docs/Synology/dsm7/go.md
Normal file
19
docs/Synology/dsm7/go.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# go
|
||||
|
||||
|
||||
|
||||
### Installation:
|
||||
|
||||
1. Supprimer l'ancienne installation: `rm -rf $HOME/go`
|
||||
2. [Télécharger go](https://go.dev/dl/): `wget https://go.dev/dl/go1.23.5.linux-amd64.tar.gz`
|
||||
3. Décompresser l'archive dans $HOME: `tar -xzvf go1.23.5.linux-amd64.tar.gz`
|
||||
4. Ajouter \$HOME/go/bin dans le $PATH: `export PATH=$PATH:$HOME/go/bin`
|
||||
5. Vérifier l'installation: `go version`
|
||||
|
||||
|
||||
|
||||
### Package:
|
||||
|
||||
[OWASP Amass](https://github.com/owasp-amass/amass/blob/master/doc/tutorial.md)
|
||||
|
||||
[assetfinder](https://github.com/tomnomnom/assetfinder)
|
||||
@@ -19,7 +19,10 @@ lrwxrwxrwx 1 root root 38 Oct 26 2022 npx -> ../lib/node_modules/npm/bin/
|
||||
### Installer nvm
|
||||
|
||||
```bash
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
|
||||
|
||||
$ nvm -v
|
||||
0.40.0
|
||||
```
|
||||
|
||||
Installer node=lts/fermium (ou mettre-à-jour)
|
||||
@@ -28,6 +31,11 @@ Installer node=lts/fermium (ou mettre-à-jour)
|
||||
nvm install --lts=hydrogen
|
||||
```
|
||||
|
||||
```bash
|
||||
$ which node
|
||||
/var/services/homes/bruno/.nvm/versions/node/v20.11.0/bin/node
|
||||
```
|
||||
|
||||
Mettre-à-jour npm:
|
||||
|
||||
```bash
|
||||
@@ -42,6 +50,46 @@ nvm reinstall-packages 14.17.0
|
||||
|
||||
|
||||
|
||||
### npm
|
||||
|
||||
```bash
|
||||
$ which npm
|
||||
/var/services/homes/bruno/.nvm/versions/node/v20.11.0/bin/npm
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ npm doctor
|
||||
|
||||
Check Value Recommendation/Notes
|
||||
npm ping ok
|
||||
npm -v not ok Use npm v10.8.2
|
||||
node -v not ok Use node v20.16.0 (current: v20.11.0)
|
||||
npm config get registry ok using default registry (https://registry.npmjs.org/)
|
||||
git executable in PATH ok /usr/local/bin/git
|
||||
global bin folder in PATH not ok Error: Add /volume1/homes/bruno/.nvm/versions/node/v20.11.0/bin to your $PATH
|
||||
Perms check on cached files ok
|
||||
Perms check on local node_modules ok
|
||||
Perms check on global node_modules ok
|
||||
Perms check on local bin folder ok
|
||||
Perms check on global bin folder ok
|
||||
npm WARN verifyCachedFiles Content garbage-collected: 9 (5411539 bytes)
|
||||
npm WARN verifyCachedFiles Cache issues have been fixed
|
||||
Verify cache contents ok verified 380 tarballs
|
||||
npm notice
|
||||
npm notice New minor version of npm available! 10.4.0 -> 10.8.2
|
||||
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
|
||||
npm notice Run npm install -g npm@10.8.2 to update!
|
||||
npm notice
|
||||
npm ERR! Some problems found. See above for recommendations.
|
||||
|
||||
npm ERR! A complete log of this run can be found in: /var/services/homes/bruno/.npm/_logs/2024-08-21T07_58_05_115Z-debug-0.log
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Installer thumbsup
|
||||
|
||||
```bash
|
||||
|
||||
@@ -7,15 +7,22 @@
|
||||
#### Python 3 est installé par défaut:
|
||||
|
||||
```bash title="Python3"
|
||||
$ python -V
|
||||
Python 3.8.8
|
||||
|
||||
$ which python
|
||||
/bin/python
|
||||
|
||||
$ python -V
|
||||
Python 3.8.15
|
||||
|
||||
|
||||
$ which python3
|
||||
/bin/python3
|
||||
|
||||
$ /bin/python3 -V
|
||||
Python 3.8.15
|
||||
|
||||
|
||||
# Les modules sont installés là:
|
||||
# /usr/lib/python3.8/site-packages
|
||||
# /volume1/homes/bruno/.local/lib/python3.8/site-packages
|
||||
|
||||
$ find / -iname "site-packages" -type d -print 2>/dev/null
|
||||
```
|
||||
@@ -56,15 +63,11 @@ Successfully installed pip-21.1.3
|
||||
# Utiliser sudo pour une install globale
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash title="Chemins en installation locale"
|
||||
which pip3
|
||||
/var/services/homes/bruno/.local/bin/pip3
|
||||
$ which pip3
|
||||
|
||||
bruno@DS916:~/.local/bin $ pip --version
|
||||
bruno@DS916:~/.local/bin $ pip3 --version
|
||||
pip 21.1.3 from /var/services/homes/bruno/.local/lib/python3.8/site-packages/pip (python 3.8)
|
||||
$ pip3 --version
|
||||
pip 23.2.1 from /var/packages/python311/target/lib/python3.11/site-packages/pip (python 3.11)
|
||||
```
|
||||
|
||||
|
||||
@@ -96,3 +99,76 @@ bruno@DS916:~/venv $ source mkdocs/bin/activate
|
||||
mkdocs, version 1.2.1 from /volume1/homes/bruno/venv/mkdocs/lib/python3.8/site-packages/mkdocs (Python 3.8)
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Paquets Python 3.9 et Python 3.11 SynoCommunity
|
||||
|
||||
```bash
|
||||
$ which python3.9
|
||||
/usr/local/bin/python3.9
|
||||
|
||||
$ which python3.11
|
||||
/usr/local/bin/python3.11
|
||||
|
||||
$ python3 -V
|
||||
Python 3.11.5
|
||||
|
||||
# /volume1/@appstore/Python3.9/usr/lib/python3.9/site-packages
|
||||
# <vide>
|
||||
|
||||
# /volume1/@appstore/python311/lib/python3.11/site-packages
|
||||
# pip 23.2.1
|
||||
|
||||
# /volume1/homes/bruno/.local/lib/python3.11/site-packages
|
||||
# pipx 1.6.0
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### pipx
|
||||
|
||||
```bash
|
||||
$ which pipx
|
||||
/var/services/homes/bruno/.local/bin/pipx
|
||||
|
||||
# Virtual Environment location is /volume1/homes/bruno/.local/share/pipx/venvs.
|
||||
# Symlinks to apps are placed in /volume1/homes/bruno/.local/bin.
|
||||
# Symlinks to manual pages are placed in /volume1/homes/bruno/.local/share/man.
|
||||
|
||||
$ pipx -v
|
||||
pipx >(setup:1083): pipx version is 1.6.0
|
||||
```
|
||||
|
||||
Upgrade pipx:
|
||||
|
||||
```
|
||||
python3 -m pip install --user -U pipx
|
||||
```
|
||||
|
||||
Commandes:
|
||||
|
||||
```
|
||||
install Install a package
|
||||
upgrade Upgrade a package
|
||||
upgrade-all Upgrade all packages. Runs `pip install -U <pkgname>` for each package.
|
||||
uninstall Uninstall a package
|
||||
uninstall-all Uninstall all packages
|
||||
reinstall Reinstall a package
|
||||
reinstall-all Reinstall all packages
|
||||
list List installed packages
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ pipx list
|
||||
venvs are in /volume1/homes/bruno/.local/share/pipx/venvs
|
||||
apps are exposed on your $PATH at /volume1/homes/bruno/.local/bin
|
||||
manual pages are exposed at /volume1/homes/bruno/.local/share/man
|
||||
package showcert 0.2.3, installed using Python 3.11.5
|
||||
- gencert
|
||||
- showcert
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user