racktable安装过程

1.安装nginx

groupadd nginx
  useradd -g nginx nginx -M -s /sbin/nologin
 
  yum -y install gcc gcc-c++ pcre-devel zlib-devel
 
  tar zxvf nginx-1.11.5.tar.gz

  cd nginx-1.11.5

  ./configure --prefix=/usr/local/nginx  --user=nginx --group=nginx

  make && make install
 

2. 安装mariadb

yum -y install mariadb mariadb-server

3.安装PHP (要求5.5以上,这里我们安装php 7)

按照系统更新yum源,我的是centos7,所以我运行下面的代码!
CentOS/RHEL 7.x:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring  php70w-pecl-redis php70w-pecl-memcached php70w-devel php70w-bcmath

 3.修改PHP中的www.conf 文件

找到user = nginx
和group = nginx

3.修改nginx配制文件

location ~ \.php$ {
            root           /var/www/html/racktables/;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param SCRIPT_FILENAME 
            $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

 

posted @ 2020-04-27 09:20  MoStart  阅读(297)  评论(0编辑  收藏  举报