Sunteți pe pagina 1din 2

C:\Users\usuario\Desktop\Criando container Ubuntu para DNSONLY.

txt segunda-feira, 10 de julho de 2017 14:16


https://documentation.cpanel.net/display/ALD/Linux+Containers

lxc-create -t download -n ns1.br << Testar criando com pontos no nome, pois j o o nome do
host "hostname"

Distribution: centos
Release: 7
Architecture: amd64

ou just created a CentOS container (release=7, arch=amd64, variant=default)


To enable sshd, run: yum install openssh-server
For security reason, container images ship without user accounts
and without a root password.
Use lxc-attach or chroot directly into the rootfs to set a root password
or create user accounts.

https://documentation.cpanel.net/display/ALD/Linux+Containers

Required changes for CentOS 7 or RHEL 7


You must make the following configuration changes to run cPanel & WHM inside an LXC container:
After you create the LXC container, change the lxc.include line in the lxc.conf file to the
following line:
lxc.include = /usr/share/lxc/config/fedora.common.conf
Edit the lxc.conf file to drop setfcap and setpcap capabilities. To do this, comment the
following lines:
1
2
# lxc.cap.drop = setpcap
# lxc.cap.drop = setfcap

Exemplo para config network em mod bridge passando vlan por port chanell
lxc.network.type = macvlan
lxc.network.macvlan.mode = bridge
lxc.network.link = bond0
lxc.network.flags = up

lxc.start.auto = 1
lxc.start.delay = 10
lxc.group = bras
~

Criando arquivo para vlan50


cp ns1.br/rootfs/etc/sysconfig/network-scripts/ifcfg-eth0
ns1.br/rootfs/etc/sysconfig/network-scripts/ifcfg-eth0.50

[root@ns1 named]# cat /etc/sysconfig/network-scripts/ifcfg-eth0


DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet

[root@ns1 named]# cat /etc/sysconfig/network-scripts/ifcfg-eth0.50


DEVICE=eth0.50
BOOTPROTO=static
NM_CONTROLLED="no"
ONBOOT=yes
IPADDR=185.184.12.36
NETMASK=255.255.255.0
TYPE=Ethernet
NETWORK=187.84.129.0
VLAN=yes
GATEWAY="185.184.12.1"
HOSTNAME=ns1.br

lxc-start -n ns1.br -d
lxc-attach -n ns1.br
lxc-stop -n ns1.br
-1-
C:\Users\usuario\Desktop\Criando container Ubuntu para DNSONLY.txt segunda-feira, 10 de julho de 2017 14:16

lsmod | grep 8021q

yum -y update
yum upgrade

yum install NetworkManager-tui


yum install net-tools

vi /etc/hostname
ns1.br

vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
187.16.145.132 ns1.br ns1

Ajuste HOra
timedatectl set-timezone America/Sao_Paulo
timedatectl

echo "nameserver 8.8.8.8" > /etc/resolv.conf


Editar o arquivo /etc/resolf.conf
nameserve 8.8.4.4

Install cPanel DNSONLY


To install cPanel DNSONLY, perform the following steps:
To open the /home directory, run the following command:
cd /home
To fetch the latest installation files from cPanel's servers, run the following command:
curl -o latest-dnsonly -L https://securedownloads.cpanel.net/latest-dnsonly
To open and execute the installation files, run the following command:
sh latest-dnsonly

DEbugar erros
vi /var/lib/lxc/ns1.br/rootfs/
vi /var/log/lxc/xxxx.log
dmesg | grep apparmor
lxc-start -n ns1.br -F -lDEBUG -o /path/to/log/file

lxc-info -n my-container
lxc-stop --name SpeedtestCBF
lxc-destroy --name SpeedtestCBF

-2-

S-ar putea să vă placă și