| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

XAMPP

提供: MyMemoWiki
2021年3月12日 (金) 07:04時点におけるPiroto (トーク | 投稿記録)による版 (→‎phpMyAdmin)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
ナビゲーションに移動 検索に移動

| FuelPHP | PHP | MySQL | Apache |

XAMPP

Ubuntu

インストール


ダウンロード


  1. $ wget https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.0.2/xampp-linux-x64-8.0.2-0-installer.run
  2. $ chmod +x xampp-linux-x64-8.0.2-0-installer.run

インストール


  • サイレントモードでインストール
  • 確認
  1. $ sudo ./xampp-linux-x64-8.0.2-0-installer.run --help
  2. --mode <mode> Installation mode
  3. Default: qt
  4. Allowed: qt gtk xwindow text unattended
  • インストール
  1. $ sudo ./xampp-linux-x64-8.0.2-0-installer.run --mode unattended
  • インストール完了

Xampp installed.png

ドキュメントルートに書き込み権限


  1. $ sudo chmod o+w /opt/lampp/htdocs/

停止

  1. $ sudo /opt/lampp/lampp stop
  2. Stopping XAMPP for Linux 8.0.2-0...
  3. XAMPP: Stopping Apache...ok.
  4. XAMPP: Stopping MySQL...not running.
  5. XAMPP: Stopping ProFTPD...not running.

開始

  1. $ sudo /opt/lampp/lampp start
  2. Starting XAMPP for Linux 8.0.2-0...
  3. XAMPP: Starting Apache.../opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
  4. /opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
  5. ok.
  6. XAMPP: Starting MySQL.../opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
  7. ok.
  8. XAMPP: Starting ProFTPD.../opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
  9. ok.
  1. $ sudo apt install net-tools
  • 再度
  1. $ sudo ./lampp start
  2. Starting XAMPP for Linux 8.0.2-0...
  3. XAMPP: Starting Apache...already running.
  4. XAMPP: Starting MySQL...already running.
  5. XAMPP: Starting ProFTPD...already running.

MySQL root初期パスワード設定


  1. $ mysqladmin -u root password
  2. New password:
  3. Confirm new password:
phpMyAdminにアクセスできなくなる
  • /opt/lampp/phpmyadmin/config.inc.php
    • 自動ログイン : 設定ファイルにパスワードを記入

**ログイン画面を表示 : auth_type を cookie

  1. $cfg['Servers'][$i]['auth_type'] = 'config';
  2. $cfg['Servers'][$i]['user'] = 'root';
  3. $cfg['Servers'][$i]['password'] = '';

phpMyAdmin

アクセスエラー


Phpmyadmin access err.png

Access to the requested directory is only available from the local network. This setting can be configured in the file "httpd-xampp.conf".

  • $ sudo vi /opt/lampp/etc/extra/httpd-xampp.conf
  • Require を local から all granted に変更
  1. Alias /phpmyadmin "/opt/lampp/phpmyadmin"
  2.  
  3. # since XAMPP 1.4.3
  4. <Directory "/opt/lampp/phpmyadmin">
  5. AllowOverride AuthConfig Limit
  6. # Require local
  7. Require all granted
  8. ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
  9. </Directory>