[ wordpress 설치도중 500에러 ]


wordpress 를 다운로드 후 웹에서 접근할 경우 500에러가 발생되는 경우가 있다.


php.ini 에서 memory_limit = 32M 를 올려준다.


수정전 memory_limit = 32M


수정후 memory_limit = 64M



Posted by 실력키우기

[ rsync 설치 ]


# rpm -qa |grep rsync    -->    해당 패키지 설치되어있는지 확인 , 없을경우 설치


# yum install -y rsync


# rpm -qa |grep xinetd   -->    해당 패키지 설치되어있는지 확인 , 없을경우 설치


# yum install -y xinetd




# vi /etc/rsyncd.conf      -->     해당 파일이 없을 가능성이 크다. 해당 파일이 없을경우 vi 로 만들고 아래 내용 추가


[rsync_test]                  -->     사용할 rsync 서비스 이름

path=/data/rsync_test/        -->     데이터 원본 경로

comment = rsync_test        -->     코멘트

uid = root                    -->    권한 사용자

gid = root                    -->    권한 그룹

use chroot = yes

read only = yes

#hosts allow = 115.68.220.220    --> rsync 클라이언트 IP. localhost일 경우 입력하지 않아도 됨

max connections = 3

timeout=600



# vi /etc/xinetd.d/rsync 


service rsync

{

    disable = yes    -->    no로 변경

    flags       = IPv6

    socket_type     = stream

    wait            = no

    user            = root

    server          = /usr/bin/rsync

    server_args     = --daemon

    log_on_failure  += USERID


# /etc/init.d/xinetd restart




[ rsync 사용법 ]


[ 현재 접속한서버에서 다른서버로 파일을 보낼 경우 ]


rsync -avzPog /usr/local/src/test les@115.68.220.220:/home/les/    ->    해당서버의 test파일을 220.220번 서버의 /home/les/ 에 복사


rsync -avzPog -e 'ssh -p1990' java les@115.68.220.220:/home/les/     ->    위에 내용과 같지만, 다른점은 원격포트가 22번이 아닌 1990일때 옵션값 추가



[ 현재 접속한서버에서 다른서버의 파일을 가져올 경우 ]

rsync -avzPog les@115.68.220.220:/home/les/test /usr/local/src/    ->    220.220서버의 /home/les/test 파일을 현재 서버의 /usr/local/src/ 경로에 복사


rsync -avzPog -e 'ssh -p1990' les@115.68.220.220:/home/les/test /usr/local/src/    ->    위에 내용과 같지만,다른점은  원격포트가 1990일때 옵션값 추가





'Linux Server > etc' 카테고리의 다른 글

[ 기타 ] 해킹점검  (0) 2018.03.02
[기타] Iptables 설치 및 설정  (1) 2018.02.26
[기타] 리눅스 시간 동기화  (0) 2017.03.09
[기타] tcpdump 사용방법  (0) 2017.01.25
[기타] 바이오스설정  (0) 2017.01.08
Posted by 실력키우기

[ letsencrypt 설치 및 설정 ]


# git clone https://github.com/letsencrypt/letsencrypt


# cd letsencrypt


# ./letsencrypt-auto --help     ->  다운받은 폴더로 이동 후 아래 명령을 실행하면 자동으로 관련 의존성을 다운받아서 설치 된다.


# ./letsencrypt-auto certonly -a webroot --agree-tos -m <이메일> -w <webrootpath> -d <SSL발급도메인명> --rsa-key-size 4096

ex) ./letsencrypt-auto certonly -a webroot --agree-tos -m les4707@naver.com -w /home/web/ -d leeeunseok.xyz --rsa-key-size 4096



주의) 발급을 원하는 도메인은 반드시 웹접속이 가능한 상태어어야 한다. ( 웹서버, DNS , 방화벽 확인 필요)
 (주) 최초 발급 시도시 아래의 메세지가 표시되며, 이후 물어보지 않는다.
 EFF의 Let’s Encrypt 관련 소식을 이메일로 받고 싶다면 “y”를 원하지 않는 다면, “n” 입력 한다.
-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: n



기본 포트를 SSL으로 이용하는 경우


vi /usr/local/apache/conf/extra/httpd-ssl.conf


<VirtualHost *:443>


DocumentRoot 웹루트경로

ServerName 도메인명:443

SSLEngine on 

SSLCertificateFile /etc/letsencrypt/live/도메인명/cert.pem

SSLCertificateKeyFile /etc/letsencrypt/live/도메인명 /privkey.pem

SSLCertificateChainFile /etc/letsencrypt/live/도메인명/fullchain.pem  


<VirtualHost>


이후 아파치 재시작


[root@techsmile-6580 letsencrypt]# /etc/init.d/apachectl stop

AH00526: Syntax error on line 51 of /usr/local/apache/conf/extra/httpd-ssl.conf:

Invalid command 'SSLCipherSuite', perhaps misspelled or defined by a module not included in the server configuration


아파치 재시작시 위와 같이 에러발생할경우 아래파일을 열고 주석해제

vi /usr/local/apache/conf/httpd.conf

LoadModule ssl_module modules/mod_ssl.so -> 해당부분 주석해제



[root@techsmile-6580 letsencrypt]# /etc/init.d/apachectl stop

AH00526: Syntax error on line 76 of /usr/local/apache/conf/extra/httpd-ssl.conf:

SSLSessionCache: 'shmcb' session cache not supported (known names: ). Maybe you need to load the appropriate socache module (mod_socache_shmcb?).


아파치 재시작시 위와 같이 에러발생할경우 아래파일을 열고 주석해제

vi /usr/local/apache/conf/httpd.conf

LoadModule socache_shmcb_module modules/mod_socache_shmcb.so     -> 해당부분 주석해제





letsencrypt는 3달에 한번씩 갱신해줘야하며, 아래 내용은 도메인 갱신하는 명령어입니다.


/letsencrypt-auto certonly -a webroot --agree-tos --renew-by-default -w <webrootpath> -d <ssl갱신도메인명> --rsa-key-size 4096



vi letscron.sh    ->    스크립트 만들고 크론탭에 약2달에한번 실행되도록 등록할것

#!bin/sh

echo /letsencrypt-auto certonly -a webroot --agree-tos --renew-by-default -w /home/web/ -d leeeunseok.xyz --rsa-key-size 4096

'Linux Server > apache' 카테고리의 다른 글

[apache] http_error_code  (0) 2018.02.26
[apache] ip 접속 제어  (0) 2018.02.09
[apache] ssl 키 발급 및 적용  (0) 2017.06.03
[php 언어셋 문제]  (0) 2017.05.09
[apache] cband 모듈설치  (0) 2017.04.27
Posted by 실력키우기

블로그 이미지
공 부 하 는 직 장 인
실력키우기

태그목록

공지사항

Yesterday
Today
Total

최근에 달린 댓글