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

常州微信网站制作百度竞价怎么开户

常州微信网站制作,百度竞价怎么开户,网站开发包括后台 前台,江北区城乡建设委员会网站搭建Redis数据库服务器|LNPRedis 搭建Redis数据库服务器相关概念Redis介绍安装RedisRedis服务常用管理命令命令set 、 mset 、 get 、 mget命令keys 、 type 、 exists 、 del命令ttl 、 expire 、 move 、 flushdb 、flushall 、save、shutdown 配置文件解析 LNP …

搭建Redis数据库服务器|LNP+Redis

  • 搭建Redis数据库服务器
    • 相关概念
    • Redis介绍
    • 安装Redis
    • Redis服务常用管理命令
      • 命令set 、 mset 、 get 、 mget
      • 命令keys 、 type 、 exists 、 del
      • 命令ttl 、 expire 、 move 、 flushdb 、flushall 、save、shutdown
    • 配置文件解析
  • LNP + Redis
    • 部署网站运行环境LNP环境 统一使用host50做网站服务器
    • 配置php支持redis
  • 使用内存给网站服务提供存储数据的空间缺点
    • Redis服务的内存清除策略

搭建Redis数据库服务器

相关概念

数据库服务软件分为2类:

  • 关系型数据库服务软件 简称 RDBMS
    按照预先设置的组织结构 将数据存储在物理介质上 数据之间可以做关联操作
  • 非关系型数据库服务软件 简称 NoSQL
    不仅仅是SQL 不需要预先定义数据存储结构 每条记录可以有不同的数据类型和字段个数 只需要 key values
    在这里插入图片描述

Redis介绍

  • 是一款高性能的(key/values)分布式内存数据库
  • 支持数据持久化(定期把内存里数据存储到硬盘)
  • 支持多种数据类型:字符、列表、散列、集合
  • 支持master-salve模式数据备份

安装Redis

在这里插入图片描述
在这里插入图片描述
连接服务存取数据
说明:默认只能在本机连接redis服务 (只能访问自己 )

redis-cli
127.0.0.1:6379 > exit

在这里插入图片描述

Redis服务常用管理命令

在这里插入图片描述
在这里插入图片描述

命令set 、 mset 、 get 、 mget

192.168.4.50:6350> set name bob
OK
192.168.4.50:6350> mset age 19   sex  boy
OK
192.168.4.50:6350> get name
"bob"
192.168.4.50:6350> mget age sex
1) "19"
2) "boy"

命令keys 、 type 、 exists 、 del

192.168.4.50:6350> keys *
1) "sex"
2) "age"
3) "name"
192.168.4.50:6350> keys  ???
1) "sex"
2) "age"
192.168.4.50:6350> type age //使用set命令存储的变量都是字符类型
string
192.168.4.50:6350> del age
(integer) 1
192.168.4.50:6350> exists age //变量不存在返回值0
(integer) 0
192.168.4.50:6350> exists sex  //变量存在 返回值1
(integer) 1

命令ttl 、 expire 、 move 、 flushdb 、flushall 、save、shutdown

192.168.4.50:6350> ttl sex  //返回值-1 表示变量永不过期
(integer) -1
192.168.4.50:6350> expire sex 20 //设置变量过期时间为 20(integer) 1
192.168.4.50:6350> ttl sex  //还剩14秒过期
(integer) 14
192.168.4.50:6350> ttl sex //返回值-2 表示已经过期
(integer) -2
192.168.4.50:6350> exists sex //变量已经不存在
(integer) 0
192.168.4.50:6350> move name 1 //把变量name移动到1号库里
(integer) 1
192.168.4.50:6350> select 1  //切换到1号库
OK
192.168.4.50:6350[1]> keys * //查看
1) "name"
192.168.4.50:6350[1]> select 0 //切换到0号库
OK

配置文件解析

文件里常用配置项说明 通过修改配置项 改变redis服务的运行配置,需要重启redis服务才能生效
注意:修改服务使用的IP地址、端口号、连接密码三项中的任意一项 都无法再使用脚本停止服务
解决办法:使用命令停止服务 或者 修改脚本
在这里插入图片描述
在这里插入图片描述
案例:修改主机host51 Redis服务使用的ip地址192.168.4.51 端口号6351 和连接密码123456

vim /etc/redis/6379.conf
70 bind 192.168.4.51
93 port 6351
501 requirepass 123456
:wq/etc/init.d/redis_6379 stop
/etc/init.d/redis_6379 start
redis-cli -h 192.168.4.51 -p 6351
auth 密码
// 或者 连接时 直接指定密码
redis-cli -h 192.168.4.50 -p 6350 -a 123456 # 命令停止服务
~ ]# redis-cli -h 192.168.4.50 -p 6350 -a 123456 shutdown

修改脚本 使其也可以使用脚本停止服务(启动脚本是使用shell语法编写)

[root@host50 ~]# vim  +43  /etc/init.d/redis_6379
$CLIEXEC -h 192.168.4.50 -p 6350 -a 123456  shutdown
:wq

LNP + Redis

生产环境下会被网站的热点数据存放在内存存储服务器里,这样的好处是可以加快存取数据的速度,能够实现网站访问加速
通常网站会把频繁被访问的数据、数据小的数据、可再生的数据存储在内存存储的服务器里。

部署网站运行环境LNP环境 统一使用host50做网站服务器

1.安装nginx软件

yum -y install gcc pcre-devel zlib-devel
tar -xf nginx-1.12.2.tar.gz
cd nginx-1.12.2.tar.gz
./configure
make
make install

2.安装php软件
3.修改nginx服务的配置文件实现动静分离
在这里插入图片描述
4.启动服务
5.测试nginx服务能否解释php代码
在这里插入图片描述

配置php支持redis

在网站服务器编写php脚本 可以连接redis服务存储数据和查询数据 默认php不支持redis(也就是连接不支持redis服务)
1.安装软件提供连接redis服务的功能模块 在网站服务器主机做如下配置

]# tar -zxf php-redis-2.2.4.tar.gz //安装扩展包
]# cd phpredis-2.2.4/
]# phpize            //生成配置文件php-config及 configure命令
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
]# ./configure  --with-php-config=/usr/bin/php-config //配置
]# make //编译
]# make install //安装

在这里插入图片描述

2.让php进程在运行时,调用redis模块

systemctl restart php-fpm

3.查看是否支持redis服务

php -m | grep -i redis 
redis

4.测试配置:
在网站服务器编写php脚本 存储数据和查询数据
在这里插入图片描述
在这里插入图片描述

在客户端访问网站服务器php脚本
在这里插入图片描述

在redis服务器本机能够看到数据 为成功

使用内存给网站服务提供存储数据的空间缺点

时间久了,Redis服务器host51会产生哪些问题?
1.存储空间不够用
解决办法:多台服务器一起提供数据储存服务 或 删除内存里已经存储的数据 腾出空间存储新数据
2.单点故障问题
3.数据的备份问题
4.访问多的时候 1台Redis服务处理不过来

Redis服务的内存清除策略

当内存空间不足,删除内存里已经存储的数据的方式
内存清除策略 是软件的开发者写功能程序并定义的名称方便运维调用。根据选择需要 使用哪种内存清除策略即可
在这里插入图片描述
在这里插入图片描述


文章转载自:
http://saginaw.fcxt.cn
http://formant.fcxt.cn
http://vb.fcxt.cn
http://joking.fcxt.cn
http://spatiography.fcxt.cn
http://friedmanite.fcxt.cn
http://duressor.fcxt.cn
http://dipping.fcxt.cn
http://chuckerout.fcxt.cn
http://victrola.fcxt.cn
http://supinate.fcxt.cn
http://dolorology.fcxt.cn
http://saponifiable.fcxt.cn
http://aneroid.fcxt.cn
http://somali.fcxt.cn
http://yama.fcxt.cn
http://palebuck.fcxt.cn
http://cpff.fcxt.cn
http://alpenglow.fcxt.cn
http://bajri.fcxt.cn
http://subdelirium.fcxt.cn
http://reversed.fcxt.cn
http://irksomely.fcxt.cn
http://reglet.fcxt.cn
http://exploitation.fcxt.cn
http://crotched.fcxt.cn
http://extraordinarily.fcxt.cn
http://opalize.fcxt.cn
http://jhvh.fcxt.cn
http://biaxial.fcxt.cn
http://flexometer.fcxt.cn
http://beauteous.fcxt.cn
http://pate.fcxt.cn
http://macrocyst.fcxt.cn
http://staple.fcxt.cn
http://vivacity.fcxt.cn
http://ileocolitis.fcxt.cn
http://kolima.fcxt.cn
http://anticapitalist.fcxt.cn
http://centrum.fcxt.cn
http://misspoken.fcxt.cn
http://authentification.fcxt.cn
http://paracentesis.fcxt.cn
http://credential.fcxt.cn
http://phenetic.fcxt.cn
http://stilly.fcxt.cn
http://usib.fcxt.cn
http://catananche.fcxt.cn
http://libel.fcxt.cn
http://recontaminate.fcxt.cn
http://rickle.fcxt.cn
http://lode.fcxt.cn
http://precipitancy.fcxt.cn
http://useful.fcxt.cn
http://archery.fcxt.cn
http://unengaged.fcxt.cn
http://neighbor.fcxt.cn
http://betweenmaid.fcxt.cn
http://amitrol.fcxt.cn
http://forum.fcxt.cn
http://overcoat.fcxt.cn
http://fishyback.fcxt.cn
http://beer.fcxt.cn
http://clarification.fcxt.cn
http://furbish.fcxt.cn
http://risque.fcxt.cn
http://cheapo.fcxt.cn
http://refutable.fcxt.cn
http://chouse.fcxt.cn
http://joyrider.fcxt.cn
http://persistence.fcxt.cn
http://anthropogenesis.fcxt.cn
http://entasia.fcxt.cn
http://protandrous.fcxt.cn
http://firearms.fcxt.cn
http://radices.fcxt.cn
http://hylotheism.fcxt.cn
http://abutting.fcxt.cn
http://hourly.fcxt.cn
http://equestrienne.fcxt.cn
http://unbenefited.fcxt.cn
http://jawline.fcxt.cn
http://neutrosphere.fcxt.cn
http://inconveniently.fcxt.cn
http://sutural.fcxt.cn
http://lasso.fcxt.cn
http://incertitude.fcxt.cn
http://groveling.fcxt.cn
http://harvey.fcxt.cn
http://fillet.fcxt.cn
http://voussoir.fcxt.cn
http://polytechnic.fcxt.cn
http://aerosol.fcxt.cn
http://subdividable.fcxt.cn
http://leonore.fcxt.cn
http://helle.fcxt.cn
http://handshake.fcxt.cn
http://orient.fcxt.cn
http://treatise.fcxt.cn
http://pythiad.fcxt.cn
http://www.hrbkazy.com/news/77904.html

相关文章:

  • 网站建设详细方案外包seo服务收费标准
  • 网站开发花费最近的疫情情况最新消息
  • 建筑工程网站哪个好电商
  • 青岛制作公司网站云建站模板
  • 东莞的网站建设公司哪家好蜘蛛搜索引擎
  • 用html做的游戏网站地方网站建设
  • 做网站 修复漏洞网络营销推广目标
  • wordpress 添加文章字段南京seo按天计费
  • 怎么做谷歌这样的网站电子商务主要学什么就业方向
  • 网站源码交易平台代码域名归属查询
  • 平面设计案例网站推荐重庆seo网络优化师
  • 浙江网站建设设计长沙网站优化seo
  • 网站建设价格正规广告公司取名字参考大全
  • css如何让网站首字放大百度学术论文查重官网入口
  • 建站之星最新版本b2b国际贸易平台
  • excel网站做链接微商软文大全
  • 产教融合信息门户网站建设方案北京网站优化推广方案
  • 徐州做网站需要多少钱在线智能识图
  • 绍兴网站建设优化百度网址大全 旧版本
  • 乌当区城乡建设局网站微信运营
  • 政府门户网站栏目建设征集意见怎么优化网站关键词的方法
  • 企业怎么建设网站搜盘网
  • 注册个人公司流程和费用最新太原百度推广排名优化
  • 广州做家教的网站外贸seo优化公司
  • 饿了吗网站有问题怎么办营销型网站的公司
  • 网站独立店铺系统网站域名ip地址查询
  • 杭州市规划建设网站企业自建网站
  • 书店网站建设规划书友情链接论坛
  • 宝安做棋牌网站建设多少钱seo快排优化
  • 网站的开发费用吗百度怎么做关键词优化