김보안의 블로깅
  • 🏠 Home
  • 📚 Project
    • Blockchain
      • 🎦 PickMe
      • 🎦 IoTC
      • 🎦 Blackchain
      • 📃 Gemology
      • 🎦 PickMe
      • 🎦 PickMe
    • AI
      • 👋 A.I. Dream Reader
      • 🎦 A.I. Dream Reader
    • Security
      • 🎦 SNAC
    • Education
      • 🎦 Smart Lecture
  • 🤸‍♂ Hobby
    • Music
      • Violin
      • Guitar
      • Piano
      • Drum
    • Flower
      • Flower Certificate
    • Sport
      • Ski
      • Skateboard
      • Golf
      • Boxing
레이블이 install인 게시물을 표시합니다. 모든 게시물 표시
레이블이 install인 게시물을 표시합니다. 모든 게시물 표시

2017년 5월 4일 목요일

노트북에 칼리 리눅스 설치하기

 SecureKim     오전 12:26     깔기, 노트북, 리눅스, 설치, 칼리, 한글, 한글 깨짐, install, Kali, linux, OS, secure boot     7 comments   



드디어 저만의 리눅스 PC를 갖게 되었네요.

한성컴퓨터... 예전에 기계식 키보드를 하나 샀었는데 가성비가 좋길래

이번에 OS 없는 리퍼비시로 노트북 하나 장만 했습니다.



설치 순서는 다음과 같습니다.

1. 칼리 리눅스 다운로드
https://www.kali.org/downloads/

2. USB에 이미지 굽기
https://sourceforge.net/projects/win32diskimager/
또는
https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
다운 받으셔서 이미지를 write 하세요. 캡쳐한 사진이 없는데
UI 가 직관적이라 바로 아실겁니다.

3. secure-boot disable
부팅하면 BIOS(파란화면) 나오는데 boot 부분에서
USB 부팅을 Enable 하도록 선택하시면 됩니다.

그런데 USB 부팅시 secure-boot 가 어쩌고 하면서 진행이 안되는 문제가 있으실텐데
그건 노트북에 secure-boot 가 적용되어 있기 때문입니다.

secure-boot 는 부팅이미지의 서명을 확인하는데,
저희가 깔려고 하는 칼리 리눅스를 거부합니다. secure-boot 를 끄면 됩니다.

4. 칼리 리눅스 설치
설치 안내 나오는 대로 잘 따라하시면 됩니다.
잘 모르겠으면 Default 값 선택하세요.

4. 설치 끝나고 재부팅 해도 칼리로 시작이 안될 때
BIOS 설정에서 f3 인가 f6인가 ... 누르면 기본 세팅으로 시작이 됩니다. 
화면 우하단쪽에 설명 잘 보시고 기본 세팅으로 시작하시면 됩니다.

5. 한글 깨짐 현상
이 글을 보고 계시는 분들은 대부분 칼리를 한글로 설치하셨을 겁니다.
그러면 시작하자마자 굉장히 당황하시게 됩니다.

왜냐하면 글자가 다 깨지기 때문이죠...
일단 저는 네트워크를 연결하지 않은 상태에서 설치했기 때문에

cat /etc/apt/sources.list 해서 수정 했습니다.




그리고
apt-get update
apt-get install fonts-nanum*
apt-get install fcitx-hangul
apt-get install fcitx-lib*
reboot

하시면 한글이 잘 나오고 한영 변환도 잘 될겁니다.

이제 재밌는거 많이 해 볼 생각이에요 후후후


+추가
도저히 한영 변환이 안될때는
im-config 에서 ibus를선택하고
ibus-hangul 을 설치
ibus-setup 에서 input-method -> Add 에서 한글 선택
 그리고 설정 -> 지역 및 언어 -> 입력소스에서 한국어 (Hangul) 을 선택해준다.

이후 화면 최상단 우측에 언어모양 클릭하고
한글상태 On -> 설정에서 단축키 변경


Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

2013년 11월 2일 토요일

[CentOS] Security (보안 설정)

 SecureKim     오전 6:04     보안, 설치, Centos, chkrootkit, install, Security, sshguard, TCP Wrapper     No comments   

CentOS 6.x 기준

SSH 로그인
vi /etc/ssh/sshd_config

#루트권한 로그인을 막으려면 파일을 열어 다음을 추가한다.
PermitRootLogin no

#패스워드 없는 계정으로 로그인이 불가능 하도록 한다.
PermitEmptyPaswords no

TCP Wrapper
vi /etc/hosts.allow
#Wrapper를 이용하여 방화벽 역할을 하게 한다.
#ftp 데몬을 들어오는것 중 211.189 대역 허용
in.ftpd:211.189.0.0/255.255.0.0

vi /etc/hosts.deny
#인가 되지 않은 것은 모두 막는다.
ALL:ALL

sshguard 설치
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://sourceforge.net/projects/sshguard/files/sshguard/sshguard-1.5/sshguard-1.5.tar.bz2/download
bunzip2 sshguard-1.5.tar.bz2
tar -xvf sshguard-1.5.tar
cd sshguard-1.5
sudo yum install gcc make
sudo ./configure --with-firewall=iptables
sudo make && sudo make install

chkrootkit 설치
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install chkrootkit
#실행시킨다
chkrootkit 



보안은 양날의 칼입니다. 보안을 강화하면 불편해지고 느려지죠

편리하고 빠르면서도 강한 보안을 갖게 할 수는 없을까요?...

다음은 방화벽에 대해 포스팅 해 보도록 하겠습니다.

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

2013년 9월 1일 일요일

[CentOS 6.x] 각종 서버 설치하기

 SecureKim     오전 1:54     서버 설치, 설정, 설치, 파일공유 설치, apache 설치, Centos, install, mysql, Nginx 설치, Node 설치, PHP 설치, Predis 설치, Redis 설치, samba 설치     No comments   

**기본

yum -y update
yum -y groupinstall "Development Tools"

**NginX


#wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
#rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
#yum install nginx
#service nginx start

Nginx는 /etc/nginx/nginx.conf 요 파일이 /etc/nginx/conf.d/default.conf 파일을 인클루드 하고 있습니다.
두 파일은 혹시나 모르니 cp 명령어로 백업 해놓으시고

worker_processes 부분에는 하드웨어 코어 개수만큼 숫자를 적어 줍니다.

#vi /etc/nginx/nginx.conf

user              nginx;
worker_processes  4;
error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /var/log/nginx/access.log  main;
    sendfile        on;
    keepalive_timeout  30;
    server {
        listen       80;
        server_name  _;
        location / {
            root   /usr/share/nginx/html;
            index  index.php index.html index.htm;
        }
        error_page  404              /404.html;
        location = /404.html {
            root   /usr/share/nginx/html;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
        location ~* \.php$ {
            root           /usr/share/nginx/html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO $fastcgi_script_name;
            include        fastcgi_params;
        }
    }
    include /etc/nginx/conf.d/*.conf;
}



#vi /etc/nginx/conf.d/default.conf
server {
    listen       80;
    server_name  _;
    location / {
        root   /usr/share/nginx/html;
        index  index.php index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
    location ~ \.php$ {
        root           /usr/share/nginx/html;
        try_files $uri =404;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}

service nginx restart 

**Apache 

전 리버스 프록시를 이용해 PHP 요청은 아파치가 처리하도록 했기 때문에 설치했는데
Nginx만 쓰면 굳이 설치할 필요는 없습니다.

#yum -y install httpd

구동하는 포트넘버가 80으로 되어있는데 Nginx랑 겹치니까 다른걸로 바꿔주면 됩니다.

service httpd restart


**Mysql

#yum -y install mysql mysql-server
#mysqladmin -u root password 비밀번호

패스워드 설정해줍니다.

참고로 자료 백업 및 복구할 때(전체)
백업 : mysqldump -u root -p --all-databases > 파일명.sql
복구 : mysql -u root -p < 파일명.sql

특정 테이블만 하는거면 저기 -p 뒤에 테이블 명 쓰면 됩니다.

그리고 처음에 원격접속 허용하려면 service mysqld start 로 시작한 후

 mysql -u root -p 로 로그인하고,

use mysql; 한 다음 host 컬럼을 %로 바꾸면 원격으로도 접속이 가능합니다.

UPDATE `mysql`.`user`
SET `Host`='%'
WHERE `Host`='localhost' AND `User`='root';

service mysqld restart


**REDIS

#cd /usr/local/src
#wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz
#tar xvfz redis-2.6.14.tar.gz
#cd redis-2.6.14
#make -j4 && make install  -j4

redis-server&


**Node

#yum -y update
#yum -y groupinstall "Development Tools"

#wget http://nodejs.org/dist/v0.10.17/node-v0.10.17.tar.gz
#tar zxf node-v0.10.17.tar.gz
#cd node-v0.10.17
#./configure
#make
#make install

모듈들 설치는

#npm -g install 설치할모듈

실행은

#node 실행할파일

**PHP

#yum -y install
php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-fpm

php.ini 파일 수정해서
short_open_tag = On 해줍니다.

우린 PHP-FPM 사용할거니까

service php-fpm restart

*Predis (PHP 와 Redis 연결)

#pear channel-discover pear.nrk.io
#pear install nrk/Predis



**Samba

이건 다 아시겠지만 윈도우처럼 파일 공유하는 서비스입니다.

yum install samba
smbpasswd -a 사용자명      // 패스워드설정
service smb start

아무리 권한을 추가해도 권한 문제가 생긴다면

vi /etc/selinux/config
Set
//SELINUX=enforcing 이걸
SELINUX=disabled //요렇게 고치면 됩니다.

vi /etc/samba/smb.conf 
를 열어서 여러가지 수정을 해줍니다.

server string = Server name
hosts allow = lo eth0 11.22.33.   // 11.22.33 대역 접속 허용 설정
[share]
    comment = hi
    path = /usr/share/nginx
    writable = yes
    valid user = by

이것은 by라는 사용자에게 /usr/share/nginx 디렉토리를 공유할 수 있도록 한 것입니다.

권한 문제가 있다면 user의 디렉토리와 /etc/passwd 의 디렉토리를 같게 해주고

chmod 755 등으로 해당 디렉토리에 권한을 줘봅니다.

/sbin/service smb restart 


***6시간짜리 팁

이렇게 하고 Nginx와 PHP-FPM 이 연동이 안됬습니다.

php -v , php-fpm -v 로 버젼을 확인해보니 5.3

혹시나해서 5.5로 업데이트 해보았습니다.

#rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
#rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

#yum --enablerepo=remi,remi-test install httpd mysql mysql-server php php-common

#yum --enablerepo=remi,remi-test install php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo

그래도 안되서 권한부터 시작해서 온갖 걸 다 해봤습니다.

/var/log/nginx/error.log 파일을 열어보면 에러로그들이 있죠

계속해서 살펴보던 중 시스템 시각과 현재 시각이 맞지 않다는 것을 알게 되었고

시간이나 맞춰야지 하고

rdate -s time.bora.net

...

갑자기 잘됨

ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ???????????????????



Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
이전 게시물 홈

페이지

  • 홈
  • Hobby

Categories

  • AI
  • AWS
  • Blockchain
  • Hardware
  • Javascript
  • Node.js
  • Plasma
  • Security
  • Study
  • Video
  • android
  • mysql
  • review
  • windows

Popular Posts

  • Termux 로 안드로이드에 우분투(GUI)와 VSCode설치하기
      많은 글들이 있지만 뭔가 대부분 잘 안됐다. 이번 기회에 정리한다. 0. 먼저 Termux와 Remote Desktop Manager를 설치한다. Remote Desktop Manager 대신 아래도 나쁘지 않다. 화면이 작지만 마우스 스크롤이나 ...
  • 회사 프록시와 인증서에 고통받는 그대를 위한 글 (Bash, Gradle, Python, wget, nodejs(npm), apt-get, cURL, git, yarn, androidStudio)
    대기업에 입사하면 장단점이 있는데, 단점 중에 하나가 회사에서 프록시를 사용하여 트래픽 감시를 하므로 프록시 설정을 해주어야 한다는 점 입니다. 특히, 회사에서는 https 트래픽도 감시를 하므로 인증서도 설정해 주어야 합니다. 그런데 문...
  • 블랙보드 강의 녹화 영상 다운로드 가능한 방법 (노설치)
    별도의 설치도 필요 없고 아주 쉽습니다. 구글 크롬브라우저 에서 블랙보드 녹화 영상에  다운로드 가능한 메뉴가 나오게 하는 코드입니다.  먼저 블랙보드 강의자료에 입장하고, 재생 버튼을 클릭 하지 않은 상태로 F12 를 입력합니다. 재생을 클릭하지 마...

Blog Archive

  • ▼  2025 (2)
    • ▼  8월 (1)
      • 삼성 안드로이드 폰에서 루팅, tcpdump 없이 패킷 덤프하기 (BLE, Wifi 모두 ...
    • ►  7월 (1)
  • ►  2024 (2)
    • ►  11월 (2)
  • ►  2023 (2)
    • ►  10월 (1)
    • ►  1월 (1)
  • ►  2022 (10)
    • ►  12월 (1)
    • ►  11월 (3)
    • ►  9월 (1)
    • ►  8월 (1)
    • ►  6월 (2)
    • ►  3월 (2)
  • ►  2021 (9)
    • ►  12월 (3)
    • ►  11월 (1)
    • ►  6월 (1)
    • ►  5월 (2)
    • ►  4월 (2)
  • ►  2020 (12)
    • ►  10월 (1)
    • ►  9월 (2)
    • ►  7월 (1)
    • ►  6월 (1)
    • ►  5월 (5)
    • ►  4월 (1)
    • ►  2월 (1)
  • ►  2019 (14)
    • ►  10월 (2)
    • ►  7월 (1)
    • ►  3월 (4)
    • ►  2월 (2)
    • ►  1월 (5)
  • ►  2018 (14)
    • ►  12월 (2)
    • ►  11월 (4)
    • ►  10월 (1)
    • ►  8월 (2)
    • ►  5월 (4)
    • ►  1월 (1)
  • ►  2017 (12)
    • ►  10월 (2)
    • ►  9월 (9)
    • ►  5월 (1)
  • ►  2016 (8)
    • ►  10월 (2)
    • ►  8월 (1)
    • ►  6월 (1)
    • ►  1월 (4)
  • ►  2015 (6)
    • ►  12월 (3)
    • ►  10월 (1)
    • ►  6월 (1)
    • ►  5월 (1)
  • ►  2014 (10)
    • ►  11월 (1)
    • ►  9월 (1)
    • ►  7월 (1)
    • ►  6월 (1)
    • ►  5월 (3)
    • ►  4월 (1)
    • ►  3월 (2)
  • ►  2013 (28)
    • ►  12월 (3)
    • ►  11월 (6)
    • ►  10월 (6)
    • ►  9월 (6)
    • ►  8월 (1)
    • ►  7월 (3)
    • ►  6월 (3)

구독

글
Atom
글
전체 댓글
Atom
전체 댓글

로드 중입니다...

각오

직접 해보지 않은 것은 포스팅 하지 않겠습니다.

Copyright © 김보안의 블로깅 | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates