在Arch Linux上使用Makepkg
在Arch Linux上使用Makepkg可以避免系统污染,确保仅安装必要的依赖关系。
Vanilla是一个用PHP编写的简单讨论论坛。Vanilla源代码公开托管在Github上。本指南将引导您在使用PHP,MySQL作为数据库和Nginx作为Web服务器的全新Ubuntu 18.04 LTS Vultr服务器实例上完成Vanilla安装过程。
香草论坛推荐的软件堆栈:
mbstring,curl,gd,PDO,mysqli,openssl,gd,pdo。检查Ubuntu版本。
lsb_release -ds
# Ubuntu 18.04.2 LTS
创建一个non-root具有sudo访问权限的新用户帐户并切换到该帐户。
adduser johndoe --gecos "John Doe"
usermod -aG sudo johndoe
su - johndoe
注意:用您的用户名替换johndoe。
设置时区。
sudo dpkg-reconfigure tzdata
确保您的系统是最新的。
sudo apt update && sudo apt upgrade -y
安装所需的软件包。
sudo apt install -y zip unzip curl wget git
安装PHP以及必要的PHP扩展。
sudo apt install -y php7.2 php7.2-cli php7.2-fpm php7.2-common php7.2-mbstring php7.2-curl php7.2-gd php7.2-mysql php7.2-json
检查版本。
php -v
# PHP 7.2.19-0ubuntu0.18.04.2 (cli) (built: Aug 12 2019 19:34:28) ( NTS )
检查已安装的PHP扩展。
php -m
# mbstring
# curl
# gd
# PDO
# mysqli
# openssl
# . . .
安装MySQL。
sudo apt install -y mysql-server
检查版本。
mysql --version
# mysql  Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using  EditLine wrapper
运行mysql_secure_installation脚本以提高MySQL安装的安全性。
sudo mysql_secure_installation
以root用户身份登录MySQL。
sudo mysql -u root -p
# Enter password:
创建一个新的MySQL数据库和用户并记住凭据。
CREATE DATABASE dbname;
GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit;
安装Nginx。
sudo apt install -y nginx
检查版本。
sudo nginx -v
# nginx version: nginx/1.14.0 (Ubuntu)
配置Nginx以与Vanilla论坛一起使用。
sudo vim /etc/nginx/sites-available/vanilla.conf
使用以下配置填充文件。
server {
  listen 80;
  server_name example.com;
  root /var/www/vanilla;
  index index.php;
  location ~* /\.git { deny all; return 403; }
  location /build/ { deny all; return 403; }
  location /cache/ { deny all; return 403; }
  location /cgi-bin/ { deny all; return 403; }
  location /uploads/import/ { deny all; return 403; }
  location /conf/ { deny all; return 403; }
  location /tests/ { deny all; return 403; }
  location /vendor/ { deny all; return 403; }
  location ~* ^/index\.php(/|$) {
    include snippets/fastcgi-php.conf;
    fastcgi_param SCRIPT_NAME /index.php;
    fastcgi_param SCRIPT_FILENAME $realpath_root/index.php;
    fastcgi_param X_REWRITE 1;
    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  }
  location ~* \.php(/|$) {
    rewrite ^ /index.php$uri last;
  }
  location / {
    try_files $uri $uri/ @vanilla;
  }
  location @vanilla {
    rewrite ^ /index.php$uri last;
  }
}
vanilla.conf通过将文件链接到sites-enabled目录来激活新配置。
sudo ln -s /etc/nginx/sites-available/vanilla.conf /etc/nginx/sites-enabled
测试配置。
sudo nginx -t
重新加载Nginx。
sudo systemctl reload nginx.service
导航到/var/www目录。
cd /var/www
下载最新的Vanilla论坛。
sudo wget https://open.vanillaforums.com/get/vanilla-core-3.1.zip
解压缩并删除zip存档。
sudo unzip vanilla-core-3.1.zip
sudo rm vanilla-core-3.1.zip
将目录重命名为vanilla。
sudo mv package vanilla
提供适当的所有权。
sudo chown -R www-data:www-data /var/www/vanilla
导航到您在网络浏览器中上传Vanilla的文件夹,然后按照屏幕上的说明完成设置。
在Arch Linux上使用Makepkg可以避免系统污染,确保仅安装必要的依赖关系。
快速学习如何在Ubuntu 16.04上安装OpenSIPS控制面板,为VoIP提供商提供支持的功能。
学习如何在Fedora 28上安装Akaunting,一款适合小型企业和自由职业者的开源会计软件。
使用其他系统?Mailtrain是一个基于Node.js和MySQL / MariaDB构建的开源自托管新闻通讯应用程序。
了解導致Minecraft延遲的原因和解決方案,包括優化伺服器性能和減少滯後的步驟。
勒索軟件攻擊呈上升趨勢,但人工智能能否幫助應對最新的計算機病毒?AI 是答案嗎?在這裡閱讀知道是 AI 布恩還是禍根
ReactOS,一個開源和免費的操作系統,這裡有最新版本。它能否滿足現代 Windows 用戶的需求並打倒微軟?讓我們更多地了解這種老式但更新的操作系統體驗。
Whatsapp 終於為 Mac 和 Windows 用戶推出了桌面應用程序。現在您可以輕鬆地從 Windows 或 Mac 訪問 Whatsapp。適用於 Windows 8+ 和 Mac OS 10.9+
閱讀本文以了解人工智能如何在小型公司中變得流行,以及它如何增加使它們成長並為競爭對手提供優勢的可能性。
最近,Apple 發布了 macOS Catalina 10.15.4 補充更新以修復問題,但似乎該更新引起了更多問題,導致 mac 機器變磚。閱讀這篇文章以了解更多信息