XAMPP / LAMPP

LAMPP is a software bundle that includes the Apache web server, MySQL database server, and PHP scripting language, as well as other software components that are commonly used for web development. It is a popular tool for creating and testing dynamic web applications on a local machine.

To install WordPress on LAMPP, you can follow these steps:


Once you have completed these steps, you should be able to access your WordPress website by navigating to http://localhost/yourdirectoryname in your web browser.

Here are some of the most commonly used commands for LAMPP:

1. To start the Apache server:

sudo /opt/lampp/lampp startapache

2. To start the MySQL server:

sudo /opt/lampp/lampp startmysql

3. To start both Apache and MySQL servers:

sudo /opt/lampp/lampp start

4. To stop both Apache and MySQL servers:

sudo /opt/lampp/lampp stop

5. To restart both Apache and MySQL servers:

sudo /opt/lampp/lampp restart

6. To check the status of the LAMPP installation:

sudo /opt/lampp/lampp status

7. To access the XAMPP control panel:

http://localhost Or sometimes http://localhost:8080

8. To access the MySQL command line interface:

sudo /opt/lampp/bin/mysql -u root -p

You will be prompted to enter your MySQL root password.

9. To access the PHP command line interface:

sudo /opt/lampp/bin/php -a

10. To access the phpMyAdmin web interface:

http://localhost/phpmyadmin


These are some of the most commonly used commands for LAMPP. There are many other commands and options available depending on your specific needs and requirements. You can find more information about LAMPP commands and options in the official documentation or by running the command `sudo /opt/lampp/lampp --help`.

How to link MySQL from XAMPP (/opt/lampp/bin) to use mysql command from any directory in Debian or Linux ?

sudo ln -s /opt/lampp/bin/php /usr/bin/php

sudo ln -s /opt/lampp/bin/mysql /usr/bin/mysql

The command `sudo ln -s /opt/lampp/bin/php /usr/bin/php` creates a symbolic link from the `/usr/bin/php` file to the `php` binary located in the `/opt/lampp/bin` directory.

The `ln` command is used to create links between files. The `-s` option specifies that a symbolic link (also known as a soft link or symlink) should be created, which is a type of link that points to another file or directory in the file system.

In this case, the symbolic link is created from `/usr/bin/php` to `/opt/lampp/bin/php`. This means that when you run the `php` command from the terminal, the system will look for the binary file in the `/usr/bin` directory and find the symbolic link that points to the `php` binary in the `/opt/lampp/bin` directory.

This command is often used to make the `php` command available globally on the system, so you can run it from any directory without having to specify the full path to the binary file in the `/opt/lampp/bin` directory.


OR


To link MySQL from XAMPP to use the `mysql` command from any directory in Ubuntu, you can add the XAMPP MySQL binary directory (`/opt/lampp/bin`) to your system's PATH variable. Here are the steps to do that:


1. Open the `.bashrc` file in your home directory using a text editor:

nano ~/.bashrc

2. Scroll to the bottom of the file and add the following line:

export PATH=$PATH:/opt/lampp/bin

3. Save the file and exit the text editor.

4. Refresh the environment variables by running the following command:

source ~/.bashrc

5. You should now be able to use the `mysql` command from any directory in your terminal.

You can test whether the `mysql` command is working by opening a new terminal window and running the following command:

mysql -u root -p

This should open the MySQL command line interface and prompt you for your MySQL root password.


By adding the XAMPP MySQL binary directory to your system's PATH variable, you can easily use the `mysql` command from any directory in your terminal without having to specify the full path to the binary file.

Global Path || MySQL & PHP Global Variable 

To set Aliases for starting, stopping, and restarting XAMPP on Ubuntu, you can add the following lines to your `~/.bashrc` file:


alias xstart='sudo /opt/lampp/lampp start'

alias xstop='sudo /opt/lampp/lampp stop'

alias xrestart='sudo /opt/lampp/lampp restart'


Here's a brief explanation of what each line does:


Once you've added these lines to your `~/.bashrc` file, save the file and then run the following command to reload the Bash shell:

source ~/.bashrc

You should now be able to use the `xstart`, `xstop`, and `xrestart` aliases in your terminal to start, stop, and restart XAMPP.