首页
斐讯设备
疯言疯语
系统运维
编程语言
网站建设
友情连接
推荐
autojs
Search
1
charles破解注册码(含windows和mac)最新安装教程「亲测有效」
57 阅读
2
aris常用命令收集
32 阅读
3
【N1和Armbian】一、N1刷Linux系统armbian
31 阅读
4
docker更新现有容器为自动重启
29 阅读
5
[上]JAVA学习系列模块九第五章186.对象数组_基本使用
26 阅读
登录
Search
标签搜索
JAVA
JAVA学习系列
docker
Linux
js
N1
git
模块二
模块一
端口
模块五
数据库
模块九
模块四
镜像
模块三
模块六
MySQL
百度网盘
nginx
DaiMaFengZi
累计撰写
591
篇文章
累计收到
11
条评论
首页
栏目
斐讯设备
疯言疯语
系统运维
编程语言
网站建设
页面
友情连接
推荐
autojs
搜索到
214
篇与
的结果
2023-11-06
【深度学习KylinOS一】【麒麟系统环境安装之Docker】麒麟系统V10 怎么使用自带的docker 麒麟系统安装docker
服务器环境在 arm64(aarch64) 架构服务器上基于国产化操作系统安装 docker 服务## 查看系统版本,确认版本 cat /etc/kylin-release Kylin Linux Advanced Server release V10 (Tercel) ## 操作系统 uname -p aarch64 ## 内核版本(≥ 3.10) uname -r 4. 19.90-21.2.ky10.aarch64 ## iptables 版本(≥ 1.4) iptables --version iptables v1.8.1 (legacy)吐槽所谓的国产操作系统在我看来即换皮改名操作系统,不可否认他们在权限审计方面做的比原版开源的操作系统更复杂更细腻(但是这些应该都可以自己通过 PAM 之类的配置吧)。由于工作原因需要接触当前主流的大部分 GNU/Linux、*BSD、国产操作系统,在目前已接触的多款所谓的基于 Debian 或 Fedora 二次开发的操作系统中感触最深的不是他们上面加的各种权限审计限制,而是他们改了包名导致在安装 deb 或者 rpm 包时出现各种依赖问题。例如 CentOS7 的 rpm 包标识为 el7 麒麟上面则改成了 ky10,在安装一些软件时由于依赖问题导致同名包安装不上,如果卸载系统上已有包可能会出现系统某些软件服务出现问题,如果不卸载则只能带上痛苦面具去解决冲突。真就自主研发靠改名了。国产的各种麒麟操作系统由于使用者多为政府单位,运行环境又是隔离内网,导致一般情况下只有安装光盘没有完整的软件源寻找软件源据说银河麒麟基于 CentOS7,但是通过测试最终添加 CentOS8 的源才可以用,因为他喵的 CentOS7 只有 x86_64,而 CentOS8 才有 aarch64,厂商的话都信不得哦。手动配置了 CentOS8 的源后,yum makecache 可以正常缓存,但是 yum -y update 会出现多个依赖错误问题,通过 yum -y install package-name 可以安装软件,但是依赖问题依然很难受。最终在配置好 CentOS8 与 Docker-ce 官方源后由于依赖问题放弃了通过 yum 在线安装,直接下载如下 rpm 包安装依然不行。通过二进制安装 docker通过在线软件源和 rpm 包不能直接安装,那么只能选择通过编译安装了,去官网找了下发现提供有编译好的 docker 二进制包,直接下载二进制包安装吧,感谢 golang 的跨平台性。安装条件64位的操作系统# uname -p aarch64Linux 内核版本 ≥ 3.10# uname -r 4. 19.90-17.ky10.aarch64iptables 版本 ≥ 1.4# iptables --version iptables v1.8.1 (legacy)一个 ps 可执行文件,通常由 procps 或类似的包提供。安装 Docker选择并下载 docker-ce 二进制包文件官网下载地址: Index of linux/static/stable/aarch64/wget https://download.docker.com/linux/static/stable/aarch64/docker-20.10.7.tgz解压下载好的压缩包tar -zxvf docker-20.10.7.tgz移动解压出来的二进制文件到 /usr/bin 目录中mv docker/* /usr/bin/测试启动dockerd添加 systemd添加 docker 的 systemd 服务脚本至 /usr/lib/systemd/system/脚本参考自 https://github.com/docker/docker-cevim /usr/lib/systemd/system/docker.service [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network-online.target docker.socket firewalld.service containerd.service Wants=network-online.target Requires=docker.socket containerd.service [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock ExecReload=/bin/kill -s HUP $MAINPID TimeoutStartSec=0 RestartSec=2 Restart=always # Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229. # Both the old, and new location are accepted by systemd 229 and up, so using the old location # to make them work for either version of systemd. StartLimitBurst=3 # Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230. # Both the old, and new name are accepted by systemd 230 and up, so using the old name to make # this option work for either version of systemd. StartLimitInterval=60s # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity # Comment TasksMax if your systemd version does not support it. # Only systemd 226 and above support this option. TasksMax=infinity # set delegate yes so that systemd does not reset the cgroups of docker containers Delegate=yes # kill only the docker process, not all processes in the cgroup KillMode=process OOMScoreAdjust=-500 [Install] WantedBy=multi-user.target根据 docker.service 中 Unit.After 需求添加 docker.socket 脚本至 /usr/lib/systemd/system/脚本参考自 https://github.com/docker/docker-cevim /usr/lib/systemd/system/docker.socket [Unit] Description=Docker Socket for the API [Socket] # If /var/run is not implemented as a symlink to /run, you may need to # specify ListenStream=/var/run/docker.sock instead. ListenStream=/run/docker.sock SocketMode=0660 SocketUser=root SocketGroup=docker [Install] WantedBy=sockets.target注意:如果缺少该文件,启动 docker 时会报如下错误:# systemctl start docker Failed to start docker.service: Unit docker.socket not found.根据 docker.service 中 Unit.After 需求添加 containerd.service 脚本至 /usr/lib/systemd/system/vim /usr/lib/systemd/system/containerd.service # Copyright The containerd Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. [Unit] Description=containerd container runtime Documentation=https://containerd.io After=network.target local-fs.target [Service] ExecStartPre=-/sbin/modprobe overlay ExecStart=/usr/bin/containerd Type=notify Delegate=yes KillMode=process Restart=always RestartSec=5 # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNPROC=infinity LimitCORE=infinity LimitNOFILE=infinity # Comment TasksMax if your systemd version does not supports it. # Only systemd 226 and above support this version. TasksMax=infinity OOMScoreAdjust=-999 [Install] WantedBy=multi-user.target注意:如果缺少该文件,启动 docker 时会报如下错误:# systemctl restart docker Failed to restart docker.service: Unit containerd.service not found.重载 systemd 配置文件systemctl daemon-reload创建 docker 组groupadd docker如不创建 docker 组在通过 systemctl 启动时会报错如下Dependency failed for Docker Application Container Engine. Job docker.service/start failed with result 'dependency'.启动 docker 服务systemctl start docker systemctl enable docker修改 docker 配置文件并查看安装好的 docker 基本信息在 /etc/docker/daemon.json 中添加如下内容:vim /etc/docker/daemon.json vim /etc/docker/daemon.json { "data-root":"/data/docker", "exec-opts":[ "native.cgroupdriver=systemd" ] }重启 docker 服务systemctl restart docker查看 docker info常用操作命令1.查看系统版本,确认版本 # cat /etc/kylin-release Kylin Linux Advanced Server release V10 (Tercel) 2. 查看系统架构(服务器如果是鲲鹏,架构是aarch64) # uname -p aarch64 3. 内核版本 # uname -r 4. 19.90-23.8.v2101.ky10.aarch64 4. iptables版本 # iptables --version iptables v1.8.1 (legacy) 5. 启动docker systemctl start docker systemctl enable docker 6. 获取操作系统的版本详细信息 lsb_release -a(第一种) cat /etc/os-release (第二种) 7. 查看系统是64位还是32位 第一种方式:getconf LONG_BIT 第二种方式:file /bin/ls 第三种方式:lsb_release -a 8. 查看linux版本 第一种方式使用这个命令查看 lsb_release -a 第二种方式使用这个命令查看cat /etc/issue(仅适用于linux) 第三种方式使用这个命令查看 执行cat /etc/redhat-release 9. 查看CPU配置信息 cat /proc/cpuinfo lscpu 10. 查看内存配置信息 cat /proc/meminfo 11. 查看硬盘信息 df -h 12. 查看当前linux的版本 cat /etc/redhat-release rpm -q centos-release 13. 修改DNS配置 vim /etc/resolv.conf 14. 查看外网IP curl cip.cc curl ifconfig.me curl ipinfo.io 15. 获取操作系统分支号 hostnamectl
2023年11月06日
1 阅读
0 评论
0 点赞
2023-10-26
LINUX 防火墙开放端口,查看状态,查看开放端口
1.查看防火墙状态:active (running) 即是开启状态systemctl status firewalld查看已开发端口命令:firewall-cmd --list-all新增防火墙开放端口:firewall-cmd --zone=public --add-port=3306/tcp --permanent开放端口后需要重新加载防火墙:firewall-cmd --reloadfirewalld的基本使用命令:启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld 开机启用 : systemctl enable firewalld配置firewalld-cmd命令查看版本: firewall-cmd --version 查看帮助: firewall-cmd --help 显示状态: firewall-cmd --state 查看所有打开的端口: firewall-cmd --zone=public --list-ports 更新防火墙规则: firewall-cmd --reload 查看区域信息: firewall-cmd --get-active-zones 查看指定接口所属区域: firewall-cmd --get-zone-of-interface=eth0 拒绝所有包:firewall-cmd --panic-on 取消拒绝状态: firewall-cmd --panic-off 查看是否拒绝: firewall-cmd --query-panicsystemctl相关命令启动一个服务:systemctl start firewalld.service 关闭一个服务:systemctl stop firewalld.service 重启一个服务:systemctl restart firewalld.service 显示一个服务的状态:systemctl status firewalld.service 在开机时启用一个服务:systemctl enable firewalld.service 在开机时禁用一个服务:systemctl disable firewalld.service 查看服务是否开机启动:systemctl is-enabled firewalld.service 查看已启动的服务列表:systemctl list-unit-files|grep enabled 查看启动失败的服务列表:systemctl --failed
2023年10月26日
0 阅读
0 评论
0 点赞
2023-10-24
【环境安装记录深入学习一:mysql数据库使用移动目录的方式进行迁移】Linux环境MySQL 的迁移(对data目录的直接拷贝)
MySQL迁移文档在虚拟机的测试MySQL直接复制data目录方式迁移测试环境服务器A: centos-release-7-8.2003.0.el7.centos.x86_64/MySQL 5.7.32 服务器B: centos-release-7-8.2003.0.el7.centos.x86_64/MySQL 5.7.32迁移步骤停止服务器A和服务器B的MySQL服务systemctl stop mysqld将服务器A的MySQL的data目录从服务器A,除了ib_logfile*外统一复制到服务器B的data目录下可能会报错,可以用cat /var/log/mysqld.log查看日志数据拷贝完成后:##进入到拷贝数据的目录 cd /var/lib/mysql/ ##因为上传的数据拥有者是root,我们需要变更成mysql chown -R mysql.mysql * ##这一步暂定,如果有报错,说无权限,则 chmod -R 777 * ## 配置文件中加上 lower_case_table_names=1 即可。 #是否对sql语句大小写敏感,1表示不敏感 vim /etc/my.cnf #加上这句话 lower_case_table_names=1报错解决办法报错一:mysqld: File '.\binlog.000005' not found (OS errno 2 - No such file or directory) 2022-07-19T01:01:20.153111Z 0 [ERROR] [MY-010958] [Server] Could not open log file. 2022-07-19T01:01:20.154277Z 0 [ERROR] [MY-010041] [Server] Can't init tc log提示找不到 “binlog.000005”文件,由于打不开这个文件,因此启动终止。这个是MySQL运行时使用的二进制日志文件,主要用于记录更改数据的语句,这里由于不知何种原因被删除了,造成MySQL服务无法正常启动。.\binlog.000004 .\binlog.000005解决方案可以看到最后一个文件为“binlog.000005”,解决的办法很简单,就是删除“binlog.index”文件,这样MySQL将默认重建“binlog.000001”二进制日志文件,MySQL服务正常启动!最后的最后systemctl start mysqld
2023年10月24日
1 阅读
0 评论
0 点赞
2023-10-24
windows server2016激活方法+密钥
Windows Server 2016激活方法及密钥激活方法Windows Server 2016的激活方法有多种,包括使用KMS激活、MAK激活、使用激活工具等。使用MAK密钥进行激活以下是使用MAK密钥进行激活的示例:slmgr /skms kms.03k.org slmgr /ipk WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY slmgr /ato在上面的示例中,我们使用slmgr命令行工具来进行激活。首先,我们使用slmgr /ipk命令来安装密钥,然后使用slmgr /ato命令来激活系统。当我们执行这个命令时,会提示激活成功。
2023年10月24日
0 阅读
0 评论
0 点赞
2023-10-24
【环境安装记录深入浅出Mysql的2059错误篇】2059-Authentication plugin ‘caching_sha2_password‘ 问题出现的原因及解决方法
2059-Authentication plugin ‘caching_sha2_password‘ cannot be loaded:问题出现的原因及解决方法1.出现原因安装的时候,选择了强加密规则caching_sha2_password,与之前的mysql的mysql_native_password规则不同,navicate驱动目前不支持新加密规则2.解决方法通过更改加密规则和刷新权限的方式mysql -uroot -ppassword #登录 use mysql; #选择数据库 # 远程连接请将'localhost'换成'%' ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #更改加密方式 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新用户密码 FLUSH PRIVILEGES; #刷新权限
2023年10月24日
11 阅读
0 评论
0 点赞
2023-10-24
【环境安装记录指定Mysql版本篇】CentOS7 离线安装mysql8数据库
第一步:下载离线安装包下载地址:https://dev.mysql.com/downloads/第二步:上传下载包到服务器上传文件mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar到服务器上。第三步:解压文件包切换到上传文件目录下运行如下命令:[root@gelong-vm1 rpms]# tar -vxf mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar mysql-community-libs-8.0.18-1.el7.x86_64.rpm mysql-community-devel-8.0.18-1.el7.x86_64.rpm mysql-community-embedded-compat-8.0.18-1.el7.x86_64.rpm mysql-community-libs-compat-8.0.18-1.el7.x86_64.rpm mysql-community-common-8.0.18-1.el7.x86_64.rpm mysql-community-test-8.0.18-1.el7.x86_64.rpm mysql-community-server-8.0.18-1.el7.x86_64.rpm mysql-community-client-8.0.18-1.el7.x86_64.rpm 第四步:卸载系统自带的数据库1.检查系统自带的 MariaDB检查系统是否自带MariaDB,命令如下:rpm -qa | grep mariadb如果系统自带MariaDB,删除掉,删除命令如下:rpm -e --nodeps mariadb-libs-5.5.44-2.el7.centos.x86_642.检查系统自带的mysql数据库安装包检查系统是否自带Mysql数据库,名利如下:rpm -qa | grep mysql如果系统自带mysql数据库,删除掉,删除命令如下:rpm -e --nodeps mysql-libs-5.1.73-8.el6_8.x86_64第五步:按照顺序安装mysql数据库按照如下顺序安装:rpm -ivh mysql-community-common-8.0.18-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-8.0.18-1.el7.x86_64.rpm rpm -ivh mysql-community-client-8.0.18-1.el7.x86_64.rpm rpm -ivh mysql-community-server-8.0.18-1.el7.x86_64.rpm rpm -ivh mysql-community-devel-8.0.18-1.el7.x86_64.rpm1.安装mysql-community-server-8.0.18-1.el7.x86_64.rpm 报错解决方案安装 mysql-community-server-8.0.18-1.el7.x86_64.rpm 的时候需要依赖 net-tools,如果没有 net-tools 会安装失败,此时先安装 net-tools,然后再安装 mysql-community-server-8.0.18-1.el7.x86_64.rpm 即可,安装命令如下:# 安装 mysql-community-server-8.0.25-1.el7.x86_64.rpm 依赖报错 [root@sangni mysql-installation]# rpm -ivh mysql-community-server-8.0.25-1.el7.x86_64.rpm 警告:mysql-community-server-8.0.25-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY 错误:依赖检测失败: net-tools 被 mysql-community-server-8.0.25-1.el7.x86_64 需要 # 安装 net-tools [root@sangni mysql-installation]# yum install net-tools 已加载插件:fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.njupt.edu.cn * extras: mirrors.njupt.edu.cn * updates: mirrors.njupt.edu.cn 正在解决依赖关系 --> 正在检查事务 ---> 软件包 net-tools.x86_64.0.2.0-0.25.20131004git.el7 将被 安装 --> 解决依赖关系完成 依赖关系解决 ================================================================================================================================== Package 架构 版本 源 大小 ================================================================================================================================== 正在安装: net-tools x86_64 2.0-0.25.20131004git.el7 base 306 k 事务概要 ================================================================================================================================== 安装 1 软件包 总下载量:306 k 安装大小:917 k Is this ok [y/d/N]: y Downloading packages: net-tools-2.0-0.25.20131004git.el7.x86_64.rpm | 306 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 警告:RPM 数据库已被非 yum 程序修改。 ** 发现 2 个已存在的 RPM 数据库问题, 'yum check' 输出如下: 2:postfix-2.10.1-9.el7.x86_64 有缺少的需求 libmysqlclient.so.18()(64bit) 2:postfix-2.10.1-9.el7.x86_64 有缺少的需求 libmysqlclient.so.18(libmysqlclient_18)(64bit) 正在安装 : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1 验证中 : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1 已安装: net-tools.x86_64 0:2.0-0.25.20131004git.el7 完毕! # net-tools 安装完成后再次安装 mysql-community-server-8.0.25-1.el7.x86_64.rpm [root@sangni mysql-installation]# rpm -ivh mysql-community-server-8.0.25-1.el7.x86_64.rpm 警告:mysql-community-server-8.0.25-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY 准备中... ################################# [100%] 正在升级/安装... 1:mysql-community-server-8.0.25-1.e################################# [100%]2.安装 rpm -ivh mysql-community-devel-8.0.18-1.el7.x86_64.rpm 报错解决方案[root@192 mysql]# rpm -ivh mysql-community-devel-8.0.18-1.el7.x86_64.rpm warning: mysql-community-devel-8.0.25-1.el7.x86_64.rpm: Header V3 DSA/SHA256 Signature, key ID 5072e1f5: NOKEY error: Failed dependencies: pkgconfig(openssl) is needed by mysql-community-devel-8.0.25-1.el7.x86_64解决办法yum install openssl-devel特别说明:关于mysql8之后的大小写问题在MySQL8中,数据目录初始化之后,不再允许更改lower_case_table_names=1的值;也就是说启动(重启)MYSQL时,lower_case_table_names的值必须于,初始化MYSOL时(安装 MYSOL后的首次启动)的值相同。由于我的业务是有需求的,所以我先设置关闭大小写验证 #进入目录 cd /etc/ #编辑my.cnf文件 vi /etc/my.cnf #添加内容 lower_case_table_names=1通常,0 表示大小写敏感,1 表示大小写不敏感。相关文章:CentOS 上查看 MySQL 的大小写敏感状态centos 安装MySQL 8.0 区分大小写解决方法第六步:启动mysql服务1.启动MYSQL服务:[root@gelong-vm1 rpms]# service mysqld start Redirecting to /bin/systemctl start mysqld.service2.查看启动状态:[root@gelong-vm1 rpms]# systemctl status mysqld.service ● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since 二 2023-09-05 14:19:46 CST; 38s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 15236 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS) Main PID: 15315 (mysqld) Status: "Server is operational" CGroup: /system.slice/mysqld.service └─15315 /usr/sbin/mysqld 9月 05 14:19:34 gelong-vm1 systemd[1]: Starting MySQL Server... 9月 05 14:19:46 gelong-vm1 systemd[1]: Started MySQL Server.第七步:修改默认密码开启远程连接1.查看默认密码:查看默认密码命令如下[root@gelong-vm1 rpms]# grep 'temporary password' /var/log/mysqld.log 2023-09-05T06:19:39.121134Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: iU/%Q(3w<AO*2.使用默认密码登录mysql:[root@gelong-vm1 rpms]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.23 Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.3.修改 root 用户密码:注意:这里修改的密码要足够复杂,包含大小和特殊符号;mysql> alter user 'root'@'localhost' identified by 'Houpu123!@#'; Query OK, 0 rows affected (0.62 sec) mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.23 | +-----------+ 1 row in set (0.00 sec)4.修改 root 用户的 host 列值,开启远程连接:修改运行远程连接命令如下:mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> UPDATE user SET `Host` = '%' WHERE `User` = 'root' LIMIT 1; Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select host from user; +-----------+ | host | +-----------+ | % | | localhost | | localhost | | localhost | +-----------+ 4 rows in set (0.00 sec)5.刷新缓存:重新刷新mysql的缓存内容命令:mysql> flush privileges; Query OK, 0 rows affected (0.47 sec) 6.给 root 用户授予所有权限:mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION; Query OK, 0 rows affected (0.02 sec) 解决远程连接时报错2059-Authentication plugin ‘caching_sha2_password‘安装的时候,选择了强加密规则caching_sha2_password,与之前的mysql的mysql_native_password规则不同,navicate驱动目前不支持新加密规则通过更改加密规则和刷新权限的方式 use mysql; #选择数据库 # 远程连接请将'%'换成'localhost' ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #更改加密方式 ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; #更新用户密码 FLUSH PRIVILEGES; #刷新权限8.退出mysql控制台:exit;
2023年10月24日
0 阅读
0 评论
0 点赞
2023-10-24
【环境安装记录Mysql卸载篇】Linux系统下Mysql卸载
前言在这之前先把Mysql卸载,记录一下卸载步骤。1.停止mysql服务systemctl stop mysqld2.查看mysql的rpm软件包rpm -qa |grep -i mysql3.删除这些查询到的软件包yum remove mysql-community-libs.x86_64先删libs,再删除剩下的两个。4.删除与mysql相关的linux本地文件先查找到这些文件find / -name mysql再删除对应文件rm -rf xxx #找到的文件目录5.最后删除mysql配置文件rm -rf /etc/my.cnf
2023年10月24日
4 阅读
0 评论
0 点赞
2023-10-21
【环境安装记录libreoffice篇】Centos7.2上安装libreoffice7.1.0.2
环境准备系统环境[root@myhost ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) [root@myhost ~]# firewall-cmd --state #查看防火墙的状态 running [root@myhost ~]# firewall-cmd --list-ports #查看防火墙已经开放的端口 [root@myhost ~]# firewall-cmd --list-services #查看防火墙开放的服务 dhcpv6-client ssh #httpd服务默认的端口是80,防火墙允许80/tcp端口访问 [root@myhost ~]# firewall-cmd --zone=public --permanent --add-port=80/tcp success #mysql服务端默认的端口是3306,防火墙允许3306/tcp端口访问 [root@myhost ~]# firewall-cmd --zone=public --permanent --add-port=3306/tcp success [root@myhost ~]# firewall-cmd --reload #重新加载防火墙配置 success [root@myhost ~]# setenforce 0 && getenforce Permissive [root@myhost ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/sysconfig/selinux [root@myhost ~]# cat /etc/sysconfig/selinux [root@myhost ~]# ping www.baidu.com PING www.a.shifen.com (220.181.38.150) 56(84) bytes of data. 64 bytes from 220.181.38.150: icmp_seq=1 ttl=52 time=33.6 ms 64 bytes from 220.181.38.150: icmp_seq=2 ttl=52 time=34.8 ms 64 bytes from 220.181.38.150: icmp_seq=3 ttl=52 time=35.2 ms ......升级操作系统[root@myhost tools]# yum update -y 安装依赖包[root@myhost tools]# yum install -y cups-libs cairo安装下载安装包安装包下载地址:https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.0.2/rpm/x86_64/LibreOffice_7.1.0.2_Linux_x86-64_rpm.tar.gzhttps://downloadarchive.documentfoundation.org/libreoffice/old/7.1.0.2/rpm/x86_64/LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk.tar.gz[root@myhost ~]# cd /home/tools/ [root@myhost tools]# wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.0.2/rpm/x86_64/LibreOffice_7.1.0.2_Linux_x86-64_rpm.tar.gz [root@myhost tools]# wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.0.2/rpm/x86_64/LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk.tar.gz [root@myhost tools]# ll 总用量 37048 -rw-r--r-- 1 root root 217813520 5月 14 10:10 kkFileView-3.5.1.tar.gz -rw-r--r-- 1 root root 38540015 5月 14 14:08 LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk.tar.gz -rw-r--r-- 1 root root 269379828 1月 16 2021 LibreOffice_7.1.0.2_Linux_x86-64_rpm.tar.gz 创建安装目录[root@myhost tools]# mkdir /opt/libreoffice7.1/把下载的包上传到目录/opt/libreoffice7.1/中[root@myhost tools]# cd /opt/libreoffice7.1/ [root@myhost libreoffice7.1]# ll 总用量 0 [root@myhost libreoffice7.1]# cp /home/tools/LibreOffice_7.1.0.2_Linux_x86-64_rpm* ./ [root@myhost libreoffice7.1]# ll 总用量 300708 -rw-r--r-- 1 root root 38540015 9月 7 10:51 LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk.tar.gz -rw-r--r-- 1 root root 269379828 9月 7 10:51 LibreOffice_7.1.0.2_Linux_x86-64_rpm.tar.gz解压安装包[root@myhost libreoffice7.1]# tar xf LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk.tar.gz [root@myhost libreoffice7.1]# tar xf LibreOffice_7.1.0.2_Linux_x86-64_rpm.tar.gz [root@myhost libreoffice7.1]# ll 总用量 300708 drwxr-xr-x 4 root root 45 1月 15 2021 LibreOffice_7.1.0.2_Linux_x86-64_rpm drwxr-xr-x 3 root root 17 1月 15 2021 LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk -rw-r--r-- 1 root root 38540015 9月 7 10:51 LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk.tar.gz -rw-r--r-- 1 root root 269379828 9月 7 10:51 LibreOffice_7.1.0.2_Linux_x86-64_rpm.tar.gz 分别进入解压之后的目录中执行安装命令[root@myhost libreoffice7.1]# cd /opt/libreoffice7.1/LibreOffice_7.1.0.2_Linux_x86-64_rpm/RPMS [root@myhost RPMS]# pwd /opt/libreoffice7.1/LibreOffice_7.1.0.2_Linux_x86-64_rpm/RPMS [root@myhost RPMS]# yum localinstall -y *.rpm [root@myhost RPMS]# cd ../../ [root@myhost libreoffice7.1]# cd /opt/libreoffice7.1/LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk/RPMS/ [root@myhost RPMS]# pwd /opt/libreoffice7.1/LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk/RPMS [root@myhost RPMS]# yum localinstall -y *.rpm [root@myhost RPMS]# cd ../../确认安装是否成功### 默认安装到创建的目录中 [root@myhost libreoffice7.1]# pwd /opt/libreoffice7.1 [root@myhost libreoffice7.1]# ll 总用量 303412 -rw-r--r-- 1 root root 1709564 1月 15 2021 CREDITS.fodt drwxr-xr-x 3 root root 4096 9月 7 10:56 help drwxr-xr-x 4 root root 45 1月 15 2021 LibreOffice_7.1.0.2_Linux_x86-64_rpm drwxr-xr-x 3 root root 17 1月 15 2021 LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk -rw-r--r-- 1 root root 38540015 9月 7 10:51 LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk.tar.gz -rw-r--r-- 1 root root 269379828 9月 7 10:51 LibreOffice_7.1.0.2_Linux_x86-64_rpm.tar.gz -rw-r--r-- 1 root root 472959 1月 15 2021 LICENSE -rw-r--r-- 1 root root 544263 1月 15 2021 LICENSE.html -rw-r--r-- 1 root root 5026 1月 15 2021 NOTICE drwxr-xr-x 7 root root 75 9月 7 10:56 presets drwxr-xr-x 11 root root 12288 9月 7 10:57 program drwxr-xr-x 2 root root 25 9月 7 10:56 readmes drwxr-xr-x 11 root root 4096 9月 7 11:00 sdk drwxr-xr-x 36 root root 4096 9月 7 10:57 share ### 删除安装包和解压包 [root@myhost libreoffice7.1]# rm -rf LibreOffice_7.1.0.2_Linux_x86-64_rpm LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk [root@myhost libreoffice7.1]# rm -rf LibreOffice_7.1.0.2_Linux_x86-64_rpm_sdk.tar.gz LibreOffice_7.1.0.2_Linux_x86-64_rpm.tar.gz [root@myhost libreoffice7.1]# ll 总用量 2704 -rw-r--r-- 1 root root 1709564 1月 15 2021 CREDITS.fodt drwxr-xr-x 3 root root 4096 9月 7 10:56 help -rw-r--r-- 1 root root 472959 1月 15 2021 LICENSE -rw-r--r-- 1 root root 544263 1月 15 2021 LICENSE.html -rw-r--r-- 1 root root 5026 1月 15 2021 NOTICE drwxr-xr-x 7 root root 75 9月 7 10:56 presets drwxr-xr-x 11 root root 12288 9月 7 10:57 program drwxr-xr-x 2 root root 25 9月 7 10:56 readmes drwxr-xr-x 11 root root 4096 9月 7 11:00 sdk drwxr-xr-x 36 root root 4096 9月 7 10:57 share ### 查看命令是否已经存在,命令存在则证明安装成功 [root@myhost libreoffice7.1]# whereis libreoffice7.1 libreoffice7: /usr/bin/libreoffice7.1启动服务[root@myhost libreoffice7.1]# /usr/bin/libreoffice7.1 --headless --accept="socket,host=0.0.0.0,port=8100;urp;" --nofirststartwizard ### 耐心等待一下,这个启动过程稍微有点查看端口或者进程是否启动[root@myhost libreoffice7.1]# netstat -lntup | grep 8100 tcp 0 0 0.0.0.0:8100 0.0.0.0:* LISTEN 94008/soffice.bin [root@myhost libreoffice7.1]# ps -ef |grep soffice root 94008 93976 0 11:05 pts/1 00:00:00 /opt/libreoffice7.1/program/soffice.bin --headless --accept=socket,host=0.0.0.0,port=8100;urp; --nofirststartwizard root 94188 29770 0 11:15 pts/0 00:00:00 grep --color=auto soffice
2023年10月21日
3 阅读
0 评论
0 点赞
1
...
16
17
18
...
27