Oracle linux install nodejs

Oracle linux install nodejs

To configure your development system so that your Node.js application can take advantage of the continuous availability and high performance features of a dedicated Autonomous Database , you perform these steps.

  1. Download and install Node.js.
  2. Download and install Oracle Instant Client.
  3. Download and install node-oracledb.
  4. Download the client credentials for the database and make them available to Oracle Instant Client.

Your development system must meet certain criteria to configure it successfully.

  • It must have internet access.
  • It must have network access to the dedicated Autonomous Database . See Configure a Development System to Access the Database to learn how to ensure your development system meets this requirement.

Download and Install Node.js

Download and install Node.js for your system’s OS and architecture:

    Oracle Linux: Run these commands to download and install the latest version of Node.js:

sudo yum install -y oracle-release-el7 oracle-nodejs-release-el7 sudo yum install -y nodejs

Download and Install Oracle Instant Client

You need Oracle Instant Client libraries version 19.6 or later.

Download and install the Oracle Instant Client basic package for your system’s OS and architecture:

    Oracle Linux: Run these commands to download and install the Oracle Instant Client basic package:

sudo yum -y install oracle-release-el7 sudo yum -y install oracle-instantclient19.3-basic
  1. Go to the Oracle Instant Client Downloads page and select the download for your system’s OS and architecture.
  2. On the download page, accept the Oracle Technology Network License Agreement, download the latest version of the Basic Package , and then install it by following the instructions at the bottom of the download page.

Download and Install node-oracledb

Download and install the node-oracledb add-on for Node.js for your system’s OS and architecture:

    Oracle Linux: Run these commands to download and install the latest version of node-oracledb:

sudo yum install -y oracle-release-el7 oracle-nodejs-release-el7 sudo yum install -y node-oracledb-node10

Download and Install Client Credentials for the Database

  1. Download the zip file containing client credentials for your database to a secure directory on your computer. This zip file is available for download from the database’s Details page in the Oracle Cloud console. Download the credentials as follows.
    1. In your web browser, sign in to Oracle Cloud and navigate to the Details page for the dedicated Autonomous Database .
    2. Click DB Connection .
    3. On the Database Connection page click Download .
    4. In the Download Wallet dialog, enter a wallet password in the Password field and confirm the password in the Confirm Password field. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character.
    5. Click Download to save the client credentials zip file to a secure directory.
    (DIRECTORY="/users/jdoe/adbcredentials")

    Источник

    Oracle linux install nodejs

    To build a Node.js application that accesses an Autonomous Database , you start by configuring your development system to support database access that can take advantage of the continuous availability and high performance features of Autonomous Database .

    After configuring your development system, you code database connections and SQL statements in your application to take advantage of the continuous availability and high performance features.

    For a «try it out» alternative to reading the following topics, you can go through the Lab 3: Build and Deploy Node.js Application in Oracle Autonomous Database Dedicated for Developers and Database Users Workshop.

    Configure Your Node.js Development System

    To configure your development system so that your Node.js application can take advantage of the continuous availability and high performance features of an Autonomous Database , you perform these steps.

    1. Download and install Node.js.
    2. Download and install Oracle Instant Client.
    3. Download and install node-oracledb.
    4. Download the client credentials for the database and make them available to Oracle Instant Client.

    Your development system must meet certain criteria to configure it successfully.

    • It must have internet access.
    • It must have network access to the Autonomous Database . See Configure a Development System to Access the Database to learn how to ensure your development system meets this requirement.

    Download and Install Node.js

    Download and install Node.js for your system’s OS and architecture:

      Oracle Linux: Run these commands to download and install the latest version of Node.js:

    sudo yum install -y oracle-release-el7 oracle-nodejs-release-el7 sudo yum install -y nodejs

    Download and Install Oracle Instant Client

    You need Oracle Instant Client libraries version 19.6 or later.

    Download and install the Oracle Instant Client basic package for your system’s OS and architecture:

      Oracle Linux: Run these commands to download and install the Oracle Instant Client basic package:

    sudo yum -y install oracle-release-el7 sudo yum -y install oracle-instantclient19.3-basic
    1. Go to the Oracle Instant Client Downloads page and select the download for your system’s OS and architecture.
    2. On the download page, accept the Oracle Technology Network License Agreement, download the latest version of the Basic Package , and then install it by following the instructions at the bottom of the download page.

    Download and Install node-oracledb

    Download and install the node-oracledb add-on for Node.js for your system’s OS and architecture:

      Oracle Linux: Run these commands to download and install the latest version of node-oracledb:

    sudo yum install -y oracle-release-el7 oracle-nodejs-release-el7 sudo yum install -y node-oracledb-node10

    Download and Install Client Credentials for the Database

    1. Download the zip file containing client credentials for your database to a secure directory on your computer. This zip file is available for download from the database’s Details page in the Oracle Cloud console. Download the credentials as follows.
      1. In your web browser, sign in to Oracle Cloud and navigate to the Details page for the Autonomous Database .
      2. Click DB Connection .
      3. On the Database Connection page click Download .
      4. In the Download Wallet dialog, enter a wallet password in the Password field and confirm the password in the Confirm Password field. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character.
      5. Click Download to save the client credentials zip file to a secure directory.
      (DIRECTORY="/users/jdoe/adbcredentials")

      Code Database Connections and SQL Statements

      After configuring your development system to support Node.js application connectivity to an Autonomous Database , follow these steps to ensure optimal performance of your application’s use of the database:

      1. Add the dependency on the node-oracledb add-on to your application’s package.json file.
      2. Code connections for high performance and continuous availability.

      Add the node-oracledb Dependency to package.json

      Edit the dependencies object in the package.json file for your application, adding the oracledb package and version. (Use command npm init to generate package.json if it doesn’t exist.) For example:

      . . . "dependencies": < . . .,  "oracledb": "^4.0", . . . >, . . .

      For detailed information about the dependencies object, see the npm-package.json page. To display the oracledb version installed, you can use the npm list command; for example:

      Code Connections for High Performance and Continuous Availability

      To achieve high performance and continuous availability, follow these guidelines when making connections to the database:

      • Use connection pools.
      • Enable FAN (Fast Application Notification).
      • Use the predefined database service that best matches the operations you will be performing. For information about the predefined database services, see Predefined Database Service Names for Autonomous Databases.
      pool = await oracledb.createPool(< events: true, user: "appuser", password: process.env.MY_PASSWORD_ENV_VAR, connectString: "tp_tls" >);

      This example creates a pool for connections to the tp_tls database service, and enables FAN by setting the events property to true .

      For detailed information about node-oracledb, go to the node-oracledb Documentation page, which includes both an API Reference and a User Guide.

      For code examples that demonstrate a wide variety of node-oracledb features, go to the node-oracledb examples folder.

      Источник

      Install NodeJS on CentOS 8 / RHEL 8 / Oracle Linux 8

      A web server must be able to run many different applications or websites. Then, you have to install tools to run it. On the other hand, it is also possible that in a normal computer, we have to use those tools to create such applications. In this sense, NodeJS emerges as one of those tools that many developers use for their web applications. So, in this post, you will learn how to install NodeJS on CentOS 8, RHEL 8 and Oracle Linux 8. Whether you use the system as a web server or as your desktop operating system. In both cases, it is useful to install it.

      NodeJS on CentOS 8, RHEL 8 and Oracle Linux 8

      As is well known, NodeJS is an open-source technology that allows you to expand the functionality of web applications. Basically, it is a Javascript implementation on the server-side. Mainly used in applications where constant and asynchronous communication between client and server is required.

      If you use CentOS 8, RHEL 8 or Oracle Linux 8 it is likely that you are either an application developer or sysadmin. In both cases, it is likely that you will have to serve web applications and it is better than the system has NodeJS installed for easy deployment.

      1) Using the EPEL repository

      We have two ways to install NodeJS on CentOS 8, RHEL 8 and Oracle Linux 8. The first is to enable the EPEL repository.

      EPEL is a pretty reliable repository that allows you to install a lot of packages in the distribution. All this without any problems.

      It opens a terminal and runs the following:

      :~$ su :~# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

      1.- Enabling the EPEL repository on CentOS 8, RHEL 8 and Oracle Linux 8

      Then, install NodeJS by running the following command:

      2.- Install NodeJS on CentOS 8, RHEL 8 and Oracle Linux 8

      Finally, check the installed version.

      2) Install NodeJS on CentOS 8, RHEL 8 and Oracle Linux 8 using the NVM

      The first method is quite reliable and we even get an LTS version. However, it is likely that we need to have the latest version available. Using NVM this is possible.

      NVM (Node Version Manager) is a utility that allows you to install and manage different versions of NodeJS.

      First, you have to install curl to download NVM.

      Then, download and install NVM.

      :~# :~# curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash

      3.- Install NVM on CentOS 8 RHEL 8 and Oracle Linux 8

      Now, refresh the bash profile to use NVM.

      Now you can list all versions of NodeJS available for download.

      4.- All nodeJS versions ready to be installed

      For example, I will install the latest version.

      Once the process is finished, check the installed version.

      5.- Node version

      Conclusion

      As you can see Installing NodeJS is a simple process, especially for a technology quite powerful and used by many developers worldwide. We even have two ways to do it and it’s up to you to choose the best one.

      If you want to install NodeJS in other systems like Debian or Ubuntu, you can check here.

      Please share this post with your friends and join our Telegram channel.

      Источник

      Читайте также:  Linux обновление rpm пакет
Оцените статью
Adblock
detector