“应用系统基础服务安装”的版本间的差异

来自CloudWiki
跳转至: 导航搜索
(创建页面,内容为“ == '''数据库配置:(考试的重点)''' == <nowiki># # This group is read both both by the client and the server # use it for options that affect everyt…”)
 
第1行: 第1行:
 +
==准备==
 +
准备主机,确认连接互联网
 +
 +
192.168.214.100/24
 +
 +
网关:    .2
 +
 +
Ping www.baidu.com
 +
  
 
== '''数据库配置:(考试的重点)''' ==
 
== '''数据库配置:(考试的重点)''' ==

2019年10月24日 (四) 14:41的版本

准备

准备主机,确认连接互联网

192.168.214.100/24

网关: .2

Ping www.baidu.com


数据库配置:(考试的重点)

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[mysqld]

init_connect='SET collation_connection=utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake

数据库密码:

 Mysqladmin –uroot –p123456(密码必须是这个,暂时)


[root@localhost bin]# systemctl start mariadb

[root@localhost bin]# mysqladmin -uroot password 123456

[root@localhost bin]# mysql -uroot -p123456

设置用户权限:

MariaDB [(none)]> grant all privileges on *.* to root@localhost identified by '123456' with grant option; Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> grant all privileges on *.* to root@'%' identified by '123456' with grant option;Query OK, 0 rows affected (0.000 sec)

上传文件:

MariaDB [(none)]> create database gpmall; Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> use gpmall; Database changed MariaDB [gpmall]> source /opt/gpmall/gpmall-file ERROR: Can't initialize batch_readline MariaDB [gpmall]> source /opt/gpmall/gpmall-file/gpmall.sql

退出数据库并开机自启: MariaDB [gpmall]> Ctrl-C -- exit! Aborted [root@localhost bin]# systemctl enable mariadb


启动Redis

vi /etc/redis.conf

 #bind 127.0.0.1
  protected-mode no


[root@localhost bin]# systemctl start redis

[root@localhost bin]# systemctl enable redis

Created symlink from /etc/systemd/system/multi-user.target.wants/redis.service to /usr/lib/systemd/system/redis.service.

配置ElasticSearch

暂时不做

配置nginx

[root@localhost bin]# systemctl start nginx

[root@localhost bin]# systemctl enable nginx

Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.