Lael's World


Page Navigation


Post Content

» Posted By Lael Rukius, » Posted In WebServer, » Reg Date : 2010/07/28 16:11
» Post Url : http://lael.be/204
» Last Modified at 2012/02/20 11:46
 

1) 버전체크

#uname -a
Linux LaelServer 02 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux

2) CentOS 버전체크

#cat /etc/redhat-release
CentOS release 5.4 (Final)

3) 하드용량체크

#df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2             4.9G  295M  4.4G   7% /
/dev/hda9              56G  180M   53G   1% /free
/dev/hda8             996M   34M  911M   4% /tmp
/dev/hda6             4.9G  173M  4.5G   4% /var
/dev/hda3             4.9G  1.5G  3.2G  31% /usr
/dev/hda5             4.9G  139M  4.5G   3% /usr/local
/dev/hda1              99M   12M   83M  12% /boot
tmpfs                 252M     0  252M   0% /dev/shm


대략 다 더하면 80G가 나온다.
희안하게 /home 이 아니라 /free/home 이더군 (사용자마다 다를 수 있다)



#ls -l /free
drwx-----x 3 root root  4096  7월 28 22:48 home
drwx------ 2 root root 16384  4월  9 09:42 lost+found


퍼미션은 잘 맞추어져 있다.


4) 메모리 체크
#cat /proc/meminfo
MemTotal:       515348 kB
MemFree:        370544 kB
Buffers:         12952 kB
Cached:         114448 kB
SwapCached:          0 kB
Active:          48324 kB
Inactive:        84036 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       515348 kB
LowFree:        370544 kB
SwapTotal:     2096440 kB
SwapFree:      2096440 kB
Dirty:               8 kB
Writeback:           0 kB
AnonPages:        4956 kB
Mapped:           4008 kB
Slab:             8148 kB
PageTables:        632 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   2354112 kB
Committed_AS:    24248 kB
VmallocTotal:   507896 kB
VmallocUsed:      3300 kB
VmallocChunk:   504524 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     4096 kB


대략 370M의 가용메모리가 있다.

5) ftp 구동중인지 체크

#ps -ef | grep ftp
root      2556  2503  0 00:52 pts/0    00:00:00 grep ftp

운영체제만 깔아달라고 요청했기때문에 다른건 안깔려 있는 듯하다.

6) 자잘한 업글

#yum upgrade
너무 오래 걸린다.
길어서 생략.


Total                                           4.5 MB/s | 244 MB     00:54    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded



7) Apache2 설치

#yum install httpd

부팅시 자동실행
#chkconfig --level 2345 httpd on

설치한것 실행
#service httpd start

확인해본다. http://256.123.213.213(서버의아이피)
웹브라우져에 Apache2 TestPage 라고 뜨면 성공.

8) PHP 5.x 설치

#yum install php php-gd php-mbstring php-mhash

버전체크
#php -v
PHP 5.1.6 (cli) (built: Mar 31 2010 02:44:37)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies


5.1.6 버전이다.

9) Mysql 설치

#yum install mysql mysql-server mysql-connector-odbc mysql-devel php-mysql

간단 세팅파일 복사
#cp /usr/share/mysql/my-large.cnf /etc/my.cnf
cp: overwrite `/etc/my.cnf'? y


버전체크
#mysql -V
mysql  Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1
5.0.77 버전이다.

부팅시 자동실행
#chkconfig --level 2345 mysqld on

@참고 : php는 엔진이고 httpd , mysqld 는 데몬이다. 데몬은 프로세스로서 항상동작되고 있어야한다.
따라서 php는 부팅시 자동실행등록 절차가 없는것이다.


mysqld 구동
#service mysqld start
대략 처음구동이므로 root비번 설정하라고 나온다.
1) /usr/bin/mysqladmin -u root password 'new-password'
2) /usr/bin/mysql_secure_installation

둘중 하나 하면 되는데
2번에 secure라는 단어가 마음에 드니까 2번쓰도록 하자.
대화식 설치
#/usr/bin/mysql_secure_installation

Set root password? [Y/n] Y
New password:   (리눅스에서는 비번 입력해도 화면에 안보인다. 보안상)
Re-enter new password:

Remove anonymous users? (기본적으로 지원되는 익명계정을 삭제하시겠습니까?) [Y/n] Y
Disallow root login remotely? (root의 원격접속을 막겠습니까?) [Y/n] Y
Remove test database and access to it? (기본적으로 생성되는 test 데이터베이스를 삭제하시겠습니까?)[Y/n] Y
Reload privilege tables now? (권한 테이블을 다시 불러올까요?) [Y/n] Y
Thanks for using MySQL!

10) 계정생성 및 동작테스트

#cd ~
#wget
http://prdownloads.sourceforge.net/webadmin/webmin-1.480-1.noarch.rpm
#rpm -ivh webmin-1.480-1.noarch.rpm

혹시나 iptables 에서 10000번 포트가 막혀있다면
#iptables -F

http://서버의아이피:10000  으로 접속한후 아이디 : root         비번 : 루트비번

GUI환경이니까 알아서 잘 세팅하면 된다.

 

#webmin이 한글을 지원합니다.  한글로 설정해서 사용해보세요.



 The Post which treat similar subject 
 GNU Free Documentation License (블로그 글 저작권 규정) You can copy and distribute the Document in any medium, either commercially or noncommercially.
We grants you a worldwide, royalty-free, non-exclusive, sublicensable license.
이 블로그에 게시된 모든 글은 작성자(Lael)의 동의 없이 모든 매체에 대해 발췌 및 상업성 및 비상업성 용도로 사용하는 것을 허가합니다. 불펌 및 무단복제 권장.
2010/07/28 16:11 2010/07/28 16:11

Trackback URL : http://lael.be/trackback/204

• Trackback

  1. 한번에 끝내는 Ubuntu 서버세팅

    Tracked from Lael's World 2010/08/02 11:12 [Delete]

    1) 버전체크#uname -aLinux LaelServer02 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:45:36 UTC 2009 x86_64 GNU/Linux2) CentOS 버전체크#cat /etc/issueUbuntu 9.043) 하드용량체크#df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/LaelServer02-root 37G 739M 35G ...

• Comment List

  1. 호두

    2012/02/18 16:39 [Modify/Delete] [Reply]

    상당히 간편하고 쉽네요
    vitualhost는 어느 파일에서 지정해야 하는지 알려주세요 ㅜ_ㅜ

    • Lael Rukius

      2012/02/18 16:55 [Modify/Delete]

      웹 관리툴에서 설정하는 부분이 있습니다.

    • 호두

      2012/02/18 17:21 [Modify/Delete]

      웹관리툴이라면 webmin을 말씀하시는 건지..??
      온통 영어라 사용하기가 꺼려지네요 ..

      [root@ns ~]# find / -name httpd-vhosts.conf
      /usr/local/server/apache/conf/original/extra/httpd-vhosts.conf
      /usr/local/server/apache/conf/extra/httpd-vhosts.conf
      설정 파일이 두개 나왔는데 둘중에 어떤 걸 건드리는 건지 모르겠어요

    • Lael Rukius

      2012/02/20 11:47 [Modify/Delete]

      제가 직접 설치해보고 스샷을 본문에 첨부해서 자세히 써드리겠습니다.

      # 설치중에 문제가 생겨서 스샷은 포기해야겠습니다.
      webmin이 한글을 지원하고 거기에서 virtualhost 설정하는 부분이 있습니다.

Leave a comment