Skip to content

Instantly share code, notes, and snippets.

@wangwy
Created August 26, 2014 07:09
Show Gist options
  • Save wangwy/922118ddf47e10ffa78f to your computer and use it in GitHub Desktop.
Save wangwy/922118ddf47e10ffa78f to your computer and use it in GitHub Desktop.
第一步:安装 Apache2 + PHP 模块
$ sudo apt-get install apache2 libapache2-mod-php5 php5 php5-mysql
第二步:安装并配置Mysql
安装mysql
$ sudo apt-get install mysql-client-5.0 mysql-server-5.0
创建dotproject用户
root用户登录mysql
$ mysql --user=root --password
Enter password: root
创建dotproject用户 密码为dotproject并为其授权
mysql> CREATE USER 'dotproject'@'localhost' IDENTIFIED BY 'dotproject';
mysql> GRANT ALL PRIVILEGES ON * . * TO 'dotproject'@'localhost';
mysql> FLUSH PRIVILEGES;(使用户生效)
第三步:下载并安装dotproject
浏览器中输入 http://sourceforge.net/projects/dotproject/files/ 下载最新版本dotproject
将dotproject-2.1.2.tar.gz移动到/var/www/html目录并解压
sudo mv dotproject-2.1.2.tar.gz /var/www/html/
tar xvzf dotproject-2.1.2.tar.gz
第四步:配置dotproject
浏览器中输入http://localhost/dotproject五秒钟后跳转到配置界面
Database server type: MySQL
Hostname: localhost
User: dotproject
Password: dotproject
User persistent connection: (unchecked)
Drop existing database: (unchecked)
点击 Install db & write cfg按钮
第五步:创建config.php文件
在/var/www/html/dotproject/include文件夹下新建config.php文件内容(页面上显示的内容)为:
<?php
if (!defined('DP_BASE_DIR')) {
die('You should not access this file directly.');
}
### Copyright (c) 2004, The dotProject Development Team dotproject.net and sf.net/projects/dotproject ###
### All rights reserved. Released under GPL License. For further Information see LICENSE ###
### CONFIGURATION FILE AUTOMATICALLY GENERATED BY THE DOTPROJECT INSTALLER ###
### FOR INFORMATION ON MANUAL CONFIGURATION AND FOR DOCUMENTATION SEE ./includes/config-dist.php ###
$dPconfig['dbtype'] = 'mysql';
$dPconfig['dbhost'] = 'localhost';
$dPconfig['dbname'] = 'dotproject';
$dPconfig['dbuser'] = 'dotproject';
$dPconfig['dbpass'] = 'dotproject';
$dPconfig['dbpersist'] = false;
$dPconfig['root_dir'] = $baseDir;
$dPconfig['base_url'] = $baseUrl;
?>
第六步:登录dotproject
http://localhost/dotproject
user: admin
password: passwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment