- 浏览: 2539371 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Systemctl 2019 on Ubuntu19.04
Go to the network directory
>cd /etc/netplan
>sudo vi 50-cloud-init.yaml
> cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
enp0s3:
dhcp4: true
enp0s8:
dhcp4: no
addresses: [192.168.56.104/24]
gateway4: 192.168.56.0
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
version: 2
>sudo netplan apply
Check Network
> ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::a00:27ff:fec7:ba2 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:c7:0b:a2 txqueuelen 1000 (Ethernet)
RX packets 28 bytes 6966 (6.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 39 bytes 4677 (4.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.56.104 netmask 255.255.255.0 broadcast 192.168.56.255
inet6 fe80::a00:27ff:febc:6cd8 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:bc:6c:d8 txqueuelen 1000 (Ethernet)
RX packets 109 bytes 13904 (13.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 79 bytes 11730 (11.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 88 bytes 6700 (6.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 88 bytes 6700 (6.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Some Basic Commands
Check the status of system
> systemctl status
List all the units
> systemctl list-units
Check the failed units
> systemctl --failed
The files is under
/usr/lib/systemd/system
/etc/systemd/system
Check all the services
> systemctl list-unit-files
Install the service on newly machine
>sudo apt-get install keepalived
Check version
>keepalived -version
Keepalived v2.0.10 (11/12,2018)
Copyright(C) 2001-2018 Alexandre Cassen, <acassen@gmail.com>
Built with kernel headers for Linux 4.19.5
Running on Linux 5.0.0-20-generic #21-Ubuntu SMP Mon Jun 24 09:32:09 UTC 2019
Check the Service
> systemctl list-unit-files | grep keepalived
keepalived.service enabled
On my ubuntu-master, when I checked
> systemctl list-unit-files | grep keepalived
snap-keepalived-448.mount enabled
keepalived.service masked
snap.keepalived.daemon.service enabled
> systemctl list-unit-files | grep keepalived
snap-keepalived-448.mount enabled
keepalived.service masked
snap.keepalived.daemon.service enabled
Check the status on the second machine
> ps -ef | grep keepalived
root 940 1 0 20:10 ? 00:00:00 /snap/keepalived/448/usr/sbin/keepalived-500
root 941 940 0 20:10 ? 00:00:00 /snap/keepalived/448/usr/sbin/keepalived-500
Disable others
> systemctl disable snap-keepalived-448.mount
> systemctl disable snap.keepalived.daemon.service
Unmask my service
> sudo systemctl unmask keepalived.service
Enable the service
> systemctl enable keepalived.service
Reinstall the keepalived, it is active now
> sudo apt-get install keepalived
> systemctl list-unit-files | grep keepalived
snap-keepalived-448.mount disabled
keepalived.service enabled
snap.keepalived.daemon.service disabled
References:
https://www.cnblogs.com/lxjshuju/p/7183689.html
http://www.jinbuguo.com/systemd/systemctl.html
https://chubuntu.com/questions/11949/why-are-some-systemd-services-in-the-masked-state.html
http://www.kbase101.com/question/15548.html
Go to the network directory
>cd /etc/netplan
>sudo vi 50-cloud-init.yaml
> cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
enp0s3:
dhcp4: true
enp0s8:
dhcp4: no
addresses: [192.168.56.104/24]
gateway4: 192.168.56.0
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
version: 2
>sudo netplan apply
Check Network
> ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::a00:27ff:fec7:ba2 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:c7:0b:a2 txqueuelen 1000 (Ethernet)
RX packets 28 bytes 6966 (6.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 39 bytes 4677 (4.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.56.104 netmask 255.255.255.0 broadcast 192.168.56.255
inet6 fe80::a00:27ff:febc:6cd8 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:bc:6c:d8 txqueuelen 1000 (Ethernet)
RX packets 109 bytes 13904 (13.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 79 bytes 11730 (11.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 88 bytes 6700 (6.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 88 bytes 6700 (6.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Some Basic Commands
Check the status of system
> systemctl status
List all the units
> systemctl list-units
Check the failed units
> systemctl --failed
The files is under
/usr/lib/systemd/system
/etc/systemd/system
Check all the services
> systemctl list-unit-files
Install the service on newly machine
>sudo apt-get install keepalived
Check version
>keepalived -version
Keepalived v2.0.10 (11/12,2018)
Copyright(C) 2001-2018 Alexandre Cassen, <acassen@gmail.com>
Built with kernel headers for Linux 4.19.5
Running on Linux 5.0.0-20-generic #21-Ubuntu SMP Mon Jun 24 09:32:09 UTC 2019
Check the Service
> systemctl list-unit-files | grep keepalived
keepalived.service enabled
On my ubuntu-master, when I checked
> systemctl list-unit-files | grep keepalived
snap-keepalived-448.mount enabled
keepalived.service masked
snap.keepalived.daemon.service enabled
> systemctl list-unit-files | grep keepalived
snap-keepalived-448.mount enabled
keepalived.service masked
snap.keepalived.daemon.service enabled
Check the status on the second machine
> ps -ef | grep keepalived
root 940 1 0 20:10 ? 00:00:00 /snap/keepalived/448/usr/sbin/keepalived-500
root 941 940 0 20:10 ? 00:00:00 /snap/keepalived/448/usr/sbin/keepalived-500
Disable others
> systemctl disable snap-keepalived-448.mount
> systemctl disable snap.keepalived.daemon.service
Unmask my service
> sudo systemctl unmask keepalived.service
Enable the service
> systemctl enable keepalived.service
Reinstall the keepalived, it is active now
> sudo apt-get install keepalived
> systemctl list-unit-files | grep keepalived
snap-keepalived-448.mount disabled
keepalived.service enabled
snap.keepalived.daemon.service disabled
References:
https://www.cnblogs.com/lxjshuju/p/7183689.html
http://www.jinbuguo.com/systemd/systemctl.html
https://chubuntu.com/questions/11949/why-are-some-systemd-services-in-the-masked-state.html
http://www.kbase101.com/question/15548.html
发表评论
-
Update Site will come soon
2021-06-02 04:10 1672I am still keep notes my tech n ... -
Stop Update Here
2020-04-28 09:00 310I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 465NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 361Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 363Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 328Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 419Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 428Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 364Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 444VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 376Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 464NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 413Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 330Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 242GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 443GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 320GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 306Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 310Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 284Serverless with NodeJS and Tenc ...
相关推荐
Ubuntu 19.04是该系列操作系统的一个版本,代号为Disco Dingo。 在虚拟机软件VMware12上安装Ubuntu19.04桌面版,可以提供一个学习和使用Linux桌面环境的平台。在进行安装之前,需要准备好VMware软件和Ubuntu19.04的...
Ubuntu19.04安装指南-附件资源
标题中的“硬盘安装Ubuntu8.04需要的文件打包下载”指的是通过硬盘媒介来安装Ubuntu 8.04操作系统的方法,这种方法适用于没有光驱或者网络连接的计算机。在这个过程中,你需要下载一系列关键文件来创建一个可以引导...
Mysql数据库Ubuntu18.04离线安装版
Ubuntu20.04离线安装openssh-server 安装步骤: sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb sudo dpkg -i openssh-client_8.4p1-6ubuntu1_amd64.deb sudo dpkg -i openssh-sftp-server_8.4p1-6ubuntu1_...
mysql-server_5.7.28-1ubuntu18.04_amd64.deb-bundle.tarmysql-server_5.7.28-1ubuntu18.04_amd64.deb-bundle.tarmysql-server_5.7.28-1ubuntu18.04_amd64.deb-bundle.tarmysql-server_5.7.28-1ubuntu18.04_amd64....
ubuntu18.04和centos7.8离线安装telnet服务端程序.,解除依赖问题
之前在Mellanox的官网下载redhat6.9的网卡驱动能够成功安装配置ib网,但是现在重新下载6.9和7.4的网卡驱动发现都没能成功配置,在这将这两个资源发布出来希望能够帮助到有需要的人!!!!7.4驱动下载链接: 安装...
描述中提到"参照文章说明操作,Ubuntu19.04 gi文件",这意味着在解压和使用这些文件之前,应该有一篇指南或者教程,指导用户如何在Ubuntu 19.04这个特定版本上正确操作GI接口的文件。GI库通常用于为Python提供对GTK+...
标题中的“Synergy 1.10.2 linux_Ubuntu版[文件格式Deb,直接安装] 2019年6月最新版.rar”指的是一个名为Synergy的软件的Linux Ubuntu版本,该版本是2019年6月发布的最新版。Synergy是一款非常实用的跨平台工具,它...
Ubuntu 19.04 Disco Dingo 基于 5.0 内核,glibc 2.29,OpenJDK 11,boost 1.67,rustc 1.31,更新 GCC 8.3,optional GCC 9,Python 3.7.3 as default,ruby 2.5.5,php 7.2.15,perl 5.28.1,golang 1.10.4。...
securecrt最新的版本v8.7.2,适用于Ubuntu19.04.官方下载。 MD5: 95C4DB01C5CBC0224EB9B535FDABD45B
开始的时候,我们先打开虚拟机,导入Ubuntu19.04的镜像,这里是基本操作,就不多说了,但是需要注意的一点是:VMware一定要将网络配置成网桥模式,要是实在上不去网,再配置成NAT模式。 Vbox直接配置两个网络...
securecrt和securesfx合集,最新的版本v8.7.2,适用于Ubuntu19.04.官方下载。 MD5: 9144C17F6590EF50C0C047FF62EA065A