Web development basic and advance tutorial, php basic tutorial, laravel basic tutorial, React Native tutorial

Monday, September 5, 2022

VPS Server cwp7 Cpanel, php, mysql, mongodb install

0 comments

 VPS Server cwp7 Cpanel, php, mysql install 


First of all you need to download putty from google.com

then login to the putty with server ip and port 
then enter login after login

yum -y install wget

yum -y update

reboot

After finish this commend run this command to install cpanel free.

cd /usr/local/src
wget http://centos-webpanel.com/cwp-latest
sh cwp-latest

Mongodb install go to the sql service and then select the mongodb manager


after install you can see like this screen


after login to putty with IP and login user name and password

then check the mongodb status with this command in putty

systemctl status mongod

For Creating Mongodb Database from putty :

 


Mongodb Tutorial


Create Mongodb Database follow the step :

1. login to the putty with email and password
2. write "mongo" press enter
3. then write ..... show dbs this means that it will show you how many databases is in ur server
4. for creating database "Use freelessondb" then press enter
5. then create one collection  like this " db.createCollection("contact");
6. then written this command again show dbs


Check the mongodb status in server 

writen this command ... sudo service mongod status

for start the server use .... sudo service mongod start



MongoDB Create Administrator User

Creating a user administrator in MongoDB is done by using the createUser method. The following example shows how this can be done.

db.createUser(
{	user: "Guru99",
	pwd: "password",

	roles:[{role: "userAdminAnyDatabase" , db:"admin"}]})


No comments:

Post a Comment