Fix all error and installation process of XAMPP on Ubuntu latest version. This would be a one-time solution to all the critical errors you may face if you skip the steps.
Hello and welcome back to another quick tutorial and today we are going to install the XAMPP server on ubuntu, it would be pretty same on kali Linux and other Linux distros.
Let's get Started Quickly.
2. Make it secure so that no one could access it out of the LAN.
3. Fix the error
4. We will understand different ways to start and stop the XAMPP server.
5. Athe end we will list all the commands to use XAMPP service using Terminal.
6. How to make the XAMPP invisible from the network and make it more secure.
7. How do I activate eAccelerator, to improve PHP execution?
8. How to fix images are nto visible even server is running?
9. Video Tutorial To Fix All The Errors.
Download the XAMPP package for Linux from the official Apache Webpage:
https://www.apachefriends.org/index.html
The latest version till 2nd May 2020 is XZMPP-Linux-x64-7.4.5-0.
Step 2: Provide the installation package executable permissions.
Open the terminal and go to the Downloads folder and type command
chmod 755 [package name]
eg; chmod 755 xampp-linux-x64-7.4.5-0-installer.run
Step 3: Run the Setup, just type the command
Step 5: Press Next Next... graphical setup wizard uncheck the Launch XAMPP and press click on the finish button. Make sure we do not have to run the graphical interface yet.
Step 6: Launch XAMPP using the Terminal Use the command below
If you get the following output after starting XAMPP, it means that Net Tools are not installed on your system:
In order to install Net Tools, run the following command
Step 7: Verify Installation
Visit the link http://localhost
Step 8: Verify installation of PHPMyADMIN
http://localhost/phpmyadmin
Now we are going to set up a password on our PHP control Panel. You might face some error during this process, make sure you perform all the steps carefully.
Open http://localhost in any browser.
Click on phpMyAdmin will be there on the top right side.
Click User accounts.
Look for the row having User name: root & Host name: localhost. Click Edit Privileges
Click Change password
Enter Password and Click Go. As shown in the image below.
You can see the password for the User name root has been updated successfully.
Now go back to the localhost and click phpMyAdmin. You can see that it is showing an error.
Step 1: Open terminal and enter some commands.
It will opne the config.inc.php file in Gedit text editor. Search for the string $cfg\['Servers'\]\[$i\]['password'] = ''; and change it to like this, $cfg\['Servers'\]\[$i\]['password'] = 'password', check the image below.
After changes save the file.
For the security of our root folder, we have to use some commands to restrict the public access to our /phpmyadmin/config.inc.php
If you want to know what are these codes and how we can use them you must visit our blog Work with Permissions in Linux You will also get a video tutorial on this topic.
Now again go to http://localhost you can see there is a prompt that asks to enter the user name and password, simply enter them and click on login. Cheers!!
You can use the command below if you use 32 system :
If you use 64 system:
The 2nd method is directly using the terminal.
To stop the server simply use another command shown below.
To check the status you can use the command.
Some time it requires to restart or refresh the server for that you can use command.
Remove the semicolon (;) at the beginning of each line and restart XAMPP. eAccelerator is now active. For more information about eAccelerator, check the eAccelerator home page: http://eaccelerator.net.
#EnableMMAP off
#EnableSendfile off
Remove the # in both lines and restart your Apache. Your images should be back.
Use the command to edit the httpd.con
sudo gedit /opt/lampp/etc/httpd.conf
Press ctrl+f and search for EnableMMAP off and remove the # from both of the files listed above.
you have successfully logged in to XAMPP root folder, and learned the ways to start-stop and restart the XAMPP. This was it for the day. Please stay home and keep learning. The video tutorial for this blog is shared below. Must like and share our videos and do subscribe to our Youtube channel EFX Tv You will also get a video tutorial on this topic.
Video tutorial will be uploaded soon... Till then you can watch our recent video.
Hello and welcome back to another quick tutorial and today we are going to install the XAMPP server on ubuntu, it would be pretty same on kali Linux and other Linux distros.
Let's get Started Quickly.
What would we do to get XAMPP installed without any error, steps are written below.
Install, secure, fix error XAMPP
1. First, we will install the XAMPP2. Make it secure so that no one could access it out of the LAN.
3. Fix the error
4. We will understand different ways to start and stop the XAMPP server.
5. Athe end we will list all the commands to use XAMPP service using Terminal.
6. How to make the XAMPP invisible from the network and make it more secure.
7. How do I activate eAccelerator, to improve PHP execution?
8. How to fix images are nto visible even server is running?
9. Video Tutorial To Fix All The Errors.
LET US INSTALL THE XAMPP ON UBUNTU LATEST VERSION
Step 1: Download package.run from the link given below.Download the XAMPP package for Linux from the official Apache Webpage:
https://www.apachefriends.org/index.html
The latest version till 2nd May 2020 is XZMPP-Linux-x64-7.4.5-0.
Step 2: Provide the installation package executable permissions.
Open the terminal and go to the Downloads folder and type command
chmod 755 [package name]
eg; chmod 755 xampp-linux-x64-7.4.5-0-installer.run
Step 3: Run the Setup, just type the command
sudo ./[package name]
Step 5: Press Next Next... graphical setup wizard uncheck the Launch XAMPP and press click on the finish button. Make sure we do not have to run the graphical interface yet.
Step 6: Launch XAMPP using the Terminal Use the command below
sudo /opt/lampp/lampp start
If you get the following output after starting XAMPP, it means that Net Tools are not installed on your system:
In order to install Net Tools, run the following command
sudo apt install net-tools
Step 7: Verify Installation
Visit the link http://localhost
Step 8: Verify installation of PHPMyADMIN
http://localhost/phpmyadmin
Now we are going to set up a password on our PHP control Panel. You might face some error during this process, make sure you perform all the steps carefully.
Let us set up the password to XAMPP root
Step 1:Open http://localhost in any browser.
Click on phpMyAdmin will be there on the top right side.
Click User accounts.
Look for the row having User name: root & Host name: localhost. Click Edit Privileges
Click Change password
Enter Password and Click Go. As shown in the image below.
You can see the password for the User name root has been updated successfully.
Now go back to the localhost and click phpMyAdmin. You can see that it is showing an error.
Now we will fix the error and login to XAMPP
You can fix this error by using any text editor but I'll recommend you install a Gedit Text editor. To install Gedit use this command in terminalsudo apt-get install gedit
Step 1: Open terminal and enter some commands.
sudo /opt/lampp/lampp start
sudo /opt/lampp/lampp stop
sudo chmod 777 -R /opt/lampp/phpmyadmin
sudo chmod 777 -R /opt/lampp/phpmyadmin/config.inc.php
sudo gedit /opt/lampp/phpmyadmin/config.inc.php
It will opne the config.inc.php file in Gedit text editor. Search for the string $cfg\['Servers'\]\[$i\]['password'] = ''; and change it to like this, $cfg\['Servers'\]\[$i\]['password'] = 'password', check the image below.
After changes save the file.
For the security of our root folder, we have to use some commands to restrict the public access to our /phpmyadmin/config.inc.php
sudo chmod 755 -R /opt/lampp/phpmyadmin
sudo chmod 700 -R /opt/lampp/phpmyadmin/config.inc.php
If you want to know what are these codes and how we can use them you must visit our blog Work with Permissions in Linux You will also get a video tutorial on this topic.
Now again go to http://localhost you can see there is a prompt that asks to enter the user name and password, simply enter them and click on login. Cheers!!
What are the ways to start and stop the XAMPP, My SQL, and Apache server.
The first method is using the graphical model. Open terminal and copy-paste this command to start XAMPP in graphical mode.You can use the command below if you use 32 system :
sudo /opt/lampp/manager-linux.run
If you use 64 system:
sudo /opt/lampp/manager-linux-x64.run
The 2nd method is directly using the terminal.
sudo /opt/lampp/lampp start
To stop the server simply use another command shown below.
sudo /opt/lampp/lampp stop
To check the status you can use the command.
sudo /opt/lampp/lampp status
Some time it requires to restart or refresh the server for that you can use command.
sudo /opt/lampp/lampp restart
Now we will se how to run a security to make our XAMPP server invisible from the network and set the ftp password.
This step is more crucial for us to protect all the necessary details we have. To run a security check there is simple command you need to run.
sudo /opt/lampp/lampp security
NOTE: AFTER RUNNING THIS COMMAND IN TERMINAL YOUR SYSTEM WILL PROVIDE YOU SOME INFORMATION AND ASK YOU TO DO THE NECESSARY CHANGES.
FEW QUESTIONS AND SOLUTIONS AFTER RUNNING THE SECURITY CHECK.
1. MySQL is accessible via network. Normally that's not recommended. Do you want me to turn it off? (PRESS Y AND HIT ENTER) [yes]
2. The FTP password for user 'daemon' is still set to 'xampp', (But you didn't use ProFTPD so this is not critical.) Do you want to change the password? (PRESS Y AND HIT ENTER) AND SIMPLY CHANGE THE PASSWORD.
YOU ARE GOOD TO GO AND 100% SECURE
Now let us activate eAccelerator.
eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.
To activate eAccelerator simply find the following lines in your /opt/lampp/etc/php.ini:
The command to open the php.ini in Gedit text editor is written below:
sudo gedit /opt/lampp/etc/php.ini
Now press the ctrl+f and find the following lines, are at same place. Find any one you will get rest of the lines below that line.
;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"
;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"
XAMPP runs, images are not getting displayed? Let us fix this.
That's a special problem with some Linux systems. Please open your /opt/lampp/etc/httpd.conf and look for these two lines:#EnableMMAP off
#EnableSendfile off
Remove the # in both lines and restart your Apache. Your images should be back.
Use the command to edit the httpd.con
sudo gedit /opt/lampp/etc/httpd.conf
Press ctrl+f and search for EnableMMAP off and remove the # from both of the files listed above.
you have successfully logged in to XAMPP root folder, and learned the ways to start-stop and restart the XAMPP. This was it for the day. Please stay home and keep learning. The video tutorial for this blog is shared below. Must like and share our videos and do subscribe to our Youtube channel EFX Tv You will also get a video tutorial on this topic.
Video tutorial will be uploaded soon... Till then you can watch our recent video.