suse编译安装mysql_SUSE Linux下源码编译安装apache2.2.6+php5.1.16+mysql5.0.40

本文档详细介绍了在SUSE Linux系统中,如何源码编译安装Apache 2.2.6、PHP 5.1.16和MySQL 5.0.40。首先解压并配置MySQL源码,然后进行编译和安装。安装完成后,创建mysql用户,设置权限,并启动MySQL服务。最后,设置了MySQL的root用户密码并进入MySQL客户端。
摘要由CSDN通过智能技术生成

SUSE Linux下源码编译安装apache2.2.6+php5.1.16+mysql5.0.40

文档

一、编译mysql 5.0.40

#cd /usr/local/src

# tar zxvf mysql-5.0.40.tar.gz

# cd mysql-5.0.46

#./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-comment=Source --with-server-suffix=-enterprise-gpl --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-innodb --without-ndb-debug --without-isam

配置成功会提示:

MySQL has a Web site at

http://www.doczj.com/doc/c816023243323968011c92e1.html/

which carries details on the

latest release, upcoming features, and other information to make your

work or play with MySQL more productive. There you can also find information about mailing lists for MySQL discussion.

Remember to check the platform specific part of the reference manual for hints about installing MySQL on your platform. Also have a look at the

files in the Docs directory.

Thank you for choosing MySQL!

# make

编译的时间可能会比较长,毕竟优化的比较厉害。

# make install

编译安装完成后执行后续操作:

# useradd mysql //添加mysql 用户

# cd /usr/local/mysql

# bin/mysql_install_db --user=mysql

# chown -R root:mysql . //设置权限,注意后面有一个"."

# chown -R mysql /var/lib/mysql //设置mysql 目录权限

# chgrp -R mysql . //注意后面有一个"."

# cp share/mysql/http://www.doczj.com/doc/c816023243323968011c92e1.htmlf /etc/http://www.doczj.com/doc/c816023243323968011c92e1.htmlf

# cp share/mysql/mysql.server /etc/rc.d/init.d/mysqld //开机自动启动mysql。# chmod 755 /etc/rc.d/init.d/mysqld

# chkconfig --add mysqld

# /etc/init.d/mysqld start //启动MySQL

#/usr/local/mysql/ bin/mysqladmin -u root password "password_for_root" // password_for_root为密码.本机是mysql

#/usr/local/mysql/bin/mysql –u root –p //进入mysql客户端

(/usr/local/mysql/bin/mysql –u root –p 提示Enter password: 输入密码,回车进入)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值