红联Linux门户
Linux帮助

Ubuntu 16.04安装Bludit CMS

发布时间:2016-08-03 15:29:43来源:topspeedsnail.com作者:斗大的熊猫
Bludit(https://www.bludit.com/)是使用PHP编写的,简单的内容管理系统。Bludit不同于传统的CMS系统,它使用JSON格式文件存储数据,不需要后台数据库支持。
Bludit is a simple web application to make your own site or blog in seconds, it’s completly free and open source. Bludit uses flat-files (text files in JSON format) to store the posts and pages, you don’t need to install or configure a database. You only need a web server with PHP support.
Bludit源代码:https://github.com/dignajar/bludit
本文介绍怎么安装基于Nginx和PHP-FPM的Bludit。
 
Ubuntu 16.04 安装Bludit CMS
 
1、安装一些基本的工具
sudo apt install vim wget unzip
 
2、安装PHP和一些模块
sudo apt install php-fpm php-cli php-json php-curl php-gd php-mysql php-mbstring php-xml
配置PHP:
sudo sed -i "s/memory_limit = .*/memory_limit = 512M/" /etc/php/7.0/cli/php.ini
sudo sed -i "s/;date.timezone.*/date.timezone = UTC/" /etc/php/7.0/cli/php.ini
sudo sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /etc/php/7.0/fpm/php.ini
sudo sed -i "s/upload_max_filesize = .*/upload_max_filesize = 100M/" /etc/php/7.0/fpm/php.ini
sudo sed -i "s/post_max_size = .*/post_max_size = 100M/" /etc/php/7.0/fpm/php.ini
重启PHP-FPM:
sudo systemctl restart php7.0-fpm
 
3、下载Bludit
下载地址:https://github.com/dignajar/bludit/releases
wget https://github.com/dignajar/bludit/archive/1.4a.zip
unzip 1.4a.zip
sudo mkdir /var/www/
mv bludit-1.4a bludit
sudo mv bludit/ /var/www/
sudo chown -R www-data:www-data /var/www/bludit
 
4、安装配置Nginx
sudo apt install nginx
创建Nginx Server block:
sudo vim /etc/nginx/sites-available/bludit
写入如下内容:
server {
listen 80;
server_name your_domain_or_IP;
root /var/www/bludit;
index index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
access_log  /var/log/nginx/myBludit.com.access.log;
error_log   /var/log/nginx/myBludit.com.error.log;
# Deny direct access to .txt files
location ~* /bl-content/.*\.txt$ { 
return 404; 
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location ~ /\.ht {
deny all;
}
}
注意替换上面的域名。
使上面的配置文件生效:
sudo ln -s /etc/nginx/sites-available/bludit /etc/nginx/sites-enabled/bludit
测试配置文件,然后重启:
sudo nginx -t
sudo service nginx restart
 
5、完成安装
使用浏览器访问:http://your_doamin_or_IP
选择安装语言:
Ubuntu 16.04安装Bludit CMS
设置管理员密码:
Ubuntu 16.04安装Bludit CMS
完成安装:
Ubuntu 16.04安装Bludit CMS
Ubuntu 16.04安装Bludit CMS
 
本文永久更新地址:http://www.linuxdiyf.com/linux/22970.html