https://idlecomputer.tistory.com/240
1. centos7에 composer 설치 //먼저 PHP CLI(명령줄 인터페이스) 패키지 및 기타 모든 종속성을 설치 sudo yum install php-cli php-zip wget unzip sudo yum -y update cd /tmp //composer 설치 sudo curl -sS https://getcomposer.org/installer | php //composer명령어를 어디서든 쓸수있게 mv composer.phar /usr/local/bin/composer composer 에러 : [RuntimeException] require-dev.mikey179/vfsStream is invalid, it should not contain uppercase characters. Pleas..
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client 원인 이 문제는 클라이언트 프로그램에서 mysql 패스워드 플러그인 "caching_sha2_password"을 소화하지 못해서 생기는 오류입니다. 클라이언트 프로그램에서 사용할 수 있도록 유저의 패스워드 Plusin을 바꿔줍시다. 해결방법 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password123@'; flush privileges;
scope에 대해서 알.아.보.자 1. 전역(global)과 지역(local) 전역 : 변수가 중괄호{} 바깥에 선언되었다면 전역스코프, 어디에서든 해당 변수 사용가능 지역 : 변수가 함수내에 선언되어있으며, 함수 밖에서는 해당 변수를 사용 할 수 없음 2. 유효 범위 체인 함수안에 함수가 있는경우 - 제일 안쪽에 있는 함수는 a라는 변수를 찾을때 자신의 스코프에서 변수a를 찾음 - 없으면 상위 스코프(그다음으로 감싸고 있는 함수)에서 변수a를 찾음 - 없으면 전역 스코프에서 변수a를 찾음 이렇게 체인처럼 꼬리를 물고, 상위 스코프를 참조하기때문에 스코프 체인(유효범위체인)이라고 함 3. 렉시컬 스코프 함수를 어디서 호출하는지가 아니라, 어떤 스코프에서 선언하였는지에 따라 결정된다. 예시 var text..
app.js //채팅에 필요한 모듈s const express = require('express'); const http = require('http'); const app = express(); const server = http.createServer(app); const fs = require('fs'); const io = require('socket.io')(server); app.use(express.static('src')); app.get('/', function (req, res) { fs.readFil('./src/index.html', (err, data) => { if (err) throw err; res.writeHead(200, { 'Content-Type': 'text/html..
보호되어 있는 글입니다.
https://nirsa.tistory.com/64
1. httpd.conf 설정 DocumentRoot /home/test/public_html ServerName test.com AllowOverride All Require all granted ProxyRequests Off ProxyPreserveHost On ProxyPass http://test.com:8000/ ProxyPassReverse http://test.com:8000/ 주요코드 ProxyRequests Off ProxyPreserveHost On #주소가 test.com/order일때, 프록시 변경해줌 ProxyPass http://order.playon.tistory.com/ ProxyPassReverse http://order.playon.tistory.com/ 출처 https..
1. 사용할 디렉토리 생성 / 프로젝트 초기화 mkdir www-express cd www-express //프로젝트 초기화 npm init 2. express 설치 npm install express --save 3. app.js const express = require('express'); const app = express(); app.get('/', function (req, res) { res.send('Hello World!'); }); var server = app.listen(8000, function () { var host = server.address().address; var port = server.address().port; console.log('Server is workin..
node.js 최신버전은 centos7이상에서 하는게 편함 설치순서 1. nvm(Node Version Manager) 2. nodejs 3. npm (Node Package Manager) 4. 방화벽 설치 및 설정 1. 저장소 추가 yum repolist 2. epel (Extra Packages of Enterprise Linux) 추가 yum install epel-release 3. curl 추가 yum install curl 4. nvm설치 curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash 5.재부팅해야 적용됨 / 버전확인 reboot nvm --version 6. node.js / npm 설치..
1. 방화벽 1) 확인 vi /etc/firewalld/zones/public.xml or netstat -ntlp 2) 8080 포트 오픈 (기본적으로 80, 3306, 21, 22) firewall-cmd --permanent --zone=public --add-port=8080/tcp 3) 포트삭제 firewall-cmd --permanent --zone=public --remove-port=80/tcp 4)방화벽 재시작 firewall-cmd --reload 5)서비스시작, 자동시작, 서비스 상태 systemctl start firewalld //서비스시작 systemctl enable firewalld //재부팅시 자동 시작 systemctl status firewalld //서비스 상태 *에러..