Install ERPNext/Frappe on Ubuntu 22.04

Read: https://docs.frappe.io/framework/user/en/installation#debian-ubuntu

Update your system’s package index

if not exist, Install/update gitpython, and redis

Check:

Now, edit the MariaDB configuration file (this step is not required for Frappe v15.21.0 or above).

And add this configuration

Now, just restart the MariaDB service and you are good to go.

Check Node or Install Node if not exist

Use node > 18. use the stable version (v20..) instead

Check:

Finally, check/install yarn using npm

Install the libraries for wkhtmltopdf

Download and install wkhtmltopdf package from https://wkhtmltopdf.org/downloads.html, then run this command to install the package. As an example for Ubuntu 22.04 amd64 in Download directory

if you found this error: Package xfonts-75dpi is not installed. then run this to install the dependencies

Install Bench CLI
Install bench via pip (or pip3)
[codesyntax lang=”bash”]

[/codesyntax]

Note: WARNING: The script bench is installed in ‘/home/satria/.local/bin’ which is not on PATH.
So run –> THIS IS NOT SAVED BECAUSE WHEN I TRIED TO LOGIN AGAIN, THE PATH IS MISSING
[codesyntax lang=”bash”]

[/codesyntax]

 

Check ‘Bench’ version
[codesyntax lang=”bash”]

[/codesyntax]

Read: https://docs.frappe.io/framework/user/en/tutorial/install-and-setup-bench
Create frappe-bench directory
Let’s create our project folder which will contain our apps and sites. Run the following command: bench init frappe-bench in my projects directory
[codesyntax lang=”bash”]

[/codesyntax]
Note: make sure to use node > = v18…

Let’s fix the installation problem:
1. [codesyntax lang=”bash”]

[/codesyntax]
pls go to ‘apps/frappe’ directory (here is the complete path: /home/satria/Documents/projects/frappe-bench/apps/frappe) then run ‘npx update-browserslist-db@latest’
[codesyntax lang=”bash”]

[/codesyntax]
2. WARN Cannot connect to redis_cache to update assets_json

the redis service is running:
sudo systemctl status redis
[sudo] password for satria:
● redis-server.service – Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor >
Active: active (running) since Wed 2025-05-14 13:49:23 WIB; 16min ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Main PID: 1390 (redis-server)
Status: “Ready to accept connections”
Tasks: 5 (limit: 57560)
Memory: 5.2M
CPU: 1.714s
CGroup: /system.slice/redis-server.service
└─1390 “/usr/bin/redis-server 127.0.0.1:6379” “” “” “” “” “” “” “”>

Mei 14 13:49:23 teddy systemd[1]: Starting Advanced key-value store…
Mei 14 13:49:23 teddy systemd[1]: Started Advanced key-value store.

here is the content of sites/common_site_config.json:
{
“background_workers”: 1,
“file_watcher_port”: 6787,
“frappe_user”: “satria”,
“gunicorn_workers”: 17,
“live_reload”: true,
“rebase_on_pull”: false,
“redis_cache”: “redis://127.0.0.1:13000”,
“redis_queue”: “redis://127.0.0.1:11000”,
“redis_socketio”: “redis://127.0.0.1:13000”,
“restart_supervisor_on_update”: false,
“restart_systemd_on_update”: false,
“serve_default_site”: true,
“shallow_clone”: true,
“socketio_port”: 9000,
“use_redis_auth”: false,
“webserver_port”: 8000
}

SO the redis server used PORT 13000 instead of PORT 6379. CHANGED THE PORT FOR redis_cache, redis_queue and redis_socketio to port 6379 in sites/common_site_config.json. So now the content is:
[codesyntax lang=”text”]

[/codesyntax]

Test the redis server for 6379 port
[codesyntax lang=”bash”]

[/codesyntax]

Start the Bench Server
Now that we have created our frappe-bench directory, we can start the Frappe web server by running the following command: bench start

[codesyntax lang=”bash”]

[/codesyntax]

Note: Type CTRL+C to stop the bench engine

It can be opened on http://127.0.0.1:8000/ or http://192.168.1.23:8000
but the app still empty!

So Create an App
Read: https://docs.frappe.io/framework/user/en/tutorial/create-an-app
Case study: Library Management System

To create our Library Management app, run the new-app command:

You should get some prompts, and output like the following. You can enter information manually, or press enter to select the defaults

[codesyntax lang=”bash”]

[/codesyntax]

You will be prompted with details of your app, fill them up and an app named library_management will be created in the apps folder.

Create A Site
Read: https://docs.frappe.io/framework/user/en/tutorial/create-a-site

Run : bench new-site library.localhost
[codesyntax lang=”bash”]

[/codesyntax]
the admin password is Teddy@123

This command will create a new database, so you need to enter your MariaDB root password. It will also ask to set the password for the Administrator user, just set a password that you won’t forget. This will be useful later.

Now, you will have a new folder named library.localhost in the sites directory.

If site creation fails for any reason, you’ll be prompted to roll back the changes. This will delete the library.localhost or equivalent in your sites directory, and delete the database/user that was created. This will allow you to easily retry without having to manually cleanup the unusable site.

the new database (_5b0e23f4238e31a0), user and password can be seen in sites/library.localhost/site_config.json

Now you can open the site http://library.localhost:8000/ on your browser
Note: make sure to run ‘bench start’ first in the frappe-bench directory

The login page will be displayed:
username: Administrator
password: Teddy@123
This user also can be found in the database (tabUser table)

Then install app on site
[codesyntax lang=”bash”]

[/codesyntax]

To confirm if the app was installed, run the following command:
[codesyntax lang=”bash”]

[/codesyntax]

then run ‘bench start’ again!

I found some glitch on the frontend.
for example on http://library.localhost:8000/login, i found these errors related to css on the console:
Failed to load resource: the server responded with a status of 404 (NOT FOUND) -> http://library.localhost:8000/assets/frappe/dist/css/login.bundle.O2AXXQ4F.css
I can’t find the file but I found this file:
sites/assets/frappe/dist/css/login.bundle.M242FIII.css
–> NEED TO RESTART bench server (stop bench then run again bench start). then refresh the browser

but after the login, i found another frontend glitch:
GET http://library.localhost:8000/assets/frappe/dist/css/desk.bundle.5EPJH5Z3.css net::ERR_ABORTED 404 (NOT FOUND) -> http://library.localhost:8000/assets/frappe/dist/css/desk.bundle.5EPJH5Z3.css

GET http://library.localhost:8000/assets/frappe/dist/css/report.bundle.7F2GVCHL.css net::ERR_ABORTED 404 (NOT FOUND) -> http://library.localhost:8000/assets/frappe/dist/css/report.bundle.7F2GVCHL.css

–> READ THE WARNING MESSAGE:
WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect. –> So fix it as requested! then restart bench (bench start)
Open http://library.localhost:8000/app/ -> should be working and run the app install wizard
email: advcha@yahoo.com
pass: Teddy@123

Create a DocType
Read: https://docs.frappe.io/framework/user/en/tutorial/create-a-doctype
DocType is analogous to a Model in other frameworks. Apart from defining properties, it also defines the behavior of the Model.

Enable Developer Mode
Before we can create DocTypes, we need to enable developer mode on our bench. This will enable boilerplate creation when we create doctypes and we can track them into version control with our app.

Go to your terminal and quit the bench server if it’s already running then from the frappe-bench directory, run the following command:

Creating a DocType

While in Desk, navigate to the DocType List using the Awesomebar. This list will include DocTypes bundled with the framework, those that are a part of the installed Frappe apps and custom ones, which you can create specific to each site.

The first doctype we will create is Article. To create it, click on New.
-> http://library.localhost:8000/app/doctype/view/list then click ‘+Add DocType’ button on the top right

  1. Enter Name as Article
  2. Select Library Management in Module

Then click ‘Create & Continue’ button
then Go to http://library.localhost:8000/app/doctype
then select ‘Article’

  1. Add the following fields in the Fields table: (Better use ‘Form’ tab)
    1. Article Name (Data, Mandatory)
    2. Image (Attach Image)
    3. Author (Data)
    4. Description (Text Editor)
    5. ISBN (Data)
    6. Status (Select) – Enter two options: Issued and Available (Type Issued, hit enter, then type Available)
    7. Publisher (Data)

Refer the following images to check how it should be done:
Form tab

Naming tab

Setting tab

Field tab (usually populated from the Form tab entries)

After adding the fields, click on Save.

You will see a Go to Article List button at the top right of the form. Click on it to go to the Article List. Here you will see a blank list with no records because the table has no records.

Let’s create some records. But before that, we need to clear the Desk cache. Click on the Settings dropdown on the right side of the navbar and click on Reload.

Click ‘Go to Article List’ button (http://library.localhost:8000/app/article)
then click ‘Add Article’ button

The github gave me much headeache
[codesyntax lang=”bash”]

[/codesyntax]

Install Ollama and DeepSeek On Ubuntu 22.04

Ref: https://ollama.com/download

Select the linux then Install on your terminal with this command:
curl -fsSL https://ollama.com/install.sh | sh

[codesyntax lang=”bash”]

[/codesyntax]

on the search model text box, select ‘deepseek-r1’ or go to https://ollama.com/library/deepseek-r1
Okay. I just choose ‘1.5b’ model as a test. then install it on your terminal with this command:
ollama run deepseek-r1:1.5b

[codesyntax lang=”bash”]

[/codesyntax]

Integrate it with VSCode:
Watch : https://www.youtube.com/watch?v=cqFRE9c8048&ab_channel=ChaooCharles

the problem:
1. it’ll take your disk space. For just 1.5b model, it’ll take 1.1 GB disk space
2. If you don’t have GPU, it’ll use your CPU resource and it took 100% CPU resources on my Ubuntu machine
You can stop and disable the ollama services on your machine
[codesyntax lang=”bash”]

[/codesyntax]

Install osTicket

Ref: https://www.rosehosting.com/blog/how-to-install-osticket-on-ubuntu-22-04/

Download

Install osTicket 1.10

LOCAL SETUP (I uses PHP 7.4)

I tried to setup a virtualhost:

sudo gedit /etc/apache2/sites-available/osticket-v1.10.test.conf

Here is the file osticket-v1.10.test.conf:

[codesyntax lang=”text”]

[/codesyntax]

activate it:

sudo a2ensite osticket-v1.10.test

Restart/reload the server:

sudo systemctl reload apache2

Insert osticket-v1.10.test in my local host:

sudo gedit /etc/hosts

Here is the entry that need to be put in:

127.0.0.1 osticket-v1.10.test

Restart/reload the server:

sudo systemctl reload apache2

Change the files & dir permission:
satria@teddy:~/Documents/projects/osticket-v1.10$ sudo chmod -R 777 .

I need to install some php 7.4 extensions missing:
sudo apt install php7.4-imap && sudo apt install php7.4-apcu

Now the site is http://osticket-v1.10.test
SETUP:
rename/copy
from:
/home/satria/Documents/projects/osticket-v1.10/upload/include/ost-sampleconfig.php
to:
/home/satria/Documents/projects/osticket-v1.10/upload/include/ost-config.php

create a new database : osticket_110

set user account
username: adminOT
password: adminOT

after the successful installation:
satria@teddy:~/Documents/projects/osticket-v1.10$ sudo chmod 0644 upload/include/ost-config.php

Your osTicket URL:
http://osticket-v1.10.test/

Your Staff Control Panel or admin:
http://osticket-v1.10.test/scp

after the admin login, I got ‘Valid CSRF Token Required’
SOLUTION:
REF: https://stackoverflow.com/questions/41542268/valid-csrf-token-required-in-osticket-after-login
in include/class.ostsession.php

Just add this line:

$this->data->session_data = “”;
After:

catch (DoesNotExist $e) {
$this->data = new SessionData([‘session_id’ => $id]);
}

So it will be:

catch (DoesNotExist $e) {
$this->data = new SessionData([‘session_id’ => $id]);
$this->data->session_data = “”;
}

Then try to login from scratch, don’t just refresh the submission.

Install osTicket 1.18.1

LOCAL SETUP (I uses PHP 8.2)
[codesyntax lang=”bash”]

[/codesyntax]

I tried to setup a virtualhost:

sudo gedit /etc/apache2/sites-available/osticket-v1.18.1.test.conf

Here is the file osticket-v1.18.1.test.conf:

[codesyntax lang=”text”]

[/codesyntax]

activate it:

sudo a2ensite osticket-v1.18.1.test

Restart/reload the server:

sudo systemctl reload apache2

Insert osticket-v1.18.1.test in my local host:

sudo gedit /etc/hosts

Here is the entry that need to be put in:

127.0.0.1 osticket-v1.18.1.test

Restart/reload the server:

sudo systemctl reload apache2

Change the files & dir permission:
satria@teddy:~/Documents/projects/osticket-v1.18.1$ sudo chmod -R 777 .

I need to install some php 8.2 extensions missing (if not exist):
sudo apt install php8.2-imap && sudo apt install php8.2-apcu

Now the site is http://osticket-v1.18.1.test
SETUP:
rename/copy
from:
/home/satria/Documents/projects/osticket-v1.18.1/osticket-v1.18.1/upload/include/ost-sampleconfig.php
to:
/home/satria/Documents/projects/osticket-v1.18.1/osticket-v1.18.1/upload/include/ost-config.php

create a new database : osticket_1181

set user account
username: adminOT
password: adminOT

after the successful installation:
satria@teddy:~/Documents/projects/osticket-v1.18.1/osticket-v1.18.1/$ sudo chmod 0644 upload/include/ost-config.php

Your osTicket URL:
http://osticket-v1.18.1.test/

Your Staff Control Panel or admin:
http://osticket-v1.18.1.test/scp

THE EMAIL SETTING:

configure emails setting (http://osticket-v1.18.1.test/scp/emails.php)
Note: Create a few emails alias for satria@advchaweb.com on the hostinger like osticket1@advchaweb.com, osticket2@advchaweb.com, osticket3@advchaweb.com

Create a new email ->

Account Tab:
Email Address: osticket1@advchaweb.com
Email Name: osticket1@advchaweb.com
Department:
Priority: Normal
Help Topic:
Auto Response: (unchecked)

Remote Mailbox Tab:
Mailbox Setting:
Hostname: imap.hostinger.com
Port Number: 993
Mail Folder: INBOX
Protocol: IMAP
Authentication: Basic Authentication -> Click ‘Config’ button
–>
Email Address: satria@advchaweb.com
password: +PL5x8mQ

Email Fetching:
Status: Enable  –> to fetch the incoming email
Fetch Frequency: 15 minutes
Emails Per Fetch: 50
Fetched Emails: Archive – move to folder -> 2023OstFetched

Outgoing (SMTP) Tab:
Status: Enable –> MUST BE
Hostname: smtp.hostinger.com –> NO. USE THE smtp-relay.brevo.com SETTING BELOW
Port Number: 465
Authentication: Same as Remote Mailbox
Header Spoofing: (checked) Allow for this email

SORRY, ONLY ADMIN CAN SHOW THIS!

Install Payload CMS

Ref: https://payloadcms.com/docs/getting-started/installation

Check current node version
[codesyntax lang=”bash”]

[/codesyntax]

Use node version 20.9.0+
Check available node version
[codesyntax lang=”bash”]

[/codesyntax]

So use node stable 20.15.1
[codesyntax lang=”bash”]

[/codesyntax]

Create a new dir ‘PayloadCMS’
[codesyntax lang=”bash”]

[/codesyntax]
Install the Payload CMS (blank)
[codesyntax lang=”bash”]

[/codesyntax]

Launch the App
[codesyntax lang=”bash”]

[/codesyntax]

Open it on the browser: http://localhost:3000/
Because it’s blank, so it’ll display a message

404

This page could not be found.

Go to the admin page http://localhost:3000/admin
Note: Make sure the mongod service is already started. If not, pls start it
[codesyntax lang=”bash”]

[/codesyntax]

For the first/empty user, it’ll be redirected to http://localhost:3000/admin/create-first-user
with this form

So fill the form with your user.
for example:
email: advcha@yahoo.com
password: Admin@123

So the admin dashboard will be like this

You can add any new user and media

The Code
The config in src/payload.config.ts

Add Payload Visual Editor –> DO THIS ON THE PAYLOAD WEB TEMPLATE
Ref: https://www.npmjs.com/package/payload-visual-editor

Payload Web Template
The same steps:
[codesyntax lang=”bash”]

[/codesyntax]

Go to the dir ‘payload-web’ then run!
[codesyntax lang=”bash”]

[/codesyntax]

Open it in your browser: http://localhost:3000

The admin : http://localhost:3000/admin
For the first/empty user, it’ll be redirected to http://localhost:3000/admin/create-first-user
So fill the form with your user.
for example:
email: advcha@yahoo.com
password: Admin@123
Name: Admin

So it’ll be like this

We can generate the example content by clicking ‘Seed your database’ –> ONLY ONCE
on the admin dashboard http://localhost:3000/admin

So the homepage will be like this

 

Add Payload Visual Editor
Ref: https://www.npmjs.com/package/payload-visual-editor
Install
[codesyntax lang=”bash”]

[/codesyntax]
then modify the plugin config (NOT IN src/payload.config.ts BECAUSE IT’S ALREADY LINKED TO src/plugins/index.ts
like this:
[codesyntax lang=”javascript”]

[/codesyntax]

But when I opened http://localhost:3000/admin, it showed this error
Failed to compile
[codesyntax lang=”text”]

[/codesyntax]

it seems visual editor can’t work with payload cms version 3.x

INSTALL Payload CMS version 2
Ref: https://payloadcms.com/docs/v2/getting-started/installation
To find out the payload cms package for npx, pls see https://www.npmjs.com/package/create-payload-app?activeTab=versions
actually there is no the package written for 2.x but there is a another package not 3.x. it’s 1.1.0. So use this
[codesyntax lang=”bash”]

[/codesyntax]

note: this is actually payload cms version 2. you can see it in the dependencies in  package.json file
[codesyntax lang=”javascript”]

[/codesyntax]

then go to the dir and run!
Note: don’t forget to start mongod service if it’s not a;ready started!
sudo service mongod start
if you need pnpm instead of npm, install it like this
npm install -g pnpm

[codesyntax lang=”bash”]

[/codesyntax]

We can generate the example content by clicking ‘Seed your database’ –> ONLY ONCE
on the admin dashboard http://localhost:3000/admin

Add Payload Visual Editor
Ref: https://www.npmjs.com/package/payload-visual-editor
[codesyntax lang=”bash”]

[/codesyntax]

modify src/payload/payload.config.ts
[codesyntax lang=”javascript”]

[/codesyntax]
note: can’t use [COLLECTION_SLUG] and [GLOBAL_SLUG] because they are defined. So add ‘pages’ and ‘posts’ (probably ‘projects’ as well)
but the previewUrl() still show 404 on the admin visual editor

Create a Self-Signed SSL Certificate for Apache in Ubuntu 22.04

Ref: https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-22-04

1. open up the firewall ufw for the http and https ports:
[codesyntax lang=”bash”]

[/codesyntax]

2. enable mod_ssl
[codesyntax lang=”bash”]

[/codesyntax]

3. Creating the TLS Certificate
[codesyntax lang=”bash”]

[/codesyntax]

4. Configuring Apache to Use TLS
[codesyntax lang=”bash”]

[/codesyntax]

the config file like this
[codesyntax lang=”php”]

[/codesyntax]
don’t forget to reload/restart apache2 service

5. Now load your site in a browser, being sure to use https:// at the beginning.

You should see an error. This is normal for a self-signed certificate! The browser is warning you that it can’t verify the identity of the server, because our certificate is not signed by any of its known certificate authorities. For testing purposes and personal use this can be fine. You should be able to click through to advanced or more information and choose to proceed.

Install Flutter and Android Studio on Ubuntu 22.04

Ref: https://docs.flutter.dev/get-started/install/linux/android

Development tools

To develop Flutter on Linux:

1. Verify that you have the following tools installed: bash, file, mkdir, rm, which

2. Install the following packages: curl, git, unzip, xz-utils, zip, libglu1-mesa

3. To develop Android apps:
a. Install the following prerequisite packages for Android Studio.

b. Install Android Studio 2023.3.1 (Jellyfish) or later to debug and compile Java or Kotlin code for Android. Flutter requires the full version of Android Studio.
download and install the latest android studio from https://developer.android.com/studio

If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:

read the installation note on https://developer.android.com/studio/install#linux

Extract the downloaded file:

Move to the android-studio directory:

Run Android Studio:
Navigate to the bin directory and run the installer:

Use VS Code to install Flutter

To install Flutter using these instructions, verify that you have installed Visual Studio Code 1.77 or later and the Flutter extension for VS Code.

Prompt VS Code to install Flutter
#
Launch VS Code.
To open the Command Palette, press Control + Shift + P.
In the Command Palette, type flutter.
Select Flutter: New Project.
VS Code prompts you to locate the Flutter SDK on your computer.

 

If you have the Flutter SDK installed, click Locate SDK.
If you do not have the Flutter SDK installed, click Download SDK.

This option sends you the Flutter install page if you have not installed Git as directed in the development tools prerequisites.
When prompted Which Flutter template?, ignore it. Press Esc. You can create a test project after checking your development setup.

INSTALL CMAKE (ALSO FOR LINUX APP)
sudo apt install cmake

Launching lib/main.dart on Linux in debug mode…

CMake Error: CMake was unable to find a build program corresponding to “Ninja”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

Error: Unable to generate build files

INSTALL NINJA BUILD
sudo apt install ninja-build

Launching lib/main.dart on Linux in debug mode…

CMake Error at /usr/share/cmake-3.22/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):

Could not find compiler set in environment variable CXX:

clang++.

Call Stack (most recent call first):

CMakeLists.txt:3 (project)

2

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

Error: Unable to generate build files

ALSO
satria@teddy:/opt/android-studio/bin$ sudo apt-get install \
clang cmake git \
ninja-build pkg-config \
libgtk-3-dev liblzma-dev \
libstdc++-12-dev
BUT GOT

libbrotli-dev : Depends: libbrotli1 (= 1.0.9-2build6)
SOLUTION:

THEN RE-RUN:
satria@teddy:/opt/android-studio/bin$ sudo apt-get install \
clang cmake git \
ninja-build pkg-config \
libgtk-3-dev liblzma-dev \
libstdc++-12-dev

Julia On Ubuntu 22.04

Ref: https://julialang.org/downloads/

Download the latest binary for Ubuntu 22.04

Update the system

Check it out

 

Setup Sendmail on Ubuntu 20.04 Localhost and Use Gmail SMTP

READ: https://linuxconfig.org/configuring-gmail-as-sendmail-email-relay

SET APP PASSWORD ON GMAIL:
https://wpmailsmtp.com/gmail-less-secure-apps/#:~:text=What%20Is%20Less%20Secure%20Apps,with%20this%20setting%20turned%20on.

SORRY, ONLY ADMIN CAN SHOW THIS!
Modified php.ini in /etc/php/7.4/apache2

RESTART APACHE2

THE SEND EMAIL TOOK A LONG TIME ON LOCAL.
STOP SENDMAIL SERVICE IF NEEDED

Install Shopware 6

Read: https://websiteforstudents.com/install-shopware-on-ubuntu-16-04-18-04-with-apache2-mariadb-and-php-7-1/
https://docs.shopware.com/en/shopware-6-en/tutorials-and-faq/virtual-box-setup#configuration-of-apache

Download the software (community edition) on https://www.shopware.com/en/download/#shopware-6
Extract it on the web root in ‘shopware6’ directory

Create Apache2 Setting
CREATE A CONF

CONTENT

ENABLE THE VIRTUALHOST

RELOAD APACHE2

CREATE THE HOST

SET THE FILE PERMISSIONS & RELOAD APACHE2

OPEN IT ON YOUR BROWSER: http://shopware6.test/
For the first time, It’d be redirected to http://shopware6.test/recovery/install/index.php THEN Continue and Check if the server requirements are met. If not change php.ini file –> check it on http://localhost/phpinfo.php
it’s at /etc/php/7.4/apache2/php.ini

THEN CHANGE PHP7.4 APACHE2 SETTING:

CHANGE THE CONTENT:

THEN RESTART APACHE2 SERVICE:

CREATE A DATABASE ‘shopware6’ WITH utf8mb4_unicode_520_ci
CREATE A NEW ADMIN USER:
User: admin
Pass: Admin123

RESULT:
STORE URL: http://shopware6.test/
ADMIN URL: http://shopware6.test/admin#/

Install Magento 2.4.0 on Ubuntu 18.04

Ref: https://www.rosehosting.com/blog/how-to-install-magento-2-4-with-lemp-stack-on-ubuntu-20-04/

Requirements: PHP7.4, Nginx/Apache2, MySQL, ElasticSearch

CHECK PHP VERSION. IF NOT PHP7.4, INSTALL/CHANGE IT TO 7.4

FIND OUT IF THERE IS PHP7.4 INSTALLED OR NOT

IT SEEMS I HAVEN’T INSTALLED PHP7.4 YET (BUT I FOUND IT ON /etc/php/7.4). IT MEANS IT ALREADY INSTALLED BUT IT DIDN’T HAVE THE OTHERS MODULES (PHP-FPM, ETC). SO INSTALL THEM

NOTE: I HAVE TO INSTALL THEM VIA TELKOMSEL FLASH BECAUSE INDIHOME CAN’T INSTALL THEM!
CHECK AGAIN THE AVAILABLE PHP AND MAKE SURE PHP7.4 IS INSTALLED THEN SELECT IT

NOW

THEN CHANGE PHP7.4-FPM SETTING:

CHANGE THE CONTENT:

THEN RESTART PHP7.4-FPM SERVICE:

CHECK NGINX SYNTAX: sudo nginx -t
RESTART NGINX: sudo systemctl restart nginx
OPEN IT: http://localhost/phpinfo.php (NEED TO CLEAR THE BROWSER CACHE FIRST)
IF YOU CAN’T OPEN http://localhost/phpinfo.php PROPERLY, PLS MAKE SURE THE NGINX CONFIGURATION FILE IS CORRECT

MAKE SURE THE ‘DEFAULT’ PORT IS 80 NOT 8080 AND THE PHP-FPM POINT TO PHP7.4

OKAY. DON’T FORGET TO RESTART NGINX SERVICE

THE CURRENT PHP VERSION FOR FPM IS 7.4.12

CHECK STATUS ELASTICSEARCH

IF IT’S NOT ACTIVE OR DISABLED, THE START THE SERVICE

THEN CHECK THE ELASTICSEARCH VERSION BY OPENING THE PORT 9200 ON THE BROWSER: http://localhost:9200/
HERE IS THE FINE RESULT

INSTALL MAGENTO 2.4 VIA COMMAND LINE — AVOID THIS BECAUSE SOMEHOW I GOT THE ‘DEV’ VERSION NOT STABLE VERSION. SO IT’D BE BETTER TO DOWNLOAD THE ARCHIVE HERE https://magento.com/tech-resources/download
CREATE A NEW DIR ‘magento24’ THEN USE GIT CLONE TO GET THE MAGENTO CODE (NOTE: IT TOOK A WHILE)

RUN ‘composer install’

BUT I GOT THIS ERROR

IT SEEMED I FORGOT TO INSTALL php-soap (THERE IS NO php7.4-soap). INSTALL IT

THEN ENABLE IT IN ‘/etc/php/7.4/cli/php.ini’ AND ‘/etc/php/7.4/fpm/php.ini’. FOR EXAMPLE

THEN UNCOMMENT

DON’T FORGET TO RESTART NGINX
CHECK IT

ALSO CHECK IT ON http://localhost/phpinfo.php
IF EVERYTHING ALRIGHT, RERUN ‘composer install’
IF EVERYTHING ALRIGHT, THEN CREATE A NEW DATABASE ‘magento24’ WITH COLLATION ‘utf8mb4_unicode_520_ci’ THEN RUN THIS:

MAKE SURE EVEYTHING IS FINE

Change the ownership of the magento2 directory to www-data with the following command:

THEN CREATE NGINX CONFIG FILE

The content:

Then

Then

Then insert

CHECK THE NGINX AND RESTART

IF NEEDED SET THE FILE PERMISSION and ownership

COMPILE

BUT WHEN I OPENED IT ON THE BROWSER http://magento24.test/
I GOT 404 ERROR.
FROM THE /var/log/nginx/error, I FOUND

I TRIED TO COPY index.php FILE INTO THE magento24 DIR. IT’S WORKING BUT IT FAILED TO LOAD THE STATIC FILES (CSS, JS, ETC) SO I THINK I’LL INSTALL IT VIA FILE DOWNLOADED ON https://magento.com/tech-resources/download
IT SEEMS THE COMMAND LINE INSTALLED THE DEV VERSION


INSTALL FROM THE DOWNLOADED FILE (ALSO READ http://myprojects.advchaweb.com/index.php/2019/02/26/install-magento-2-3-on-ubuntu-16-04-and-nginx/)
BUT STUCK ON http://magento24.test/setup/#/landing
CAN’T FIND ANY BUTTON TO CONTINUE!!!