标签:centos

宝塔7.8快速降级7.7办法

阅读(556)

正常安装宝塔7.8 yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh i...

shell判断软件是否安装

阅读(1193)

写安装脚本时,需要判断环境是否完整,例如判断git、python3等环境是否正常,通过下述可以实现。 #!/bin/bash if ! [ -x "$(command -v git)" ]; then echo 'Error: git is...

shell 判断文件夹或文件是否存在

阅读(830)

文件夹不存在则创建 if [ ! -d "/data/" ];then mkdir /data else echo "文件夹已经存在" fi 文件存在则删除 if [ ! -f "/data/filename" ];then echo "文...

查看 SELinux状态及关闭SELinux

阅读(708)

查看SELinux状态: 1、/usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态 SELinux status: enabled 2、getenforce ##也可以用这个命令检...

Nginx打开目录浏览功能

阅读(640)

Nginx默认是不允许列出整个目录的。如需此功能,打开nginx.conf文件或你要启用目录浏览虚拟主机的配置文件,在server或location 段里添加上autoindex on;来启用目录流量,下面会分情况进行说明。 另外Nginx...

更换sqlite3 为pysqlite3-泰恩数据

更换sqlite3 为pysqlite3

阅读(1053)

Python3.9环境运行django最新版本,即使更新了centos的sqlite3版本仍然会报错。出错提示如下: “django.db.utils.NotSupportedError: deterministic=True requir...

centos7 安装python3-泰恩数据

centos7 安装python3

阅读(641)

centos7自带python2.7,如果要使用python3需要另外安装。而系统的其他部件需要python2,所以安装的时候一般是要求python2和python3共存。 #安装依赖 yum install openssl-devel b...