这期内容当中小编将会给大家带来有关centos7中怎么搭建ShowDoc,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
1、nginx
yum install -y epel-release
yum install -y nginx
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
#修改nginx配置文件
vim /etc/nginx/nginx.conf
38 server {
39 listen 80 default_server;
40 listen [::]:80 default_server;
41 server_name _;
42 root /var/www/html;
43 index index.php index.html;
44
45 # Load configuration files for the default server block.
46 include /etc/nginx/default.d/*.conf;
47
48 location / {
49 }
50
51 error_page 404 /404.html;
52 location = /40x.html {
53 }
54
55 error_page 500 502 503 504 /50x.html;
56 location = /50x.html {
57 }
58 location ~ .php$ {
59 root /var/www/html;
60 fastcgi_pass 127.0.0.1:9000;
61 fastcgi_index index.php;
62 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
63 include fastcgi_params;
64 }
65 location ~ /.ht {
66 deny all;
67 }
68 }
systemctl start nginx
systemctl enable nginx
2、PHP
yum install -y php php-gd php-fpm php-mcrypt php-mbstring php-mysql php-pdo
systemctl start php-fpm
systemctl enable php-fpm
#下载安装PHP的依赖管理工具,Composer
curl -sS https://getcomposer.org/installer | php
cp composer.phar /usr/local/bin/composer
composer config -g repo.packagist composer https://packagist.phpcomposer.com
cd /var/www/html
composer create-project 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
3、访问
http://host-ip/showdoc/install
4、禁止注册
cp /var/www/html/showdoc/server/Application/Api/Controller/UserController.class.php{,.bak}
vim /var/www/html/showdoc/server/Application/Api/Controller/UserController.class.php
7 //注册
8 public function register(){
9 $this->sendError(10101,'no register');
10 return;
上述就是小编为大家分享的centos7中怎么搭建ShowDoc了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。