Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
2.1 kB
5
Indexable
#### Java 17 in linux

###### Search and installation

```bash
dnf search jdk | egrep -- '-17'
dnf install java-17-openjdk java-17-openjdk-devel -y
```

##### Set default java version
Select the right version from the selection
```bash
sudo update-alternatives --config java
```

##### Check default version
```bash
java -version
openjdk version "17.0.9" 2023-10-17 LTS
```

##### Links
* https://docs.oracle.com/en/learn/ol-java-install/index.html#write-compile-and-run-a-java-program
* https://computingforgeeks.com/install-oracle-java-openjdk-fedora-linux/
* https://kifarunix.com/install-java-11java-17java-18-on-rocky-linux/


#### C++ 20

C++20 features are available since GCC 8. To enable C++20 support, add the command-line parameter -std=c++20 (use -std=c++2a in GCC 9 and earlier) to your g++ command line. Or, to enable GNU extensions in addition to C++20 features, add -std=gnu++20.

```bash
g++ --version
g++ (GCC) 8.5.0 20210514
```

#### NGINX 1.21 (Stable)

```bash
dnf install dnf-utils -y

nano /etc/yum.repos.d/nginx.repo

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

yum --showduplicates list nginx

yum install nginx-1.21
```


#### Docker 20.10.18
config repo de docker

```bash
sudo curl -SsL https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
```

Instalando version requerida

```bash
dnf list docker-ce --showduplicates | sort -r
sudo dnf -y install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-buildx-plugin docker-compose-plugin


sudo yum --showduplicates list docker-ce
sudo yum install docker-ce-17.06.0.ce-1.el7.centos
or
sudo yum install docker-ce-17.06.0.ce-1.fc25
```
Leave a Comment