1、安装 translate-shellDebian installsudo apt install translate-shellArch by yay installsudo yay -S translate-shell2、使用方法翻译 'hello world'trans 'hello world'翻译 'hello world'trans [hello world]中文翻译英文 '干得漂亮'trans zh:en '干得漂亮' 3、查询语言支持情况trans -T../../md/Linux服务器/
设置为当前时间date -s "2020-08-31 14:08:45"写入bios,避免重启失效。hwclock -w../../md/Linux服务器/
server { # 主页转发 location / { proxy_pass http://192.168.0.xx:80; } # 或者其他路径转发 location /a/ { proxy_pass http://192.168.0.xx:80/; } }../../md/Linux服务器/
默认情况下 Nginx 的日志 logs 是关闭的开启方法:1、打开 nginx.conf 配置文件sudo vim /etc/nginx/nginx.conf2、去掉 logs 前面的 # 注释error_log logs/error.log; error_log logs/error.log notice;3、在 /etc/nginx 目录中创建 logs 目录sudo mkdir /etc/nginx/logs4、重启服务sudo systemctl restart nginx5、查看日志cat /etc/nginx/logs/error.log../../md/Linux服务器/
1.控制命令Ctrl + l:清屏(与clear命令效果相同)Ctrl + o:执行当前命令,并选择上一条命令Ctrl + s:阻止屏幕输出(当前正在执行的命令不在打印信息)Ctrl + q:允许屏幕输出(使用Ctrl+s命令后,可以用Ctrl+q恢复)Ctrl + c:终止当前正在执行的命令Ctrl + z:挂起命令,把当前进程转到后台运行,使用fg命令恢复。Ctrl + d : 退出当
安装LNMP一键安装包或者通过yum命令安装软件都是需要通过CentOS系统上设置的源进行的,一般情况下系统源一般为网络源,但是在一些内网或者某些单位保密等原因限制联网的环境中需要安装LNMP或者通过yum安装一些软件包,这里我们就需要使用CentOS的光盘来搭建一个本地源来实现离线或无网络安装。下面说一下具体步
1、新建 service 文件vi /usr/lib/systemd/system/nginx.service2、记录以下内容[Unit] Description=nginx After=network.target [Service] Type=forking ExecStart=/usr/local/nginx/sbin/nginx ExecReload=/usr/local/nginx/sbin/nginx -s reload ExecStop=/usr/local/nginx/sbin/nginx -s quit PrivateTmp=true [Install] WantedBy=multi-user.target3、设置开机启动systemctl enable nginx.service4、查看状态system
1、版本MySQL 5.6 以上2、配置访问权限vim /etc/my.cnf[client] host=localhost user=你的数据库用户 password='你的数据库密码'3、编写备份脚本vim backup.sh#!/bin/bash backupDir=/opt/web/_backup backupTime=`date +%Y-%m-%d@%Hh%Mm%Ss` logDir=$backupDir"/mysql.log" if [ ! -d "$logDir" ]; then touch $logDir fi echo "["$backupTime"]【start】备份任务
1、命令格式命令 [-选项] [参数]例如:ls -la /etc2、目录处理命令命令:ls 查看当前目录文件原意:list 路径:/bin/ls 权限:所有用户 功能:显示目录文件 语法:ls 选项[-alh] -a all 显示所有 -l long 长格式显示 -d dir 只看目录本身信息 -i id 查看id -h human 人性化显示(GB、MB、KB单
1、chmod 改变文件(目录)权限原意:change the permissions mode of a file 路径:/bin/chmod 权限:所有用户 语法:chmod [{ugoa}{+-=}{rwx}][文件或目录 chmod [mode=421][文件或目录] chmod -R 递归修改 用例:chmod u+x 123.txt #所有者添加执行权限 chmod g+w,o-r 123.txt #所属组添加写权限,其他人取消读权限 c