In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "Centos 6.5 how to use the binary format package to install MariaDB", the article explains the content is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "Centos 6.5 how to use the binary format package to install MariaDB" bar!
Download address of binary format package: https://downloads.mariadb.org/
Note: it should be noted here that what we want to download is a binary format package, which is a compiled source package with a general size of about 600m. If you see in the download link that the download source size is less than 100m, it is very likely that the source package has not been compiled. At this point, if you download the source code package, you need to compile it manually, and the tool used to compile the MariaDB source package is cmake. In addition, in order to ensure that there is no lack of environment, use yum or rpm installation dependency: readline-devel,zlib-devel,openssl-devel,libaio-devel. Here we directly download the compiled binary format package for installation.
Installation process:
1. After downloading the packet, upload it to the server and decompress it.
Tar-xvf mariadb-10.3.9-linux-x86_64.tar.gz is the stable version of the 10 versions I use. You can choose to install the package according to your operating system version.
two。 Prepare the basic environment required for the mariadb installation
First create a mysql user and name shell nologin
Useradd-s / sbin/nologin mysql
Move the extracted directory to / usr/local. At the same time, create a mysql soft link for it.
Mv mariadb-10.3.9-linux-x86_64 / usr.local
Cd / usr/local
Ln-sv mariadb-10.3.9-linux-x86_64 mysql
Change administrative permissions for mysql linked files
Chown-R root:mysql mysql
Prepare the configuration file for mysql. Different configuration files are stored in the support-files directory in the installation package. We can choose which configuration file to use according to the size of the data to be created.
Here we choose the largest my-huge.cnf, and these .cnf ending files are for databases of different sizes.
Mkdir / etc/mysql creates a configuration file directory for the database
Cp support-files/my-huge.cnf / etc/mysql
Edit configuration file
Vim / etc/mysql/my.cnf
This figure is the initial setting. We add information such as data storage directory to the configuration file.
Edit this configuration file and add some data under [mysqld]
The directory pointed to by datadir = / mysql/data / / datadir is the real directory where the database data is stored. Here, I suggest creating a new logical partition to mount the directory pointed to by datadir separately, so as to facilitate the backup and management of data in the future.
Innodb_file_per_table = on / / each table is a separate item
Skip_name_resolve = on / / disable hostname resolution
3. Prepare database files
. / scripts/mysql_install_db-- datadir=/mysal/data-- user=mysql-- basedir=/usr/local/mysql (note that if not added, some versions will prompt pid.err when starting the service. It is recommended to add this item)
4. Prepare the startup script
Copy the script provided in the installation package to / etc/rc.d/rc.local
Cp support-files/mysql.server / etc/rc.d/init.d/mysqld
Set boot self-boot
Chkconfig-add mysqld
Chkconfig 0n
Data can be added to the system default PATH path with common commands
Vim / etc/profile.d/mysql.sh
Export PATH=/usr/local/mysql/bin:$PATH
Save and notify the system to reread
Source / etc/profile.d/mysql.sh
5. Safely initialize the database. The default administrator account of the database does not have a password. Now set the login password for the administrator.
Execute. / mysql_sevure_installation under the / usr/local/mysql/bin directory
6. Start the service: service mysqld start
Thank you for reading, the above is "Centos 6.5 how to use the binary format package to install MariaDB" content, after the study of this article, I believe you on Centos 6.5 how to use the binary format package to install MariaDB this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.