systemctl

在 Linux 中安装 Lighttpd Web 服务器

强颜欢笑 提交于 2019-12-11 20:11:06
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 安装Lighttpd 使用包管理器安装 这里我们通过使用包管理器这种最简单的方法来安装 Lighttpd。只需以 sudo 模式在终端或控制台中输入下面的指令即可。 CentOS 7 由于 CentOS 7.0 官方仓库中并没有提供 Lighttpd,所以我们需要在系统中安装额外的软件源 epel 仓库。使用下面的 yum 指令来安装 epel。 # yum install epel-release 然后,我们需要更新系统及为 Lighttpd 的安装做前置准备。 # yum update # yum install lighttpd Ubuntu 15.04 Ubuntu 15.04 官方仓库中包含了 Lighttpd,所以只需更新本地仓库索引并使用 apt-get 指令即可安装 Lighttpd。 # apt-get update # apt-get install lighttpd 从源代码安装 Lighttpd 如果想从 Lighttpd 源码安装最新版本(例如 1.4.39),我们需要在本地编译源码并进行安装。首先我们要安装编译源码所需的依赖包。 # cd /tmp/ # wget http://download.lighttpd.net/lighttpd/releases-1.4.x

firewalld

ぃ、小莉子 提交于 2019-12-11 15:47:52
1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld 开机启用 : systemctl enable firewalld 2.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。 启动一个服务:systemctl start firewalld.service 关闭一个服务:systemctl stop firewalld.service 重启一个服务:systemctl restart firewalld.service 显示一个服务的状态:systemctl status firewalld.service 在开机时启用一个服务:systemctl enable firewalld.service 在开机时禁用一个服务:systemctl disable firewalld.service 查看服务是否开机启动:systemctl is-enabled firewalld.service 查看已启动的服务列表:systemctl list-unit-files|grep

yum 安装 epel-release

大城市里の小女人 提交于 2019-12-11 10:34:50
一·首先安装是CentOS 7.0的源。 yum install epel-release #rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm 查看可安装的包 yum list --enablerepo=remi --enablerepo=remi-php56 | grep php 开始安装 yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof 查看版本 php --version 二·#yum list httpd 安装httpd 三·下载并解压dokuwiki程序包(去网上找源码包稳定版) wget -c http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz tar -zvxf dokuwiki-stable.tgz 把解压好的放到/var/www/html/wiki mv dokuwiki-2017-02-19e/ /var/www/html

zabbix proxy 安裝配置

泪湿孤枕 提交于 2019-12-11 09:47:09
1. 安裝DB並啟用 yum install -y mariadb* systemctl start mariadb systemctl enable mariadb  2. 設定並創建zabbix_proxy資料庫,並提供存取權限 mysql mysql> create database zabbix_proxy character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix_proxy.* to zabbix@localhost identified by 'zabbix'; mysql> quit; #尾巴的';'不可省略 3. 安裝並配置zabbix proxy #更改倉庫位置 rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm yum install -y zabbix-proxy-mysql zcat /usr/share/doc/zabbix-proxy-mysql*/schema.sql.gz | mysql -uzabbix -p zabbix_proxy 4. 更改proxy配置檔 vim /etc/zabbix/zabbix_proxy

Centos 8安装gateone

烈酒焚心 提交于 2019-12-11 07:25:47
systemctl stop firewalld systemctl disable firewalld sed -i 's/^SELINUX=enforcing\|^SELINUX=permissive/SELINUX=disabled/' /etc/selinux/config shutdown -r now dnf install python2 ln -s /usr/bin/python /usr/bin/python2 wget https://bootstrap.pypa.io/get-pip.py python get-pip.py pip install 'tornado==2.4.1' wget https://github.com/downloads/liftoff/GateOne/gateone-1.1.tar.gz tar zxvf gateone-1.1.tar.gz cd GateOne python setup.py install cd /opt/gateone/ ./gateone.py cp /opt/gateone/server.conf{,.bak} vi /opt/gateone/server.conf # diff /opt/gateone/server.conf{,.bak} 7c7 < port = 50000 --- > port

Systemctl dependency failure, stop dependent services

眉间皱痕 提交于 2019-12-11 04:29:33
问题 I have 2 services a.service and b.service. a.service is shown [Unit] Description=My service [Service] Type=forking ExecStart=/bin/sh /home/admin/run.sh Restart=on-failure [Install] WantedBy=multi-user.target, b.service [Unit] Description=My service [Service] Type=forking ExecStart=/bin/sh $HOME/theFolder/run.sh Restart=on-failure [Install] WantedBy=multi-user.target Now, when i start b.service, i'm sure a.service will be started. During runtime, suddenly someone messes with /home/admin/run.sh

docker

馋奶兔 提交于 2019-12-10 09:55:33
一,概述 虚拟化是一种资源管理技术,是将计算机的各种实体资源,如服务器、网络、内存及存储等,予以抽象、转换后呈现出来,打破实体结构间的不可切割的障碍,使用户可以更好的应用这些资源。一般,虚拟化资源包括计算能力和资料存储。 虚拟化技术可以解决高性能的物理硬件产能过剩和老旧硬件产能过低的重组重用,透明化底层物理硬件,最大化利用物理硬件,充分利用资源。 Docker是一个开源项目,诞生于2013年初,基于go语言实现。Docker项目的目标是实现轻量级的操作虚拟化解决方案。Docker的基础是linux容器(LXC)等技术。在LXC的基础上docker做了进一步的封装,让用户不需要关心容器的管理,使得操作更为简便。 Docker的优点,上手快,职责逻辑分类,快速高效的开发周期,鼓励使用面向服务架构。与传统虚拟机相比,docker启动速度快,占用体积小。 Docker是一个客户端服务器架构。Docker客户端只需要向docker服务器或者守护进程发出请求,服务器或者守护进程将完成所有工作返回结果。Docker提供了一个命令工具docker以及一整套restful api。可以在同一台宿主机上运行docker守护进程和客户端,也可从本地的docker客户端连接到运行在另一个宿主机上的远程docker守护进程。 镜像是构建docker的基石。用户基于镜像来运行自己的容器

二进制安装K8S(六):部署master节点组件

人盡茶涼 提交于 2019-12-10 04:57:58
一、在master上安装apiserver组件: 1、编写apiserver脚本: vim /root/scripts/apiserver.sh #!/bin/bash #下载二进制包: GitHub地址:https://github.com/kubernetes/kubernetes wget https://storage.googleapis.com/kubernetes-release/release/v1.17.0-alpha.3/kubernetes-server-linux-amd64.tar.gz tar xf kubernetes-server-linux-amd64.tar.gz cd kubernetes/server/bin/ mv kube-apiserver kube-scheduler kube-controller-manager /opt/kubernetes/bin/ #编写apiserver配置文件 MASTER_ADDRESS= 1 : − " 192.168.1.250 " E T C D S E R V E R S = {1:-"192.168.1.250"} ETCD_SERVERS= 1 : − " 1 9 2 . 1 6 8 . 1 . 2 5 0 " E T C D S ​ E R V E R S = {2:-“http:/

点击返回:自学zabbix集锦

◇◆丶佛笑我妖孽 提交于 2019-12-10 04:49:24
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 Centos7安装Zabbix4.0步骤 官方搭建zabbix4.0的环境要求: 1. 环境搭建LAMP 前提Centos系统安装完成: 确认一下: cat /etc/redhat-release # 查看CentOS版本 cat /proc/version #查看存放与内核相关的文件 1.1 搭建之前的操作 1.1.1 升级系统组件到最新的版本 yum -y update 1.1.2 关闭selinux vi /etc/selinux/config #将SELINUX=enforcing改为SELINUX=disabled 设置后需要重启才能生效 setenforce 0 #临时关闭命令 getenforce #检测selinux是否关闭,Disabled 为关闭 1.1.3 关闭防火墙 firewall-cmd --state #查看默认防火墙状态,关闭后显示not running,开启后显示running systemctl stop firewalld.service #临时关闭firewall systemctl disable firewalld.service #禁止firewall开机启动 1.2 搭建LAMP环境 1.2.1 安装所需所有软体仓库

Node.js script failed to start with systemctl

流过昼夜 提交于 2019-12-10 03:11:25
问题 I need to run my node.js script automatically from my remote machine with systemctl. I already made a .service file and put that into /etc/systemd/system/ . Here's the .service file: [Unit] Description=laporan [Service] ExecStart=/var/www/laporan/nodeserver/server.js Restart=always User=nobody Group=root Environment=PATH=/usr/bin:/usr/local/bin Environment=NODE_ENV=production WorkingDirectory=/var/www/laporan/nodeserver [Install] WantedBy=multi-user.target But every time I try to start the