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
======================================================================================
Subscribe to:
Posts (Atom)