How to install Website Using Xampp in Ubuntu?

Posted by

Step 1.Login to ubuntu machine

Step 2. Download ubuntu Xampp file

run this command in /opt

wget https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.2.4/xampp-linux-x64-8.2.4-0-installer.run

Grant permission to File

chmod 777 xampp-linux-x64-8.2.4-0-installer.run

Install file

./xampp-linux-x64-8.2.4-0-installer.run

check the status if Xampp is running

root@jami3:/opt# /opt/lampp/xampp status
Version: XAMPP for Linux 8.2.4-0
Apache is running.
MySQL is not running.
ProFTPD is not running.

Check with your ip address if able to open Xampp

Click PhpMyAdmin

To resolve above Issue please go to

vim /opt/lampp/etc/extra/httpd-xampp.conf or
vi /opt/lampp/etc/extra/httpd-xampp.conf

Solution: “Require all granted” instead of  “Require local

Restart the Xampp

root@jami3:/opt# /opt/lampp/xampp restart
Restarting XAMPP for Linux 8.2.4-0...
XAMPP: Stopping Apache...ok.
XAMPP: Stopping MySQL...not running.
XAMPP: Stopping ProFTPD...not running.
XAMPP: Starting Apache.../opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
/opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
ok.
XAMPP: Starting MySQL.../opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
ok.
XAMPP: Starting ProFTPD.../opt/lampp/share/xampp/xampplib: line 22: netstat: command not found
ok.
root@jami3:/opt# /opt/lampp/xampp status
Version: XAMPP for Linux 8.2.4-0
Apache is running.
MySQL is running.
ProFTPD is running.

Please check again phpmyadmin

Check PHP Version

(if not getting , please set the environment Variable )

Go to link to set environment variable – https://www.cloudopsnow.in/how-to-set-an-environment-variable-for-installing-php-via-xampp-on-ubuntu/

Install composer

Please follow link to install composer on ubuntu – https://www.cloudopsnow.in/wp-admin/post.php?post=1161&action=edit

To set environment variable for composer

Please follow the link – https://www.cloudopsnow.in/how-to-set-an-environment-variable-for-composer-when-using-xampp-on-ubuntu/

Create databases

Create Databases as per your project requirement:

Upload your application Data in PhpMyAdmin

Follow the link to import data into phpmyadmin sql – https://www.cloudopsnow.in/how-to-upload-sql-file-to-database-using-phpmyadmin-in-xampp/

Pull the application code from GitHub to local machine (Linux machine)

Before that generate ssh keygen

ssh-keygen

root@jami3:/opt/lampp/htdocs# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:R8lJWNv0IB+ltuibexB9o7jkaV87FjcjzjiwMaG3itY root@jami3
The key's randomart image is:
+---[RSA 3072]----+
|         o+ +..  |
|        .o O =   |
|          *.= .  |
|         o.o..o  |
|        S +o.o . |
|       . B+ ...o.|
|      . .oB++ ooo|
|     ..E o==.+o. |
|    .. ...++o... |
+----[SHA256]-----+

Go to directory – cd /root/.ssh/

cat id_rsa.pub

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDb/5Qb6wDJcFpsAVR5qDvxUYgiEMIZ7qX2HOZSYD3VUayZrHLdkhnvJ2of5V44JrbygBOYCWBC0Bp7Iw1tmm169v317wNG+Lf7XIqE9cKht9orCuzRr6RbFv79wzuWYAEZKjRna1dUS0eqfDhvRQyRPkjFhHCvx7NxKZ/FyarukckWaKJJNRAXUHIMVtFQv5sqJNXS6o4uTwY0A7nCQ/eUuHyI5MNztMeSf1I+SnojAzyGq+VAEEQCYT4kAoh9kBA7wBjq5T+nTg2iwsP2CqD4jZoV07bGLCulCoNzUhBy4Rr3jQNHWwU51w1Ia1qXW5TfxNVhfCJJ2qfYU+yNgsogiqrFmdqOyQe0v1HKw21xAdu/UewIsCNLHc4ZEgtha+YVMuo4l4Ph/5Nwwovog9jydKBrKahVECZo7/tbQ/jzVgAelkSZ7qnFy8xSxLJ3C5dAgiIgHwuVGep2SHwLpYa/clpXg+V5gKMWlDXVOVezJJFJV4/gCrfk6K9Ze5PeM7U

Pull the application code from GitHub to local machine

Add to github

Install git in ubuntu if not installed – apt install git

Clone the repository to your VM

git clone git@github.com:Holidaylandmarktest/Event.git

Now Go to /opt/lampp/htdocs/holidaylandmark/Event and update .env file in both Event and Trip

Trip

Event

Run composer

Run composer update in path -/opt/lampp/htdocs/holidaylandmark/Event

it failed with

Please follow link to install ext-sodium

https://www.cloudopsnow.in/how-to-install-php-x-x-gd-and-php-x-x-sodium-manually-in-ubuntu-if-composer-update-failed/

Run composer update after installing missing files

Run php artisan optimize

Run php artisan serve

login and try to see if able to access the application from- http://127.0.0.1:8000

Update conf files

Now change below conf files according to your application in path- /opt/lampp/etc/extra

httpd-vhosts.conf
httpd-ssl.conf

Now change below conf files according to your application in path – /opt/lampp/etc

httpd.conf

Hit your ip address

if you getting below error regarding Permission denied, please change the owner from root to daemon for all files in both Event and Trip

run below command to change owner

chown -R daemon:daemon .

before changing

after changing

Final setup done

guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x