mkdir test-mongodb && cd test-mongo-db npm init
npm install mongodb
Just in case, the script is running under node.js version 20.15 and mongodb module version 6.8 (current on moment of writing). To check the versions:
(more…)MariaDB/MySql, MongoDB installation, configuration and access from PHP, Python, and Node.js.
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
echo "deb [ arch=arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list sudo apt-get update
sudo apt-get install -y mongodb-org
sudo chown mongodb:mongodb /var/log/mongodb/ sudo chown mongodb:mongodb /var/lib/mongodb/
sudo systemctl enable mongod sudo systemctl start mongod sudo systemctl status mongod
Install PECL
sudo apt install php-pear phpX.X-dev # X.X is PHP verion used
sudo pecl install mongodb # the system could require to update PECL # sudo pecl channel-update pecl.php.net(more…)
Install the latest available version of PostreSQL (any other required using postgresql-VERSION)
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' wget --quiet -O - https:# Import the repository signing key: sudo apt install curl ca-certificates sudo install -d /usr/share/postgresql-common/pgdg sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc # Create the repository configuration file: sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' # Update the package lists: sudo apt update # Install the latest version of PostgreSQL: # If you want a specific version, use 'postgresql-16' or similar instead of 'postgresql' sudo apt -y install postgresql//www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt update sudo apt install postgresql(more…)
(more…)
Rule #1: “Do not fix, if it’s not broken”
I’ve had version phpMyAdmin 5.0.2 since 2020 without any problem (PHP 7.+, 8.0) until I decided to look at PHP 8.1. Number of “Deprecated” messages from twig/twig package just killed the system, and Composer failed to update outdated packages.
Rule #2 extends #1: If you do not have a VERY GOOD REASON to use PHP 8.1, stay with the current version
Make sure you have the latest version of pip
python3 -m pip install --upgrade pip
Create the virtual environment
python3 -m venv pgadmin4(more…)