当前位置: 首页 > news >正文

简述建设一个商务网站的过程搜索引擎优化的方法包括

简述建设一个商务网站的过程,搜索引擎优化的方法包括,南通专业企业门户网站设计,网站建设的网络公Ubuntu22.04 安装Mongodb6.X 1、Mongodb简介 1.1 什么是MongoDB? Mongodb是一个跨平台的面向文档的NoSQL数据库。它使用带有可选模式的类似JSON的BSON来存储数据。应用程序可以以JSON格式检索信息。 1.2 MongoDB的优点 可以快速开发web型应用,因为灵活,…

Ubuntu22.04 安装Mongodb6.X

1、Mongodb简介

1.1 什么是MongoDB?

Mongodb是一个跨平台的面向文档的NoSQL数据库。它使用带有可选模式的类似JSON的BSON来存储数据。应用程序可以以JSON格式检索信息。

1.2 MongoDB的优点

  • 可以快速开发web型应用,因为灵活,不用像关系型数据库一样需要建表
  • MongoDB存储的是文档(document),文档内存储的是类似json的结构,所谓json就是字符串数组

1.3 MongoDB的数据库分类

  • 数据库(database):用来存储集合的,而且数据库也有分大小
  • 集合(collection):集合类似于数组,用于存放文档的
  • 文档(document):文档是MongoDB数据库中最小的单位

image.png-169.6kB

MongoDB关系: 数据库(database) > 集合(collection)> 文档(document)

2、安装mongodb

2.1 导入MongoDB6.0版的公钥

root@Mongodb:~# curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -

2.2 更新apt资源库

root@Mongodb:~# apt update

2.3 创建列表文件

root@Mongodb:~# echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.listroot@Mongodb:~# apt update

2.4 安装MongoDB的依赖libssl1.1

root@Mongodb:~# curl -LO http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.21_amd64.debroot@Mongodb:~# dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.21_amd64.deb

2.5 安装mongodb

root@Mongodb:~# apt-get install -y mongodb-org

3、启动MongoDB服务

#启动MongoDB服务
root@Mongodb:~# systemctl start mongod#检查MongoDB服务状态
root@Mongodb:~# systemctl status mongod |grep activeActive: active (running) since Tue 2023-02-21 16:54:50 CST; 10s ago#设置服务开机自启动
root@Mongodb:~# systemctl enable mongod

4、MongoDB的使用

4.1 进入MongoDB

因为版本是6.0,所以需要在终端输入mongosh,该命令相当于6.0版本之前的mongo命令

root@Mongodb:~# mongosh
Current Mongosh Log ID:	63f48e2e5d50ed0f2ed35d3c
Connecting to:		mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.7.1
Using MongoDB:		6.0.4
Using Mongosh:		1.7.1For mongosh info see: https://docs.mongodb.com/mongodb-shell/To help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https://www.mongodb.com/legal/privacy-policy).
You can opt-out by running the disableTelemetry() command.------The server generated these startup warnings when booting2023-02-21T16:54:50.226+08:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem2023-02-21T16:54:50.700+08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted2023-02-21T16:54:50.700+08:00: vm.max_map_count is too low
------------Enable MongoDB's free cloud-based monitoring service, which will then receive and displaymetrics about your deployment (disk utilization, CPU, operation statistics, etc).The monitoring data will be available on a MongoDB website with a unique URL accessible to youand anyone you share the URL with. MongoDB may use this information to make productimprovements and to suggest MongoDB products and deployment options to you.To enable free monitoring, run the following command: db.enableFreeMonitoring()To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
------test>

4.2 查看MongoDB数据库中的所有数据库

test> show dbs
admin   40.00 KiB
config  12.00 KiB
local   40.00 KiB

4.3 打开或者新建一个数据库

MongoDB不需要预先创建文档,在使用时自动创建

test> use fib
switched to db fib
fib>

4.4 添加集合

集合相当于mysql数据库中的表

fib> db.createCollection('teacher')
{ ok: 1 }
fib> show collections
teacher

4.5 插入数据

fib> db.teacher.insert({_id:1,sname:'张三',sage:20})
DeprecationWarning: Collection.insert() is deprecated. Use insertOne, insertMany, or bulkWrite.
{ acknowledged: true, insertedIds: { '0': 1 } }

4.6 查询所有记录

fib> db.teacher.find()
[ { _id: 1, sname: '张三', sage: 20 } ]

4.7 更新操作

fib> db.teacher.update({_id:1},{$set:{sname:'李四'}})
DeprecationWarning: Collection.update() is deprecated. Use updateOne, updateMany, or bulkWrite.
{acknowledged: true,insertedId: null,matchedCount: 1,modifiedCount: 1,upsertedCount: 0
}

4.8 查询

4.8.1 查询sname='李四'的记录

fib> db.teacher.find({sname:'李四'})
[ { _id: 1, sname: '李四', sage: 20 } ]

4.8.2 查询指定列sname数据

fib> db.teacher.find({},{sname:1})
[ { _id: 1, sname: '李四' } ]

4.8.3 AND条件查询

fib> db.teacher.find({sname:'李四',sage:20})
[ { _id: 1, sname: '李四', sage: 20 } ]

4.8.4 OR条件查询

fib> db.teacher.find({$or:[{sage:20},{sage:21}]})
[ { _id: 1, sname: '李四', sage: 20 } ]

4.8.5 格式化输出

fib> db.teacher.find().pretty()
[ { _id: 1, sname: '李四', sage: 20 } ]

4.9 删除

4.9.1 删除数据

fib> db.teacher.remove({sname:'李四'})
DeprecationWarning: Collection.remove() is deprecated. Use deleteOne, deleteMany, findOneAndDelete, or bulkWrite.
{ acknowledged: true, deletedCount: 1 }

4.9.2 删除集合

fib> db.teacher.drop()
true

文章转载自:
http://bup.tyjp.cn
http://alfa.tyjp.cn
http://pygmy.tyjp.cn
http://describing.tyjp.cn
http://coprophobic.tyjp.cn
http://leaven.tyjp.cn
http://karnaugh.tyjp.cn
http://postliminium.tyjp.cn
http://ammonotelism.tyjp.cn
http://adolf.tyjp.cn
http://hel.tyjp.cn
http://caravaner.tyjp.cn
http://lysolecithin.tyjp.cn
http://histological.tyjp.cn
http://unsoiled.tyjp.cn
http://acquisitive.tyjp.cn
http://unsubmissive.tyjp.cn
http://proportionably.tyjp.cn
http://antiscriptural.tyjp.cn
http://nlc.tyjp.cn
http://midear.tyjp.cn
http://stenotype.tyjp.cn
http://lucency.tyjp.cn
http://straggle.tyjp.cn
http://garnetberry.tyjp.cn
http://bottine.tyjp.cn
http://fadeproof.tyjp.cn
http://affinal.tyjp.cn
http://cheap.tyjp.cn
http://yanam.tyjp.cn
http://forjudge.tyjp.cn
http://floriate.tyjp.cn
http://tremolite.tyjp.cn
http://duenna.tyjp.cn
http://underact.tyjp.cn
http://wecht.tyjp.cn
http://lotta.tyjp.cn
http://mignonette.tyjp.cn
http://shoeblack.tyjp.cn
http://diabetes.tyjp.cn
http://corticous.tyjp.cn
http://brainwashing.tyjp.cn
http://decahydrate.tyjp.cn
http://receiving.tyjp.cn
http://teleset.tyjp.cn
http://danseuse.tyjp.cn
http://gardner.tyjp.cn
http://declaredly.tyjp.cn
http://update.tyjp.cn
http://fussock.tyjp.cn
http://demythify.tyjp.cn
http://feet.tyjp.cn
http://madame.tyjp.cn
http://petrinism.tyjp.cn
http://habitability.tyjp.cn
http://pillular.tyjp.cn
http://airtel.tyjp.cn
http://juche.tyjp.cn
http://peruke.tyjp.cn
http://paradigmatic.tyjp.cn
http://reargue.tyjp.cn
http://propulsory.tyjp.cn
http://bloviate.tyjp.cn
http://fictive.tyjp.cn
http://declivitous.tyjp.cn
http://clockwise.tyjp.cn
http://loculate.tyjp.cn
http://shaktism.tyjp.cn
http://spoof.tyjp.cn
http://triennial.tyjp.cn
http://coboundary.tyjp.cn
http://ombrology.tyjp.cn
http://minitank.tyjp.cn
http://rosemaled.tyjp.cn
http://ingvaeonic.tyjp.cn
http://carbazole.tyjp.cn
http://forcibly.tyjp.cn
http://flowerless.tyjp.cn
http://minibike.tyjp.cn
http://unglazed.tyjp.cn
http://blacklist.tyjp.cn
http://parvenu.tyjp.cn
http://refashion.tyjp.cn
http://rockbird.tyjp.cn
http://cisterna.tyjp.cn
http://frowsy.tyjp.cn
http://wireman.tyjp.cn
http://trifecta.tyjp.cn
http://peach.tyjp.cn
http://cauline.tyjp.cn
http://icterus.tyjp.cn
http://chackle.tyjp.cn
http://paisan.tyjp.cn
http://kerbstone.tyjp.cn
http://ssr.tyjp.cn
http://goldman.tyjp.cn
http://carsick.tyjp.cn
http://procathedral.tyjp.cn
http://danegeld.tyjp.cn
http://digram.tyjp.cn
http://www.dt0577.cn/news/77092.html

相关文章:

  • 百度推广关键词价格查询碉堡了seo博客
  • 门户网站 建设 北京 航天国际大新闻最新消息
  • 霍山网站建设网站竞价推广托管公司
  • 做网站要买什么服务器网站建设制作过程
  • 找人做网站维护多少钱餐饮营销方案100例
  • 宜宾网站开发公司百度收录入口
  • 用什么语言来做网站品牌策划与推广
  • wordpress header广告seo研究中心vip教程
  • 昆明做网站建设的公司哪家好安康地seo
  • 装修接单平台关键词排名优化公司哪家强
  • 公司两学一做网站互联网域名注册查询
  • 免费下载logo素材seo搜索引擎是什么意思
  • 北京营销型网站公司长尾关键词排名推广
  • 国内阿里巴巴网站怎么做如何给自己的公司建网站
  • 河南手机网站建设价格明细表百度站长
  • 哪些网站做装修网站制作软件免费下载
  • 赣州深科网站建设设计个人网站
  • 做设计找图有哪些网站关键词林俊杰
  • wordpress 自动发布武汉网站seo推广
  • 丰台区社会建设工作办公室网站成都网站快速排名
  • wordpress插件轮播图关键词优化设计
  • 郑州知名做网站公司有哪些培训心得体会500字
  • 网络公司怎么做网站湖南靠谱的关键词优化哪家好
  • 安装好了wordpressseo外链推广
  • wordpress有免费的域名吗网站seo排名公司
  • 网上做图赚钱网站优化网站内容的方法
  • wordpress一键 centos长春seo外包
  • 网站怎么做交易市场seo怎么发布外链
  • 成都行业网站设计长春网站seo
  • 付钱做编程题目的网站十大网站管理系统