BLOG GUESTBOOK
RSS
CATEGORY


Comments


Trackbacks

/etc/rc.local 파일에 데몬 실행문구를 넣어주면 된다.

예를 들어, transmission-daemon(토렌트 데몬이다)를 시스템 부팅 시 자동으로 실행되게 하려면 rc.local 파일에서 exit 0 윗줄에 transmission-daemon이라고 적어주면 된다.


그런데, rc.local에 들어가는 실행문구들은 기본적으로 root 계정에서 실행된다.

일반 사용자 계정에서 실행되도록 하고 싶다면

이런 식으로 적어주면 된다. 

transmission-daemon을 예로 들자면




Comments


Trackbacks

실제로 grub에 문제가 있을 가능성은 낮다!

혹시 랜선을 연결해놓고 설치중인데 실제로는 네트워크에 연결되지 않은 상태에 있지는 않은가?

아예 처음부터 랜선을 뽑고 설치를 진행하면 grub 문제도 아무렇지 않게 넘어갈 가능성이 크다!


Comments


Trackbacks

파티션 정보 보기

fdisk -l


파티션 마운트

mount -t (filesystem) (device) (path)


UUID 보기

ls -l /dev/disk/by-uuid

UUID와 관련하여 /etc/fstab 파일이 중요한 듯


Comments


Trackbacks

분명히 500GB짜리 하드 달린 넷북에 우분투를 깔았는데, 사용할 수 있는 용량이 고작 60GB 뿐이다. df나 du로는 /dev/sda7 말고는 파티션이 보이지를 않는다. 이럴 때 fdisk를 사용하면 모든 파티션을 다 구경할 수 있다!


루트권한은 필수


Linux:~$ fdisk -l


   Device Boot      Start         End      Blocks   Id  System

/dev/sda1            2048    41945087    20971520   27  Hidden NTFS WinRE

/dev/sda2   *    41945088    42149887      102400    7  HPFS/NTFS/exFAT

/dev/sda3        42149888   220407807    89128960    7  HPFS/NTFS/exFAT

/dev/sda4       220409854   488396799   133993473    f  W95 Ext'd (LBA)

/dev/sda5       220409856   354930107    67260126    7  HPFS/NTFS/exFAT

/dev/sda6       482865152   488396799     2765824   82  Linux swap / Solaris

/dev/sda7       354930688   482848767    63959040   83  Linux


장난 아니게 많은 파티션이 숨어있었다. 대충 보니까 윈도7 스타터 깔려있던 파티션을 삭제하지 않아서 생긴 문제인 듯 했다. 저 파티션들 안에 뭐가 들었는지 확인하는 방법은 없을까?

그럴 땐 mount를 이용하면 된다!
/dev/sda3은 NTFS 파일시스템이니까


이렇게 해주면 홈 디렉토리 아래 mnt에 해당 파티션이 마운트된다!
다 보고 나서는 umount ~/mnt 해주면 언마운트된다.


Comments


Trackbacks

root로 로그인 좀 해서 내 계정을 파려고 했더니 분명 비밀번호가 맞는데 루트 로그인이 실패한다ㅠㅠ 이거 하나 때문에 서버님 알현하러 학교 가는 것도 귀찮은데 방학 때


Using keyboard-interactive authentication.

자꾸 이게 뜨는거다. 뭐지 이게?

What the heck is "keyboard interactive" authentication?


"keyboard-interactive" user authentication is intended primarily to accomodate PAM authentication on the server side. It provides for a multiple challenge-response dialog with the user in which the server sends a text query to the user, the user types in a response, and this process can repeat any number of times. So for example, you might configure PAM for SSH with a module which performs authentication using an RSA security token, or a one-time password scheme. People become confused by this because by default, "keyboard-interactive" authentication usually just implements password authentication in a single challenge-response cycle, which just prompts for a password, thus looking exactly the same as "password" authentication. If you're not deliberately using both for different purposes, you may want to disable one or the other to avoid end-user confusion. 
(출처: http://www.snailbook.com/faq/keyboard-interactive.auto.html)
뭐라는겨.


어쨌든 해결 방법은,
/etc/ssh/sshd_config에서
PermitRootLogin을 yes로 바꿔주면 된다. 주석처리 되어있다면 주석처리도 해제.


Comments


Trackbacks

/etc/apache2/sites-enabled/000-default

<VirtualHost *:80>

        ServerAdmin contact@bestist.kr

        ServerName cloud.bestist.kr


        DocumentRoot /var/cloud


        <Directory "/var/cloud/">

                AllowOverride All

        </Directory>

</VirtualHost>


이런 식으로 계속 넣어주면 된다!


Comments


Trackbacks

1. /etc/network/interfaces

auto eth0

iface eth0 inet static

address xxx.xxx.xxx.xxx

netmask 255.255.255.0

gateway xxx.xxx.xxx.1

dns-nameservers 8.8.8.8 8.8.4.4

# prefer Google DNS


2. repo를 ftp.daum.net으로

sudo vi /etc/apt/sources.list

vim에서

:%s/archive.ubuntu.com/ftp.daum.net/g


3. apt-get install

openssh*

build-essential

mysql-server, client

phpmyadmin

apache2

php5, -dev

git-core

nodejs(이건 예전에는 ubuntu repo에 없어서 따로 추가했던 기억이 있는데 이젠 있음)

imagemagick(귀찮으니 걍 apt-get으로 깔아보자, source 받아서 컴파일 추천)

mongodb

libsqlite3-dev

libmysql-ruby, libmysqlclient-ruby

apache2-prefork-dev

htop


4. useradd

홈 폴더 접근 권한을 잘 주자...나중에 두번 일하면 귀찮음


5. sudoers는 admin group으로!


6. rvm을 설치해 보면서 dependency 해결

\curl -L https://get.rvm.io | bash -s stable --rails

* rvm으로 설치할 때에는 bashrc나 bash_profile에 추가할 것이 있다! 뭔지는 각자 검색ㄱ

* 설치만 끝났다고 넘어가지 말고 rails new 한 번 해보면 다시 문제가 수두룩하다...ㅎ


7. Apache listen port 바꾸기

/etc/apache2/ports.conf에 Listen 8000 추가


8. php 파일 자동 다운로드 방지!

/etc/apache2/mods-enabled/php5.conf에서 마지막 5줄 주석처리. 들어가 보면 안다. 주석 친절하게 달려있음.


9. userdir 처리: Symbolic Linking

cd /etc/apache2/mods-enabled

sudo ln -s ../mods-available/userdir.load

sudo ln -s ../mods-available/userdir.conf


10. aolserver(Open Source Webserver라는데...)와 apache2는 80번 포트에서 충돌한다! aolserver를 지워버리자. sudo apt-get remove aolserver*


대충 이 정도면 쓸만하지 않을까! 보안 깡그리 무시 민;아ㅓㄹ;ㅏㅣㅁㄴ ㅓㄿ;ㅐ먀3