centos6 编译安装mysql 5.1

前端之家收集整理的这篇文章主要介绍了centos6 编译安装mysql 5.1前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1 安装依赖库和创建用户

yum install ncurses-devel -y

useradd -M -s /sbin/nologin MysqL

2 解压文件及安装

tar zxvf MysqL-5.1.73.tar.gz
cd MysqL-5.1.73
./configure --prefix=/usr/local/MysqL
make
make install

3 设置目录访问权限和拷贝配置及启动文件

chown -R MysqL.MysqL /usr/local/MysqL/
cp support-files/my-medium.cnf /etc/my.cnf
/usr/local/MysqL/bin/MysqL_install_db --user=MysqL
chown -R root /usr/local/MysqL/
chown -R MysqL /usr/local/MysqL/var/
cp support-files/MysqL.server /etc/init.d/MysqLd
chmod +x /etc/init.d/MysqLd
chkconfig MysqLd on

4 加入环境变量

echo 'PATH=/usr/local/MysqL/bin/:$PATH' >>/etc/profilesource /etc/profile

原文链接:https://www.f2er.com/centos/378698.html

猜你在找的CentOS相关文章