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

周末准备打开 XAMPP 来练习 PHP 时,卻怎麼也找不到 XAMPP 安裝在哪從「套件管理員」也顯示我電腦沒有安裝雖然納悶為啥會被移除但也只好試著在安裝一次從「套件管理員」安裝時畫面卻卡在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
 

將檔案另存為 xampp.desktop並複製到 /usr/share/applications 底下即可搜尋到 XAMPP

 

執行後會先跳出輸入 sudo 密碼接著 XAMPP 管理介面即會出現

 

  花了不少時間研究是否有方法可以不用輸入 sudo 密碼來直接啟動程式不過最後還是失敗查看國外的討論串也沒有一個讓我覺得比較喜歡的方式所以暫時就先以這種方式來啟動了未來如果有好的方式再更新

 

【参考链接】

留下回复

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

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