Dev {Tricks}

  • Home
  • WordPress
  • OJS
  • Oxwall
  • Server and Hosting
You are here: Home / Archives for dev

June 3, 2024 by dev

Windows Apps not Working | Microsoft Apps not Working

How to run the System File Checker (SFC) to check and repair corrupted system files

System File Checker in Windows

 

  • Make sure you’ve installed the latest updates for Windows, and then restart your machine. To find out more, read Update Windows.
  • Run the Command Prompt as Administrator.
  • Then type DISM.exe /Online /Cleanup-image /Restorehealth (note the space before each “/”), and then press Enter.
    (Note: This step may take a few minutes to start and complete.)
  • After you see a message that says “The operation completed successfully,” type sfc /scannow (note the space between “sfc” and “/”) and press Enter.
  • After you see a message that says, “Verification 100% complete,” type exit and press Enter.

 

Filed Under: PC Tips and Tricks, Windows Tagged With: app issue, app not running, app problem, windows app problem

May 28, 2024 by dev

Important Visual Studio Code Extensions

Important Visual Studio Code Extensions

One Dark Pro ()
Atom’s iconic One Dark theme for Visual Studio Code

Material Icon Theme

Live Server

Auto Close Tag

Auto Rename Tag

Bootstrap 5 Quick Snippets

Bracket Pair Color DLW

C/C++ Compile Run

C/C++ Extension Pack

Filed Under: OSTAD Tagged With: VS code

April 27, 2024 by dev

Cannot Edit fstab as it is a Read-Only File

  1. How to edit read only fstab?
  2. How to edit /etc/fstab when system boots to read only file system?

Issue

/etc/fstab has been messed up. It is read-only now.

Tried

mount -o remount,rw /

Does not work

Solutions

mount -o remount,rw /dev/sda2 /

Note: Instead of /dev/sda2, use whatever the device is valid for your drive.

Filed Under: aaPanel, Almalinux, AWS, Bluehost, CentOS, CentOS Web Panel, Cloudcone, Contabo, cPanel, CyberPanel, Debian, Digitalocean, DirectAdmin, Hetzner, HostGator, Hostinger, ISPConfig, KeyHelp, Linux Distribusion, Plesk, Providers, RackNerd, Server and Hosting, Ubuntu, VPS Management, VPSDime, Web Control Panel, Webmin

April 24, 2024 by dev

How to Add Swap Space/file on CentOS 7 and CentOS 8

Before You Begin

check if your CentOS installation already has swap enabled by typing:

swapon –show

Empty output means that your system does not have swap enabled. Otherwise, swap enabled. Note that you may have multiple swap partitions and/or files.

Creating a Swap Partition

Creating a Swap File

 

First, create a file which will be used as swap space 1GB:

fallocate -l 1G /swapfile

If the fallocate utility is not available

sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576

Ensure that only the root user can read and write the swap file

chmod 600 /swapfile

Next, set up a Linux swap area on the file:

mkswap /swapfile

Run the following command to activate the swap:

swapon /swapfile

Make the change permanent by opening the /etc/fstab file:

vi /etc/fstab

and pasting the following line:

/swapfile swap swap defaults 0 0

Verify that the swap is active

swapon –show

or

free -h

Adjusting the Swappiness Value

Swappiness can have a value between 0 and 100. A low value will make the kernel to try to avoid swapping

cat /proc/sys/vm/swappiness

To set the swappiness value to 10

sysctl vm.swappiness=10

To make this parameter persistent across reboots append the following line to the /etc/sysctl.conf file:

vm.swappiness=10

Removing a Swap File #

Start by deactivating the swap space by typing:

sudo swapoff -v /swapfile

Next, remove the swap file entry /swapfile swap swap defaults 0 0 from the /etc/fstab file.

Finally, delete the actual swapfile file with rm :

sudo rm /swapfile

Filed Under: aaPanel, CentOS, CentOS Web Panel, cPanel, CyberPanel, DirectAdmin, ISPConfig, KeyHelp, Linux Distribusion, Plesk, Providers, Server and Hosting, Web Control Panel, Webmin, WHM Tagged With: swap centos, swap file

April 22, 2024 by dev

How to Create Swap Partition in CentOS 7 & CentOS 8

Swap Partition Size

RedHat

RedHat distributions should have a swap partition size of 20% of the available RAM. The minimum amount of RAM is 4GB.
CentOS

CentOS provides the following guidelines:

The swap partition should be twice the amount of RAM if the total RAM amount is below 2GB.
If you have more than 2GB of RAM, then the swap partition should be the size of RAM + 2 GB. For example, use 8GB of swap for 6GB of RAM.

Ubuntu/Debian

Ubuntu has based its swap size recommendations on the use of hibernation.

If you use hibernation, the swap partition should be the same as the amount of RAM plus the square root of the RAM amount.

If you don’t use hibernation:

For less than 1GB of RAM, the swap partition size should be at least the same as the amount of RAM and, at most, double the amount of RAM.
For more than 1GB of RAM, create a swap partition at least equal to the square root of the RAM amount and, at most, double the RAM amount.

 

swapon Command

swapon –show

Check /proc/swaps File

cat /proc/swaps

Comman to check your swap

free -h

How to Create a Swap Partition

1. Run the fdisk command for the disk you want to partition:

sudo fdisk [disk_path]

Replace [disk_path] with your disk identifier.

2. Type p and press Enter for an overview of the disk.

The output provides information about the available disk space for a new partition. If the last partition ends before the last sector of the hard drive, there is enough space to create a new partition. The output above shows the entire disk space is available for creating a new partition.

3. Type n and press Enter to create a new partition. For partition type, enter p and press Enter.

4. Set the partition number (or keep the default number 1) and press Enter to confirm.

5. Enter the first available sector for the new partition and press Enter. You can also keep the default one offered.

6. Set the last available sector for the partition. You can specify the partition size in KiB, MiB, or GiB units. We will create a swap partition of 1GiB, so the command is:

+1G

7. Press p to verify the partition creation and confirm with Enter.

8. By default, the partition type is 83, while 82 is a partition type identifier for swap space.

Type t and press Enter to change the partition type. Change the value to 82 and press Enter.

9. Verify the change with p and confirm with Enter.

10. fdisk doesn’t make any changes to the disk before confirmation. To proceed with the changes, type w, and press Enter.

12. Update the partition table using the following syntax:

sudo partprobe [disk_path]

13. Use the mkswap command to format the partition for swap space. The command writes a swap signature in the partition, leaving the rest unformatted. The unformatted space stores the memory pages.

Use the following syntax to format the partition and create a swap space:

sudo mkswap [disk_path]

After formatting, the swap partition is created and ready to use.

How to Initialize/Enable a Swap Partition

3. Make Swap Persistent (Optional)

Include the partition in the /etc/fstab file to ensure the swap partition activates on boot.

vi /etc/fstab

Add the following line at the end:

/dev/sdb none swap sw 0 0

Replace /dev/sdb with the path to your swap partition.

How to Change the Size of a Swap Partition

Filed Under: CentOS, How to, Linux Distribusion, Server and Hosting, VPS Management

  • « Previous Page
  • 1
  • …
  • 5
  • 6
  • 7
  • 8
  • 9
  • …
  • 91
  • Next Page »
  • Upwork
  • Freelancer
  • Fiverr
  • Guru

www.ojsexpert.com
www.ojsdev247.com

Recent Posts

  • To get your email for castamodel.com going to the right place, you need to update your DNS settings.
  • Security and WordPress
  • ROR
  • How do we copy google form to google workspace?
  • Install ImageMagick – Almalinux
  • How to remove /public/ from URL in Laravel
  • How to install Maldet alert?
  • How to Install Maldet and Run a Scan | Maldetect
  • Where is Roundcube location on CWP control panel?
  • How To Add Node.js Projects In aaPanel?
  • SPF/DKIM/DMARC Tools
  • Associative arrays – How to loop over Associative arrays
  • Indexed Arrays. How to loop over Indexed Arrays.
  • PHP Break | Continue
  • For Loop | While Loop | Do…While Loop | Foreach Loop
  • Strict mode in PHP
  • PHP Function Return Types
  • PHP Anonymous Functions (or Closures)
  • PHP Variadic Functions
  • PHP nullable type hints

Categories

  • Affiliate Marketing (1)
  • Customization (4)
    • CSS (2)
  • Email Solutions (23)
    • FrontApp (2)
    • Google Spreadsheet (2)
    • Microsoft Outlook (1)
    • PHP Email Form (3)
    • PolyMail (2)
    • Recaptcha (1)
    • Roundcube (4)
    • Thunderbird (3)
    • WebMail (5)
  • Games (1)
  • How to (87)
  • Joomla (6)
    • Akeeba (1)
    • Fix & Tricks (3)
  • jQuery (4)
  • jQuery Plugins (4)
    • BX Slider (1)
    • Slick (1)
  • Laravel (5)
  • Marketplace (5)
  • Miscellaneous (31)
  • MultiSaaS (1)
  • OJS (56)
    • Crossref (1)
    • Help (37)
    • Installation (10)
      • Issues (5)
    • Plugins (8)
    • Scholar Indexing (2)
    • Theme (7)
      • Templates (7)
        • Frontend (6)
        • legacy (1)
    • Theme Customization (10)
    • Theme Development (14)
    • TPL CSS JS (2)
    • Upgrade (11)
  • OSTAD (17)
  • Oxwall (3)
  • Payment Methods (1)
    • Paypal (1)
  • PC Tips and Tricks (14)
    • MS Office (2)
      • PowerPoint (1)
    • Windows (4)
  • PHP Parse error (2)
  • phpBB (2)
  • Server and Hosting (213)
    • Billing and Management (10)
      • Blesta (5)
      • Boxbilling (2)
      • WHMCS (5)
    • Email (10)
      • Postfix (3)
    • Error and Fix (17)
    • FTP (2)
    • Linux Distribusion (28)
      • Almalinux (13)
      • CentOS (17)
      • Debian (21)
      • Ubuntu (19)
    • Mail Server Solusion (7)
      • iRedMain (6)
    • MySQL (12)
    • Providers (69)
      • AWS (37)
      • Bluehost (37)
      • Cloudcone (26)
      • Contabo (40)
      • Digitalocean (68)
      • Hetzner (3)
      • HostGator (36)
      • Hostinger (8)
      • RackNerd (10)
      • VPSDime (38)
    • Security (21)
      • SSH (8)
    • VPS Management (72)
    • Web Control Panel (147)
      • aaPanel (14)
      • CentOS Web Panel (46)
      • cPanel (33)
      • CyberPanel (7)
      • DirectAdmin (96)
        • Find & fix (38)
      • ISPConfig (17)
      • KeyHelp (7)
      • Plesk (26)
      • Webmin (25)
        • Usermin (2)
        • Virtualmin (13)
      • WHM (18)
  • Uncategorized (19)
  • Wordpress (89)
    • Elementor (2)
    • Find and Fix (11)
    • Functions (5)
    • Genesis (9)
    • Glossary (1)
    • How to (22)
    • Neuron TD (15)
      • Console Error (1)
      • functions (5)
        • register_post_type (1)
        • register_sidebar (1)
        • theme_files (1)
        • theme_supports (1)
      • Image Directory (1)
      • Menu (2)
      • Query (4)
    • Plugins (13)
      • Contact Form 7 (5)
      • Duplicator (1)
      • Essential Grid (2)
    • Softaculous (3)
    • Speed and Security (4)
    • Stock Theme Development (6)
      • Header Footer (1)
      • PHP (1)
      • VC (1)
    • Theme Development (2)
      • Issues (1)
      • Menu (1)
    • Timer Theme Development (3)
    • Update (2)
    • Woocommerce (2)
    • WP Basic Guideline (8)

Important DEV links

  • Premium Themes
    • Themeforest
    • Envato Market
  • Built With (What Theme is That?)
    • What WP theme is that
    • Joomla Template Detector
    • Drupal Template Detector
    • Prestashop Template Detector
    • Shopify Theme Detector
    • Squarespace Template Detector
    • OpenCart Detector
    • WordPress.com Theme Detector
  • Domain/IP history checker
    • Who IS request
    • Hosting Info
  • Check DNS Propagation
    • DNS Checker
    • intoDNS
  • What is my IP
    • What is My IP Address
    • What is My IP
    • IP location
    • What is My IP
    • Porkbun
  • SEO Tools
    • Visitor Traffic
    • Broken Link
    • Website Speed Test
      • SEMrush
      • GTmetrix
      • Pingdom
      • PageSpeed Insights
      • DebugBear
      • keyCDN
  • Photo Image
    • Remove Background 50 Free Preview Image 375 × 666 per month
  • Domain Registrars
    • 123-Reg
    • Porkbun
    • Freenom
    • Namecheap NEWCOM598
  • Hosting Providers
    • Bluehost
    • Hostgator
    • Inmotion
  • Hosting Control Panel
    • CWPpro (FREE)
    • DirectAdmin (Trial 60 Days, One account $2/month)
    • ISPConfig (Free)
  • Webmaster Tools
    • Google
    • Bing
    • Yandex
  • Miscellaneous
    • Time Calculator

 

Categories

  • Affiliate Marketing (1)
  • Customization (4)
    • CSS (2)
  • Email Solutions (23)
    • FrontApp (2)
    • Google Spreadsheet (2)
    • Microsoft Outlook (1)
    • PHP Email Form (3)
    • PolyMail (2)
    • Recaptcha (1)
    • Roundcube (4)
    • Thunderbird (3)
    • WebMail (5)
  • Games (1)
  • How to (87)
  • Joomla (6)
    • Akeeba (1)
    • Fix & Tricks (3)
  • jQuery (4)
  • jQuery Plugins (4)
    • BX Slider (1)
    • Slick (1)
  • Laravel (5)
  • Marketplace (5)
  • Miscellaneous (31)
  • MultiSaaS (1)
  • OJS (56)
    • Crossref (1)
    • Help (37)
    • Installation (10)
      • Issues (5)
    • Plugins (8)
    • Scholar Indexing (2)
    • Theme (7)
      • Templates (7)
        • Frontend (6)
        • legacy (1)
    • Theme Customization (10)
    • Theme Development (14)
    • TPL CSS JS (2)
    • Upgrade (11)
  • OSTAD (17)
  • Oxwall (3)
  • Payment Methods (1)
    • Paypal (1)
  • PC Tips and Tricks (14)
    • MS Office (2)
      • PowerPoint (1)
    • Windows (4)
  • PHP Parse error (2)
  • phpBB (2)
  • Server and Hosting (213)
    • Billing and Management (10)
      • Blesta (5)
      • Boxbilling (2)
      • WHMCS (5)
    • Email (10)
      • Postfix (3)
    • Error and Fix (17)
    • FTP (2)
    • Linux Distribusion (28)
      • Almalinux (13)
      • CentOS (17)
      • Debian (21)
      • Ubuntu (19)
    • Mail Server Solusion (7)
      • iRedMain (6)
    • MySQL (12)
    • Providers (69)
      • AWS (37)
      • Bluehost (37)
      • Cloudcone (26)
      • Contabo (40)
      • Digitalocean (68)
      • Hetzner (3)
      • HostGator (36)
      • Hostinger (8)
      • RackNerd (10)
      • VPSDime (38)
    • Security (21)
      • SSH (8)
    • VPS Management (72)
    • Web Control Panel (147)
      • aaPanel (14)
      • CentOS Web Panel (46)
      • cPanel (33)
      • CyberPanel (7)
      • DirectAdmin (96)
        • Find & fix (38)
      • ISPConfig (17)
      • KeyHelp (7)
      • Plesk (26)
      • Webmin (25)
        • Usermin (2)
        • Virtualmin (13)
      • WHM (18)
  • Uncategorized (19)
  • Wordpress (89)
    • Elementor (2)
    • Find and Fix (11)
    • Functions (5)
    • Genesis (9)
    • Glossary (1)
    • How to (22)
    • Neuron TD (15)
      • Console Error (1)
      • functions (5)
        • register_post_type (1)
        • register_sidebar (1)
        • theme_files (1)
        • theme_supports (1)
      • Image Directory (1)
      • Menu (2)
      • Query (4)
    • Plugins (13)
      • Contact Form 7 (5)
      • Duplicator (1)
      • Essential Grid (2)
    • Softaculous (3)
    • Speed and Security (4)
    • Stock Theme Development (6)
      • Header Footer (1)
      • PHP (1)
      • VC (1)
    • Theme Development (2)
      • Issues (1)
      • Menu (1)
    • Timer Theme Development (3)
    • Update (2)
    • Woocommerce (2)
    • WP Basic Guideline (8)
  • Home
  • WordPress
  • OJS
  • Oxwall
  • Server and Hosting

Copyright © 2025 · Executive Pro Theme on Genesis Framework · WordPress · Log in