Chinaunix首页 | 论坛 | 博客
  • 博客访问: 92757
  • 博文数量: 30
  • 博客积分: 407
  • 博客等级: 一等列兵
  • 技术积分: 265
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-19 09:20
文章存档

2011年(30)

分类: LINUX

2011-04-19 12:46:58

1. yum install –y gcc*

  Yum install –y ncurses*                                                                     安装ncurses软件包

 

2. useradd –M –s /sbin/nologin mysql                                                        创建系统用户-mysql

 

3. tar –xzvf mysql- –C /usr/src                                                       解压源码包到/usr/src/目录

 

4. cd /usr/src

  ./configure –prefix=/usr/local/mysql                                                配置

 

5. make && make install                                                                   编译和安装

 

6. cp /usr/src/mysql-5.0.56/support-file/my-medium.cof /et/my.cnf    复制配置文件

 

7. cd /usr/local/mysql/bin/

  ./mysql_install_db –user=mysql                                                      初始化数据库

 

8. chown –R root.mysql /usr/local/mysql                                             修改相关权限

  Chown –R mysql /usr/local/mysql/var

 

9. vi /etc/ld.so.conf                                                                                    调整lib库路径

  /usr/local/mysql/lib/mysql

 

10.ldconfig                                                                                        加载数据库

 

11.cd /usr/local/mysql/bin/                                                                  后台启动mysql数据库

  ./mysqld_safe –user=mysql &

 

12.cp /usr/src/mysql-5.0.56/support-file/mysql.server /etc/init.d/mysqld      修改启动方式

chmod +x /etc/init.d/mysqld

   chkconfig –add mysqld

   chkconfig mysqld on

 

13.vi /root/.bash_profile                                                                     增加命令补齐配置

  /bin:/usr/local/mysql/bin

 

14.Source .bash_profile                                                                     重新加载配置

 

15.mysql –u root [<-p>+密码]                                                            登录数据库

阅读(1280) | 评论(0) | 转发(0) |
0

上一篇:源码安装Apache服务

下一篇:源码安装PHP

给主人留下些什么吧!~~