国内docker仓库
国内现在可以访问的仓库是:https://hub.atomgit.com/ ,目前只有336个镜像。
国内现在可以访问的仓库是:https://hub.atomgit.com/ ,目前只有336个镜像。
https://blog.csdn.net/tanlintanlin/article/details/136800112
docker run -d --name db \
-e MYSQL_ROOT_PASSWORD=123456 \
-e MYSQL_USER=wordpress \
-e MYSQL_PASSWORD=123456 \
-e MYSQL_DATABASE=wordpress \
-v ~/wordpress/db:/var/lib/mysql \
10.1.45.250:5000/mariadb:latest
docker run -d --name wordpress \
-p 8082:80 \
--link db \
-e WORDPRESS_DB_HOST=db \
-e WORDPRESS_DB_USER=wordpress \
-e WORDPRESS_DB_PASSWORD=123456 \
-e WORDPRESS_DB_NAME=wordpress \
-v ~/wordpress/html:/var/www/html \
10.1.45.250:5000/wordpress:latest
MySQL 8.0开始将caching_sha2_password作为默认的身份验证插件.
MariaDB 10.3 支持unix_socket、mysql_native_password认证插件。
mariadb 10.3 root 用户默认认证方式为unix_socket,在本地不需要密码直接登录。
更改认证方式:
UPDATE user SET plugin='unix_socket' WHERE User='root';
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
flush privileges;
Mikrotik开局配置
一、LAN口桥接
1:添加桥接
/interface bridge add name=lan
2:把端口加到桥接
/interface bridge port add interface=ether2 bridge=lan
/interface bridge port add interface=ether3 bridge=lan
/interface bridge port add interface=ether4 bridge=lan
3:创建VLAN
/interface vlan add name=vlan2001 interface=lan vlan-id=2001
/interface vlan add name=vlan2002 interface=lan vlan-id=2002
二、IP地址和路由配置
1:添加内网IP地址添加到接口(也可以是VLAN)
/ip address add address=172.16.99.254 24 interface=lan
/ip address add address=10.10.1.254 24 interface=vlan2001
/ ip address add address=10.10.2.254 24 interface=vlan2001
2:添加外网IP地址到接口
/ip address add address=192.168.51.101 24 interface=ether1
/ip address add address=192.168.51.102 24 interface=ether1
3:添加默认网关到路由表
/ip route add dst-address=0.0.0.0 0 gateway=192.168.51.254
4:设置DNS
/ip dns set servers=8.8.4.4,8.8.8.8
三、添加NAT
1:添加客户上网用NAT
/ip firewall nat add chain=srcnat action=masquerade
/ip firewall nat add chain=srcnat src-address=10.10.2.0 24 action=src-nat to-addresses=192.168.51.102
2:添加远程管理内部设备用NAT
/ip firewall nat add chain=dstnat dst-address=192.168.51.101 dst-port=9901 protocol=tcp action=dst-nat to-addresses=172.16.99.1 to-ports=80
四、添加DHCP
1:添加IP地址池
/ip pool add name=vlan2001 ranges=10.10.1.1-10.10.1.253
/ip pool add name=vlan2002 ranges=10.10.2.1-10.10.2.253
2:添加DHCP服务器
/ip dhcp-server add name=vlan2001 interface=vlan2001 address-pool=vlan2001
/ip dhcp-server add name=vlan2002 interface=vlan2002 address-pool=vlan2002
3:添加DHCP分配网络信息
/ip dhcp-server network add address=10.10.1.0 24 gateway=10.10.1.254 dns-server=10.10.1.254,8.8.4.4
/ip dhcp-server network add address=10.10.2.0 24 gateway=10.10.2.254 dns-server=10.10.2.254,8.8.4.4
windows server 2022 core
安装OpenSSH Server服务器
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Add-WindowsCapability -Online -Name OpenSSH.Server
Set-Service -Name sshd -StartupType ‘Automatic’
Start-Service sshd
WebAdministration IISAdministration
首先要导入IIS管理模块WebAdministration
Import-Module WebAdministration
执行下面命令进入IIS命令行
IIS:
可以执行dir查看AppPools、Sites、SslBindings信息
New-Item iis:\AppPools\api.dd.com
Set-ItemProperty iis:\AppPools\api.dd.com managedRuntimeVersion v4.0 #更改应用程序池版本为4.0,默认为2.0(Windows Server 2008 R2)
New-Item iis:\Sites\api.dd.com -bindings @{protocol="http";bindingInformation=":80:api.dd.com"} -physicalPath d:\apidd
new-item test
New-WebBinding -Name "api.dd.com" -IPAddress "*" -Port 80 -HostHeader imageapi.dd2.com
Set-ItemProperty IIS:\Sites\api.dd.com -name applicationPool -value api.dd.com
new-item iis:\sites\api.dd.com\cust_account_api -type Application -physicalpath D:\cust_account_api_new
Set-ItemProperty IIS:\Sites\api.dd.com\cust_account_api -name applicationPool -value api.dd.com
new-item D:\cust_account_api_new\log -type directory -force
new-item iis:\sites\ServerLog\cust_account_api -type VirtualDirectory -physicalpath D:\cust_account_api_new\log
New-Website -Name IISLog -Port 11001 -PhysicalPath "D:\IISLog"
New-WebVirtualDirectory -Site IISLog -Name APPLog -PhysicalPath D:\APPLog
New-WebVirtualDirectory -Site IISLog -Name SystemLog -PhysicalPath C:\Windows\System32\Winevt\Logs
更改IIS站点的物理路径:
Set-ItemProperty "iis:\sites\Default Web Site" -Name physicalpath -Value "c:\inetpub"
使用appcmd.exe:
New-Alias -name appcmd -value $env:windir\system32\inetsrv\appcmd.exe
这样就可以在当前PS环境下直接使用appcmd了
get-website
备份/还原单个站点:
1.appcmd add backup
2.remove-website|?{$_.name -ne "sitename"}
$webclient = New-Object Net.WebClient
$webclient.DownloadString("http://localhost");