我想在单个命令执行中自动安装 .run 文件(在本例中为 xampp),这需要用户的交互式回答:
这是手动安装:
sudo ./xampp-linux-1.8.3-5-installer.run
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.
XAMPP Core Files : **Y** (Cannot be edited)
XAMPP Developer Files [Y/n] :**n**
Is the selection above correct? [Y/n]: **Y**
----------------------------------------------------------------------------
Installation Directory
XAMPP will be installed to /opt/lampp
Press **[Enter]** to continue:
----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.
Do you want to continue? [Y/n]: **Y**
----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.
Installing
0% ______________ 50% ______________ 100%
#########################################
----------------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.
如何从一开始就预设以下用户条目而无需用户干预?是 否 是 [输入] 是
答案1
还有神秘的
--optionfile <optionfile> Installation option file
我找不到任何文档(将与 结合起来--mode unattended
)。
否则,我在 hackish echo -e "YNY\nY" | <command>
where <command>
will be 方面取得了一些成功sudo ./xampp-linux-1.8.3-5-installer.run
。 (注意,我已经完成了 EMC Networker 的安装,而不是 XAMPP。)