- http://www.ubuntuupdates.org/ppa/google_chrome


# wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub |  apt-key add - 

# sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

# apt-get update

# apt-get install google-chrome-stable



블로그 이미지

Melting

,

http://www.ibm.com/developerworks/power/library/l-power-installation-toolkit/


언제나 그렇듯... 존재는 하나, 그 존재를 알기는 어렵다... ㅎㅎ









블로그 이미지

Melting

,

+. schedutils 

# apt-get install schedutils (ubuntu)

# up2date schedutils (redhat)

# rpm -ivh schedutils* (redhat)



+. check for the taskset information for process

   > -p  : hex formant for cpu number

   > -pc : decimal formant for cpu number

# taskset -pc 2360 

pid 2360's current affinity list: 0



+. assign affinity with invoking the process

# taskset -c 1-3 /etc/init.d/httpd start



+. assign affinity on a running process

  > -p : Operate on an existing PID and do not launch a new task

  > -c : Specify a numerical list of processors instead of a bitmask.

         The numbers are separated by commas and may include ranges.  

       For example: 0,5,7,9-11.

# taskset -c 1 -p 12314

# taskset -c 3,4 -p 12314

블로그 이미지

Melting

,

+. memory space / number of large memory pages 

 - each huge page size : 16 MB

 - jvm heap size : 2048 MB

 - jvm instances : 4

 

 > total memory space for jvm heap 

     : 2048 MB * 4 (jvm) = 8 GB

   total memory space for huge page 

     : (1024 (1kb) * 1024 (1mb) * 1024 (1gb) * 2 (jvm heap) * 4 (jvm count)) - 1  = 8589934591

   total huge page number

     : 1024 (1gb) * 2 (jvm heap) * 4 (jvm count) / 16 (huge page size) = 512



+. allocate the shared memory segement 

#. echo 8589934591 > /proc/sys/kernel/shmmax   (temporary configuration)

#. vi /etc/sysctl.conf                         (permanent configuration)

   kernel.shmmax = 8589934591


+. set the number of huge pages

#. echo 512 > /proc/sys/vm/nr_hugepages        (temporary configuration)

#. vi /etc/sysctl.conf                         (permanent configuration)

   vm.nr_hugepages = 512


+. set the user group to access the huge pages (ex. user's group id : 1001) 

#. echo 1001 > /proc/sys/vm/hugetlb_shm_group  (temporary configuration)

#. vi /etc/sysctl.conf                         (permanent configuration)

   vm.hugetlb_shm_group = 1001


+. run jvm with huge page support option

 > java -Xlp -Xmn1400m -Xms2048m -Xmx2048m -XlockReservation -Xnoloa -XtlhPrefetch -Xaggressive -Xcompressedrefs -Xconcurrentlevel0

 > java -d64 -server -Xms2048m -Xmx2048m -Xss192k -XX:+UseLargePages -XX:LargePageSizeInBytes=2m -XX:+UseParNewGC



+. check the huge pages in memory 

#. cat /proc/meminfo | grep Huge


블로그 이미지

Melting

,


+. /etc/yum.repos.d/rhel-debuginfo.repo 를 백업하고 삭제

+. /etc/yum/pluginconf.d/rhnplugin.conf

   [main]

   enabled = 0

   gpgcheck = 1

+. vi /etc/yum.repos.d/centos.repo

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

[base]

name=CentOS-5 - Base

baseurl=http://ftp.daum.net/centos/5/os/$basearch/

gpgcheck=1

gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-5


#released updates

[updates]

name=CentOS-5 - Updates

baseurl=http://ftp.daum.net/centos/5/updates/$basearch/

gpgcheck=1

gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-5


#packages used/produced in the build but not released

[addons]

name=CentOS-5 - Addons

baseurl=http://ftp.daum.net/centos/5/addons/$basearch/

gpgcheck=1

gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-5


#additional packages that may be useful

[extras]

name=CentOS-5 - Extras

baseurl=http://ftp.daum.net/centos/5/extras/$basearch/

gpgcheck=1

gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-5


#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-5 - Plus

baseurl=http://ftp.daum.net/centos/5/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-5


#contrib - packages by Centos Users

[contrib]

name=CentOS-5 - Contrib

baseurl=http://ftp.daum.net/centos/5/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-5

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

블로그 이미지

Melting

,

hdparm -S <set spindown time>


# fdisk -l

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1               1        1987         993+  ee  GPT

/dev/sda2   *        1988   480584019   240291016   83  Linux

/dev/sda3       480584020   488397054     3906517+  82  Linux swap / Solaris


# hdparm -I /dev/sda | grep level

        Advanced power management level: 254


# hdparm -S 60 /dev/sda

/dev/sda:

setting standby to 60 (5 minutes)


   > 5분뒤에 spin down

   > -S 옵션값에 주의

      ex. 0 -> 무제한, 1-240 -> *5초, 241-251 -> *30분, 252 -> 22분 ...


블로그 이미지

Melting

,

큐브회전은 역시 신기하기는 하지만 막상 쓰기가 좀 ... 역시 Expo 정도가 편한듯....


+. compiz 파일셋 설치
 synaptic : search with 'compiz' 

   > compiz, compiz-plugins-default, libdecoration0, compizconfig-setting-setting-manager,  
     python-compizconfig, compiz-plugins, compiz-gnome, compiz-core, fusion-icon, compiz-plugins-main 
   > Apply && Install 
 


+. 시작프로그램에 등록

   Control Center > Startup Applications > 'Add' 
    - Name : fusion-icon 
    - Command : fusion-icon 
    - Comment : fusion-icon 
 
 
+. CCSM을 통해 compiz 환경 설정 (terminal > ccsm)
   Category : Effect  
      > Window Decoration : check      --> 이거 해줘야 타이틀바가 보임 !!!

      > Wobbly Windows : check 
   Category : General  
      > OpenGL / Gnome Compatibility / Composite : check 
   Category : Accessibility 
      > Dim Inactive : check 
   Category : Desktop 
      > Expo : check 
        - Expo Key : Disabled 
        - Expo Edge : TopLeft 
   Category : Utility  
      > Compiz Library Toolbox : check 
   Category : Windows Management 
      > Move Window / Place Windows / Resize Window / Shift Switcher : check


 

블로그 이미지

Melting

,

NAS를 Linux로 편리하게 접근하기...

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

ftp server를 file system으로 mount (curlftp) : linux 용 netdrive
----------------------------------------------------------------
NAS에서 FTP 서비스를 open 한 경우, 해당 ftp 서버를 local file system으로 mount 가능

# apt-get install curlftpfs

# curlftpfs -o user=ID:PASSWORD -o codepage=euc-kr -o allow_other ftp://${ftp_server_ip} /mnt/${target_dir}
    >> '잘못된 인코딩' 에러가 나면서, 한글 파일이 깨질 경우... codepage를 'euc-kr' 혹은 'cp949' 등으로 테스트하면서 적용해야 함...

    >> unicode 의 경우는 codepage는 'utf8' 로 mount


# fuser -ck /mnt/${target_dir}; umount /mnt/${target_dir}




----------------------------------------------------------------
cifs file system mount
----------------------------------------------------------------

+. 직접 file system을 mount

mount -t cifs //192.168.0.100/1x /mnt/1x -o username=_user,password=_pwd,iocharset=utf8,rw

mount -t cifs //192.168.0.100/1x /mnt/1x -o username=_user,password=_pwd,iocharset=cp949,rw


+. /etc/fstab파일을 수정해서 file system에 mount 값 적용

- /etc/fstab 파일에 아래의 항목 추가

  //192.168.0.100/mnt_source /mnt/mnt_point cifs username=_user,pass=_pwd,rw,ver=1,iocharset=utf8,domain=embeded 0 0

- mkdir -p /mnt/mnt_point

- mnt /mnt/mnt_point (또는 mount -a)

- umount /mnt/mnt_point

블로그 이미지

Melting

,


+. activate root user

precise@ubuntu:~$ sudo passwd root


+. update apt repository to daum

root@ubuntu:~# cp /etc/apt/sources.list /etc/apt/sources.list.backup

root@ubuntu:~# vi /etc/apt/sources.list

   > %s/kr.archive.ubuntu.com/ftp.daum.net/g

   > wq

root@ubuntu:~# apt-get update

root@ubuntu:~# apt-get upgrade


+. basic application installation

root@ubuntu:~# apt-get install nmon

root@ubuntu:~# apt-cache search gcc | grep 4.7

root@ubuntu:~# apt-get install gcc gcc-4.7-base

root@ubuntu:~# apt-get install alien


+. telnetd/ftpd/sshd installation

root@ubuntu:~# apt-get install xinetd

root@ubuntu:~# apt-get install telnetd

root@ubuntu:~# vi /etc/xinetd.conf

service telnet

{

        disable = no

        flags = REUSE

        socket_type = stream

        wait = no

        user = root

        server = /usr/sbin/in.telnetd

        log_on_failure += USERID

}

root@ubuntu:~# /etc/init.d/xinetd restart


root@ubuntu:~# apt-get install proftpd

      > standalone mode

root@ubuntu:~# vi /etc/ftpusers

      > # root

root@ubuntu:~# vi  /etc/proftpd/proftpd.conf  

RootLogin                       on  

root@ubuntu:~# service proftpd restart

root@ubuntu:~# apt-get install ssh

root@ubuntu:~# /etc/init.d/ssh restart

 

+. samba configuration

root@ubuntu:~# mkdir -p /opt/shared ; chmod -R 755 /opt/shared

root@ubuntu:~# apt-get install samba

root@ubuntu:~# smbpasswd -a precise

root@ubuntu:~# vi /etc/samba/smb.conf

[precise]

        path=/opt/shared

        read only=no

        valid users=precise

        browseable=yes

root@ubuntu:~#  /etc/init.d/smbd restart


+. nfs configuration

root@ubuntu:~# apt-get install nfs-common nfs-kernel-server

root@ubuntu:~# /etc/init.d/nfs-kernel-server restart

root@ubuntu:~# vi /etc/exports

/nfs_home    *(rw,no_root_squash,no_all_squash)


+. vnc configuration

root@ubuntu:~/.vnc# apt-get install xinit

    apt-get install ubuntu-desktop  >>> do not need to install ubuntu-desktop

root@ubuntu:~# apt-get install tightvncserver

root@ubuntu:~# vncserver

+. oracle java/jdk install

root@ubuntu:~# add-apt-repository ppa:webupd8team/java

root@ubuntu:~# apt-get update

root@ubuntu:~# apt-get install oracle-java6-installer


+. terminal/coding font install
# mkdir -p /usr/share/fonts/Inconsolata

Inconsolata.otf

# wget http://www.levien.com/type/myfonts/Inconsolata.otf

# mv ./Inconsolata.otf /usr/share/fonts
# fc-cache -f -v

# mkdir -p /usr/share/fonts/truetype/consola
# --- place the 'consola' fonts to temp directory ---
# mv ./*.ttf /usr/share/fonts/truetype/consola/
# chmod 644 /usr/share/fonts/truetype/consola/*.ttf
# fc-cache -f -v 

+. xrdp configuration
# apt-get install xrdp
# vi /etc/xrdp/xrdp.ini
--------------------
[globals]
bitmap_cache=yes
bitmap_compression=yes
port=9389
crypt_level=low
channel_code=1
--------------------
# echo "gnome-session --session=ubuntu-2d" >> ~/.xsession



+. ubuntu-desktop (~.~)

# apt-get install ubuntu-desktop   (or)  apt-get install xubuntu-desktop

# /etc/init.d/gdm startre/

# dpkg-reconfigure xserver-xorg




 



블로그 이미지

Melting

,

sudo add-apt-repoisitory ppa:flexiondotorg/java

  > repository 추가


sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy multiverse"

  > deb/deb-src 형태로 repository 추가


sudo apt-get update

 > /etc/apt/sources.list에 저장된 index에서 패키지 정보 update


sudo apt-get upgrade

 > 설치된 package upgrade 


sudo apt-get dist-upgrade

 > 의존성을 체크하면서 설치


sudo apt-get install $package_name

 > package 설치

 > apt를 이용하여 설치된 deb 프로그램은 /var/cache/apt/archive에 설치됨


sudo apt-get --reinstall $package_name

 > package 재설치


sudo apt-get remove $package_name

 > package 삭제


sudo apt-get --purge remove $package_name

 > package 삭제시 관련 설정파일을 포함하여 삭제


sudo apt-get source $package_name

 > package를 설치하지 않고 download만 수행


sudo apt-get build-dep $package_name

 > apt-get source로 다운받은 package를 의존성을 고려하여 다시 빌드


sudo apt-cache search $package_name

 > package 검색


sudo apt-cache show $package_name

 > 해당 package 정보 조회


sudo dpkg -i $package.deb

 > deb 파일 설치


블로그 이미지

Melting

,