Fetch the repository succeeded.
当前版本基于Laravel7.x构建
cd web部署目录
git clone https://gitee.com/pear-admin/Pear-Admin-Laravel.git
chmod -R 755 ./Pear-Admin-Laravel
cd ./Pear-Admin-Laravel
composer update
mysql -uroot -p #输入密码
create database pear_admin_laravel
cp .env.example .env #配置.env里的数据库连接信息
php artisan key:generate #初始化key
php artisan storage:link #软连文件存储目录
chmod -R 755 storage/ #文件存储目录权限
php artisan migrate --step #执行数据迁移
php artisan db:seed #写入初始化数据
初始化完成后浏览器打开项目地址 https://www.domain.com/admin 登录
初始化登录用户名:admin 密码:password
可视化日志管理路由 https://www.domain.com/log-viewer
务必在登录成功后修改密码
<VirtualHost *:80>
DocumentRoot "/var/www/html/Pear-Admin-Laravel/public"
ServerName www.domain.com
ErrorLog "logs/site1-error.log"
CustomLog "logs/site1-access.log" common
<Directory "/var/www/html/HBAdmin/public">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
server {
listen 80;
server_name www.domain.com;
root /var/www/html/Pear-Admin-Laravel/public;
index index.html index.htm index.php;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico {
access_log off;
log_not_found off;
}
location = /robots.txt {
access_log off;
log_not_found off;
}
location ~ .php$ {
try_files $uri =404;
root /var/www/html/Pear-Admin-Laravel/public;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
cd ~
wget https://download.redis.io/releases/redis-6.2.5.tar.gz
tar xzf redis-6.2.5.tar.gz
cd redis-6.2.5
make
make install PREFIX=/usr/local/redis
cd /usr/local/redis/bin/
ll
cp ~/redis-6.2.5/redis.conf ./
vim redis.conf #找到daemonize no 改为daemonize yes
./redis-server redis.conf #后台启动redis
ps aux|grep redis #查看redis进程
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。