aizu's Knowledge Base
    • Go to: aizu.my Homepage
    • Recent
    • Tags
    • Register
    • Login
    1. Home
    2. aizu
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 74
    • Posts 87
    • Best 0
    • Controversial 0
    • Groups 1

    aizu

    @aizu

    administrators

    0
    Reputation
    1
    Profile views
    87
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    aizu Unfollow Follow
    administrators

    Latest posts made by aizu

    • RE: PM2 for NextJS - ecosystem file

      pm2 start npm --name "your-app-name-3000" -- run start

      posted in Linux
      A
      aizu
    • RE: Mongodb in Ubuntu 20.04 Installation - working as on Jan 2023

      Installation working as on March 2025 on Ubuntu 24.04

      posted in Linux
      A
      aizu
    • RE: mysql - snippets
      CREATE USER 'admin'@'localhost' IDENTIFIED BY 'the_secure_password';
      GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
      FLUSH PRIVILEGES;
      
      posted in Linux
      A
      aizu
    • NodeJS - ERR_OSSL_EVP_UNSUPPORTED error
      export NODE_OPTIONS=--openssl-legacy-provider
      

      Ref: https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported

      posted in Linux
      A
      aizu
    • RE: nginx conf - sample

      redirect

      server {
        server_name .mydomain.example;
        rewrite ^ http://www.adifferentdomain.example$request_uri? permanent;
      }
      

      or on any version 0.9.1 or higher:

      server {
        server_name .mydomain.example;
        return 301 http://www.adifferentdomain.example$request_uri;
      }
      

      HTTP redirect:

      • 301 (permanent)
      • 302 (temporary)
      posted in Linux
      A
      aizu
    • Linode - disable ipv6

      Check IP

      ip a
      

      File: /etc/sysctl.conf

      net.ipv6.conf.all.disable_ipv6 = 1
      net.ipv6.conf.default.disable_ipv6 = 1
      net.ipv6.conf.lo.disable_ipv6 = 1
      

      Reload sysctl

      sysctl -p /etc/sysctl.conf
      
      posted in Linux
      A
      aizu
    • Softether - Linux

      Install server

      Download here: https://www.softether-download.com/en.aspx?product=softether

      apt-get update
      apt-get upgrade
      apt-get install build-essential
      
      wget "https://www.softether-download.com/files/softether/v4.43-9799-beta-2023.08.31-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.43-9799-beta-2023.08.31-linux-x64-64bit.tar.gz"
      
      tar -zxvf softether-vpnserver-v4.43-9799-beta-2023.08.31-linux-x64-64bit.tar.gz
      cd vncserver
      make main
      
      posted in Linux
      A
      aizu
    • S3 - Bucket Policy - ACL - for public
      {
          "Version": "2008-10-17",
          "Statement": [
              {
                  "Sid": "AllowPublicRead",
                  "Effect": "Allow",
                  "Principal": {
                      "AWS": "*"
                  },
                  "Action": "s3:GetObject",
                  "Resource": "arn:aws:s3:::BUCKET_NAME/*"
              }
          ]
      }
      
      posted in Ref
      A
      aizu
    • docker build for ECR

      1. build

      docker build -t nextjs-app .
      
      aws ecr get-login-password --region ap-southeast-1
      

      Then it will come out the password

      2. login

      docker login -u AWS -p somePassword 123456789012.dkr.ecr.us-east-1.amazonaws.com
      

      3. tag

      docker tag nextjs-app:latest 123456789012.dkr.ecr.us-east-1.amazonaws.com/nextjs-app:latest
      

      4. push

      docker push 123456789012.dkr.ecr.us-east-1.amazonaws.com/nextjs-app:latest
      

      Below example for docker login stdin with aws get password

      aws ecr get-login-password --region ap-southeast-1 | docker login -u AWS --password-stdin 123456789012.dkr.ecr.us-east-1.amazonaws.com
      posted in Linux
      A
      aizu
    • EC2 - increase storage without turn off instance

      To increase the space on your AWS instance, follow these steps:

      1. Check the Available Storage:
      Before expanding, verify the disk space:

      df -h
      

      2. Identify the Volume:
      Find the attached volumes for your EC2 instance:

      Go to the EC2 Console.
      Under Elastic Block Store (EBS), select Volumes.
      Identify the volume attached to your instance.

      3. Modify the EBS Volume:
      Select the volume you want to expand.
      Click on Actions → Modify Volume.
      Increase the size of the volume (e.g., from 8 GB to 20 GB).
      Click Modify.

      4. Extend the Partition on the EC2 Instance:
      After the volume is resized, you'll need to extend the file system to use the new space.

      For ext4 file system:
      Verify the volume size:

      lsblk
      

      Make sure the resized volume reflects the correct size.
      Extend the file system:

      sudo growpart /dev/nvme0n1 1
      sudo resize2fs /dev/nvme0n1p1
      

      For xfs file system:
      Extend the file system:

      sudo xfs_growfs -d /
      

      5. Verify the Increased Space:
      Check the disk space again:

      df -h
      

      This process will allow you to increase the disk space without stopping the instance.

      To check partition type

      lsblk -f
      
      posted in Linux
      A
      aizu