From ac8f7f10b9dfe67bdce1022e2cb02a7510388a30 Mon Sep 17 00:00:00 2001 From: 1708-huayu <57060237+1708-huayu@users.noreply.github.com> Date: Fri, 13 Oct 2023 09:55:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- df/磁盘处理记录.md | 17 ++++ df/项目启动.md | 76 ++++++++++++++++++ 0.前期配置.md => 前置配置/0.前期配置.md | 0 1.静态ip配置.md => 前置配置/1.静态ip配置.md | 0 2.修改主机名.md => 前置配置/2.修改主机名.md | 0 .../3.关闭强化(根据需要设置).md | 0 .../4.更新linux内核.md | 0 .../5.主机系统优化.md | 0 {img => 前置配置/img}/QQT94VQI1VVET4J7VFB.png | Bin .../img}/微信图片_20230831141335.png | Bin 数据库/mysql安装.md | 5 +- 11 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 df/磁盘处理记录.md create mode 100644 df/项目启动.md rename 0.前期配置.md => 前置配置/0.前期配置.md (100%) rename 1.静态ip配置.md => 前置配置/1.静态ip配置.md (100%) rename 2.修改主机名.md => 前置配置/2.修改主机名.md (100%) rename 3.关闭强化(根据需要设置).md => 前置配置/3.关闭强化(根据需要设置).md (100%) rename 4.更新linux内核.md => 前置配置/4.更新linux内核.md (100%) rename 5.主机系统优化.md => 前置配置/5.主机系统优化.md (100%) rename {img => 前置配置/img}/QQT94VQI1VVET4J7VFB.png (100%) rename {img => 前置配置/img}/微信图片_20230831141335.png (100%) diff --git a/df/磁盘处理记录.md b/df/磁盘处理记录.md new file mode 100644 index 0000000..c3de337 --- /dev/null +++ b/df/磁盘处理记录.md @@ -0,0 +1,17 @@ +误删启动盘又想加载之前的信息。 + +基本命令: + +```shell +# 查看磁盘使用 +df +# 磁盘管理 +fdisk --help +# 磁盘挂载 +mount /dev/sda2 old +# mount: /home/shixiaohua/old: mount(2) system call failed: Cannot allocate memory. + +# 追踪错误信息 +strace mount /dev/sda2 old +``` + diff --git a/df/项目启动.md b/df/项目启动.md new file mode 100644 index 0000000..f3f7356 --- /dev/null +++ b/df/项目启动.md @@ -0,0 +1,76 @@ +# 项目启动 + +## zookeeper 启动 + +```shell +## 启动 +zkServer.sh start +## 查看状态 +zkServer.sh status +``` + +## kafka启动 + +```shell +## 启动 +./kafka-server-start.sh -daemon ../config/server.properties +## 创建主题 +./kafka-topics.sh --zookeeper service:2181,service-node1:2181,service-node2:2181/bigdata/kafka --create --topic "t_traffic" --partitions 3 --replication-factor 2 +``` + +## flume启动 + +```shell +flume-ng agent -n a -f ./to_kafka.conf -Dflume.root.logger=INFO,console +``` + +## hadoop启动 + +```shell +## 启动全部node节点 +start-all.sh +## 关闭安全模式 +hdfs dfsadmin -safemode leave +``` + +## yarn启动 + +```shell +yarn-daemon.sh start resourcemanager +``` + +## hive启动 + +```shell +## 启动元数据 +hive --service metastore & +## 启动客户端 +hive +``` + +## canal + +启动 + +```sh +cd /usr/local/capsoftware/canal/deployer/bin +sh startup.sh +``` + +## ES + +启动 + +```sh +cd /usr/local/capsoftware/es/elasticsearch-7.12.0/bin +su es +./elasticsearch + +# 是否启动http://localhost:9200/ +# header插件 +cd /usr/local/capsoftware/es/elasticsearch-7.12.0/elasticsearch-head +npm run start +``` + + + diff --git a/0.前期配置.md b/前置配置/0.前期配置.md similarity index 100% rename from 0.前期配置.md rename to 前置配置/0.前期配置.md diff --git a/1.静态ip配置.md b/前置配置/1.静态ip配置.md similarity index 100% rename from 1.静态ip配置.md rename to 前置配置/1.静态ip配置.md diff --git a/2.修改主机名.md b/前置配置/2.修改主机名.md similarity index 100% rename from 2.修改主机名.md rename to 前置配置/2.修改主机名.md diff --git a/3.关闭强化(根据需要设置).md b/前置配置/3.关闭强化(根据需要设置).md similarity index 100% rename from 3.关闭强化(根据需要设置).md rename to 前置配置/3.关闭强化(根据需要设置).md diff --git a/4.更新linux内核.md b/前置配置/4.更新linux内核.md similarity index 100% rename from 4.更新linux内核.md rename to 前置配置/4.更新linux内核.md diff --git a/5.主机系统优化.md b/前置配置/5.主机系统优化.md similarity index 100% rename from 5.主机系统优化.md rename to 前置配置/5.主机系统优化.md diff --git a/img/QQT94VQI1VVET4J7VFB.png b/前置配置/img/QQT94VQI1VVET4J7VFB.png similarity index 100% rename from img/QQT94VQI1VVET4J7VFB.png rename to 前置配置/img/QQT94VQI1VVET4J7VFB.png diff --git a/img/微信图片_20230831141335.png b/前置配置/img/微信图片_20230831141335.png similarity index 100% rename from img/微信图片_20230831141335.png rename to 前置配置/img/微信图片_20230831141335.png diff --git a/数据库/mysql安装.md b/数据库/mysql安装.md index a15d8c4..06542bc 100644 --- a/数据库/mysql安装.md +++ b/数据库/mysql安装.md @@ -147,14 +147,17 @@ systemctl status mysqld 连接设置mysql -``` +```sql mysql -u root -p # 修改密码 ALTER USER 'root'@'localhost' IDENTIFIED BY '123456'; # 设置远程连接 CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY '123456'; CREATE USER 'root'@'::1' IDENTIFIED BY '123456'; +# 设置远程密码 CREATE USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; +# 授予所有权限 +GRANT ALL ON *.* TO 'root'@'%'; flush privileges; ```