Install MARIADB, install Apache

Source: Internet
Author: User

Installing MARIADB

To the/USR/LOCAL/SRC directory
cd /usr/local/src

Download the MARIADB installation package (due to the MARIADB server in the United States, so the download is slower and takes about 40 minutes.) The quickest way is to use the Thunder download, upload to the server above the
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

Unpacking the installation package
tar zxvf mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz

Move the unpacked package to/usr/local/, and change the name to MARIADB
mv mariadb-10.2.6-linux-glibc_214-x86_64 /usr/local/mariadb/

Create a user for MySQL
useradd mysql

Create a Data directory
mkdir data

Initializes the database, specifying DATADIR
./scripts/mysql_install_db --user=mysql --datadir=/data/mariadb

Copy configuration template
cp support-files/my-small.cnf /usr/local/mariadb/my.cnf

Copy the startup script (if you only install MARIADB and don't have MySQL installed, just put it in the/etc/.)
cp support-files/mysql.server /etc/init.d/mariadb

Edit the startup script configuration file
vim /etc/init.d/mysqld

Find Basedir and DataDir to change the content as follows: (conf is added yourself, if only mariadb on the computer does not need to add conf)
Basedir=/usr/local/mariadb
Datadir=/data/mariadb
Conf=/usr/local/mariadb/my.cnf

After customizing the Conf, you need to specify the start command below to add the startup default profile
Add to
--defaults-file="$conf"

Start the service
service mariadb start

To see if the service is started
ps aux |grep mariadb

View ports
netstat -ltnp

Install MARIADB, install Apache

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.