随笔分类 -  2023Linux基础

1
摘要:1 安装nginx yum install -y gcc make pcre-devel zlib-devel openssl-develwget https://nginx.org/download/nginx-1.20.1.tar.gztar -zxvf nginx-1.20.1.tar.gzc 阅读全文
posted @ 2023-11-13 14:02 Sinsen柳 阅读(377) 评论(0) 推荐(0) 编辑
摘要:【精选】【Grafana】基于CentOS 7系统安装部署Grafana服务端_源码安装granafa centos 编译-CSDN博客 #修改主机名(可选)hostnamectl set-hostname grafanabashhostnamectl 显示:Static hostname: gra 阅读全文
posted @ 2023-11-03 15:57 Sinsen柳 阅读(355) 评论(0) 推荐(0) 编辑
摘要:# 创建用户git,指定登录shell为Bash,-d指定家目录默认/home/git,-m如果指定的家目录不存在,则创建该目录# 踩坑:-r 不分配登录shell和家目录useradd -s /bin/bash -d -m git #编辑 /etc/sudoers 文件以允许 git 用户在执行 阅读全文
posted @ 2023-11-01 17:00 Sinsen柳 阅读(639) 评论(0) 推荐(0) 编辑
摘要:1 报错: Host ‘127.0.0.1’ is not allowed to connect to this MySQL server vi /etc/my.cnf 注释掉: #skip-name-resolve 2 报错:Access denied for user 'root'@'local 阅读全文
posted @ 2023-10-18 17:57 Sinsen柳 阅读(6) 评论(0) 推荐(0) 编辑
摘要:#关闭防火墙和SElinux安全模式:systemctl stop firewalldsystemctl disable firewalldsetenforce 0getenforce会显示:Permissive 关闭防火墙 systemctl stop iptablessystemctl disa 阅读全文
posted @ 2023-09-05 15:50 Sinsen柳 阅读(10) 评论(0) 推荐(0) 编辑
摘要:1 yum install --downloadonly : #下载yumdownloadonly插件yum install yum-plugin-downloadonly #yum 下载rpm包到指定目录,只下载不安装yum install --downloadonly --downloaddir 阅读全文
posted @ 2023-08-04 15:30 Sinsen柳 阅读(2190) 评论(1) 推荐(0) 编辑
摘要:写一个脚本,本地自带nginx1.24源码包,然后自动完成安装,并加入system管理。并设置开启自启动,并启动ng。并完成对80端口的curl测试,返回状态码200打印启动正常的消息: #!/bin/bash # 安装依赖 sudo apt-get update sudo apt-get inst 阅读全文
posted @ 2023-08-04 15:23 Sinsen柳 阅读(33) 评论(0) 推荐(0) 编辑
摘要:创建一个文件夹,把四个配置文件放进去,然后运行:docker compose -f -d nacos.yml up mysql-schema.sql nacos.confnacos.envnacos.yml mysql-schema.sql 内容: /* * Copyright 1999-2018 阅读全文
posted @ 2023-07-26 13:49 Sinsen柳 阅读(63) 评论(0) 推荐(0) 编辑
摘要:安装Docker和Docker Compose: 安装预置:sudo yum updateyum install python3-pipsudo yum group install "Development Tools"sudo yum install epel-releasesudo yum in 阅读全文
posted @ 2023-07-11 18:07 Sinsen柳 阅读(53) 评论(0) 推荐(0) 编辑
摘要:安装Docker和Docker Compose: 安装预置:sudo yum updateyum install python3-pipsudo yum group install "Development Tools"sudo yum install epel-releasesudo yum in 阅读全文
posted @ 2023-07-11 16:00 Sinsen柳 阅读(43) 评论(0) 推荐(0) 编辑
摘要:[root@localhost ~]# vim ~/.bashrc [root@localhost ~]#[root@localhost ~]# source ~/.bashrc[root@localhost ~]# 改/etc/profile也行 vi /etc/profile source /e 阅读全文
posted @ 2023-07-06 16:26 Sinsen柳 阅读(881) 评论(0) 推荐(1) 编辑
摘要:cd /home/soft/redis/config vi sentinel-26379.conf : port 26379sentinel monitor mymaster 192.168.75.10 6379 2 vi sentinel-26380.conf :port 26380sentine 阅读全文
posted @ 2023-07-05 15:30 Sinsen柳 阅读(196) 评论(0) 推荐(0) 编辑
摘要:#查看文件的权限ls -l /path/to/file #查看目录的权限ls -ld /path/to/directory chmod 777 可以应用于文件夹和文件,它将赋予所有者、所属组和其他用户全部的读取、写入和执行权限。chmod 755 主要用于文件夹,它给予所有者读取、写入和执行的权限, 阅读全文
posted @ 2023-07-04 15:54 Sinsen柳 阅读(1818) 评论(0) 推荐(0) 编辑
摘要:要在CentOS 7上使用Docker部署3个主Redis节点和3个从Redis节点,你可以按照以下步骤进行操作: 安装Docker:首先,确保已经安装了Docker。可以执行以下命令来检查是否已安装Docker: docker version如果未安装Docker,请根据Docker官方文档的指导 阅读全文
posted @ 2023-07-03 14:40 Sinsen柳 阅读(342) 评论(0) 推荐(0) 编辑
摘要:要在CentOS 7虚拟机上部署Redis主备架构,您可以按照以下步骤进行操作: 准备工作: 确保您已经安装了两台CentOS 7虚拟机,并分别设置了IP地址为192.168.75.11和192.168.75.12。在每台虚拟机上使用以下命令进行更新:sudo yum update安装Redis: 阅读全文
posted @ 2023-07-03 11:13 Sinsen柳 阅读(54) 评论(0) 推荐(0) 编辑
摘要:1 vi icbc.sh #!/bin/bash # 创建用户icbc useradd -m -u 1001 icbc # 设置家目录为/data/icbc usermod -d /data/icbc icbc # 将icbc用户添加到sudoers文件中 echo "icbc ALL=(ALL) 阅读全文
posted @ 2023-06-09 17:14 Sinsen柳 阅读(18) 评论(0) 推荐(0) 编辑
摘要:可以开启一个对应基础镜像版本的docker,进去测试Dockerfile的命令: docker run -it --name mycontainer --network=bridge --privileged centos:7.9.2009 bash docker exec -it a359bc85 阅读全文
posted @ 2023-05-25 16:05 Sinsen柳 阅读(49) 评论(0) 推荐(0) 编辑
摘要:在线安装: 官方教程: https://docs.docker.com/engine/install/centos/ sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docke 阅读全文
posted @ 2023-05-24 16:26 Sinsen柳 阅读(1002) 评论(0) 推荐(1) 编辑
摘要:yum remove python-3* 先卸载所有之前装的python-3。 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc mak 阅读全文
posted @ 2023-05-24 16:00 Sinsen柳 阅读(173) 评论(0) 推荐(0) 编辑
摘要:在CentOS 7中下载、编译和安装Nginx 1.20.1源代码需要以下步骤: 安装编译环境及相关依赖sudo yum install -y gcc make pcre-devel zlib-devel openssl-devel 下载Nginx 1.20.1版本源代码进入Nginx官网https 阅读全文
posted @ 2023-05-24 13:28 Sinsen柳 阅读(288) 评论(0) 推荐(0) 编辑

1
点击右上角即可分享
微信分享提示