星光尽头

科技与人文的那个交集

M.J

CQPweb使用cqpweb-autoconfig.php自动配置

cqpweb-autoconfig.php是CQPweb提供的一个自动化配置脚本,方便对CQPweb运行所需要的参数进行配置。本文将我的配置流程记录下来并做笔记,以便有需要的朋友参考,如有什么问题,请在下面留言与我交流。

先说下我的用户配置,我为CQPweb专门创建了一个用户,名为CQPweb,从属apache运行用户www-data组,CQPweb相关的所有数据都放到/home/CQPweb下,主要分为CWB3,CQPweb,perl和Data四个目录。

开始运行:切换到相应目录(我的为/home/CQPweb/CQPweb)下,运行php cqpweb-autoconfig.php,以下为交互内容,蓝色为自己输入部分,绿色部分为注释,黑字部分为系统输出。

/***********************/
This is the interactive configuration setup program for CQPweb.

Are you using the Apache web server?                           // 是否在使用apache网页服务器

Enter [Y]es or [N]:y
OK, we’ll create .htaccess, .htpasswd, and .htgroup files.

Please enter
the username you want to use for the sysadmin account.
Note this can only contain ASCII letters, numbers and underscore.  //你想给系统管理员账户使用的用户名,只能包含ascii字符,数字和下划线

youradmin

Add another admin username?) [y/n]               //是否继续添加管理员用户,一般一个够了,搭建好后可以在后台修改

n
Please enter
the path to the directory containing the cwb executables
as an absolute directory path:

/home/CQPweb/CWB3/bin
Please enter
the path to the directory containing the apache passwd utilities
as an absolute directory path:
/usr/bin
Please enter
the path to the directory containing the perl executable   //包含perl可执行程序的路径
as an absolute directory path:

/usr/bin

Please enter
the path to the directory you wish to use for the CWB datafiles
as an absolute directory path:

/home/CQPweb/Data/CWBData
Please enter
the path to the directory you wish to use for CWB registry files
as an absolute directory path:

/home/CQPweb/Data/CWBReg
Please enter
the path to the directory you wish to use for the CQPweb cache and other temp files
as an absolute directory path:

/home/CQPweb/Data/CQPCache
Please enter
the path to the directory you wish to store passwords / group files in
as an absolute directory path:

/home/CQPweb/Data/CQPAuth
Please enter
the path to the directory you wish to store uploaded files in
as an absolute directory path:

/home/CQPweb/Data/Upload
Please enter
the MySQL username that you want CQPweb to use (do NOT use root).
Note this can only contain ASCII letters, numbers and underscore.

CQPweb
Please enter
the password for this MySQL user.
Note this can only contain ASCII letters, numbers and underscore.

yourpasswd
Please enter
the name of the MySQL database to use for CQPweb tables.
Note this can only contain ASCII letters, numbers and underscore.

CQPweb

Note: the system will be set to use ‘localhost’ as the MySQL server.
If you want to use a different MySQL server, please edit config.inc.php manually.

Saving config file …

Creating admin username(s) in Apache htpasswd/htgroup files…

(NB: admin passwords will be the same as the username
you should reset them as soon as possible)

Adding password for user starit
The files have been created within user group www-data.

The members of this group are:

If the username that the Apache httpd server runs under is not a member
of this group, CQPweb will not be able to modify the htpasswd/htgroup files
(which it needs to be able to do).

Do you want to keep this group for the htpasswd/group files?

Enter [Y]es or [N]:y
OK – onwards!
Done! note that the source file for this script will be gzipped,
to avoid unwanted re-running.

You should delete this program (or move it out of the web directory) for security.

评论回复

  1. 回复 zeroqok

    😮 叼叼叼叼叼

3 + 2 =

回到顶部