周末准备打开 XAMPP 来练习 PHP 时,But I still couldn't find where XAMPP was installed,It also shows in the 'Package Manager' that my computer hasn't installed it,Although puzzled why it was removed,I had no choice but to try installing it again。從「套件管理員」安裝時,畫面卻卡在”Extracting package (this might take several minutes, don’t give up!)”,第一次讓他跑了一個多小時還沒動靜,第二次直接讓它跑一整晚,結果還是一樣,I searched online a bit,Other users abroad have also encountered the same situation,There doesn't seem to be a clear solution。Later, I checked the official website,It turns out the official site provides a .run installation file,The installation method is almost the same as on Windows,Very convenient,This also reminds me that I used this method to install it two weeks ago,No wonder the 'Plugin Manager' doesn't know I've already installed it (my memory really is extremely bad)。
After completing the XAMPP installation,Next is just likethe last time installing Anaconda the same,为程序建立一个启动图标(有点 Windows 快捷方式的概念),避免下次找不到启动的位置,甚至是忘记自己有安装…。以下分别说明安装 XAMPP 及 建立 Launcher (Desktop Entry 文件)的方法。
【安装XAMPP】
至官方网站下载 Linux 适用的 .run 文件

对文件右键属性,勾选“允许此文件作为程序来执行”

以 sudo 執行程式後,即可看見精靈安裝模式

安装完成后,程式會位於 /opt/lampp 底下。

【為 XAMPP 建立 Launcher (Desktop Entry 文件)】
新增一個空白文件,填入以下資訊
[Desktop Entry] Verson=1.2 Type=Application Name=XAMPP GenericName=Web Server Comment=Apache, MariaDB, php Categories=Development;Education Exec=sudo /opt/lampp/manager-linux-x64.run Icon=/opt/lampp/htdocs/dashboard/images/xampp-logo.svg Terminal=true StartupNotify=true
Save the file as xampp.desktop,and copy it to /usr/share/applications,then you can search for XAMPP

After running, it will first prompt to enter the sudo password,Then the XAMPP management interface will appear

Spent quite a bit of time researching if there’s a way to start the program directly without entering the sudo password,But in the end, still failed,Checked foreign discussion threads,None of them made me feel preferable,So for the time being, we will start it this way,In the future, we will update if there is a better way。
【参考链接】








留下回复