Installing MongoDB on Ubuntu Linux

Installing MongoDB on Ubuntu Linux

Recently, I researched MongoDB and documented the installation process. Download link:Try MongoDB Community Edition[1] # Download wget https://repo.mongodb.org/apt/ubuntu/dists/jammy/mongodb-org/7.0/multiverse/binary-amd64/mongodb-org-server_7.0.2_amd64.deb # Install apt install mongodb-org-server_7.0.2_amd64.deb systemctl status mongod # Location of service and conf files # /lib/systemd/system/mongod.service # /usr/bin/mongod –config /etc/mongod.conf <span>Modify the configuration file:</span> vim /etc/mongod.conf dbPath: Specify the data storage path logging: Log path port: … Read more

Installing MongoDB on Linux

Installing MongoDB on Linux

Background Due to frequent crashes of the production server running under Docker, we decided to abandon Docker and directly install the necessary software. Today, we will implement the installation of MongoDB. System Version The command is as follows: lsb_release -a Download MongoDB You can click here to download. I chose the version shown in the … Read more

Summary of Common Methods for Connecting to Databases in Linux Systems

Summary of Common Methods for Connecting to Databases in Linux Systems

1. MySQL/MariaDB Connection 1. Command Line Connection mysql -u username -p -h host_address -P port Example: mysql -u root -p -h 127.0.0.1 -P 3306 Parameter Description: <span><span>-u</span></span>: Username <span><span>-p</span></span>: Interactive password input (no space after password) <span><span>-h</span></span>: Database server IP (default is localhost) <span><span>-P</span></span>: Port (default is 3306) 2. Operations After Connection SHOW DATABASES; — … Read more

Technical Route of C# Industrial IoT and Integration Systems Solutions

Technical Route of C# Industrial IoT and Integration Systems Solutions

Introduction After 2000, the internet has developed vigorously across China, and the competition in this industry is about speed. I clearly remember a passage in “The World is Flat”: In Africa, when an antelope wakes up every morning, it knows it must run faster than the fastest lion, or it will be eaten; the lion, … Read more

Database Installation and Upgrade: Migrating Data from MongoDB 6.0 to Older Versions

Database Installation and Upgrade: Migrating Data from MongoDB 6.0 to Older Versions

At the beginning of the year, Alibaba Cloud released a related announcement that MongoDB versions 3.0 and 3.2 have entered the mandatory EOFS phase.For those in the cloud, who hasn’t upgraded yet??? Alibaba Cloud’s announcement regarding MongoDB [Notice] MongoDB 3.0 and 3.2 version instances are scheduled to terminate service (EOS) on December 31. MongoDB 6.0 … Read more

Setting Up MongoDB 4 in a Linux Environment (PSA Architecture)

Setting Up MongoDB 4 in a Linux Environment (PSA Architecture)

This article mainly introduces the setup of MongoDB replica set mode in a Linux environment (one primary, one secondary, and one arbiter), including setup steps, primary-secondary switching, high availability testing, etc. Architecture Diagram One Primary, One Secondary, One Arbiter Environment Ubuntu 5.4.0-6ubuntu1~16.04.12 mongodb-linux-x86_64-ubuntu1604-4.2.8.tgz Steps Create Primary Node Create directories for data and logs # Primary … Read more

Crawling Zhihu’s ‘God Replies’ with Python: Can’t Stop Laughing

Crawling Zhihu's 'God Replies' with Python: Can't Stop Laughing

“ Zhihu often features many amusing “God replies” that are initially astonishing and leave a lasting impression upon reflection. This article will introduce how to crawl Zhihu’s God replies and reveal the principles behind it. What characteristics do Zhihu’s God replies have? Let’s observe the following images: Can you see any patterns? Are they concise … Read more

Deploying a Production-Level MongoDB Replica Set

Deploying a Production-Level MongoDB Replica Set

❝ Written by: Wanli Xing [email protected] Date: January 21, 2025 ❞ 「Environment Description」 Operating System: Anolis OS 8 Kernel: 4.18.0-477.13.1.0.1.an8.x86_64 MongoDB Version: 7.0.16 Dedicated User for Running Program: apprun (can be replaced as needed, the document includes user creation methods) Dedicated Directory for Running Program: /apprun (can be replaced as needed, ensure the directory ownership … Read more

How To Fix And Prevent Buffered Streams Deadlock

How To Fix And Prevent Buffered Streams Deadlock

How To Fix And Prevent Buffered Streams Deadlock Rust has eliminated various stupid bugs and traps that are common in other languages, making it easier to develop and maintain our projects. Unfortunately, when it comes to common problems in asynchronous programming, Rust is not inherently as strong. In fact, asynchronous programming in Rust is much … Read more

Why Eastern Airlines Chose MongoDB for Tech Selection

Why Eastern Airlines Chose MongoDB for Tech Selection

“ At this year’s MongoDB World W016 conference, Huang Chong from China Eastern Airlines shared practical experience in using MongoDB, introducing how Eastern Airlines combines Spark and MongoDB to solve the challenges they face, as well as the specific steps, which sparked heated discussions. Background Introduction The deputy manager of the PSS department of Eastern … Read more