NOSQL系列-memcached安装管理与repcached高可用性
Memcached:基于内存工作键值存储型数据库,可以作为应用-memcached缓存层-数据库。DangaInteractive公司开发,最初为了加速LiveJournal访问速度而开发的,后来
Memcached :基于内存工作键值存储型数据库,香港服务器租用,可以作为应用->memcached 缓存层->数据库。Danga Interactive公司开发,最初为了加速LiveJournal访问速度而开发的,后来成为广泛应用的开源项目。
一、实验环境
1.系统类型
[leo@h4 etc]$ cat issue
CentOS Linux release 6.0 (Final)
Kernel \r on an \m
2.系统位数
[leo@h4 桌面]$ getconf LONG_
32
Linux ISO:CentOS-6.0-i386-bin-DVD.iso 32位
JDK version:"1.6.0_25-ea"
虚拟机:Product VMware® Workstation Version 7.0.0 build-203739
3.CentOS需要能连入网络,这个比较简单,我们只需要设置菜单->系统->首选项->网络连接
打开网络连接
点击“编辑”,这是设置system eth0 网卡
选择IPv4设置->方法:自动(DHCP)[让系统动态分配ip即可]->应用,因为我在公司走的是路由器,所以选择自动分配IP比较方便
如果不是使用的root用户编辑的,会让你输入root用户密码,输入后点击“授权”即可
[root@h4 ~]# service network restart 重起网络服务
[root@h4 ~]# ifconfig 这回我们看到ip地址已经被自动分配了
eth0 Link encap:Ethernet HWaddr 00:0C:29:8B:7D:18
inet addr:192.168.2.107 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe8b:7d18/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8847 errors:0 dropped:0 overruns:0 frame:0
TX packets:2355 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6067491 (5.7 MiB) TX bytes:231934 (226.4 KiB)
Interrupt:19 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:704 (704.0 b) TX bytes:704 (704.0 b)
4.最最最重要的是设置VMware network“Bridged”桥接方式,才能连上物理网络哦
VMware菜单-> VM -> Settings –> 选择network Adapter
5.我们测试效果
看火狐浏览器中已经显示“楚汉传奇”的搜索结果了,我们伟大的上网了
哈 大家这个时候一定要坚持住啊,不要直接看电视剧去啦
恩 顺便推荐一下360搜索引擎,大家是否用过360搜索,效果比baidu 好些哦:)
下面我们转入正题
二、memcached安装管理
1.安装memcached包
我在网上看到很多人默认情况下yum不能安装
yum install memcached
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package memcached available.
Nothing to do
原因是:操作系统在安装的时候yum包没有安装上,所以就没有。你只能去下载一个yum包,自己手动安装上
解决方案:可以参考吴飚的“yum报错完美解决帖”
Linux ISO:CentOS-6.0-i386-bin-DVD.iso 32 如果你是安装这个版本的话,并且在选择组件的时候选择了yum组件那么现在可以直接yum install memcached,幸亏当初安装的时候抱着宁可错杀100也不放过1个心态,统统安装上了,现在可以直接使用啦!天灵灵 地灵灵 yumyum快显灵
[root@h4 ~]# yum install memcached
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirrors.btte.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package memcached.i686 0:1.4.4-3.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved 自动选择的版本1.4.4-3.el6,虚拟主机,现在最高版本1.4.15
================================================================================

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Memcached is a commonly used caching technology that can greatly improve the performance of web applications. In PHP, the commonly used Session processing method is to store the Session file on the server's hard disk. However, this method is not optimal because the server's hard disk will become one of the performance bottlenecks. The use of Memcached caching technology can optimize Session processing in PHP and improve the performance of Web applications. Session in PHP

Caching library in PHP8.0: Memcached With the rapid development of the Internet, modern applications require efficient and reliable caching technology to improve performance and handle large amounts of data. Due to PHP's popularity and open source nature, the PHP caching library has become an essential tool in the web development community. Memcached is a widely used open source high-speed memory caching system that can handle millions of simultaneous connected cache requests and can be used in many different types of applications, such as social networks, online

With the development of the Internet, PHP applications have become more and more common in the field of Internet applications. However, high concurrent access by PHP applications can lead to high CPU usage on the server, thus affecting the performance of the application. In order to optimize the performance of PHP applications, Memcached caching technology has become a good choice. This article will introduce how to use Memcached caching technology to optimize the CPU usage of PHP applications. Introduction to Memcached caching technology Memcached is a

With the rapid development of the Internet, large-scale MySQL database backup and recovery has become one of the essential skills for major enterprises and websites. With the widespread application of Memcached, how to back up and restore Memcached has also become an important issue. As one of the main languages for web development, PHP has unique advantages and skills in handling backup and recovery of MySQL and Memcached. This article will introduce in detail the implementation method of PHP processing MySQL and Memcached backup and recovery.

With the continuous increase of network applications and the continuous expansion of data volume, data reading and writing efficiency has become one of the important factors affecting application performance. The application of caching technology can solve this problem well. In PHP applications, Memcached is the most commonly used cache server. Memcached is a high-performance distributed memory object caching system that can store commonly used data in memory and improve the efficiency of data retrieval. This article will introduce how to use PHP and Memcached for cache management, and how to optimize

With the rapid development of modern Internet applications, user experience is crucial to the success of an application. How to ensure high performance and high availability of applications has become one of the important issues that developers need to solve. As one of the widely used programming languages, PHP's performance monitoring and optimization are also very important. Memcached is a high-performance, distributed memory object caching system that can help applications improve performance and scalability. This article will introduce how to use PHP and Memcached to implement performance monitoring.

With the continuous development of Internet technology, audio and video resources have become a very important form of content on the Internet, and PHP, as one of the most widely used languages in network development, is also constantly used in the field of video and audio playback. However, with the increasing number of users of audio and video websites, many websites have discovered a problem: under high concurrency conditions, PHP's processing speed of audio and video slows down significantly, resulting in problems such as inability to play in time or stuck playback. To solve this problem, Memcached caching technology should

With the rapid growth of modern applications, caching has become a vital part of many developers. Caching can greatly improve application performance and reduce server load. In CakePHP, one way to implement caching is to use Memcached. Memcached is a memory-based distributed caching system. It stores data in memory and can read and write data quickly. In a multi-server environment, Memcached can store data in a distributed manner and share it over the network. not only can
