Edukasi

Installing Percona Server for MongoDB on Red Hat Enterprise Linux and CentOS

Installing from Percona repositories

Percona repositories are managed using the percona-release tool. So in order to install Percona Server for MongoDB, install percona-release first

Configure Percona repository

  1. Install percona-release:
    $ sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
    

    Example of output

    Retrieving https://repo.percona.com/yum/percona-release-latest.noarch.rpm
    Preparing...                ########################################### [100%]
    1:percona-release        ########################################### [100%]
    

  2. Enable the repository:
    $ sudo percona-release enable psmdb-50 release
    

See also

More information about how to use the percona-release tool
https://www.percona.com/doc/percona-repo-config/index.html

Install the latest version

To install the latest version of Percona Server for MongoDB, use the following command:

$ sudo yum install percona-server-mongodb

Install a specific version

To install a specific version of Percona Server for MongoDB, do the following:

  1. List available versions:
    $ sudo yum list percona-server-mongodb --showduplicates
    

    Sample Output

        Available Packages
    percona-server-mongodb.x86_64    5.0.2-1.el8       psmdb-44-release-x86_64
    

  2. Install a specific version packages. For example, to install Percona Server for MongoDB 5.0.2-1, run the following command:
    $ sudo yum install percona-server-mongodb-5.0.2-1.el8
    

Running Percona Server for MongoDB

Note

If you are using SELinux in enforcing mode, you must customize your SELinux user policies to allow access to certain /sys and /proc files for OS-level statistics. Also, you must customize directory and port access policies if you are using non-default locations.

Please refer to Configure SELinux section of MongoDB Documentation for policy configuration guidelines.

Percona Server for MongoDB stores data files in /var/lib/mongodb/ by default. The configuration file is /etc/mongod.conf.

Starting the service

Percona Server for MongoDB is not started automatically after installation. Start it manually using the following command:

$ sudo systemctl start mongod

Confirming that service is running

Check the service status using the following command:

$ sudo systemctl status mongod

Stopping the service

Stop the service using the following command:

$ sudo systemctl stop mongod

Restarting the service

Restart the service using the following command:

$ sudo systemctl restart mongod

Running after reboot

The mongod service is not automatically started after you reboot the system.

You can enable it using the systemctl utility:

$ sudo systemctl enable mongod
ryan

Recent Posts

Jadwal Imsak dan Buka Puasa Ramadhan 2025 Kota Serang Selama Sebulan

Berikut jadwal imsak dan buka puasa Ramadhan 2025 di Kota Serang dari tanggal 1 Ramadhan -…

7 hari ago

Jadwal Resmi Awal Puasa Ramadan 2025 Pemerintah, NU, Muhammadiyah

Jakarta - Pemerintah telah menetapkan awal Ramadan 2025 berdasarkan hasil sidang isbat oleh Kemenag. Begitu pula dengan organisasi masyarakat…

1 minggu ago

Meta AI Ditanya Luas Kebakaran Los Angeles, Hasilnya Mengejutkan Sama dengan Luas Gaza

Siapa sangka, salah satu warganet justru mendapat informasi tak terduga yang berasal dari Meta AI.…

2 bulan ago

Tebak-tebakan pelesetan kata ini lucu abis, awas ketawa ngakak

Ketika menjalani rutinitas sehari-hari tentu saja kamu pernah merasa suntuk atau jenuh. Supaya kamu bisa…

2 bulan ago

Kapal China Diduga Biang Kerok Internet Mati Total di Berbagai Negara

Sebuah kapal kargo komersial China diduga sengaja menyeret jangkarnya untuk memotong kabel bawah laut yang…

3 bulan ago

Ini Sumber Kekayaan Nabi Sulaiman, Sungguh di Luar Dugaan

Nabi Sulaiman dikenal sebagai raja yang kaya raya. Para ilmuwan arkeologi kini mengungkap apa sumber kekayaannya,…

3 bulan ago