https://pexels.com
contabo.com/en/vps - 12 vcpu cores, 48 GB RAM, 400 GB NVMe, 3 snapshots, 32 TB Traffic
https://pexels.com
contabo.com/en/vps - 12 vcpu cores, 48 GB RAM, 400 GB NVMe, 3 snapshots, 32 TB Traffic
PRE-REQUISITES:
1) login to amazon.aws.com, and launch ubuntu 22.04 instance with 30 GB EBS
2) SSH to the AWS Server
To install the LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack on Ubuntu 22.04, follow these steps:
Before you begin, ensure your package list and installed packages are up-to-date by running the following command:
sudo apt update && sudo apt upgrade -y
Install Apache by running the following command:
sudo apt update
sudo apt install apache2
press Y
and hit ENTER to continue
TEST:
http://your_server_ip
Verify Apache Installation: After installation, you can check the status of Apache to ensure it's running:
sudo systemctl status apache2
sudo apt install mysql-server
switch its authentication method from auth_socket to
mysql_native_password
sudo mysql
SELECT
user,authentication_string,plugin,host FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED
WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
TEST
SELECT user,authentication_string,plugin,host FROM
mysql.user;
exit
2)sudo
mysql_secure_installation
--VALIDATE PASSWORD
PLUGIN.-NO
REST- YES
Verify MySQL Installation: Check the MySQL service status:
sudo systemctl status mysql
To install PHP 8.2 and all the necessary modules for Laravel on Ubuntu 22.04, follow these steps:
First, ensure your package lists are up-to-date:
The default Ubuntu repositories might not have the latest PHP versions. To get PHP 8.2, you'll need to add the ondrej/php repository:
Install the software-properties-common
package if it’s not already installed:
sudo apt install software-properties-common -y
Add the PHP repository:
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2 php8.2-cli php8.2-fpm php8.2-mysql php8.2-pgsql php8.2-sqlite3 php8.2-xml php8.2-mbstring php8.2-curl php8.2-zip php8.2-bcmath php8.2-gd php8.2-intl php8.2-readline php8.2-soap php8.2-imagick -y
Step 4: Install Composer (PHP Dependency Manager)
Download and install Composer:
curl -sS https://getcomposer.org/installer | php
2. Move Composer to a directory in your
PATH
:
sudo mv composer.phar /usr/local/bin/composer3. Verify Composer installation:
composer --version
Step 5: Configure Apache or Nginx (Optional)
If you're using Apache or Nginx, you might need to configure them to use PHP 8.2.
For Apache:
Install the PHP 8.2 module for Apache:
sudo apt install libapache2-mod-php8.2 -y
Disable the old PHP module and enable the new one:
sudo a2dismod php8.1
sudo a2enmod php8.2
4.Restart Apache2
sudo systemctl restart apache2
-------------------------------------------------------------------------------------------------------------------------
git clone
git checkout branch
sudo composer install --ignore-platform-req=ext-mongodb
----------------------------------------------------------------------------------
update DNS Record in the domain registrar add A record with elastic IP:--------------------------------------------------------------------
Copy 000-default.com.conf
to create a new file in /etc/apache2/sites-available
:
$ cd /etc/apache2/sites-available $ sudo cp 000-default.com.conf example.com.conf
-include that directory to sites available
using <directoryname>.conf file- sudo nano
/etc/apache2/sites-available/directoryname.conf
<VirtualHost
*:80>
ServerName example.com
ServerAlias www.example.com //for www domain
DocumentRoot /var/www/html/example.com/public
<Directory /var/www/html/example.com>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
-to enable the site
sudo a2ensite <directoryname>
-to
test for syntax errors
sudo
apachectl configtest
-syntax ok
-restart apache services
sudo systemctl restart apache2
sudo snap install --classic certbot
$ sudo certbot --apache -d example.com -d www.example.com sudo systemctl restart apache2
Zoho Mail offers a free email hosting plan for custom domains with up to 5 users. Here’s how to set it up:
Step 1: Install Python and Pip
Update the package list:
sudo apt update
Install Python 3 and pip:
sudo apt install python3 python3-pip -y
Verify the installation:
python3 --version
pip3 --version
Step 2: Install Virtual Environment
Install venv
(if not installed):
sudo apt install python3-venv -y
Create a virtual environment:
Navigate to your project directory and create the environment:
mkdir my_django_project
cd my_django_project
python3 -m venv env
Activate the virtual environment:
source env/bin/activate
Your terminal prompt should now show (env)
.
Step 3: Install Django
Install Django:
pip install django
Verify the installation:
django-admin --version
Step 4: Start a Django Project
Create a new project:
django-admin startproject mysite
Navigate to the project directory:
cd mysite
To verify that everything is working, run the Django development server.
python3 manage.py runserver
Step 7: Create a View
Edit myapp/views.py
:
from django.shortcuts import render
def home(request):
return render(request, 'home.html')
Create a URL pattern:
Edit mysite/urls.py
to include your app’s view:
from django.contrib import admin
from django.urls import path
from myapp import views
urlpatterns = [
path('admin/', admin.site.urls),
path('', views.home),
]
Run the server again:
python3 manage.py runserver
Step 8: Create a Template
mkdir -p myapp/templates
Create an HTML file myapp/templates/home.html
:
<!DOCTYPE html>
<html>
<head>
<title>Django App</title>
</head>
<body>
<h1>Welcome to Django!</h1>
</body>
</html>
Modify the view to render the template:
In myapp/views.py
:
from django.shortcuts import render
def home(request):
return render(request, 'home.html')
Run the server and refresh the browser. You should now see the HTML content rendered.
Ubuntu 22.04, Apache
composer install
and npm install
.env
file and copy content from .env.example
php artisan key:generate
from terminal.env
php artisan migrate
, Then Run php artisan db:seed
if you want use faker database records,php artisan serve
Run in another commandline npm run dev
REFERENCES:
https://github.com/YasserElgammal/blog-cms
1) Git clone https://github.com/rappasoft/laravel-boilerplate.git
2) cd /var/www/html/laravel-boilerplate , set up .env file
3) php artisan key:generate
4) composer install
5) npm install
6) php artisan session:table
7) php artisan migrate
1- Use spatie/laravel-backup package to implement project folder back-up to the server
2- Manually run the backup , by running its cronjob
php artisan backup:run
3- Check your AWS account to view backups
4- Download to your device and back-up to hard disk
Prerequisites
1)Purchase necessary Hardware Barcode Printer, Invoice Printer, Scanner
2) laptop/ System needs to have 3 USB ports
3) 3 power cables will be there, so better to have an extension cable
4) POS s/w hosted in Digital Ocean Server, so as to be available anywhere
5) Barcode label role (50 x 25 cm)
6) Invoice printer sheet roll
-------------------------------------------------------------------------------------------------------------------------
1)Preferred Invoice printer - EPSON-TM-T20III-Series
a) Download the driver, from the link below, choose the correct Windows version
https://epson.com/Support/Point-of-Sale/Thermal-Printers/Epson-TM-T20III-Series/s/SPT_C31CH51001?review-filter=Windows+10+64-bit
b)During installation don't forget to choose USB Port
-------------------------------------------------------------------------------------------------------------------------
2)Preferred Barcode printer -Honeywell pc42d (300 dpi)
a) first download and Install download manager from the below link
https://hsmftp.honeywell.com:443/en/Software/Printers/Printer-Software-and-Drivers/Label-Design-Applications/Current/BarTender_UL_2022
b) Then download and install bartender lite software
https://sps-support.honeywell.com/s/article/How-to-download-BarTender-Ultralite-for-Intermec-legacy-printers
c) To print the barcode on label,
-- Add product to the POS software, download barcode,
-- open the barcode designer software,
File--> new-->predefined stock (40336)
select next on other items and print the barcode
-
-----------------------------------------------------------------------------------------------------------
3) Connect with zebra or honeywell scanner
------------------------------------------------------------------------------------------------------------------------
If you have multiple SPF records, delete them to avoid conflicts.Add a single SPF record with the combined directives:
Eg:1. v=spf1 include:_spf.elasticemail.com include:spf.protection.outlook.com -all2. v=spf1 include:_spf.mlsend.com include:_spf.mlsend.com include:_spf.elasticemail.com include:spf.protection.outlook.com -allCombined
v=spf1 include:_spf.elasticemail.com include:spf.protection.outlook.com include:_spf.mlsend.com -all
Save Changes:
After updating the SPF record, verify that it has been correctly applied:
_spf.elasticemail.com
, spf.protection.outlook.com
, _spf.mlsend.com
).
<head>
section as shown in the example above.After adding meta tags, you can validate your HTML to ensure there are no errors. You can use the W3C Markup Validation Service https://validator.w3.org/ to check your HTML.
Here are some ways to check your code after your team migrated it from Lumen to Laravel:
Here are some ways to check your code after your team migrated it from Lumen to Laravel:
General checks:
app
, config
, resources
, etc. Ensure these folders exist and contain the expected files.composer.json
file to see if Laravel dependencies are installed.config
directory. Key Laravel configuration files like app.php
, database.php
, etc. should be present and configured correctly.autoload
section in composer.json
reflects the Laravel PSR-4 autoloading structure.routes
directory. Laravel uses routes defined in this directory for handling requests. Ensure routes are migrated properly from Lumen.app/Http/Controllers
directory (default Laravel location) and use Laravel controller features like dependency injection and middleware.Framework-specific checks:
Testing:
Additional resources:
By following these steps and referencing the resources, you can gain a good understanding of the changes made during the migration and identify any potential issues. Remember, the specific checks will depend on the complexity of your application and the extent of the migration.