跳轉到內容
PHP論壇人

論壇

  1. Invision Community

    1. 428
      篇文章
    2. 251
      篇文章
    3. 67
      篇文章
    4. 39
      篇文章
  2. vBulletin

    1. 18
      篇文章
    2. 20
      篇文章
    3. 20
      篇文章
  3. XenForo

    1. 3
      篇文章
    2. 3
      篇文章
    3. 1
      篇文章
  4. 伺服器

    1. 26
      篇文章
    2. 28
      篇文章
    3. 4
      篇文章
    4. 35
      篇文章
  • 線上用戶   0位會員, 0位匿名會員, 2位訪客 (顯示全部)

    • 目前線上沒有會員
  • 最新回复

    • 以上的sphinx搜索,雖然可以搜尋,但是只能搜索英文字 我沒找到如何修改為搜索中文
    • ---------------------------------------------------------- 开机启动sphinx ---------------------------------------------------------- 没有找到重启时,如何启动sphinx 只能手动敲命令 cd /usr/local/sphinx/ /usr/local/sphinx/bin/searchd --config /usr/local/sphinx/etc/vbulletin-sphinx.php
    • vBulletin 6.0 Sphinx 中文搜索 (宝塔面板) 教程环境:Rocky Linux 8、宝塔面板、MySQL 5.7 ----------------------------------------------------------------- 安装套件 ----------------------------------------------------------------- 安装java yum -y install java   安装python3.11 yum -y install python3.11 安装 python3.11-devel yum -y install python3.11-devel   安装glibc yum -y install glibc   安装gcc-c++ yum -y install gcc-c++   安装mysql-devel yum -y install mysql-devel 安装Python package pip3 install Jpype1   安装 libpq 13.11 yum -y install libpq   ----------------------------------------------------------------- 下载Sphinx二进制包 & make编译 ----------------------------------------------------------------- Sphinx官网下载 http://sphinxsearch.com/downloads 注意:Sphinx太旧、太新的版本会在后续步骤中 (/usr/local/sphinx/bin/searchd --config /usr/local/sphinx/etc/vbulletin-sphinx.php) 有错误! 安装 Sphinx 3.0.1 下载完成,再上传到自己的服务器,放在 /usr/local/ 目录 cd /usr/local/ tar zxf sphinx-3.0.1-7fec4f6-linux-amd64.tar.gz   将sphinx-3.0.1目录,更名为sphinx mv sphinx-3.0.1-7fec4f6-linux-amd64 sphinx   编译 cd /usr/local/sphinx/api/libsphinxclient ./configure --enable-id64 --prefix=/usr/local/sphinx make && make install   ----------------------------------------------------------------- 在 /usr/local/ 创建目录 ----------------------------------------------------------------- mkdir /usr/local/sphinx/log mkdir /usr/local/sphinx/data     ----------------------------------------------------------------- 配置 vBulletin ----------------------------------------------------------------- 在 论坛根目录/core/includes/config.php 文件的末尾,添加以下内容: vi /www/wwwroot/域名.com/core/includes/config.php //  Sphinx configuration parameters $config['Misc']['sphinx_host']    = '127.0.0.1'; $config['Misc']['sphinx_port']    = '9306'; $config['Misc']['sphinx_path']    = '/usr/local/sphinx'; //no trailing slash $config['Misc']['sphinx_config']    = $config['Misc']['sphinx_path'] . '/etc/vbulletin-sphinx.php'; 保存并离开 :wq     ----------------------------------------------------------------- vbulletin-sphinx.php 上传到 /usr/local/sphinx/etc/ 目录 ----------------------------------------------------------------- vbulletin-sphinx.php 上传到 /usr/local/sphinx/etc/ 目录   在vBulletin 6.0 论坛程序.zip 的 do_not_upload 文件夹中,可找到vbulletin-sphinx.php       ----------------------------------------------------------------- 创建 sphinxsearchfiles 文件夹 ----------------------------------------------------------------- 进入宝塔面板 在 /www/wwwroot/域名.com/ ,创建 sphinxsearchfiles 文件夹 将vBulletin的sphinxsearchfiles文件夹中的几个文件上传到此目录 在vBulletin 6.0 论坛程序.zip 的 do_not_upload 文件夹中,可找到 sphinxsearchfiles 文件夹与其数个文件     ----------------------------------------------------------------- 修改 vbulletin-sphinx.php ----------------------------------------------------------------- 修改 vbulletin-sphinx.php vi /usr/local/sphinx/etc/vbulletin-sphinx.php 改为宝塔面板用的PHP路径 #!/www/server/php/80/bin/php -q 将 $myforumroot 更改为确切的论坛根目录 $myforumroot = '/www/wwwroot/你的域名.com'; $charsetTablesFolder = '/www/wwwroot/你的域名.com/sphinxsearchfiles'; $charsetTablesPrefix = 'sphinxcharsets_';   $utf8mb4 = true;   查找 mysql 能不能将 mysql 改为 mariadb,还需要测试过才知道   type    = mysql listen    = {$config['Misc']['sphinx_port']}:mysql41   保存并离开 :wq   ----------------------------------------------------------------- 将 vbulletin-sphinx.php 文件设置为可执行文件 ----------------------------------------------------------------- chmod +x /usr/local/sphinx/etc/vbulletin-sphinx.php     ----------------------------------------------------------------- 启动服务(daemon) ----------------------------------------------------------------- cd /usr/local/sphinx/ /usr/local/sphinx/bin/searchd --config /usr/local/sphinx/etc/vbulletin-sphinx.php 忽略有关 vbulletin disk 索引的警告,一旦运行索引器就会创建       如果有以下的错误,sphinx有地方配置错误了       ---------------------------------------------------------- 测试sphinx是否运行 ---------------------------------------------------------- ps ax | grep search[d] 如果正常运行,则显示 /usr/local/sphinx/bin/searchd --config /usr/local/sphinx/etc/vbulletin-sphinx.php 类似的消息     ----------------------------------------------------------------- 论坛后台打开Sphinx中文搜索 ----------------------------------------------------------------- 论坛后台 -> 设置 -> 选项 -> 消息搜索选项 ->  启用搜索引擎 -> 是 搜索索引字的最小长度 -> 2 -> 保存 论坛后台 -> 设置 ->搜索类型 选择搜索执行 -> Sphinx搜索 -> 进行 论坛后台 -> 维护 -> 清除系统缓存 论坛后台 -> 维护 -> 一般更新工具 -> 重建搜索索引 你确定要清空搜索索引? -> 是 要索引的内容类型 -> 所有 -> 重建搜索索引
    • 本教程使用 军哥LNMP一键安装包 环境 Linux + Nginx + MariaDB 10.6 + PHP 8.1   在此步骤 lnmp vhost add 允许伪静态 Allow Rewrite rule? (y/n)  按 y   Please enter the rewrite of programme, wordpress,discuzx ......... (Default rewrite: other):  自定义伪静态的文件名称,先输入 vbb 也就是之后的 vbb.conf   在lnmp vhost add 添加域名,申请SSL证书完成后 开始写入 vbb.conf 配置文件的伪静态   vi /usr/local/nginx/conf/rewrite/vbb.conf 在 vbb.conf 写入额外的一小段Nginx伪静态 (宝塔面板应该也可用)   ----------------------------------------------------- 解压论坛程序.zip ----------------------------------------------------- cd /home/wwwroot/域名.com unzip -o vBulletin604.zip   ----------------------------------------------------- 更改站点目录的拥有人/用户组 www www ----------------------------------------------------- 看到拥有人/用户组是 root root ls -l 改为 www www,命令 chown www:www -R /home/wwwroot/域名.com/* 可看到已改为 www www ls -l   ----------------------------------------------------- 在论坛根目录,更改文件名 ----------------------------------------------------- 将 robots.txt.new 更改为 robots.txt 命令 mv robots.txt.new robots.txt     ----------------------------------------------------- 将config.php.new   CHMOD 755 ----------------------------------------------------- /core/includes/config.php.new 将 config.php.new   CHMOD 755 如果没修改就没有权限写入,将出现错误消息     ----------------------------------------------------- 开始安装  ----------------------------------------------------- 浏览器输入 https://域名.com 有部份还是写 vBulletin 5,官方还没改为 vBulletin 6       ----------------------------------------------------- 删除 makeconfig.php ----------------------------------------------------- 删除 makeconfig.php (位于 /core/install/makeconfig.php) cd /home/wwwroot/域名.com/core/install rm makeconfig.php         删除 makeconfig.php 之后 返回浏览器,按 F5 重新整理,再继续安装             ----------------------------------------------------- 数据库不是 utf-8 ----------------------------------------------------- Action Required The current database character set is 'latin1'. It is strongly recommended that you use the utf-8 character set when running vBulletin. However if other applications are using this database then changing the character set can affect them. Do you automatically want to change your database to use utf-8?   数据库还不是 utf8mb4_general_ci 在install安装之前,可先用 phpmyadmin 数据库修改为 utf8mb4_general_ci   或者 install 到这个步骤,可自动更改,按 Yes 按钮                 ----------------------------------------------------- General Settings -----------------------------------------------------         ----------------------------------------------------- Administrator Account Setup ----------------------------------------------------- 设置管理员帐户       ----------------------------------------------------- Install Complete ----------------------------------------------------- You may review the install steps by pressing 'Back to Install' then 'Show Details'. Please delete the install directory now. 请删除install目录   按下Go to Admin CP按钮       ----------------------------------------------------- 有以下画面才是伪静态运行正确 ----------------------------------------------------- Please delete the install directory now. 你需要删除 根目录/core/install/,删除这个install目录   按下 Go to Admin CP 按钮,有以下画面才是伪静态运行正确 或者浏览器输入 https://域名.com,论坛版面没乱掉,才是伪静态有运行         ----------------------------------------------------- 中文语言包 ----------------------------------------------------- 接下来,导入中文语言包   更新中文语言包   ----------------------------------------------------- 后台设置伪静态 ----------------------------------------------------- 论坛后台设置Nginx伪静态  
    • 建议手工配置 Nginx Php MySQL/MariaDB,远离各种面板。
    • SFTP就是很奇怪,我的经验就是这东西速度,比不上Rsync,也比不上 https 上传下载,就算都用SSL加密。
    • 终于可使用了,但是未完成,还有很多没写,一些地方会有错误 教程用 军哥LNMP一键包,是额外的一小段Nginx伪静态,宝塔面板应该也可用   vi /usr/local/nginx/conf/rewrite/vbb.conf   rewrite /threads/.*$ /showthread.php?$args last; rewrite /forums/.*$ /forumdisplay.php?$args last; rewrite /members/.*$ /member.php?$args last; rewrite /blogs/.*$ /blog.php?$args last; rewrite /entries/.*$ /entry.php?$args last; rewrite ^/css.php$ /core/css.php last; rewrite ^/install/ /core/install/ last; rewrite ^/(admincp/)$ /index.php?routestring=$1 break; if (!-e $request_filename){ rewrite ^(.*)$ /index.php?routestring=$1 break; } location / { try_files $uri $uri/ /index.php?routestring=$uri$is_args$args; }   保存并离开 :wq   重启nginx /etc/init.d/nginx restart vbb-ng.txt
  • 論壇統計

    • 總主題數
      473
    • 總文章數
      948
  • 會員統計

    • 會員總數
      293
    • 最高記錄
      432

    最新會員
    守望君
    註冊日期
×
×
  • 建立新的...