For more information, refer to the blog post at https://www.apachefriends.org/blog/new_xampp_20170628.html.
.To install XAMPP-VM, just do the following:
You should see the XAMPP-VM stack manager, as shown below:
XAMPP-VM ships MariaDB instead of MySQL. The commands and tools are the same for both.
To start XAMPP-VM:
To stop XAMPP-VM, click the "Stop" button in the "General" tab of the stack manager. Once the status icon turns red, close the stack manager window.
Yes. When you start the XAMPP-VM virtual machine, XAMPP services will also automatically start. You can navigate to the "Services" tab of the stack manager at any time to stop, start, restart or check the status of individual services.
Verify that you have enabled port forwarding (from port 80 of the stack to port 8080 of the host system) in the "Network" tab of the stack manager and type the following URL in a web browser:
http://localhost:8080
You should see the XAMPP-VM start page, as shown below.
XAMPP-VM is not meant for production use but only for development environments. The way XAMPP-VM is configured is to be open as possible to allow the developer anything he/she wants. For development environments this is great but in a production environment it could be fatal.
Here a list of missing security in XAMPP-VM:
/opt/lampp/lampp security
このエラーには複数の原因が考えられます。Apacheはいくつかの条件下でこのエラーを発生させます。エラー要因を特定するには、いくつかの調査を行う必要があります。
tail -2 /opt/lampp/logs/error_log
エラーメッセージが表示された場合は、ヘルプページ our community pages を参照してください。
This is most often a symptom of the VM running on a computer with an Apple M1 (arm64) CPU. The VM components do not support the M1 CPU (as of September 2022). You can only use the VM on computers with intel (x64) CPUs. On computers with the M1 CPU, please use the XAMPP native installers instead.
エラーメッセージが表示された場合は、ヘルプページ our community pages を参照してください。
In the default installation, XAMPP-VM has no passwords set and it is not recommended to run XAMPP-VM with this configuration accessible by others.To make the installation more secure:
tail -2 /opt/lampp/logs/error_log
XAMPP: Quick security check...
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes
XAMPP: Turned off.
XAMPP: Stopping MySQL...
XAMPP: Starting MySQL...
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password: ******
XAMPP: Password (again): ******
XAMPP: Setting new MySQL pma password.
XAMPP: Setting phpMyAdmin's pma password to the new one.
XAMPP: MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Write the passworde somewhere down to make sure you won't forget it!!!
XAMPP: Password: ******
XAMPP: Password (again): ******
XAMPP: Setting new MySQL root password.
XAMPP: Setting phpMyAdmin's root password to the new one.
XAMPP: The FTP password for user 'nobody' is still set to 'lampp'.
XAMPP: Do you want to change the password? [yes] yes
XAMPP: Password: ******
XAMPP: Password (again): ******
XAMPP: Reload ProFTPD...
XAMPP: Done.
After calling this command, your XAMPP-VM installation should be more secure.
To activate eAccelerator for PHP:
;extension="eaccelerator.so"
;eaccelerator.shm_size="16"
;eaccelerator.cache_dir="/opt/lampp/tmp/eaccelerator"
;eaccelerator.enable="1"
;eaccelerator.optimizer="1"
;eaccelerator.check_mtime="1"
;eaccelerator.debug="0"
;eaccelerator.filter=""
;eaccelerator.shm_max="0"
;eaccelerator.shm_ttl="0"
;eaccelerator.shm_prune_period="0"
;eaccelerator.shm_only="0"
;eaccelerator.compress="1"
;eaccelerator.compress_level="9"
これで拡張機能が有効になります。For more information about eAccelerator, check the eAccelerator home page: http://eaccelerator.net.
To activate the OCI8/Oracle extension for PHP:
/opt/lampp/lampp oci8
Please enter the path to your Oracle or Instant Client installation:
installing symlinks...
patching php.ini...
OCI8 add-on activation likely successful.
LAMPP: Stopping Apache with SSL...
LAMPP: Starting Apache with SSL...
これで拡張機能が有効になります。
To copy files from the host system to the XAMPP-VM Apache server document root, follow these steps:
To access phpMyAdmin from the host system, follow these steps:
If you see an "Access denied" error, ensure that your phpMyAdmin configuration correctly reflects your MySQL credentials.
In the basic configuration of XAMPP-VM, phpMyAdmin is accessible only from the host system via a secure tunnel, at http://127.0.0.1:8080/phpmyadmin or http://localhost:8080/phpmyadmin.
IMPORTANT: Enabling external access for phpMyAdmin in production environments is a significant security risk. You are strongly advised to only allow access from localhost. A remote attacker could take advantage of any existing vulnerability for executing code or for modifying your data.
To enable remote access to phpMyAdmin, follow these steps:
Alias /phpmyadmin "/opt/lampp/phpmyadmin/"
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig
Require local
Alias /phpmyadmin "/opt/lampp/phpmyadmin/"
<Directory "/opt/lampp/phpMyAdmin">
AllowOverride AuthConfig
Require all granted
No. The components within the VM do not presently support Apple M1 (arm64) CPUs. The VM may only be used on Apple computers with intel (x64) CPUs.
This is the situation as of September 2022. We hope that the VM components will support Apple M1 CPUs in the future, so that XAMPP VMs will be usable on those Apple computers as well.
The XAMPP-VM virtual machine files and logs are stored within your home directory on the OS X host, in the ~/.bitnami/stackman/machines/xampp/vm and ~/.bitnami/stackman/machines/xampp/log directories respectively.
The main XAMPP configuration files are located as follows:
To send email with XAMPP, use the PEAR Mail and Net_SMTP packages, which allow you to send email using an external SMTP account (such as a Gmail account). Follow these steps:
pear install Net_SMTP Mail
Note that if these packages are already installed in your system you see the messages below when executing that command:
Ignoring installed package pear/Net_SMTP
Ignoring installed package pear/Mail
Nothing to install
<?php
require_once "Mail.php";
$from = "your-gmail-username@gmail.com";
$to = 'recipients@example.com';
$host = "ssl://smtp.gmail.com";
$port = "465";
$username = 'your-gmail-username@gmail.com';
$password = 'your-gmail-password';
$subject = "test";
$body = "test";
$headers = array ('From' => $from, 'To' => $to,'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo($mail->getMessage());
} else {
echo("Message successfully sent!\n");
}
?>
Remember to replace the dummy values shown with your actual Gmail address and account password. If you don't plan to use Gmail's SMTP server, replace the SMTP host details with appropriate values for your organization or ISP's SMTP server.
警告 バックアップと復元の機能は現在開発中のため、動作は保証されません。
You can create the backup as follows:
/opt/lampp/lampp backup
/opt/lampp/lampp backup secret
Backing up databases...
Backing up configuration, log and htdocs files...
Calculating checksums...
Building final backup file...
Backup finished.
Take care of /Applications/XAMPP/xamppfiles/backup/xampp-backup-22-01-14.sh
To restore the backup on a new system, you need the same version of XAMPP-VM as on your original/source system. Follow these steps to restore the backup:
./xampp-backup-22-01-14.sh
Checking integrity of files...
Restoring configuration, log and htdocs files...
Checking versions...
Installed: XAMPP 1.4.2
Backup from: XAMPP 1.4.2
Restoring MySQL databases...
Restoring MySQL user databases...
Backup complete. Have fun!
You may need to restart XAMPP to complete the restore
IMPORTANT: Ensure that you have booted the XAMPP-VM virtual machine at least once before following the steps below. Resizing the disk without a first boot may cause the virtual machine to fail afterwards.
To increase the size of the XAMPP-VM disk, follow these steps:
brew update
brew install qemu
qemu-img check ~/.bitnami/stackman/machines/xampp/vm/machine.qcow2
qemu-img check -r all ~/.bitnami/stackman/machines/xampp/vm/machine.qcow2
qemu-img resize ~/.bitnami/stackman/machines/xampp/vm/machine.qcow2 +10G
root@debian:~# df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 15G 1.4G 13G 10% /
root@debian:~# sudo fdisk /dev/vda
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/vda: 24.9 GiB, 26737418240 bytes, 52221520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 31248383 31246336 14.9G 83 Linux
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
Command (m for help): p
Disk /dev/vda: 24.9 GiB, 26737418240 bytes, 52221520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-52221519, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-52221519, default 52221519):
Created a new partition 1 of type 'Linux' and of size 24.9 GiB.
Command (m for help): p
Disk /dev/vda: 24.9 GiB, 26737418240 bytes, 52221520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/vda1 2048 52221519 52219472 24.9G 83 Linux
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
root@debian:~# partx -u /dev/vda1
root@debian:~# sudo resize2fs /dev/vda1
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/vda1 is now 6527434 (4k) blocks long.
root@debian:~# df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 25G 1.4G 22G 6% /
WARNING: Install JQ on your Mac before running the commands suggested on this section.
brew update
brew install jq
To check the required memory of your VM, open a terminal and run the command below. Replace the APP_NAME placeholder with the correct directory name:
$ cat ~/.bitnami/stackman/machines/APP_NAME/metadata.json | jq '.requiredMemory'
To change the VM required memory, follow these steps:
$ cat ~/.bitnami/stackman/machines/APP_NAME/metadata.json | jq '.requiredMemory = MEMORY' | tee ~/.bitnami/stackman/machines/APP_NAME/metadata.json
$ free -h
If you download a new version of XAMPP-VM and try to run it, you may see a warning message about overwriting data. This warning appears when you already have a previous version of XAMPP-VM deployed on your OS X system. It ensures that you do not accidentally overwrite your existing XAMPP-VM data.
To upgrade XAMPP-VM in this scenario, follow these steps:
To uninstall XAMPP-VM, follow these steps: