企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] ## 搭建宝塔面板 搭建ss-panel前先搭建宝塔面板,不会搭建的可以自行百度【只是PHP最好选择7.0】 环境安装好后,添加一个站点,绑定你的域名: ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815175060.png "搭建SS-Panel") 记住你的这个站点路径,回到VPS服务器中,进入到你的站点目录内: ~~~ cd /www/wwwroot/你的站点目录 ~~~ ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815203993.png "搭建SS-Panel") ## 下载 ss-panel 下载 ss-panel 程序文件: ~~~ git clone https://github.com/sphard/ss-panel-v3-mod_UIChanges.git tmp && mv tmp/.git . && rm -rf tmp && git reset --hard ~~~ ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815214289.png "搭建SS-Panel") ## 添加伪静态 回到宝塔面板中,点击站点设置,添加伪静态规则: ~~~ location / { try_files $uri $uri/ /index.php$is_args$args; } ~~~ ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815191951.png "搭建SS-Panel") ##改运行目录 接着点击网站目录,将运行目录改为 `/public`,如图: ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815222386.png "搭建SS-Panel") ##修改权限 现在在你的站点根目录下找到 `storage` 目录,点击如图按钮修改权限为 `777`,并把所有者改为 `www` ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110912551421.png "搭建SS-Panel") ##下载 ss-panel 现在下载 ss-panel 程序到本地电脑.(不会github的我已经下载好放在文末了) 项目地址: [https://github.com/sphard/ss-panel-v3-mod\_UIChanges](https://blog.ccswust.org/go/?url=aHR0cHM6Ly9naXRodWIuY29tL3NwaGFyZC9zcy1wYW5lbC12My1tb2RfVUlDaGFuZ2Vz) ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815252751.png "搭建SS-Panel") ##新建数据库 此时打开宝塔面板内的 数据库,新建一个数据库, 命名为 `sspanel` : ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815292375.png "搭建SS-Panel") ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815293533.png "搭建SS-Panel") 然后登录进去 ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815300048.png "搭建SS-Panel") ## 导入数据文件 导入我们刚下载到本地的数据库文件,数据库文件的路径是: ~~~ ss-panel-v3-mod_Uim/sql/glzjin_all.sql ~~~ ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815320334.png "搭建SS-Panel") ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815325118.png "搭建SS-Panel") ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815342546.png "搭建SS-Panel") ##编辑`config.php` 回到宝塔面板中,进入 `config` 目录,编辑目录下的 `.config.php` 文件: ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815350981.png "搭建SS-Panel") ## 自定义名字 填写你的站点名字、域名、随机安全码: ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815374735.png "搭建SS-Panel") 确定填写都是正确后,保存文件。 ## 安装依赖 回到VPS服务器中,并在你的站点根目录内执行下面的命令开始安装依赖: ~~~ php composer.phar install ~~~ 安装完成后如图所示: ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815393165.png "搭建SS-Panel") ## 添加计划任务 添加计划任务: ~~~ crontab -e ~~~ 输入如下内容: ~~~ 30 22 * * * php /www/wwwroot/你的站点目录/xcat sendDiaryMail */1 * * * * php /www/wwwroot/你的站点目录/xcat synclogin */1 * * * * php /www/wwwroot/你的站点目录/xcat syncvpn 0 0 * * * php -n /www/wwwroot/你的站点目录/xcat dailyjob */1 * * * * php /www/wwwroot/你的站点目录/xcat checkjob */1 * * * * php -n /www/wwwroot/你的站点目录/xcat syncnas ~~~ 按esc后直接按shift+zz就可以保存退出了 ## 创建管理账号 现在来创建面板的管理员账号: ~~~ php -n xcat createAdmin ~~~ 一般输入这个命令后会有一些警告和错误信息,这里我们直接无视掉就好了,稍等一会儿就会提示让你输入管理员的邮箱之类的,照着填就行。 ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815480689.png "搭建SS-Panel") ## 同步用户数据 管理员账号创建完成后,现在来同步一下用户数据: ~~~ php xcat syncusers ~~~ 回车即可同步完成 ##前端安装完成 至此,该面板程序就部署完成了,可以打开浏览器输入你的域名看看长什么样子: ![搭建SS-Panel](https://aliyun.ccswust.org/images/2018/11/2018110815542552.png "搭建SS-Panel") 上面文章写了sspanel魔改面板的搭建:[基于宝塔面板的sspanel魔改V3一键脚本](https://blog.ccswust.org/3934.html)  ,此篇文章我们讲一下此面板的使用方法详解