2017년 3월 21일 화요일

시스코 라우터 설정 및 컨피그 설정


!
!
!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
no service dhcp
!
hostname ESW1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$EXc/$di1Le1wv9mcLDTQI6tvDr0
enable password 7 144603591B
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
no ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
vtp file nvram:vlan.dat

username buster password 7 025715091C
!
!
ip tcp synwait-time 5
!
!
!
interface FastEthernet0/0
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 duplex auto
 speed auto
!
interface Serial0/0
 no ip address
 no ip route-cache
 shutdown
 clock rate 2000000
!
interface FastEthernet0/1
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 duplex full
 speed 100
!
interface FastEthernet1/1
 duplex full
 speed 100
!
interface FastEthernet1/2
 duplex full
 speed 100
!
interface FastEthernet1/3
 duplex full
 speed 100
!
interface FastEthernet1/4
 duplex full
 speed 100
!
interface FastEthernet1/5
 duplex full
 speed 100
!
interface FastEthernet1/6
 duplex full
 speed 100
!
interface FastEthernet1/7
 duplex full
 speed 100
!
interface FastEthernet1/8
 duplex full
 speed 100
!
interface FastEthernet1/9
 duplex full
 speed 100
!
interface FastEthernet1/10
 duplex full
 speed 100
!
interface FastEthernet1/11
 duplex full
 speed 100
!
interface FastEthernet1/12
 duplex full
 speed 100
!
interface FastEthernet1/13
 duplex full
 speed 100
!
interface FastEthernet1/14
 duplex full
 speed 100
!
interface FastEthernet1/15
 duplex full
 speed 100
!
interface Vlan1
 ip address 10.180.1.1 255.255.255.0
 no ip route-cache
!
ip default-gateway 10.1.1.1
ip route 192.168.2.0 255.255.255.0 10.1.1.0
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
control-plane
!
!
!
!
!
!
!
!
banner exec

***************************************************************
This is a normal Router with a SW module inside (NM-16ESW)
It has been preconfigured with hard coded speed and duplex

To create vlans use the command "vlan database" from exec mode
After creating all desired vlans use "exit" to apply the config

To view existing vlans use the command "show vlan-switch brief"

Warning: You are using an old IOS image for this router.
Please update the IOS to enable the "macro" command!
***************************************************************


!
line con 0
 exec-timeout 0 0
 privilege level 15
 password 7 040A1A5418
 logging synchronous
 login
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 password 7 135406401C
 login
!
!
end
!
!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$gc7/$eOL9kEjSrkoCvjtcPYoLk0
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
username buster
!
!
ip tcp synwait-time 5
!
!
!
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial2/0
 ip address 10.1.1.2 255.255.255.0
 serial restart-delay 0
!
interface Serial2/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface FastEthernet3/0
!
interface FastEthernet3/1
!
interface FastEthernet3/2
!
interface FastEthernet3/3
!
interface FastEthernet3/4
!
interface FastEthernet3/5
!
interface FastEthernet3/6
!
interface FastEthernet3/7
!
interface FastEthernet3/8
!
interface FastEthernet3/9
!
interface FastEthernet3/10
!
interface FastEthernet3/11
!
interface FastEthernet3/12
!
interface FastEthernet3/13
!
interface FastEthernet3/14
!
interface FastEthernet3/15
!
interface Vlan1
 ip address 192.168.2.1 255.255.255.0
!
!
ip default-gateway 10.1.1.1
ip forward-protocol nd
ip route 10.180.1.0 255.255.255.0 Serial2/0
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 password 1q2w
 logging synchronous
 login
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 password 1q2w
 login
!
!
end

2017년 1월 25일 수요일

xterm 및 uxterm 의 백그라운드 색 변경

xterm 및 uxterm 의 백그라운드 색 변경
우선 사용자 홈 에서 다음 파일에 아래 코드삽입

 .Xresources



XTerm*foreground: rgb:b2/b2/b2
XTerm*background: rgb:08/08/08
XTerm*color0: rgb:28/28/28

! ...Lines omitted...

XTerm*color15: rgb:e4/e4/e4


UXTerm*foreground: rgb:b2/b2/b2
UXTerm*background: rgb:08/08/08
UXTerm*color0: rgb:28/28/28

! ...Lines omitted...

UXTerm*color15: rgb:e4/e4/e4


mariadb 외부 접속 방법 mysql 외부 접속 방법

1. mysql 접속 후 mysql database 선택 
mysql> use mysql;

2. user 테이블 살펴보기 
mysql> select host, user, password from user;

root 의 host 값들은 localhost, 127.0.0.1 등으로 기본 등록되어 있지만, 외부접속을 나타내는 값이 없다. 특정 아이피로 지정할 수도 있지만 여기선 % 기호로 어디서든 접속 가능하게 만든다. 

3. 권한 설정 
mysql> grant all privileges on *.* to 'root'@'%' identified by 'root의 패스워드';
Query OK, 0 rows affected (0.03 sec)

4. 등록확인하기
mysql> select host, user, password from user;

root 계정의 host 필드에 % 가 등록되었는지 확인한다. 

5. refrash
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

위 단계는 my.cnf 파일 수정후 서버를 재시작할 것이기 때문에 굳이 안해도 된다. 

6. my.cnf 에서 외부접속 관련사항 변경하기 
user@home:~$ sudo vim /etc/mysql/my.cnf 

파일 내용중 
bind-address = 127.0.0.1 
부분 주석처리후 저장하기 

7. mysql 재시작 
user@home:~$ sudo /etc/init.d/mysql restart 

8. 완료. 
이제 외부 클라이언트 프로그램에서 접속이 가능하다 ^^