A mariadb Introduction
? MySQL is a relational database developed by MySQL AB, which was acquired by Sun in 2008 (1 billion Knives), and 2009 Sun was acquired by Oracle (7.4 billion knives).
? MySQL official website https://www.mysql.com latest version 5.7GA/8.0DMR
? MySQL5.6 change relatively large, 5.7 performance has been greatly improved
? MARIADB is a branch of MySQL, official website https://mariadb.com/Latest Version 10.2
? Mariadb mainly by Skysql Company (now renamed MARIADB Company) Maintenance, Skysql company by the MySQL original author led most of the original squad founded.
? Mariadb5.5 version corresponds to MySQL 5.5,10.0 corresponding MySQL5.6
? Community Community Edition, Enterprise Business Edition, GA (generally Available) refers to the generic version, used in production environments, DMR (development Milestone release) development milestone release, RC (Release Candidate) Release Candidate version, beta Open beta version, alpha internal beta version
Two MARIADB installation
The installation is basically consistent with the previous MySQL installation, just to differentiate the installed MYQSL we have redefined the configuration file/usr/local/mariadb/my.cnf/etc/my.cnf is the system default profile
Cd/usr/local/src
wget https://downloads.mariadb.com/MariaDB/mariadb-10.2.6/bintar-linux-glibc_214-x86_64/ Mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz
tar zxvf mariadb-10.2.6-linux-glibc_214-x86_64.tar.gzmv mariadb-10.2.6-linux-glibc_214-x86_64 /usr/local/mariadbcd /usr/local/mariadb./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mariadb/ --datadir=/data/mariadbcp support-files/my-small.cnf /usr/local/mariadb/my.cnfvi /usr/local/mariadb/my.cnf //定义basedir和datadir 可以省略cp support-files/mysql.server /etc/init.d/mariadbvim /etc/init.d/mariadb //定义basedir、datadir、conf以及启动XCV参数
/etc/init.d/mariadb start
There is a warning that you can follow the prompts to execute Systemctl daemon-reload
Three Apache Installation
httpd we use the source package installation, to pre-install two library files Apr and apr-util, these two files are also source package installation, are used trilogy installation method./configure make made Install
Apache is the name of a foundation, HTTPD is the package that we want to install, earlier its name is Apache
Apache official website www.apache.org
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.27.tar.gz
wget http://mirrors.hust.edu.cn/apache/apr/apr-1.5.2.tar.gz
wget http://mirrors.hust.edu.cn/apache/apr/apr-util-1.5.4.tar.gz
Apr and Apr-util are a common library of functions that allow httpd to be easily ported (from Linux to Windows) without caring for the underlying OS platform
tar zxvf httpd-2.4.27.tar.gztar zxvf apr-util-1.5.4.tar.gztar zxvf apr-1.5.2.tar.gzcd /usr/local/src/apr-1.5.2./configure --prefix=/usr/local/apr
Configure:error:no acceptable C compiler found in $PATH
Yum install-y gcc
/configure found at the end of the cannot remove Libtoot Note this no tube because we echo $? Prompt for no errors. Continue down to
make && make install cd /usr/local/src/apr-util-1.5.4./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/aprmake && make install
Compile apr-util times wrong
XML/APR_XML.C:35:19: Fatal error: expat.h: no file or directory
Solutions
Yum List |grep Expat
Installing Expat-devel
Yum install-y expat-devel
cd /usr/local/src/httpd-2.4.27./configure \ --prefix=/usr/local/apache2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most
The backslash here is the caret, plus it allows us to write a line of commands into multiple lines
yum provides pcre-configyum install -y pcre-develmake && make installls /usr/local/apache2.4/modules/usr/local/apache2.4/bin/httpd -M //查看加载的模块
/usr/local/apache2.4/bin/apachectl startps aux |grep httpd
Linux Learning Summary (31) Lamp mariadb Apache installation