动态 版块 发帖 消息 我的
Loading...
小绿叶技术博客
小绿叶技术博客
子版块
admin
259
安装win11 该电脑无法运行win11;  1.win11安装跳过登录,2.删除休眠文件,3.解除磁盘加密,4. win10/win11 开机无法进入 bios 主板设置; win10/win11 激活系统,解决: 激活非核心版本1、在安装Win11时会提示“该电脑无法运行Win11”。 2、在此界面中按“Shift+F10”,打开命令界面,输入:regedit打开注册表。 3、复制粘贴到注册表地址栏:计算机\HKEY_LOCAL_MACHINE\SYSTEM\Setup 4、创建一个名为“LabConfig”的项,接着在“LabConfig”下创建两个DWORD32值: 键为“BypassTPMCheck”,值为“00000001” 键为“BypassSecureBootCheck”,值为“00000001” 5、最后全部完成了保存退出即可正常安装Win11。还有一个办法: 随便输入一个用户名,输入密码错误,会提示用本地账户登陆#####################跳过方式2 oobe/bypassnro (适合创建本地账户)1. 遇到需要连接网络的界面时,按下键盘的Shift+F10,打开命令提示符(部分笔记本需按下Shift+Fn+F10)powershell#输入该命令进入shell命令界面oobe/bypassnro#再上面命令(oobe和/bypassnro之间没有空格)自动重启#-------  windows关闭休眠文件 -------#win11关闭休眠文件的方法/步骤如下:一、找到“开始——右键——运行”点击打开二、或按“WIN+R”打开运行。三、输入“cmd”点击确定。以管理员运行cmd四、输入“powercfg -h off”按回车即可。#------- 解除磁盘加密 -------#cmd 命令管理员manage-bde  -off  C:#c: 为磁盘,更换为其他盘符解密################ 无法进入 bios 主板设置 #########################进入系统,cmd 管理员 输入命令 关闭快速启动:  powercfg /h off    然后重启电脑 , 一般按 F2 或者 DEL  或 ESC 进入bios 主板设置################ windows 激活 #########################win10/win11 激活系统,解决: 激活非核心版本1. 输入cmd 命令 regedit  打开注册表2.  粘贴该地址,回车跳转: 计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\    在该目录下找到SkipRearm,双击打开后,将数值0改为1   3. 然后 以管理员身份启动cmd,输入SLMGR -REARM,根据提示,重启电脑4. 再次以管理元身份打开 cmd 输入下面命令激活 slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX slmgr /skms kms.03k.org slmgr /ato#win2012激活试用180天激活,kms密钥激活步骤:按下windows+x打开快捷菜单,选择命令提示符(管理员)slmgr /ipk D2N9P-3P6X9-2R39C-7RTCD-MDVJXslmgr /skms kms.03k.orgslmgr /ato# 注意:激活后还是显示 倒计时,但时间不会变化,停留在这个天数。需要登录 微软网站账户才能下载windos2012 微软下载:https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2012-r2win10/11下载 :https://www.microsoft.com/zh-cn/software-download/windows10ISO
 2   0  93天前
admin
645
1. 下载基础包; 2. 配置vscode; 3. cmake 基础 ################### 软件下载 ################### vscode: 官方: https://code.visualstudio.com/Download 其他下载: http://work.eisc.cn/ruanjian/windows/c/ruanjian/VSCodeUserSetup-x64-1.75.1.exe ubuntu vscode: work.eisc.cn/ruanjian/ubuntu/deb/tools/vscode.deb cmake: 官方: https://cmake.org/download/ 其他下载: http://work.eisc.cn/ruanjian/windows/c/ruanjian/cmake-3.26.0-rc4.zip gcc_g++: 其他下载: http://work.eisc.cn/ruanjian/windows/c/ruanjian/windos_mingw64.tar.gz # 该文件中 目录 mingw64\bin\mingw32-make.exe 中的文件 已经重命名为 make.exe 为了解决下面 没有识别到make 命令 问题: CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. -- Configuring incomplete, errors occurred! ################### vscode 基础配置 ################### vscode 配置为中文: 1. 点击 vscode 左侧的扩展图标,打开侧边栏“EXTENSIONS”面板(魔方图标) 2. 点击搜索并安装 chinese 简体中文 3. 安装完成,点击右下角 Restart 重启 vscode vscode 支持 c/c++ 编译环境: 1.vscode 魔方图标搜索安装: C/C++ Extension Pack (Popular extensions for C++ development in Visual Studio Code.) 2.vscode 魔方图标搜索安装: Cmake Tools 3.重启电脑 如果 vscode 左下角还是没有出现 cmake 的功能,使用: Shift+Ctrl+p 弹出搜索 -> 输入cmake -> 点击 cmake 配置,自动弹出提示进行 选择 yes vscode 全屏模式: 1. 键盘 Alt 按键 显示/隐藏 顶部状态栏 2. 顶部状态栏 -> 查看 -> 外观 -> 全屏 3. 快捷按键: F11 vscode 开启变量快速预览 1. 设置图标 -> 设置 -> 搜索 peek definition -> 勾选:Editor: Definition Link Opens In Peek -> 返回代码界面 -> Ctrl + 点击代码中的变量 vscode git 查看历史版本: 扩展里面搜索安装: git graph vscode tab 缩进转空格 : 全选代码 点击右下角空格 弹出选择框 【将缩进转换为空格】 vscode tab 设置为按tab时插入空格: 导航栏 文件-> 首选项 -> 设置 -> 搜索后勾选: Editor:Insert Spaces 配置 gcc c++ : 1. 我的电脑-> 属性 -> 高级系统设置 -> 高级 -> 环境变量 -> 系统变量 -> Path -> 添加上面软件解压的路径,精确到bin目录 -> 重启电脑 2. 搜索安装 C/C++ Extension Pack (Popular extensions for C++ development in Visual Studio Code.) -> 重启电脑 3. 重启电脑后,可以看到 vscode 左下角的 状态栏 图标出现cmake 右边一个图标的扳手 No kit Selected ,点击它 -> 选择 GCC 8.1 如果 vscode 左下角还是没有出现 cmake 的功能,使用: Shift+Ctrl+p 弹出搜索 -> 输入cmake -> 点击 cmake 配置,自动弹出提示进行 选择 yes ################### cmake 基础使用 ################### #--- 编译命令 ---# 点击 vscode 顶部状态栏 -> 终端 -> 新建终端 输入下面命令进行编译 mkdir build ; cd build # 创建 build 编译目录, 并且进入 del * ; cmake ../ -Bbuild -G "Unix Makefiles" ; cmake --build build # 删除build的目录所有文件 # cmake 构建命令 # cmake 编译 #--- cmake 案例 ---# project(eisc) #项目名 cmake_minimum_required(VERSION 3.10) # 编译要求:cmake 要大于最低版本 3.1 set(CMAKE_C_COMPILER "gcc") set(CMAKE_CXX_COMPILER "g++") # 设置编译器, 如果没有配置环境变量,可以改为gcc具体文件路径 include_directories(../../test/include/) include_directories(../../uds/) include_directories(../../include/) include_directories(../../driver/) include_directories(../../core/) # 添加 头文件搜索路径 (.h 搜索路径) add_executable("test.exe" test.cpp) # 生成可执行文件: 将 test.cpp 编译成 test.exe 可执行文件
 2   0  280天前
admin
500
 cmd # 进入cmd 命令界面diskpart # 进入磁盘分区工具list volume# 列出磁盘select volume c# 选择 c 盘extend # 扩容 选择的磁盘如果还是不行:1. 安装 winpe :   http://work.eisc.cn/ruanjian/windows/%E5%BF%85%E5%A4%87%E8%BD%AF%E4%BB%B6/WePE64_V2.2.exe下载后安装进系统,也可以安装到 u盘2.  打开傲梅分区助手 ---> 将空闲分区合并到目标分区
 2   0  327天前
admin
637
1. windows 下载ssh :http://work.eisc.cn/ruanjian/windows/ssh/openssh-win64.zip  也可以下载 32位 openssh-win32.zip 2. 解压后复制到目录:C:\Program Files3. 设置环境变量:此电脑 --> 右键 --> 属性 --> 高级系统设置 --> 环境变量--系统变量,在此框里面找到 Path 进行编辑添加文件路径:C:\Program Files\OpenSSH-Win64cd 'C:\Program Files\OpenSSH-Win64\'              # 进入ssh 软件目录powershell.exe -ExecutionPolicy Bypass -file .\install-sshd.ps1                                                                          # 安装文件 当前目录下的  install-sshd.ps1 这个文件‘’sc config sshd start= auto                                  net start sshd                                                     # 设置服务自动启动并启动服务开启sshd服务,正常#------------------ 其它堆积 ---------------#先参考:https://www.jianshu.com/p/f8ba3e51d60e里面的步骤将,ssh文件拷贝到C:\Program Files 目录下,配置好环境变量。然后参考:https://www.cnblogs.com/herui1991/p/12376841.html 步骤:::打开cmd,安装sshdcd "C:\Program Files (x86)\OpenSSH-Win64"powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1::设置服务自动启动并启动服务sc config sshd start= autonet start sshd开启sshd服务,正常
 0   0  692天前
admin
603
Windows 2012服务器默认只允许单个用户连接一个远程桌面会话,如果已有连接登录,另外的连接再登录会移除之前的连接。如果需要两个远程桌面同时连接,该如何操作。目前可以同时支持2个用户同时登录,超过2个用户会受到微软软件的限制,会收费。解决方案该操作包含注册表配置,错误的注册表配置可能导致系统蓝屏、数据丢失。请您操作前务必对系统盘、数据盘创建快照后进行。需要修改注册表,执行regedit可以打开注册表。找到或者粘贴到注册表地址栏:   计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\      右侧找到 fSingleSessionPerUser 键值,右键可以修改键值,默认键值是 1。修改为 0,单击 保存,不需要重启服务器。配置好后,再尝试通过2个远程桌面连接即可。问题: 远程登录后锁定了本地电脑桌面cmd 输入:  gpedit 计算机配置 -> 管理模版 -> Windows 组件 -> 远程桌面会话主机 -> 连接 -> 将远程桌面服务用户限制到单独的远程桌面服务会话【双击选择关闭】 -> 限制连接的数量   【双击修改为2 】阿里云教程:https://help.aliyun.com/knowledge_detail/40888.html
 0   0  707天前
admin
764
win+R  输入 cmd 进入命令界面:powershell                                       # 命令进入脚本模式[System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\Windows\System32\drivers\viostor.sys")                                                        # 执行命令查看目前版本:尾号编码是版本,小于58011 需要升级Set-ExecutionPolicy Unrestricted     # 授予shell 执行权限     https://windows-driver-cn-beijing.oss-cn-beijing.aliyuncs.com/virtio/InstallVirtIo.ps1?spm=a2c4g.11186623.0.0.49da1527qE1DV9&file=InstallVirtIo.ps1                                                        # 浏览器下载启动脚本                                                        # 右键使用 powershell  打开                                                        # 重启系统控制台操作重启是,重启过程中会有阿里云api接口进行增大磁盘空间,服务器内操作重启无效阿里官方教程:   https://help.aliyun.com/document_detail/113322.html扩容只能对末尾分区进行扩容,如果创建了快照,建议使用分区工具进行扩容:https://www.diskgenius.cn/Get-Disk | Select-Object uniqueid#------------------------------ 脚本内容  ----------------------------------## Check the OS version$OSversion = [Environment]::OSVersion.Versionif ($OSversion.Major -le 6 -and $OSversion.Minor -lt 1) {    Write-Host "This scrip is not supported on Windows 2008 or lower"    exit} elseif ($OSversion.Major -eq 6 -and $OSversion.Minor -eq 1) {    $os_ver = "win7"} elseif ($OSversion.Major -eq 6 -and $OSversion.Minor -eq 2) {    $os_ver = "win8"} elseif ($OSversion.Major -eq 6 -and $OSversion.Minor -eq 3) {    $os_ver = "win8"} elseif ($OSversion.Major -ge 10) {    $os_ver = "win10"}$cur_dir = $PSScriptRoot$log_dir = [io.path]::combine($cur_dir, "log")$CertPath = [io.path]::Combine($cur_dir, "aliyun.cer")if (-not (Test-Path $log_dir)){    New-Item -ItemType Directory -Path $log_dir -Force}$log_path = [io.path]::combine($log_dir, "test$(Get-date -format "yyyy-MM-dd").log")function Write-Log ($content, $log_level = 0) {    $cur_time = Get-Date -Format "yyy-MM-dd hh:mm:ss"    Switch($log_level) {        {($_ -eq 1)} { $errFlag = "warning"; $color = [ConsoleColor]::Yellow }        {($_ -eq 2)}{ $errFlag = "error"; $color = [ConsoleColor]::Red }        default { $errFlag = "info"; $color = [ConsoleColor]::Green }    }    $format_content = "[$cur_time] [${errFlag}] ${content}"    Add-Content -Value $format_content -Path $log_path}function Check-Result($content, $ret_flag = $true) {    if ($ret_flag) {        Write-Log "${content} success."    }else {        throw "$content failed."    }}function Check-LastExitCode($content, $exit_code = 0) {     Switch($exit_code) {        {($_ -eq 0)} { Write-Log "${content} success." }        default {throw "$content failed." }    }}function Download_file($url, $file_path) {    if (Test-Path $file_path) {        Write-Log "$file_path alreasy exist"        return $true    }    try {        Invoke-WebRequest -Uri $url -OutFile $file_path -UseBasicParsing -TimeoutSec 30        return $?    } catch {        Write-Log "Download_file "+ $url +" failed"    }    return $false }function Unzip-File($ZipFile, $TargetFolder) {<#    if (Test-Path $file_path) {        Write-Log "$file_path already exist"        return    }    Expand-Archive -Path $zip_path -DestinationPath $file_path    Check-Result "unzip $zip_path" $?#>    if (!(Test-Path $ZipFile)) {        throw "not exist $ZipFile"    }    if(!(Test-Path $TargetFolder)) {         New-Item -ItemType Directory $TargetFolder -Force    }    if ($os_ver -ne "win10") {        $shellApp = New-Object -ComObject Shell.Application        $files = $shellApp.NameSpace($ZipFile).Items()        # 删除已存在的解压后的文件         $files|where{Remove-Item ("$TargetFolder/{0}*" -f  $_.name ) -Force -Recurse -ErrorAction:SilentlyContinue}        $shellApp.NameSpace($TargetFolder).CopyHere($files)    } else {        Expand-Archive -Path $ZipFile -DestinationPath $TargetFolder -Force         Check-Result "Unzip $ZipFile" $?    }}function Fix_Driver() {    $fix_dir = $(pwd)    Write-Log "fix dir is $fix_dir"    try {        & cmd /c pnputil -i -a *.inf        Check-LastExitCode "fix virtio" $LASTEXITCODE    } catch {        Write-Log "system already installed the driver"    }}function GetRegionId() {    $resionId = ""    try{        $region=Invoke-WebRequest -Uri  "http://100.100.100.200/latest/meta-data/region-id" -UseBasicParsing -ErrorAction SilentlyContinue        $resionId = $region.Content    }    catch{    }    return  $resionId}function GetDownloadUrlList ($file_name, $is_virtio){    $url_list = New-Object -TypeName System.Collections.ArrayList    $regionId = GetRegionId     $driver_type = "nvme"    if ($is_virtio) {        $driver_type = "virtio"    }    if ($regionId -ne "") {        $null = $url_list.Add("http://windows-driver-"+$regionId+".oss-"+$regionId+"-internal.aliyuncs.com/"+$driver_type+"/"+$file_name)    }    $null = $url_list.Add("http://windows-driver-cn-beijing.oss-cn-beijing.aliyuncs.com/"+$driver_type+"/"+$file_name)    $null = $url_list.Add("http://windows-driver-us-west-1.oss-us-west-1.aliyuncs.com/"+$driver_type+"/"+$file_name)    return $url_list}function TryDownloadDriver($file_name, $is_virtio) {    $driver_url_list = GetDownloadUrlList $file_name $is_virtio    foreach ($url in $driver_url_list) {        $local_file = [io.path]::Combine($cur_dir,$file_name)        $ret = Download_file $url $local_file        if ($ret) {            return $true        }    }    return $false}function Update-Cert() {    $old_cert = & certutil.exe -store TrustedPublisher    if ($old_cert.Count -eq 2) {       Write-Log "aliyun certificate does not exist in the system"       $old_id = $null    } else {        $old_id = $old_cert[2].split(' ')[-1]        }    $new_id = ((& certutil.exe $CertPath)[2]).split(' ')[-1]    if ($old_id -ne $new_id) {        Write-Log "Now update system aliyun cert"        & certutil.exe -addstore TrustedPublisher $CertPath        if ($LASTEXITCODE -ne 0) { throw "update system aliyun cert error, please check" }    }}function InstallDriver ($file_name, $is_virtio){    $ret = TryDownloadDriver $file_name  $is_virtio    Check-Result "TryDownloadDriver "+$zip_path $ret    $ret = TryDownloadDriver 'aliyun.cer'  $is_virtio    Check-Result "TryDownloadCert " $ret    Update-Cert    $virtio_file = [io.path]::Combine($cur_dir,$file_name)    $driver_com_dir =  [io.path]::Combine($cur_dir,$file_name.Substring(0,$file_name.Length-4))    Unzip-File $virtio_file $driver_com_dir    $arch = "amd64"    if (([Array](Get-WmiObject -Query "select AddressWidth from Win32_Processor"))[0].AddressWidth -ne 64) {        $arch = "x86"    }    $driver_bin_dir = [io.path]::Combine($driver_com_dir, $os_ver, $arch)    Push-Location    Set-Location $driver_bin_dir    Fix_Driver    Pop-Location}InstallDriver "210408.1454.1459_bin.zip" $true#--------------------------------------------------------------------------#
 0   0  803天前
admin
592
但是外网可以访问服务器,服务器访问不了外网目前有两种方式可以配置:1. 禁用网卡32. 配置网卡3 的跳跃值高于网卡2 ,跳跃值越高优先级越低。配置步骤:网卡属性---ipv4 --- 高级 ---- 取消勾选自动跳跃--- 设置值
 0   0  840天前
admin
1257
情况: windows 查看远程桌面端口,windos开启ping, mstsc 保存了密码重新输入密码。windows 修改显示屏幕分辨率闪退,函数,凭据无法工作,内部错误,设置正常启动,收集错误信息重新启动,命令重启远程桌面服务,windows 查看远程桌面端口 #  windos 开启ping进入服务器后 点击 开始——运行 输入命令:netsh firewall set icmpsetting 8这样就可以在外部ping到服务器了 非常简单实用!同样道理,如果想禁止Ping,那运行如下命令即可实现:netsh firewall set icmpsetting 8 disable方法2.1. 进入控制面板——>管理工具——>找到 “高级安全 Windows防火墙”2. 点击 入站规则3. 找到 回显请求-ICMPv4-In (Echo Request – ICMPv4-In)4. 右键 点击规则 点击“启用规则(Enable) #  windos查看远程桌面端口tasklist /svc | findstr "TermService"         # 通过cmd 命令查看到远程桌面pid进程号 4419netstat -ano | findstr 4419                      # 通过pid 号,查看监听的端口 #  windows 修改显示屏幕分辨率服务器调整分辨率:https://jingyan.baidu.com/article/9989c7466e8e6eb748ecfe9c.html远程 mstsc 中修改分辨率:https://jingyan.baidu.com/article/19192ad835016ee53f570765.html #  mstsc 保存了密码重新输入密码# 再mstsc 弹出界面 【将使用保存的姘居连接到此计算机。可以编辑或删除这些凭证】 点击删除凭证。workbench 保存了密码要重新输入密码 #  修改注册表cmd命令打开注册表:  regedit  或者 regedit.msc  打开注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server\然后查看TLS 1.0是否启用。修改选择十进制enable=1disabledbydefault=0 #  命令重启远程桌面服务停止远程桌面服务net stop TermService启动远程桌面服务net start TermService#  内部错误   修改RDP#--- 修改 RDP ---#1. 打开运行 --输入gpedit.msc--计算机配置--管理模板--windows组件--远程桌面服务--远程桌面会话主机--安全--远程(RDP)链接要求使用制定的安全层--已启用--安全层选择RDP重点:远程桌面设置 -> 高级设置 -> 需要计算机使用网络级别身份验证进行连接 -> 取消勾选2 . cmd 命令:重启远程桌面服务:net stop TermService       # 停止远程桌面服务net start TermService       # 启动远程桌面服务3.cmd命令打开注册表:  regedit  或者 regedit.msc  打开注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server\然后查看TLS 1.0是否启用。enable=1disabledbydefault=04. 此电脑---> 属性--->远程设置----> 仅运行网络身份级别(取消勾选) #  开启多用户 痛死允许两个用户登录 -- 单个用户连接多个远程桌面会话Windows 2012服务器默认只允许单个用户连接一个远程桌面会话,如果已有连接登录,另外的连接再登录会移除之前的连接。如果需要两个远程桌面同时连接,该如何操作。目前可以同时支持2个用户同时登录,超过2个用户会受到微软软件的限制,会收费。解决方案该操作包含注册表配置,错误的注册表配置可能导致系统蓝屏、数据丢失。请您操作前务必对系统盘、数据盘创建快照后进行。需要修改注册表,执行regedit可以打开注册表。找到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server,右侧找到 fSingleSessionPerUser 键值,右键可以修改键值,默认键值是 1。修改为 0,单击 保存,不需要重启服务器。配置好后,再尝试通过2个远程桌面连接即可。#--- 配置两个用户 ------#打开cmd,输入gpedit.msc 组策略,找到【计算机设置】--【管理模板】--【windows组件】--【远程桌面服务】--【远程桌面会话主机】--【连接】--- 【限制远程连接数量】--- 已启用,设置为 22. 重点:在连接的设置列表中,双击【将远程桌面服务用户限制到单独的远程桌面服务会话】选择已禁用,单击应用,再单击确定即可。阿里云教程(无效教程):https://help.aliyun.com/knowledge_detail/40888.html  修改windos 远程连接数为 2(有效教程):https://help.aliyun.com/knowledge_detail/40885.html #  闪退关闭360安全软件windos 服务器需要多个用户同时连接服务器使用 默认情况下最多支持2个用户同时登录,如果需要更多用户同时登录,那么就需要单独安装远程桌面角色服务使用,安装后服务器默认有120天的Grace Period,允许不限制用户数的远程连接。在120天后,您必须指定一台已经安装Remote Desktop License的远程桌面授权服务器才可以多用户继续连接,这个需要到微软官方购买。卸载多用户,  删除注册表#  由于没有远程桌面授权服务器可以提供许可证,远程会话连接已断开。 请跟服务器管理员联系。多用户是需要购买微软的授权。如果不想付费使用多用户功能,就不要安装多用户软件。目前解决方法是卸载多用户或者重装系统。1. 卸载软件参考;https://help.aliyun.com/knowledge_detail/40859.html2. 百度注册表教程:https://zhidao.baidu.com/question/564067493.html#------------ 删除注册表 ------------#出现“由于没有远程桌面授权服务器可以提供许可证,远程会话被中断”问题是因为微软默认的远程登录只提供120天的使用期限。解决该问题的具体步骤如下:1、打开运行,在运行中输入注册表命令“regedit”,然后回车通过命令打开注册表对话框。2、在注册表对话框中依次打开“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod”。3、右键点击“GracePeriod”,在菜单中点击“权限”。4、修改“GracePeriod”的管理员权限,勾选完全控制为允许,勾选读取为允许。5、获取管理员权限后,再右键点击“GracePeriod”,在菜单中点击“删除”。6、在“确认项删除”弹出窗口中点击“是”。7、 删除“GracePeriod”这一项后,为了使注册表及时生效,此时要重启系统。重启完成后,问题解决。这样就解决了“Server2008R2:由于没有远程桌面授权服务器可以提供许可证,远程会话被中断#--- 其他案例 ---##-------  删除远程桌面会话主机角色,使用默认两个用户的免费连接授权。参考以下步骤对不同版本的Windows服务器进行配置 ----#通过管理终端连接Windows实例,详情请参见通过管理终端。选择开始,单击运行,在打开框中输入ServerManager,单击确定。进入服务器管理器页面,选择管理>删除角色和功能。进入删除功能和角色页面,单击下一步,单击下一步。在角色框中,取消勾选远程桌面服务,其它配置默认,单击下一步。在Windows实例内重启实例。#  windows 设置正常启动开机按 f8   选择正常启动cmd 命令:msconfig打开启动项,设置常规---正常启动---重启服务器#  收集错误信息重新启动重启的时候,可以进入安全模式,进入最后一次正确配置试试开机按 f8 高级启动---【疑难解答】这个双击打开---【高级选项】我们双击打开--- 【启动设置】的选项 ---页面里右下角会有一个【重启】按钮 --- 等到重启后,我们就会发现,我们的安全模式界面就出现了【疑难解答】这个双击打开cmd 命令:msconfig另外用户对机器做了哪些操作才这样的#  3. 病毒,重置网络百度教程:https://jingyan.baidu.com/article/39810a23fe4e9ef736fda6bd.htmlWindows远程桌面(RDP)连接安全层:https://www.100tim.com/article/view_2.html1)window+X ,找到管理员身份的cmd窗体2)输入执行初始化网络语句, netsh winsock reset3)重启电脑#  4. 函数## 函数不支持,需要修改下远程桌面设置就可了。此电脑---> 属性--->远程设置----> 仅运行网络身份级别(取消勾选)函数不支持:https://jingyan.baidu.com/article/c275f6ba7d7997e33d756789.html#  5. windows远程桌面无法连接或凭据无法工作1、按下【win+R】,【运行】触开。2、输入【gpedit.msc】,按下【确定】。3、按开【计算机管理】-【管理模板】-【系统】。4、找到【凭据分配】,单击下它。5、找到【允许分配保存的凭据用于仅NTLM服务器身份验证】。6、选择【编辑】,设置为【已启用】,并且按下【显示】。7、输入下【8123】了,关闭电脑重启下解决问题。# 下面命令不需要执行# 输入下【termsrv/*】了,关闭电脑重启下解决问题。# 远程连接出现“由于没有远程桌面授权服务器可以提供许可证,远程会话被中断。”的处理方法https://www.cnblogs.com/newlooker/p/4615753.html#  6. windows 查看远程桌面端口查看 ECS Windows 远程桌面端口方法一1、远程连接并登录到 Windows 实例。2、选择开始 > 运行,输入 cmd 打开命令窗口。3、执行命令 tasklist /svc | find "Ter",本例中查看到 TermService 的 PID 是 1592。4、执行命令 netstat -ano | find "1592",查看 TermService 使用的端口,如示例中的 3389。
 8   0  849天前
admin
741
windows IIS搭建Web网站外网无法访问问题分析:  是因为 127.0.0.1 是本地访问测试,外部是无法访问的,需要监听到  0.0.0.0  netsh http show iplist                     # 查看 httpd 监听的端口netsh http del iplisten 127.0.0.1      # 删除127.0.0.1 监听netsh http del iplisten 0.0.0.0net stop http /y                              # 停止 httpd 服务iisreset /restart                                # 启动httpd 服务
 0   0  870天前
admin
1228
windows设置本地域名解析1、首先找到host文件:C:\Windows\System32\drivers\etc2、用记事本打开host文件:    在文件末尾写入:192.168.111.10 a.cc192.168.111.11 b.cc# 表示将两个IP各自进行本地解析到 a.cc  和 b.cc 域名# 保存后,进行ping域名,前提是 使用 vm 开启虚拟机,IP为上面的IP 1 # Copyright (c) 1993-2009 Microsoft Corp. 2 ## This is a sample HOSTS file used by Microsoft TCP/IP for Windows. 3 ## This file contains the mappings of IP addresses to host names. Each 4 # entry should be kept on an individual line. The IP address should 5 # be placed in the first column followed by the corresponding host name. 6 # The IP address and the host name should be separated by at least one 7 # space.## Additionally, comments (such as these) may be inserted on individual 8 # lines or following the machine name denoted by a '#' symbol. 9 ## For example:10 ##      102.54.94.97     rhino.acme.com          11 # source server12 #       38.25.63.10     x.acme.com 13 # x client host14 15 # localhost name resolution is handled within DNS itself.16 # 127.0.0.1       localhost17 # ::1             localhost18 0.0.0.0 account.jetbrains.com3、找到 38.25.63.10 x.acme.com ,注意#为注释,在下方添加新的# Copyright (c) 1993-2009 Microsoft Corp.## This is a sample HOSTS file used by Microsoft TCP/IP for Windows.## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an individual line. The IP address should# be placed in the first column followed by the corresponding host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on individual# lines or following the machine name denoted by a '#' symbol.## For example:##      102.54.94.97     rhino.acme.com          # source server#       38.25.63.10     x.acme.com       '127.0.0.1 a.cn       # x client host# localhost name resolution is handled within DNS itself.# 127.0.0.1       localhost# ::1             localhost0.0.0.0 account.jetbrains.com4、进行cmd,ping发现指向127.0.0.1
 3   0  1175天前
admin
197
 控制面板 --->> 时间和语言--->语言--->管理语言设置  ->“管理”选项卡 --->更改系统区域设置 --->选择 beta版前面的对勾--->确认重启电脑
 2   0  84天前
admin
228
QEMU emulator version 7.2.0 (v7.2.0-11948-ge6523b71fc-dirty) Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers usage: D:\wanyang\anzhuang\qemu\qemu-system-x86_64.exe [options] [disk_image] 'disk_image' is a raw hard disk image for IDE hard disk 0 Standard options: -h or -help display this help and exit -version display version information and exit -machine [type=]name[,prop[=value][,...]] selects emulated machine ('-machine help' for list) property accel=accel1[:accel2[:...]] selects accelerator supported accelerators are kvm, xen, hax, hvf, nvmm, whpx or tcg (default: tcg) vmport=on|off|auto controls emulation of vmport (default: auto) dump-guest-core=on|off include guest memory in a core dump (default=on) mem-merge=on|off controls memory merge support (default: on) aes-key-wrap=on|off controls support for AES key wrapping (default=on) dea-key-wrap=on|off controls support for DEA key wrapping (default=on) suppress-vmdesc=on|off disables self-describing migration (default=off) nvdimm=on|off controls NVDIMM support (default=off) memory-encryption=@var{} memory encryption object to use (default=none) hmat=on|off controls ACPI HMAT support (default=off) memory-backend='backend-id' specifies explicitly provided backend for main RAM (default=none) cxl-fmw.0.targets.0=firsttarget,cxl-fmw.0.targets.1=secondtarget,cxl-fmw.0.size=size[,cxl-fmw.0.interleave-granularity=granularity] sgx-epc.0.memdev=memid,sgx-epc.0.node=numaid -cpu cpu select CPU ('-cpu help' for list) -accel [accel=]accelerator[,prop[=value][,...]] select accelerator (kvm, xen, hax, hvf, nvmm, whpx or tcg; use 'help' for a list) igd-passthru=on|off (enable Xen integrated Intel graphics passthrough, default=off) kernel-irqchip=on|off|split controls accelerated irqchip support (default=on) kvm-shadow-mem=size of KVM shadow MMU in bytes split-wx=on|off (enable TCG split w^x mapping) tb-size=n (TCG translation block cache size) dirty-ring-size=n (KVM dirty ring GFN count, default 0) notify-vmexit=run|internal-error|disable,notify-window=n (enable notify VM exit and set notify window, x86 only) thread=single|multi (enable multi-threaded TCG) -smp [[cpus=]n][,maxcpus=maxcpus][,sockets=sockets][,dies=dies][,clusters=clusters][,cores=cores][,threads=threads] set the number of initial CPUs to 'n' [default=1] maxcpus= maximum number of total CPUs, including offline CPUs for hotplug, etc sockets= number of sockets on the machine board dies= number of dies in one socket clusters= number of clusters in one die cores= number of cores in one cluster threads= number of threads in one core Note: Different machines may have different subsets of the CPU topology parameters supported, so the actual meaning of the supported parameters will vary accordingly. For example, for a machine type that supports a three-level CPU hierarchy of sockets/cores/threads, the parameters will sequentially mean as below: sockets means the number of sockets on the machine board cores means the number of cores in one socket threads means the number of threads in one core For a particular machine type board, an expected CPU topology hierarchy can be defined through the supported sub-option. Unsupported parameters can also be provided in addition to the sub-option, but their values must be set as 1 in the purpose of correct parsing. -numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=node] -numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=node] -numa dist,src=source,dst=destination,val=distance -numa cpu,node-id=node[,socket-id=x][,core-id=y][,thread-id=z] -numa hmat-lb,initiator=node,target=node,hierarchy=memory|first-level|second-level|third-level,data-type=access-latency|read-latency|write-latency[,latency=lat][,bandwidth=bw] -numa hmat-cache,node-id=node,size=size,level=level[,associativity=none|direct|complex][,policy=none|write-back|write-through][,line=size] -add-fd fd=fd,set=set[,opaque=opaque] Add 'fd' to fd 'set' -set group.id.arg=value set <arg> parameter for item <id> of type <group> i.e. -set drive.$id.file=/path/to/image -global driver.property=value -global driver=driver,property=property,value=value set a global default for a driver property -boot [order=drives][,once=drives][,menu=on|off] [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off] 'drives': floppy (a), hard disk (c), CD-ROM (d), network (n) 'sp_name': the file's name that would be passed to bios as logo picture, if menu=on 'sp_time': the period that splash picture last if menu=on, unit is ms 'rb_timeout': the timeout before guest reboot when boot failed, unit is ms -m [size=]megs[,slots=n,maxmem=size] configure guest RAM size: initial amount of guest memory slots: number of hotplug slots (default: none) maxmem: maximum amount of guest memory (default: none) NOTE: Some architectures might enforce a specific granularity -mem-path FILE provide backing storage for guest RAM -mem-prealloc preallocate guest memory (use with -mem-path) -k language use keyboard layout (for example 'fr' for French) -audio-help show -audiodev equivalent of the currently specified audio settings -audio [driver=]driver,model=value[,prop[=value][,...]] specifies the audio backend and device to use; apart from 'model', options are the same as for -audiodev. use '-audio model=help' to show possible devices. -audiodev [driver=]driver,id=id[,prop[=value][,...]] specifies the audio backend to use Use ``-audiodev help`` to list the available drivers id= identifier of the backend timer-period= timer period in microseconds in|out.mixing-engine= use mixing engine to mix streams inside QEMU in|out.fixed-settings= use fixed settings for host audio in|out.frequency= frequency to use with fixed settings in|out.channels= number of channels to use with fixed settings in|out.format= sample format to use with fixed settings valid values: s8, s16, s32, u8, u16, u32, f32 in|out.voices= number of voices to use in|out.buffer-length= length of buffer in microseconds -audiodev none,id=id,[,prop[=value][,...]] dummy driver that discards all output -audiodev dsound,id=id[,prop[=value][,...]] latency= add extra latency to playback in microseconds -audiodev sdl,id=id[,prop[=value][,...]] in|out.buffer-count= number of buffers -audiodev spice,id=id[,prop[=value][,...]] -audiodev wav,id=id[,prop[=value][,...]] path= path of wav file to record -device driver[,prop[=value][,...]] add device (based on driver) prop=value,... sets driver properties use '-device help' to print all possible drivers use '-device driver,help' to print all possible properties -name string1[,process=string2][,debug-threads=on|off] set the name of the guest string1 sets the window title and string2 the process name When debug-threads is enabled, individual threads are given a separate name NOTE: The thread names are for debugging and not a stable API. -uuid %08x-%04x-%04x-%04x-%012x specify machine UUID Block device options: -fda/-fdb file use 'file' as floppy disk 0/1 image -hda/-hdb file use 'file' as IDE hard disk 0/1 image -hdc/-hdd file use 'file' as IDE hard disk 2/3 image -cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master) -blockdev [driver=]driver[,node-name=N][,discard=ignore|unmap] [,cache.direct=on|off][,cache.no-flush=on|off] [,read-only=on|off][,auto-read-only=on|off] [,force-share=on|off][,detect-zeroes=on|off|unmap] [,driver specific parameters...] configure a block backend -drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i] [,cache=writethrough|writeback|none|directsync|unsafe][,format=f] [,snapshot=on|off][,rerror=ignore|stop|report] [,werror=ignore|stop|report|enospc][,id=name] [,aio=threads|native|io_uring] [,readonly=on|off][,copy-on-read=on|off] [,discard=ignore|unmap][,detect-zeroes=on|off|unmap] [[,bps=b]|[[,bps_rd=r][,bps_wr=w]]] [[,iops=i]|[[,iops_rd=r][,iops_wr=w]]] [[,bps_max=bm]|[[,bps_rd_max=rm][,bps_wr_max=wm]]] [[,iops_max=im]|[[,iops_rd_max=irm][,iops_wr_max=iwm]]] [[,iops_size=is]] [[,group=g]] use 'file' as a drive image -mtdblock file use 'file' as on-board Flash memory image -sd file use 'file' as SecureDigital card image -snapshot write to temporary files instead of disk image files -fsdev local,id=id,path=path,security_model=mapped-xattr|mapped-file|passthrough|none [,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode] [[,throttling.bps-total=b]|[[,throttling.bps-read=r][,throttling.bps-write=w]]] [[,throttling.iops-total=i]|[[,throttling.iops-read=r][,throttling.iops-write=w]]] [[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]] [[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm]]] [[,throttling.iops-size=is]] -fsdev proxy,id=id,socket=socket[,writeout=immediate][,readonly=on] -fsdev proxy,id=id,sock_fd=sock_fd[,writeout=immediate][,readonly=on] -fsdev synth,id=id -virtfs local,path=path,mount_tag=tag,security_model=mapped-xattr|mapped-file|passthrough|none [,id=id][,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode][,multidevs=remap|forbid|warn] -virtfs proxy,mount_tag=tag,socket=socket[,id=id][,writeout=immediate][,readonly=on] -virtfs proxy,mount_tag=tag,sock_fd=sock_fd[,id=id][,writeout=immediate][,readonly=on] -virtfs synth,mount_tag=tag[,id=id][,readonly=on] -iscsi [user=user][,password=password] [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE [,initiator-name=initiator-iqn][,id=target-iqn] [,timeout=timeout] iSCSI session parameters USB convenience options: -usb enable on-board USB host controller (if not enabled by default) -usbdevice name add the host or guest USB device 'name' Display options: -display spice-app[,gl=on|off] -display sdl[,gl=on|core|es|off][,grab-mod=<mod>][,show-cursor=on|off] [,window-close=on|off] -display gtk[,full-screen=on|off][,gl=on|off][,grab-on-hover=on|off] [,show-tabs=on|off][,show-cursor=on|off][,window-close=on|off] [,show-menubar=on|off] -display vnc=<display>[,<optargs>] -display curses[,charset=<encoding>] -display egl-headless[,rendernode=<file>] -display none select display backend type The default display is equivalent to "-display gtk" -nographic disable graphical output and redirect serial I/Os to console -spice [port=port][,tls-port=secured-port][,x509-dir=<dir>] [,x509-key-file=<file>][,x509-key-password=<file>] [,x509-cert-file=<file>][,x509-cacert-file=<file>] [,x509-dh-key-file=<file>][,addr=addr] [,ipv4=on|off][,ipv6=on|off][,unix=on|off] [,tls-ciphers=<list>] [,tls-channel=[main|display|cursor|inputs|record|playback]] [,plaintext-channel=[main|display|cursor|inputs|record|playback]] [,sasl=on|off][,disable-ticketing=on|off] [,password=<string>][,password-secret=<secret-id>] [,image-compression=[auto_glz|auto_lz|quic|glz|lz|off]] [,jpeg-wan-compression=[auto|never|always]] [,zlib-glz-wan-compression=[auto|never|always]] [,streaming-video=[off|all|filter]][,disable-copy-paste=on|off] [,disable-agent-file-xfer=on|off][,agent-mouse=[on|off]] [,playback-compression=[on|off]][,seamless-migration=[on|off]] [,gl=[on|off]][,rendernode=<file>] enable spice at least one of {port, tls-port} is mandatory -portrait rotate graphical output 90 deg left (only PXA LCD) -rotate <deg> rotate graphical output some deg left (only PXA LCD) -vga [std|cirrus|vmware|qxl|xenfb|tcx|cg3|virtio|none] select video card type -full-screen start in full screen -vnc <display> shorthand for -display vnc=<display> i386 target only: -win2k-hack use it when installing Windows 2000 to avoid a disk full bug -no-fd-bootchk disable boot signature checking for floppy disks -no-acpi disable ACPI -no-hpet disable HPET -acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...] ACPI table description -smbios file=binary load SMBIOS entry from binary file -smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d] [,uefi=on|off] specify SMBIOS type 0 fields -smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str] [,uuid=uuid][,sku=str][,family=str] specify SMBIOS type 1 fields -smbios type=2[,manufacturer=str][,product=str][,version=str][,serial=str] [,asset=str][,location=str] specify SMBIOS type 2 fields -smbios type=3[,manufacturer=str][,version=str][,serial=str][,asset=str] [,sku=str] specify SMBIOS type 3 fields -smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str] [,asset=str][,part=str][,max-speed=%d][,current-speed=%d] [,processor-id=%d] specify SMBIOS type 4 fields -smbios type=8[,external_reference=str][,internal_reference=str][,connector_type=%d][,port_type=%d] specify SMBIOS type 8 fields -smbios type=11[,value=str][,path=filename] specify SMBIOS type 11 fields -smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str] [,asset=str][,part=str][,speed=%d] specify SMBIOS type 17 fields -smbios type=41[,designation=str][,kind=str][,instance=%d][,pcidev=str] specify SMBIOS type 41 fields Network options: -netdev user,id=str[,ipv4=on|off][,net=addr[/mask]][,host=addr] [,ipv6=on|off][,ipv6-net=addr[/int]][,ipv6-host=addr] [,restrict=on|off][,hostname=host][,dhcpstart=addr] [,dns=addr][,ipv6-dns=addr][,dnssearch=domain][,domainname=domain] [,tftp=dir][,tftp-server-name=name][,bootfile=f][,hostfwd=rule][,guestfwd=rule] configure a user mode network backend with ID 'str', its DHCP server and optional services -netdev tap,id=str,ifname=name configure a host TAP network backend with ID 'str' -netdev socket,id=str[,fd=h][,listen=[host]:port][,connect=host:port] configure a network backend to connect to another network using a socket connection -netdev socket,id=str[,fd=h][,mcast=maddr:port[,localaddr=addr]] configure a network backend to connect to a multicast maddr and port use 'localaddr=addr' to specify the host address to send packets from -netdev socket,id=str[,fd=h][,udp=host:port][,localaddr=host:port] configure a network backend to connect to another network using an UDP tunnel -netdev stream,id=str[,server=on|off],addr.type=inet,addr.host=host,addr.port=port[,to=maxport][,numeric=on|off][,keep-alive=on|off][,mptcp=on|off][,addr.ipv4=on|off][,addr.ipv6=on|off] -netdev stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|off] -netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor configure a network backend to connect to another network using a socket connection in stream mode. -netdev dgram,id=str,remote.type=inet,remote.host=maddr,remote.port=port[,local.type=inet,local.host=addr] -netdev dgram,id=str,remote.type=inet,remote.host=maddr,remote.port=port[,local.type=fd,local.str=file-descriptor] configure a network backend to connect to a multicast maddr and port use ``local.host=addr`` to specify the host address to send packets from -netdev dgram,id=str,local.type=inet,local.host=addr,local.port=port[,remote.type=inet,remote.host=addr,remote.port=port] -netdev dgram,id=str,local.type=unix,local.path=path[,remote.type=unix,remote.path=path] -netdev dgram,id=str,local.type=fd,local.str=file-descriptor configure a network backend to connect to another network using an UDP tunnel -netdev hubport,id=str,hubid=n[,netdev=nd] configure a hub port on the hub with ID 'n' -nic [tap|bridge|user|socket][,option][,...][mac=macaddr] initialize an on-board / default host NIC (using MAC address macaddr) and connect it to the given host network backend -nic none use it alone to have zero network devices (the default is to provided a 'user' network connection) -net nic[,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v] configure or create an on-board (or machine default) NIC and connect it to hub 0 (please use -nic unless you need a hub) -net [user|tap|bridge|socket][,option][,option][,...] old way to initialize a host network interface (use the -netdev option if possible instead) Character device options: -chardev help -chardev null,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off] -chardev socket,id=id[,host=host],port=port[,to=to][,ipv4=on|off][,ipv6=on|off][,nodelay=on|off] [,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect=seconds][,mux=on|off] [,logfile=PATH][,logappend=on|off][,tls-creds=ID][,tls-authz=ID] (tcp) -chardev socket,id=id,path=path[,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect=seconds] [,mux=on|off][,logfile=PATH][,logappend=on|off][,abstract=on|off][,tight=on|off] (unix) -chardev udp,id=id[,host=host],port=port[,localaddr=localaddr] [,localport=localport][,ipv4=on|off][,ipv6=on|off][,mux=on|off] [,logfile=PATH][,logappend=on|off] -chardev msmouse,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off] -chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]] [,mux=on|off][,logfile=PATH][,logappend=on|off] -chardev ringbuf,id=id[,size=size][,logfile=PATH][,logappend=on|off] -chardev file,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off] -chardev pipe,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off] -chardev console,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off] -chardev serial,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off] -chardev braille,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off] -chardev spicevmc,id=id,name=name[,debug=debug][,logfile=PATH][,logappend=on|off] -chardev spiceport,id=id,name=name[,debug=debug][,logfile=PATH][,logappend=on|off] Boot Image or Kernel specific: -bios file set the filename for the BIOS -pflash file use 'file' as a parallel flash image -kernel bzImage use 'bzImage' as kernel image -append cmdline use 'cmdline' as kernel command line -initrd file use 'file' as initial ram disk -dtb file use 'file' as device tree image Debug/Expert options: -compat [deprecated-input=accept|reject|crash][,deprecated-output=accept|hide] Policy for handling deprecated management interfaces -compat [unstable-input=accept|reject|crash][,unstable-output=accept|hide] Policy for handling unstable management interfaces -fw_cfg [name=]<name>,file=<file> add named fw_cfg entry with contents from file -fw_cfg [name=]<name>,string=<str> add named fw_cfg entry with contents from string -serial dev redirect the serial port to char device 'dev' -parallel dev redirect the parallel port to char device 'dev' -monitor dev redirect the monitor to char device 'dev' -qmp dev like -monitor but opens in 'control' mode -qmp-pretty dev like -qmp but uses pretty JSON formatting -mon [chardev=]name[,mode=readline|control][,pretty[=on|off]] -debugcon dev redirect the debug console to char device 'dev' -pidfile file write PID to 'file' -singlestep always run in singlestep mode --preconfig pause QEMU before machine is initialized (experimental) -S freeze CPU at startup (use 'c' to start execution) -overcommit [mem-lock=on|off][cpu-pm=on|off] run qemu with overcommit hints mem-lock=on|off controls memory lock support (default: off) cpu-pm=on|off controls cpu power management (default: off) -gdb dev accept gdb connection on 'dev'. (QEMU defaults to starting the guest without waiting for gdb to connect; use -S too if you want it to not start execution.) -s shorthand for -gdb tcp::1234 -d item1,... enable logging of specified items (use '-d help' for a list of log items) -D logfile output log to logfile (default stderr) -dfilter range,.. filter debug output to range of addresses (useful for -d cpu,exec,etc..) -seed number seed the pseudo-random number generator -L path set the directory for the BIOS, VGA BIOS and keymaps -enable-kvm enable KVM full virtualization support -xen-domid id specify xen guest domain id -xen-attach attach to existing xen domain libxl will use this when starting QEMU -xen-domid-restrict restrict set of available xen operations to specified domain id. (Does not affect xenpv machine type). -no-reboot exit instead of rebooting -no-shutdown stop before shutdown -action reboot=reset|shutdown action when guest reboots [default=reset] -action shutdown=poweroff|pause action when guest shuts down [default=poweroff] -action panic=pause|shutdown|exit-failure|none action when guest panics [default=shutdown] -action watchdog=reset|shutdown|poweroff|inject-nmi|pause|debug|none action when watchdog fires [default=reset] -loadvm [tag|id] start right away with a saved state (loadvm in monitor) -option-rom rom load a file, rom, into the option ROM space -rtc [base=utc|localtime|<datetime>][,clock=host|rt|vm][,driftfix=none|slew] set the RTC base and clock, enable drift fix for clock ticks (x86 only) -icount [shift=N|auto][,align=on|off][,sleep=on|off][,rr=record|replay,rrfile=<filename>[,rrsnapshot=<snapshot>]] enable virtual instruction counter with 2^N clock ticks per instruction, enable aligning the host and virtual clocks or disable real time cpu sleeping, and optionally enable record-and-replay mode -watchdog-action reset|shutdown|poweroff|inject-nmi|pause|debug|none action when watchdog fires [default=reset] -echr chr set terminal escape character instead of ctrl-a -incoming tcp:[host]:port[,to=maxport][,ipv4=on|off][,ipv6=on|off] -incoming rdma:host:port[,ipv4=on|off][,ipv6=on|off] -incoming unix:socketpath prepare for incoming migration, listen on specified protocol and socket address -incoming fd:fd -incoming exec:cmdline accept incoming migration on given file descriptor or from given external command -incoming defer wait for the URI to be specified via migrate_incoming -only-migratable allow only migratable devices -nodefaults don't create default devices -sandbox on[,obsolete=allow|deny][,elevateprivileges=allow|deny|children] [,spawn=allow|deny][,resourcecontrol=allow|deny] Enable seccomp mode 2 system call filter (default 'off'). use 'obsolete' to allow obsolete system calls that are provided by the kernel, but typically no longer used by modern C library implementations. use 'elevateprivileges' to allow or deny the QEMU process ability to elevate privileges using set*uid|gid system calls. The value 'children' will deny set*uid|gid system calls for main QEMU process but will allow forks and execves to run unprivileged use 'spawn' to avoid QEMU to spawn new threads or processes by blocking *fork and execve use 'resourcecontrol' to disable process affinity and schedular priority -readconfig <file> read config file -no-user-config do not load default user-provided config files at startup -trace-unassigned Trace unassigned memory or i/o accesses -trace [[enable=]<pattern>][,events=<file>][,file=<file>] specify tracing options -plugin [file=]<file>[,<argname>=<argvalue>] load a plugin -msg [timestamp[=on|off]][,guest-name=[on|off]] control error message format timestamp=on enables timestamps (default: off) guest-name=on enables guest name prefix but only if -name guest option is set (default: off) -dump-vmstate <file> Output vmstate information in JSON format to file. Use the scripts/vmstate-static-checker.py file to check for possible regressions in migration code by comparing two such vmstate dumps. -enable-sync-profile enable synchronization profiling Generic object creation: -object TYPENAME[,PROP1=VALUE1,...] create a new object of type TYPENAME setting properties in the order they are specified. Note that the 'id' property must be set. These objects are placed in the '/objects' path. During emulation, the following keys are useful: ctrl-alt-f toggle full screen ctrl-alt-n switch to virtual console 'n' ctrl-alt toggle mouse and keyboard grab When using -nographic, press 'ctrl-a h' to get some help.
 2   0  95天前
admin
1101
 win10/win11 激活系统,解决: 激活非核心版本1. 输入cmd 命令 regedit  打开注册表2.  粘贴该地址,回车跳转: 计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\    在该目录下找到SkipRearm,双击打开后,将数值0改为1   3. 然后 以管理员身份启动cmd,输入SLMGR -REARM,根据提示,重启电脑4. 再次以管理元身份打开 cmd 输入下面命令激活 slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX slmgr /skms kms.03k.org slmgr /ato#win2012激活试用180天激活,kms密钥激活步骤:按下windows+x打开快捷菜单,选择命令提示符(管理员)slmgr /ipk D2N9P-3P6X9-2R39C-7RTCD-MDVJXslmgr /skms kms.03k.orgslmgr /ato# 注意:激活后还是显示 倒计时,但时间不会变化,停留在这个天数。需要登录 微软网站账户才能下载windos2012 微软下载:https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2012-r2win10/11下载 :https://www.microsoft.com/zh-cn/software-download/windows10ISO激活码:Windows Server 2012 Foundation  RTMNG-7K8HQ-3QVVW-W8QKF-Q9H7D --- 00185-00477-08754-AAOEM  VXHGK-GRJQH-K7WVN-MTXP3-YBFHM --- 00185-65247-05792-ABOEM  BDCBV-BQ27P-9PNJJ-BQJ96-KTJ3Y --- 00185-61015-53182-ABOEM  8MBNB-YB7W9-YV3VJ-7WMGG-MKH7D --- 00185-00000-00010-AAOEM  96764-R7KXM-CJKJB-BNGCW-CPKX3 --- 00185-06266-38201-AAOEM  Windows Server 2012 Essentials OEM SLP  MXHGN-GRJQH-K7WVV-MTXP3-YBFHT --- 00186-00000-00000-AAOEM OEM SLP  JXHGK-GRJQH-N7WVV-MTXP3-YBFHT --- 00186-08304-72192-ABOEM OEM SLP  Windows Server 2012 Standard  VDNYM-JBKJ7-DC4X9-BT3QR-JHRGY --- 00184-00070-00000-AAOEM  BNHD9-KT7MY-4BX83-HTGM4-3C77J --- 00185-48475-45056-AAOEM  2G9DG-XKFR6-VG8D3-DN9T9-CDG98 --- 00185-48952-40532-AAOEM  QXHGN-GRJQH-K7WVV-MTXP3-YBFGD --- 00182-60000-00000-AAOEM原文:http://www.bjjyhx.cn/news/5061-cn.html
 0   0  592天前
admin
1593
vmware 克隆失败,提示指定的虚拟磁盘需要修复点击vmware 的安装路径根目录,在文件管理地址栏,输入cmd  回车,弹出命令窗口,然后:vmware-vdiskmanager -R "H:\ubuntu\Ubuntu.vmdk"# 命令修复虚拟机:H:\ubuntu\Ubuntu.vmdk  The virtual disk, 'H:\ubuntu\Ubuntu.vmdk', was corrupted and has been successfully repaired.
 0   0  596天前
admin
1137
1、Intel:是英特尔公司开发的中央处理器,有移动、台式、服务器三个系列。2、ARM:是英国Acorn有限公司设计的低功耗成本的第一款RISC微处理器。3、AMD:由AMD公司生产的处理器。二、技术不同1、Intel:支持超线程术,同时快速运行多个计算应用,或为采用多线程的单独软件程序提供更多性能。2、ARM:支持Jazelle技术使Java加速得到比基于软件的Jaarm处理器阶梯图 va虚拟机(JVM)高得多的性能,和同等的非Java加速核相比功耗降低80%。3、AMD:支持Alchemy 解决方案有低功率、高性能的 MIPS 处理器、无线技术、开发电路板及参考设计套件。
 0   0  645天前
admin
377
cmd 执行命令:diskpart    list diskgpt 有 * 号为 gpt 分区
 0   0  646天前
admin
516
简介:Antimalware Service Executable是win10内置杀毒软件windows defender的一个进程。一般情况是刚开机是系统运行杀毒程序 这个进程占用cpu高,过一会就没事了。如果觉得它占用cpu太高可以通过设置来关闭它。关闭它有两种方法,一种是关闭启动进程扫描。另一种是关闭windows defende。#------------ 关闭步骤 ------------#鼠标移动到电脑桌面左下角,右键点一下开始,点里面的“运行”,或着win键+R键打开“运行”。在运行里输入:gpedit.msc 确定后就会打开:本地组策略编辑器依次打开:管理模板----windows组件----windows Defender。找到windows Defender下的“实时保护”。然后鼠标双击右侧的“不论何时启用实时保护,都会启用进程扫描。在弹出的设置页面选已禁用。保存就行了。如果还不能解决我们可以用第二种方法就是禁用windows Defender。我们用上面的方法依次打开:管理模板----windows组件--找到-windows Defender,鼠标点一下windows Defender。在右侧找到”关闭windows Defender"并用鼠标双击它 在打开的设置页面,选:已启用。确定之后就会禁用windows Defender。 关闭widows defender还有一种途径,移动鼠标到桌面左下角点开始,再点:设置。在设置页面点最下面的“更新和安全”。点 windows defender,  把右侧的开关点成关就行了,但这种方法不彻地过一段时间系统会自动重新启动它。 
 0   0  650天前
admin
481
步骤一:添加IIS以及FTP服务角色在创建FTP站点前,需确保实例内已添加IIS及FTP服务。如果还没有添加,请参见以下操作步骤,添加IIS及FTP服务。远程连接Windows实例。具体操作,请参见通过密码认证登录Windows实例。在Windows桌面的左下角单击开始图标(win图标),然后找到并单击服务器管理器。在顶部导航栏,单击管理 > 添加角色和功能。IIS win2016在弹出的对话框中,保持默认配置并单击下一步至选择服务器角色页面。选中Web 服务器(IIS),在弹出的对话框中单击添加功能,然后单击下一步。ftp2保持默认配置并单击下一步至选择角色服务页面。选中IIS管理控制台以及FTP 服务器,单击下一步。ftp3单击安装,然后等待安装完成后,单击关闭。步骤二:创建用于访问FTP站点的Windows用户创建Windows用户,用于访问FTP站点时的身份验证。如果您只需要匿名用户(即仅提供用户名anonymous或ftp的用户)访问FTP站点,可以跳过本步骤。在Windows桌面的左下角单击开始图标(win图标),然后找到并单击Windows 管理工具。在管理工具页面,找到并双击计算机管理。在左侧导航栏,选择系统工具 > 本地用户和组 > 用户。ftp4在页面右侧的操作列,单击更多操作,然后单击新用户。ftp5具体配置说明如下:用户名:本示例中创建一个用户名为ftptest的Windows用户。密码以及确认密码:输入您自定义的密码信息。说明 密码必须包括大写字母、小写字母和数字,否则将提示无法通过密码策略。同时,请您妥善保管密码信息,防止密码泄露产生的数据安全风险。密码相关设置:选中密码永不过期。单击创建,然后关闭新用户对话框。步骤三:设置共享文件的权限您需要创建一个文件夹作为FTP站点共享文件的入口,该文件夹需要开放访问、修改等权限。后续各客户端访问该FTP站点时,文件传输均基于该文件夹完成。具体操作说明如下:在Windows实例的磁盘中,创建一个供FTP站点使用的文件夹。本示例中,在C盘下创建一个名为ftp的文件夹。右键单击ftp文件夹,然后单击属性。单击安全页签,然后单击编辑。单击添加。在弹出的对话框中,输入对象名称ftptest,然后单击检查名称。检查名称无误后,单击确定。在组或用户名区域,单击新添加的用户名ftptest,然后在ftptest 的权限区域设置权限后,单击确定。本示例中允许所有权限。您可以根据实际业务对权限的要求,自行设置权限为允许或拒绝。username步骤四:添加并设置FTP站点在Windows桌面的左下角单击开始图标(win图标),然后找到并单击服务器管理器。在顶部导航栏,单击工具 > Internet Information Services(IIS)管理器。ftp8在左侧导航栏,选择Windows实例主机名 > 网站,然后在右侧操作列,单击添加 FTP 站点。ftp9在弹出的对话框中,设置站点信息,然后单击下一步。10具体配置说明如下:FTP站点名称:自定义名称。例如ftptest。内容目录:FTP所需的共享文件夹。本文对应的是C盘中的ftp文件夹。设置IP地址以及SSL证书,然后单击下一步。绑定IP和SSL具体配置说明如下:IP地址:保持默认配置。SSL:不同配置项对应的说明如下。本示例中选择无,即不需要SSL加密。如果您需要保证数据传输安全且已拥有SSL证书,请根据实际的数据传输安全要求,设置为允许或需要。无:不需要SSL加密。允许:允许FTP服务器支持与客户端的非SSL和SSL连接。需要:需要对FTP服务器和客户端之间的通信进行SSL加密。其他配置项保持默认设置。设置身份验证和授权信息,然后单击完成。身份和授权具体配置项说明如下:身份验证:不同选项的说明如下所示。本示例中仅选择基本,后续将通过已创建的ftptest用户访问FTP站点。如果您对数据传输安全没有要求,可以设置为匿名,使匿名用户支持直接访问FTP站点。匿名:允许任何仅提供用户名anonymous或ftp的用户访问内容。基本:需要用户提供有效用户名和密码才能访问内容。由于基本身份验证通过网络传输未加密的密码,因此请仅在清楚客户端和FTP服务器之间的连接是安全的情况下(例如,使用安全套接字层SSL时)使用此身份验证方法。授权:允许访问的范围说明如下所示。本示例中选择指定用户,并在对应的文本框中输入ftptest。所有用户:所有用户(不论是匿名用户还是已标识的用户)均可访问FTP站点对应的共享文件夹。匿名用户:匿名用户可访问FTP站点对应的共享文件夹。指定角色或用户组:仅特定角色或用户组的成员才能访问FTP站点对应的共享文件夹。需要在对应的文本框中输入角色或用户组。指定用户:仅指定用户才能访问FTP站点对应的共享文件夹。需要在对应的文本框中输入用户名。权限:选中读取和写入权限。完成后可以在IIS管理器查看到成功搭建的FTP站点。13配置FTP站点的防火墙。在IIS管理器中,双击FTP站点名称ftptest,进入FTP站点的主页。双击FTP 防火墙支持。FTP防火墙支持在防火墙的外部 IP 地址下的文本框中,输入Windows实例的公网IP地址。在页面右侧操作列,单击应用,然后在弹出的对话框中单击确定。步骤五:设置安全组及防火墙当您在Windows实例中搭建好FTP站点后,需要在实例所属的安全组中,添加入方向规则,放行FTP服务器所需的21端口以及FTP服务器被动模式可能占用的端口范围1024~65535。在Windows实例所属的安全组中,添加入方向规则,放行21端口以及1024~65535端口。具体操作,请参见添加安全组规则。说明 关于安全组的更多配置信息,请参见安全组应用案例和常用端口。可选:配置Windows实例内部的防火墙。Windows实例内部的防火墙默认为关闭状态。如果您的防火墙为开启状态,则需要放行TCP 21端口与1024~65535端口用于FTP服务。具体操作,请参见设置 ECS 实例远程连接防火墙。其他防火墙设置,请参见微软官方文档。步骤六:客户端测试访问FTP站点Windows的文件夹目录、命令行工具、浏览器或者是第三方FTP连接工具均可用来测试FTP服务器。本示例中,将以本地Windows主机作为客户端,通过文件夹目录测试访问FTP站点。在本地物理主机中,打开文件夹目录,在文件夹路径中,输入ftp://FTP站点的公网IP地址:21进行访问。以Windows 10系统为例,如下图所示:Windows文件目录在弹出的登录身份对话框,完成登录信息设置,然后单击登录。本示例中,使用ftptest用户名及对应的密码信息,登录FTP站点。登录FTP站点当您通过Windows文件夹目录访问FTP站点时,如果Windows自带的IE浏览器没有开启使用被动FTP,将无法正常访问FTP站点并返回错误码200及501。您可以参考以下步骤,先开启IE浏览器的使用被动FTP,然后再次尝试访问FTP站点。在本地Windows物理主机中,打开IE浏览器。在页面右上角,单击工具图标(IE工具图标),然后单击Internet 选项。单击高级页签,然后在设置区域,找到并选中使用被动 FTP (用于防火墙和 DSL 调制解调器的兼容)。使用被动FTP单击应用,然后单击确定。成功访问FTP站点对应的共享文件夹ftp后,您可以新建一个测试文件夹test。新建测试文件夹之后您可以重新登录Windows实例,查看C盘的ftp文件夹中新增了test文件夹,表示FTP站点搭建成功且可以进行文件数据传输。实例ftp文件夹
 0   1  655天前
admin
455
redisdocker run -d -p 16379:6379 --name redis_16379  -v /d/docker/data/redis:/data redis redis_16379  (容器名称)/d/docker/data/redis(本地目录)/data(容器目录) mysqldocker run -d  -p 13306:3306 --privileged=true -v /d/docker/data/mysql/conf/my.cnf:/etc/mysql/my.cnf -v /d/docker/data/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root --name mysql_13306  mysql:5.7.25/d/docker/data/mysql/data 目录下必须为空 my.cnf******************************************************************[mysqld]user=mysqlcharacter-set-server=utf8default_authentication_plugin=mysql_native_passworddatadir=/var/lib/mysql[client]default-character-set=utf8[mysql]******************************************************************
 0   0  670天前
admin
458
Windows下IIS以FastCGI模式运行PHP 由于PHP5.3 的改进,原有的IIS 通过isapi 方式解析PHP脚本已经不被支持,PHP从5.3.0 以后的版本开始使用微软的 fastcgi 模式,这是一个更先进的方式,运行速度更快,更稳定。本文介绍在IIS上以FastCGI模式运行PHP。我们以 Windows 2003 + IIS 6.0(windows2003自带) 为例。第一步:下载安装的文件1. FastCGI 版本 fcgisetup_1.5_x86_rtw.msi2. MySQL 版本 mysql-5.5.19-win32.msi3. PHP 版本 php-5.3.8-nts-Win32-VC9-x86.zip提示:1. 我们这里使用目前最新的FastCGI 1.5版本。官方地址2. Windows下安装MySQL就选择.msi安装包格式,我们选择了mysql-5.5.19-win32.msi ,双击根据向导安装即可,简单方便。3. PHP我们选择用php-5.3.8-nts-Win32-VC9-x86.zip这个版本。“vc9”是为IIS定制的。“nts”是非线程安全版本,针对PHP的FastCGI安装方式。第二步:安装文件1. 在要安装的磁盘建一个文件夹。我们在D盘的根目录下创建一个Web文件夹。 D:\Web。2. 在Web文件夹下创建一个WWW文件夹,用来存放你的PHP网站程序。D:\Web\WWW。3. 把下载的php-5.3.8-nts-Win32-VC9-x86.zip 解压到 D:\Web\PHP 文件夹。4. 安装MySql数据库,把MySQL安装到 D:\Web\MySQL文件夹。具体MySQL安装过程可以参考文档。5. 为IIS安装FastCGI扩展。首先确定系统已经安装好了IIS。然后双击fcgisetup_1.5_x86_rtw.msi安装,如果C盘是你的Windows系统安装盘,它会把fcgi特定的文件复制到 C:\Windows\system32\inetsrv 文件夹下,注册并且使fcgi的web服务生效,这时在IIS的 “Web服务扩展” 里多了 FastCGI Handler。第三步:配置 IIS1. 点击 “控制面板” -> “管理工具” -> “internet 信息服务”(或者直接点击“开始”->“运行”->输入inetmgr.exe),打开IIS。2. 点击“网站”->“右键-属性”,在属性对话栏中点击“主目录”->“配置”->“添加”。3. 在"添加与编辑应用程序扩展名映射”对话框中,点击浏览,找到 C:\Windows\system32\inetsrv 中的fcgiext.dll。扩展名写上“.php”, “动作”项中点“限制为”,写上“GET,POST,HEAD”,把下面两个选项 “脚本引擎”、“确认文件是否存在” 都勾上。确认配置。4. 返回网站属性框,点击“文档”,添加 “index.php” 做为默认页。最后点击“确认”。5. 点击“网站”->“右键-新建”->“网站”,建立一个新站点,端口我们这里设置为 8080,网站主目录路径为 D:\Web\WWW。第四步:配置FastCGI在安装FastCGI后,在C:\Windows\system32\inetsrv文件夹中有以下三个重要文件:fcgiext.dll - 这是fastcgi控制柄动态链接库。它可以为与fastcgi进行通信的程序处理请求。fcgiext.ini - 这是配置文件,包含扩展到fastcgi进程的文件映射。它也包含了fastcgi进程池的配置。fcgiconfig.js - 这个配置fastgci的扩展。这个脚本更新fcgiext.ini文件,修改iis元库,如果有必要的话重复使用web服务应用池。这里配置FastCGI有两种方法,一种是通过命令行来实现配置,另一种直接修改fcgiext.ini文件。1. 通过命令行来实现配置打开命令行,将地址转换到C:\Windows\system32\inetsrv,输入以下命令:cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"D:\Web\php\php-cgi.exe" cscript fcgiconfig.js -set -section:"PHP" -InstanceMaxRequests:5000 cscript fcgiconfig.js -set -section:"PHP" -EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000 cscript fcgiconfig.js -set -section:"PHP" -RequestTimeout:360 cscript fcgiconfig.js -set -section:"PHP" -ActivityTimeout:120 脚本的含义,分别是:1、注册PHP到FastCGI。2、InstanceMaxRequests 用来设置应用程序池回收。FastCGI进程请求数达到InstanceMaxRequests数值5000,应用程序池将自动回收。默认值是1000。3、当环境变量PHP_FCGI_MAX_REQUESTS达到10000将自动回收应用程序池。4、RequestTimeout 设置请求超时时间,也就是请求允许的最大时间,如果FastCGI进程请求超过此设置将被禁止,值是90秒。5、ActivityTimeout 指定FastCGI进程请求的最大活跃时间,在设定时间内,FastCGI进程和IIS没有通信,将终止进程。默认值是70秒。2. 直接配置fcgiext.ini打开C:\windows\system32\inetsrv\fcgiext.ini文件,加入:复制代码[Types]  php=PHP [PHP] ExePath=D:\Web\php\php-cgi.exe InstanceMaxRequests=5000 EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000 RequestTimeout=360 ActivityTimeout=120 复制代码提示:“php” 表示扩展名,“PHP” 是配置节名称,以 “[PHP]” 定义。把上面代码复制到fcgiext.ini的末尾,保存就好了。第五步:配置PHP打开PHP安装目录,即D:\Web\PHP,我们可以看到目录下有两个这样的文件 php.ini-development 和 php.ini-production,第一个是开发使用的配置文件,第二个是生产环境的配置,因为我们是在本机做开发,所以选择前者。将php.ini-development复制一份到同目录下,并改名为 php.ini。这个php.ini 就是当前使用的配置文件,以下几步都是在修改这个php.ini文件的内容。 另外要注意的是修改php.ini文件后需重新启动IIS服务,新设置才会生效。参见文档:如何重启IIS服务的方法1. 设置关于FastCGI部分找到下面几行,那前面的引号“;” 去掉,参数设置为如下:fastcgi.impersonate = 1 cgi.fix_pathinfo= 1 cgi.force_redirect = 0 fastcgi.impersonate = 1cgi.fix_pathinfo= 1cgi.force_redirect = 0它们的说明请参考cgi.force-redirect;cgi.fix-pathinfo;fastcgi.impersonate。2. 指定PHP扩展库的存放目录在Windows下PHP的扩展库通常以 DLL 形式存放在PHP的ext目录中。使用文本工具打开php.ini文件,查找extension_dir = "ext",也就是在 On windows 下面那一行。把它前面的分号“;”去除掉,改为如下:extension_dir = "D:/Web/PHP/ext"extension_dir 表示PHP扩展库的具体目录,以便调用相应的DLL文件。3. 开启相应的扩展库默认情况下许多PHP的扩展库都是关闭的,比如默认PHP不支持连接Mysql数据库,需开启相应的扩展库。这里我们开启一些常用的扩展库。查找 ; Windows Extensions(大概在941行),在它的下面是extension列表。找到如下扩展:复制代码;extension=php_curl.dll ;extension=php_gd2.dll ;extension=php_mbstring.dll ;extension=php_exif.dll ;extension=php_mysql.dll ;extension=php_mysqli.dll ;extension=php_pdo_mysql.dll ;extension=php_pdo_odbc.dll ;extension=php_sockets.dll ;extension=php_xmlrpc.dll ;extension=php_xsl.dll 复制代码把以上extension 前面的分号 “;” 去掉。如果你希望加载其它扩展模块,方法相同,只要去掉前面的分号即可。提示1:Exif 扩展是用来显示图片的 exif 信息的,因为该扩展需要 mbstring.dll 支持,所以必须将 extension=php_exif.dll 这一行写到extension=php_mbstring.dll 的后面。提示2:如果PHP自带的扩展库不能满足你的需要,你可以去 pecl.php.net 查找并下载你需要的库。windows用户可以去 pecl4win.php.net 或者 http://downloads.php.net/pierre/ 下载已经编译好的DLL文件,也可以去http://museum.php.net/php5/ 载PECL集合压缩包。提示3:很多人在找php_zip.dll,其实从php5.3开始已经集成了zip扩展,你可以用<?php phpinfo()  ?> 找到zip扩展的说明。4. 让PHP支持短标签在 php.ini 配置文件查找 short_open_tag = Off (大概在266行)把它修改成:short_open_tag = On 让其支持短标签。php的代码一般包含在<?php .... ?>的标签内,设置 short_open_tag = On 之后,可以写成更简洁的形式:<? .... ?>。5. 配置PHP的Session功能在使用session功能时,我们必须配置session文件在服务器上的保存目录。我们需要为session建立一个可读写的目录,这个目录最好独立于网站目录之外。这里把目录上建在了D:\Web\sessiontmp,然后在 php.ini 配置文件中找 ;session.save_path = "/tmp" (大概在1467行),去掉前面的分号“;” ,改为如下:session.save_path = "D:/Web/sessiontmp"6. 配置PHP的文件上传功能同session一样,在使用PHP文件上传功能时,我们必须要指定一个临时文件夹以完成文件上传功能,否则文件上传功能会失败。我们建立一个可读写的目录文件夹 D:\Web\fileuploadtmp,然后在 php.ini 配置文件中找到 ;upload_tmp_dir = (大概875行),修改为:upload_tmp_dir = "D:/Web/fileuploadtmp"PHP默认上传文件大小不超过2M,要想上传大于2M的文件,请参考文档  配置php.ini实现文件上传功能。7. 设置时区在 php.ini 配置文件查找 ;date.timezone = ,去掉前面的分号“;” 改为如下:date.timezone = PRCdate.timezone是PHP5.1开始新增加的配置参数,用来设置时区。默认date.timezone是被注释掉的,也就是默认时区是UTC格林威治标准时间。我们这里改为 date.timezone = PRC(PRC,People’s Republic of China,中华人民共和国),也就是日期使用中国的时区。这样可以解决时间相差八小时的问题。第六步:测试将如下代码保存为index.php文件,放到D:\Web\WWW目录下面。复制代码<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">         <head>         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />         <title>测试服务器</title>         </head>         <body>             <div style="text-align:center; color:red">             <?php                 $link=mysql_connect("localhost","你的mysql管理账号","你的mysql管理密码");                 if(!$link) echo "MySQL数据库 连接失败!";                 else echo "MySQL数据库 连接成功!";                 mysql_close();             ?>             </div>             <br/>             <?php phpinfo(); ?>         </body> </html>       https://www.cnblogs.com/zhangsongren/p/7280660.html
 0   0  670天前
快速发帖 高级模式
guest
登录之后更精彩~
我的小伙伴
Powered by HadSky 7.12.10
© 2015-2023 PuYueTian
您的IP:3.233.221.90,2023-12-01 15:41:36,Processed in 0.04869 second(s).
Powered by HadSky
小绿叶技术博客