Skip to main content

Posts

Tomcat 9 : Install

 Install Tomcat 9 to configure Java Application Server. [1].  Install Java Runtime Environment, refer to here. [2]. Install Tomcat 9. Make sure the latest version and source URL on download site. ⇒ https://tomcat.apache.org/download-90.cgi [root@dlp ~]# curl -O http://ftp.riken.jp/net/apache/tomcat/tomcat-9/v9.0.29/bin/apache-tomcat-9.0.29.tar.gz [root@dlp ~]# tar zxvf apache-tomcat-9.0.29.tar.gz [root@dlp ~]# mv apache-tomcat-9.0.29 /usr/libexec/tomcat9 [root@dlp ~]# useradd -M -d /usr/libexec/tomcat9 tomcat [root@dlp ~]# chown -R tomcat. /usr/libexec/tomcat9 [3]. Create a Systemd Setting file. [root@dlp ~]# vi /usr/lib/systemd/system/tomcat9.service # create new [Unit] Description=Apache Tomcat 9 After=network.target [Service] Type=oneshot ExecStart=/usr/libexec/tomcat9/bin/startup.sh ExecStop=/usr/libexec/tomcat9/bin/shutdown.sh RemainAfterExit=yes User=tomcat Group=tomcat [Install] WantedBy=multi-user.target [root@dlp ~]# systemctl enable --now tomcat9 [4]. If SELinux is enab

OpenJDK 8 : Install

  Install OpenJDK 8. [1]. If you need only JRE, Install only [java-1.8.0-openjdk] package, but if you need compiler, Install [java-1.8.0-openjdk-devel] package, too. [root@dlp ~]# dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel [root@dlp ~]# cat > /etc/profile.d/java.sh <<'EOF' export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which java))))) export PATH=$PATH:$JAVA_HOME/bin EOF [root@dlp ~]# source /etc/profile.d/java.sh [root@dlp ~]# java -version openjdk version "1.8.0_232" OpenJDK Runtime Environment (build 1.8.0_232-b09) OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode) # verify to create test program [root@dlp ~]# cat > java_test.java <<'EOF' class java_test {     public static void main(String[] args) {         System.out.println("Hello Java World !");     } } EOF  [root@dlp ~]# javac java_test.java [root@dlp ~]# java java_test Hello Java World ! [2]. If you installed multiple version of Java

OpenJDK 11 : Install

 Install OpenJDK 11. [1]. If you need only JRE, Install only [java-11-openjdk] package, but if you need compiler, Install [java-11-openjdk-devel] package, too. [root@dlp ~]# dnf -y install java-11-openjdk java-11-openjdk-devel [root@dlp ~]# cat > /etc/profile.d/java.sh <<'EOF' export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which java))))) export PATH=$PATH:$JAVA_HOME/bin EOF [root@dlp ~]# source /etc/profile.d/java.sh [root@dlp ~]# java --version openjdk 11.0.5 2019-10-15 LTS OpenJDK Runtime Environment 18.9 (build 11.0.5+10-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.5+10-LTS, mixed mode, sharing) # verify to create test program [root@dlp ~]# cat > java_test.java <<'EOF' class java_test {     public static void main(String[] args) {         System.out.println("Hello Java World !");     } } EOF  [root@dlp ~]# javac java_test.java [root@dlp ~]# java java_test Hello Java World ! [2]. If you installed multiple version of Jav

TensorFlow : Install Docker Image (CPU)

 Install TensorFlow which is the Machine Learning Library. On this example, Install TensorFlow official Docker Image without GPU support and run it on Containers. [1].  Install Podman, refer to here. [2]. Install TensorFlow Docker (CPU only). # pull TensorFlow 2.0 with Python3 image [cent@dlp ~]$ podman pull tensorflow/tensorflow:2.0.0-py3 [cent@dlp ~]$ podman images REPOSITORY                        TAG         IMAGE ID       CREATED        SIZE docker.io/tensorflow/tensorflow   2.0.0-py3   90f5cb97b18f   9 months ago   1.09 GB # run container [cent@dlp ~]$ podman run --rm tensorflow/tensorflow:2.0.0-py3 \ python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))" 2020-07-22 05:21:27.138093: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2801480000 Hz 2020-07-22 05:21:27.138647: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x34ccfe0 executing computations on platform Host. Devices: 2020-07-22 05:21:2

Podman : Install

 Install Podman that is Container management tool. It's possible to use the same ease of use of Docker Cli and also Podman does not need specific Service Daemon. [1]. Install Podman. [root@dlp ~]# dnf -y install podman [2]. Download an official image and create a Container and output the words [Welcome to the Podman World] inside the Container. # download official image [root@dlp ~]# podman pull centos Trying to pull docker.io/centos:latest...Getting image source signatures Copying blob 729ec3a6ada3: 68.21 MiB / 68.21 MiB  4s Copying config 0f3e07c0138f: 2.13 KiB / 2.13 KiB  0s Writing manifest to image destination Storing signatures 0f3e07c0138fbe05abcb7a9cc7d63d9bd4c980c3f61fea5efa32e7c4217ef4da # run echo inside Container [root@dlp ~]# podman run centos /bin/echo "Welcome to the Podman World" Welcome to the Podman World [3]. Connect to the interactive session of a Container with [i] and [t] option like follows. If [exit] from the Container session, the process of

Scala 2.10 : Install

  Install Scala 2.10. [1]. Make sure the current enabled version of Scala and Install it. [root@dlp ~]# dnf module list scala CentOS-8 - AppStream Name  Stream   Profiles  Summary scala 2.10 [d] common [d A hybrid functional/object-oriented language for the JV                ]         M Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled # install Scala 2.10 [root@dlp ~]# dnf module -y install scala:2.10 [root@dlp ~]# scala -version Scala code runner version 2.10.6 -- Copyright 2002-2013, LAMP/EPFL [2]. Run Scala REPL (Read Eval Print Loop) which is the interactive shell to Test Scala. [root@dlp ~]# scala Welcome to Scala version 2.10.6 (OpenJDK 64-Bit Server VM, Java 1.8.0_232). Type in expressions to have them evaluated. Type :help for more information. # print words scala> println("Hello Scala World") Hello Scala World # set constants scala> val msg:String = "Hello Scala World" msg: String = Hello Scala World scala> println(msg) Hello Scala World

Perl 5.26 : Install

 Install Perl 5.26. [1].  Make sure the available version of Perl and Install it. [root@dlp ~]# dnf module list perl CentOS-8 - AppStream Name   Stream     Profiles             Summary perl   5.24       common [d], minimal  Practical Extraction and Report Language perl   5.26 [d]   common [d], minimal  Practical Extraction and Report Language Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled # install Perl 5.26 [root@dlp ~]# dnf module -y install perl:5.26 Dependencies resolved. ========================================================  Package       Arch     Version              Repository   Size ======================================================== Upgrading:  perl        x86_64   4:5.26.3-416.el8     AppStream    72 k  replacing  perl-core.x86_64 5.24.4-398.module_el8.0.0+50+c3b345cd  perl-Archive-Zip               noarch   1.60-3.el8           AppStream   108 k  perl-Attribute-Handlers        noarch   0.99-416.el8  AppStream    88 k  perl-B-Debug                   noarch   1.2