In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following is about using Shell scripts to achieve the source code installation MySQL5.1.73 method, the secret of the text is close to the topic. So, no gossip, let's go straight to the following, I believe you will benefit from reading this article on using Shell scripts to implement source code installation MySQL5.1.73 methods.
#! / bin/bash
# install mysql5.1.73 with DESCRIPTION source code
# before installing NOTICE, you need to put the source code package in the same path as the script
# # env setting
BASEDIR=/home/mysql
DATADIR=/home/data/mysql
PIDFILE=/home/mysql/mysql.pid
# # mysql base env install
Yum install gcc gcc-c++ cmake ncurses-devel-y
Yum groupinstall base "Development Tools"-y
# # create user
Groupadd mysql
Useradd-r-g mysql mysql
# # source package unzip
`- d mysql` | | mkdir mysql & & rm-rf mysql & & mkdir mysql
Tar zxvf mysql-5.1.73.tar.gz-C mysql
Mv. / mysql/mysql-5.1.73/*. / mysql/
Cd mysql
# # mysql install
. / configure-prefix=$BASEDIR-datadir=$DATADIR-with-mysqld-user=mysql-with-charset=utf8-with-extra-charsets=all
Make
Make install
Mkdir-p $DATADIR
Chown-R mysql:mysql $BASEDIR
Chown-R mysql:mysql $DATADIR
# # mysql initial
. / scripts/mysql_install_db-datadir=$DATADIR-user=mysql
Cp. / support-files/mysql.server / etc/init.d/mysqld
Rm-f / etc/my.cnf
Cp support-files/my-large.cnf / etc/my.cnf
Chmod 755 / etc/init.d/mysqld
Sed-inr "s # ^ basedir=#basedir=$BASEDIR#g" / etc/init.d/mysqld
Sed-inr "s # ^ datadir=#datadir=$DATADIR#g" / etc/init.d/mysqld
Sed-inr "s # ^ pid_file=#pid_file=$PIDFILE#g" / etc/init.d/mysqld
Sed-I "/\ [mysqld\] / abasedir=$BASEDIR" / etc/my.cnf
Sed-I "/\ [mysqld\] / adatadir=$DATADIR" / etc/my.cnf
Sed-I "/\ [mysqld\] / apid_file=$PIDFILE" / etc/my.cnf
# # mysql environment variable
Export PATH=$PATH:/home/mysql/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
Source / etc/profile
# # service start and enanble
Chkconfig mysqld on
/ etc/init.d/mysqld start
For the above use of Shell scripts to achieve source code installation MySQL5.1.73 method related to the content, is there anything you do not understand? Or if you want to know more about it, you can continue to follow our industry information section.
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.