架设流程简朴阐明
1、操纵体系为Centos6.3_64位,需求装置的包:
- lua-5.1.5cmake-2.8.7mysql-5.5.23mysql++-3.1.0boost_1_49_0
复造代码- tar -xzvf lua-5.1.5.tar.gzcd lua-5.1.5
复造代码然后施行make,会提醒让您输进make 体系,由于我的体系是linux的,因而输进make linux
2、编译装置boost
- #tar -zxvf boost_1_49_0.tar.gz#cd boost_1_49_0#./bootstrap.sh#./b2 install
复造代码 3、MYSQL5.5装置具体步调:
- #tar zxvf cmake-2.8.7.tar.gz -C /usr/local/src/#tar zxvf mysql-5.5.23.tar.gz -C /usr/local/src/ # cd /usr/local/src/cmake-2.8.7/# ./configure # gmake && make install # cd ../mysql-5.5.23/# mkdir -p /data/mysql寄存mysql的数据文件的 # useradd -u 27 -d /data/mysql/ -s /sbin/nologin mysql # id mysql uid=27(mysql) gid=27(mysql) groups=27(mysql)# chown -R mysql:mysql /data/mysql/ # ls -ld /data/mysql/drwxr-xr-x 2 mysql mysql 4096 07-11 03:56 /data/mysql/ # yum install -y ncurses-devel# rm -f CMakeCache.txt (假如厥后用yum装置的ncurses-devel要施行那步操纵,正在停止下一步) # cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/data/mysql/ -DWITH_EXTRA_CHARSETS=all -DWITH_READLINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_TCP_PORT=3306 -DDEFAULT_COLLATION=utf8_general_ci上里那条超龟龄令必需正在mysql-5.5.11目次中施行!!!-DCMAKE_INSTALL_PREFIX mysql的装置途径-DDEFAULT_CHARSET 字符散-DMYSQL_DATADIR 数据的保留途径-DMYSQL_TCP_PORT 端心 # make&& make install # cd /usr/local/mysql/# lsbin data include lib mysql-test scripts sql-benchCOPYING docs INSTALL-BINARY man README share support-files # cd support-files/ # cp my-medium.cnf /etc/my.cnf天生mysql的设置文件 # pwd/usr/local/mysql# cd scripts/# lsmysql_install_db # vim /etc/my.conf正在[mysqld]前面减两止 skip-name-resolveinnodb_flush_log_at_trx_commit = 2
复造代码 初初化数据库:
- # ./mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/data/mysql/ Installing MySQL system tables...OKFilling help tables...OK # vim /etc/my.cnf[mysqld]datadir = /data/mysql 增加,指定命据的保留地位# pwd/usr/local/mysql/support-files# cp mysql.server /etc/init.d/mysqld复造mysql的启动剧本 # /etc/init.d/mysqld start # pwd/usr/local/mysql/bin # ./mysqlmysql> # vim /etc/profileexport PATH=/usr/local/mysql/bin:$PATH 增加 # . /etc/profile
复造代码 启动mysql:
- /etc/init.d/mysqld start chkconfig --add mysqld chkconfig mysqld on # mysqlmysql>
复造代码 mysql++装置
- tar -zxvf mysql++-3.1.0.tar.gzcd mysql++-3.1.0./configuremakemake install# pwd/root/mysql++-3.1.0#vim ssx/genv2.cpp 按照报错正在那个文件中找到响应地位增加最上面那条号令#include <iostream>#include <fstream>#include <typeinfo>#include <string.h>
复造代码 法式启动报错处理: |