2024-12-10 4 0
2024-9-26 168 0
软件

docker镜像:一个只读的模版,用来创建容器(模版,相当于菜谱)docker容器:独立的实例,是一个独立可移植的环境,可以在这里运行程序(环境,相当于用菜谱做的菜)docker仓库:用来存储docker镜像的地方(如dockerhub,相当于菜谱大全)docker安装:https://www.docker.com/(直接官网下载安装),window需要开启hyper-v功能(在卸载程序的地方点击“启用或关闭Windows功能”里面docker查看:在命令行模式下,输入dockerversion,可以看到版本号,如果看到了server的信息,说明启动成功了dockerfile:是一个文本文件,用来告诉docker程序需要哪些环境和依赖等,一般在项目的根目录下创建Dockerfile文件,有了这个文件docker就会根据这个文件进行镜像构建(菜谱),有了镜像后就可以根据这个镜像(菜谱)构建容器了(菜)Volume:虚拟机外挂的一块硬盘,相当于镜像文件常用命令:拉取镜像:dockerpull镜像名(比如dockerpulluser/nginx:latest),可以简化为dockerpullnginx列出所有镜像:dockerimagels创建容器:dockerrun-d-nameweb-p8080:80nginx:latest(-d为后续在后台运行,name为生成容器的名字,-p为端口,左边为宿主端口,右边为容器端口)进入容器:dockerexec-itweb/bin/bash(web为容器名)Linux命令:aptupdate(更新软件源)退出容器:exit打包容器:dockercommitwebhub-web(web为镜像名称,hub-web为打包后的名字)容器打标签:dockertaghub-webyonghuming/hub-web:latest(hub-web为要打包的容器名,yonghuming为docker网站的的用户名)登录自己的docker账户:dockerlogin退出自己的docker账户:dockerlogout推送容器:dockerpushyonghuming/hub-web(hub-web为要推送的容器名,yonghuming为docker网站的的用户名)

2024-9-9 112 0
软件

参考:https://www.bt.cn/bbs/forum.php?mod=viewthread&tid=72329&highlight=sqlsrvcurlhttps://packages.microsoft.com/config/rhel/7/prod.repo>/etc/yum.repos.d/mssql-release.repoyumcleanallACCEPT_EULA=Yyuminstall-ymsodbcsqlmssql-toolsunixODBC-devel#安装sqlsrvcd/tmpwgethttps://pecl.php.net/get/sqlsrv-5.8.1.tgztar-zxvfsqlsrv-5.8.1.tgzcdsqlsrv-5.8.1/www/server/php/73/bin/phpize./configure--with-php-config=/www/server/php/73/bin/php-configmake&&makeinstallecho"extension=sqlsrv.so">>/www/server/php/73/etc/php.ini#安装pdo_sqlsrvcd/tmpwgethttps://pecl.php.net/get/pdo_sqlsrv-5.8.1.tgztar-zxvfpdo_sqlsrv-5.8.1.tgzcdpdo_sqlsrv-5.8.1/www/server/php/73/bin/phpize./configure--with-php-config=/www/server/php/73/bin/php-configmake&&makeinstallecho"extension=pdo_sqlsrv.so">>/www/server/php/73/etc/php.ini/etc/init.d/php-fpm-73reload#检查扩展是否安装成功/www/server/php/73/bin/php-m|grep-isqlsrv=================================php连接sqlserver1、安装必要的软件包:sudoyuminstallepel-releasesudoyuminstallunixODBC-devel2、下载并安装Microsoft提供的SQLServer驱动程序:curlhttps://packages.microsoft.com/config/rhel/7/prod.repo>/etc/yum.repos.d/mssql-release.repoyumremoveunixODBC-utf16unixODBC-utf16-develACCEPT_EULA=Yyuminstallmsodbcsql17ACCEPT_EULA=Yyuminstallmssql-toolsecho'exportPATH="$PATH:/opt/mssql-tools/bin"'>>~/.bash_profileecho'exportPATH="$PATH:/opt/mssql-tools/bin"'>>~/.bashrcsource~/.bashrcyuminstallunixODBC-develcat/etc/odbcinst.ini可以看到最后面有[ODBCDriver17forSQLServer]的配置,恭喜你,驱动安装完成参考:https://cloud.tencent.com/developer/article/2006009也可以使用下面命令验证是否成功:odbcinst-q-d-n"ODBCDriver17forSQLServer"如果成功安装,您应该能够看到有关驱动程序的详细信息。3、启用PHP的SQLServer扩展:sudoyuminstallphp-pdosudoyuminstallphp-sqlsrv4、编辑php.ini文件:打开PHP的配置文件php.ini,找到以下两行并确保它们未被注释:extension=pdo_sqlsrvextension=sqlsrv重启服务器,测试php连接SQLserver是否正常

2024-3-18 483 0
软件

安装重装系统的前提组件Debian/Ubuntu:apt-getinstall-yxz-utilsopensslgawkfilewgetscreen&&screen-SosRedHat/CentOS:yuminstall-yxzopensslgawkfileglibc-commonwgetscreen&&screen-Sos如果出现异常,请刷新Mirrors缓存或更换镜像源。RedHat/CentOS:yummakecache&&yumupdate-yDebian/Ubuntu:aptupdate-y&&aptdist-upgrade-y一键智能安装脚本一键DD脚本,支持性好,更智能更全面,支持国内外各种VPS重装,特别是对国内各种访问国外资源慢的VPS安装有奇效。支持debian11.发现很多人不知道怎么DD甲骨文,使用支持uefi的镜像包即可.脚本已添加3个甲骨文专用选项23-25.wget--no-check-certificate-OAutoReinstall.shhttps://d.02es.com/AutoReinstall.sh&&chmoda+xAutoReinstall.sh&&bashAutoReinstall.sh输入Y确认DD后主机自动获取IP,N则自行设置IP输入N后会自动检测出主机现用IP,如果正确可以按Y确认使用,如不正确则按N自行按正确的输入。25合1的系统一键DD选择界面,输入99则使用自定义镜像。以上系统密码不为默认密码的均为网络收集,如有疑虑使用自己的自定义镜像。25合一系统密码:1、CentOS7.7(已关闭防火墙及SELinux,默认密码Pwd@CentOS)2、CentOS7(默认密码cxthhhhh.com)3、CentOS8(默认密码cxthhhhh.com)4、CentOS6(默认密码Minijer.com)5、Debian11(默认密码Minijer.com)6、Debian10(默认密码Minijer.com)7、Debian9(默认密码Minijer.com)8、Debian8(默认密码Minijer.com)9、Ubuntu20.04(默认密码Minijer.com)10、Ubuntu18.04(默认密码Minijer.com)11、Ubuntu16.04(默认密码Minijer.com)12、WindowsServer2019(默认密码cxthhhhh.com)13、WindowsServer2016(默认密码cxthhhhh.com)14、WindowsServer2012(默认密码cxthhhhh.com)15、WindowsServer2012Lite(默认密码nat.ee)16、WindowsServer2008(默认密码cxthhhhh.com)17、WindowsServer2008Lite(默认密码nat.ee)18、WindowsServer2003(默认密码cxthhhhh.com)19、WindowsServer2003Lite(默认密码WinSrv2003x86-Chinese)20、Windows10LTSCLite(默认密码www.nat.ee)21、Windows7x86Lite(默认密码Windows7x86-Chinese)22、Windows7EntLite(默认密码nat.ee)23、Windows7EntLite(UEFI支持甲骨文)(默认密码nat.ee)24、WindowsServer2008Lite(UEFI支持甲骨文)(默认密码nat.ee)25、WindowsServer2012Lite(UEFI支持甲骨文)(默认密码nat.ee)99、自定义镜像注意:经测试在谷歌云原版系统基础上DD会出现自动获取的子网掩码为255.255.255.255,如出现这种情况需要手工输入改正为正确的如255.255.255.0,否则会安装完成主机可能会离线。OracleCloud(甲骨文云)可选择23-25一键DD,注意基础系统最好选择Ubuntu,如原系统是CentOS可能无法成功。萌咖一键安装脚本实测支持virmach系统下直接dd系统.全自动安装默认root密码:MoeClub.org,安装完成后请立即更改密码.能够全自动重装Debian/Ubuntu/CentOS等系统.同时提供dd安装镜像功能,例如:全自动无救援dd安装windows系统全自动安装CentOS时默认提供VNC功能,可使用VNCViewer查看进度,VNC端口为1或者5901,可自行尝试连接.(成功后VNC功能会消失.)目前CentOS系统只支持任意版本重装为CentOS6.x及以下版本.特别注意:OpenVZ构架不适用.wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&chmod+xInstallNET.sh#bashInstallNET.sh+安装命令DDdebian10示例wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-d10-v64-p"自定义root密码"-port"自定义ssh端口"DDubuntu20.04示例wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-u20.04-v64-p"自定义root密码"-port"自定义ssh端口"下载及说明:Usage:bashInstallNET.sh-d/--debian[dist-name]-u/--ubuntu[dist-name]-c/--centos[dist-version]-v/--ver[32/i386|64/amd64]--ip-addr/--ip-gate/--ip-mask-apt/-yum/--mirror-dd/--image-a/-m#dist-name:发行版本代号#dist-version:发行版本号#-apt/-yum/--mirror:使用定义镜像#-a/-m:询问是否能进入VNC自行操作.-a为不提示(一般用于全自动安装),-m为提示.使用示例:#使用默认镜像全自动安装bashInstallNET.sh-d8-v64-abashInstallNET.sh-d9-v64-abashInstallNET.sh-d10-v64-a分别表示自动安装Debian8x649x6410x64#使用自定义镜像全自动安装bashInstallNET.sh-c6.9-v64-a--mirror'http://mirror.centos.org/centos'#以下示例中,将X.X.X.X替换为自己的网络参数.#--ip-addr:IPAddress/IP地址#--ip-gate:Gateway/网关#--ip-mask:Netmask/子网掩码#使用自定义镜像自定义网络参数全自动安装#bashInstallNET.sh-u16.04-v64-a--ip-addrx.x.x.x--ip-gatex.x.x.x--ip-maskx.x.x.x--mirror'http://archive.ubuntu.com/ubuntu'#使用自定义网络参数全自动dd方式安装#bashInstallNET.sh--ip-addrx.x.x.x--ip-gatex.x.x.x--ip-maskx.x.x.x-dd'https://moeclub.org/get-win7embx86-auto'#使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像(调用文件ID的方式)#bashInstallNET.sh--ip-addrx.x.x.x--ip-gatex.x.x.x--ip-maskx.x.x.x-dd"$(echo"1cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J"|xargs-n1bash<(wget--no-check-certificate-qO-'https://moeclub.org/get-gdlink'))"#使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像#bashInstallNET.sh--ip-addrx.x.x.x--ip-gatex.x.x.x--ip-maskx.x.x.x-dd"$(echo"https://drive.google.com/open?id=1cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J"|xargs-n1bash<(wget--no-check-certificate-qO-'https://moeclub.org/get-gdlink'))"自定义DD包地址示例脚本,补全DD包直连地址后运行即可;#DDWindowsServer2008R264位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2008R2_sp1_64_Administrator_nat.ee.gz'#DDWindowsServer2012R264位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2012R2_64_Administrator_nat.ee.gz'#DDWindowsServer201664位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2016_64_Administrator_nat.ee.gz'#DDWindowsServer201964位精简版[账户Administrator密码WinSrv2019dc-Chinese]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2019_64_Administrator_WinSrv2019dc-Chinese.gz'#DDWindowsServer202264位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2022_64_Administrator_nat.ee.gz'#DDWindowsServer202264位DataCenter版[账户Administrator密码DataCenter]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Disk_Windows_Server_2022_DataCenter_CN_v2.12.vhd.gz'#DDWindows732位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win7_86_Administrator_nat.ee.gz'#DDWindows7sp164位企业精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win7_sp1_64_Administrator_nat.ee.gz'#DDWindows8.164位专业精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win8.1_64_Administrator_nat.ee.gz'#DDWindows102016LTSB64位企业深度精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win10_2016LTSB_64_Administrator_nat.ee.gz'#DDWindows102019LTSC64位企业适量精简版[账户Administrator密码Vicer]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win10_2019LTSC_64_Administrator_Vicer.gz'精简版DD包如果没有自己的DD包,可以使用博主提供的包,从以下版本中选择自己需要的系统,然后输入一键脚本即可;#DDWindowsServer2008R264位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2008R2_sp1_64_Administrator_nat.ee.gz'#DDWindowsServer2012R264位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2012R2_64_Administrator_nat.ee.gz'#DDWindowsServer201664位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2016_64_Administrator_nat.ee.gz'#DDWindowsServer201964位精简版[账户Administrator密码WinSrv2019dc-Chinese]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2019_64_Administrator_WinSrv2019dc-Chinese.gz'#DDWindowsServer202264位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win_Server2022_64_Administrator_nat.ee.gz'#DDWindowsServer202264位DataCenter版[账户Administrator密码DataCenter]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Disk_Windows_Server_2022_DataCenter_CN_v2.12.vhd.gz'#DDWindows732位精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win7_86_Administrator_nat.ee.gz'#DDWindows7sp164位企业精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win7_sp1_64_Administrator_nat.ee.gz'#DDWindows8.164位专业精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win8.1_64_Administrator_nat.ee.gz'#DDWindows102016LTSB64位企业深度精简版[账户Administrator密码nat.ee]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win10_2016LTSB_64_Administrator_nat.ee.gz'#DDWindows102019LTSC64位企业适量精简版[账户Administrator密码Vicer]wget--no-check-certificate-qOInstallNET.sh'https://d.02es.com/InstallNET.sh'&&bashInstallNET.sh-dd'https://d.02es.com/Windows/Win10_2019LTSC_64_Administrator_Vicer.gz'救援模式下直接DD系统镜像进入救援模式,连接救援模式下的服务器,首先执行以下命令:fdisk-l找到与系统硬盘容量匹配的盘位置名称,替换下方的“sda”,同时替换“DDISOURL”为DD镜像的地址wget-O-"DDISOURL"|gunzip|ddof=/dev/sda例如:wget-O-"http://d.02es.com/win/lite/win7-ent-sp1-x64-cn/win7-ent-sp1-x64-cn.vhd.gz"--no-check-certificate|gunzip|ddof=/dev/vda准备完毕,执行替换后的命令开始DD系统。注意在DD完成后,要再次返回后台,退出救援模式,等待DD后的系统启动即可。有些设备可能需要连接VNC,手动配置IP信息。精简版win2016、2019DD镜像(3.3GB~3.8GB)-FromTeddysun进入救援模式,连接救援模式下的服务器,首先执行以下命令:fdisk-l找到与系统硬盘容量匹配的盘位置名称,替换下方的“sda”,以下包含两种语言的win系统,可根据需要自主选择:wget-O-"https://d.02es.com/os/cn_win2016.xz"--no-check-certificate|xzcat|ddof=/dev/sdawget-O-"https://d.02es.com/os/cn_win2019.xz"--no-check-certificate|xzcat|ddof=/dev/sdawget-O-"https://d.02es.com/os/en_win2016.xz"--no-check-certificate|xzcat|ddof=/dev/sdawget-O-"https://d.02es.com/os/en_win2019.xz"--no-check-certificate|xzcat|ddof=/dev/sdaWindows服务器开启Ping功能打开系统运行服务Win+R输入命令##开启Pingnetshfirewallseticmpsetting8##关闭Pingnetshfirewallseticmpsetting8disable常用工具下载密码为根域名https://d.02es.com/tool.zip特别感谢:Vicer、cxt、hiCasper、Teddysun等各位技术大佬的脚本,站长只是脚本的"搬运工"。转自:https://d.02es.com/其他:镜像站:https://dd.1234234.xyz/各云安装:https://blog.tanglu.me/dd/魔改版:https://www.cxthhhhh.com/network-reinstall-system-modify

软件

远程连接WindowsServer2003实例时,使用VNC登录服务器正常,但是使用其他远程连接方式登录服务器时,打开程序和浏览网站速度缓慢,本文介绍该场景下的解决方案。问题描述远程连接WindowsServer2003实例时,使用VNC登录服务器正常,但是使用其他远程连接方式登录服务器时,打开程序和浏览网站速度缓慢。问题原因网卡的Offload.Tx.LSO参数为开启状态导致该问题。解决方案您可以根据实际情况选择如下任意一种方案处理该问题,具体如下:方案一:更换操作系统阿里云不再支持WindowsServer2003系统镜像。因此,建议您使用WindowsServer2012及以上版本的Windows操作系统,避免出现该问题。更换实例操作系统的具体操作,请参见更换操作系统(系统盘)。警告更换操作系统的本质是更换系统盘。更换操作系统后,原来旧的系统盘会被释放,会清除系统盘上的所有数据,请在更换操作系统前为系统盘创建快照备份数据,再执行操作,创建快照的更多信息,请参见快照概述。方案二:将网卡的Offload.Tx.LSO参数更改为Disabled您需要将网卡的Offload.Tx.LSO参数更改为Disabled,操作步骤如下:远程连接ECS实例。具体操作,请参见连接方式概述。打开控制面板,然后选择网络和lnternet。单击查看网络状态和任务,然后在左侧导航栏单击更改适配器设置。选择对应的网卡,单击鼠标右键,然后选择属性>配置。单击高级页签,配置Offload.Tx.LSO参数。您需要先在属性列表中选择Offload.Tx.LS,然后将值选择为Disabled。单击确定,保存配置。转自:https://help.aliyun.com/zh/ecs/support/what-do-i-do-if-operations-are-slow-on-a-windows-server-2003-instance-after-i-connect-to-the-instance?spm=a2c4g.11186623.0.i27