Solaris10下安装MySQL-5.5.3-m3-更新.doc_第1页
Solaris10下安装MySQL-5.5.3-m3-更新.doc_第2页
Solaris10下安装MySQL-5.5.3-m3-更新.doc_第3页
Solaris10下安装MySQL-5.5.3-m3-更新.doc_第4页
Solaris10下安装MySQL-5.5.3-m3-更新.doc_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

rootcrbtshow-db1 r# prtconf |grep Mem -查看内存大小Memory size: 65312 Megabytes rootcrbtshow-db1 # swap -s总数:分配了 393088k 字节 + 保留 47920k = 已使用 441008k,72624296k 可用df -h rootcrbtshow-db1 # uname -aSunOS crbtshow-db1 5.10 Generic_141444-09 sun4v sparc SUNW,T5240rootcrbtshow-db1 # isainfo -kv64-bit sparcv9 kernel modules检查系统补丁rootcrbtshow-db1 # pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cssystem SUNWarc Lint Libraries (usr)system SUNWbtool CCS tools bundled with SunOSsystem SUNWhea SunOS Header Filessystem SUNWi1of ISO-8859-1 (Latin-1) Optional Fontssystem SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)system SUNWlibms Math & Microtasking Libraries (Usr)system SUNWsprot Solaris Bundled toolssystem SUNWtoo Programming Toolssystem SUNWxwfnt X Window System platform required fonts 错误: 未发现SUNWi1cs的信息错误: 未发现SUNWi15cs的信息挂载安装光盘的ISOrootcrbtshow-db1 # lofiadm -a /export/home/soft/SOL_10_1009_SPARC.iso /dev/lofi/1rootcrbtshow-db1 # mount -F hsfs /dev/lofi/1 /mntrootcrbtshow-db1 # ls /mntCopyright License boot platformJDS-THIRDPARTYLICENSEREADME Solaris_10 installerroottest # pkgadd -d /cdrom/sol_10_509_x86/Solaris_10/Product SUNWi1cs处理软件包范例来自X11 ISO8859-1 Codeset Support(i386) 2.0,REV=2005.04Copyright 2004 Sun Microsystems, Inc. All rights reserved.Use is subject to license terms.使用作为包的基本目录# 正在处理软件包信息.# 正在处理系统信息. 8软件包路径名已经正确地安装# 检查软件包的依赖性# 检查磁盘空间需求# 检查同已经安装的软件包之间的冲突.# 检查setuid/setgid程序。在这个软件包中包含了正文程序,只有具有超级-用户的权限才能在这个软件包的安装过程中执行它们.要继续安装 y,n,? y安装X11 ISO8859-1 Codeset Support成为#正在安装1部分- 1.232 块安装成功roottest # pkgadd -d /cdrom/sol_10_509_x86/Solaris_10/Product SUNWi15cs处理软件包范例来自X11 ISO8859-15 Codeset Support(i386) 2.0,REV=2005.04Copyright 2004 Sun Microsystems, Inc. All rights reserved.Use is subject to license terms.使用作为包的基本目录# 正在处理软件包信息.# 正在处理系统信息. 6软件包路径名已经正确地安装# 检查软件包的依赖性# 检查磁盘空间需求# 检查同已经安装的软件包之间的冲突.# 检查setuid/setgid程序。在这个软件包中包含了正文程序,只有具有超级-用户的权限才能在这个软件包的安装过程中执行它们.要继续安装 y,n,? y安装X11 ISO8859-15 Codeset Support成为#正在安装1部分- 1.1460 块安装成功修改/etc/ssh/sshd.config使其可以用root用户远程登录。roottest # umount /cdrom/sol_10_509_x86 卸载光驱将系统shell更改为bash。# which bashusr/bin/bash# usermod -s /usr/bin/bash root Solaris中设置环境变量和你当前采用的Shell有关,不同的Shell需要写入到不同的文件中如果按上面红色字体的方式改变了系统的shell,则使用下面2.(2),(6)中的环境变量设置方式。1. 下载mysql安装包,示例:wget /soft/linux/nginx_php/mysql/mysql-5.5.3-m3.tar.gz2. 安装依赖库(依赖包见E:软件工具mysqlmysql_pkg)gcc的安装方法:(1) 建立系统文件#cp /etc/skel/file /.profile(2) 在.profile中添加如下内容: PATH=/usr/bin:/usr/local/bin:/usr/local/lib:/usr/ucb:/etc:/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:. export PATH export PS1=u:w#(3) 从solaris 10安装光盘中安装如下工具包:# pkgadd d /cdrom/Solaris_10/Product SUNWwgetr# pkgadd d /cdrom/Solaris_10/Product SUNWwgetu# pkgadd d /cdrom/Solaris_10/Product SUNWwgetS# pkgadd d /cdrom/Solaris_10/Product SUNWgcmn(4) 下载gcc文件# wget /pub/freeware/intel/10/gcc-3.4.6-sol10-x86-local.gz# wget /pub/freeware/intel/10/libiconv-1.11-sol10-x86-local.gz# wget /pub/freeware/intel/10/libgcc-3.4.6-sol10-x86-local.gz# wget /pub/freeware/intel/10/libintl-3.4.0-sol10-x86-local.gz(5) 解压安装# gunzip gcc-3.4.6-sol10-x86-local.gz# gunzip libiconv-1.11-sol10-x86-local.gz# gunzip libgcc-3.4.6-sol10-x86-local.gz# gunzip libintl-3.4.0-sol10-x86-local.gz#pkgadd -d gcc-3.4.6-sol10-x86-local#pkgadd -d libiconv-1.11-sol10-x86-local.gz#pkgadd -d libgcc-3.4.6-sol10-x86-local.gz#pkgadd -d libintl-3.4.0-sol10-x86-local.gz(6) 修改.profile文件在 .profile文件中增加如下内容LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/libexport LD_LIBRARY_PATH (7) 把libstdc+.so.6、libg2c.so.0和libgcc_s.so.1从/usr/local/lib拷到/usr/lib(根据情况,后面的过程出现相关ERROR信息时才执行此步。)3. 安装MySQL-5.5.3-m3/创建mysql用户组#groupadd mysql/创建用户mysql和相关目录。# mkdir -p /data/mysqldata# mkdir -p /data/mysqldata/database# mkdir -p /data/mysqldata/log# mkdir -p /data/mysqldata/pid#mkdir p /data/mysqldata/innodbdata /要检查是否创建成功# useradd -g mysql -d /data/mysqldata/mysql -s /usr/bin/sh mysql/解压安装包#gunzip mysql-5.5.3-m3.tar.gz#tar xvf mysql-5.5.3-m3.tar/进入解压后的文件目录#cd mysql-5.5.3-m3/配置,退出,重新登录,使当前shell用到的文件与进行环境变量设置的文件一致#./configure -prefix=/usr/local/mysql -enable-assembler -enable-thread-safe-client -enable-local-infile -with-big-tables -with-readline -with-ssl -with-embedded-server -with-plugins=partition,innobase,myisammrg #必须有此行否则不能用后面的存储引擎。-with-extra-charsets=complex 或,优先使用:#CFLAGS=-O3 -march=pentiumpro CXX=gcc CXXFLAGS=-O3 -march=pentiumpro -felide-constructors ./configure -prefix=/usr/local/mysql -enable-assembler -with-extra-charsets=complex -enable-thread-safe-client -with-big-tables -with-readline -with-ssl -with-embedded-server -enable-local-infile -with-plugins=innobase -with-mysqld-ldflags=-all-static -localstatedir=/mysql/data -with-unix-socket-path=/mysql/tmp/mysql.sock -with-mysqld-user=mysql#如果需要安装federated存储引擎,则用下面选项。-with-federated-storage-engine /编译#make/安装#make install/设置配置文件,使MySQL程序可以从中读取启动选项。#cp support-files/f /etc/f(将mysql的启动服务添加到系统中)/如果想要配置为支持InnoDB表,应当编辑/etc/f文件,去掉innodb_.开始选项行前面的#符,并将选项值改为你想要的。/vi /etc/f# Example MySQL config file for medium systems.# This is for a system with little memory (32M - 64M) where MySQL plays# an important part, or systems up to 128M where MySQL is used together with# other programs (such as a web server)# You can copy this file to# /etc/f to set global options,# mysql-data-dir/f to set server-specific options (in this# installation this directory is /usr/local/mysql/var) or# /.f to set user-specific options.# In this file, you can use all long options that a program supports.# If you want to know which options a program supports, run the program# with the -help option.# The following options will be passed to all MySQL clientsclient#password = your_passwordport = 3306socket = /tmp/mysql.sock# Here follows entries for some specific programs# The MySQL servermysqldport = 3306socket = /tmp/mysql.sockbasedir = /usr/local/mysqldatadir = /data/mysqldata/databaselog-error = /data/mysqldata/log/mysql_error.logpid-file = /data/mysqldata/pid/mysql.pid#避免MySQL的外部锁定,减少出错几率,增强稳定性。#skip-lockingskip-external-locking#键值缓冲区,一般用来缓冲MyISAM表的索引块,key_buffer_size的最大允许值为4GB,通常为机器内存的25%。key_buffer_size = 64M#服务所能处理的请求包的最大大小,以及服务所能处理的最大请求大小。包消息缓冲区初始化为net_buffer_length字节,但需要时可以增长到max_allowed_packet字节。该值默认很小,以捕获大的(可能是错误的)数据包。#如果使用大的BLOB列或长字符串,则必须增加该值,应同想要使用的最大的BLOB一样大。Max_allow_packet的协议的限制值为1GB。max_allowed_packet = 1M#排序缓冲用来处理类似ORDER BY或GROUP BY队列所引起的排序操作,在排序发生时由每个线程分配。sort_buffer_size = 512K#在查询之间将通信缓冲区重设为该值。一般不需改变,如果内存很小,可将其设置为期望的客户端发送的SQL语句的长度,如果语句超出该长度,缓冲区自动扩大,知道max_allow_pocket字节。net_buffer_length = 8K#用来做MyISAM表全表扫描的缓冲大小。每个线程连续扫描时为扫描的每个表分配的缓冲区的大小(字节),如果进行多次连续扫描,可能需要增加该值。默认值为131072。read_buffer_size = 256K#在排序之后,从一个已经排序号的序列中读取行时,行数据将从这个缓冲区中来读取以防止磁盘寻道,避免搜索硬盘。将该变量设置为较大的值可以大大改进ORDER BY的性能,当需要时由每个线程分配。但是这个为每个客户端分配的缓冲区,因此不应将全局变量设置为较大的值,只为需要运行大查询的客户端更改会话变量。read_rnd_buffer_size = 512K#当MySQL需要在REPAIR,OPTIMIZE,ALTER以及LOAD DATA INFILE到一个空表中引起重建索引时分配的缓冲区。这在每个线程中被分配,所以在设置大值时需要小心。myisam_sort_buffer_size = 8M# Dont listen on a TCP/IP port at all. This can be a security enhancement,# if all processes that need to connect to mysqld run on the same host.# All interaction with mysqld must be made via Unix sockets or named pipes.# Note that using this option without enabling named pipes on Windows# (via the enable-named-pipe option) will render mysqld useless!#-skip-networking不帧听TCP/IP连接。#skip-networking# Replication Master Server (default)# binary logging is required for replication#二进制日志文件。将更改数据的所有查询记入该文件,用于备份和复制。#建议指定一个文件名,否则MySQL使用host_name-bin作为日志文件基本名。log-bin=mysql-bin# binary logging format - mixed recommendedbinlog_format=mixed# required unique id between 1 and 232 - 1# defaults to 1 if master-host is not set# but will not function as a master if omitted#唯一的服务辨识号,此值在master和slave上都需要设置。忽略此项,MySQL不会作为master生效。server-id = 1# Replication Slave (comment out master section to use this)# To configure this host as a replication slave, you can choose between# two methods :# 1) Use the CHANGE MASTER TO command (fully described in our manual) -# the syntax is:# CHANGE MASTER TO MASTER_HOST=, MASTER_PORT=,# MASTER_USER=, MASTER_PASSWORD= ;# where you replace , , by quoted strings and# by the masters port number (3306 by default).# Example:# CHANGE MASTER TO MASTER_HOST=125.564.12.1, MASTER_PORT=3306,# MASTER_USER=joe, MASTER_PASSWORD=secret;# OR# 2) Set the variables below. However, in case you choose this method, then# start replication for the first time (even unsuccessfully, for example# if you mistyped the password in master-password and the slave fails to# connect), the slave will create a file, and any later# change in this file to the variables values below will be ignored and# overridden by the content of the file, unless you shutdown# the slave server, delete and restart the slaver server.# For that reason, you may want to leave the lines below untouched# (commented) and instead use CHANGE MASTER TO (see above)# required unique id between 2 and 232 - 1# (and different from the master)# defaults to 2 if master-host is set# but will not function as a slave if omitted#server-id = 2# The replication master for this slave - required#master-host = # The username the slave will use for authentication when connecting# to the master - required#master-user = # The password the slave will authenticate with when connecting to# the master - required#master-password = # The port the master is listening on.# optional - defaults to 3306#master-port = # binary logging - not required for slaves, but recommended#log-bin=mysql-bin# Point the following paths to different dedicated disks#tmpdir = /tmp/#log-update = /path-to-dedicated-directory/hostname# Uncomment the following if you are using InnoDB tablesinnodb_data_home_dir = /data/mysqldata/innodbdatainnodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextendinnodb_log_group_home_dir =/data/mysqldata/innodbdata# innodb_log_arch_dir = /data/mysqldata/innodbdata 此行去掉。#加上时抛错:120331 11:12:08 ERROR /usr/local/mysql/libexec/mysqld: unknown variable # innodb_log_arch_dir=/data/mysqldata/innodbdata# You can set ._buffer_pool_size up to 50 - 80 %# of RAM but beware of setting memory usage too highinnodb_buffer_pool_size = 386Minnodb_additional_mem_pool_size = 20M# Set ._log_file_size to 25 % of buffer pool sizeinnodb_log_file_size = 64Minnodb_log_buffer_size = 8Minnodb_flush_log_at_trx_commit = 1innodb_lock_wait_timeout = 50mysqldump#不要在将内存中的整个结果写入磁盘之前缓存,在到处非常大的表时需要此项。quickmax_allowed_packet = 16Mmysqlno-auto-rehash# Remove the next comment character if you are not familiar with SQL#safe-updatesmyisamchkkey_buffer_

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论