Różności …

Różności …

5 grudnia 2013

ORA-12514: TNS:listener does not currently know of service

Zaszufladkowany do: Oracle — Tagi: — Jacek @ 17:58
[oracle@vmlnx01 admin]$ oerr ora 12514
12514, 00000, "TNS:listener does not currently know of service requested in connect descriptor"
// *Cause:  The listener received a request to establish a connection to a
// database or other service. The connect descriptor received by the listener
// specified a service name for a service (usually a database service)
// that either has not yet dynamically registered with the listener or has
// not been statically configured for the listener.  This may be a temporary
// condition such as after the listener has started, but before the database
// instance has registered with the listener.
// *Action:
//  - Wait a moment and try to connect a second time.
//  - Check which services are currently known by the listener by executing:
//    lsnrctl services
//  - Check that the SERVICE_NAME parameter in the connect descriptor of the
//    net service name used specifies a service known by the listener.
//  - If an easy connect naming connect identifier was used, check that
//    the service name specified is a service known by the listener.
//  - Check for an event in the listener.log file.

lsnrctl services

i dodać odpowiedni service do tnsnames.ora

24 listopada 2013

mkisofs

Zaszufladkowany do: Linux — Tagi: — Jacek @ 21:19

mkisofs -o nazwa.iso /katalog

22 listopada 2013

mount iso

Zaszufladkowany do: Linux — Tagi: — Jacek @ 18:55

mount -o loop disk1.iso /mnt/disk

20 listopada 2013

LVM – LINUX (logical volume manager)

Zaszufladkowany do: Linux — Tagi: — Jacek @ 20:16

vgscan

lvmdiskscan

lvdisplay

parted /dev/sda print

Podmontowanie:
vgchange -a y
mount /dev/volumegroup/logicalvolume /mnt/somewhere

keyboard layout, klawiatura polska

Zaszufladkowany do: Linux — Tagi: — Jacek @ 18:23

setxkbmap pl

Światłowowdy jednomodowe i wielomodowe.

Zaszufladkowany do: Sieci — Tagi: — Jacek @ 11:20

Główną różnicą między światłowodem jednomodowym i wielomodowym jest sposób transmisji światła w rdzeniu światłowodowym. W włóknie wielomodowym transmitowanych jest wiele modów (wiązek światła) o tej samej długości fali. Propagowanie wielu modów przyczynia się do powstawania wewnątrz światłowodu dyspersji modowej, czyli rozmycia sygnału, które przekłada się na znaczne ograniczenie zasięgu transmisji bądź jej szybkości.

W włóknach jednomodowych transmitowany jest tylko jeden mod światła o określonej długości fali.

Pomiędzy okablowaniem jednomodowym czy wielomodowym nie ma widocznej różnicy podczas instalacji optycznych. Urządzenia do łączenia światłowodów jak spawarki czy spawy mechaniczne w większości przypadków przystosowane są do współpracy z obydwoma włóknami światłowodowymi. Zostaje odpowiednie i konsekwentne dobranie urządzeń aktywnych, kabla światłowodowego i osprzętu.

Zdecydowaną zaletą światłowodów jednomodowych jest możliwość transmisji sygnałów bez regeneracji nawet do 120 kilometrów. W przypadku światłowodów wielomodowych, maksymalny zasięg transmisji wynosi 2 kilometry.

  • światłowód jednomodowy i wielomodowy to dwa różne światłowody różniące się pomiędzy sobą technologią wykonania, zwykle światłowód jednomodowy jest droższy od wielomodowego. W przypadku oznaczenia portów urządzenia jako porty do światłowodu jednomodowego (SM – ang. single mode) należy stosować światłowód jednomodowy, natomiast w przypadku portów wielomodowych (MM – ang. multi mode)– należy korzystać ze światłowodów wielomodowych.
  • urządzenia przewidziane do współpracy ze światłowodem wielomodowym (urządzenia z portami światłowodowymi wielomodowymi) są tańsze od urządzeń przeznaczonych do współpracy ze światłowodem jednomodowych
  • maksymalny zasięg transmisji przy użyciu światłowodu wielomodowego to zwykle ok. 4-5 km, gdy światłowód jednomodowy umożliwia transmisję nawet na odległość 40 lub 80km
  • kupując światłowód należy zwrócić uwagę na: jego typ (światłowód jednomodowy/ wielomodowy), średnicę (zwykle wielomodowy: 50/125 lub 62.5/125 mikrometra natomiast jednomodowy: 9/125 mikrometra) oraz typ złącza (SC lub ST)

Źródło:
http://www.dipol.com.pl/swiatlowod_jednomodowy_i_wielomodowy_-_wprowadzenie_bib321.htm
http://www.sterowniki.pl/index.php?option=Articles&task=viewarticle&artid=50

18 listopada 2013

iptables

Zaszufladkowany do: Linux — Tagi: — Jacek @ 20:08

service iptables stop
service iptables start
service iptables save
iptables-save > /etc/sysconfig/iptables

iptables -I INPUT 5 -p tcp –dport 443 -j ACCEPT
iptables -L -n –line-numbers

14 listopada 2013

VMware tools, CentOS 6.4

Zaszufladkowany do: Bez kategorii — Jacek @ 11:22

Source:
http://mondotech.blogspot.com/2012/05/install-vmware-tools-on-rhel-6-centos-6.html

This is a HOWTO for installing VMware Tools on RHEL 6 and Centos 6.  I’m mainly posting this since I never remember what the prerequisites are.

Install the VMware tools prerequisites:

yum install make gcc kernel-devel kernel-headers glibc-headers perl

Mount the VMware Tools CD (after inserting it into the VM)

mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom

Copy the install bundle from the CD and extract it.

cp /mnt/cdrom/VMware-Tools*.tar.gz /tmp/
cd /tmp/
tar xvfz VMwareTools*.tar.gz

Run the installer, default on all prompts works fine.

cd /tmp/vmware-tools-distrib
./vmware-install.pl  # add -d to auto accept defaults

Oracle 11g installation on Centos 6.4

Zaszufladkowany do: Bazy danych,Linux,Oracle — Tagi: , — Jacek @ 09:55

http://www.tecmint.com/oracle-database-11g-release-2-installation-in-linux/

selinux

Zaszufladkowany do: Linux — Tagi: — Jacek @ 07:25

czasowe wyłączenie
setenforce 0
setenforce 1

lub

echo 0 >/selinux/enforce
newrole -r sysadm_r
echo 1 >/selinux/enforce

cat /selinux/enforce

SSH key authentication problem:
Turns out that SELinux was interfering with the key authentication because there was no security context for the newly created ~/.ssh
directory.

The fix:
restorecon -R -v /root/.ssh

13 listopada 2013

SSH tunel

Zaszufladkowany do: Linux — Tagi: — Jacek @ 19:33

http://jakilinux.org/aplikacje/sztuczki-z-ssh-2-tunele/#

XFCE on CentOS

Zaszufladkowany do: Linux — Tagi: — Jacek @ 15:32

Źródło/Source:

http://blog.inticol.com/2012/10/installing-xfce-on-centos-6.html

After a minimal install of CentOS 6.3, the following steps are needed to install XFCE
  • Make sure your machine can connect to the internet
  • Install the wget package, used to download other files from the internet.
    yum install wget
  • Download and install the epel-release package from the EPEL repository, 6.8 is the version at this date but it can be different later, check the name of the file.
    wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    rpm -ivh epel-release-6.8.noarch.rpm
  • The following command install all the xfce packages, the version is 4.8.3 at this time.
    yum groupinstall Xfce
  • The following command install some fonts needed for the graphical login process in CentOS, if they are not present, you will see squares instead in the login screen.
    yum install xorg-x11-fonts-Type1 xorg-x11-fonts-misc
  • Test your installation by going to runlevel 5
    /sbin/telinit 5
  • Another option for testing/starting the graphical desktop is:
    startxfce4
  • If everything works fine, remember to update the default startup level to 5 in /etc/inittab

vmware insufficient resources to satisfy configured failover level for vsphere ha

Zaszufladkowany do: VMware — Tagi: — Jacek @ 13:31

http://geekswing.com/geek/vmware-cpu-and-ram-reservations-fixing-insufficient-resources-to-satisfy-configured-failover-level-for-ha/

11 listopada 2013

ls color directory blue

Zaszufladkowany do: Linux — Tagi: — Jacek @ 22:26

/etc/DIR_COLORS

cp /etc/DIR_COLORS ~/.dircolors

To customized colors you must use special string combination:
FILE-TYPE Attribute codes: Text color codes:Background color codes

Where,

  • FILE-TYPE: is file type like DIR (for directories)
  • Attribute codes:
    • 00=none
    • 01=bold
    • 04=underscore
    • 05=blink
    • 07=reverse
    • 08=concealed
  • Text color codes:
    • 30=black
    • 31=red
    • 32=green
    • 33=yellow
    • 34=blue
    • 35=magenta
    • 36=cyan
    • 37=white
  • Background color codes:
    • 40=black
    • 41=red
    • 42=green
    • 43=yellow
    • 44=blue
    • 45=magenta
    • 46=cyan
    • 47=white

For example to define Bold Blue color for DIR file type, entry should look as follows:
DIR 01;34
http://www.cyberciti.biz/tips/where-is-color-of-ls-command-defined.html

3 listopada 2013

linux vpn

Zaszufladkowany do: Linux — Tagi: — Jacek @ 18:28

vpnc – -natt-mode none vpnc.conf

vpnc.conf:
IPSec gateway 111.111.111.111
IPSec ID login_vpn
IPSec secret haslo
Xauth username login

openvpn – -config openvpn.ovpn

openvpn.conf
dev tun
tls-client
remote 111.111.111.111 7777
# If redirect-gateway is enabled, the client will redirect it’s
# default network gateway through the VPN.
# It means the VPN connection will firstly connect to the VPN Server
# and then to the internet.
# (Please refer to the manual of OpenVPN for more information.)
#redirect-gateway
pull
proto udp
script-security 2
ca ca.crt
comp-lzo
reneg-sec 0
auth-user-pass

2 listopada 2013

SSH authorized_keys – keys authenitcation

Zaszufladkowany do: Linux — Tagi: — Jacek @ 18:54

You should never add the file with the contents starting with -----BEGIN RSA PRIVATE KEY-----, that’s your private key. You must put the public key in the ~/.ssh/authorized_keys file.

This public key has the .pub extension when generated using ssh-keygen and the contents of the public key begins with ssh-rsa AAAA3B

The permissions of ~/.ssh on the server should be 700. ~/.ssh/authorized_keys on the server are supposed to be set to 600. The permissions of the key on the client-side should be 600.

If the private key was not protected with a password and you put it on the server, I recommend you generating a new one using:

ssh-keygen -t rsa

You can skip this if you’re fully sure that nobody can recover the deleted private key on the server.

If this does not help, run ssh with options for more verbosity:

ssh -vvv user@example.com

On the server side, you can review /var/log/auth.log for details.

1 listopada 2013

java library path

Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 05:41

java.library.path is the path that Java uses to find native libraries (such as lwjgl.dll). You should set it to the directory that contains the DLL files. You specify this with the -D switch on the command line, for example:

java -Djava.library.path=C:\Java\ljwgl\libs org.mypackage.MyProgram

http://fedoraproject.org/wiki/Java

29 października 2013

sqldeveloper

Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 16:39

Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk
/usr/lib/jvm/java

28 października 2013

sqlplus – zmienna

Zaszufladkowany do: Oracle — Tagi: — Jacek @ 22:11

export LD_LIBRARY_PATH=”/usr/lib/oracle/12.1/client64/lib/”

23 października 2013

Zaszufladkowany do: Linux — Tagi: — Jacek @ 18:08

Instalacja zwykłych RPMów

Mamy RPMa i chcemy go zainstalować. Używamy komendy:

rpm -ihv nazwa_pakietu.rpm
rpm -Uhv nazwa_pakietu.rpm
rpm -Fhv nazwa_pakietu.rpm

Parametr -ihv spowoduje zainstalowanie pakietu jeżeli spełnione są wszystkie wymagania, jeżeli nie wyświetlone zostaną brakujące elementy lub inne błędy na jakie trafił instalator. Wersja -Uhv różni się tym od -ihv tym że jeżeli mamy starszą wersję danego programu to zostanie on zaktualizowany (ihv zainstalowałby RPMa jako 2 wersję), jeżeli nie ma to zostanie on standardowo zainstalowany. Wersja -Fhv tylko aktualizuje. Jeżeli nie mamy zainstalowanej starszej wersji to RPM nie zostanie zainstalowany. Usunięcie RPMa przeprowadzamy tak:

rpm -e nazwa_pakietu.rpm
Polecenie Opis
rpm -qip nazwa_pakietu.rpm Wyświetlone zostaną dane o pakiecie takie jak opis, autor, strona projektu i inne.
rpm -q nazwa_aplikacji To polecenie zwróci numer zainstalowanej wersji aplikacji jeżeli oczywiście jest zainstalowany
rpm -qa Wyświetla listę wszystkich zainstalowanych RPMów wraz z numerem wersji
rpm -qai Wyświetla szczegółowe opisy dla każdego zainstalowanego RPMa
rpm -qf /folder/x/plik_lub_folder Określa nazwę pakietu, którego elementem jest wskazany plik/katalog

RPMy źródłowe

Komenda jest następująca:

rpmbuild –rebuild nazwa_pakietu.src.rpm

Odpalony zostanie pakiet a zawarty w nik kod źródłowy będzie kompilowany. Do tego potrzebne są odpowiednie biblioteki i w przypadku bardziej złożonych programów będziemy musieli je ściągnąć i zainstalować. Instalator powie nam czego brakuje.
Wynik:
/root/rpmbuild/RPMS/x86_64

Źródło: http://www.linux.rk.edu.pl/w/p/obsluga-pakietw-rpm/

« Nowsze wpisyStarsze wpisy »

Strona startowa: www.jaceksen.pl