Posts

Showing posts with the label Linux / Unix

VM - Partilhar Pastas Windows - Linux

Image
Neste post escrevo como partilhar pastas entre Windows (Host) e uma VM Guest, neste caso Linux. Ha algumas formas de fazer isto, esta parece me a mais facil. Seleccionar a Pasta Windows Na consola Virtual Box > Devices > Shared Folder Seleccionar a pasta windows para partilhar no Linux   O   Montar a pasta Windows na VM Ha duas opcoes : 1) Reiniciar a VM (Auto-mount) 2) Linha de comando [root@host ~]# mkdir -p /u01/stage/win_ebs_sw [root@host ~]# chmod 777 /u01/stage/win_ebs_sw [root@host ~]# mount -t vboxsf Oracle_EBS /u01/stage/win_ebs_sw/ [root@host ~]# ls /u01/stage/win_ebs_sw ebs_weblogic_webtier [root@host ~]# df -h /u01/stage/win_ebs_sw Filesystem Size Used Avail Use% Mounted on Oracle_EBS 895G 494G 401G 56% /u01/stage/win_ebs_sw Guardar a Configuracao no /etc/fstab para tornar as alteracoes permanentes. [root@host ~]# echo "Oracle_EBS /u01/stage/win_ebs_sw vboxsf defaults 0 0" >> /etc/fstab [root@host ~]# cat /etc/fstab # /etc/...

OS - How to change the hostname

Image
In this post I'm sharing how to address of the most repetitive tasks after fresh build or clone a VM. Eg. for database   pre install tasks . First of all , I will how to change the hostname. Next, I will setup the local naming resolution. At end, how to play with the firewall. Change hostname - the hostname is key including for server provisioning and orchestration, the server name can be changed using the hostnamectl command. Lets see bellow some examples. root@Unknown-08-00-27-26-48-7d # hostnamectl status Static hostname: localhost.localdomain Transient hostname: Unknown-08-00-27-26-48-7d Icon name: computer-vm Chassis: vm Machine ID: d5a9e3e4d118804089e345228a189582 Boot ID: f76e3fc1c76f49028a1583b90eb01511 Virtualization: kvm Operating System: Oracle Linux Server 7.7 CPE OS Name: cpe:/o:oracle:linux:7:7:server Kernel: Linux 4.14.35-1902.3.2.el7uek.x86_64 Architecture: x86-64 root@Unknown-08-00-27-26-48-7d # hostnamectl set-hostname wls.example.com root@Unknown-08-00-27-26-48...

OS - yum - pre install tasks

Versao Portuguesa Installing the Oracle Preinstallation RPM From Unbreakable Linux Network Oracle requires some RPMs in the system - it would to be a bit painful to install all the requirements Oracle Linux comes with the yum configured and ready to use - using it makes life easier on that task bellow the example. [root@dbserver ~]# yum install oracle-rdbms-server-12cR1-preinstall Loaded plugins: langpacks Resolving Dependencies --> Running transaction check ---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-7.el7 will be installed --> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: ksh for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: libaio-devel for package: oracle-rdbms-server-12cR1-preinstall-...

OS - yum - preinstall

English Version Install pre reqs para Oracle DB Uma das pre tasks necessarias para base de dados Oracle e installar previamente uma lista enorme de packages. Oracle Linux  vem com os repositorios do yum  , o que facilita muito a tarefa de preparar o servidor para Oracle. [root@dbserver ~]# yum install oracle-rdbms-server-12cR1-preinstall Loaded plugins: langpacks Resolving Dependencies --> Running transaction check ---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-7.el7 will be installed --> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: ksh for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: libaio-devel for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing De...

VM - Shared Folder Windows - Linux

Image
Versao Portuguesa When we work with VMs we need to make files available eg. software binaries, it has a few ways to do that, this post is about how to make share Windows (Host) folders in a Linux server (Guest).

VM - Partilhar Pastas Windows - Linux

Image
EnglishVersion Neste post escrevo como partillar uma pastas entre Windows (Host) e uma VM Linux (Guest), Ha muitas formas de fazer isto, esta parece me a mais facil.

DB - Instance caging

English Version Neste post partilho uma forma de identificar a utilização de CPU por utilizador (usuario como dizem no Brasil ) em ambientes Linux com múltiplas instâncias de base de dados Oracle.Estes comandos são útils para  configurar Database Instance Caging.

DB - To Prepare Linux OS for Oracle DB

PT :   Preparar Linux para Base de Dados Oracle   EN : To prepare  Linux   for Oracle DB

Unix – Basics and Useful DBAS

Run scripts in background This was my 1st post ever, sometimes it’s is need to run long operations on the database, is recommendable to ran these task in command line on the server side. The nohup insures the OS will keep run the command even in the event we lose the network connection, Using “&” will send the command execution to “background”. Next, I’m showing two approaches to manage this. Run - nohup + background + foreground $ nohup sqlplus $UP @update_data.sql "&" [2] 155548  nohup: ignoring input and appending output to `nohup.out' $ jobs [1]+  Running                 nohup sqlplus $UP @update_data.sql "&" $ fg 1 nohup sqlplus $UP @update_data.sql Ctrl+C Run - nohup + grep + kill $ nohup sqlplus $UP @update_data.sql & [1] 294427 >oracle@rogerioantonio.com> nohup: ignoring input and appending output to `nohup.out'   $ ps -ef | grep -i update_data.sql oracle 294427  80866 93 05:30 pts/1    00:00:16 sqlplus                    @upda...

Unix - Coisas Uteis Para DBAS

Gestao de Processos Este foi o meu primeiro post, ha operacoes na base de dados demoram muito tempo a executar, e aconselhavel correr no lado do servidor. O prefixo nohup assegura que o commando continua a correr. O uso do "&" envia o comando para "background", libertando assim a linha de commando. Em seguida formas  formas de gerir esta abordagem.   Run - nohup + background + foreground $ nohup sqlplus $UP @update_data.sql "&" [2] 155548  nohup: ignoring input and appending output to `nohup.out' $ jobs [1]+  Running                 nohup sqlplus $UP @update_data.sql "&" $ fg 1 nohup sqlplus $UP @update_data.sql Ctrl+C Run - nohup + grep + kill $ nohup sqlplus $UP @update_data.sql & [1] 294427 >oracle@rogerioantonio.com> nohup: ignoring input and appending output to `nohup.out'   $ ps -ef | grep -i update_data.sql oracle 294427  80866 93 05:30 pts/1    00:00:16 sqlplus                    @update_data.sql oracle 29543...

Daily Useful Examples

English Version Este foi o meu primeiro post, ha operacoes na base de dados demoram muito tempo a executar, e aconselhavel correr no lado do servidor. O prefixo nohup assegura que o commando continua a correr. O uso do "&" envia o comando para "background", libertando assim a linha de commando. Em seguida formas  formas de gerir esta abordagem.   Run - nohup + background + foreground $ nohup sqlplus $UP @update_data.sql & [2] 155548  nohup: ignoring input and appending output to `nohup.out' $  jobs [1]+  Running                 nohup sqlplus $UP @update_data.sql & $  fg  1 nohup sqlplus $UP @update_data.sql Ctrl+C Run - nohup + grep + kill $ nohup sqlplus $UP @update_data.sql & [1] 294427 >rmsepsup:orarmsps@ed1qdb02.tjx.com> nohup: ignoring input and appending output to `nohup.out' $ ps -ef | grep -i update_data.sql ora...