• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

在solrais下编译安装MySQL

发布: 2007-7-02 11:08 | 作者: admin | 来源: | 查看: 12次 | 进入软件测试论坛讨论

领测软件测试网 很多朋友在sun下编译mysql都会有些问题,现在我把编译过程整理如下,希望对大家有所帮助。
环境:
sun250+solaris8
过程:
首先要安装solaris8的编译环境,去http://www.sunfreeware.com/下载一下软件:
1.autoconf-2.13-sol8-sparc-local.gz
2.automake-1.4-sol8-sparc-local.gz
3.bison-1.28-sol8-sparc-local.gz
4.gcc-2.95.3-sol8-sparc-local.gz
5.gzip-1.3-sol8-sparc-local
6.make-3.79.1-sol8-sparc-local.gz
去www.gnu.org下载gnu_tar,最新的版本是tar-1.13.tar.gz
设置环境变量,编译过程需要用到sun的一些命令,但是这些命令默认是不在你的PATH里的所以需要我们手工添加,我用的是bash所以修改root用户的.bash_profile中的PATH为
PATH=/usr/local/sbin:/usr/local/bin:/usr/ccs/bin:/usr/sbin:/sbin:$PATH:$HOME/bin:/usr/local/mysql/bin:
退出重新登录使变量生效,按照下列步骤安装软件:
1.pkgadd -d gzip-1.3-sol8-sparc-local
2.gunzip autoconf-2.13-sol8-sparc-local.gz
3.gunzip automake-1.4-sol8-sparc-local.gz
4.gunzip gcc-2.95.3-sol8-sparc-local.gz
5 gunzip bison-1.28-sol8-sparc-local.gz
6.pkgadd -d autoconf-2.13-sol8-sparc-local
7.pkgadd -d automake-1.4-sol8-sparc-local
8.pkgadd -d gcc-2.95.3-sol8-sparc-local
9.pkgadd -d make-3.79.1-sol8-sparc-local
10.gunzip tar-1.13.tar.gz
11.tar xvf tar-1.13.tar
12.cd tar-1.13
13../configure --prefix=/usr/local/gnu_tar
14. make
15. make install
16. vi ~/.bashrc添加
alias tar=@#/usr/local/gnu_tar/bin/tar@#
17.alias tar=@#/usr/local/gnu_tar/bin/tar@#
18.tar zxvf mysql-3.23.44.tar.gz
19.cd mysql-3.23.44
20.which perl(检查你系统的perl的位置,sun是在/bin下)
21.cd tests把这个目录中所有以pl结尾的文件的perl解释器的位置改为#!/bin/perl
22.cd ..(返回上一级目录)
23. CC=gcc CFLAGS="-O6" CXX=gcc CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=gbk --with-extra-charsets=all
24.make
25.make install
26.cd support-files
27.chmod 700 mysql.server
28.cp mysql.server /etc/rc2.d/S90MySQL(以上三部是为了在系统引导时自动启动MySQL服务)
29.修改.bash_profile把mysql的路径添进去,上面我加过了,所以这部就免了。
30.useradd -d /usr/local/mysql/var -s /bin/false mysql(创建MySQL运行用户)
31.mysql_install_db(初始话数据库)
32.chown -R mysql /usr/local/mysql/var
33./etc/rc2.d/S90MySQL start(启动数据库)
34.mysql(连接测试)
[root@mailtest support-files]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.44

Type @#help;@# or @#\h@# for help. Type @#\c@# to clear the buffer.

mysql>
35.安装完毕

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网