linux中Virtualmin安装配置教程linux操作系统

时间:2024年09月29日

/

来源:ecosway220

/

编辑:本站小编

收藏本文

下载本文

下面小编给大家整理了linux中Virtualmin安装配置教程linux操作系统,本文共8篇,供大家阅读参考。本文原稿由网友“ecosway220”提供。

篇1:linux中Virtualmin安装配置教程linux操作系统

我们在上篇文章已经安装Virtualmin的面板,下面我们就是开始进行最简单的配置过程,希望本文章对各位同学会带来帮助哦,

进入后台

你的IP地址或者是主机名:10000/

输入地址进入后是webmin的默认登录界面

帐号:root

密码:你的VPS的密码

进入后需要我们初始化Virtualmin

Introduction

提示一下内容:

This post-installation wizard allows you to configure Virtualmin optimally for your system. You can make selections depending on whether you want to host websites, email or databases, and based on your system's memory and CPU power.

To continue, click the Next button below. To skip it and use the default settings, click Cancel.

我们点击“next”进入下一步

Memory use

这里就是让我们选择是否使用Virtualmin libraries与邮件域名查询服务器,如果不需要默认就好了(默认是不使用的)

接着我们点击“next”

Virus scanning

这里是让我选择是否需要病毒扫描器,也是不需要的。如果你有特别需求可以开启的!

再次点击“next”

Spam filtering

SpamAssassin server是一个垃圾邮件过滤系统,看看你自己要不要搭建邮件服务器,搭建的还是有必要打开的!

依旧是“next”

Database servers

这里就是选择相应的数据库的时候了,其实也可以直接默认的,看看你需不需PostgreSQL数据库了,需要的就打开,不需要则点击“next”

MySQL password

这里就是至关重要的一步了,设置MySQL数据库的密码,

要记住,因为下面我们需要的!

输入要设置的Mysql的密码后,点击“next”

MySQL database size

这里就是让我们选择mysql数据库的占用大小,如果对mysql数据库没有特别大的需要,直接选择默认设置或者是256的那行!

选择好mysql数据库后点击“next”

最后一步就是设置“主域名服务器”,系统会对你设置的主域名服务器进行检查,这里我推荐直接在后面的“Skip check for resolvability”前方打上对勾就可跳过检查!

然后点击“next”进入下一步

最后一步就是选择密码的存储方式,我推荐选择webmin默认的,毕竟跟密码有关,所以还是选择强度大点的好!

我们已经配置好基本的设置,现在只需要点击“next”即可。

最后是我们选择相应的插件查看的两个页面,直接“next”就大功告成了!

让我们来看看virtualmin的界面:

从上面可以看出来,安装后近占用了少量的内存

篇2:linux中mySQL的安装和配置教程linux操作系统

在linux中安装程序与应用程序都不像windows那么方便可直接安装了,下面我来介绍linux中mySQL的安装和配置方法有需要的朋友可参考,

本文的Linux环境是 Red Hat 9.0,MySQL是4.0.16。

二、安装Mysql

1、下载MySQL的安装文件

安装MySQL需要下面两个文件:

MySQL-server-4.0.16-0.i386.rpm

MySQL-client-4.0.16-0.i386.rpm

下载地址为:www.mysql.com/downloads/mysql-4.0.html,打开此网页,下拉网页找到“Linux x86 RPM

downloads”项,找到“Server”和“Client programs”项

,下载需要的上述两个rpm文件。

2、安装MySQL

rpm文件是Red Hat公司开发的软件安装包,rpm可让Linux在安装软件包时免除许多复杂的手续。该命令在安装时

常用的参数是 –ivh ,其中i表示将安装指定的rmp软件包,V

表示安装时的详细信息,h表示在安装期间出现“#”符号来显示目前的安装过程。这个符号将持续到安装完成后才停

止。

1)安装服务器端

在有两个rmp文件的目录下运行如下命令:

[root@test1 local]# rpm -ivh MySQL-server-4.0.16-0.i386.rpm

显示如下信息。

warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5

Preparing… ########################################### [100%]

1:MySQL-server ########################################### [100%]

。。。。。。(省略显示)

/usr/bin/mysqladmin -u root password ‘new-password’

/usr/bin/mysqladmin -u root -h test1 password ‘new-password’

。。。。。。(省略显示)

Starting mysqld daemon with databases from /var/lib/mysql

如出现如上信息,服务端安装完毕。测试是否成功可运行netstat看Mysql端口是否打开,如打开表示服务已经启

动,安装成功。Mysql默认的端口是3306。

[root@test1 local]# netstat -nat

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local AddressForeign Address State

tcp 0 0 0.0.0.0:3306 0.0.0.0:*LISTEN

上面显示可以看出MySQL服务已经启动。

2)安装客户端

运行如下命令:

[root@test1 local]# rpm -ivh MySQL-client-4.0.16-0.i386.rpm

warning: MySQL-client-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5

Preparing… ########################################### [100%]

1:MySQL-client ########################################### [100%]

显示安装完毕。

用下面的命令连接mysql,测试是否成功。

三、登录MySQL

登录MySQL的命令是mysql, mysql 的使用语法如下:

mysql [-u username] [-h host] [-p[password]] [dbname]

username 与 password 分别是 MySQL 的用户名与密码,mysql的初始管理帐号是root,没有密码,注意:这个

root用户不是Linux的系统用户。MySQL默认用户是root,由于

初始没有密码,第一次进时只需键入mysql即可。

[root@test1 local]# mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 1 to server version: 4.0.16-standard

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

出现了“mysql>”提示符,恭喜你,安装成功!

增加了密码后的登录格式如下:

mysql -u root -p

Enter password: (输入密码)

其中-u后跟的是用户名,-p要求输入密码,回车后在输入密码处输入密码。

注意:这个mysql文件在/usr/bin目录下,与后面讲的启动文件/etc/init.d/mysql不是一个文件。

四、MySQL的几个重要目录

MySQL安装完成后不象SQL Server默认安装在一个目录,它的数据库文件、配置文件和命令文件分别在不同的目

录,了解这些目录非常重要,尤其对于Linux的初学者,因为

Linux本身的目录结构就比较复杂,如果搞不清楚MySQL的安装目录那就无从谈起深入学习。

下面就介绍一下这几个目录。

1、数据库目录

/var/lib/mysql/

2、配置文件

/usr/share/mysql(mysql.server命令及配置文件)

3、相关命令

/usr/bin(mysqladmin mysqldump等命令)

4、启动脚本

/etc/rc.d/init.d/(启动脚本文件mysql的目录)

五、修改登录密码

MySQL默认没有密码,安装完毕增加密码的重要性是不言而喻的。

1、命令

usr/bin/mysqladmin -u root password ‘new-password’

格式:mysqladmin -u用户名 -p旧密码 password 新密码

2、例子

例1:给root加个密码123456,

键入以下命令 :

[root@test1 local]# /usr/bin/mysqladmin -u root password 123456

注:因为开始时root没有密码,所以-p旧密码一项就可以省略了。

3、测试是否修改成功

1)不用密码登录

[root@test1 local]# mysql

ERROR 1045: Access denied for user: ‘root@localhost’ (Using password: NO)

显示错误,说明密码已经修改。

2)用修改后的密码登录

[root@test1 local]# mysql -u root -p

Enter password: (输入修改后的密码123456)

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 4 to server version: 4.0.16-standard

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

成功!

这是通过mysqladmin命令修改口令,也可通过修改库来更改口令。

六、启动与停止

1、启动

MySQL安装完成后启动文件mysql在/etc/init.d目录下,在需要启动时运行下面命令即可。

[root@test1 init.d]# /etc/init.d/mysql start

2、停止

/usr/bin/mysqladmin -u root -p shutdown

3、自动启动

1)察看mysql是否在自动启动列表中

[root@test1 local]# /sbin/chkconfig –list

2)把MySQL添加到你系统的启动服务组里面去

[root@test1 local]# /sbin/chkconfig – add mysql

3)把MySQL从启动服务组里面删除。

[root@test1 local]# /sbin/chkconfig – del mysql

七、更改MySQL目录

MySQL默认的数据文件存储目录为/var/lib/mysql。假如要把目录移到/home/data下需要进行下面几步:

1、home目录下建立data目录

cd /home

mkdir data

2、把MySQL服务进程停掉:

mysqladmin -u root -p shutdown

3、把/var/lib/mysql整个目录移到/home/data

mv /var/lib/mysql /home/data/

这样就把MySQL的数据文件移动到了/home/data/mysql下

4、找到my.cnf配置文件

如果/etc/目录下没有my.cnf配置文件,请到/usr/share/mysql/下找到*.cnf文件,拷贝其中一个到/etc/并改名

为my.cnf)中。命令如下:

[root@test1 mysql]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf

5、编辑MySQL的配置文件/etc/my.cnf

为保证MySQL能够正常工作,需要指明mysql.sock文件的产生位置。 修改socket=/var/lib/mysql/mysql.sock一

行中等号右边的值为:/home/mysql/mysql.sock 。操作如下

vi my.cnf (用vi工具编辑my.cnf文件,找到下列数据修改之)

# The MySQL server

[mysqld]

port = 3306

#socket = /var/lib/mysql/mysql.sock(原内容,为了更稳妥用“#”注释此行)

socket = /home/data/mysql/mysql.sock (加上此行)

6、修改MySQL启动脚本/etc/rc.d/init.d/mysql

最后,需要修改MySQL启动脚本/etc/rc.d/init.d/mysql,把其中datadir=/var/lib/mysql一行中,等号右边的

路径改成你现在的实际存放路径:home/data/mysql。

[root@test1 etc]# vi /etc/rc.d/init.d/mysql

#datadir=/var/lib/mysql (注释此行)

datadir=/home/data/mysql (加上此行)

7、重新启动MySQL服务

/etc/rc.d/init.d/mysql start

或用reboot命令重启Linux

增加MySQL用户

格式:grant select on 数据库.* to 用户名@登录主机 identified by “密码”

例1、增加一个用户user_1密码为123,让他可以在任何主机上登录,并对所有数据库有查询、插入、修改、删除的权

限。首先用以root用户连入MySQL,然后键入以下命令:

mysql>grant select,insert,update,delete on *.* to user_1@”%” Identified by “123″;

例1增加的用户是十分危险的,如果知道了user_1的密码,那么他就可以在网上的任何一台电脑上登录你的MySQL数据

库并对你的数据为所欲为了,解决办法见例2。

例2、增加一个用户user_2密码为123,让此用户只可以在localhost上登录,并可以对数据库aaa进行查询、插入、

修改、删除的操作(localhost指本地主机,即MySQL数据库所

在的那台主机),这样用户即使用知道user_2的密码,他也无法从网上直接访问数据库,只能通过 MYSQL主机来操作

aaa库。

mysql>grant select,insert,update,delete on aaa.* to user_2@localhost identified by “123″;

用新增的用户如果登录不了MySQL,在登录时用如下命令:

mysql -u user_1 -p -h 192.168.113.50 (-h后跟的是要登录主机的ip地址)

篇3:linux中redis安装配置linux操作系统

MySQL是关系型数据库,并不擅长分布式数据出路,因为它缺乏并行执行查询的能力,这时候,可以使用其他工具。如redis。

redis是非关系型数据库。Nosql的一个开源项目。对于简单的键值存储,在复制严重落后的非常高速的访问场景中可以使用redis替代mysql。

redis安装如下。

1、下载安装包,下载地址是servicestack。如我下载的版本是redis-2.0.2.rar。

2、解压文件到相应目录。可以看到解压后内有文件:

3、其中配置文件需要自己创建,现将源代码附在下面:

代码如下复制代码# Redis configuration file example

# By default Redis does not run as a daemon. Use 'yes' if you need it.

# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.

daemonize no

# When run as a daemon, Redis write a pid file in /var/run/redis.pid by default.

# You can specify a custom pid file location here.

pidfile /var/run/redis.pid

# Accept connections on the specified port, default is 6379

port 6379

# If you want you can bind a single interface, if the bind option is not

# specified all the interfaces will listen for connections.

#

# bind 127.0.0.1

# Close the connection after a client is idle for N seconds (0 to disable)

timeout 300

# Set server verbosity to 'debug'

# it can be one of:

# debug (a lot of information, useful for development/testing)

# notice (moderately verbose, what you want in production probably)

# warning (only very important / critical messages are logged)

loglevel debug

# Specify the log file name. Also 'stdout' can be used to force

# the demon to log on the standard output. Note that if you use standard

# output for logging but daemonize, logs will be sent to /dev/null

logfile stdout

# Set the number of databases. The default database is DB 0, you can select

# a different one on a per-connection basis using SELECT where

# dbid is a number between 0 and 'databases'-1

databases 16

################################ SNAPSHOTTING #################################

#

# Save the DB on disk:

#

#  save

#

#  Will save the DB if both the given number of seconds and the given

#  number of write operations against the DB occurred.

#

#  In the example below the behaviour will be to save:

#  after 900 sec (15 min) if at least 1 key changed

#  after 300 sec (5 min) if at least 10 keys changed

#  after 60 sec if at least 10000 keys changed

save 900 1

save 300 10

save 60 10000

# Compress string objects using LZF when dump .rdb databases?

# For default that's set to 'yes' as it's almost always a win.

# If you want to save some CPU in the saving child set it to 'no' but

# the dataset will likely be bigger if you have compressible values or keys.

rdbcompression yes

# The filename where to dump the DB

dbfilename dump.rdb

# For default save/load DB in/from the working directory

# Note that you must specify a directory not a file name.

dir ./

################################# REPLICATION #################################

# Master-Slave replication. Use slaveof to make a Redis instance a copy of

# another Redis server. Note that the configuration is local to the slave

# so for example it is possible to configure the slave to save the DB with a

# different interval, or to listen to another port, and so on.

#

# slaveof

# If the master is password protected (using the “requirepass” configuration

# directive below) it is possible to tell the slave to authenticate before

# starting the replication synchronization process, otherwise the master will

# refuse the slave request.

#

# masterauth

################################## SECURITY ###################################

# Require clients to issue AUTH

before processing any other

# commands. This might be useful in environments in which you do not trust

# others with access to the host running redis-server.

#

# This should stay commented out for backward compatibility and because most

# people do not need auth (e.g. they run their own servers).

#

# requirepass foobared

################################### LIMITS ####################################

# Set the max number of connected clients at the same time. By default there

# is no limit, and it's up to the number of file descriptors the Redis process

# is able to open. The special value '0' means no limts.

# Once the limit is reached Redis will close all the new connections sending

# an error 'max number of clients reached'.

#

# maxclients 128

# Don't use more memory than the specified amount of bytes.

# When the memory limit is reached Redis will try to remove keys with an

# EXPIRE set. It will try to start freeing keys that are going to expire

# in little time and preserve keys with a longer time to live.

# Redis will also try to remove objects from free lists if possible.

#

# If all this fails, Redis will start to reply with errors to commands

# that will use more memory, like SET, LPUSH, and so on, and will continue

# to reply to most read-only commands like GET.

#

# WARNING: maxmemory can be a good idea mainly if you want to use Redis as a

# 'state' server or cache, not as a real DB. When Redis is used as a real

# database the memory usage will grow over the weeks, it will be obvious if

# it is going to use too much memory in the long run, and you'll have the time

# to upgrade. With maxmemory after the limit is reached you'll start to get

# errors for write operations, and this may even lead to DB inconsistency.

#

# maxmemory

############################## APPEND ONLY MODE ###############################

# By default Redis asynchronously dumps the dataset on disk. If you can live

# with the idea that the latest records will be lost if something like a crash

# happens this is the preferred way to run Redis. If instead you care a lot

# about your data and don't want to that a single record can get lost you should

# enable the append only mode: when this mode is enabled Redis will append

# every write operation received in the file appendonly.log. This file will

# be read on startup in order to rebuild the full dataset in memory.

#

# Note that you can have both the async dumps and the append only file if you

# like (you have to comment the “save” statements above to disable the dumps).

# Still if append only mode is enabled Redis will load the data from the

# log file at startup ignoring the dump.rdb file.

#

# The name of the append only file is “appendonly.log”

#

# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append

# log file in background when it gets too big.

appendonly no

# The fsync call tells the Operating System to actually write data on disk

# instead to wait for more data in the output buffer. Some OS will really flush

# data on disk, some other OS will just try to do it ASAP.

#

# Redis supports three different modes:

#

# no: don't fsync, just let the OS flush the data when it wants. Faster.

# always: fsync after every write to the append only log . Slow, Safest.

# everysec: fsync only if one second passed since the last fsync. Compromise.

#

# The default is “always” that's the safer of the options. It's up to you to

# understand if you can relax this to “everysec” that will fsync every second

# or to “no” that will let the operating system flush the output buffer when

# it want, for better performances (but if you can live with the idea of

# some data loss consider the default persistence mode that's snapshotting).

appendfsync always

# appendfsync everysec

# appendfsync no

############################### ADVANCED CONFIG ###############################

# Glue small output buffers together in order to send small replies in a

# single TCP packet. Uses a bit more CPU but most of the times it is a win

# in terms of number of queries per second. Use 'yes' if unsure.

glueoutputbuf yes

# Use object sharing. Can save a lot of memory if you have many common

# string in your dataset, but performs lookups against the shared objects

# pool so it uses more CPU and can be a bit slower. Usually it's a good

# idea.

#

# When object sharing is enabled (shareobjects yes) you can use

# shareobjectspoolsize to control the size of the pool used in order to try

# object sharing. A bigger pool size will lead to better sharing capabilities.

# In general you want this value to be at least the double of the number of

# very common strings you have in your dataset.

#  www.111cn.net

# WARNING: object sharing is experimental, don't enable this feature

# in production before of Redis 1.0-stable. Still please try this feature in

# your development environment so that we can test it better.

# shareobjects no

# shareobjectspoolsize 1024

4、命令行进入安装目录下(或者配置环境变量),

如图,

5、另开一个cmd,输入redis_cli.exe -h 127.0.0.1 -p 6349。接下来,你就可以玩了。

篇4:ubuntu 安装配置 mysql 详解教程linux操作系统

ubuntu 安装配置 mysql 详解教程 有需要的同学可参考一下,

ubuntu 安装配置 mysql

安装MySQL

代码如下复制代码

sudo apt-get install mysql-server

设置Mysql中root用户的密码

默认的MySQL安装之后根用户没有密码:

mysql -u root一般来说,对mysql中的数据库进行操作,最好不要用根用户,只有在设置时才有这种可能。

代码如下复制代码

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '123456';

用root用户建立需要的数据库。以test为例:

代码如下复制代码

mysql>CREATE DATABASE test;

mysql>GRANT ALL PRIVILEGES ON test.* TO test_root@localhost IDENTIFIED BY “test_passed”;

这样就建立了一个test_roots用户,它对数据库test有着全部权限。以后就可以用test_root来对test数据库进行管理,而无需要root用户了,而该用户的权限也被限定在test数据库中,

在Ubuntu下MySQL缺省是只允许本地访问的,如果需要其他主机也能够远程访问,需要添加权限并修改my.cnf配置文件

一、

代码如下复制代码mysql>GRANT ALL PRIVILEGES ON test.* TO 'test_root'@'%' IDENTIFIED BY 'test_passwd';

允许test_root用户可以从任意主机登入该mysql Server,允许访问的数据库为test。

如果将“test.*”换为“.*.”,即为全部的数据库;如果将'%'换为相应主机名,只有该主机可以访问。

二、

1、编辑my.cnf,默认为/etc/mydql/my.cnf。

老版本中注释掉skip-networking,新版本中注释掉bind-address = 127.0.0.1或者修改为0.0.0.0(或本机IP)。

代码如下复制代码

# Instead of skip-networking the default is now to listen only on

# localhost which is more compatible and is not less secure.

# bind-address          = 127.0.0.12、重启mysql

sudo /etc/init.d/mysql restart

篇5:AMH 4.1 虚拟主机面板 安装配置教程linux操作系统

AMH是由Amysql自主开发的国产免费开源虚拟主机面板,基于Linux、Nginx、MySQL、PHP(LNMP)环境运行,同时具有SSH命令与Web端维护管理Nginx、MySQL、PHP、主机、FTP等,今天上了linux系统就准备直接使用它了,

一,下载amh

Amysql Host 官方:amysql.com/AMH.htm

AMH演示:72.46.130.140:8888/index.php?c=index&a=login

账号: amh,密码:amh_password

二、面板自带模块

AMH支持CentOS、DeBian、Ubuntu自适应安装,这里以AMH 4.1 标配为准。

Nginx 1.2.9 、MySQL 5.5.33 、PHP 5.3.27、PureFTPd 1.0.36

三、安装方法

请使用纯净的Linux系统,不要带任何其它服务,例如kloxo面板或自编译的其它程序。

1、使用root登陆SSH

2、下载AMH 4.1 官方安装包

wget amysql.com/file/AMH/4.1/amh.sh

以上资源来自AMH官方提供。

3、设置执行权限

chmod 775 amh.sh

SSH执行以上命令,修改执行权限。

4、开始安装

sh amh.sh

根据提示输入选择1~3选项,

1为安装amh,2为卸载amh,3为退出不做操作。如下图:

输入1回车,接着输入MySQL Root密码与AMH面板管理员密码即进入安装流程,如下图。

安装过程大约需10~20分钟(以服务器性能为准),最后如看到安装成功提示,说明系统已安装完成。

访问ip:8888 即可进入AMH web端管理,默认账号为admin。如下图

四、AMH面板 常用命令

以下命令适合在SSH中操作。

虚拟主机 : amh host

PHP管理 : amh php

Nginx管理 : amh nginx

MySQL管理 : amh mysql

FTP管理 : amh ftp

数据备份 : amh backup

一键还原 : amh revert

参数设置 : amh SetParam

模块扩展 : amh module

任务计划 : amh crontab

在线升级 : amh upgrade

面板信息 : amh info

五、AMH相关目录

网站目录 : /home/wwwroot

Nginx目录 : /usr/local/nginx

PHP目录 : /usr/local/php

MySQL目录 : /usr/local/mysql

MySQL数据目录 : /usr/local/mysql/data

篇6:linux中安装配置sphinx2步骤详解linux操作系统

Sphinx是一个基于SQL的全文检索引擎,可以结合MySQL,PostgreSQL做全文搜索,它可以提供比数据库本身更专业的搜索功能,使得应用程序更容易实现专业化的全文检索,Sphinx特别为一些脚本语言设计搜索API接口,如PHP,Python,Perl,Ruby等,同时为MySQL也设计了一个存储引擎插件

# 安装sphinx 2.x

代码如下复制代码

cd /home/addcn

wget sphinxsearch.com/files/sphinx-2.1.1-beta.tar.gz

tar xvf sphinx-2.1.1-beta.tar.gz

cd sphinx-2.1.1-beta

make clean

./configure –prefix=/usr/local/sphinx –with-mysql=/usr/local/mysql

make && make install

# 配置

cd /usr/local/sphinx/etc/

# 错误

export LD_LIBRARY_PATH=”/usr/local/mysq/lib:/usr/lib:$LD_LIBRARY_PATH”

# 启动

/usr/local/sphinx/bin/searchd –config /usr/local/sphinx/etc/sphinx.conf

# 停止

/usr/local/sphinx/bin/searchd –stop

# 登入

/usr/local/mysql/bin/mysql -P9306 –protocol TCP

# 更新

/usr/local/sphinx/bin/indexer –config /usr/local/sphinx/etc/sphinx.conf –all –rotate

# 关联为实时索引

TRUNCATE RTINDEX rt;

ATTACH INDEX disk TO RTINDEX rt;

安装好之后我们的php mysql全文搜索可能性能要提高几百倍或几万倍哦,

篇7:linux中配置安装redis方法介绍linux操作系统

今天想搞一下自己机器的性能所在要安装redis了,下面我把我安装redis方法与过程分享给各位同学,希望此方法对大家会有所帮助,

redis的安装不需要 ./configure, 这点比较好, 简单!

代码如下复制代码

#下载

wget redis.googlecode.com/files/redis-2.6.14.tar.gz

#解压

tar -zxvf redis-2.6.14.tar.gz

#拷贝到目标目录

mkdir -p /usr/local/redis

cp -r ./redis-2.6.14 /usr/local/redis

cd /usr/local/redis

#安装

make && make install

装好了之后,

./conf 配置文件

./src/redis-server redis 的server

./src/redis-client redis客户端

【改配置】

这个时候 redis 已经是可以启动了

界面比较的漂亮, 但是用起来不方便,我们需要把它改成后台运行的:

打开redis.conf 找到daemonize no 改为 daemonize yes 就OK了, 其他的配置先用默认的吧!

然后就可以启动了:

view sourceprint?

1 /usr/local/redis/src/redis-server /usr/local/redis/redis.conf

然后看一下redis的进程:

已经启动起来了, 用的默认的6379端口,

然后最好加一个开机启动动,在 /etc/rc.d/rc.local 最下边加一行刚才的启动命令, 这样就不会出出现忘记启动的意外了

【安装php扩展】

装过了其他的PHP扩展之后, 发现装php扩展是太简单了,每一个扩展, 只用 phpize && ./configure  && make && make install , 最后再改一下php.ini就OK了

代码如下复制代码

1 wget github.com/owlient/phpredis/archive/master.zip

2 unzip master.zip

3 /usr/local/php/bin/phpize

4 ./configure --with-php-config=/usr/local/php/bin/php-config

5 make && make install

然后在php.ini中加一行:

代码如下复制代码

[redis]

extension=redis.so

就OK了

这样PHP就可以使用 redis 相关的类了

性能

下面是官方的bench-mark数据:

测试完成了50个并发执行100000个请求。

设置和获取的值是一个256字节字符串。

Linux box是运行Linux 2.6,这是X3320 Xeon 2.5 ghz。

文本执行使用loopback接口(127.0.0.1)。

结果:写的速度是110000次/s,读的速度是81000次/s 。

篇8:linux中samba安装与配置方法linux操作系统

下在给大家介绍一篇关于linux中samba安装与配置方法,希望教程能给大家带来帮助,

一、安装及配置samba

代码如下复制代码

yum –y install samba* –skip-broken

vim /etc/samba/smb.conf

[web]

path=/usr/local/apache2/htdocs/

browseable=yes

writable=yes

二、创建用户并且acl权限配置

代码如下复制代码

1.useradd apache

2.setfacl -m u:apache:rwx -R /usr/local/apache2/htdocs

3.setfacl -m d:u:apache:rwx -R /usr/local/apache2/htdocs

三、修改apache进程执行者

代码如下复制代码1.vim /usr/local/apache2/etc/httpd.conf

User apache

Group apache

2./usr/local/apache2/bin/apachectl restart

3.ps –ef |grep httpd 查看httpd进程的执行者

四、创建samba用户

代码如下复制代码

smbpasswd -a apache

五、启动samba服务

代码如下复制代码

service smb restart

六、在windows中用”映射网络驱动器”挂载linux下网站根目录

1.我的电脑->工具->映射网络驱动器->设置共享文件夹

2.映射linux共享文件夹到windows下的Z盘:

192.168.0.200web 到Z盘

linux ftp服务器架设配置教程

Linux操作系统软件安装教程

Apple笔记本是否可以安装Windows操作系统?

配置htaccess文件比较重要的一些功能linux操作系统

oracle8i在redhat7.1~7.3下的安装数据库教程

下载linux中Virtualmin安装配置教程linux操作系统(共8篇)
linux中Virtualmin安装配置教程linux操作系统.doc
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档
点击下载本文文档