CentOS

Coldfusion 2018 vs 11, Centos 6 vs 7, handling of symlinks

三世轮回 提交于 2021-01-27 12:30:52
问题 I'm getting different outputs from getCurrentTemplatePath in CF2018 on Centos7 vs CF11 on Centos6 /path/to/folder contains a symlink v1 which points to /path/to/v1 With an apache website using DocumentRoot /path/to/folder , then visiting /v1 in a browser, the index.cfm dumps out expandPath('.') and getCurrentTemplatePath() in CF11 on Centos6, I get: expandPath: /path/to/v1 getCurrentTemplatePath: /path/to/v1/index.cfm in CF2018 on Centos7, I get: expandPath: /path/to/v1 getCurrentTemplatePath

cannot get environment variables set in Flask application

浪尽此生 提交于 2021-01-27 07:21:03
问题 I tried to set up sensitive information as environment variables in CentOS, and pass them to Flask config file used in main file, i.e. init .py . But it did not work. The Flask application is running under Apache. I first edit /etc/environment as root user MAIL_USERNAME="abcde@abc.com" then logout, login again Then verify MAIL_USERNAME is set by running echo $MAIL_USERNAME This works fine And in configuration.py, this is how I set MAIL_USERNAME. MAIL_USERNAME = os.environ.get('MAIL_USERNAME')

cannot get environment variables set in Flask application

十年热恋 提交于 2021-01-27 07:18:23
问题 I tried to set up sensitive information as environment variables in CentOS, and pass them to Flask config file used in main file, i.e. init .py . But it did not work. The Flask application is running under Apache. I first edit /etc/environment as root user MAIL_USERNAME="abcde@abc.com" then logout, login again Then verify MAIL_USERNAME is set by running echo $MAIL_USERNAME This works fine And in configuration.py, this is how I set MAIL_USERNAME. MAIL_USERNAME = os.environ.get('MAIL_USERNAME')

Where is the STDOUT and STDERR output of a crontab job

笑着哭i 提交于 2021-01-27 04:55:15
问题 Does any body know where is the STDOUT and STDERR of a normal crontab job output in CentOS? I checked the /var/log/cron file, but it only record the time and command of a cron job executed, no STDOUT or STDERR content found there. 回答1: Have a look on /etc/rsyslog.d/ there you should can change loglevel of cron . #cron.* /var/log/cron.log removing the # = maximum logging cron.err /var/log/cron.log only error log 来源: https://stackoverflow.com/questions/28067714/where-is-the-stdout-and-stderr

Linux系统磁盘管理

▼魔方 西西 提交于 2021-01-26 19:38:35
随着在虚拟机中存储的东西的逐渐的增加,虚拟机的硬盘也逐渐告急,因此急需拓展一块新的虚拟磁盘。以下便是在VMware 中添加新的虚拟磁盘的方法: 查看现有磁盘 [root@chao ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 20G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 19G 0 part ├─ centos -root 253:0 0 17G 0 lvm / └─centos-swap 253:1 0 2G 0 lvm [SWAP] sr0 11:0 1 4.2G 0 rom 添加磁盘 选择硬盘 选择类型 新磁盘 设置大小 重启服务器 [root@chao ~]# reboot 创建分区 [root@chao ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 20G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 19G 0 part ├─centos-root 253:0 0 17G 0 lvm / └─centos-swap 253:1 0 2G 0 lvm [SWAP] sdb 8:16 0 20G 0 disk sr0

vmware15.5+centos8的Linux环境ping不通外网,怎么处理?

被刻印的时光 ゝ 提交于 2021-01-26 16:36:18
步骤1:设置静态固定ip:先换桥接模式,然后 cd /etc/sysconfig/network-scripts/ ,使用vi进行编辑:对象文件名是:ifcfh-ens33 如下:(有中文的地方需要修改或者原本没有的就添加) TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static #启用静态IP DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=ens33 ONBOOT=yes #系统启动时激活网卡 IPADDR=192.168.31.50 #你的IP地址 DNS1=114.114.114.114 #设置DNS1 DNS2=8.8.8.8 #设置DNS2 NETMASK=255.255.255.0 #设置子网掩码 GATEWAY=192.168.31.1 #设置网关 DEVICE=ens33 #网卡名 之后,保存退出。 步骤2: centos8中有2个网卡设备:ens33和virbr0 从你的截图中可以看到,你手动配置了ens33,添加的内容都正确,其实没有激活的原因

使用nexus搭建公司内部yum源

帅比萌擦擦* 提交于 2021-01-26 10:29:29
使用nexus搭建公司内部yum源 本文搭建的为 Centos 7 本身源和 epel 源,公网源使用的为腾讯的源,可根据情况自己设置。 一,设置 Centos 7 yum源 登陆 nexus 服务器,在设置创建 proxy 源。 1,创建 proxy 源 Create repository -> yum(proxy)-> 填入 name -> Enter a URL 我添加了4个情况如下: Name centos7-centosplus Format yum type proxy Remote storage https://mirrors.cloud.tencent.com/centos/7/centosplus/x86_64/ Name centos7-extras Format yum type proxy Remote storage https://mirrors.cloud.tencent.com/centos/7/extras/x86_64/ Name centos7-os Format yum type proxy Remote storage https://mirrors.cloud.tencent.com/centos/7/os/x86_64/ Name centos7-updates Format yum type proxy Remote storage

centos free详解

烈酒焚心 提交于 2021-01-26 03:48:35
CentOS 6及以前 $ free total used free shared buffers cached Mem: 4040360 4012200 28160 0 176628 3571348 -/+ buffers/cache: 264224 3776136 Swap: 4200956 12184 4188772 $ 内存的使用分作4部分: A. 程序使用的; B. 未被分配的; C. Buffers (buffer cache) D. Cached (page cache) 显然,A (程序使用的) 肯定是used,B (未被分配的) 肯定是free。但是,C (Buffers) 和 D (Cached) 是算作used还是算作free呢?一方面,它们已经被分配了,可以算作used;另一方面,当程序需要时,可以回收它们来使用,可以算作free。所以,怎么算都合理。 这就是在free命令的output中,第一行和第二行的区别 : 第一行(Mem):Buffers和Cached被算作used。也就是说,它的free是指 B (未被分配的);它的used是指 A + C + D; 第二行(-/+ buffers/cache):Buffers和Cached被算作free。也就是说,它的used是指 A (程序使用的);它的free是指 B + C + D;行名称“-/+

Prometheus安装

一世执手 提交于 2021-01-26 03:39:44
Prometheus安装 下载地址: https://prometheus.io/download/ 现在时间是: 2019.09.07 安装环境: Linux centos7 minimal 虚拟机; 宿主主机 MacOS; 软件: virtualBox 6.0.10 r132072 选用版本: prometheus-2.12.0.linux-amd64.tar.gz 二进制包安装 1.安装虚拟机 下载镜像 在virtualbox安装虚拟机 配置网络 更换国内源 【CentOS7】yum安装时出现错误[Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; Unknown e的解决办法 2.配置 以及 安装依赖 配置网络使用网络地址转换模式 主机名 配置主机名可以快速辨识 时钟 prometheus是个时序数据库,对时间要求极高,所以安装时间同步的工具,设置时区为东八区, Asia/shanghai 资料 #安装服务 > yum install ntp -y #开机启动 > systemctl enable ntpd #设置时区 > timedatectl set-timezone Asia/Shanghai #查看时区 > timedatectl 3.安装prometheus