<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Windows日常小技巧

      Java自動建立Package: javac -d . xxxx.java....

      ==========================================================================================================================================================

      一、查看SFC日志文件CBS.Log 的詳細信息
      可用 Findstr 命令將日志文件CBS.Log的信息復制到 Sfcdetails.txt 文件,以管理員身份運行CMD,命令提示符處,輸入以下命令,,然后按 Enter 鍵

      findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

      執行完此命令,桌面將會自動創建一個 Sfcdetails.txt 文件,此文件包含SFS工

       

      具在電腦上運行時的詳細日志信息, 包括已修復與未修文件的日志信息,可通驗證時間來查找定位未修復文件的路徑。

       ===============================================================================================================================================================

      修改RDP端口:Change the listening port for Remote Desktop on your computer

      When you connect to a computer (either a Windows client or Windows Server) through the Remote Desktop client, the Remote Desktop feature on your computer "hears" the connection request through a defined listening port (3389 by default). You can change that listening port on Windows computers by modifying the registry.
      1. Start the registry editor. (Type regedit in the Search box.)
      2. Navigate to the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
      3. Find PortNumber
      4. Click Edit > Modify, and then click Decimal.
      5. Type the new port number, and then click OK.
      6. Close the registry editor, and restart your computer.

      The next time you connect to this computer by using the Remote Desktop connection, you must type the new port. If you're using a firewall, make sure to configure your firewall to permit connections to the new port number.

      You can check the current port by running the following PowerShell command:

      PowerShell
      Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber"
      

      For example:

      PowerShell
      PortNumber   : 3389
      PSPath       : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
      PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations
      PSChildName  : RDP-Tcp
      PSDrive      : HKLM
      PSProvider   : Microsoft.PowerShell.Core\Registry
      

      You can also change the RDP port by running the following PowerShell command. In this command, we'll specify the new RDP port as 3390.

      To add a new RDP Port to the registry:

      PowerShell
      $portvalue = 3390
      
      Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" -Value $portvalue 
      
      New-NetFirewallRule -DisplayName 'RDPPORTLatest-TCP-In' -Profile 'Public' -Direction Inbound -Action Allow -Protocol TCP -LocalPort $portvalue 
      New-NetFirewallRule -DisplayName 'RDPPORTLatest-UDP-In' -Profile 'Public' -Direction Inbound -Action Allow -Protocol UDP -LocalPort $portvalue 
      
       ================================================================================================================================================================
      VirtualBox的vmdk文件壓縮
      padDio
      已于 2022-05-19 14:51:35 修改 913
      收藏 1
      文章標簽: vagrant linux
      版權

              前段時間為了做谷粒商城跟著教學用VirtualBox和Vagrant安裝了Linux系統,具體過程可看:VirtualBox+vagrant Linux系統安裝_padDio的博客-CSDN博客

              然后昨天突然發現電腦c盤將近少了幾十個G的容量,不僅如此Linux虛擬機40個G的容量也全部都塞滿了。檢查后發現,用戶目錄下的VMDK文件直接漲到了36個G!!問題很明了,就是虛擬機莫名其妙地被塞了很多東西結果還把我c盤的空間也給占了。

              然后經過各種倒騰,總算是成功解決了問題。主要是兩個步驟

              1.給虛擬機瘦身。

              2.給vmdk文件瘦身。

      1.虛擬機瘦身

              由于我的虛擬機才使用了沒多久,docker也只裝了mysql和redis兩個鏡像,因此我很肯定不是因為我裝了太多軟件程序才使得虛擬機容量爆滿。總之各種查閱網站后總數找到了問題,在虛擬機的/vagrant這個文件夾下,里面竟然塞滿了我Windows的user文件夾下的各種東西!

              原來vagrant提供了將本機目錄掛載到虛擬機目錄下的功能,默認是將vagrant配置文件所在目錄掛載到虛擬機/vagrant目錄下。因此只要修改這個掛載目錄,不把本機的用戶文件夾目錄掛載到虛擬機就行了。  

              但要注意的是,更改這個配置需要修改Vagrantfile文件,但這個Vagrantfile并非是之前一直使用的用戶文件下的那個文件,對的Vagrantfile文件不止一個。這里需要的修改的是用戶文件下的.vagrant.d這個文件里面的Vagrantfile文件,如下圖:

              對此文件進行如下修改:

              之后再在用戶文件夾下創建一個空文件夾MyVagrantSyncFolder,這樣的話再次啟動虛擬機時,掛載到虛擬機的文件夾將不會是用戶文件夾而是MyVagrantSyncFolder這個文件夾,由于MyVagrantSyncFolder文件夾是空的,因此不會占用虛擬機容量。

              再次進入虛擬機,發現系統容量已經釋放,/vagrant文件夾里也不再有東西了。

                              

       2.VMDK文件瘦身

              雖然虛擬機的容量是已經釋放了,但vmdk文件仍然有36個G,因此還是十分占用C盤空間,因此接下來要壓縮vmdk文件的大小。

              1.首先在虛擬機執行如下命令(一定要執行,否則之后壓縮出來的文件大小還是非常大):

              2.用cmd進入Windows系統的控制臺,一路cd到VirtualBox軟件的安裝目錄,然后我們就要使用控制臺命令,把待壓縮的vmdk克隆成vdi文件(執行克隆命令的同時,vmdk文件會被自動壓縮,生成的vdi文件已經很小了)。

              之后再把容量已經減小的vdi文件重新克隆回vmdk文件,再用已經變小的vmdk文件替換原來36g大小的vmdk文件。

      使用以下模板執行命令:

              source1.vmdk:需要壓縮的vmdk文件

              source2.vdi:source1.vmdk被克隆成source2.vdi

              source3.vmdk:source2.vdi被克隆成source3.vmdk

              之后將已經被壓縮vmdk文件重命名為與原來36g的vmdk文件同樣的名字,再把原來的36g的vmdk文件覆蓋。這里新文件的大小只有2g左右。

      接下來到了最后一步,修改uuid。

              此時在控制臺用vagrant up啟動虛擬機,會提示uuid出錯,因為新vmdk文件的uuid和舊文件的不同,此時我們要把新文件的uuid設置為舊文件的uuid,舊文件的uuid在啟動虛擬機時會直接告訴我們,如下圖

      最后還是得在virtualBox的安裝目錄下執行控制臺命令:

      終于,現在用vagrant up能夠啟動成功了!且原本安裝的docker鏡像都還能使用。


      ————————————————
      版權聲明:本文為CSDN博主「padDio」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
      原文鏈接:https://blog.csdn.net/Ydin00/article/details/124860609
      ==========================================================================================================================================================
       【virtualBox 搭建PXE boot環境】自動安裝CentOS7.9

      西伯利亞狼08

      已于 2022-05-15 18:26:20 修改

      1156
       收藏 2
      分類專欄: System 文章標簽: 服務器 linux 運維
      版權

      System
      專欄收錄該內容
      2 篇文章0 訂閱
      訂閱專欄
      目錄

      1)PXE工作原理

      2)VirtualBox安裝

      3)安裝虛擬機

      4)配置PXE

      1)安裝依賴包

      2)配置tftp,并enable

      3)上傳CentOS鏡像到虛擬機

      4)pxelinux基本目錄

      1) default 配置

      2)安裝引導文件

      3) DHCP配置

      4)開啟服務

      4)驗證PXE安裝系統

      1)PXE工作原理
      PXE(Pre-boot execution environment)是intel公司開發的一個技術,支持工作站從遠程服務器上下載鏡像,并由此啟動操作系統。在啟動過程中,終端請求分配IP地址,在使用TFTP協議下載一個啟動軟件包到本地內存中執行,最后由這個啟動軟件包完成終端基本軟件的設置,從而完成操作系統的安裝,其工作流程如下:



      2)VirtualBox安裝
      利用virtualBox 擴展功能搭建PXE遠程安裝系統,方便無人值守的機房進行裝機,VirtualBox 安裝過程。

      安裝VirtualBox到本地主機,然后安裝extend pack。官網可以download安裝包



       

      3)安裝虛擬機
      實驗使用的是Centos7.9作為PXE server端。(Virtualbox 安裝centos指導參見)

      注意:這里網卡設置統一為橋接模式,使host和虛擬機處于同一網絡環境,Host <-->VM互通。

      pxe部署需要服務器網卡的功能支持,基于系統啟動方式的不同,pxe啟動分為UEFI,legacy兩種方式。其中UEFI啟動方式需要特定網卡功能的配合,legacy模式則大部分無盤系統網卡均可支持。以下為legacy方式的實現說明。

      4)配置PXE
      1)安裝依賴包
      centos7.9虛機里需要安裝如下package

      yum -y install dhcp vsftpd dnsmasq syslinux httpd xinetd tftp-server tftp
      其中:

      dhcp  提供部署網段的dhcp next server,pxelinux引導
      vsftpd 使用ftp方式遠端傳送文件
      dnsmasq 如果使用dnsmasq自帶的dhcp/tftp
      syslinux 提供pxe引導需要的引導文件(從/usr/share/syslinux/下copy到/var/ftp/)
      httpd 使用http方式傳送文件(推薦,效率高)
      xinetd tftp方式的管理界面
      tftp-server tftp 部署tftp功能
      2)配置tftp,并enable
      [root@localhost ~]# cat /etc/xinetd.d/tftp
       service tftp
       {
               socket_type             = dgram
                protocol                = udp
               wait                    = yes
              user                    = root
                server                  = /usr/sbin/in.tftpd
                 server_args             = -s /var/ftp
                 disable                 = no
                 per_source              = 11
                cps                     = 100 2
                    flags                   = IPv4
      }
      3)上傳CentOS鏡像到虛擬機
      使用winscp工具,上傳至/var/ftp/img文件夾下,然后掛載iso文件。/var/ftp目錄下有一個mount.sh腳本

      [root@bogon ftp]# cat mount.sh
      mount /var/ftp/img/CentOS-7-x86_64-DVD-2009.iso /var/ftp/sources/centos79
      4)pxelinux基本目錄
      見/var/ftp/(也可以指定到其他目錄,只需要在tftp配置文件里修改即可)

      [root@bogon ftp]# tree | head -n 50
      .
      ├── img
      │   └── CentOS-7-x86_64-DVD-2009.iso
      ├── menu.c32
      ├── mount.sh
      ├── netboot
      │   ├── centos79
      │   │   ├── centos7p9.cfg
      │   │   ├── initrd.img
      │   │   └── vmlinuz
      │   └── ubuntu22
      │       ├── grub.cfg
      │       ├── initrd
      │       ├── unicode.pf2
      │       └── vmlinuz
      ├── pub
      ├── pxelinux.0
      ├── pxelinux.cfg
      │   └── default
      ├── pxe_service_start.sh
      └── sources
          ├── centos79

      其中:

      img 用于存放鏡像文件
      netboot /centos79存放初始化引導文件,initrd.img/vmlinuz可以從對應的完整安裝源中提取(images/pxeboot/)。
      pxelinux.0 為syslinux 提供的pxe引導文件, /usr/share/syslinux/pxelinux.0
      default為安裝引導配置
      menu.32 可以從對應的安裝源中提去(/isolinux/)
      sources 系統鏡像掛載文件夾
      pxe_service_start.sh 啟動相關服務腳本
       

      1) default 配置
      [root@bogon pxelinux.cfg]# cat default
      DEFAULT menu.c32
      TIMEOUT 300
      MENU TITLE linux PXE Menu
       
      LABEL centos7p9
        MENU LABLE centos7p9
        MENU DEFAULT
        KERNEL /netboot/centos79/vmlinuz
        APPEND initrd=netboot/centos79/initrd.img ks=ftp://192.168.1.12/netboot/centos79/centos7p9.cfg nofb text biosdevname=0 ksdevice=bootif
        IPAPPEND 2
      2)安裝引導文件
      [root@bogon netboot]# cat centos79/
      centos7p9.cfg  initrd.img     vmlinuz        
      [root@bogon netboot]# cat centos79/centos7p9.cfg
      #platform=x86, AMD64, or Intel EM64T
      #version=DEVEL
      # Install OS instead of upgrade
      install
      # Keyboard layouts
      keyboard 'us'
      # Root password
      rootpw --iscrypted $1$uxL6qMul$qX3IPggKYzPhAc82LQpLw1
      # System language
      lang en_US
      # System authorization information
      auth  --useshadow  --passalgo=sha512
      # Use text mode install
      # text
      # SELinux configuration
      selinux --disabled
      # Do not configure the X Window System
      skipx
       
       
      # Firewall configuration
      firewall --disabled
      # Reboot after installation
      reboot
      # System timezone
      timezone Asia/Shanghai
      # Use network installation
       url --url="ftp://192.168.1.12/sources/centos79"
      # System bootloader configuration
      # bootloader --location=mbr
      # Clear the Master Boot Record
      zerombr
      # Partition clearing information
      clearpart --all --initlabel
      # part /boot --fstype="xfs" --size=1024
      # part / --fstype="xfs" --size=51200
      # part swap --fstype="swap" --size=4096
      # part /home --fstype="xfs" --grow --size=1
      # autopart
       
      part /boot --asprimary --fstype="xfs" --size=1024
      part swap --fstype="swap" --size=8192
      part / --fstype="xfs" --grow --size=1
       
      %packages
      # @core
       lrzsz
       tree
       vim
       
      %end
       
       
      %post
       
      # set to local yum source
      # mkdir /etc/yum.repos.d/bak
      # mv /etc/yum.repos.d/*repo /etc/yum.repos.d/bak
      # cat > /etc/yum.repos.d/base.repo<<EOF
      # [base]
      # name=base
      # baseurl=http://192.168.199.254/centos
      # gpgcheck=0
      # EOF
       
      %end

      3) DHCP配置
      [root@bogon netboot]# cat /etc/dhcp/dhcpd.conf  
      #
      # DHCP Server Configuration file.
      #   see /usr/share/doc/dhcp*/dhcpd.conf.example
      #   see dhcpd.conf(5) man page
      #
      option space PXE;
      option PXE.mtftp-ip  code 1 = ip-address;
      option PXE.mtftp-cport code 2 = unsigned integer 16;
      option PXE.mtftp-sport code 3 = unsigned integer 16;
      option PXE.mtftp-tmout code 4 = unsigned integer 8;
      option PXE.mtftp-delay code 5 = unsigned integer 8;
      option architecture-type code 93 = unsigned integer 16; # RFC4578
       
       
      ddns-update-style interim;
      ignore client-updates;
      authoritative;
      allow booting;
      allow bootp;
      allow unknown-clients;
       
      # internal subnet for my DHCP Server
      # # IP of PXE Server
      #
      default-lease-time 600;
      max-lease-time 7200;
       
       
      # internal subnet for my DHCP server
      #IP of PXE Server
      subnet 192.168.1.0 netmask 255.255.255.0{
              range 192.168.1.100 192.168.1.200;
              option domain-name-servers 114.114.114.114;
              option routers 192.168.1.1;
              option broadcast-address 192.168.1.255;
      }
       
      # class "pxeclients"{
      if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
         next-server 192.168.1.12;
              if option architecture-type = 00:00{
                 filename "pxelinux.0";
              }else
               if option architecture-type = 00:07 or option architecture-type = 00:06 {
                 filename "uefi/shim.EFI";
              }else if option architecture-type = 00:09{
                 filename "uefi/shim.EFI";
              }
              else{
                 filename "pxelinux.0";
              }
      }
      4)開啟服務
      [root@bogon ftp]# cat pxe_service_start.sh
      systemctl start xinetd
      systemctl start tftp
      systemctl start httpd
      systemctl start dhcpd.service
      systemctl start vsftpd
      systemctl enable vsftpd
      systemctl enable xinetd
      systemctl enable httpd
      systemctl enable xinetd
      systemctl stop firewalld
      systemctl disable firewalld
      setenforce 0
      4)驗證PXE安裝系統
      注意:建立好虛擬機后,需要在system里,優先選擇網絡啟動



      安裝完成界面





      注意,安裝完成之后需要關閉系統網絡啟動



       
      ————————————————
      版權聲明:本文為CSDN博主「西伯利亞狼08」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
      原文鏈接:https://blog.csdn.net/u011408270/article/details/124784475
      ==========================================================================================================================================================
      Ubuntu 加載Rescu緊急模式后,mount -n -o remount, rw / 加載根目錄讀寫。
       
       
      ==========================================================================================================================================================
       

      posted @ 2022-09-19 08:40  張莽的博客  閱讀(407)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 亚洲欧美另类久久久精品播放的| 欧美18videosex性欧美黑吊| 亚洲精品无码久久一线| 久久91精品牛牛| 亚洲色在线V中文字幕| 女厕偷窥一区二区三区| 体态丰腴的微胖熟女的特征| 无码高潮爽到爆的喷水视频app| 99国产精品欧美一区二区三区| 亚洲岛国成人免费av| 天天爽夜夜爱| 日产精品一区二区三区免费| 奉新县| 国产成人精品亚洲资源| 国产福利深夜在线观看| 久久精品国产99久久久古代| 亚洲制服无码一区二区三区| 日本中文一二区有码在线| 伊人久久大香线蕉av五月天| 啪啪av一区二区三区| 日韩精品久久不卡中文字幕| 办公室强奷漂亮少妇视频| 国产成熟女人性满足视频| 久久亚洲日韩精品一区二区三区| 狠狠综合久久综合88亚洲| 国产成人综合欧美精品久久| 亚洲曰韩欧美在线看片| 白丝乳交内射一二三区| 美女胸18大禁视频网站| 强伦人妻一区二区三区| 国产精品三级中文字幕| 一区二区三区无码高清视频| 亚洲精品一区三区三区在| 国产在线午夜不卡精品影院 | 加勒比中文字幕无码一区| 免费又黄又爽1000禁片| 国产精品人妻久久ai换脸| 日本亚洲一区二区精品| 吉木萨尔县| av在线播放日韩亚洲欧| 天天综合亚洲色在线精品|