时间:2021-07-01 10:21:17 帮助过:5人阅读
1)cmake 安装
tar xf cmake-3.6.0-rc1.tar cd cmake-3.6.0-rc1 /configure make make install
2)boost 安装
3)mysql安装
useradd -s /sbin/nologin -r mysql mkdir -pv /usr/local/mysql/data tar xf mysql…tar.xx cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data/ -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DWITH_DEBUG=0 -DWITH_EMBEDDED_SERVER=1 -DDOWNLOAD_BOOST=1 -DENABLE_DOWNLOADS=1 -DWITH_BOOST=/usr/local/boost
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql 指定安装路径 -DMYSQL_DATADIR=/usr/local/mysql/data/ 指定数据目录 -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock 指定sock文件路径 -DWITH_INNOBASE_STORAGE_ENGINE=1 安装Innodb存储引擎 -DWITH_MYISAM_STORAGE_ENGINE=1 安装myisam存储引擎 -DENABLED_LOCAL_INFILE=1 允许使用Load data命令从本地导入数据 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci 安装所有字符集、默认字符集utf-8 、校验字符 -DMYSQL_USER=mysql mysql用户名 -DWITH_DEBUG=0 关闭debug -DWITH_EMBEDDED_SERVER=1 生成一个libmysqld.a(.so)的库,这个库同时集成了mysql服务与客户端API -DDOWNLOAD_BOOST=1 -DENABLE_DOWNLOADS=1 -DWITH_BOOST=/usr/local/boost 允许boost 允许下载boost库文件。
7.make
8.make install
4)安装后操作
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql chmod 755 /etc/init.d/mysql chown mysql.mysql /usr/local/mysql/ -R ln -sf /usr/local/mysql/bin/ /usr/bin/ ln -sf /usr/local/mysql/lib/ /usr/lib/ ln -sf /usr/local/mysql/libexec/ /usr/local/libexec ln -sf /usr/local/mysql/share/man/man1/ /usr/share/man/man1 ln -sf /usr/local/mysql/share/man/man8/* /usr/share/man/man8
修改配置文件确保路径正确
egrep -v “^#|^$” /etc/my.cnf
[mysqld] datadir=/usr/local/mysql/data socket=/usr/local/mysql/mysql.sock symbolic-links=0
[mysqld_safe] log-error=/var/log/mysql.log pid-file=/var/run/mysql.pid !includedir /etc/my.cnf.d
5)初始化数据库
/usr/local/mysql/bin/mysqld —initialize —user=mysql —basedir=/usr/local/mysql/ —datadir=/usr/local/mysql/data/ 临时密码 root@localhost: T6upu>pr+8,Z
/etc/init.d/mysql start
7)密码修改
mysql_secure_installation
mysql -u root -p’password’
mysql>
部署LAMP-mysql 安装
标签:markdown rac safe gen dev bzip 公司 use zip2