用Linux下的LVS软件实现Linux集群.doc
上传人:sy****28 上传时间:2024-09-13 格式:DOC 页数:8 大小:85KB 金币:16 举报 版权申诉
预览加载中,请您耐心等待几秒...

用Linux下的LVS软件实现Linux集群.doc

用Linux下的LVS软件实现Linux集群.doc

预览

在线预览结束,喜欢就下载吧,查找使用更方便

16 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

mysql-5.1.40-linux-i686-glibc23.tar.gz安装笔记:1.首先添加mysql用户组Shell代码shell>groupaddmysqlshell>groupaddmysql2.添加mysql用户,并指定到mysql用户组Shell代码shell>useradd-gmysqlmysqlshell>useradd-gmysqlmysql3.解压缩mysql-version.tar.gz到安装目录(/usr/local/)Shell代码shell>cd/usr/localshell>gunzip</path/to/mysql-VERSION-OS.tar.gz|tarxvf-shell>cd/usr/localshell>gunzip</path/to/mysql-VERSION-OS.tar.gz|tarxvf-4.为创建mysql软连接mysql-VERSION-OSShell代码shell>ln-sfull-path-to-mysql-VERSION-OSmysqlshell>cdmysqlshell>ln-sfull-path-to-mysql-VERSION-OSmysqlshell>cdmysql5.设定mysql安装目录权限,设置owner为mysqlShell代码shell>chown-Rmysql.shell>chown-Rmysql.6.执行mysql系统数据库初始化脚本Shell代码shell>scripts/mysql_install_db--user=mysqlshell>scripts/mysql_install_db--user=mysql7.设定data目录权限,分配给mysql用户,为了mysql程序能读写data目录下的文件Shell代码shell>chown-Rmysqldatashell>chown-Rmysqldata8.使用mysql帐号启动mysql应用Shell代码shell>bin/mysqld_safe--user=mysql&shell>bin/mysqld_safe--user=mysql&9.设置root密码Shell代码shell>bin/mysqladmin-urootpassword'123123'shell>bin/mysqladmin-urootpassword'123123'10.登录mysqlShell代码shell>bin/mysql-uroot-pEnterpassword:shell>bin/mysql-uroot-pEnterpassword:登录成功会看到:Shell代码WelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidis229Serverversion:5.1.40-logMySQLCommunityServer(GPL)Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.mysql>WelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidis229Serverversion:5.1.40-logMySQLCommunityServer(GPL)Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.mysql>这时mysql已经装好了,可以查看数据库了,但在正式使用数据库开发与部署的时候还需要做一些工作:1.设定配置文件my.cnf按照需求copymy-***.cnf到/etc/my.cnf2.修改默认字符集utf8(1).[client]下加入default-character-set=utf8(2).[mysqld]下加入default-character-set=utf83.设置默认存储引擎mysqlforlinux的版本默认使用的数据库引擎是MyISAM,但只有InnoDB引擎支持事务,所以需要修改配置:(1).[mysqld]下加入default-storage-engine=INNODB4.配置innodb参数(1).找到#UncommentthefollowingifyouareusingInnoDBtables去掉innodb_*下的所有#(2).如果安装mysql的目录不是默认的,则需要修改#mysql默认安装目录为/usr/local/mysql/#mysql默认表