Monday, October 24, 2022

Fix apache2 server down issue for BITNAMI platform

 1)When you load your bitnami Magento website in the AWS LAMP stack, and the   website shows connection timed out error, we need check for the error.log files

2) open the file using the command

                $sudo nano /var/log/apache2/error.log file 


if we find error "Resource temporarily unavailable: AH00480: apr_thread_create: unable to create worker thread", then apply the below command

         $sudo systemctl set-property apache2.service TasksMax=infinity

Sunday, October 23, 2022

FIX Composer detected issues in your platform:

 Your Composer dependencies require a PHP version ">= 7.3.0"

Already installed the correct php version:

Then you can fix using:


  1. TIPS

    Add this lines in composer.json file:

    {
        "config": {
    
            "platform-check": false
        }
    }
    

    Or set the version:

    {
        "config": {
    
            "platform": {
                "php": "7.1.0"
            }
        }
    }
    
  2. run php artisan config:cache

  3. then run composer dump-autoload in terminal

     4. rm -rf vendor

    5. composer install

Wednesday, October 19, 2022

RECOVER MYSQL. IF MYSQL COULD NOT BE STARTED

 <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5232258871649572"
     crossorigin="anonymous"></script>


 
1)The MySQL database is configured to use InnoDB engine by default. 
You can add the innodb_force_recovery=1 option in the main MySQL configuration file at /opt/bitnami/mysql/etc/my.cnf to try and fix the database:
                [mysqld]
          innodb_force_recovery = 1
2) Start the MySQL database with the following command:
 mysqld --skip-grant-tables --user=mysql --skip-external-locking --port=3306 --sock=/opt/bitnami/mysql/tmp/mysql.sock
 
3)mysql -u root -p
 
4)o not forget to remove the innodb_force_recovery option from the my.cnf file and restart the MySQL server again  
5)If they show any permission issue use
 sudo chown mysql:root -R /opt/bitnami/mysql/data chmod 1777 /tmp  
 
To find error logs:
 cd /var/log/apache2 
References 
 https://docs.bitnami.com/aws/infrastructure/mysql/administration/recover-database-mysql/        
 


Tuesday, October 18, 2022

Disk space issue- Linux commands

To know disk space

df -h

 follow a top-down approach by looking at the inode count for each main folder, and then drill down to the directory that consumes the most inodes

            find /var -xdev -printf '%h\n' | sort | uniq -c | sort -k1 -rn

 

Once we know the top folders that contributed to the disk overage, we can then drill down to weed out those that are not needed.

 

 du -hm --max-depth=1 | sort -kl,l -nr

 cd /opt/bitnami/magento/htdocs

sudo rm -rf var/cache/*

 sudo rm -rf var/log

sudo rm -rf var/page_cache/*

sudo /opt/bitnami/ctlscript.sh start


bitnami@ip-172-31-88-222:/opt/bitnami/mysql$  sudo chown mysql:root -R /opt/bitnami/mysql/data


Sunday, October 16, 2022

Steps to fix, npm install integrity error

 

npm ERR! code EINTEGRITY
npm ERR! sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== integrity checksum failed when using sha512: wanted sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== but got sha512-WXI95kpJrxw4Nnx8vVI90PuUhrQjnNgghBl5tn54rUNKZYbxv+4ACxUzPVpJEtWxKmeDwnQrzjc0C2bYmRJVKg==. (65117 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2017-11-29T05_33_52_182Z-debug.log 
 
                         sudo npm i -g npm
                         rm -rf node-moules 
                         rm package-lock.json
                         npm cache --clear force
                         npm i
                         ng build
                         ng serve 
-------------------------------------------------------------
 Solution for all npm ERR! code EINTEGRITY errors 🙏

$ cd <project_directory>
$ rm -rf package-lock.json npm-shrinkwrap.json node_modules
$ npm cache clean --force
$ npm cache verify
$ npm install

Best Malware removal software for wordpress website

 Best WordPress Malware Removal Service Online

Comodo cWatch Website Malware Scanner
This website malware removal tool is on the top of our list because of its innovative security specifications that make malware removal an enjoyable task. It met all of the factors we took into consideration: ease of use, threat detection and response, extensive reporting capabilities and minimal impact on business productivity.

Some Features:
24/7 Website Surveillance
Superior Threat Investigation Capabilities
CDN (Content Delivery Network) which ensures high website availability
Efficient SIEM (Security Information and Event Management) System
PCI Compliant Scanning Tool

 

https://cwatch.comodo.com/cwatch-plans.php?track=10353&af=7639

Tuesday, October 4, 2022

Steps to install clamAV antivirus in ubuntu

 

sudo apt-get install clamav
enter the root password and ‘Y’ when you see a prompt to complete the installation.
 

sudo /etc/init.d/clamav-freshclam stop 
 
sudo freshclam
 
sudo /etc/init.d/clamav-freshclam start
 
man clamav
cd /var/www/html/folder 
 clamscan -i -r ~/ 
 
 clamscan --remove=yes -i -r ~/ 
Reference:
https://www.fosslinux.com/2808/how-to-clean-virus-by-command-line-scan-in-ubuntu-linux-mint.htm 

Tuesday, July 19, 2022

Procedure to install Adminer on Ubuntu 20.04 Linux server

 

Procedure to install Adminer on Ubuntu 20.04 Linux server

  1. Update your Ubuntu server running sudo apt update && sudo apt upgrade
  2. Make sure Apache server installed and configured on Ubuntu
  3. Install Adminer by typing the sudo apt install adminer command.
  4. Enable configuration, run: sudo a2enconf adminer
  5. Log in and start accessing database using https://your-domain/adminer/ URL.

 

 

Reference:

https://www.cyberciti.biz/faq/how-to-install-adminer-on-ubuntu-20-04-lts/

Tuesday, June 7, 2022

Steps to install Composer ubuntu 20.4

 

sudo apt-get remove composer
  • Download the installer to the current directory
    • php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

       
  • Verify the installer SHA-384, which you can also https://getcomposer.org/download/
    php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
  • Run the installer
    • php composer-setup.php 
       
      Remove the installer

php -r "unlink('composer-setup.php');"
 sudo apt install composer
Refderences:
https://getcomposer.org/download/ 
 
sudo composer self-update 
-------------------------------------------------------------------------------
composer install error
 
  1. sudo apt install wget php-cli php-zip unzip
  2. php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  3. HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
  4. php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer verified
  1. sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
All settings correct for using Composer
Downloading...
Composer (version 2.0.14) successfully installed to: 
/usr/local/bin/composer
Use it: php /usr/local/bin/composer
 

Wednesday, June 1, 2022

To remove packages that have dpkg congigure issues

 REMOVE

sudo apt-get autoremove "NAME OF PACKAGE HERE"
 RECONFIGURE
sudo dpkg-reconfigure -phigh -a
 
  

Install PHP 7.4 in ubuntu 20.04

1)sudo apt update


2)sudo apt install php7.4


3)sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y

Monday, May 30, 2022

Permissions for ssh folder in ubuntu

1)  chmod 600 ~/.ssh/id_rsa

2)  chmod 644 ~/.ssh/id_rsa.pub

3) chmod 700 ~/.ssh

4) chmode 400 file.pem

Monday, May 16, 2022

Install Teamviewer in Ubuntu

 1) wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb


2) sudo apt install ./teamviewer_amd64.deb


3)To launch type "teamviewer" in the command line