systemd

CentOS7关闭防火墙方法

限于喜欢 提交于 2020-01-25 10:07:12
在之前的版本中关闭防火墙等服务的命令是 service iptables stop /etc/init.d/iptables stop 在RHEL7中,其实没有这个服务 [root@rhel7 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.0 (Maipo) [root@rhel7 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service [root@rhel7 ~]# /etc/init.d/iptables stop -bash: /etc/init.d/iptables: No such file or directory 原来在RHEL7开始,使用systemctl工具来管理服务程序,包括了service和chkconfig [root@rhel7 ~]# systemctl list-unit-files|grep enabled cups.path enabled abrt-ccpp.service enabled abrt-oops.service enabled abrt-vmcore.service enabled abrt-xorg.service enabled

CentOS7关闭防火墙方法

与世无争的帅哥 提交于 2020-01-25 10:06:38
在之前的版本中关闭防火墙等服务的命令是 service iptables stop /etc/init.d/iptables stop 在RHEL7中,其实没有这个服务 [root@rhel7 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.0 (Maipo) [root@rhel7 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service [root@rhel7 ~]# /etc/init.d/iptables stop -bash: /etc/init.d/iptables: No such file or directory 原来在RHEL7开始,使用systemctl工具来管理服务程序,包括了service和chkconfig [root@rhel7 ~]# systemctl list-unit-files|grep enabled cups.path enabled abrt-ccpp.service enabled abrt-oops.service enabled abrt-vmcore.service enabled abrt-xorg.service enabled

centOs关闭防火墙

大憨熊 提交于 2020-01-25 10:05:38
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running) [root@localhost ~]#firewall-cmd --state not running 检查防火墙的状态: 从centos7开始使用systemctl来管理服务和程序,包括了service和chkconfig。 [root@localhost ~]#systemctl list-unit-files|grep firewalld.service --防火墙处于关闭状态 firewalld.service disabled 或者 [root@localhost ~]#systemctl status firewalld.service firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) 关闭防火墙: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service

Centos7 Firewall

狂风中的少年 提交于 2020-01-25 10:00:26
1.1 firewall启停设置 [root@tomcat ~]# systemctl stop firewalld.service #关闭firewall [root@tomcat ~]# systemctl status firewalld.service #查看状态 ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Mar 13 09:28:55 tomcat systemd[1]: Starting firewalld - dynamic firewall daemon... Mar 13 09:28:56 tomcat systemd[1]: Started firewalld - dynamic firewall daemon. Mar 13 09:32:07 tomcat systemd[1]: Stopping firewalld - dynamic firewall daemon... Mar 13 09:32:08 tomcat systemd[1]: Stopped

CentOS7.6.1810 安装Ngnix

喜夏-厌秋 提交于 2020-01-25 09:58:54
系统基础环境: # cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) # cat /proc/version Linux version 3.10.0-957.5.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Fri Feb 1 14:54:57 UTC 2019 安装方法一:源码编译安装 基础环境 : CentOS Linux release 7.6.1810 (Core) 目录:/usr/local/src 1.1、安装前准备(根据各软件最新版本信息更改url) 下载nginx、openssl、zlib、pcre # cd /usr/local/src # wget http://nginx.org/download/nginx-1.16.0.tar.gz # wget http://www.openssl.org/source/openssl-fips-2.0.10.tar.gz # wget http://zlib.net/zlib-1.2.11.tar.gz # wget https://ftp.pcre.org/pub

How to add console outputs Node.js app in the log access NGINX file?

安稳与你 提交于 2020-01-24 09:48:06
问题 I have an Node.js app setting up with systemd. The app running behind NGINX. I would like to add console output of my Node.js application in the log access NGINX file ? How can I do this ? Thanks in advance. 回答1: More simple way is hook console.log and call console.log as usually. var util = require('util'); var JFile = require("jfile"); var nxFile = new JFile('/var/log/nginx/access.log'); ... process.stdout.write = (function(write) { return function(text, encoding, fd) { write.apply(process

linux下安装jsp开发运行环境(centos7)

谁都会走 提交于 2020-01-24 02:39:21
1 开发环境包括   1)apache-tomcat   2)java-jdk   3)mysql 2 apache-tomcat安装(应该先装java再装tomcat)   1)到官网下载最新版本(不建议用yum安装)   2)解压到你喜欢的目录(比如/usr/tomcat)   3)启动     /usr/tomcat/apache-tomcat-7.0.85/bin/./startup.sh   4)设置为开机启动     a. vi /usr/tomcat/apache-tomcat-7.0.85/bin/setclasspath.sh       末端添加:          export JAVA_HOME=/usr/java/jdk1. 7.0_71(你安装java的路径)          export JRE_HOME=/usr/java/jdk1. 7.0_71/jre     b. vi /usr/tomcat/apache-tomcat-7.0.85/bin/setenv.sh        #add tomcat pid       CATALINA_PID= "$CATALINA_BASE/tomcat.pid"        #add java opts       JAVA_OPTS= "-server -XX:PermSize=256M -XX

airflow systemd fails due to gunicorn

余生长醉 提交于 2020-01-23 01:49:05
问题 I am unable to start the airflow webserver using systemd even though it starts and functions properly outside of systemd like so: export AIRFLOW_HOME=/path/to/my/airflow/home ; airflow webserver -p 8080 The systemd log leads me to believe that the issue comes from gunicorn, even though gunicorn starts without issue when I run the above command (i.e. it's only an issue in systemd). I have configured the following systemd files according to the airflow docs (running Ubuntu 16). /etc/default

docker网络配置方法总结

孤街浪徒 提交于 2020-01-23 01:49:02
1. docker报【Error response from daemon: Error running DeviceCreate (createSnapDevice) dm_task_run failed】错 解决办法: # systemctl stop docker.service # thin_check /var/lib/docker/devicemapper/devicemapper/metadata If there were no errors then proceed with: # thin_check --clear-needs-check-flag /var/lib/docker/devicemapper/devicemapper/metadata # systemctl start docker.serviceIf there were errors, you are on your own, but 'man thin_check' and 'man thin_repair' may be helpful... ======================================================== 2. docker默认添加的iptables(ip相关的自己定制): docker nat表部分: docker0IP=

如何使用Systemctl管理系统服务和单元?

ぐ巨炮叔叔 提交于 2020-01-22 20:18:18
chu原文: How To Use Systemctl to Manage Systemd Services and Units 简书: 如何使用Systemctl管理系统服务和单元? 引言 Systemd是一个 init system 和 系统管理器(system manager)。由于SysV的缺陷,Systemd正逐渐被各大发行版采纳。 本文将介绍如何管理服务、检查状态、更改系统状态以及使用配置文件。尽管 systemd 已经成为许多Linux发行版默认的init system,但它并没有在所有发行版中普遍实现。如果你遇到报错:bash: systemctl is not installed ,那么你的机器可能安装了一个不同的init system。 服务管理 init system的基本目的是初始化Linux内核启动后必须启动的组件(传统上称为“userland”组件)。 除此之外,init system还用于管理系统运行时的服务和守护进程(daemon)。 来源: https://www.cnblogs.com/kelamoyujuzhen/p/10010063.html