ubuntu 16.04를 설치하고 몇일 쓰는데 갑자기 디스크가 벌써 만땅이라고 표시되었다.

30기가 정도 Rootfs에 할당했는데 충분할 텐데... 그래서 확인해봤더니

/var/log에 kern.log syslog가 10기가 이상 차 있었다. ㅠㅠ


일단 커널로그의 원인은 아래 에러가 계속해서 쌓이는건데

[ 8480.388485] ACPI Error: Method parse/execution failed [\_GPE._L6F] (Node ffff8808544e04b0), AE_NOT_FOUND (20150930/psparse-542)
[ 8480.388487] ACPI Exception: AE_NOT_FOUND, while evaluating GPE method [_L6F]


이건 아래와 같이 해결할 수 있다고 한다.

http://jhshi.me/2015/11/14/acpi-error-method-parseexecution-failed-_gpe_l6f/index.html


보니까 나처럼 스카이레이크에 우분투 깔아서 쓰고 있었다. 음...최신 하드웨어라서 아직 준비가 안되었나 보다...^^;;



부팅할 때마다 시작 스크립트에서 지울까 하다가 검색해보니 해외에 다른 유저는 이렇게 해결했다.


http://askubuntu.com/questions/515146/very-large-log-files-what-should-i-do




I installed Ubuntu 16.04 today and I noticed the same problem. However, I fixed this with busybox-syslogd. Yup! I've Just installed that package and problem has been solved. :)

$ sudo apt-get install busybox-syslogd

After installing that package, reset syslog and kern.log:

sudo tee /var/log/syslog /var/log/kern.log </dev/null

I hope this simple solution is useful to other people around.


일단 이렇게 해놓고 지켜보고 있는 중이다.




우분투 14.04 64비트에서 리나로 ARM툴체인 gcc-linaro-arm-linux-gnueabihf을 쓰기 위해 설치해야 하는 패키지들.


sudo apt-get install lib32stdc++ lib32z1 lib32ncurses5 lib32bz2-1.0


위의 패키지들은 64비트 리눅스에서 32비트 파일을 실행하기 위해 필요하다. 리나로 툴체인은 64비트 실행 버전이 없어서 상기 패키지들을 설치해야한다.


단 32비트 우분투라면 설치할 필요없다.^^


Ubuntu 14.04를 설치하고 git 서버를 구축한다.

GitHub와 같이 회원관리 기능에 커뮤니티 기능까지 원한다면 GitLab같은 오픈소스 git 서버를 구축하길 추천한다.


간단하게 git 만으로도 서버를 구축할 수 있다 git 명령어 중에 daemon 명령어를 쓰면 git 서비스가 돌아간다. 최대 동시접속자는 많지 않다 적어도 10~20명정도는 된다고 한다.

이 정도면 개인 git 서버로 충분하다 여기에 git 소스에서 제공하는 gitweb라는 CGI 형식으로 제공하는 simple web UI도 제공한다.

gitweb을 이용하면 위에서 구축한 git daemon과 함께 http 프로토콜의 웹 서비스도 제공한다. gitweb은 kernel.org에서 제공하는 커널 소스의 웹UI로 이미 제공하고 있다.


1. git daemon 서버 구축


일단 git이 없다면 git을 설치한다.

$ sudo apt-get install git

$ git --version

으로 확인 가능하다.


git이라는 계정을 만든다. SSH키를 이용할 계획이라면 git의 패스워드를 지정할 필요는 없다. 여기서는 그냥 패스워드까지 만든다.

$ sudo useradd git

$ sudo passwd git

패스워드를 지정한다.


그리고 저장소를 쓸 디렉토리를 만든다. 여기서는 /home 경로에 만든다.

$ sudo -u git -H mkdir /home/git

$ cd /home/git

$ sudo -u git -H mkdir test.git

$ cd test.git

$ sudo -u git -H git init --bare

Initialized empty Git repository in /home/git/repositories/test.git/


$ sudo -u git -H git daemon --verbose --export-all --base-path=/home/git --enable=receive-pack &


데몬을 돌렸으니 실제 다른 경로로 가서 git에 업로드할 프로젝트를 만들자.

$ cd ~/work

$ mkdir test

$ cd test

$ git init

Initialized empty Git repository in /home/simon-linux/work/test/.git/

이런 식으로 실제로 내용물이 있어야 commit을 할 수 있다.

$ touch readme.txt

$ echo "This is test" > readme.txt

$ git add .

$ git commit -m "initial commit"

방금 구축한 git 서버 URL을 origin으로 등록한다.

$ git remote add origin git@localhost:/home/git/test.git

$ git push -u origin master

The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is b3:8a:ac:1f:00:70:eb:80:6b:e9:eb:8e:fe:3b:e9:d0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Counting objects: 3, done.
Writing objects: 100% (3/3), 212 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@localhost:/home/git/project.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.


2. gitweb 구축하기

아래 사이트를 참고했다.

http://blog.daum.net/junek69/37

웹서버와 gitweb을 설치한다.

$ sudo apt-get install apache2 gitweb

$ sudo cp /etc/apache2/conf.d/gitweb /etc/apache2/sites-available/gitweb.conf

$ sudo ln  -s /etc/apache2/sites-available/gitweb.conf /etc/apache2/sites-enabled/gitweb.conf


$ sudo vi /etc/apache2/sites-available/gitweb.conf

기존의 내용은 모두 지우고 아래 내용을 붙여넣기 한다.

Alias /git /usr/share/gitweb


<Directory /usr/share/gitweb>

  Options +FollowSymLinks +ExecCGI +SymLinksIfOwnerMatch

  AllowOverride All

  order allow,deny

  Allow from all

  AddHandler cgi-script .cgi

  DirectoryIndex gitweb.cgi

</Directory>

Alias 뒤의 git이 접속 경로가 된다. 예를 들어 http://localhost/git 이렇게 접속하면 된다.


$ sudo vi /etc/gitweb.conf

아래 변수값을 1에서 구축한 git 저장소 위치로 수정한다.

--> $projectroot = "/home/git";


$ sudo vi /usr/share/gitweb/gitweb.cgi

열어서 git 명령어의 위치와 git 저장소 위치를 업데이트한다.

# core git executable to use
# this can just be "git" if your webserver has a sensible PATH
our $GIT = "/usr/bin/git";

# absolute fs-path which will be prepended to the project path
#our $projectroot = "/pub/scm";
our $projectroot = "/git/";

.....

그리고 가장 중요한 아파치2에서 CGI 실행 모듈을 활성화한다. 이게 안되면 그냥 웹브라우저에서 gitweb.cgi의 소스만 출력된다.

$ sudo a2enmod cgi
$ sudo service apache2 restart


참고사이트

http://askubuntu.com/questions/403067/cgi-bin-not-working


자 이제 아래 주소로 접속해보자

http://localhost/git

혹은 http://localhost/git/test.git 과 같은 개별 git저장소를 지정한다.







+ Recent posts