Wednesday, 28 April 2021
MongoB 4.2 and yii2 composer update
1. remove composer.lock and vender folder first.then update composer .
2. composer require yidas/yii2-bower-asset ececute given command .
mongo db 4.2 installation .
Remove mongodb
https://stackoverflow.com/questions/8766579/uninstalling-mongo
This should work
rpm -qa | less | grep mongo
using that command will give you the mongo packages you have installed, after that you can do
rpm -qa | less | grep mongo | xargs yum remove // <-- this will remove all packages automatically
==========================================================================================================================
Install mongodb
https://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-latest-mongodb-2-6-4-on-centos-7-rhel-7.html
==================================================================================================================================
=========================================================================================================================================
Install mongodb
https://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-latest-mongodb-2-6-4-on-centos-7-rhel-7.html
Prepare Replica set
===============
172.31.22.64 E-App-DB-03
172.31.22.65 E-App-DB-01
172.31.22.66 E-App-DB-02
172.31.22.233 CMS-01
rs.initiate( {
_id : "WAPRS01",
version: 1,
members: [
{ _id: 0, host: "E-App-DB-01:27017" },
{ _id: 1, host: "E-App-DB-02:27017" },
{ _id: 2, host: "E-App-DB-03:27017" }
]
})
rs.addArb("ip-172-20-2-169")
rs.initiate( {
_id : "WAPRS01",
version: 1,
members: [
{ _id: 0, host: "ip-172-20-2-240:27017" },
{ _id: 1, host: "ip-172-20-3-28:27017" },
{ _id: 2, host: "ip-172-20-2-169:27017" }
]
})
mongo --host 172.20.2.240
E-App-DB-01:27017 ,E-App-DB-02:27017,E-App-DB-03:27017 WAPRS01
E-App-DB-01:27017 ,E-App-DB-02:27017 WAPRS01
rs.addArb("E-App-DB-03")
172.31.22.65 E-App-DB-01
172.31.22.66 E-App-DB-02
WAPRS01
rs.remove("E-App-DB-03:27017")
rs.remove("mongod3.example.net")
rs.addArb("App-Node-02:27017")
rs.remove("App-Node-02:27017")
mongorestore --host 172.20.2.240 -d nexgtv_16 --port 27017 --verbose /home/centos/mongo_backups/nexgtv_whitelabel_elxire_AWS-2021-05-12-0200/nexgtv_16
mongorestore --host -d --port foldername
#mongodump -h 172.20.3.28 --port 27017 --db wowza --out /home/centos/mongo_backups/nexgtv_whitelabel_elxire_AWS/
mongodump -h 172.20.3.28 --port 27017 --db wowza --out /home/centos/mongo_backups/
scp -i Digi-OTT-key.pem subscriber.json centos@172.20.2.240:/home/centos/ (copy file on server to another)
rs.printSlaveReplicationInfo()
rs.status()
db.serverStatus().connections
mongostat
====================================================================================================
Install PHP 7.4.19
yum --enablerepo=remi-php74 install php74-php php74-php-pear php74-php-bcmath php74-php-pecl-jsond-devel php74-php-mysqlnd php74-php-gd php74-php-common php74-php-intl php74-php-cli php74-php php74-php-xml php74-php-opcache php74-php-pecl-apcu php74-php-pecl-jsond php74-php-pdo php74-php-gmp php74-php-process php74-php-pecl-imagick php74-php-devel php74-php-mbstring php74-php-soap php74-php-mcrypt php-mcrypt php-soap phpMyAdmin roundcubemail memcached php-pecl-memcached php74-php-pecl-memcached php-opcache php-redis redis php74-php-redis php74-php-zip php74-php-pspell php-brotli
rm -f /usr/bin/php
ln -s /usr/bin/php74 /usr/bin/php
rm -f /usr/lib/systemd/system/php-fpm.service
ln -s /usr/lib/systemd/system/php74-php-fpm.service /usr/lib/systemd/system/php-fpm.service
systemctl daemon-reload
yum install php-devel
pecl install mongodb
vi /etc/php.ini
extension=mongodb.so
vi /etc/opt/remi/php74/php.ini
=====================================nginx install==================================
sudo yum install epel-release
sudo yum install nginx
sudo systemctl start nginx
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
sudo systemctl enable nginx
======================================================================================
Monday, 15 February 2021
Mongodb3.4 installation
https://www.hugeserver.com/kb/install-mongodb-centos-6-7/
ION LOGIN
Tel: 1.888.842.8570E-mailLive Chat
Home
Dedicated Hosting
Dedicated Servers
Overview
Pricing
Los Angeles
Jacksonville
Meppel
Colocation
Overview
Custom Quote
Special Promotion
Virtual Hosting
Virtual Servers
Overview
Pricing
Hybrid Servers
Overview
Pricing
Virtualization
Solutions
Virtualization
Hardware Solutions
Software Solutions
Administration
Company
About Us
Company Overview
Our Team
Carriers
Blog
Contact
Partner Programs
Reseller Program
Referral
Datacenters
Overview
Los Angeles Datacenter
Jacksonville Datacenter
Meppel Datacenter
Why HugeServer
ION Platform
SLA Plus
Testimonials
Optimized Network
Knowledgebase
HugeServer Knowledgebase
HugeServer Knowledgebase > Linux > CentOS > Install MongoDB 3.4 on CentOS 6 and 7
Install MongoDB 3.4 on CentOS 6 and 7
on May 7, 2017 by AmirLeave a comment
Introduction
MongoDB is a scalable, high-performance, open source NoSQL database. The database is document-oriented so it manages collections of JSON-like documents. Many applications can thus model data in a more natural way, as data can be nested in complex hierarchies and still be queryable and indexable.
We are assuming that you have root permission, otherwise, you may start commands with “sudo”.
MongoDB Logo
Install MongoDB
For installing the latest stable version of MongoDB you should add MongoDB repository first.
Adding MongoDB Repository
Move to the following directory:
cd /etc/yum.repos.d/
Create the following file with your favorite text editor:
nano mongodb-org-3.4.repo
For the latest stable version of MongoDB paste the following line in the file then save and exit:
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
Installing MongoDB
Update your repositories list executing the following command:
yum repolist
Now you can install the latest stable version of MongoDB using “Yum”:
yum install mongodb-org -y
Configuring SELINUX
If you are using SELinux, you must configure SELinux to allow MongoDB to start on Red Hat Linux-based systems
If SELinux is in enforcing mode, enable access to the relevant ports that the MongoDB deployment will use (e.g. 27017).
semanage port -a -t mongod_port_t -p tcp 27017
Manage your MongoDB Service
You can manage your MongoDB service with “systemctl”:
For making MongoDB run at startup:
systemctl enable mongod
or
chkconfig mongod on
For Start/Stop MongoDB service:
systemctl start mongod
systemctl stop mongod
or
service mongod start
service mongod stop
See your MongoDB status:
systemctl status mongod
or
service mongod status
==========================================================================================================================================
===========================================================================================================================================
mongod.conf
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# where to write logging data.
systemLog:
destination: file
logAppend: false
path: /var/log/mongodb/mongod.log
# Where and how to store data.
storage:
dbPath: /var/lib/mongo
journal:
enabled: true
wiredTiger:
engineConfig:
cacheSizeGB: 5
journalCompressor: none
collectionConfig:
blockCompressor: snappy
indexConfig:
prefixCompression: true
# engine:
# mmapv1:
# wiredTiger:
# how the process runs
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
# network interfaces
net:
port: 27017
# bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces.
replication:
replSetName: WAPRS01
oplogSizeMB: 100
#security:
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options
#auditLog:
#snmp:
Subscribe to:
Posts (Atom)