Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- httpd-vhosts.conf
- httpd-mpm.conf
- MySQL
- vimrc 옵션
- vim color scheme
- httpd-info.conf
- mod_unique_id
- epel repository
- httpd-default.conf
- Mod_Security 룰 셋
- gcc update
- Repository
- httpd-autoindex.conf
- httpd.conf
- CentOS
- Node.js apache 연동
- httpd-dav.conf
- Node.js 소스 설치
- PHP 5.2.17 .ini
- MySQL 5.1.41
- python 3.5.10
- node.js
- apache 연동
- python 3.X 소스 설치
- CentOS 6.10
- PHP 5.2 .ini
- CentOS 6
- jQuery
- httpd 2.2.32
- unique_id
Archives
- Today
- Total
곰시기's
[Linux] CentOS 6.10 - 11. Node.js 컴파일 설치 와 Apache 연동하기 본문
Node.js 설치 전
[python3.X 설치]
- node.js를 설치하기 위해 python의 버전을 2.7 이상으로 준비
- # python -V
python Ver. 2.6.6 - 기존 python 설치 위치
* # which pythonpython 2.6.6 설치 위치 - # cd /usr/local/src/
- # wget https://www.python.org/ftp/python/3.5.10/Python-3.5.10.tgz
* Python ftp server
* rc버전은 베타버전보다 살짝 개선 된 것이므로 rc보다 상위 버전을 사용할 것
* Python 설치 시 LANG=en_us.utf-8 로 변경 후 설치할 것 설치 후 LANG=ko_KR.EUC-KR 로 다시 변경- # tar -zxvf Python-3.5.10.tgz
- # cd Python-3.5.10
- # ./configure --prefix=/usr/python3.5 --enable-shared --enable-optimizations --with-openssl=/usr/local/openssl --with-system-ffi
- # make
- # make test
- # make install
- # cd ~
- # vi ~/.bash_profile ( 아래 내용 추가 )
- PY35=/usr/python3.5/
export PATH=$PATH:${PY35}/bin/
export LD_LIBRARY_PATH=${PY35}/lib:$LD_LIBRARY_PATH- # source ~/.bash_profile
- # python3.5 -V
[gcc update]
- # yum -y install centos-release-scl
- # yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++
- # scl enable devtoolset-8 bash
Node.js 설치
- # cd /usr/local/src/
- # wget https://nodejs.org/dist/latest-v10.x/node-v10.23.0.tar.gz
* node.js ftp servernode.js ver 10.23.0 - # tar -zxvf node-v10.23.0.tar.gz
- # cd node-v10.23.0
- # ./configure
- # make
- # make install
- # node -v
node.js 10.23.0
Node.js make error
[ File "tools/inspector_protocol/convert_protocol_to_json.py", line 6, in <module> import argparse ImportError: No module named argparse ]
# yum -y install python-argparse
Apache 연동
[ httpd.conf 수정 ]이후 node.js 관련 내용은 node.js 카테고리에서 진행...
- # cd /usr/tmp/httpd-2.2.32/modules/mappers
- # /usr/apache/bin/apxs -aic mod_rewrite.c
* apache설치 중 configure를 진행할 때 enable 하지 않았다면 진행
* apxs:Error: Command failed with rc=65536 발생 시
# cp /usr/bin/libtool /{apache 설치경로}/build/- # cd /usr/tmp/httpd-2.2.32/modules/proxy
- # /usr/apache/bin/apxs -aic mod_proxy.c proxy_util.c
- # /usr/apache/bin/apxs -aic mod_proxy_ajp.c proxy_util.c ajp_header.c ajp_utils.c ajp_link.c ajp_msg.c
- # /usr/apache/bin/apxs -aic mod_proxy_http.c
* 진행하였다면 mod_proxy.so, mod_proxy_ajp.so, mod_proxy_http.so 모듈이
httpd.conf에 ModuleLoad로 추가되었는지 확인하자# Listen 80 밑에 Listen 8915 추가- # vi /usr/apache/conf/httpd.conf
- # 아래 내용 찾아서 주석 해제
* Include conf/extra/httpd-vhosts.conf- # vi /usr/apache/conf/extra/httpd-vhosts.conf
- # httpd restart
* ProxyPass와 ProxyPassReverse의 /node는 httpd.conf파일에서 설정한 DocumentRoot를 기준으로한 상대경로이며, 뒤의 주소는 node.js에서 사용할 주소와 포트번호이다. httpd-vhost.conf
'Sever > CentOS 6.10' 카테고리의 다른 글
[Linux] CentOS 6.10 - 13. PHP.ini 분석 정리 (0) | 2020.11.25 |
---|---|
[Linux] CentOS 6.10 - 12. httpd.conf 분석 정리 (0) | 2020.11.24 |
[Linux] CentOS 6.10 - 10. APM 추가 (2) - Mod_Security (0) | 2020.11.13 |
[Linux] CentOS 6.10 - 09. APM 추가 (1) - Zend Optimizer (0) | 2020.11.11 |
[Linux] CentOS 6.10 - 08. APM 설치 (4) - 설정 (0) | 2020.11.11 |
Comments