AZ303-Networking

 环境:macOS

安装PowerShell

https://github.com/PowerShell/PowerShell/releases

安装azure模块

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
source /Users/macbookair/.zprofile

Azure Networking

使用portal.azure.com 试试AzureNetworking --省略

使用PowerShell 实施AzureNetworking

New-AzResourceGroup -Name RSG-LinuxVNET -Location EastUS  --创建资源组
Get-AzResourceGroup -Name RSG-LinuxVNET
Get-AzVirtualNetwork -Name RSG-LinuxVNET
Get-AzVirtualNetwork -Name VNET-Linux

$LinuxVNET = New-AzVirtualNetwork -ResourceGroupName RSG-LinuxVNET -Location EastUS -Name VNET-Linux -AddressPrefix 10.0.0.0/16  --创建虚拟网络

 

$LinuxSubnet = Add-AzVirtualNetworkSubnetConfig -Name SNET-Linux-1 -AddressPrefix 10.0.0.0/17 -VirtualNetwork $LinuxVNET  --创建虚拟子网

Get-AzVirtualnetworkSubnetConfig -Name SNET-Linux -VirtualNetwork $LinuxVNET 

$LinuxSubnet | Set-AzVirtualNetwork  --虚拟子网绑定虚拟网络
Managed Disks

fault domains --相同子网的资源
UPDATE DOMAINS --相同物理机的子网内资源
availability Sets --夸fault domains和update domians的多组资源
scale sets --

使用powershell创建虚拟机
New-AzResourceGroup -Name rsg-LinuxVms -Location EastUS  --创建资源组
$securePassword = ConvertTo-SecureString 'sdfadasf163coM' -AsPlainText -Force  --设置密码
$cred = New-Object System.Management.Automation.PSCredential("cloudadmin",$securePassword)  --设置用户名和密码
New-AzVM -ResourceGroupName "rsg-LinuxVms" -Name "cloud-simplelinux" -Image "UbuntuLTS" -VirtualNetworkName "VNET-Linux" -SubnetName "SNET-Linux-1" -PublicIpAddressName "cloud-simplelinux-pip" -Credential $cred -OpenPorts 22
--在已有虚拟网的子网下创建虚拟机


$vnet = Get-AzVirtualNetwork -Name "VNET-Linux"
$subnet = Get-AzVirtualNetworkSubnetconfig -Name "SNET-Linux-1" -VirtualNetwork $vnet
$pip = New-AzPublicIpAddress -ResourceGroupName "rsg-LinuxVms" -Location "EastUS" -Name "cloud-linux-pip" -AllocationMethod Dynamic
$nsgRuleSSH = New-AzNetworkSecurityRuleConfig -Name "SSH" -Protocol "TCP" -Direction "Inbound" -Priority 1000 -SourceAddressPrefix * -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange 22 -Access "Allow"

$nsg = New-AzNetworkSecurityGroup -ResourceGroupName "rsg-LinuxVms" -Location "EastUS" -Name "could-linux-nsg" -SecurityRules $nsgRuleSSH
$nic = New-AzNetworkInterface -Name "cloud-linux-nic1" -ResourceGroupName "rsg-LinuxVms" -Location "EastUS" -SubnetId $subnet.Id -PublicIpAddressId $pip.Id -NetworksecurityGroupId $nsg.Id
$vmConfig = New-AzVmConfig -VMName "cloud-linux" -VMSize Standard_B1s
$securePassword = ConvertTo-SecureString 'sdfadasf163coM' -AsPlainText -Force  --设置密码
$cred = New-Object System.Management.Automation.PSCredential("cloudadmin",$securePassword)  --设置用户名和密码
Set-AzVmOperatingSystem -Linux -ComputerName "cloud-linux" -Credential $cred -VM $vmConfig  --设置虚拟机
Set-AzVmSourceImage -publisherName "Canonical" -Offer "ubuntuServer" -Skus "16.04-LTS" -Version "latest" -VM $vmConfig  --虚拟机选择镜像
Add-AzVMNetworkInterface -Id $nic.Id -VM $vmConfig --给虚拟机选网卡
New-AZVM -ResourceGroupName "rsg-LinuxVms" -Location "EastUS" -VM $vmConfig  --初始化虚拟机


使用ARM模板实现自动化
azure devops

在MySQL中,"skip-networking"是一个配置选项,用于控制是否允许网络连接到MySQL服务器。当"skip-networking"被设置为"ON"时,MySQL服务器将不会监听任何网络连接请求,只能通过本地套接字进行连接。这意味着只有在本地主机上才能访问MySQL服务器。 根据你的描述,当你查看"/etc/mysql/my.conf"文件时,没有找到"skip-networking"这一行。然而,当你使用命令"mysql -p -u root"登录并执行"SHOW VARIABLES;"命令时,可以看到"skip-networking"的值是"ON"。你尝试将其添加为"#skip-networking"并重启了MySQL服务。 另外,你提到已经将"bind-address"设置为与Internet连接的IP地址而不是"127.0.0.1"。这是为了允许远程主机连接到MySQL服务器。 通过分析你提供的引用内容,我认为你想要设置MySQL服务器允许远程连接,但是无法成功地将"skip-networking"设置为"OFF"。请确保将"skip-networking"的值设置为"OFF"而不是添加注释符号"#"。 可能还有其他原因导致你无法成功设置"skip-networking",例如其他配置文件中的设置。你可以进一步检查其他相关的配置文件,如"/etc/mysql/my.cnf"或"/etc/mysql/mysql.conf.d/mysqld.cnf",以确保没有其他地方覆盖了"skip-networking"的设置。 如果你仍然遇到问题,请提供更多详细信息,以便我能够更准确地帮助你解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span><span class="em">4</span>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值