레이블이 Oracle Linux인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Oracle Linux인 게시물을 표시합니다. 모든 게시물 표시

2015-05-13

Oracle Linux & Oracle Solutions tips

Oracle Linux에서 Yum으로 update하고 나서 Oracle Linux의 version을 알고 싶을때:
  more /etc/system-release or more /etc/oracle-release
  update된 version을 알 수가 있습니다.

최신 JDK를 rpm으로 설치를 했을 때 설치된 directory는 어디:
  /usr/java/jdk1.8.0_45    ; OracleJDK
  /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/   ; OpenJDK

Open JDK와 Oracle JDK를 모두 설치했을 때 선택적으로 java를 실행하고 싶다면:
(Open JDK에서 Oracle JDK로 link 변경)
  # java -version
  java version "1.7.0_79"
  OpenJDK Runtime Environment (rhel-2.5.5.1.0.1.el6_6-x86_64 u79-b14)
  OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

  # which java
  /usr/bin/java

  # ls -al /usr/bin/java
  lrwxrwxrwx 1 root root 22 May 13 14:22 /usr/bin/java -> /etc/alternatives/java

  # ls -al /etc/alternatives/java
  lrwxrwxrwx 1 root root 46 May 13 14:22 /etc/alternatives/java -> /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java

  # ln -s /usr/java/jdk1.8.0_45/bin/java /usr/bin/java

  # java -version
  java version "1.8.0_45"
  Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
  Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

2014-09-22

Oracle VM Server 3.2.8 Installation

[root@OVS1 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 38913.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         405     3148740   83  Linux
/dev/sda3             406         536     1052257+  82  Linux swap / Solaris
/dev/sda4             537        9999    76011547+  83  Linux

Command (m for help):

[root@OVS1 ~]# mkfs -t ext4 /dev/sda4
mkfs.ext4: No such file or directory
[root@OVS1 ~]# mkfs -t ext3 /dev/sda4
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
9502720 inodes, 19002886 blocks
950144 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
580 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
4096000, 7962624, 11239424

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@OVS1 ~]# df -ak
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              3050092    761552   2131104  27% /
proc                         0         0         0   -  /proc
sysfs                        0         0         0   -  /sys
devpts                       0         0         0   -  /dev/pts
/dev/sda1               101086     27845     68022  30% /boot
tmpfs                   297420         0    297420   0% /dev/shm
debugfs                      0         0         0   -  /sys/kernel/debug
xenfs                        0         0         0   -  /proc/xen
none                         0         0         0   -  /proc/sys/fs/binfmt_misc
sunrpc                       0         0         0   -  /var/lib/nfs/rpc_pipefs
none                    297420        40    297380   1% /var/lib/xenstored
/dev/sda4             74818752    184220  70833956   1% /nfs-home

[root@OVS1 etc]# vi exports 
/nfs-home       *(rw,sync,no_root_squash)

[root@OVS1 etc]# service nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
[root@OVS1 etc]# service portmap start
Starting portmap:                                          [  OK  ]

[root@OVS1 etc]# chkconfig --level 35 nfs on
[root@OVS1 etc]# chkconfig --level 35 portmap on

[root@OVS1 ~]# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Sep 22 12:32 0d26d0fc-9756-4ecb-b131-b71b53616192 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 22 12:32 0de80611-46ce-4aac-8728-d5133f8c0ed2 -> ../../sda3
lrwxrwxrwx 1 root root 10 Sep 22 12:32 39b8ff46-48f8-4422-bd2b-863abec03f21 -> ../../sda4

lrwxrwxrwx 1 root root 10 Sep 22 12:32 a45c4b0b-5370-480d-9e6a-9d9220262ca3 -> ../../sda2

[root@OVS1 ~]# mroe /etc/fstab 
-bash: mroe: command not found
[root@OVS1 ~]# more /etc/fstab 
# This fstab (File System TABle) was created during installation by anaconda
# To accomodate the usage of multipath devices it is prefered that filesystems
# are identified by their UUID. The device the UUID represents is written
# in a comment field above entries that have UUID representation
# UUID's for created FS's can normally be found by using the 'blkid' command

# ID a45c4b0b-5370-480d-9e6a-9d9220262ca3 represents /dev/sda2
UUID=a45c4b0b-5370-480d-9e6a-9d9220262ca3 /          ext3    defaults       1 1
# ID 0d26d0fc-9756-4ecb-b131-b71b53616192 represents /dev/sda1
UUID=0d26d0fc-9756-4ecb-b131-b71b53616192 /boot      ext3    defaults       1 2
tmpfs                                     /dev/shm   tmpfs   defaults       0 0
devpts                                    /dev/pts   devpts  gid=5,mode=620 0 0
sysfs                                     /sys       sysfs   defaults       0 0
debugfs                                   /sys/kernel/debug debugfs defaults       0 0
proc                                      /proc      proc    defaults       0 0
xenfs                                     /proc/xen  xenfs   defaults       0 0
# ID 0de80611-46ce-4aac-8728-d5133f8c0ed2 represents /dev/sda3
UUID=0de80611-46ce-4aac-8728-d5133f8c0ed2 swap       swap    defaults       0 0
# ID 39b8ff46-48f8-4422-bd2b-863abec03f21 represents /dev/sda4

UUID=39b8ff46-48f8-4422-bd2b-863abec03f21 /nfs-home  ext3    defaults       1 2






2014-09-18

Linux에서 ISO file mount하기

mkdir /media/DVD
mount -o loop target.iso /media/DVD

vsftpd 설정하기

Oracle Linux 6.5에서 실행

vsftpd 서버 설치하기
yum install vsftpd

ftp 클라언트 설치하기
yum install ftp

vsftpd 설정하기
vi /etc/vsftpd/vsftpd.conf

anonymous_enable=NO
local_enable=YES
chroot_local_user=YES

vsftpd 실행하기
service vsftpd start

부팅시에도 vsftpd가 자동 실행될 수도록 하기
chkconfig vsftpd on

자동설정이 되어 있는지 확인하기
chkconfig --list vsftpd
vsftpd          0:off   1:off   2:on    3:on    4:on    5:on    6:off

기타 설정파일 설명:
anonymous_enable=YES/NO # 익명 사용자 로그인 허용
local_enable=YES/NO # local 시스템 사용자 로그인 허용
write_enable=YES/NO # write 명령어 허용 여부
local_umask=022 # 퍼미션 설정
anon_upload_enable=YES # 익명 사용자 업로드 허용
anon_mkdir_write_enable=YES # 익명 사용자 쓰기 허용
xferlog_enable=YES # 파일 전송 로그 설정
connect_from_port_20=YES # 데이터 전송 포트(Active Mode인 경후 YES)
chown_uploads=YES # 소유권 변경 설정(chown_username 사용자의 소유권으로 변경)
chown_username=who # 소유권 사용자
idle_session_timeout=600 # 아무런 작업이 없을 경우 접속 해제 시간
data_connection_timeout=120 # 데이터 전송 후 접속 해제시까지 기다리는 시간
chroot_list_enable=YES # chroot 환경 설정
chroot_list_file=/etc/vsftpd.chroot_list # 이 파일에 있는 사용자는 chroot 환경 적용
chroot_local_user=YES # 모든 사용자가 chroot 환경 적용
userlist_enable=YES # userlist_file의 사용자 로그인 허용
listen=YES/NO # 데몬 동작방식(Standalone인 경우 YES)
tcp_wrappers=YES # TCP WRAPPER 적용 여부
anon_oterh_write_enable
no_anon_password=NO # 익명 사용자 로그인시 패스워드 요구 여부
userlist_deny=YES # userlist_file 파일에 등록된 사용자의 로그인 거부
listen_port= # standalone시 서비스 포트를 지정
pasv_enable=YES # Passive Mode 지원 여부
pasv_max_port= # Passive Mode시 할당할 최대 포트 설정
pasv_min_port= # Passive Mode시 할당할 최소 포트 설정
anon_max_rate=0 # Anonymous 사용자 다운로드 가능한 최대 전송속도(0:무제한)
local_max_rate=0 # 시스템 사용자 사용 가능한 최대 전송속도(0:무제한)
max_clients=100 # 최대 클라이언트 수
max_per_ip=0 # 클라이언트 호스트당 접속할 수 있는 최대 수(0:무제한)

2014-05-29

Oracle linux에서 yum 실행 시 ULN register 문제가 발생한다면

Oracle linux와 VM에 대해 public YUM server를 사용할 수 있도록 설명이 되어 있습니다.
http://public-yum.oracle.com

Getting Started

  1. Download and Install Oracle Linux
  2. Download and copy the appropriate yum configuration file in place, by running the following commands as root:

Oracle Linux 7

  1. # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-ol7.repo
    

Oracle Linux 6

  1. # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-ol6.repo
    

Oracle Linux 5

  1. # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-el5.repo
    

Oracle Linux 4, Update 6 or Newer

  1. # cd /etc/yum.repos.d
    # mv Oracle-Base.repo Oracle-Base.repo.disabled
    # wget http://public-yum.oracle.com/public-yum-el4.repo
    

Oracle VM 2

  1. # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-ovm2.repo
    

Oracle OpenStack for Oracle Linux

    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-openstack-ol6.repo
    
  1. Enable the appropriate repository by editing the yum configuration file
    • Open the yum configuration file in a text editor
    • Locate the section in the file for the repository you plan to update from, e.g. [el4_u6_base]
    • Change enabled=0 to enabled=1
  2. Begin using yum, for example:
    yum list
    yum install firefox