CentOs 5.3 安装lamp
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-04-21
ame .my.cnf 2.下面安装准备工作 #groupadd -g 200 mysql #useradd -g mysql -u 200 -d /usr/local/mysql/data -M mysql 编译安装mysql #tar -zxvf mysql-5.1.38.tar.gz #./configure --prefix=/usr/local/mysql --with-extra-charsets=all --with-tcp-port=3306 --with-unix-socket-path=/tmp/mysql.sock --with-mysqld-user=mysql --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --with-pthread --enable-thread-safe-client 编译过程中遇到的问题:checking for termcap functions library... configure: error: No curses/termcap library found 解决方法:rpm -ivh ncurses-*.*.rpm,rpm -ivh ncurses-devel-*.*.rpm nginx--mysql ./configure --prefix=/usr/local/mysql/ --localstatedir=/usr/local/mysql/data --sysconfdir=/usr/local/mysql/ --with-unix-socket-path=/tmp/mysql.sock --with-charset=gbk --with-collation=gbk_chinese_ci --with-extra-charsets=gbk,gb2312,utf8 --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-debug --with-big-tables --with-readline --with-ssl --with-pthread --enable-thread-safe-client --with-embedded-server --enable-local-infile --with-plugins=innobase make && make install =========================================================================================== #l #vi /etc/my.cnf mysql4.1.x以下支持的字符gb2313,如何新版本则可用utf8 [client] socket=/tmp/mysql.sock [mysql] default-character-set=utf8 [mysqld] datadir=/usr/local/mysql/data socket=/tmp/mysql.sock user=mysql [mysql.server] user=mysql basedir=/usr/local/mysql [mysqld_safe] err-log=/var/log/mysqld.log pid-file=/usr/local/mysql/data/mysqld.pid #cd /usr/local/mysql #chown -R root:mysql . #cd /file/mysql-4.0.25 #vi scripts/mysql_install_db datadir=/usr/local/mysql/data basedir=/usr/local/mysql user=mysql #scripts/mysql_install_db --user=mysql #cd /usr/local/mysql #chown -R root:mysql . #chown -R mysql:mysql data #chmod -R 775 . #bin/mysqld_safe --user=mysql --socket=/tmp/mysql.sock --port=3306 & # cp /file/mysql-5.1.38/support-files/mysql.server /etc/rc.d/init.d/mysqld # chkconfig --add mysqld # chkconfig --level 345 mysqld on # /etc/init.d/mysqld start 用编辑器打开/etc/rc.local文件,在exit 0前面加上,/usr/local/mysql/bin/mysqld_safe --user=mysql & # bin/mysqladmin --socket=/tmp/mysql.sock --port=3306 -u root -h localhost password ''123456'' # bin/mysql --port=3306 -u root -p -S /tmp/mysql.sock ============================================================================================================ 配置mysql groupadd mysql #添加mysql组 useradd -g mysql mysql #添加mysql用户并加入到mysql组 cd /usr/local/mysql/ #切换到cd /usr/local/mysql/目录下 chown -R mysql . #改变当前目录下的所有者为mysql用户 chgrp -R mysql . #改变当前目录下的mysql用户的文件为mysql组 cd /usr/local/src/mysql-5.0.22/support-files #到源码mysql目录下的support-files下 cp my-medium.cnf /etc/my.cnf #拷贝文件到/etc/覆盖my.cnf 文件 cd /usr/local/mysql/bin #改变目录到/usr/local/mysql/bin ./mysql_install_db --user=mysql #以mysql身份初始化数据库 cd /usr/local/mysq |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于CentOs 5.3 安装lamp的所有评论