2018-2-27 Linux Learning Notes

Source: Internet
Author: User

11.6 MARIADB Installation
    • The MARIADB installation process is similar to MySQL, but the difference is that because we have both MARIADB and MySQL installed on the same machine, we need to tweak the configuration files and startup scripts to avoid conflicts.

Brief steps to install MARIADB:

    • 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.gz
    • MV Mariadb-10.2.6-linux-glibc_214-x86_64/usr/local/maridb
    • Cd/usr/local/mariadb
    • ./scripts/mysql_install_db--user=mysql--basedir=/usr/local/mariadb/--datadir=/data/mariadb/
    • CP support-files/my-small.cnf/usr/local/mariadb/my.cnf #拷贝配置文件
    • VI/USR/LOCAL/MARIADB/MY.CNF #定义basedir和datadir
      Basedir=/usr/local/mariadb
      Datadir=/data/mariadb
    • CP support-files/mysql.server/etc/init.d/mariadb #拷贝启动脚本
    • Vim/etc/init.d/mariadb #定义basedir, datadir,conf and startup parameters
      Basedir=/usr/local/mariadb
      Datadir=/data/mariadb
      conf= $basedir/my.cnf
      Then add the following statement to the START Command statement ()
      --defaults-file= "$conf"
    • /ETC/INIT.D/MARIADB Start #启动mariadbl服务
11.7/8/9 Apache Installation
    • Apache is the name of a foundation, HTTPD is the package we want to install, the early name of it is called Apache. Apache official website www.apache.org
    • 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 operating system platform, so installing HTTPD requires installing APR and Apr-util first.

Download httpd, Apr and Apr-util and unzip:
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.29.tar.gz
wget http://mirrors.hust.edu.cn/apache/apr/apr-1.6.3.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
Tar zxvf httpd-2.4.29.tar.gz
Tar zxvf apr-1.6.3.tar.gz
Tar zxvf apr-util-1.5.4.tar.gz

Install apr-1.6.3:

cd/usr/local/src/apr-1.6.3
./configure--PREFIX=/USR/LOCAL/APR
Make && make install

Install apr-util-1.5.4:

cd/usr/local/src/apr-util-1.5.4
./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR
Make && make install

Install httpd-2.4.29:
cd/usr/local/src/httpd-2.4.29
./configure \//The backslash here is a caret, plus it allows us to write a line of commands into multiple lines
--prefix=/usr/local/apache2.4\
--with-apr=/usr/local/apr\
--with-apr-util=/usr/local/apr-util\
--enable-so\//indicates support for dynamic expansion modules
--enable-mods-shared=most
Make & make Install

    • Ls/usr/local/apache2.4/modules #查看可用的扩展模块
    • /usr/local/apache2.4/bin/httpd-m #查看加载的模块
    • /usr/local/apache2.4/bin/apachectl Start #启动httpd服务
    • PS Aux|grep httpd #查看httpd进程
    • NETSTAT-LNTP #查看httpd监听的端口

Problems encountered during installation:

    • Question 1:
      Issues encountered installing apr-util-1.6.1:
    • Workaround: Missing Expat-devel Package
      Yum Install Expat-devel
    • Question 2:
      Issues encountered installing HTTPD:
    • Workaround: The problem is found online because Apr-util with the latest version 1.6, changed back to 1.5.4 version, problem solved.
      (Refer to Article link https://www.cnblogs.com/zyos/p/7663717.html)

2018-2-27 Linux Learning notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.