用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了

程序猿小碼農 2021-09-18 06:27:32 阅读数:491

搭建 iaas 私有 jvm 布局

IPV6_FAILURE_FATAL=no

NAME=eno16777728

UUID=33c092da-748f-4504-b735-d9dff2a49d33

DEVICE=eno16777728

ONBOOT=yes

IPADDR=192.168.1.20

PREFIX=24

[[email protected] ~]# cd /etc/sysconfig/network-scripts/

[[email protected] network-scripts]# cp -a ifcfg-eno16777728 ifcfg-eno33554960

[[email protected] network-scripts]# vi /etc/sysconfig/network-scripts/ifcfg-eno33554960

DEVICE=eno33554960

TYPE=Ethernet

BOOTPROTO=none

ONBOOT=yes

IPADDR=192.168.2.20

PREFIX=24

[[email protected] ~]# systemctl restart network

[[email protected] ~]# ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever

2: eno16777728: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000

link/ether 00:0c:29:01:7e:b7 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.20/24 brd 192.168.1.255 scope global eno16777728
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe01:7eb7/64 scope link
valid_lft forever preferred_lft forever

3: eno33554960: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000

link/ether 00:0c:29:01:7e:c1 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.20/24 brd 192.168.2.255 scope global eno33554960
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe01:7ec1/64 scope link
valid_lft forever preferred_lft forever

記得拉取兩個鏡像!!!(只需要在controller節點拉取)


[](
)2.永久閉防火牆和selinux(雙節點)
------------------------------------------------------------------------------------

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.

[[email protected] yum.repos.d]# systemctl stop firewalld

[[email protected] yum.repos.d]# systemctl disable firewalld

Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

[[email protected] yum.repos.d]# setenforce 0

[[email protected] yum.repos.d]# vi /etc/selinux/config

This file controls the state of SELinux on the system.

SELINUX= can take one of these three values:

enforcing - SELinux security policy is enforced.

permissive - SELinux prints warnings instead of enforcing.

disabled - No SELinux policy is loaded.

SELINUX=disabled

SELINUXTYPE= can take one of three two values:

targeted - Targeted processes are protected,

minimum - Modification of targeted policy. Only selected processes are protected.

mls - Multi Level Security protection.

SELINUXTYPE=targeted

[[email protected] yum.repos.d]# systemctl stop firewalld

[[email protected] yum.repos.d]# systemctl disable firewalld

Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

[[email protected] yum.repos.d]# setenforce 0

[[email protected] yum.repos.d]# vi /etc/selinux/config

This file controls the state of SELinux on the system.

SELINUX= can take one of these three values:

enforcing - SELinux security policy is enforced.

permissive - SELinux prints warnings instead of enforcing.

disabled - No SELinux policy is loaded.

SELINUX=disabled

SELINUXTYPE= can take one of three two values:

targeted - Targeted processes are protected,

minimum - Modification of targeted policy. Only selected processes are protected.

mls - Multi Level Security protection.

SELINUXTYPE=targeted


[](
)3.配置YUM源(雙節點)
----------------------------------------------------------------------------

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.

配置主機名映射

[[email protected] ~]# vi /etc/hosts

192.168.1.10 controller

192.168.1.20 compute

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

[[email protected] ~]# vi /etc/hosts

192.168.1.10 controller

192.168.1.20 compute

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

[[email protected] ~]# cd /etc/yum.repos.d/

[[email protected] yum.repos.d]# rm -rf *

[[email protected] yum.repos.d]# cat local.repo

[centos]

name=centos

baseurl=file:///opt/centos

gpgcheck=0

enabled=1

[iaas]

name=iaas

baseurl=file:///opt/iaas/iaas-repo

gpgcheck=0

enabled=1

[[email protected] ~]# cd /etc/yum.repos.d/

[[email protected] yum.repos.d]# rm -rf *

[[email protected] yum.repos.d]# cat local.repo

[centos]

name=centos

baseurl=ftp://controller/centos

gpgcheck=0

enabled=1

[iaas]

name=iaas

baseurl=ftp://controller/iaas/iaas-repo

gpgcheck=0

enabled=1


[](
)4.寫入/etc/fstab,並掛載鏡像
-----------------------------------------------------------------------------------

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.

[[email protected] ~]# ls

anaconda-ks.cfg CentOS-7-x86_64-DVD-1511.iso XianDian-IaaS-v2.2.iso

[[email protected] ~]# mkdir /opt/centos

[[email protected] ~]# mkdir /opt/iaas

[[email protected] ~]# cat /etc/fstab

/etc/fstab

Created by anaconda on Thu Oct 1 06:46:45 2020

Accessible filesystems, by reference, are maintained under ‘/dev/disk’

See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

UUID=36615874-b25f-4539-b376-8a5c387c0212 / xfs defaults 0 0

UUID=02223747-779a-4b6d-a300-2774ec29a144 /boot xfs defaults 0 0

UUID=01956b4a-500a-4f23-8b60-75b3bb457ded swap swap defaults 0 0

/root/CentOS-7-x86_64-DVD-1511.iso /opt/centos iso9660 defaults 0 0

/root/XianDian-IaaS-v2.2.iso /opt/iaas iso9660 defaults 0 0

[[email protected] ~]# mount -a

mount: /dev/loop0 is write-protected, mounting read-only

mount: /dev/loop1 is write-protected, mounting read-only

[[email protected] ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda3 98G 7.6G 90G 8% /

devtmpfs 904M 0 904M 0% /dev

tmpfs 913M 0 913M 0% /dev/shm

tmpfs 913M 8.5M 904M 1% /run

tmpfs 913M 0 913M 0% /sys/fs/cgroup

/dev/sda1 497M 118M 380M 24% /boot

tmpfs 183M 0 183M 0% /run/user/0

/dev/loop0 4.1G 4.1G 0 100% /opt/centos

/dev/loop1 2.7G 2.7G 0 100% /opt/iaas

[[email protected] ~]# yum list

[[email protected] ~]# yum install -y vim

[[email protected] ~]# yum install -y vsftpd

[[email protected] ~]# cat /etc/vsftpd/vsftpd.conf (在第一行添加下面內容,點點不用寫)

anon_root=/opt/

[[email protected] ~]# systemctl restart vsftpd

[[email protected] ~]# systemctl enable vsftpd

Created symlink from /etc/systemd/system/multi-user.target.wants/vsftpd.service to /usr/lib/systemd/system/vsftpd.service.


[](
)5.安裝iaas相關軟件包
----------------------------------------------------------------------------

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.

[[email protected] ~]# yum install -y iaas-xiandian

[[email protected] ~]# yum install -y iaas-xiandian


[](
)6.劃分磁盤作為swift和cinder
-----------------------------------------------------------------------------------

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.

[[email protected] ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x0002f10c

Device Boot Start End Blocks Id System

/dev/sda1 2048 4196351 2097152 82 Linux swap / Solaris

/dev/sda2 * 4196352 41943039 18873344 83 Linux

Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

[[email protected] ~]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0xa5eb8d25.

Command (m for help): n

Partition type:

p primary (0 primary, 0 extended, 4 free)

e extended

Select (default p):

Using default response p

Partition number (1-4, default 1):

First sector (2048-209715199, default 2048):

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199): +30G

Partition 1 of type Linux and of size 30 GiB is set

Command (m for help): n

Partition type:

p primary (1 primary, 0 extended, 3 free)

e extended

Select (default p):

Using default response p

Partition number (2-4, default 2):

First sector (62916608-209715199, default 62916608):

Using default value 62916608

Last sector, +sectors or +size{K,M,G} (62916608-209715199, default 209715199): +30G

Partition 2 of type Linux and of size 30 GiB is set

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[[email protected] ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x0002f10c

Device Boot Start End Blocks Id System

/dev/sda1 2048 4196351 2097152 82 Linux swap / Solaris

/dev/sda2 * 4196352 41943039 18873344 83 Linux

Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0xa5eb8d25

Device Boot Start End Blocks Id System

/dev/sdb1 2048 62916607 31457280 83 Linux

/dev/sdb2 62916608 125831167 31457280 83 Linux

[[email protected] ~]# mkfs.xfs /dev/sdb1

[[email protected] ~]# mkfs.xfs /dev/sdb2


# 《MySql面試專題》
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_Java](https://s5.51cto.com/images/20210918/1631917024340453.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_Java_02](https://s2.51cto.com/images/20210918/1631917024498144.jpg)
# 《MySql性能優化的21個最佳實踐》
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_程序員_03](https://s6.51cto.com/images/20210918/1631917025748019.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_Java_04](https://s9.51cto.com/images/20210918/1631917025492925.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_Java_05](https://s7.51cto.com/images/20210918/1631917026786069.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_程序員_06](https://s6.51cto.com/images/20210918/1631917026654755.jpg)
# 《MySQL高級知識筆記》
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_後端_07](https://s7.51cto.com/images/20210918/1631917026956189.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_程序員_08](https://s9.51cto.com/images/20210918/1631917027955749.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_Java_09](https://s9.51cto.com/images/20210918/1631917027647510.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_程序員_10](https://s2.51cto.com/images/20210918/1631917027863991.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_Java_11](https://s4.51cto.com/images/20210918/1631917027842730.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_Java_12](https://s3.51cto.com/images/20210918/1631917027141028.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_程序員_13](https://s9.51cto.com/images/20210918/1631917028382930.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_程序員_14](https://s8.51cto.com/images/20210918/1631917028106178.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_後端_15](https://s8.51cto.com/images/20210918/1631917028403573.jpg)
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_後端_16](https://s9.51cto.com/images/20210918/1631917029721234.jpg)
文中展示的資料包括:**《MySql思維導圖》《MySql核心筆記》《MySql調優筆記》《MySql面試專題》《MySql性能優化的21個最佳實踐》《MySq高級知識筆記》**如下圖
![用虛擬機搭建iaas先電私有雲平臺,你連基礎的JVM運行時內存布局都忘了_後端_17](https://s6.51cto.com/images/20210918/1631917029500163.jpg)
## **[CodeChina開源項目:【一線大廠Java面試題解析+核心總結學習筆記+最新講解視頻】](https://ali1024.coding.net/public/P7/Java/git)**
**關注我,點贊本文給更多有需要的人**
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
版权声明:本文为[程序猿小碼農]所创,转载请带上原文链接,感谢。 https://gsmany.com/2021/09/20210918062732066n.html