Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, May 23, 2025

Ubuntu : Repository URLs for ‘sources.list’ File

Before modifying the sources.list
- create a backup using: sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

To to change repository sources
- sudo vi /etc/apt/sources.list OR sudo vi /etc/apt/sources.list.d/ubuntu.sources (latest Ubuntu version)


Long-Term Support (LTS) Versions Repo URLs

Ubuntu 24.04 LTS “Noble Numbat”
Types: deb deb-src
URIs: http://us.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports noble-proposed
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb deb-src
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Ubuntu 22.04 LTS “Jammy Jellyfish”

deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ jammy partner
# deb-src http://archive.canonical.com/ubuntu/ jammy partner


Ubuntu 20.04 LTS “Focal Fossa”
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner

Ubuntu 18.04 LTS “Bionic Beaver”
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse

Ubuntu 16.04 LTS “Xenial Xerus”
deb http://archive.ubuntu.com/ubuntu xenial main
deb http://archive.ubuntu.com/ubuntu xenial-updates main
deb http://archive.ubuntu.com/ubuntu xenial restricted
deb http://archive.ubuntu.com/ubuntu xenial-updates restricted
deb http://archive.ubuntu.com/ubuntu xenial universe
deb http://archive.ubuntu.com/ubuntu xenial-updates universe
deb http://archive.ubuntu.com/ubuntu xenial multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main
deb http://archive.ubuntu.com/ubuntu xenial-security restricted
deb http://archive.ubuntu.com/ubuntu xenial-security universe
deb http://archive.ubuntu.com/ubuntu xenial-security multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main
deb http://archive.ubuntu.com/ubuntu xenial-backports restricted
deb http://archive.ubuntu.com/ubuntu xenial-backports universe
deb http://archive.ubuntu.com/ubuntu xenial-backports multiverse
deb http://archive.canonical.com/ubuntu xenial partner

Tuesday, December 31, 2024

Install Oracle Instant Client (oci8) for PHP5.6 on Ubuntu 22.04

*make sure php5.6 is already install

1. Install Basic and the SDK Instant Client packages. Download from OTN

Download version 12.1.0.2.0. This file is required:

  • instantclient-basic-linux.x64-12.1.0.2.0.zip
  • instantclient-sdk-linux.x64-12.1.0.2.0.zip

2. Install OCI8 version oci8-2.0.10. Download from pecl.php.net

3. Manual install OCI8 

#tar -xzf oci8-2.0.10.tgz
#cd oci8-2.0.10
#phpize
#./configure -with-oci8=share,instantclient,/usr/lib/oracle/12.1/client64/lib
#make install

4. Enable the ORACLE global variables

#export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
#export ORACLE_HOME=/usr/lib/oracle/12.1/client64 

5. Enable oci8 in php5.6

  • create file oci.ini in /etc/php/5.6/mods-available/
  • add the extension=oci8.so to the oci.ini

6. Create symlink in php5.6 folder

#ln -s /etc/php/5.6/mods-available/oci.ini 20-oci.ini in folder /etc/php/5.6/cli/conf.d
#ln -s /etc/php/5.6/mods-available/oci.ini 20-oci.ini in folder /etc/php/5.6/fpm/conf.d

7. Validate that it was successfully installed.

#php -i | grep oci8 

Friday, October 20, 2023

Ubuntu : Static IP Ubuntu 22.04

Disable Cloud
#sudo vi /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg 
network: {config: disabled}
 
Config static IP 

#sudo vi /etc/netplan/xxxx.yaml

network:
  ethernets:
    ens160:
      addresses: [192.168.0.7/24]
      routes:
        - to: default
          via: 192.168.0.253
          metric: 100
      nameservers:
          addresses: [8.8.8.8,8.8.4.4]
          search: [malayahost.com]
      dhcp4: false
  version: 2

Apply config
#sudo netplan apply
#ip add show
#ip route show 

 

Friday, May 12, 2023

Ubuntu : Extending LVM Volume

1. Check for free space by running. #cfdisk

  • see if there is free space listed, can proceed to step 2
  • if don’t see free space listed, initiate a rescan of /dev/sda
  • #echo 1>/sys/class/block/sda/device/rescan
  • once done, re-run #cfdisk 

2. Select which partition to extending. Example - /dev/sda3 partition from the list and then select “Resize

3. ENTER and it will prompt to confirm the new size. Now /dev/sda3 partition with a new larger size.

4. LVM partition backing the  /dev/sda3 Physical Volume (PV) has been extended. Then need to extend PV

  • #pvresize /dev/sda3 -> 
  • #pvdisplay - to check the new size
  • #vgdisplay - check the Volume Group (VG) free space
  • #lvdisplay - check the size of our upstream Logical Volume (LV)
  • #lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
  • #df -h - check current size of the file system
  • #resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv 
  • (centos) #xfs_growfs /dev/mapper/xxxx/xxxx

 

 Source : https://packetpushers.net/ubuntu-extend-your-default-lvm-space/ 

Tuesday, March 28, 2023

Note : The list required to install and configure

 Checklist to activate hosting server (php, laravel and sql server)

  1. Install Virtualmin
  2. Upgrade PHP8.1 or latest
  3. To connect with Oracle DB - install OCI8
  4. To connect with MSSQL - install ODBC, sqlsrv, pdo_sqlsrv
  5. Install Laravel - install composer, npm, node

# Previous OS Centos 7 and below - install with latest OpenSSL 1.0.2k-fips
# Latest OS Rocky9.1 and above - install with latest OpenSSL 3.0

Friday, May 13, 2022

Letsencrypt : Secure Apache on Ubuntu 20.04

Let’s Encrypt is a Certificate Authority (CA) that facilitates obtaining and installing free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers.

1. Installing Certbot

#sudo apt install certbot python3-certbot-apache 

2.Checking your Apache Virtual Host Configuration

#sudo vi /etc/apache2/sites-available/your_domain.conf
#sudo apache2ctl configtest
#sudo systemctl reload apache2

3.Allowing HTTPS Through the Firewall

#sudo ufw status
#sudo ufw allow 'Apache Full'
#sudo ufw delete allow 'Apache'

4.Obtaining an SSL Certificate

#sudo certbot --apache 

5.Verifying Certbot Auto-Renewal

#sudo systemctl status certbot.timer 

- To test the renewal process
#sudo certbot renew --dry-run

source: 

- https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04

Monday, October 26, 2020

Ubuntu : Ubuntu 20.04 on ESXi Generating multipathd Errors

Issue:

Solutions:

1. Shutdown the VM
2. Edit then VM : Edit Setting > VM Options
3. Under : Advanced > Configuration Parameters > Edit

4. Add a new parameter with following properties: 

  • Key: disk.EnableUUID
  • Value: TRUE 

5. Click OK
6. Power on the VM
7. Confirm the errors have stopped in /var/log/syslog

Source : https://jc-lan.org/2020/06/03/ubuntu-20-04-on-esxi-generating-multipathd-errors/

Thursday, October 15, 2020

Ubuntu : Increase partition

 The step:

1. Mount the live iso GParted partition editor.

2. Boot the server and access the GParted.

3. GParted display the drive status and information.

4. Delete current linux-swap partition.

5. Delete extended.

 6. The unpartition drive should unallocated status.

7. Recreate linux-swap partition.

8. Click Resize/Move under the active partition.

9. Drag the Resize bar and drag to maximum size. Then click Resize/Move button.

10.After resize the partition should increase as below.

11. The resize process on going and waiting to completed.

12. If no any errors, can quit the GParted and shutdown.

13. Remove the GParted live-image and boot the server.

14. Login to server then run the #df -h

The partition now is increase.

Thursday, February 21, 2019

Thursday, November 22, 2018

Thursday, April 6, 2017

Wednesday, December 21, 2016

Thursday, July 28, 2016

Centos : How to fix boot failure due to incorrect fstab?

Solutions:

  • at the grub prompt, hit a to append options
  • add init=/bin/bash to the end of the kernel command line and press enter
The system will boot to a prompt like 'bash-3.2#' enter the following commands at the prompt
  • mount -o remount,rw /
  • vim /etc/fstab
Source:

Friday, September 18, 2015

Tuesday, June 2, 2015

Tuesday, May 19, 2015

Wednesday, December 31, 2014