惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
月光博客
月光博客
V
Visual Studio Blog
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
SecWiki News
SecWiki News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
F
Full Disclosure
The Cloudflare Blog
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
AI
AI
N
News and Events Feed by Topic
T
Tor Project blog
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog

Unix

请教下关于 IO 缓冲的一点疑问 - V2EX mv 命令文件夹后面加斜杠真的没有意义吗? 怎么写 Mac 下的脚本? - V2EX 会有人觉得unix系的命令行工具好用的吗,相比gnu的来说 - V2EX V7/x86 - V2EX
Plesk 镜像制作(脚本)
cloudL · 2017-03-10 · via Unix

安装完系统后,执行以下代码后关机。然后把系统制作成镜像即可

保存为一个可执行的 bash 文件,最好在 screen 中运行

#把下面的 key 换成有效的 Plesk key

key=A00100-C11604-BP7806-BP7662-SE5R68

#一键安装 Plesk

sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)

#获取一个本机 ip 地址

ip=ifconfig eth0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}'

if [ "$ip" = "" ]; then

ip=`ifconfig eth0 | grep "inet" | awk '{ print $2}'`

fi

#初始化配置 Plesk

plesk bin init_conf --init -default-ip $ip -netmask 255.255.255.0 -iface eth0 -ip-type shared -license_agreed true -hostname example.com -shared_ips add:$ip -name "John Doe" -passwd mypass -phone 555-5555 -fax 333-3333 -email [email protected] -company "Megacompany Inc." -address "45 Trail street" -city "New York" -zip 10292 -country US -state NY

#激活 key

plesk bin license -i $key

#设置 Plesk 默认语言

plesk bin locales --set-default zh-CN

#更改域名注册或域名管理的链接

if [ ! -f "/etc/centos-release" ]; then

path='/opt'

else

path='/usr/local'

fi

$path/psa/bin/panel_gui -p -domain_registration_url https://www.bisend.cn/domain

$path/psa/bin/panel_gui -p -domain_management_url https://my.bisend.cn

#不显示 Facebook Like 链接以加快 Plesk 页面加载速度

sed 's/;showLikeLink/showLikeLink/' $path/psa/admin/conf/panel.ini.sample > $path/psa/admin/conf/panel.ini

#安装额外的 extension

wget https://my.bisend.cn/downloads/trustasiassltool-1.1.9-10.zip -P /root/

plesk bin extension --install /root/trustasiassltool-1.1.9-10.zip

#清除安装 Key 的信息

plesk bin cloning -u -prepare-public-image true -reset-license true -reset-init-conf true -skip-update true

#下次启动 Plesk 的时候重新映射 ip

plesk bin ipmanage --auto-remap-ip-addresses true

#終わり

echo "finished"

windows 中只把部分操作脚本化

#浏览器下载 http://autoinstall-win.plesk.com/plesk-installer.exe

#双击打开或者 cmd 打开 plesk-installer.exe --console

#LINUX: sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)

#ip=ifconfig eth0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}' #手动获得 ip 并替换下面命令中的 ip

plesk bin init_conf --init -license_agreed true -hostname example.com -shared_ips add:172.31.34.196 -name "John Doe" -passwd MyPass@123 -phone 555-5555 -fax 333-3333 -email [email protected] -company "Megacompany Inc." -address "45 Trail street" -city "New York" -zip 10292 -country US -state NY

plesk bin license -i A00100-C11604-BP7806-BP7662-SE5R68

plesk bin locales --set-default zh-CN #设置中文为默认语言

"C:\Program Files (x86)\Plesk\bin\panel_gui" -p -domain_registration_url https://www.bisend.cn/domain

"C:\Program Files (x86)\Plesk\bin\panel_gui" -p -domain_management_url https://my.bisend.cn

#手动操作代替下面的句子

#sed "s/;showLikeLink/showLikeLink/" "C:\Program Files (x86)\Plesk\admin\conf\panel.ini.sample" > "C:\Program Files (x86)\Plesk\admin\conf\panel.ini"

#手动操作代替下面的句子

#wget https://my.bisend.cn/downloads/trustasiassltool-1.1.9-10.zip -P /root/

#plesk bin extension --install /root/trustasiassltool-1.1.9-10.zip

plesk bin cloning -u -prepare-public-image true -reset-license true -reset-init-conf true -skip-update true

plesk bin ipmanage --auto-remap-ip-addresses true

#windows 中不需要

#-default-ip 172.31.34.196 -netmask 255.255.255.0 -iface eth0 -ip-type shared