Linux-LNMP环境搭建
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux-LNMP环境搭建相关的知识,希望对你有一定的参考价值。
安装mysql
# cd /usr/local/src/ # wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz # tar -zxvf mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz # mv mysql-5.6.36-linux-glibc2.5-x86_64 /usr/local/mysql # cd /usr/local/mysql # useradd -s /sbin/nologin mysql # mkdir -p /data/mysql # chown -R mysql:mysql /data/mysql # yum install perl -y # yum install perl-Data-Dumper.x86_64 -y # yum install libaio-devel -y # ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql # vim /etc/my.cnf //定义datadir=/data/mysql socket=/tmp/mysql.sock #log-error=/var/log/mariadb/mariadb.log #pid-file=/var/run/mariadb/mariadb.pid # cp support-files/mysql.server /etc/init.d/mysqld # vim /etc/init.d/mysqld //定义basedir=/usr/local/mysql datadir=/data/mysql # chkconfig --add mysqld # chkconfig mysqld on # service mysqld start
以上是关于Linux-LNMP环境搭建的主要内容,如果未能解决你的问题,请参考以下文章