Linux etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Linux etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

23 Mayıs 2021 Pazar

Linux / Change ip address in RHEL 6.1

ifconfig ile aktif kart kontrole edilip, ilgili kart üzerindeki konfig değiştirilerek network servisi restart edilir.

[root@server ~]# ifconfig

bond0        Link encap:Ethernet  HWaddr 80:RT:BA:82:44:4A

                 inet addr:192.168.11.24  Bcast:192.168.2.255  Mask:255.255.255.0

/etc/sysconfig/network-scripts/ifcfg-eth0

/etc/sysconfig/network-scripts/ifcfg-bond0

[root@server ~]# vi /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0

IPADDR=192.168.11.25

NETMASK=255.255.255.0

GATEWAY=192.168.2.1

ONBOOT=yes

BOOTPROTO=none

USERCTL=no

NM_CONTROLLED=no

TYPE=Bond

BONDING_MASTER=yes

BONDING_OPTS="mode=4 miimon=100 lacp_rate=1"

service network restart

17 Mayıs 2021 Pazartesi

Linux / Ubuntu update

Ubuntu update için aşağıdaki komutları kullanabiliriz.

root@ubuntuserver:~$ sudo apt update

Hit:1 http://tr.archive.ubuntu.com/ubuntu focal InRelease

Hit:2 http://tr.archive.ubuntu.com/ubuntu focal-updates InRelease

Hit:3 http://tr.archive.ubuntu.com/ubuntu focal-backports InRelease

Hit:4 http://tr.archive.ubuntu.com/ubuntu focal-security InRelease

Reading package lists... Done

Building dependency tree

Reading state information... Done

All packages are up to date.

root@ubuntuserver:~$ apt list --upgradable

Listing... Done


Upgrade edilebilecek paketlerin olması durumunda aşağıdaki komut ile yapılabilir.

root@ubuntuserver:~$sudo apt upgrade

11 Mayıs 2021 Salı

Linux / NFS

Linux sistemler üzerinde nfs tanımları için aşağıdaki adımları uygulayabiliriz.

SLES 15 SP2 de NFS Client kurulu geliyor, yast2 uygulaması ile NFS client ayarları yapılabilir.


systemctl status nfs-server.service

systemctl reload nfs-server.service


nfsserver:~ # rpm -qa |grep nfs

nfs-client-2.1.1-10.10.1.x86_64

yast2-nfs-client-4.2.8-1.13.noarch

nfs-kernel-server-2.1.1-10.4.1.x86_64

nfsidmap-0.26-3.3.1.x86_64

yast2-nfs-server-4.2.4-1.68.noarch

libnfs8-1.11.0-1.28.x86_64

yast2-nfs-common-4.2.4-1.68.noarch

rpm -Uhv nfs-kernel-server-2.1.1-6.10.2.x86_64.rpm

rpm -Uhv yast2-nfs-server-4.0.1-3.3.1.noarch.rpm


nfsserver:~ # cat /etc/exports

#NFS SERVER

/sapmnt         1.1.1.101(rw,root_squash,sync,no_subtree_check) 1.1.1.102(rw,root_squash,sync,no_subtree_check) 1.1.1.103(rw,root_squash,sync,no_subtree_check) 1.1.1.104(rw,root_squash,sync,no_subtree_check) 1.1.1.105(rw,root_squash,sync,no_subtree_check)

/usr/sap/trans  1.1.1.101(rw,root_squash,sync,no_subtree_check) 1.1.1.102(rw,root_squash,sync,no_subtree_check) 1.1.1.103(rw,root_squash,sync,no_subtree_check) 1.1.1.104(rw,root_squash,sync,no_subtree_check) 1.1.1.105(rw,root_squash,sync,no_subtree_check)


app1:/ # df -h -T |grep nfs

1.1.1.123:/sapmnt            nfs4      200G   13G  188G   7% /sapmnt

1.1.1.123:/usr/sap/trans     nfs4      250G  288M  250G   1% /usr/sap/trans


app1:/usr/sap/trans # ls

ls: cannot open directory '.': Permission denied


Bu hatanın çözümü için NFS server üzerindeki klasörde yetkilendirme yapıldı

---------------------------------------------------------

nfsserver:/ # ls -ld /usr/sap/trans

drwxrwx--x 13 root sapsys 147 Mar 17 14:10 /usr/sap/trans


nfsserver:/ # chmod o+rw /usr/sap/trans


nfsserver:/ # ls -ld /usr/sap/trans

drwxrwxrwx 13 root sapsys 147 Mar 17 14:10 /usr/sap/trans

-----------------------------------------------------------

app1:/usr/sap/trans # cat /etc/fstab

/dev/vg-swap/lv-swap           swap            swap  defaults  0  0

/dev/vg-system/lv-root         /               ext4  defaults  0  1

/dev/vg-usrsap/lv-usrsap       /usr/sap        xfs   defaults  0  0

UUID=A3C1-7B78                 /boot/efi       vfat  defaults  0  2


#NFS CLIENT

1.1.1.123:/usr/sap/trans  /usr/sap/trans  nfs   defaults  0  0

1.1.1.123:/sapmnt         /sapmnt         nfs   defaults  0  0

10 Mayıs 2021 Pazartesi

Linux / ISCSI disk mount

ISCSI ile login olunarak diskin mount edilmesi için aşağıdaki komutları çalıştırabiliriz.

iscsiadm -m node -l
mount /dev/dg_fd28fc2b7dc06/lv_f8dc0b3c09ad4 /app_data

2 Nisan 2021 Cuma

Linux / Ubuntu 20.10 netplan apply

Ubuntu Server 20.10 versiyonunda /etc/netplan altindaki diger dosyalardan da ip aliyor, tek bir dosya olmasi daha uygun gözüküyor.

sudo vi  /etc/netplan/00-installer-config.yaml

# This is the network config written by 'subiquity'

network:

  ethernets:

    ens160:

      addresses:

      - 192.168.x.28/24

      gateway4: 192.168.x.1

      nameservers:

        addresses:

        - 192.168.x.109

        - 192.168.x.152

        - 192.168.x.134

        search:

        - domain.com.tr

  version: 2

sudo netplan apply

root@ubuntu20:~$ lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description:    Ubuntu 20.10

Release:        20.10

Codename:       groovy

17 Mart 2021 Çarşamba

Linux / Read-only file system

Linux sistem üzerinde input/output hataları sonrasında boot problemi oluşabilir.

Bu durumda kurulum medyası ile Rescue Mode erişim yapılarak / bağlı olduğu disk bolümünde fsck yapılabilir.

Örnek:  fsck /dev/vg0/lv0

servername:/boot # ls
ls: cannot open directory '.': Input/output error

servername:/boot # cat /et-bash: cannot create temp file for here-document: Input/output error
-bash: cannot create temp file for here-document: Input/output error                                                      
servername:/ # cat /etc/os-bash: cannot create temp file for here-document: Read-only file system
-bash: cannot create temp file for here-document: Read-only file system
-bash: cannot create temp file for here-document: Read-only file system
-bash: cannot create temp file for here-document: Read-only file system

12 Mart 2021 Cuma

Linux / sudo yetkili kullanıcılar

Aşağıdaki komut ile sudo yetkili gruplar kontrol edilebilir.

[root@servername ~]# grep -v "#" /etc/sudoers |grep "ALL="
root    ALL=(ALL)       ALL
%wheel  ALL=(ALL)       ALL

Aşağıdaki komutlar ile de grup üyeleri kontrol edilebilir.

[root@servername ~]# grep "root:" /etc/group
root:x:0:root
[root@servername ~]# grep "wheel:" /etc/group
wheel:x:10:

4 Mart 2021 Perşembe

Linux / SUSE 15 SP2 upgrade

The easiest upgrade path is consecutively installing all service packs. 
For the SUSE Linux Enterprise 15 product line (GA and the subsequent service packs) it is also supported to skip one service pack when upgrading. 
For example, upgrading from SLE 15 GA to 15 SP2 or from SLE 15 SP1 to 15 SP3 is supported.




18 Kasım 2020 Çarşamba

Linux / Changing the Size of an XFS File System with xfs_growfs

The size of an XFS file system can be increased by using the xfs_growfs command when the file system is mounted. Reducing the size of an XFS file system is not possible.

servername:~ # sudo xfs_growfs -d /sapmnt

meta-data=/dev/mapper/sapmnt-lv0 isize=512    agcount=32, agsize=33554304 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0 rmapbt=0
         =                       reflink=0
data     =                       bsize=4096   blocks=1073737728, imaxpct=5
         =                       sunit=2      swidth=1024 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=521728, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 1073737728 to 1342172160

dosya sistemi 5TB a extend edilmiştir.

9 Ekim 2020 Cuma

Linux / SUSEConnect -list-extensions

 hostname:~ # SUSEConnect -list-extensions

AVAILABLE EXTENSIONS AND MODULES

    Advanced Systems Management Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-adv-systems-management/12/x86_64

    Containers Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-containers/12/x86_64

    HPC Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-hpc/12/x86_64

    Legacy Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-legacy/12/x86_64

    Public Cloud Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-public-cloud/12/x86_64

    SUSE Linux Enterprise High Availability GEO Extension 12 SP4 x86_64

    Activate with: SUSEConnect -p sle-ha-geo/12.4/x86_64 -r ADDITIONAL REGCODE

    SUSE Linux Enterprise Live Patching 12 SP4 x86_64

    Activate with: SUSEConnect -p sle-live-patching/12.4/x86_64 -r ADDITIONAL REGCODE

    SUSE Linux Enterprise Point of Service Image Server 12 SP2 x86_64

    Activate with: SUSEConnect -p sle-pos/12.2/x86_64 -r ADDITIONAL REGCODE

    SUSE Linux Enterprise Server LTSS 12 SP4 x86_64

    Activate with: SUSEConnect -p SLES-LTSS/12.4/x86_64 -r ADDITIONAL REGCODE

    SUSE Linux Enterprise Software Development Kit 12 SP4 x86_64

    Activate with: SUSEConnect -p sle-sdk/12.4/x86_64

    SUSE Linux Enterprise Workstation Extension 12 SP4 x86_64

    Activate with: SUSEConnect -p sle-we/12.4/x86_64 -r ADDITIONAL REGCODE

    SUSE Package Hub 12 SP4 x86_64

    Activate with: SUSEConnect -p PackageHub/12.4/x86_64

    Toolchain Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-toolchain/12/x86_64

    Web and Scripting Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-web-scripting/12/x86_64

MORE INFORMATION

You can find more information about available modules here:

https://www.suse.com/products/server/features/modules.html

8 Ekim 2020 Perşembe

Linux / SUSE register

SUSEConnect -r YourActivationCode -e YourEmailAddress


hostname:~ # SUSEConnect --cleanup    For register cleanup

Error: Invalid system credentials, probably because the registered system was deleted in SUSE Customer Center. 
Check https://scc.suse.com whether your system appears there. If it does not, please call SUSEConnect --cleanup and re-register this system.

hostname:~ # SUSEConnect -r YourActivationCode -e YourEmailAddress    For register

Registered SLES_SAP 12.4 x86_64

To server: https://scc.suse.com

Using E-Mail: email@domain.com

Successfully registered system.

Linux / dmidecode

Fiziksel sanal kontrolü için dmidecode uygulaması ile kontrol edebiliriz.


dmidecode | grep Product

dmidecode -t system

Linux / Storage Command Line Tool

storcli64 show all

storcli64 /c4 show all

storcli64 /c4/dall show all

storcli64 /c1/e28/s12 show rebuild


hostname:~ # storcli64

     Storage Command Line Tool  Ver 1.18.11 Feb 09, 2016

     (c)Copyright 2015, AVAGO Corporation, All Rights Reserved.

help - lists all the commands with their usage. E.g. storcli help

<command> help - gives details about a particular command. E.g. storcli add help

List of commands:

Commands   Description

-------------------------------------------------------------------

add        Adds/creates a new element to controller like VD,Spare..etc

delete     Deletes an element like VD,Spare

show       Displays information about an element

set        Set a particular value to a property

get        Get a particular value to a property

compare    Compares particular value to a property

start      Start background operation

stop       Stop background operation

pause      Pause background operation

resume     Resume background operation

download   Downloads file to given device

expand     expands size of given drive

insert     inserts new drive for missing

transform  downgrades the controller

/cx        Controller specific commands

/ex        Enclosure specific commands

/sx        Slot/PD specific commands

/vx        Virtual drive specific commands

/dx        Disk group specific commands

/fall      Foreign configuration specific commands

/px        Phy specific commands

/[bbu|cv]  Battery Backup Unit, Cachevault commands


Other aliases : cachecade, freespace, sysinfo


Use a combination of commands to filter the output of help further.

E.g. 'storcli cx show help' displays all the show operations on cx.

Use verbose for detailed description E.g. 'storcli add  verbose help'

Use 'page=[x]' as the last option in all the commands to set the page break.

X=lines per page. E.g. 'storcli help page=10'

Use J as the last option to print the command output in JSON format

Command options must be entered in the same order as displayed in the help of

the respective commands.

10 Eylül 2020 Perşembe

SUSE / Augeas parsing/serializing error

Augeas parsing/serializing error: Iterated lens matched less than it should at /usr/share/augeas/lenses/dist/hosts.aug:23.12-.42:


Resolution
Add a line break at the end of /etc/hosts as below :

echo >> /etc/hosts

Cause

The last line in /etc/hosts does not have line termination "\n".

This can be verified by doing e.g. 'cat /etc/hosts', and not seeing the bash prompt on a new line as a result.

https://www.suse.com/support/kb/doc/?id=000019057


23 Mayıs 2019 Perşembe

SUSE / Template den Yeni Sanal Makine Oluşturma

SUSE template makinesinden yeni sanal makine oluşturmak için aşağıdaki adımları kullanabiliriz.

1. SUSE_TEMP makinesi kullanılara yeni sanal makine oluşturulur.

2. root - password bilgileri ile konsol açılır.

3. hostnamectl set-hostname yeni_hostname komutu ile yeni sunucu adı tanımlanır.

4. nano /etc/sysconfig/network/ifcfg-eth0 komutu ile dosya açılarak, IPADDR= satırındaki IP adresi degiştirilerek dosya kaydedilir.

5. nano /etc/hosts komutu ile dosya açılarak, yeni IP adresi ve hostname düzenlenip dosya kaydedilir.

6. reboot komutu ile sistem yeniden başlatılır.

22 Ağustos 2017 Salı

SUSE / Setting Up Bonding Devices

  1. Run YaST > Network Devices > Network Settings.
  2. Use Add and change the Device Type to Bond. Proceed with Next.
  3. Select how to assign the IP address to the bonding device. Three methods are at your disposal:
    • No IP Address
    • Dynamic Address (with DHCP or Zeroconf)
    • Statically assigned IP Address
    Use the method that is appropriate for your environment.
  4. In the Bond Slaves tab, select the Ethernet devices that should be included into the bond by activating the related check box.
  5. Edit the Bond Driver Options. The modes that are available for configuration are the following:
    • balance-rr
    • active-backup
    • balance-xor
    • broadcast
    • 802.3ad
    • balance-tlb
    • balance-alb
  6. Make sure that the parameter miimon=100 is added to the Bond Driver Options. Without this parameter, the data integrity is not checked regularly.
  7. Click Next and leave YaST with OK to create the device.

create a symbolic link command


ln -s /path/to/file /path/to/symlink

ln -s file1 link1

ln -s {/path/to/file-name} {link-name}

ln -s /opt/dpsapps/dbappagent/bin/hdbbackint hdbbackint

11 Temmuz 2017 Salı

Linux / # mpathconf oluşturma

# mpathconf --enable --with_multipathd y

Multipath.conf dosyasının oluşturulması 

Host san scan
echo "- - -" > /sys/class/scsi_host/hosth/scan

2 Haziran 2017 Cuma

Raporları oluşturmak için Flex üzerindeki master server'a PuTTY üzerinden appadmin ile giriş yapın ve "sudo -i" ile root kulla...