- 浏览: 219467 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (209)
- database (25)
- java技巧 (25)
- TC总结 (4)
- J2EE (8)
- 算法 (6)
- blog (4)
- php (4)
- linux & mac (19)
- 其它技术 (4)
- javascript&ajax (26)
- 测试技术 (8)
- XML&HTML (2)
- ORM (hibernate ...) (11)
- eclipse (5)
- 技术书籍 (8)
- 项目管理,cmmi (3)
- 硬件技术 (1)
- REST, web service, web架构 (1)
- 卓有成效程序员 (2)
- qone开发 (1)
- Design (4)
- .net (5)
- SCM (4)
- css (23)
- programming languages (1)
- ide (2)
- CSS Patterns (18)
- security (1)
- android (5)
最新评论
-
Virtoway:
说到Angular JS刚读到一片美国构架师的文章关于使用An ...
angular js: angular.bind example -
08284008:
该毛线啊,一点解释的都没有,怎么看
Thread join() 用法 -
Rex86lxw:
在eclipse中我一直用Navigator查看编写代码的,可 ...
eclipse不能自动编译,不报错 -
mistake:
..............
Angular js scope: the child scope would inherit from the parent scope -
sparrow1314:
very good! thanks!
IE下JS调试工具
http://forum.ubuntu.org.cn/viewtopic.php?t=319886
用源码编译安装MYSQL5.5到ubuntu10.10上[手记]
鄙人初学乍练,写的不好,大家原谅~今天泡了下午论坛,没找到MYSQL的合适的安装配置教程,只好自己去看官方文档了,着实花了时间,
下列是我的操作过程,写出来,希望对大家能有点帮助。
下载地址,http://dev.mysql.com/downloads/mysql/
选择源码下载:source code
文件:mysql-5.5.9.tar.gz
下载后在下载目录
$ sudo tar zxvf mysql-5.5.9.tar.gz
查看文件夹下INSTALL-SOURCE文件,里面有各个系统的编译安装方式(英文)
注意,安装前应当注意安装工具的完善,否则编译的时候将出错,本帖稍后的部分给出了工具列表。这里先给出安装命令。
linux下源码的安装方式如下:
# 安装前配置
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# 开始源码编译安装
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake .
shell> make
shell> make install
# 结束编译安装
# 初始化,下列命令使mysql得到对数据库文件的拥有权。mysql_install_db脚本能刷新授权表
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# 可选命令,配置文件位置更改,且内有五种配置模式。
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# 可选命令,自启动脚本,可以mysql自动启动。
shell> cp support-files/mysql.server /etc/init.d/mysql.server
会遇到的问题:
----------------------------------------------------------
-- MySQL 5.5.9
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:82 (MESSAGE):
Curses library not found. Please install appropriate
package,remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu , package
name is libncurses5-dev,on RedHat and derivates it is ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:126 (FIND_CURSES)
cmake/readline.cmake:216 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:256 (MYSQL_CHECK_READLINE)
----------------------------------------------------------
如回显所示,ubuntu下安装libncurses5-dev;redhat下安装ncurses-devel,并删除当前目录CMakeCache.txt(必须删除,否则报错依旧)并重新运行:
$ cmake .
命令
----------------------------------------------------------
-- Performing Test HAVE_PEERCRED
-- Performing Test HAVE_PEERCRED - Success
Warning: Bison executable not found in PATH
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/downloads/mysql-5.5.9
----------------------------------------------------------
一个警告总算不爽,如回显所见,安装bison。
$ sudo apt-get install bison
----------------------------------------------------------
这是两个比较多的问题。
问题总结:
后来查看了官方的文档,编译安装的时候工具必须要有下列5个。
=>安装工具:
1. cmake
----没有自己编译安装cmake
----shell:~$ sudo apt-get install cmake
----版本:2.8.2
2.GNU make
----Ubuntu自带
----版本:3.81
3.GCC
----Ubuntu自带
----版本:4.4.5(官方文档:必须3.2以上)
4.Perl
----Ubuntu自带
----版本:5.10.1
5.libncurses5-dev (ncurses-devel)
----若差了这个包,在cmake的时候会报错。
----Debian/Ubuntu上的包名是libncurses5-dev,RedHat和其他版本对应的是ncurses-devel
----shell:~$ sudo apt-get install libncurses5-dev
开启mysql:
cd . ; ./bin/mysqld_safe &
当然你用root命令开启的时候,应当使用--user参数,这样才是安全的启动方式。
cd . ; ./bin/mysqld_safe --user=mysql &
为root和你的用户名设置密码,这需要在你先启动mysql的基础上,否则会报错,说你没有连接到端口:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h YourusernamE password 'new-password'
也可一用下命令替代:
./bin/mysql_secure_installation
-------------------------------------------------------------------
kaqi补充
sudo apt-get install gettext sudo apt-get install bison sudo apt-get install build-essential
很遗憾,搞了老久,还是没有成功... ... 放弃。 用apt-get装mysql 5.1
Reinstalled on a new VM following the above steps. Now it works. So, there must be some remaing garbage from my previously deleted mysql 5.1.
Use the following command to install the mysql-client
sudo apt-get install mysql-client
发表评论
-
Read write text file in shell
2017-11-21 22:57 273#!/bin/bash contains() { ... -
start sublime from terminal on mac
2017-07-19 16:41 323Put this in the profile. If yo ... -
grep and sed to split out a section in a large file
2017-06-20 17:44 0https://stackoverflow.com/ques ... -
Append path to $PATH in fish shell on mac & linux
2016-11-01 18:11 450The best way I have found to ... -
Setting environment variables via launchd.conf no longer works in OS X Yosemite/
2016-05-11 16:40 444Create an environment.plist fi ... -
Extend image disk size in KVM
2015-07-14 11:35 4681. Switch to root 2. sudo qem ... -
start SimpleHTTPServer with python
2013-11-06 23:18 514python -m SimpleHTTPServer ... -
fish config.fish
2013-09-19 22:02 608vi ~/.config/fish/config.fish -
Default shell
2013-08-13 15:40 457How do I make fish my defaul ... -
Setting environment variables in OS X?
2013-08-13 02:43 507stackoverflow.com/questions/1 ... -
vm中的ubuntu共享主机的文件
2011-04-07 15:07 3408http://www.cnblogs.com/liu_xf/a ... -
ubuntu network config
2011-03-16 13:04 9661. config network: sudo vi /et ... -
shell替换某个目录下文件中的字符串
2009-01-08 20:54 1955cd /home/work/dirname find ./ - ... -
gcc编译命令
2008-12-25 18:08 1827$ gcc -Wall calc.c /usr/lib/lib ... -
iostat 结果解析
2008-11-19 12:07 10932. iostat 结果解析 # iosta ... -
Linux下常用压缩格式的压缩与解压方法
2008-10-30 10:29 607.tar 解包: tar xvf FileName.tar 打 ... -
linux命令
2008-10-24 10:31 760while ((1)) ;do du -sh * ; slee ... -
linux environment setup
2008-08-19 21:16 8401. set default OS in launch su ... -
shell判断文件,目录是否存在或者具有权限
2008-08-18 10:47 1635转自 http://blog.chinaunix.net/u/ ...
相关推荐
Ubuntu 10.10在2010年10月正式发布,让众多Ubuntu用户都对这款全新的系统充满期望。毕竟,Ubuntu 10.10是Canonical公司推出的最为...而在Ubuntu 10.10系统中,Light主题得到继续采用,同时在细节上的改善使其更新美观。
Ubuntu 10.10的安装图解过程Ubuntu 10.10的安装图解过程
在U盘中安装Ubuntu 10.10的方法
U盘安装ubuntu10.10图文教程
用Ubuntu10.10 dvd版本作为本地源,Ubuntu 10.10 DVD ISO挂载的方式来更新软件,已经通过测试
Ubuntu 10.10安装配置tftp服务.doc
ubuntu10.10安装配置全过程图文详解
Ubuntu10.10编译Linux内核 Ubuntu10.10编译Linux内核 Ubuntu10.10编译Linux内核
windows_XP下安装Ubuntu10.10
ubuntu 10.10网络配置10步曲
自己整理的Ubuntu安装指南。希望对大家有帮助
Ubuntu10.10下嵌入式开发环境的配置
Ubuntu10.10下tftp服务器配置笔记
写了一份Ubuntu10.10上搭建Android2.2基于ARM的交叉编译环境的文档,供那些对搭建Android 2.2交叉编译环境的人还很陌生的人作为参考。 注:由于疏忽,请把本文档第6页的“(3)配置环境变量”这一项中的"export JRE...
Ubuntu10.10下kgdb环境搭建
Ubuntu10.10(64位)编译Android2.3源码 遇到的错误
最近国外厂商和国内Linux爱好者都在热议的话题是,Linux有能力挑战Windows的市场地位了。为什么呢?因为最流行的Linux--Ubuntu发布新版本...针对这些问题,小编借这篇文章,手把手教大家用虚拟机来安装Ubuntu 10.10。
非常详细的 Ubuntu 10.10安装Oracle 10g 教程
Ubuntu 10.10进行 U盘安装时不成功,需要将此文件替换,即可。此文件来源自较老的Ubuntu版本
ubuntu10.10下qt连接mysql数据库.pdf