[ Server ][ Linux ] 리눅스 호스팅 서버 관리 > linux

본문 바로가기
사이트 내 전체검색

linux

[ Server ][ Linux ] 리눅스 호스팅 서버 관리

페이지 정보

작성자 웹지기 댓글 0건 조회 14,783회 작성일 18-09-30 18:12

본문

■리눅스 호스팅서버 관리 

***********************************************************

* 리눅스 호스팅서버 관리

***********************************************************

* 호스팅서비스에 필요한 것들

- 리눅스 운영체제

- 아파치 웹서버

- MySQL 데이터베이스

- PHP, Perl 등과 같은 웹프로그래밍언어

- 메일서비스 지원을 위한 Sendmail, Qmail, POP, IMAP

- Webalizer와 accesswatch 등을 이용한 웹로그분석 제공

- Proftpd, vsftpd를 이용한 FTP서비스

- BIND를 이용한 DNS서비스

- 여러가지 라이브러리 및 어플리케이션들

- 백업서버 구축

* 신규 호스팅가입자 서버셋팅


1. 사용자 ID, 패스워드 생성

# useradd bible

# passwd bible


2. 사용자 호스팅용 홈디렉토리 구성하기

# mkdir /home/bible/www

# mkdir /home/bible/www_log

# mkdir /home/bible/www/weblog

# mkdir /home/bible/ftp

# mkdir /home/bible/ftp_log

# cp index.html /home/bible/www

# chmod 701 /home/bible

# chown -R bible:bible /home/bible


3. DNS에 사용자 도메인 설정하기

# vi /etc/named.conf

zone "bible.co.kr" {

type master;

file "bible.co.kr.zone";

};

# vi /var/named/bible.co.kr.one

$TTL 86400

@  IN SOA ns.dns.co.kr. root.bible.co.kr. (

2006040101 ; serial number

28800  ; secondaries refresh every 8 hours

14400  ; if refresh fails, retry every 4 hours

2419200  ; if cannot refresh, expire IN 30 days

86400  ; default ttl

)

IN NS 192.168.0.2

IN MX 10 bible.co.kr.

IN A 192.168.0.101

www  IN A 192.168.0.101

ftp  IN A 192.168.0.101


4. 아파치에 가상호스트 설정하기

# vi /usr/local/apache2/conf/httpd.conf

#<VirtualHost *:80>

<VirtualHost 192.168.0.2>

ServerAdmin webmaster@bible.co.kr

DocumentRoot /home/bible/www

ServerName bible.co.kr

ServerAlias www.bible.co.kr

ErrorLog /home/bible/www_log/error_log

CustomLog /home/bible/www_log/access_log common

Alias /bible/ "/home/bible/www/"

<Directory /home/bible/www>

Options ExecCGI

AllowOverride AuthConfig

</Directory>

</VirtualHost>


5. 일hit수와 일트랙픽량 제한 설정하기

# vi /usr/local/apache2/conf/httpd.conf

#<VirtualHost *:80>

<VirtualHost 192.168.0.2>

ServerAdmin webmaster@bible.co.kr

DocumentRoot /home/bible/www

ServerName bible.co.kr

ServerAlias www.bible.co.kr

ErrorLog /home/bible/www_log/error_log

CustomLog /home/bible/www_log/access_log common

Alias /bible/ "/home/bible/www/"

ThrottlePolicy Volume  2048M 1d

ThrottlePolicy Request 20000 1d

<Directory /home/bible/www>

Options ExecCGI

AllowOverride AuthConfig

</Directory>

</VirtualHost>


6. 메일사용을 위한 메일설정하기

# vi /etc/mail/access

bible.co.kr RELAY

# makemap hash /etc/mail/access.db < /etc/mail/access

# vi /etc/mail/local-host-names

bible.co.kr

# vi /etc/mail/virtusertable

webmaster@bible.co.kr bible

# makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable


7. 데이터베이스 사용을 위한 MySQL 설정하기

# /usr/local/mysql/bin/mysql -u root -p mysql

Enter password: ********

mysql> create database bible;

mysql> grant all on bible.* to bible@'localhost' identified by '1234';


8. 웹로그분석서비스를 위한 webalizer 설정하기

# cp /etc/webalizer.conf.sample bible.co.kr.conf

# bible.co.kr.conf

LogFile  /home/bible/www_log/access_log

OutputDir /home/bible/www/weblog

HistoryName bible.co.kr

ReportTilte bible.co.kr WebSite

HostName www.bible.co.kr


9. 디스크사용량 제한을 위한 Quota 설정하기

# edquota -u bible

Disk quotas for user bible (uid 600):

Filesytem blocks soft hard inodes soft hard

/dev/sda2 1200 307200 358400 34 0 0


10. 가상 FTP호스팅을 위한 proftpd의 가상호스트 설정하기

# vi /usr/local/proftpd/etc/proftpd.conf

<VirtualHost ftp.bible.co.kr>

ServerName  "ftp.bible.co.kr FTP Server"

ServerAdmin  webmaster@bible.co.kr

Port   40001

TranferLog  /home/bible/ftp_log/xferlog

MaxClients  10

MaxClientPerHost 3


11. 아파치, FTP, MySQL, DNS, 메일서비스 재시작하기

# /usr/local/apache2/bin/apachectl restart

# /usr/local/mysql/bin/mysqladmin -u root -p reload

# killall -9 proftpd

# /usr/local/proftpd/sbin/proftpd

# /etc/init.d/sendmail restart

# /etc/init.d/named restart

* 메일포워딩 서비스 설정

.forwar 파일에 포워딩할 이메일주소를 등록한다.

* 도메인포워딩 설정

<meta http-equiv="Refresh" content="0; url=http://soback.kornet.net/~bible">

[이 게시물은 웹지기님에 의해 2019-03-15 15:38:39 knowledge에서 이동 됨]
추천0 비추천0

댓글목록

등록된 댓글이 없습니다.

Total 103건 4 페이지
  • 58 [ Server ][ Linux ] CentOS7 Let's Encrypt 무료 SSL 인증서 와일드카드로 …
  • 입력시 일반 도메인(domain.com)과 와일드카드(*.domain.com) 도메인 두번 적는다 # certbot certonly --manual --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory -d domain.com -d *.domain.com 이메일을 입력하라는 문구가 나오면 인증서 알림을 받을 이메일을 입력한다. # Saving debug log t...
  • 웹지기 12-12 12146 1 0 댓글 1
  • 57 [ Server ][ Linux ] httpd.conf 서버 디렉토리 보이게, 안보이게 설정
  • httpd.conf 파일에서 아파치 서버 디렉토리의 폴더및 파일을 보여주거나, 파일 및 폴더를 보여주지않고 오류를 출력할 때 설정 방법. &lt;Directory "D:/AutoSet9/public_html"&gt; #index파일이 없을 때 디렉토리를 감추고 에러를 출력 Options FollowSymLinks #index파일이 없을 때 디렉토리를 보여줌 Options Indexes FollowSymLinks &lt;/Di...
  • 웹지기 11-26 12300 0 0 댓글 0
  • 56 [ Server ][ Linux ][ htaccess ] 아이피 차단 관련 설정
  • * 국내아이피를 제외한 나머지 국가에 대해 아이피 차단시 첨부화일을 참고!* 특정 아이피를 차단할경우.htaccess 파일을 편집(만약 123.45.123.45 를 막는다고 할때) :namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;SetEnvIfNoCase remote_addr 123.45.123.45 go_outOrder allow,denyAllow from allDeny from env...
  • 웹지기 10-01 12381 0 0 댓글 0
  • 55 [ Server ][ Linux ] centos7 git 버젼업데이트
  • # make configure # ./configure --prefix=/usr # make all doc info @make all doc info 설치시 오류가 발생 @Can't locate ExtUtils/MakeMaker.pm 해결방법 # yum install perl-CPAN # sudo make install install-doc install-html install-info # git --...
  • 웹지기 04-01 12391 0 0 댓글 0
  • 54 [ Server ][ Linux ] Gitlab 서버 도메인 변경
  • gitlab 서버의 도메인을 변경하고 싶다면 일단 검색을 한다. # find / -name gitlab.yml # /var/opt/gitlab/gitlab-rails/etc/gitlab.yml # /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml 이런 리스트에서 다음 파일에서 변경을 해준다. # vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml ...
  • 웹지기 12-12 12449 0 0 댓글 0
  • 53 [ Server ][ Linux ] CentOS7 IP 확인 설정 변경하기
  • CentOS7 Minimal 로 설치시 별 다른 패키지가 설치 되어있지 않아 설치하기 전에는 다음의 명령을 사용한다. # ip address [root@cms_db ~]# ip address 1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 in...
  • 웹지기 08-12 12485 0 0 댓글 0
+1
  • 52 [ Server ][ Linux ] CentOS7 php_screw-1.5 설치 (php 소스 암호화)
  • * 설명php_screw 모듈을 설치하면 php 소스를 암호화 할 수 있다.php 가 설치되어 있는 상태에서 모듈만 추가한다.*소스 다운로드wgethttp://sourceforge.net/projects/php-screw/files/php-screw/1.5/php_screw-1.5.tar.gz*설치[root@ php_screw-1.5]# phpizeConfiguring for:PHP Api Version: 20041225Zend Module Api No: 20060613Zend Extension ...
  • 웹지기 09-27 12504 0 0 댓글 0
  • 51 [ server ][ linux ][ gitlab ] 원격 저장소 url 변경
  • # git remote -v # origin http://gitlab.com/sample/sample.git (fetch) # origin http://gitlab.com/sample/sample.git (push) 확인을 해본 다음 다음의 명령어로 변경이 가능하다 # git remote set-url origin ssh://git@gitlab.com/sample/sample.git 다시 확인을 해보면 # git remo...
  • 웹지기 06-01 12663 0 0 댓글 0
  • 50 [ Server ][ Linux ] centos7 gitlab CE(Community Edition)설치
  • 1. 필요한 종속성을 설치하고 구성합니다. @CentOS 7에서 아래 명령은 시스템 방화벽에서 HTTP 및 SSH 액세스를 엽니 다. # yum install curl policycoreutils openssh-server openssh-clients # systemctl enable sshd # systemctl start sshd # firewall-cmd --permanent --add-service=http # systemctl reload fi...
  • 웹지기 04-02 12686 0 0 댓글 0
+1
  • 49 [ Server ][ Linux ] CentOS 7 설치 및 설정하기 네번째 서버에 apm설치(httpd, …
  • APM 설치를 진행한다. 간편한 작업을 위해https://sir.kr/so_server/1945 apm auto installer을 다운받습니다. 압축을 푸시면 APM 사용 설명서.txt가 포함되어 있습니다. 이부분을 읽고 따라하면 됩니다.(간단함) 저는 root로 접속해서 APMinstaller.sh를 퍼미션 변경 후 실행했습니다. 설치가 끝나고 php버젼을 확인해 보았습니다. 오류없이 설치가 잘 마무리가 되고 Complete! 라는 내용이 떳네요. php 버젼에 7.2....
  • 웹지기 12-10 12743 0 0 댓글 0
  • 48 [ Server ][ Linux ] centOS7 node설치( node.js , npm )
  • epel 저장소 확인 # yum repolist epel 저장소가 존재하지 않으면 먼저 epel-release 설치 # yum install epel-release -y node.js 및 npm 설치 여부 확인 # node --version bash: node: command not found # npm --version bash: npm: command not found 설치되어 있지 않을 시 설치 명령...
  • 웹지기 05-02 12881 0 0 댓글 0
  • 47 [ Server ][ Linux ][ ubuntu ] sass install, 우분투에 sass 설치하기
  • 일단 우분투서버에 ruby가 설치되어 있어다는 조건하에. :sass -v 있다면 버젼이 나오고 없다면 설치하라는 명령이 뜰것이다. 설치가 되어있지 않다면 :apt-get install ruby-sass 중간에 y/n 질문을 하면 y를 눌러주면 된다. 설치가 완료 되었으면. 버젼을 확인하자 :sass -v :Sass 3.4.21 (Selective Steve) 버젼이 나오면 성공한것이다. [이 게시물은 웹지기님에 의해 2019-03-15 15:33:17 knowledge에서 ...
  • 웹지기 12-05 13099 0 0 댓글 0
  • 44 [ Server ][ Linux ] 리눅스 파일만들기, 파일옮기기,폴더옮기기, 복사하기, 화면 지우기
  • 리눅스 파일만들기, 파일옮기기, 복사하기, 화면 지우기mv - 이름변경 및 이동을 담당mv 원본파일 대상파일예를들어 test.txt라는 파일이 있다고 치고 나는 /home 디렉토리로 옮기고 싶다면mv test.txt /home로 옮길수 있다.만약 mv test.txt test1.txt라고 한다면 기존의 파일은 사라지고 이름이 변경되게 된다.cp - 파일이나 디렉토리를 다른파일 또는 다른 디렉토리로 복사를 수행한다.cp 원본파일 대상파일cp test.txt /home 이런식으로 사용한다면 test....
  • 웹지기 09-28 14285 0 0 댓글 0
게시물 검색

회원로그인

접속자집계

오늘
19,378
어제
21,009
최대
61,067
전체
14,775,536

그누보드5
Copyright © funyphp.com. All rights reserved.