[ nginx 1.12.2 설치 ] 

•1.12.2 버전 설치 (app 계정에서 설치) 

•라이브러리 Dependency : 기본적으로 pcre, zlib 라이브러리가 설치되어 있어야 함 

•해당 라이브러리가 설치되지 않을 경우 pcre, zlib 소스 디렉터리를 준비하고 아래 옵션을 configure 명령에 추가

•--with-pcre=/home/app/pkg/pcre-8.4.1 —with-zlib=/home/app/pkg/zlib-1.2.11

•해당 옵션을 활용하면 nginx 설치하면서 해당 라이브러리들을 자동으로 컴파일해서 설치하기 때문에 별도 설치할 필요 없음.


  • nginx 다운로드 후 압축을 푼다. ( 필요에 따라 pcre, zlib도 다운로드 )
mkdir pkg
cd pkg

# nginx 다운로드
wget http://nginx.org/download/nginx-1.12.2.tar.gz
tar xvf nginx-1.12.2.tar.gz

# pcre 8.41 버전 다운로드
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.gz
tar xvf pcre-8.41.tar.gz

# zlib 1.2.11 다운로드
wget http://zlib.net/zlib-1.2.11.tar.gz
tar xvf zlib-1.2.11.tar.gz

  • 아래와 같이 nginx 소스 디렉토리 이동 후 configure 명령어 수행 ( prefix 및 path는 각자의 환경에 맞게 수정 필요 )
cd /home/app/pkg/nginx-1.12.2

./configure --prefix=/home/app/HOME/nginx --sbin-path=/home/app/HOME/bin/nginx --conf-path=/home/app/HOME/data/nginx/nginx.conf --error-log-path=/home/app/HOME/log/nginx/error.log --pid-path=/home/app/HOME/data/nginx/nginx.pid --with-http_ssl_module  --with-http_realip_module --with-http_stub_status_module --with-http_v2_module --with-pcre=/home/app/pkg/pcre-8.4.1

# pcre, zlib 라이브러리 같이 compile할 경우 아래 옵션 추가
# --with-pcre=/home/app/pkg/pcre-8.4.1 --with-zlib=/home/app/pkg/zlib-1.2.11

make
make install


[ nginx 연동 설정 ]

  • ~/HOME/data/nginx/nginx.conf 파일에서 아래 내용 확인

server { listen 9090; // Web에서 사용할 port 정보 명시 server_name 192.168.0.1; // Web ip 정보 명시 location / { root html; // 삭제 index index.html index.htm index.php; // index.php 항목 추가 } /* test 디렉터리 항목 전체 추가 */ location /test { index index.html index.php; try_files $uri $uri/ /test/index.php; } /* php-fpm 연동 정보 전체 추가 (기본적으로 주석 처리되어 있으며 내용이 일부 다름) */ # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }


[ nginx 기동 ]

# 기동
/home/app/HOME/bin/nginx

# 중지
/home/app/HOME/bin/nginx -s stop

# 설정 파일 리로드
/home/app/HOME/bin/nginx -s reload

# 아래는 nginx 도움말
hjshuweb [app{1006} ~/HOME/bin ] ./nginx -h
nginx version: nginx/1.12.2
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:
  -?,-h         : this help
  -v            : show version and exit
  -V            : show version and configure options then exit
  -t            : test configuration and exit
  -T            : test configuration, dump it and exit
  -q            : suppress non-error messages during configuration testing
  -s signal     : send signal to a master process: stop, quit, reopen, reload
  -p prefix     : set prefix path (default: /home/app/HOME/nginx/)
  -c filename   : set configuration file (default: /home/app/HOME/data/nginx/nginx.conf)
  -g directives : set global directives out of configuration file

[ nginx 기동 확인 ]

http://{ip}:{port} 접속 후 nginx 초기 페이지 로딩 확인




1. WebTatic 저장소 설치
#CentOS 6
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

#CentOS 7
rpm -Uvh http://mirror.premi.st/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

2. yum 으로 패키지 설치
yum install php56w-cli php56w-fpm php56w-mbstring php56w-mcrypt php56w-mysql php56w-opcache php56w-pdo php56w-pear php56w-xml

3. 부팅 시 php-fpm service 활성화
#CentOS 6
chkconfig php-fpm on

#CentOS 7
systemctl enable php-fpm.service

4. php-fpm 구동
#CentOS 6
service start php-fpm

#CentOS 7
systemctl start php-fpm.service

5. php-fpm 설정
vi /etc/php-fpm.d/www.conf

[root@hjshuweb php-fpm.d]# cat www.conf | grep -v ";"
[www]

listen = 127.0.0.1:9000

listen.allowed_clients = 127.0.0.1

listen.owner = app
listen.group = app
listen.mode = 0666

user = app

pm = dynamic

pm.max_children = 50

pm.start_servers = 5

pm.min_spare_servers = 5

pm.max_spare_servers = 35

slowlog = /var/log/php-fpm/www-slow.log

chdir = /home/app/HOME/nginx/html/

catch_workers_output = yes

php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on

php_value[session.save_handler] = files
php_value[session.save_path]    = /var/lib/php/session
php_value[soap.wsdl_cache_dir]  = /var/lib/php/wsdlcache


'WEB개발 > nginx' 카테고리의 다른 글

nginx와 php-fpm간 connection 실패 시 조치 방법  (0) 2019.01.04
nginx compile 설치 방법 ( CentOS )  (0) 2019.01.04

기존에는 Apple TV를 통한 미러링 Airplay를 활용하고, 거실에 사용 중인 마샬 스탠모어 스피커는 와이프님이 블루투스 연결로 사용 중이었음

아기가 태어남에 따라 Apple TV로 Airplay를 사용하면 TV가 켜지는 것이 거슬리기 시작

예전에 회사 부장님께 맥도날드 사드리고 받은 airport express 1세대가 Airplay를 지원하는 것을 알게되고 마샬 스탠모어와 같이 사용 중


결과는 대만족


우선 Airport Express 의 사양은 아래와 같음 ( from. 애플 공홈 설명서 )


AirPort Express 사양 

• 주파수 대역:2.4 또는 5기가헤르츠(GHz) 

• 무선 통신 출력 전원:20dBm(환경 여건에 따라 달라질 수 있습니다.) 

• 표준:802.11 DSSS 1 및 2Mbps 표준, 802.11a, 802.11b, 802.11g 사양 그리고 draft(초안) 802.11n 사양


인터페이스 

• 내장 10/100Base-T용 RJ-45 이더넷 LAN 커넥터(G) 

• USB(Universal Serial Bus) (d) 

• 아날로그/디지털 광학 3.5mm 미니잭 

• AirPort Extreme


Airplay 설정 설명

 기존의 무선 네트워크상에서 AirPort Express를 사용하고 전원 스피커나 홈 스테레오에 음악 스트리밍하기 또한 AirPort Express를 기존의 무선 네트워크에 클라이언트로 연결할 수도 있습니다. AirPort Express를 스테레오 또는 전원 스피커에 연결하고 AirTunes를 사용하여 iTunes의 음악을 재생할 수 있습니다. AirPort Express를 기존의 네트워크에 연결하면 AirPort Express를 네트워크 범위 내에 있는 다른 방에 위치시킬 수 있습니다.



이제는 설정 방법


  • 스피커 -  AUX선 - Airport Express 연결



  • Airport Express 를 초기화 ( 초기화 버튼을 5초 정도 누르면 주황색 불이 반짝임 )
  • PC에서 Airport Express 접속


  • 아래와 같이 로딩하다가 설정 화면이 뜨면 기존 네트워크 추가 선택


  • 기존 네트워크 선택 후 비밀번호 입력
  • 좀 기다리면 아래와 같이 설정이 완료되었다고 뜸


  • 이제 동일 네트워크에 있는 애플 기기에서 Airplay로 바로 출력이 가능함






다음은 Airport Express Airplay 사용의 장점
  • 블루투스와 달리 서로 다른 기기에서 접속하여 출력하기 편함
  • 블루투스와 달리 5GHz 대역을 지원하여 무선 간섭이 적음
  • 출력 중인 앱에서의 음성만 넘어가기 때문에 전화가 와도 바로 핸드폰으로 통화 가능
  • 중고 구매 시 저렴한 가격으로 Homepod 과 같은 편의성
단점은 광출력을 지원하지 않는 것 정도인듯
댓글로 알려주신 바와 같이 광출력 지원하는 것을 확인하고 쿠팡에서 케이블 + 각->원 변환 젠더 구입
라인업시스템 광오디...

스탠모어는 각 형식이고, 에어포트 익스프레스는 원 형식 광출력을 지원
광출력까지 지원하여 현재로서는 딱히 단점이 없어 보임




xmr-Stak 이 버전 업 되면서 devtoolset 7 환경에서 컴파일이 된다.
아래와 같이 명령어 수행하면 컴파일 가능
sudo yum install centos-release-scl epel-release
sudo yum install cmake3 devtoolset-7-gcc* hwloc-devel libmicrohttpd-devel openssl-devel make git
sudo scl enable devtoolset-7 bash
git clone https://github.com/fireice-uk/xmr-stak.git
mkdir xmr-stak/build
cd xmr-stak/build
cmake3 -DCMAKE_LINK_STATIC=ON -DXMR-STAK_COMPILE=generic -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF ..
make install


'채굴' 카테고리의 다른 글

[채굴] 모네로 (Monero) xmr-Stak Ubuntu 16.04 설치 방법  (0) 2019.03.12

+ Recent posts