CentOS ShowDoc 문서 도구 구축

6288 단어
1. 준비  Nginx  +  PHP  환경.
Nginx 설치
쓰다  yum  설치 하 다.  Nginx
yum install nginx

수정 하 다.  /etc/nginx/nginx.conf  파일 은 다음 과 같 습 니 다:
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; include /etc/nginx/conf.d/*.conf; server { listen 80; server_name 127.0.0.1; root /var/www/html; index index.php index.html error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } location ~ .php$ { root /var/www/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /.ht { deny all; } } }

Nginx 를 시작 하고 시작 으로 설정:
service nginx start
chkconfig nginx on

PHP 설치
쓰다  yum  설치 하 다.  php-fpm
yum install php php-gd php-fpm php-mcrypt php-mbstring php-mysql php-pdo

시동 을 걸다  php-fpm  켜 기 시작 으로 설정:
service php-fpm start
chkconfig php-fpm on

 
2. 프로젝트 만 들 기
다운로드 설치 ComposerComposer  PHP 의 의존 관리 도구 입 니 다. Composer 를 사용 하여 ShowDoc 프로젝트 를 만 드 는 것 을 추천 합 니 다.
다음 명령 을 실행 하여 설치 합 니 다.  Composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

 
Composer 설정 국내 미 러 사용
명령 설정 실행  Composer  국내 미 러 사용:
composer config -g repo.packagist composer https://packagist.phpcomposer.com

Composer 로 프로젝트 만 들 기
명령 실행 생 성 항목:
cd /var/www/html/ && composer create-project  showdoc/showdoc

showdoc 디 렉 터 리 쓰기 권한 설정
실행 명령 부여  showdoc  다음 디 렉 터 리 쓰기 권한
chmod a+w showdoc/install
chmod a+w showdoc/Sqlite
chmod a+w showdoc/Sqlite/showdoc.db.php
chmod a+w showdoc/Public/Uploads/
chmod a+w showdoc/Application/Runtime chmod a+w showdoc/server/Application/Runtime chmod a+w showdoc/Application/Common/Conf/config.php chmod a+w showdoc/Application/Home/Conf/config.php

생 성 이 완료 되 었 습 니 다. 브 라 우 저 를 통 해 접근 할 수 있 습 니 다. http://yourip/showdoc/install/ 혹시 http://yourdomain.com/showdoc/install/ ,언어 선택 을 하면 통과 할 수 있 습 니 다. http://yourip/showdoc 혹시 http://yourdomain/showdoc 사이트 효과 보기.
다음으로 전송:https://www.cnblogs.com/zuikeol/p/11506349.html

좋은 웹페이지 즐겨찾기