Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A detailed tutorial on how to deploy Mysql.5.7 without a network in bank Redhat7

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article is mainly about the content of the detailed tutorial on how to deploy Mysql.5.7 in bank Redhat7 netless. If you are interested, let's take a look at this article. I believe that after reading the detailed tutorial on how to deploy Mysql.5.7 in bank Redhat7 netless, it is of some reference value to everyone.

1. Needless to say, the customer site, government environment, banking environment, most of them are not netted, so netless installation is very necessary.

Mysql download path: https://dev.mysql.com/downloads/mysql/

Check your own Linux system version

12 [root@lsl ~] # cat / etc/redhat-releaseCentOS Linux release 7.3.1611 (Core)

Pull down and continue to choose.

Select the corresponding download, mysql-5.7.20-1.el7.x86_64.rpm-bundle.tar

It will be downloaded in a few minutes.

two。 Prepare the dependency package:

A.numactl package:

Numactl-2.0.9-6.el7_2.x86_64.rpm

Numactl-devel-2.0.9-6.el7_2.x86_64.rpm

Numactl-libs-2.0.9-6.el7_2.x86_64.rpm

b. Other related support:

Perl-Data-Dumper-2.145-3.el7.x86_64.rpm

Libaio-0.3.109-13.el7.x86_64.rpm

Download method: https://pkgs.org

Here is the download path:

Libaio-0.3.109-13.el7.x86_64.rpm

Perl-Data-Dumper-2.145-3.el7.x86_64.rpm

Numactl-libs-2.0.9-6.el7_2.x86_64.rpm

Numactl-devel-2.0.9-6.el7_2.x86_64.rpm

Numactl-2.0.9-6.el7_2.x86_64.rpm

3. Upload files to the CVM

1234567891011121314151617181920

Localhost:Downloads lsl$ scp-r numactl-2.0.9-6.el7_2.x86_64.rpm

Root@kylintest:/root/

Root@lsl's password:numactl-2.0.9-6.el7_2.x86_64.rpm 100% 65KB 2.1MB/s 00:00

Localhost:Downloads lsl$ scp-r numactl-libs-2.0.9-6.el7_2.x86_64.rpm

Root@lsl:/root/

Root@lsl's password:numactl-libs-2.0.9-6.el7_2.x86_64.rpm 100% 29KB 1.7MB/s 00:00

Localhost:Downloads kylin$ scp-r numactl-devel-2.0.9-6.el7_2.x86_64.rpm

Root@lsl:/root/

Root@lsl's password:numactl-devel-2.0.9-6.el7_2.x86_64.rpm 100% 23KB 1.5MB/s 00:00

Localhost:Downloads lsl$ scp-r perl-Data-Dumper-2.145-3.el7.x86_64.rpm

Root@lsl:/root/

Root@lsl's password:perl-Data-Dumper-2.145-3.el7.x86_64.rpm 100% 47KB 1.2MB/s 00:00

Localhost:Downloads lsl$ scp-r libaio-0.3.109-13.el7.x86_64.rpm

Root@lsl:/root/

Root@lsl's password:Permission denied, please try again.root@lsl's password:libaio-0.3.109-13.el7.x86_64.rpm 100% 24KB 618.3KB/s 00:00

Localhost:Downloads lsl$ scp-r mysql-5.7.20-1.el7.x86_64.rpm-bundle.tar

Root@lsl:/root/

Root@lsl's password:mysql-5.7.20-1.el7.x86_64.rpm-bundle.tar 100% 566MB 4.5MB/s 02:05

View uploaded packages

123456 [root@lsl ~] # lsanaconda-ks.cfg numactl-devel-2.0.9-6.el7_2.x86_64.rpmlibaio-0.3.109-13.el7.x86_64.rpm numactl-libs-2.0.9-6.el7_2.x86_64.rpmminiconda2 perl-Data-Dumper-2.145-3.el7.x86_64.rpmmysql-5.7.20-1.el7.x86_64.rpm-bundle.tar pythonshellnumactl-2.0.9-6.el7_2.x86_64.rpm

4. Installation

The first step is to install dependencies, install perl-Data-Dumper-2.145-3.el7.x86_64.rpm and libaio-0.3.109-13.el7.x86_64.rpm

1234567 [root@lsl] # rpm-ivh libaio-0.3.109-13.el7.x864.rpmling. # # [100%] package libaio-0.3.109-13.el7.x86_64 is already installed [root@lsl ~] # rpm-ivh perl-Data-Dumper-2.145-3.el7.x86 / 64.rpmling. # # [100%] Updating / installing... 1:perl-Data-Dumper-2.145-3.el7 # # [100%]

The second step is to continue to install numactl related

123 [root@lsl ~] # rpm-ivh numactl*Preparing... # # [100%] package numactl-libs-2.0.9-6.el7_2.x86_64 is already installed

If you do not install this package, an error will be reported as follows (I have not tested it):

1234567error: Failed dependencies: libnuma.so.1 () (64bit) is needed by mysql-community-server-5.7.18-1.el7.x86_64 libnuma.so.1 (libnuma_1.1) (64bit) is needed by mysql-community-server-5.7.18-1.el7.x86_64 libnuma.so.1 (libnuma_1.2) (64bit) is needed by mysql-community-server-5.7.18-1.el7.x86_64

If you install mysql directly at this time, you will also get an exception:

123warning: mysql-community-libs-5.7.18-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY error: Failed dependencies: mysql-community-common (x86-64) > = 5.7.9 is needed by mysql-community-libs-5.7.18-1.el7.x86_64 mariadb-libs is obsoleted by mysql-community-libs-5.7.18-1.el7.x86_64

The first line can also see that it is the problem of dependency. What the hell is the "mariadb-libs abandoned" in the second line? Abandoned, why not provide a new one and still have this kind of retarded hint?

After some search, it was found that it was because there was already a mariadb on CentOS 7 that would conflict with MySQL's mariadb. So we need to uninstall the mariadb that comes with the system at this time.

Then use the mariadb that comes with mysql.

Next, check out the mariadb version.

12 [root@lsl ~] # rpm-qa | grep mariadbmariadb-libs-5.5.52-1.el7.x86_64

Uninstall the mariadb installed by the system

123 [root@lsl ~] # rpm-e-nodeps mariadb-libs-5.5.52-1.el7.x86_64 [root@lsl ~] # rpm-qa | grep mariadb [root@lsl ~] #

After you have solved this problem, you can install mysql, extract mysql first, and check the installation package

1234567891011121314151617181920212223 [root@lsl] # tar-xf mysql-5.7.20-1.el7.x86_64.rpm-bundle.tar [root@lsl] # lsanaconda-ks.cfglibaio-0.3.109-13.el7.x86_64.rpmminiconda2mysql-5.7.20-1.el7.x86_64.rpm-bundle.tarmysql-community-client-5.7.20-1.el7.x86_64.rpmmysql-community-common-5.7.20-1.el7.x86_64.rpmmysql -community-devel-5.7.20-1.el7.x86_64.rpmmysql-community-embedded-5.7.20-1.el7.x86_64.rpmmysql-community-embedded-compat-5.7.20-1.el7.x86_64.rpmmysql-community-embedded-devel-5.7.20-1.el7.x86_64.rpmmysql-community-libs-5.7.20-1.el7.x86_64.rpmmysql-community-libs-compat-5.7.20-1.el7 .x86 _ 64.rpmmysql-community-minimal-debuginfo-5.7.20-1.el7.x86_64.rpmmysql-community-server-5.7.20-1.el7.x86_64.rpmmysql-community-server-minimal-5.7.20-1.el7.x86_64.rpmmysql-community-test-5.7.20-1.el7.x86_64.rpmnumactl-2.0.9-6.el7_2.x86_64.rpmnumactl-devel-2.0.9-6.el7 _ 2.x86_64.rpmnumactl-libs-2.0.9-6.el7_2.x86_64.rpmperl-Data-Dumper-2.145-3.el7.x86_64.rpmpythonshell

Direct installation, error report:

12345 [root@lsl ~] # rpm-ivh mysql-community-*warning: mysql-community-client-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYerror: Failed dependencies: net-tools is needed by mysql-community-server-5.7.20-1.el7.x86_64 perl (JSON) is needed by mysql-community-test-5.7.20-1.el7.x86_64

It seems that it can not be installed directly, in order, continue:

12345678910111213141516171819202122 [root@lsl] # rpm-ivh mysql-community-common-5.7.20-1.el7.x86_64.rpmwarning: mysql-community-common-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... # # [100%] Updating / installing... 1:mysql-community-common-5.7.20-1.e## [root@lsl] # rpm-ivh mysql-community-libs-*warning: mysql-community-libs-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... # # [100%] Updating / installing... 1:mysql-community-libs-5.7.20-1.el7## [50%] 2:mysql-community-libs-compat-5.7.2## [100%] [root@lsl ~] # rpm-ivh mysql- Community-devel-5.7.20-1.el7.x86_64.rpmwarning: mysql-community-devel-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature Key ID 5072e1f5: NOKEYPreparing... # # [100%] Updating / installing... 1:mysql-community-devel-5.7.20-1.el## [root@lsl] # [root@lsl] # rpm-ivh mysql-community-server-5.7.20-1.el7.x86_64.rpmwarning: mysql-community-server-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature Key ID 5072e1f5: NOKEYerror: Failed dependencies: mysql-community-client (x86-64) > = 5.7.9 is needed by mysql-community-server-5.7.20-1.el7.x86_64 net-tools is needed by mysql-community-server-5.7.20-1.el7.x86_64

Say that net-tools is missing, download it and install it, and continue:

Net-tools-2.0-0.22.20131004git.el7.x86_64.rpm

1234567891011121314151617181920 [root@lsl] # rpm-ivh net-tools-2.0-0.22.20131004git.el7.x86thanks 64.rpmling. # # [100%] Updating / installing... 1:net-tools-2.0-0.22.20131004git.el## [root@lsl] # rpm-ivh mysql-community-server-5.7.20-1.el7.x86_64.rpmwarning: mysql-community-server-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature Key ID 5072e1f5: NOKEYerror: Failed dependencies: mysql-community-client (x86-64) > = 5.7.9 is needed by mysql-community-server-5.7.20-1.el7.x86_64 [root@lsl ~] # rpm-ivh mysql-community-cmysql-community-client-5.7.20-1.el7.x86_64.rpm mysql-community-common-5.7.20-1.el7.x8664.rpm [root @ lsl ~] # rpm-ivh mysql-community-client-5 .7.20-1.el7.x86_64.rpmwarning: mysql-community-client-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature Key ID 5072e1f5: NOKEYPreparing... # # [100%] Updating / installing... 1:mysql-community-client-5.7.20-1.e## [root@lsl] # rpm-ivh mysql-community-server-5.7.20-1.el7.x86_64.rpmwarning: mysql-community-server-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEYPreparing... # # [100%] Updating / installing... 1:mysql-community-server-5.7.20-1.e## [100%]

When installing server in the middle, it is said that client must be installed. At this point, the mysql installation is successful and the work is finished.

5. Launch to view configuration

1234567891011121314151617 [root@lsl] # service mysqld start or systemcl start mysqld Redirecting to / bin/systemctl start mysqld.service [root@lsl] # service mysqld statusRedirecting to / bin/systemctl status mysqld.service ● mysqld.service-MySQL Server Loaded: loaded (/ usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2017-11-04 13:56:37 CST 24s ago Docs: man:mysqld (8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 4644 ExecStart=/usr/sbin/mysqld-daemonize-pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS) Process: 4571 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited) Status=0/SUCCESS) Main PID: 4647 (mysqld) CGroup: / system.slice/mysqld.service └─ 4647 / usr/sbin/mysqld-- daemonize-- pid-file=/var/run/mysqld/mysqld.pid Nov 04 13:56:07 kylintest systemd [1]: Starting MySQL Server...Nov 04 13:56:37 kylintest systemd [1]: Started MySQL Server.

At this point, the history of netless installation is over, at least I have no problem with the experiment, what seems to be the disadvantage, what is the database password?

12 [root@lsl ~] # cat / var/log/mysqld.log | grep password

2017-11-04T05:56:08.454323Z 1 [Note] A temporary password is generated for

Root@localhost: ps1DY?%T.Vc4

So you can log in to the database and try:

12 [root@lsl ~] # mysql-u rootERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I made a mistake, and I didn't even have a chance to enter the password.

123456789101112131415 [root@lsl] # mysql-uroot-pEnter password:Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 6Server version: 5.7.20 Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners. Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement. Mysql >

Try to log in successfully. Is the database easy to use?

12mysql > show databases;ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

If you don't change the password, you can't use it. Go on:

12345mysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' your password'; Query OK, 0 rows affected (0.02 sec) mysql > FLUSH PRIVILEGES;Query OK, 0 rows affected (0.01 sec)

Then it will be no problem to use SQL.

12345678910mysql > show databases;+-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | sys | +-+ 4 rows in set (0.00 sec)

Link with the database tool, there is a problem:

Remote access is not allowed, continue instead:

12345mysql > GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' your password 'WITH GRANT OPTION;Query OK, 0 rows affected, 1 warning (0.00 sec) mysql > FLUSH PRIVILEGES;Query OK, 0 rows affected (0.00 sec)

Try again and there will be no problem, so there is basically no problem with database installation.

View the mysql profile address:

123456 [root@lsl ~] # find /-iname'* .cnf'- print/etc/pki/tls/openssl.cnf/etc/my.cnf/root/miniconda2/pkgs/openssl-1.0.2l-0/ssl/openssl.cnf/root/miniconda2/ssl/openssl.cnf/var/lib/mysql/auto.cnf

View the character set:

1234567891011121314mysql > show variables like 'char%' +-- +-- + | Variable_name | Value | +-- +-- + | character _ set_client | utf8 | | character_set_connection | utf8 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | character_set_results | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | / usr/share/mysql/charsets/ | +-- -+ 8 rows in set (0.01 sec)

At this point, the database is installed.

The details of the above tutorials on how to deploy Mysql.5.7 in bank Redhat7 without network are helpful to you. 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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report