Testing Post 1
MongoDB works on concept of collection and document.
Database
Database is a physical container for collections. Each database gets its own set of files on the file system. A single MongoDB server typically has multiple databases
Collection
Collection is a group of MongoDB documents. It is the equivalent of an RDBMS table. A collection exists within a single database. Collections do not enforce a schema. Documents within a collection can have different fields. Typically, all documents in a collection are of similar or related purpose.
Installing MONGODB using yum on Oracle Linux 6
Installing MONGODB using yum on Oracle Linux 6
Reference: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
1) Configure the package management system (yum)
Create a /etc/yum.repos.d/mongodb-org-4.0.repo file so that you can install MongoDB directly using yum:
# vi /etc/yum.repos.d/mongodb-org-4.0.repo
save the following content:
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
2) Install the MongoDB packages
# yum install -y mongodb-org
or
To install a specific release of MongoDB, specify each component package individually
# yum install -y mongodb-org-4.0.5 mongodb-org-server-4.0.5 mongodb-org-shell-4.0.5 mongodb-org-mongos-4.0.5 mongodb-org-tools-4.0.5
Note: By default, MongoDB runs using the mongod user account and uses the following default directories:
/var/lib/mongo (the data directory)
/var/log/mongodb (the log directory)
[root@dgstby ~]# ls -lrt /var/log/mongodb/mongod.log
-rw-r----- 1 mongod mongod 4429 Jan 31 15:20 /var/log/mongodb/mongod.log
Start MongoDB
# service mongod start
Verify that MongoDB has started successfully
verify that the mongod process has started successfully by checking the contents of the log file at /var/log/mongodb/mongod.log
[initandlisten] waiting for connections on port <port>
where <port> is the port configured in /etc/mongod.conf, 27017 by default.
You can optionally ensure that MongoDB will start following a system reboot by issuing the following command:
# chkconfig mongod on
Stop MongoDB process
# service mongod stop
Restart the mongod process
# service mongod restart
Begin using MongoDB
# mongo
Reference: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
1) Configure the package management system (yum)
Create a /etc/yum.repos.d/mongodb-org-4.0.repo file so that you can install MongoDB directly using yum:
# vi /etc/yum.repos.d/mongodb-org-4.0.repo
save the following content:
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
2) Install the MongoDB packages
# yum install -y mongodb-org
or
To install a specific release of MongoDB, specify each component package individually
# yum install -y mongodb-org-4.0.5 mongodb-org-server-4.0.5 mongodb-org-shell-4.0.5 mongodb-org-mongos-4.0.5 mongodb-org-tools-4.0.5
Note: By default, MongoDB runs using the mongod user account and uses the following default directories:
/var/lib/mongo (the data directory)
/var/log/mongodb (the log directory)
[root@dgstby ~]# ls -lrt /var/log/mongodb/mongod.log
-rw-r----- 1 mongod mongod 4429 Jan 31 15:20 /var/log/mongodb/mongod.log
Start MongoDB
# service mongod start
Verify that MongoDB has started successfully
verify that the mongod process has started successfully by checking the contents of the log file at /var/log/mongodb/mongod.log
[initandlisten] waiting for connections on port <port>
where <port> is the port configured in /etc/mongod.conf, 27017 by default.
You can optionally ensure that MongoDB will start following a system reboot by issuing the following command:
# chkconfig mongod on
Stop MongoDB process
# service mongod stop
Restart the mongod process
# service mongod restart
Begin using MongoDB
# mongo
Installation of PostgreSQL Database on Oracle Linux 6
PostgreSQL Database installation on Oracle Enterprise Linux 6
Download link: https://www.postgresql.org/download/linux/redhat/
1) Select version: 9.5
2) Select platform: Oracle Enterprise Linux 6
3) Select architecture: x86_64
4) Install the repository RPM:
# yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg
oraclelinux95-9.5-3.noarch.rpm
5) Install the client packages:
# yum install postgresql95
6) Optionally install the server packages:
# yum install postgresql95-server
Optionally initialize the database and enable automatic start:
# service postgresql-9.5 initdb
# chkconfig postgresql-9.5 on
# service postgresql-9.5 start
Reference: https://www.postgresql.org/download/linux/redhat/
1) Select version: 11
2) Select platform: Oracle Enterprise Linux 6
3) Select architecture: x86_64
4) Install the repository RPM:
# yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6-x86_64/pgdg-oraclelinux11-11-2.noarch.rpm
5) Install the client packages:
# yum install postgresql11
6) Optionally install the server packages:
# yum install postgresql11-server
Optionally initialize the database and enable automatic start:
# service postgresql-11 initdb
# chkconfig postgresql-11 on
# service postgresql-11 starts
Download link: https://www.postgresql.org/download/linux/redhat/
1) Select version: 9.5
2) Select platform: Oracle Enterprise Linux 6
3) Select architecture: x86_64
4) Install the repository RPM:
# yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg
oraclelinux95-9.5-3.noarch.rpm
5) Install the client packages:
# yum install postgresql95
6) Optionally install the server packages:
# yum install postgresql95-server
Optionally initialize the database and enable automatic start:
# service postgresql-9.5 initdb
# chkconfig postgresql-9.5 on
# service postgresql-9.5 start
Reference: https://www.postgresql.org/download/linux/redhat/
1) Select version: 11
2) Select platform: Oracle Enterprise Linux 6
3) Select architecture: x86_64
4) Install the repository RPM:
# yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6-x86_64/pgdg-oraclelinux11-11-2.noarch.rpm
5) Install the client packages:
# yum install postgresql11
6) Optionally install the server packages:
# yum install postgresql11-server
Optionally initialize the database and enable automatic start:
# service postgresql-11 initdb
# chkconfig postgresql-11 on
# service postgresql-11 starts
Subscribe to:
Posts
(
Atom
)