728x90

출처 : 우분투에서 Subversion 설치 및 설정
Ubuntu – How to install SVN (Subversion)
리눅스 svn서버 설치 및 설정
SVN 권한 설정
[Centos] Subversion 설치하기
CentOS에 Subversion 설치후 설정하기

svn 설치

# apt-get install -y subversion

svn 환경파일(/conf/svnserve.conf) 수정

# vi /bluesanta/Repositories/conf/svnserve.conf

[general]
#인증되지않은(즉 계정이 없는) 사용자에 대해 접근을 거부한다.
anon-access = none
#인증된 사용자에 대해 쓰기 권한을 준다.
auth-access = write
#인증된 사용자에 대한 계정 정보(아이디/패스) 정보가 기록된 파일명을 의미한다.(기본값 passwd) 
password-db = passwd
#인증된 사용자에 대해 저장소에 대한 권한 설정이 기록된 파일명(기본값)
#authz-db = authz
#현재 파일에 해당되는 저장소의 영역에 대해 설정
#realm = bluesanta_proj

사용자 관리(/conf/passwd) 파일

# vi passwd

[users]
bluesanta = {password}

사용자 관리(/conf/authz) 파일

# vi authz

[/android_library]
bluesanta = rw

svn 시작

# svnserve -d -r /bluesanta/Repositories

svn 종료

# killall svnserve

svn 포트 개발(3690)

# firewall-cmd --permanent --zone=public --add-port=3690/tcp
# firewall-cmd --reload

svn editor 설정

# SVN_EDITOR=/usr/bin/vim
# export SVN_EDITOR

svn 기본 디렉토리 만들기

$ svn mkdir svn://localhost/work2

svn 데몬 자동실행

$ sudo vi /etc/rc.local

# Subversion
svnserve -d -r /bluesanta/Repositories

서비스 등록

$ vi svnserve

#! /bin/sh
### BEGIN INIT INFO
# Provides:          svnserve
# Required-Start:    $local_fs $syslog $remote_fs
# Required-Stop:     $local_fs $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start svnserve
### END INIT INFO

# Author: Michal Wojciechowski 

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="svnserve"
NAME=svnserve
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="-d -r /bluesanta/Repositories"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

[ -x "$DAEMON" ] || exit 0

[ -r /etc/default/$NAME ] && . /etc/default/$NAME

. /lib/init/vars.sh

. /lib/lsb/init-functions

do_start()
{
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                || return 1
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                $DAEMON_ARGS \
                || return 2
}

do_stop()
{
        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
        RETVAL="$?"
        [ "$RETVAL" = 2 ] && return 2
        start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
        [ "$?" = 2 ] && return 2
        rm -f $PIDFILE
        return "$RETVAL"
}

case "$1" in
  start)
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
        do_start
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  restart|force-reload)
        log_daemon_msg "Restarting $DESC" "$NAME"
        do_stop
        case "$?" in
          0|1)
                do_start
                case "$?" in
                        0) log_end_msg 0 ;;
                        1) log_end_msg 1 ;; # Old process is still running
                        *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
          *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
        exit 3
        ;;
esac

exit 0

$ vi /bluesanta/Repositories/conf/svnserve.conf

# authz-db = authz    -> 주석제거

서비스 목록 확인
$ service --status-all

권한 파일 수정
$ sudo vi authz

내용 추가

[/android_library]

bluesanta = rw


[/delphi.vcl]

bluesanta = rw


[/work2]

bluesanta = rw

서비스 다시 시작
$ sudo killall svnserve
$ sudo svnserve -d -r /bluesanta/Repositories



728x90
728x90

출처 : Ubuntu 14.04 LTS 내게 맞게 설정하기

SSHD 설치

$ sudo apt-get install openssh-server

RDP 설치

출처 : Ubuntu 14.04 원격 접속(xrdp) 설정

$ sudo apt-get install xrdp
$ sudo apt-get install xfce4

XRDP 시작

$ sudo vi /etc/xrdp/startwm.sh

#!/bin/sh

if [ -r /etc/default/locale ]; then
  . /etc/default/locale
  export LANG LANGUAGE
fi

#. /etc/X11/Xsession
. /usr/bin/startxfce4

XRDP 시작

$ sudo /etc/init.d/xrdp start
 * Starting Remote Desktop Protocol server 
   ...done.

우분투 소프트웨어 센터 Root 권한으로 실행하기

$ sudo software-center


-

728x90
728x90

출처 : Centos 토렌트 머신 만들기 ,Transmission 사용하기
Centos 6.5 - Transmission 설치 (torrent)

EPEL 설치

EPEL 설치 없이 설치 했더니 설치가 완벽하게 되지 않았습니다. EPEL 먼저 실치 해주세요.

# rpm -ivh http://mirror.us.leaseweb.net/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
yum -y upgrade

transmission 리스트 확인

# yum list | grep transmission
transmission.x86_64                      2.84-1.el7                   epel      
transmission-cli.x86_64                  2.84-1.el7                   epel      
transmission-common.x86_64               2.84-1.el7                   epel      
transmission-daemon.x86_64               2.84-1.el7                   epel      
transmission-gtk.x86_64                  2.84-1.el7                   epel      
transmission-qt.x86_64                   2.84-1.el7                   epel      

transmission 설치

설치 중간에 transmission-gtk-2.84-1.el7.x8 FAILED가 있습니다.
EPEL 설치가 먼저 선행되지 않아서 발생한 오류 입니다.
EPEL 설치 후 reinstall 한 로그까지 올립니다.

# yum install transmission transmission-daemon

출처 사이트에서 copy 했더니 No package transmission-deamon available.
daemon 철자도 잘 못 적었네요

# yum install transmission transmission-deamon
Loaded plugins: fastestmirror, langpacks, priorities
Loading mirror speeds from cached hostfile
 * base: ftp.neowiz.com
 * epel: mirror.premi.st
 * extras: ftp.neowiz.com
 * nux-dextop: mirror.li.nux.ro
 * rpmforge: ftp.neowiz.com
 * updates: ftp.daum.net
No package transmission-deamon available.
Resolving Dependencies
--> Running transaction check
---> Package transmission.x86_64 0:2.84-1.el7 will be installed
--> Processing Dependency: transmission-gtk for package: transmission-2.84-1.el7.x86_64
--> Processing Dependency: transmission-cli for package: transmission-2.84-1.el7.x86_64
--> Running transaction check
---> Package transmission-cli.x86_64 0:2.84-1.el7 will be installed
--> Processing Dependency: transmission-common for package: transmission-cli-2.84-1.el7.x86_64
---> Package transmission-gtk.x86_64 0:2.84-1.el7 will be installed
--> Running transaction check
---> Package transmission-common.x86_64 0:2.84-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================
 Package                   Arch         Version           Repository  Size
===========================================================================
Installing:
 transmission              x86_64       2.84-1.el7        epel        18 k
Installing for dependencies:
 transmission-cli          x86_64       2.84-1.el7        epel       259 k
 transmission-common       x86_64       2.84-1.el7        epel       730 k
 transmission-gtk          x86_64       2.84-1.el7        epel       819 k

Transaction Summary
===========================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 1.8 M
Installed size: 6.5 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): transmission-2.84-1.el7.x86_64.rpm             |  18 kB   00:02     
transmission-gtk-2.84-1.el7.x8 FAILED                                          
http://mirror01.idc.hinet.net/EPEL/7/x86_64/t/transmission-gtk-2.84-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirror01.idc.hinet.net; Name or service not known"
Trying other mirror.
(2/4): transmission-common-2.84-1.el7.x86_64.rpm      | 730 kB   00:01     
(3/4): transmission-cli-2.84-1.el7.x86_64.rpm         | 259 kB   00:02     
(4/4): transmission-gtk-2.84-1.el7.x86_64.rpm         | 819 kB   00:07     
---------------------------------------------------------------------------
Total                                         167 kB/s | 1.8 MB  00:10     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : transmission-common-2.84-1.el7.x86_64                   1/4 
  Installing : transmission-cli-2.84-1.el7.x86_64                      2/4 
  Installing : transmission-gtk-2.84-1.el7.x86_64                      3/4 
  Installing : transmission-2.84-1.el7.x86_64                          4/4 
  Verifying  : transmission-cli-2.84-1.el7.x86_64                      1/4 
  Verifying  : transmission-common-2.84-1.el7.x86_64                   2/4 
  Verifying  : transmission-gtk-2.84-1.el7.x86_64                      3/4 
  Verifying  : transmission-2.84-1.el7.x86_64                          4/4 

Installed:
  transmission.x86_64 0:2.84-1.el7                                         

Dependency Installed:
  transmission-cli.x86_64 0:2.84-1.el7                                     
  transmission-common.x86_64 0:2.84-1.el7                                  
  transmission-gtk.x86_64 0:2.84-1.el7                                     

Complete!
# rpm -ivh http://mirror.us.leaseweb.net/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
http://mirror.us.leaseweb.net/epel/7/x86_64/e/epel-release-7-5.noarch.rpm(을)를 복구합니다
준비 중...                         ################################# [100%]
        epel-release-7-5.noarch 패키지는 이미 설치되어 있습니다
# yum reinstall transmission transmission-daemon
Loaded plugins: fastestmirror, langpacks, priorities
Loading mirror speeds from cached hostfile
 * base: ftp.neowiz.com
 * epel: mirror.premi.st
 * extras: ftp.neowiz.com
 * nux-dextop: mirror.li.nux.ro
 * rpmforge: ftp.neowiz.com
 * updates: ftp.daum.net
Resolving Dependencies
--> Running transaction check
---> Package transmission.x86_64 0:2.84-1.el7 will be reinstalled
---> Package transmission-daemon.x86_64 0:2.84-1.el7 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================
 Package                   Arch         Version           Repository  Size
===========================================================================
Reinstalling:
 transmission              x86_64       2.84-1.el7        epel        18 k
 transmission-daemon       x86_64       2.84-1.el7        epel       263 k

Transaction Summary
===========================================================================
Reinstall  2 Packages

Total size: 281 k
Total download size: 263 k
Installed size: 545 k
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for epel
transmission-daemon-2.84-1.el7.x86_64.rpm             | 263 kB   00:04     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : transmission-2.84-1.el7.x86_64                          1/2 
  Installing : transmission-daemon-2.84-1.el7.x86_64                   2/2 
  Verifying  : transmission-daemon-2.84-1.el7.x86_64                   1/2 
  Verifying  : transmission-2.84-1.el7.x86_64                          2/2 

Installed:
  transmission.x86_64 0:2.84-1.el7 transmission-daemon.x86_64 0:2.84-1.el7

Complete!
# 

환경 설정 (/var/lib/transmission/.config/transmission-daemon/settings.json)

서비스가 종료된 경우만 수정 가능

IP filter 설정

"blocklist-enabled": true,
"blocklist-url": "http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz"

외부 웹 접속 설정

"rpc-authentication-required": true, 
"rpc-url": "/transmission/", 
"rpc-username": "admin",
"rpc-enabled": true, 
"rpc-password": "admin12", 
"rpc-port": 9091, 
"rpc-whitelist": "127.0.0.1", 
"rpc-whitelist-enabled": false, 

최대 다운로드, 최대 업로드 관련 설정

"speed-limit-down-enabled": true 일 경우에만 speed-limit-down 가 적용
"speed-limit-up-enabled": true 일 경우에만 speed-limit-up 가 적용

"speed-limit-down": 100, 
"speed-limit-down-enabled": false, 
"speed-limit-up": 100, 
"speed-limit-up-enabled": false, 

다운로드 경로 설정

"download-dir": "/bluesanta/torrent/torrent.temp", 
"incomplete-dir": "/bluesanta/torrent/torrent.incoming", 
"incomplete-dir-enabled": true, 

서비스 등록

# chkconfig --level=2345 transmission-daemon on

서비스 시작

# service transmission-daemon start
Redirecting to /bin/systemctl start  transmission-daemon.service

서비스 종료

# service transmission-daemon stop
Redirecting to /bin/systemctl stop  transmission-daemon.service

웹 접속

transmisson-remote-gui

https://code.google.com/p/transmisson-remote-gui/


728x90
728x90

출처 : 리눅스에서 ntfs mount 하기

Windows가 설치된 Disk의 파티션 정보 확인

아래 보시면 NTFS로 된 파티션은 보이지 않습니다.

# fdisk /dev/sdb

The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0xb43cf658

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Command (m for help): q

You have new mail in /var/spool/mail/root

yum 레포지토리 추가

# yum install yum-priorities

/etc/yum/pluginconf.d/priorities.conf 수정

/etc/yum/pluginconf.d/priorities.conf에 아래 내용 추가

check_obsoletes = 1
priority = 2
# cat /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1
check_obsoletes = 1
priority = 2

RepoForge 설치

http://pkgs.repoforge.org/rpmforge-release/ 사이트에 가셔서 자신의 OS 버전과 32/64Bit를 선택하셔서 설치합니다.

# rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
# yum check-update
# yum install fuse fuse-ntfs-3g dkms dkms-fuse

UUID 확인

# blkid
/dev/sda1: SEC_TYPE="msdos" UUID="BC84-529B" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="113680b3-8adb-4d00-9ec4-7232e98dd266" 
/dev/sda2: UUID="deafe87f-919d-4488-99f9-56fcc70158bb" TYPE="xfs" PARTUUID="6a70f681-804f-47b7-87e4-d6fbec8ab8af" 
/dev/sda3: UUID="95cc2160-ee4e-4f30-b442-a3acead63b3d" TYPE="swap" PARTUUID="39c79053-b189-40f2-a804-369fef5cda33" 
/dev/sda4: UUID="5d75ed8e-fb21-4055-8ecd-dc21cec26b93" TYPE="xfs" PARTUUID="d81bc615-abf6-4525-a180-c4f088a1ece4" 
/dev/sdb1: LABEL="M-kM-3M-5M-jM-5M-," UUID="B81C7BB11C7B6970" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="a5cb2093-6fca-4e1b-84e9-62dd8000d17d" 
/dev/sdb2: UUID="107D-CF7F" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="b9fb26cc-c793-4331-b400-59c56c8ce8c0" 
/dev/sdb4: UUID="80AC85D7AC85C85C" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="2c3655ba-a472-4331-9ef4-9215b892efd3" 
/dev/sdb5: LABEL="M-lM-^CM-^H M-kM-3M-<M-kM-%M-(" UUID="00A6BE42A6BE37CC" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="fdd39d2b-f85e-499e-bf8a-45f99abded8a" 
/dev/sdb6: UUID="0edf8b89-df2e-48f8-bf45-887c57363b5a" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="ca0981f4-073c-477b-a20a-9f2e0d2d79b3" 

자동마운트 /etc/fstab 추가

추가전

# cat /etc/fstab 
UUID=5d75ed8e-fb21-4055-8ecd-dc21cec26b93 /                       xfs     defaults        1 1
UUID=deafe87f-919d-4488-99f9-56fcc70158bb /boot                   xfs     defaults        1 2
UUID=BC84-529B          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
UUID=95cc2160-ee4e-4f30-b442-a3acead63b3d swap                    swap    defaults        0 0

추가후

$ cat /etc/fstab 
UUID=5d75ed8e-fb21-4055-8ecd-dc21cec26b93 /                       xfs     defaults        1 1
UUID=deafe87f-919d-4488-99f9-56fcc70158bb /boot                   xfs     defaults        1 2
UUID=BC84-529B          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
UUID=95cc2160-ee4e-4f30-b442-a3acead63b3d swap                    swap    defaults        0 0
UUID=0edf8b89-df2e-48f8-bf45-887c57363b5a /bluesanta              ext4    defaults        1 1

USB 하드 디스크 마운드

디스크 확인

$ sudo fdisk -l

mount

$ sudo mount -t ntfs-3g /dev/sdc1 /disk_iodd

USB 분리

$ sudo umount /disk_iodd
$ sudo eject /dev/sdc1
728x90
728x90

출처 : 리눅스 svn서버 설치 및 설정
SVN 권한 설정
[Centos] Subversion 설치하기
CentOS에 Subversion 설치후 설정하기

svn server 설치

# yum -y install subversion

Repositories 디렉토리 생성

# mkdir /bluesanta/Repositories

svn 새로운 빈 저장소를 생성

# svnadmin create --fs-type fsfs /bluesanta/Repositories

svn 환경파일(/conf/svnserve.conf) 수정

# vi /bluesanta/Repositories/conf/svnserve.conf

[general]
#인증되지않은(즉 계정이 없는) 사용자에 대해 접근을 거부한다.
anon-access = none
#인증된 사용자에 대해 쓰기 권한을 준다.
auth-access = write
#인증된 사용자에 대한 계정 정보(아이디/패스) 정보가 기록된 파일명을 의미한다.(기본값 passwd) 
password-db = passwd
#인증된 사용자에 대해 저장소에 대한 권한 설정이 기록된 파일명(기본값)
#authz-db = authz
#현재 파일에 해당되는 저장소의 영역에 대해 설정
#realm = bluesanta_proj

사용자 관리(/conf/passwd) 파일

# vi passwd

[users]
bluesanta = {password}

사용자 관리(/conf/authz) 파일

# vi authz

[/android_library]
bluesanta = rw

svn 시작

# svnserve -d -r /bluesanta/Repositories

svn 종료

# killall svnserve

svn 포트 개발(3690)

# firewall-cmd --permanent --zone=public --add-port=3690/tcp
# firewall-cmd --reload

svn editor 설정

# SVN_EDITOR=/usr/bin/vim
# export SVN_EDITOR

svn 기본 디렉토리 만들기

svn 디렉토리 삭제

svn 목록 조회

# svn list svn://127.0.0.1
android_library/

svn 서비스 등록

환경파일 생성

# vi /etc/sysconfig/subversion

# Configuration file for the Subversion service 
# 
# To pass additional options (for instace, -r root of directory to # server) to the svnserve binary at startup, set OPTIONS here. 
# 
#OPTIONS= 
OPTIONS="--threads --root /bluesanta/Repositories"

서비스 등록 스크립트 작성

# vi /etc/init.d/subversion

#!/bin/bash 
# 
#   /etc/rc.d/init.d/subversion 
# 
# Starts the Subversion Daemon 
# 
# chkconfig: 2345 90 10 
# description: Subversion Daemon
# processname: svnserve
source /etc/rc.d/init.d/functions
[ -x /usr/bin/svnserve ] || exit 1
### Default variables 
SYSCONFIG="/etc/sysconfig/subversion"
### Read configuration 
[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
RETVAL=0 
prog="svnserve" 
desc="Subversion Daemon"
start() { 
        echo -n $"Starting $desc ($prog): " 
   daemon $prog -d $OPTIONS 
   RETVAL=$? 
   [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog 
   echo 
}
stop() { 
   echo -n $"Shutting down $desc ($prog): " 
   killproc $prog 
   RETVAL=$? 
   [ $RETVAL -eq 0 ] && success || failure 
   echo 
   [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog 
   return $RETVAL 
}
case "$1" in 
  start) 
   start 
   ;; 
  stop) 
   stop 
   ;; 
  restart) 
   stop 
   start 
   RETVAL=$? 
   ;; 
  condrestart) 
        [ -e /var/lock/subsys/$prog ] && restart 
   RETVAL=$? 
   ;; 
  *) 
   echo $"Usage: $0 {start|stop|restart|condrestart}" 
   RETVAL=1 
esac
exit $RETVAL

서비스 등록

# chmod +x /etc/init.d/subversion
# cd /etc/init.d/
# chkconfig --add subversion && chkconfig subversion on

서비스 시작

# service subversion start

서비스 시작 확인

# netstat -atnp | grep svn
tcp        0      0 0.0.0.0:3690            0.0.0.0:*               LISTEN      3459/svnserve       

서비스 중단

# service subversion stop
728x90
728x90

출처 :

root password change

$ sudo passwd root 
Enter new UNIX password: 
Retype new UNIX password: passwd: 
password updated successfully 
$ su - root Password: 

sshd 설치

출처 : [우분투] ssh 설치, 접속테스트
[우분투] SSH Server 설치하기

sshd 설치 확인

$ dpkg -l | grep ssh
ii  openssh-client                                1:6.6p1-2ubuntu2                                          amd64        secure shell (SSH) client, for secure access to remote machines
ii  ssh-askpass-gnome                             1:6.6p1-2ubuntu2                                          amd64        interactive X program to prompt users for a passphrase for ssh-add

sshd 설치

# apt-get install openssh-server

sshd 설치 확인

# # dpkg --get-selections | grep ssh 
openssh-client                                  install
openssh-server                                  install
openssh-sftp-server                             install
ssh-askpass-gnome                               install
ssh-import-id                                   install

sshd 서비스 실행 확인

# service ssh status
ssh start/running, process 24311

sshd 포트 확인

# netstat -ntlp | grep sshd 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      24311/sshd      
tcp6       0      0 :::22                   :::*                    LISTEN      24311/sshd      

한글 입력기 설치

출처 : 리눅스 민트 마야(Linux Mint Maya)에서 한글되게하기 & 한글 Grub

$ sudo apt-get install ibus-hangul

Chrome Remote Desktop

출처 : Chrome Remote Desktop

Setup key with:

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

Setup repository

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

크롬 브라우저 설치

# sudo apt-get update
# apt-get install google-chrome-stable

-

Chrome Remote Desktop Host Component

64Bit Chrome Remote Desktop Host Component

64Bit Chrome Remote Desktop Host Component

-

-

-


728x90
728x90

출처 : [VMware] CentOS 6.5 설치 (64bit)

Windows 8.1 설치

출처 : [Windows 7] (UEFI 환경에서)설치하기
UEFI 바이오스에 Windows 7를 깔자. (with USB 2.0)

Windows 8.1과 멀티 부팅을 위해서 Windows 8.1를 먼저 설치합니다.
grub2 에서 Windows 8.1를 인식하지 않아 몇 번을 포멧하고 설치했는데,
UEFI 환경에서는 GPT로 설치하니 바로 인식하네요.

용어 정리

(U)EFI = (Unified) Extensible Firmware Interface
MBR = Master Boot Record
GPT = GUID Partition Table

UEFI 부팅가능 윈도우8.1 설치 USB 만들기

출처 : How To Make UEFI Bootable USB Flash Drive to Install Windows 8
Windows 7, UEFI & MBR (Legacy) USB 메모리 부팅 디스크 만들기 정리

Rufus 다운로드 - https://rufus.akeo.ie/

GPT 파티션 설정

출처 : UEFI 기반 디스크 파티션 권장 구성
샘플: Windows PE 및 DiskPart를 사용하여 UEFI/GPT 기반 하드 드라이브 파티션 구성
[DiskPart] 새로운 파티션의 생성과 파티션 생성에 관한 이야기들 - Create Partition
GUI 모드 설치 동안 명령 프롬프트를 사용하는 방법

윈도우 설치시 [Shift] + [F10] 눌러 명령 프롬프트에서 diskpart 명령으로 disk를 gpt로 파티션을 설정합니다.
수동으로 efi나 msr를 나눌수 있지만 저의 경우는 수동으로 하는 경우 설치가 되지 않았습니다.

convert gpt만 하고 나머지는 윈도우 설치시 자동으로 만들어지도록 했습니다.

GPT 파티션 설정1 - 성공

select disk 0
clean
convert gpt
exit

GPT 파티션 설정2 - 실패(참고용)

select disk 0
clean
convert gpt
create partition efi size=200
format quick fs=fat32 label="System"
assign letter="S"
create partition msr size=128
create partition primary size=409600
format quick fs=ntfs label="Windows"
assign letter="C"
create partition primary 
format quick fs=ntfs label="Data"
assign letter="E"
exit

CentOS 7 설치

파티션 나누기

/boot/efi 200MB

/boot 500MB

swap 16G

/ 나머지

원격데스크탑(xrdp) 서버

출처 : CentOS 7 xrdp 설치 (원격데스크탑)
How to setup multimedia on CentOS 7

CentOS EPEL 설치

# yum install epel-release

Nux Dextop 설치

# yum -y install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

tigervnc-server 설치

# yum -y install xrdp tigervnc-server

서비스 시작

# systemctl start xrdp.service
# netstat -antup | grep xrdp

서비스 등록

# systemctl enable xrdp.service

방화벽 등록

# firewall-cmd --permanent --zone=public --add-port=3389/tcp
# firewall-cmd --reload

리눅스에서 파티션의 파일 시스템 타입 확인하기

출처 : 리눅스에서 파티션의 파일 시스템 타입 확인하기

# df -T
Filesystem     Type     1K-blocks    Used Available Use% Mounted on
/dev/sda4      xfs      107879972 4023324 103856648   4% /
devtmpfs       devtmpfs   3926824       0   3926824   0% /dev
tmpfs          tmpfs      3935416      92   3935324   1% /dev/shm
tmpfs          tmpfs      3935416    9060   3926356   1% /run
tmpfs          tmpfs      3935416       0   3935416   0% /sys/fs/cgroup
/dev/sda2      xfs         508588   94708    413880  19% /boot
/dev/sda1      vfat        204580    9764    194816   5% /boot/efi

GRUB2 - 멀티부팅 Windows 8.1 추가

출처 : GRUB2 문제해결 방안 (업그레이드)
리눅스에서 USB에 Grub2를 설치하여 멀티부팅하기
Installed Centos 7 after Windows and can't boot into CentOS
[기초] 리눅스와 솔라리스에서 HDD의 디바이스명
How can I change default Operating System in start up boot menu?
GRUB2 편집(설정)하기
Searching for grub configuration file in CentOS 7

HDD 번호 구하기

$ cd /dev
$ ls sd[a-b]* 
sda sda1 sda2 sda3 sda4 sdb sdb1 sdb2 sdb3

HDD 번호 구하기

# fdisk -l

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 128.0 GB, 128035676160 bytes, 250069680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


##         Start          End    Size  Type            Name
 1         2048       411647    200M  EFI System      EFI System Partition
 2       411648      1435647    500M  Microsoft basic 
 3      1435648     17819647    7.8G  Linux swap      
 4     17819648    250068991  110.8G  Microsoft basic

HDD 번호 구하기

# blkid
/dev/sdb2: UUID="9AC6C014C6BFEE9F" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="d485b724-7359-44f1-bc99-665753184bfe" 
/dev/sda1: SEC_TYPE="msdos" UUID="B103-32BF" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="0400f6fa-6526-4e7d-a6b4-de74988b5fa1" 
/dev/sda2: UUID="02c346cb-1715-4f10-b980-3ea4249971cf" TYPE="xfs" PARTUUID="4032751a-ca18-4501-a77b-318c4e28c803" 
/dev/sda3: UUID="f1c1b570-7d4e-4e89-8d30-7aabfc1c0e48" TYPE="swap" PARTUUID="6ffe21fa-d375-423c-af13-6064a1547e13" 
/dev/sda4: UUID="9ecf80da-6052-4260-bca9-93a797297b48" TYPE="xfs" PARTUUID="12c2f2b8-4f2f-414c-8f70-1ce21cfc2f81" 

자동 설정

출처 : GRUB2 간단하게 시작하기

GRUB2는 초기부터 grub2-mkconfig 프로그램으로 설정 파일을 생성하여 설정했습니다.

grub2-mkconfig/etc/grub.d의 템플릿 섹션을 기반으로 설정파일을 만듭니다. 기본 템플릿은 대부분의 일반 부팅 설정을 다루어야합니다. 

# grub2-mkconfig --output=/boot/grub2/grub.cfg

/boot/grub2/grub.cfg 내용 일부

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sdb2)' --class windows --class os $menuentry_id_option 'osprober-efi-107D-CF7F' {
        insmod part_gpt 
        insmod fat
        set root='hd1,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  107D-CF7F
        else
          search --no-floppy --fs-uuid --set=root 107D-CF7F
        fi
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###

grub-customizer 설치

출처 : grub-customizer-4.0.6-1.el7.x86_64.rpm
YUM epel 저장소 추가

epel-release 다운받기

http://dl.fedoraproject.org/pub/epel/7/x86_64/

epel-release 설치

# rpm -Uvh epel-release*rpm
경고: epel-release-7-5.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
준비 중...                         ################################# [100%]
Updating / installing...
   1:epel-release-7-5                 ################################# [100%]

grub-customizer 설치

# yum install grub-customizer


728x90
728x90

출처 : mysql - 외부접속 허용하기 
Install/Upgrade to MySQL 5.6 on Ubuntu 12.04 LTS
LINUX에 MySQL 소스 코드로 컴파일하여 설치 & 실행하기
[설치] MySQL 5.5

필요한 라이브러리 설치

sudo apt-get install gcc g++ libncurses5-dev libxml2-dev openssl libssl-dev curl libcurl4-openssl-dev libjpeg-dev libpng-dev libfreetype6-dev libsasl2-dev autoconf libncurses5-dev

다운로드

$ wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.3-m13.tar.gz

MySQL 계정 만들기

sudo groupadd mysql
sudo useradd -g mysql mysql
sudo passwd mysql
sudo mkdir /home/mysql
sudo chown mysql:mysql /home/mysql
tar zxvf mysql-5.7.3-m13.tar.gz
cd mysql-5.7.3-m13

MySQL 소스 컴파일

cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DMYSQL_DATADIR=/usr/local/mysql/data \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_SSL=system 

잘 모르는 옵션이라 빼둠

-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.socket 


sudo make
sudo make install

디렉토리 권한 변경

sudo chown -R mysql:mysql /usr/local/mysql

MySQL Database 생성

$ cd /usr/local/mysql
$ sudo scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data 

부팅시 자동 시작 설정

$ sudo cp support-files/mysql.server /etc/init.d/mysqld

/etc/init.d/mysqld 수정 - parse_server_arguments 주석처리 

$ sudo vi /etc/init.d/mysqld

# 주석처리
#parse_server_arguments `$print_defaults $extra_args mysqld server mysql_server mysql.server`

MySQL실행 

$ service mysqld start

부팅시 자동 시작 설정

$ sudo update-rc.d mysqld defaults
$ sudo apt-get install sysv-rc-conf
$ sudo sysv-rc-conf --list

root 암호 설정

$ sudo service mysqld stop
$ sudo bin/mysqld_safe --skip-grant-tables --old-passwords &
mysql> use mysql;
mysql> update user set password=password('sqldba') where user = 'root';
mysql> flush privileges;
mysql> quit
$ sudo service mysqld start
$ sudo bin/mysql -u root -p

ssh 데몬 설치

sudo apt-get install openssh-server
sudo init 6 (재부팅)

MySQL - SQLGate로 SSH 터널링을 통해 연결하기

728x90

+ Recent posts