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

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

linux

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

페이지 정보

작성자 웹지기 댓글 0건 조회 8,414회 작성일 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 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 8966 0 0 댓글 0
  • 57 [ 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 8898 0 0 댓글 0
  • 56 [ 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 8851 0 0 댓글 0
  • 55 [ 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 8742 0 0 댓글 0
  • 54 [ Server ][ Linux ] httpd.conf 서버 디렉토리 보이게, 안보이게 설정
  • httpd.conf 파일에서 아파치 서버 디렉토리의 폴더및 파일을 보여주거나, 파일 및 폴더를 보여주지않고 오류를 출력할 때 설정 방법. &lt;Directory "D:/AutoSet9/public_html"&gt; #index파일이 없을 때 디렉토리를 감추고 에러를 출력 Options FollowSymLinks #index파일이 없을 때 디렉토리를 보여줌 Options Indexes FollowSymLinks &lt;/Di...
  • 웹지기 11-26 8717 0 0 댓글 0
  • 53 [ Server ][ Linux ] 계정 용량 확인 / 관리
  • [code]&lt;?php$du=`du -sk`;$save=100; //할당받은 계정용량, 단위 MBytes$du=$du/1000;$result1=$save-$du;$result2=$du;echo "&lt;font size='2' color='#0078FF'&gt;전체 용량 :&lt;font size='2' color='#ff6666'&gt; 100MB&lt;/font&gt;&lt;br&gt;";ec...
  • 웹지기 09-30 8524 0 0 댓글 0
  • 52 [ 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 8487 0 0 댓글 0
  • 51 [ 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 8471 0 0 댓글 0
  • 열람중 [ Server ][ Linux ] 리눅스 호스팅 서버 관리
  • ■리눅스 호스팅서버 관리************************************************************ 리눅스 호스팅서버 관리************************************************************ 호스팅서비스에 필요한 것들- 리눅스 운영체제- 아파치 웹서버- MySQL 데이터베이스- PHP, Perl 등과 같은 웹프로그래밍언어- 메일서비스 지원을 위한 Sendmail, Qmail, POP, IMAP- Webalizer와 access...
  • 웹지기 09-30 8415 0 0 댓글 0
  • 49 [ 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 8225 0 0 댓글 0
  • 48 [ 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 8168 0 0 댓글 0
  • 47 [ Server ][ Linux ] centOS7 EPEL-RELEASE 설치
  • 설치 확인 # yum repolist Loaded plugins: fastestmirror No such command: repolist. Please use /usr/bin/yum --help 미설치시 다음의 명령어를 통해 설치 # yum -y install epel-release # yum repolist Loaded plugins: fastestmirror Repodata is over 2 weeks old. Instal...
  • 웹지기 05-02 8166 0 0 댓글 0
  • 45 [ server ][ linux ] CentOS7 certbot certificates 오류 ttribute…
  • # certbot certificates 이런명령을 내렸는데 오류가 발생햇다 yum update하면서 무언가 문제가 발생한것 같다. An unexpected error occurred: AttributeError: 'module' object has no attribute 'TLSSNI01' Please see the logfile '/tmp/tmpV1KtqF/log' for more details. # yum update pyth...
  • 웹지기 03-12 8089 0 0 댓글 0
게시물 검색

회원로그인

접속자집계

오늘
8,517
어제
14,234
최대
33,828
전체
8,477,587

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