在 Manjaro 安装 XAMPP 并创建启动图标

周末准备打开 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。

 

【参考链接】

留下回复

您的电子邮件地址不会被公开. 必填项已标注 *

本网站使用 Akismet 来减少垃圾评论. 了解您的评论数据如何被处理.