Installation and configuration of a Web System with Internal and External Databases and Domain within a Network Platform

We already left days ago Carnival and the eastern, and to take advantage of that time of enjoyment not only with recreational and leisure activities, I leave you this useful publication type 3 in 1 for those who love technology to practice it in said space of time dedicated to non-work.

lpi

First and foremost, we will first reinforce the theory and then go to practice!

Web Systems: Also known as Web Applications, they receive this name because they are executed (Displayed) in a Internal Network (Intranet) o External (Internet) through a Web browser. That is, they do not need to be installed on the computer, all the data handled is processed and stored within the web, in other words, it is permanently stored on large internet servers, which is sent to our devices or equipment in the moment we require it, leaving a temporary copy within our team.

To learn more about Web Systems check these links: link 1, link 2 y link 3.

The Databases: It is an exhaustive, non-redundant set of structured data organized independently of its use and its implementation in machines accessible in real time and compatible with concurrent users with a need for different information that cannot be predicted in time. Traditional databases are organized by fields, records, and files. A field it is a single piece of information; a record it is a complete system of fields; and a archive it is a collection of records.

To learn more about Databases check these links: link 1, link 2 y link 3.

Domains: Refers to the name (alphanumeric) linked to a physical address of a host (computer, mobile or any other electronic device). They are used to represent the directions of the Websites. Remember that the Internet is based on addresses under a Internet protocol called IP (connection numbers of each computer that is connected to the internet). A domain consists mainly of two parts: the organization name's and type of organization.

To learn more about Databases check these links: link 1, link 2 y link 3.

Web server: It can refer to both a Team (Hardware) as a web application (Software), but in general terms it is a program that manages any application on the server side executing connections (bidirectional or not, synchronous or not), with the client generating a response in any language or application on the client side. The code received by the client is usually compiled and executed by a Web browser using protocol HTTP belonging to the application layer of the OSI model.

To learn more about Web Servers check these links: link 1, link 2 y link 3.

Database Server: Also known as RDBMS (Relational Database Management Systems), are programs (or computers) that allow you to organize data in one or more related tables. This term can also refer to the Equipment that supports these services, which are used throughout the world with a wide variety of management applications.

To learn more about DB servers check these links: link 1, link 2 y link 3.

Domain Name Server: Also known as DNS servers They allow you to establish the relationship between domain names and IP addresses of computers on a network. Each domain has a domain name server, called primary domain name server, as well as a secondary domain name server, which can take over the primary domain name server in case of unavailability. Each domain name server is specified on the domain name server at the immediate higher level, which means that authority over domains can be implicitly delegated.

To learn more about DB servers check these links: link 1, link 2 y link 3.

INSTALLATION AND CONFIGURATION PROCEDURE

INSTALL AND CONFIGURE DATABASES
=============================

1.- Run PGADMIN3 and select an available DB Server (Example: srvbd01 / 192.168.1.239)

2.- Create a User (Login Roles / New Login Role) filling the fields Role Name (Properties) y Password / Password again (Definition)

Example:

Role Name = user_miappsweb3
Password = miappsweb3 * 2016

3.- Create a Databases filling the fields Name and Owner (Properties)

Example:

Name = miappsweb3_db
Owner = user_myappsweb3

4.- Create the structure or import it from a file .backup, .dump or .sql

A) EXAMPLE OF IMPORT FROM .BACKUP, .DUMP AND .SQL

*).SQL: psql -h localhost -p 5432 -U user_miappsweb3 -f "miappsweb3_db.sql" miappsweb3_db;
*).BACKUP: pg_restore -i -h localhost -d miappsweb3_db -U user_miappsweb3 -v /home/user/miappsweb3_db.backup
*).DUMP: your postgres / psql -U user_miappsweb3 </home/user/miappsweb3_db.dump

INSTALL AND CONFIGURE WEB SYSTEMS
============================

1.- PREPARE A WEB SERVER (Example: srvweb01/192.168.1.240)

2.- COPY THE SYSTEM IN / VAR / WWW / Ó / VAR / WWW / HTML LOCAL OR REMOTELY

A) EXAMPLE BEING LOCALLY FROM THE SERVER:

*) cd / home / user
*) scp -r development@192.168.1.100: / home / developer / Systems / application1 / miappsweb3.
*) mv myappsweb /var/www/miappsweb3.midominio.gob.ve
*) chown www-data. myappsweb3.mydomain.gob.ve/ -R
*) cd /var/www/miappsweb3.midominio.gob.ve
*) saw conf.php

// DATA FOR THE CONNECTION TO THE DATABASE
$ _SESSION ['database'] = «myappsweb3_db“;
$ _SESSION ['user'] = «user_miappsweb3“;
$ _SESSION ['Password'] = «miappsweb3 * 2016“;
$ _SESSION ['server'] = «192.168.1.239“;
$ _SESSION ['port'] = «5432“;

*) Go to folder Site Enableds with the command command: cd / etc / apache2 / sites-available /

Create a configuration file Site or make one from a copy of an existing one

*) cp miappsweb0.mydomain.gob.ve.conf miappsweb3.mydomain.gob.ve.conf
*) I saw miappsweb3.mydomain.gob.ve.conf


ServerAdmin webmaster@mydomain.gob.ve
ServerName miappsweb3.mydomain.gob.ve
DocumentRoot /var/www/miappsweb3.midominio.gob.ve
<Directory /var/www/miappsweb3.midominio.gob.ve>
Options-Indexes
AllowOverride None
Require all granted

ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combined

*) Edit the File HOST with the command command: vi / etc / hosts and add the following content:

192.168.1.240 miappsweb3.mydomain.gob.ve miappsweb3.mydomain.gob.ve.conf

*) Run: a2ensite miappsweb3.mydomain.gob.ve.conf
*) Restart the Apache2 daemon: /etc/init.d/apache2 restart
*) Check errors with: tail -f /var/log/apache2/error.log

Open the application via the web and execute 2 or more operations on it (Refresh / Login / Consultation) and check the errors issued.

INSTALL AND CONFIGURE INTERNAL AND EXTERNAL DOMAINS
=========================================

INTERNAL
======

1.- Go to your Primary DNS server

2.- Edit the Internal DB DNS

nano /etc/bind/db.interno/db.midomain.local

3.- Check or Include in the Web Server

; Host definitions
; server Web Server 01
srvweb01 IN A 192.168.1.240

4.- Check or Include in the application's CNAME

; CNAME servers network my_network
miappsweb3 IN CNAME srvweb01

5.- Update the file serial number

; The serial number is YYYY: MM: DD: VV (VV = EXCHANGE VERSION)
2015120801; serial

6.- Restart the Service (Demon) of the DNS server

/etc/init.d/bind9 restart

EXTERNAL
======

1.- Go to your Primary DNS server

2.- Edit the External DB DNS

nano /etc/bind/db.externo/db.mydomain.gob.ve

3.- Check or Include Web Server

; Host definitions
; server Web Server 01
srvweb01 IN A 192.168.1.240

4.- Check or Include the application's CNAME

; CNAME servers network my_network
miappsweb3 IN CNAME srvweb01

5.- Update the file serial number

; The serial number is YYYY: MM: DD: VV (VV = EXCHANGE VERSION)
2015120801; serial

6.- Restart the Service (Demon) DNS Server

/etc/init.d/bind9 restart

TEST ACCESS TO THE SYSTEM FROM A BROWSER!

I hope the Tutorial is useful for you.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   sheila said

    Excellent information, very complementary ...