2013. 6. 11. 12:14

우분투 사용자계정내 xe 설치시 mod_rewrite 작동 문제

이건 남겨야 겠다 싶어 포스팅합니다.


애초에 웹개발자도 아니고, 시스템 엔지니어도 아니다보니 여러모로 힘들었네요.

대부분 DocumentRoot 페이지에 xe를 설치하는 사례가 많거나 혹은 문제가 발생시 rewrite를 쓰지 않고 넘어가는 분들이 대부분이라 해결법을 찾는데 골머리좀 썩었네요.


xe도 정상적으로 설치되고, apache + php 설정, gd라이브러리 설치, a2enmod rewrite 등 모든 설정을 마치고 phpinfo() 를 통해 mod_rewrite활성화까지 확인 후, 메인페이지, admin페이지도 정상접근이 되나, 게시판 및 페이지 생성 후에 아래와 같은 메세지를 내며 접근이 안되는 현상이 있습니다.


Not Found

The requested URL /home/(계정명)/public_html/xe/index.php was not found on this server.


Apache/2.2.22 (Ubuntu) Server at 1.226.84.209 Port 80



아파치 로그는 다음과 같더군요


File does not exist: /var/www/home, referer: http://domain/~*/xe/board_aJHd31



해결방법은 xe폴더내 .htaccess 파일에 단 한줄 추가로 처리됩니다.


RewriteBase /~(계정명)/xe


아무래도 rewritebase를 지정해주지 않으면 rewrite기본주소를 DocumentRoot로 인식하는듯 합니다.

( 참고: /etc/apache2/sites-available/default )



2013. 2. 20. 12:10

MariaDB 설치하기 ( with Linux - Ubuntu )


 MySQL의 쌍둥이 여(?)동생 MariaDB의 설치방법입니다.


* 리눅스(우분투) 기준

 - 관련 페이지 : http://downloads.askmonty.org/mariadb/repositories/


root 계정 로그인 기준 ( 관리자 권한이 아닐시 맨 앞에 sudo 명령어를 붙입니다 )


0. MySQL이 설치 되어있을 경우...

# apt-get autoremove mysql-server


1. MySQL이 설치 안되어있을 경우 상위 생략

# apt-get install python-software-properties

...


2. 

# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db

sudo: unable to resolve host dec

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.JLMOPnpFUR --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db

gpg: requesting key 1BB943DB from hkp server keyserver.ubuntu.com

gpg: key 1BB943DB: public key "MariaDB Package Signing Key <package-signing-key@mariadb.org>" imported

gpg: no ultimately trusted keys found

gpg: Total number processed: 1

gpg:               imported: 1


3-1. 자동으로 리포지터리 경로를 추가할 경우 ( VERSION = 5.5 or 10.0 )

# add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/$(VERSION)/ubuntu precise main'


3-2. 수동으로 리포지터리 경로를 추가할 경우 ( VERSION = 5.5 or 10.0 )

# vi /etc/apt/sources.list


적절한 위치에 아래 문구 삽입 후 저장

deb http://ftp.osuosl.org/pub/mariadb/repo/$(VERSION)/ubuntu precise main

deb-src http://ftp.osuosl.org/pub/mariadb/repo/$(VERSION)/ubuntu precise main


4. 패키지 업데이트

# apt-get update

...

Ignore http://ftp.osuosl.org precise InRelease

Recv:2 http://ftp.osuosl.org precise Release.gpg [189 B]

Recv:4 http://ftp.osuosl.org precise Release [1,394 B]

Recv:5 http://ftp.osuosl.org precise/main Sources [886 B]

Recv:6 http://ftp.osuosl.org precise/main amd64 Packages [3,274 B]

Recv:7 http://ftp.osuosl.org precise/main i386 Packages [3,280 B]

Ignore http://ftp.osuosl.org precise/main TranslationIndex

Ignore http://ftp.osuosl.org precise/main Translation-ko_KR

Ignore http://ftp.osuosl.org precise/main Translation-ko

Ignore http://ftp.osuosl.org precise/main Translation-en

...


5. MariaDB 설치

# apt-get install mariadb-server


6. 확인

# mysql -u root -p

Enter password:


Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 34

Server version: 5.5.29-MariaDB-mariadb1~precise-log mariadb.org binary distribution


Copyright (c) 2000, 2012, Oracle, Monty Program Ab and others.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [(none)]> _




2011. 10. 19. 14:55

[Linux][Ubuntu] 서버 세팅


 안까먹기 위해 블로깅 -_-;

 1. Vim 설치
  - $ apt-get install vim

 2. Static IP 설정
  - $ vi /etc/network/interface
  - iface eth0 inet static
  -     address xxx.xxx.xxx.xxx
  -     netmask xxx.xxx.xxx.xxx
  -     gateway xxx.xxx.xxx.xxx

  - $ vi /etc/resolv.conf
  - nameserver xxx.xxx.xxx.xxx

  - $ /etc/init.d/networking restart

 3.  ssh 설치
  - $ apt-get install openssh-server

 4. ftp 설치
  - $ apt-get install vsftpd
  - $ vi /etc/vsftpd.conf
  - $ /etc/init.d/vsftpd restart

 5. APM 설치
  - $ apt-get install apache2
  - $ apt-get install mysql-server mysql-client
  - $ apt-get install libapache2-mod-auth-mysql
  - $ apt-get install php5-common php5 libapache2-mod-php5
  - $ apt-get install php5-mysql

 6. python yaml mod 설치
  - $ apt-get install python-yaml

 7.  make 설치
  - $ apt-get install make

 8. g++ 설치
  - $ apt-get install g++ 

 9. mysql dev 설치
  - $ apt-get install libmysqlclient16 libmysqlclient16-dev