Ubuntu系统下Tipask_v3.2_UTF8社区版安装笔记

(1)下载源程序&解压:
cd /opt/
wget https://www.tipask.com/release/Tipask_v3.2_UTF8_20170412.zip
unzip Tipask_v3.2_UTF8_20170412.zip
mv tipask-3.2.1 /opt/tipask
touch /opt/tipask/.env
chown -R www-data.www-data tipask
chmod -R 777 tipask

(2)添加tipask数据库:
mysql -u root -p #回车后输入root密码
mysql> CREATE DATABASE tipask DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
mysql> CREATE USER [email protected];
mysql> SET PASSWORD FOR [email protected]= PASSWORD("yourdbpassword");
mysql> GRANT ALL PRIVILEGES ON tipask.* TO [email protected] IDENTIFIED BY 'yourdbpassword';
mysql> FLUSH PRIVILEGES;
mysql> exit

(3)修改tipask数据库配置文件:
vi /opt/tipask/config/database.php
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', 3306),
'database' => env('DB_DATABASE', 'tipask'),
'username' => env('DB_USERNAME', 'tipask'),
'password' => env('DB_PASSWORD', 'yourdbpassword'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => env('DB_PREFIX','ask_'),
'strict' => false,
],

:wq!

(4)添加www.service-labs.com vhost:
vi /etc/nginx/sites-available/default
#start www.service-labs.com
server {
listen 80;

root /opt/tipask/public;
index index.php index.html index.htm;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
# Make site accessible from http://localhost/
server_name www.service-labs.com;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php$is_args$args;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}

# Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
#location /RequestDenied {
# proxy_pass http://127.0.0.1:8080;
#}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /usr/share/nginx/html;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
fastcgi_buffer_size 128k;
fastcgi_buffers 32 32k;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
#end www.service-labs.com
:wq!
service nginx restart

(5)打开浏览器:http://www.service-labs.com/install/
到http://www.service-labs.com/install/config这一步骤时提示输入的数据库信息为:
数据库账号:root
数据库密码:root账号的密码
数据库名:tipask
其它用默认值。

(6)设置网站名、网址等信息后完成安装。

上一篇: