Showing posts with label remote. Show all posts
Showing posts with label remote. Show all posts

June 11, 2022

Configure a API Backend Server with custom domain on Amazon Web Services (AWS) EC2 Ubuntu with NGINX and Certbot SSL

Hi all,

Build your own API backend server on AWS free-tier with SSL.

The below steps with reference links will provide detailed information of each step.

  1. AWS account - Free-tier
  2. Create EC2 Ubuntu
  3. Connect to Ubuntu from your local using SSH/Putty
  4. Install NodeJS
    1. Open terminal
    2. curl -fsSL http://deb.nodesource.com/setup_lts.x | sudo -E bash -
    3. sudo apt update
    4. sudo apt install nodejs //installs latest LTS nodejs
  5. Create a sample node server
  6. Install and configure node server process manager
    1. sudo npm install -g pm2@latest
    2. Navigate to nodejs server folder
    3. pm2 start <filename>
    4. pm2 startup systemd
    5. pm2 save
    6. pm2 list // List all the nodejs apps with status
    7. pm2 stop/restart/start app_name/id // Actions of nodejs servers
  7. Install Nginx
  8. Configure your domain DNS records to map to AWS EC2 public/elastic IP address
  9. Secure Nginx with SSL certs

Hope the above information is useful to set up the environment and play with your backend server.

Feel free to send your feedback and comments to psrdotcom@gmail.com


October 01, 2019

Remote desktop connection to Azure AD joined computer device

Hi Folks,

I have an issue of remotely connecting one of the Azure AD joined computer.

Fix is explained below


  1. Open "Remote Settings" from "System".
  2. You should be able to view "Remote" tab from "System Properties".
  3. Uncheck "Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)" from Remote Desktop section.
  4. Open regedit.exe.
  5. Navigate to "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp".
  6. Update "SecurityLayer" key to "0" (Zero) from default 2 (Two).
  7. Reboot your system.
  8. While taking remote desktop, user "AzureAD\"your work email id" as your username.
  9. You should be able to connect your AzureAD joined system remotely from now.


Please send your comments and feedback to psrdotcom@gmail.com

November 21, 2018

Connect to remote Oracle database server from RedHat Linux 7 using Oracle InstaClient

Hi friends,

I have come across a situation, where I need to connect to remote Oracle database server from RedHat Enterprise Linux (RHEL) 7. I found a way of using the Oracle InstaClient instead of installing the full Oracle DB which internally consists of Client.

Pre-requesites


  1. Linux mahcine (I tried with RHEL 7) with following softwares
    • Java (JAVA_HOME should be available)
    • Development Tools (RHEL 7 tools like gcc etc.)
  2. Another machine where Oracle server is installed with the following config
    • Database schema should be available
    • Users should be available instead of system/sysdba users
  3. Both machines shall be reachable to each other via ping.

Note: You should know the database server SID/service name.

Procedure

Download


  1. Download the insta client from Oracle Official Page
  2. In my case, I have downloaded the "Instant Client for Linux x86-64"
  3. Accept the license agreement
  4. Click "oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm" to download
  5. Optionally, you can download the "oracle-instantclient18.3-sqlplus-18.3.0.0.0-1.x86_64.rpm" to have sqlplus command line utility for testing
  6. Alternatively, you can download the zip files and download the same to install.
  7. In my case, I am going with RPMs.

Install


  • Install the downloaded RPMs
    • #> yum install oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm
    • #> yum install oracle-instantclient18.3-sqlplus-18.3.0.0.0-1.x86_64.rpm
  • While installing, it asks for locations, accept the defaults by pressing the "Enter" button

Note: If any dependencies are there, please install those.

Environment Variables


  • Create a oracle_env.sh file and setup your variables
    • #> gedit /etc/profile.d/oracle_env.sh
    export ORACLE_HOME=/usr/lib/oracle//client/
    export TNS_ADMIN=/usr/lib/oracle//client/
    export PATH=$ORACLE_HOME/bin:$PATH
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH



    • Save your file
    • Source your file with following command
      • #> source /etc/profile.d/oracle_env.sh

    tnsnames.ora


    • Create tnsnames.ora file in your $ORACLE_HOME with following syntax

    localsid = (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))
        (CONNECT_DATA =
          (SID = )
        )
      )

    • Instead of SID, you can use SERVICE_NAME also.

    Connect


    • You can test the connection
      • #> sqlplus @


    You should be able to connect to your remote database.

    Hope, it is useful for you.

    Please send your comments and feedback to psrdotcom@gmail.com

    Featured Post

    Java Introdcution

    Please send your review and feedback to psrdotcom@gmail.com