Apache Server (LAMP)
Linux, Apache, MySQL, PHP (LAMP) Stack
Note:
1 You can set up Gocab on different types of clean Ubuntu servers using VPS, including Digital Ocean Droplets, Amazon Lightsail, AWS, Google Cloud Virtual Private Server, Azure Ubuntu Virtual Private Server, and more.
2 If you plan to utilize the scripts (Gocab_laravel) on a single server as outlined in this tutorial, we suggest setting up a new Ubuntu-based server with a minimum of 2+ CPU cores and 2GB+ of memory for an efficient and smooth operation.
Introduction
A "LAMP" stack is a bundle of open-source software commonly used to host dynamic websites and web apps written in PHP. It includes Linux for the operating system, Apache for the web server, MySQL for the database, and PHP for processing dynamic content.
Install LAMP
Step 1: Installing Apache and Updating package
Start by updating the package manager cache. If this is the first time you’re using sudo within this session, you’ll be prompted to provide your user’s password to confirm you have the right privileges to manage system packages with apt:
sudo apt updateThen, install Apache with:
sudo apt install apache2You’ll be prompted to confirm Apache’s installation. Confirm by pressing Y, then ENTER.
Select unnattended-upgrades options by pressing space-bar, and then press Tab button to select OK button, please Enter button.
Step 2: Setup Firewall to allow HTTP
Once the installation is finished, you’ll need to adjust your firewall settings to allow HTTP traffic.
Ubuntu’s default firewall configuration tool is called Uncomplicated Firewall (UFW). It has different application profiles that you can leverage.
To list all currently available UFW application profiles, execute this command:
To only allow traffic on port 80, use the Apache profile
Enable firewall and verify the change with:
After execute this command it will ask proceed this operation with existing ssh connection? Enter "y" and continue it.
Step 3: Find your Server’s Public IP Address
If you do not know what your server’s public IP address is, there are a number of ways to find it. You can following this command to find your public server ip address.
Open this IP address in your browser, If you can view this page, your web server is correctly installed and accessible through your firewall.
Step 4: Installing PHP
To install php and mysql, run the following command:
Press "Y | y" to continue this process and Once the installation is finished, run the following command to confirm your PHP version:
To install php extensions, run the following command:
Once the installation is finished, you can run the following command to confirm your PHP version:
Step 5: Installing Composer
Update the local repository lists by entering the following in a command line.
The following curl command to have the latest Composer version.
This will download and execute an installer script that will download the latest version of Composer and install it in your current working directory.
You’ll need to move the composer to use Composer globally and run the Composer commands from any where.phar file from your current directory to a location included in your PATH environment variable.
The most common location is the /usr/local/bin directory. So use the following command to initiate the move:
To test composer installation, run:
Step 6: Install MySQL Database & User
Now that you have a web server up and running, you need to install the database system to be able to store and manage data for your site. MySQL is a popular database management system used within PHP environments.
When prompted, confirm installation by typing Y, and then ENTER.
Start the interactive script by running:
When prompted, confirm installation by typing Y, and then ENTER.
If you answer “yes”, you’ll be asked to select a level of password validation.
If you choose the strongest level as 2, you'll encounter errors when trying to set a password that doesn't include numbers, uppercase and lowercase letters, and special characters.
We have choose the medium level as 1, after choose password validation level. It will ask some confirmation you can choose as your need.
When you’re finished, test whether you’re able to log in to the MySQL console by typing:
Once you are entering mysql panel, following some command for create database and database user to store data.
To exit the MySQL console, type:
Step 7: Change permission for the www folder
Step 8: Upload Gocab Laravel to Server
To make a new directory on your website, just type this command:
Download the Gocab-laravel-react_native-package zip file from CodeCanyon and unzip it on your computer.
Inside the unzipped folder, find Gocab_laravel folder
Upload the Gocab_laravel folder to the server at the path /var/www/Gocab/.
Step 9: Install zip and extract it
following this command to install zip and extract it.
10. Create Virtual Host File
Add Following Code in Virtual Host File
Include the following Nginx configuration in your edited file:
Restart Apache2
Installing Gocab Laravel
1. Initially, navigate to the Gocab_laravel directory, and change the file named .env.example as .env.
Add values to the below keys in the .env file using nano command
If you're running your Laravel project on your own computer (localhost), make sure to use localhost with current running port and put in APP_URL. as a given example below
If you want to install on live server, you need to add your live server Gocab_laravel url like a APP_URL=https://your-domain.com.
Note: Make sure to set the APP_URL correctly. If you don't, features like uploading, downloading, and showing images won't work properly. Be sure to double-check and make sure everything is set up correctly.
2. Install Required Dependencies:
In the Gocab_laravel folder, run following command in the terminal to install the required dependencies.
3. Generate Laravel APP KEY:
Once the necessary dependencies are successfully installed, run following command to generate laravel app key.
4. Installation of Gocab:
Note: If you've previously run following command or migrated tables, be aware of the fact that it will erase all of your data.
Then, run following command to install Gocab database table.
During the installation, you'll be asked two questions:
1. Do you want to continue with the installation? If you say yes, Gocab will continue to install.
2. Do you want to import in sample data? If you say yes, the sample data will be imported. If you say no, the installation will go ahead without adding any sample data.
5. Link Storage folder to Public folder:
Then, run following command to store and display images correctly.
6. Run Gocab Laravel :
Once you've finished all the previous steps, you can run the Gocab Laravel by adding following command.
When you start your Gocab Laravel project, it typically runs on the default port, you can access it by opening 127.0.0.1:8000 in your web browser.
7. Verify Gocab Purchase Code:
Before using the Gocab Laravel, it's important to verify your Envato purchase code.
Enter in your Envato username and the Gocab purchase code and click next button.
If you don't know where to find your purchase code, click here: Where Is My Purchase Code?
Note: Once a license is verified, it can't be used for another project. An envato purchase code can only be verified on one domain at a time.
Congratulations, Gocab has been successfully installed and configured in your system!🎉, you can proceed by using the default credentials.
Default Credentials
Admin Credential:
Url: https://your-domain.com/admin/login
Email: admin@example.com
Password: 123456789
Driver Credential:
Url: https://your-domain.com/admin/login
Email: driver@example.com
Password: driver@123
User Landing Page: https://your-domain.com
Last updated