安装

安装

  • 点击下载最新版本TP-Admin
  • 创建数据库并导入Docs/tp-admin.sql。
  • 修改数据库配置参数APP/Common/Conf/database.php(线上配置),或者添加本地配置文件APP/Common/Conf/local.php(本地参数)。local将覆盖database的配置
  • Apache必须开启重写模块
  • 服务器配置
    • 你可以直接通过http://localhost/TP-Admin-V2.0/Public/ 来访问。系统入口文件在/Public/index.php
    • 但是建议通过配置虚拟主机用域名访问
      虚拟主机配置
      <VirtualHost *:80>
          ServerAdmin lizhiliang@lelai.com
          DocumentRoot "C:/wamp/www/TP-Admin/Public"
          ServerName tp-admin.hhailuo.com
          ErrorLog "logs/tp-admin.hhailuo.com-error.log"
          CustomLog "logs/tp-admin.hhailuo.com-access.log" combined
          <Directory "C:/wamp/www/TP-Admin/Public">
              Options Indexes FollowSymLinks Includes ExecCGI
              AllowOverride All
              Order allow,deny
              Allow from all
          </Directory>
      </VirtualHost>
      
      server {
          listen 80;
          server_name tp-admin.hhailuo.com;
          index index.html index.php;
          root /var/www/TP-Admin-V2.0/Public/;
      
          location / {
              rewrite  ^(.*)$  /index.php?s=$1  last;
          }
      
          #location ~ .*\.(php|php5)?$
          location /index.php {
              include fastcgi_params;
              # fastcgi_pass 127.0.0.1:9000;
              fastcgi_pass unix:/var/run/php5-fpm.sock;
              # fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket;
              fastcgi_index index.php;
          }
          location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
              expires 30d;
          }
          location ~ .*\.(js|css)?$ {
              expires 1h;
          }
          error_log /var/log/nginx/hhailuo/error.log;
          access_log  /var/log/nginx/hhailuo/access.log;
      }
      
  • 安装成功,登陆后台。 默认用户名密码为 admin / admin