标签:available different time receives tar.gz color check cat span
1. 安装apache
User@ubuntu:$ sudo apt-get install apache2 |
注:安装完以后能够通过http://192.168.128.128/ 来訪问,看是否成功安装。当中192.168.128.128是主机的ip地址,依据实际情况替换掉。
2. 安装mysql
User@ubuntu:$ sudo apt-get install mysql-server |
3. 检查perl版本号
User@ubuntu:$ sudo perl -v This is perl 5, .... |
4. 安装sendmail
User@ubuntu:$ sudo apt-get install sendmail
|
5. 安装bugzilla
User@ubuntu:$ sudo wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.4.6.tar.gz User@ubuntu:$ sudo tar -xvf bugzilla-4.4.6.tar.gz User@ubuntu:$ sudo mv bugzilla-4.4.6 /var/www/bugzilla //apache web 根文件夹 |
6. 安装perl相关模块
User@ubuntu:$ sudo apt-get install gcc //安装以下的perl包须要 User@ubuntu:$ sudo /usr/bin/perl install-module.pl --all //该命令安装全部须要的依赖模块包,这个过程有点长,请耐心等待...
|
7. apache 相关配置,以下红色部分为改动或新加
# # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.2/ for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They‘re here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the ‘global environment‘). # 2. Directives that define the parameters of the ‘main‘ or ‘default‘ server, # which responds to requests that aren‘t handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server‘s control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "foo.log" # with ServerRoot set to "/etc/apache2" will be interpreted by the # server as "/etc/apache2/foo.log". #
### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. #
# # ServerRoot: The top of the directory tree under which the server‘s # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation (available # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # #ServerRoot "/etc/apache2" ServerRoot "/var/www" # # The accept serialization lock file MUST BE STORED ON A LOCAL DISK. # LockFile ${APACHE_LOCK_DIR}/accept.lock
# # PidFile: The file in which the server should record its process # identification number when it starts. # This needs to be set in /etc/apache2/envvars # PidFile ${APACHE_PID_FILE}
# # Timeout: The number of seconds before receives and sends time out. # Timeout 300
# # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive On
# # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100
# # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 5
## ## Server-Pool Size Regulation (MPM specific) ##
# prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule>
# worker MPM # StartServers: initial number of server processes to start # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a # graceful restart. ThreadLimit can only be changed by stopping # and starting Apache. # ThreadsPerChild: constant number of worker threads in each server process # MaxClients: maximum number of simultaneous client connections # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule>
# event MPM # StartServers: initial number of server processes to start # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxClients: maximum number of simultaneous client connections # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_event_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule>
# These need to be set in /etc/apache2/envvars #User ${APACHE_RUN_USER} #Group ${APACHE_RUN_GROUP} User www-data Group www-data # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. #
AccessFileName .htaccess
# # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy all </Files>
# # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # # It is also possible to omit any default MIME type and let the # client‘s browser guess an appropriate action instead. Typically the # browser will decide based on the file‘s extension then. In cases # where no good assumption can be made, letting the default MIME type # unset is suggested instead of forcing the browser to accept # incorrect metadata. # DefaultType None
# # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it‘d be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off
# ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a <VirtualHost> # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a <VirtualHost> # container, that host‘s errors will be logged there and not here. # ErrorLog ${APACHE_LOG_DIR}/error.log
# # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn
# Include module configuration: Include /etc/apache2/mods-enabled/*.load Include /etc/apache2/mods-enabled/*.conf
# Include all the user configurations: Include /etc/apache2/httpd.conf
# Include ports listing Include /etc/apache2/ports.conf
# # The following directives define some format nicknames for use with # a CustomLog directive (see below). # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i # LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent
# Include of directories ignores editors‘ and dpkg‘s backup files, # see README.Debian for details.
# Include generic snippets of statements Include /etc/apache2/conf.d/
# Include the virtual host configurations: Include /etc/apache2/sites-enabled/
<Directory "/var/www/bugzilla"> AddHandler cgi-script .cgi Options +Indexes +ExecCGI +FollowSymLinks DirectoryIndex index.cgi AllowOverride None Order allow,deny Allow from all </Directory> |
最后重新启动apache 服务:
root@ubuntu:/var/www# /etc/init.d/apache2 restart |
8. MySQL数据库配置
创建bugs表,并对本地用户bugs授予各类訪问权限
root@ubuntu:/var/www# mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 45 Server version: 5.5.40-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql> create database bugs; Query OK, 1 row affected (0.01 sec)
mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,LOCK TABLES,CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.*TO bugs@localhost IDENTIFIED BY ‘123456‘; Query OK, 0 rows affected (0.02 sec)
mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) |
9. 配置bugzilla
先执行bugzilla文件夹下的checksetup.pl。目的是生成bugzilla的localconfig文件
User@ubuntu:$ sudo cd /var/www/bugzilla User@ubuntu:$ sudo ./checksetup.pl |
然后改动localconfig配置文件,例如以下红色部分为改动项:
# If you are using Apache as your web server, Bugzilla can create .htaccess # files for you, which will keep this file (localconfig) and other # confidential files from being read over the web. # # If this is set to 1, checksetup.pl will create .htaccess files if # they don‘t exist. # # If this is set to 0, checksetup.pl will not create .htaccess files. $create_htaccess = 1;
# The name of the group that your web server runs as. On Red Hat # distributions, this is usually "apache". On Debian/Ubuntu, it is # usually "www-data". # # If you have use_suexec turned on below, then this is instead the name # of the group that your web server switches to to run cgi files. # # If this is a Windows machine, ignore this setting, as it does nothing. # # If you do not have access to the group your scripts will run under, # set this to "". If you do set this to "", then your Bugzilla installation # will be _VERY_ insecure, because some files will be world readable/writable, # and so anyone who can get local access to your machine can do whatever they # want. You should only have this set to "" if this is a testing installation # and you cannot set this up any other way. YOU HAVE BEEN WARNED! # # If you set this to anything other than "", you will need to run checksetup.pl # as root or as a user who is a member of the specified group. #webservergroup=‘apache2‘; $webservergroup = ‘www-data‘;
# Set this to 1 if Bugzilla runs in an Apache SuexecUserGroup environment. # # If your web server runs control panel software (cPanel, Plesk or similar), # or if your Bugzilla is to run in a shared hosting environment, then you are # almost certainly in an Apache SuexecUserGroup environment. # # If this is a Windows box, ignore this setting, as it does nothing. # # If set to 0, checksetup.pl will set file permissions appropriately for # a normal webserver environment. # # If set to 1, checksetup.pl will set file permissions so that Bugzilla # works in a SuexecUserGroup environment. $use_suexec = 0;
# What SQL database to use. Default is mysql. List of supported databases # can be obtained by listing Bugzilla/DB directory - every module corresponds # to one supported database and the name of the module (before ".pm") # corresponds to a valid value for this variable. $db_driver = ‘mysql‘;
# The DNS name or IP address of the host that the database server runs on. $db_host = ‘localhost‘;
# The name of the database. For Oracle, this is the database‘s SID. For # SQLite, this is a name (or path) for the DB file. $db_name = ‘bugs‘;
# Who we connect to the database as. $db_user = ‘bugs‘;
# Enter your database password here. It‘s normally advisable to specify # a password for your bugzilla database user. # If you use apostrophe (‘) or a backslash (\) in your password, you‘ll # need to escape it by preceding it with a ‘\‘ character. (\‘) or (\) # (It is far simpler to just not use those characters.) $db_pass = ‘123456‘;
# Sometimes the database server is running on a non-standard port. If that‘s # the case for your database server, set this to the port number that your # database server is running on. Setting this to 0 means "use the default # port for my database server." $db_port = 0;
# MySQL Only: Enter a path to the unix socket for MySQL. If this is # blank, then MySQL‘s compiled-in default will be used. You probably # want that. $db_sock = ‘‘;
# Should checksetup.pl try to verify that your database setup is correct? # With some combinations of database servers/Perl modules/moonphase this # doesn‘t work, and so you can try setting this to 0 to make checksetup.pl # run. $db_check = 1;
# Most web servers will allow you to use index.cgi as a directory # index, and many come preconfigured that way, but if yours doesn‘t # then you‘ll need an index.html file that provides redirection # to index.cgi. Setting $index_html to 1 below will allow # checksetup.pl to create an index.html for you if it doesn‘t exist. # NOTE: checksetup.pl will not replace an existing file, so if you # wish to have checksetup.pl create one for you, you must # make sure that index.html doesn‘t already exist. $index_html = 1;
# If you want to use the CVS integration of the Patch Viewer, please specify # the full path to the "cvs" executable here. $cvsbin = ‘‘;
# If you want to use the "Difference Between Two Patches" feature of the # Patch Viewer, please specify the full path to the "interdiff" executable # here. $interdiffbin = ‘‘;
# For the "Difference Between Two Patches" feature to work, we need to know # what directory the "diff" bin is in. (You only need to set this if you # are using that feature of the Patch Viewer.) $diffpath = ‘/usr/bin‘;
# This secret key is used by your installation for the creation and # validation of encrypted tokens. These tokens are used to implement # security features in Bugzilla, to protect against certain types of attacks. # A random string is generated by default. It‘s very important that this key # is kept secret. It also must be very long. $site_wide_secret = ‘eESzXAjV7gr6aCaTYkK0BK5WGhvOshisjwA7VHhXJBtvT07mtrxaEfRFDAD7lvlQ‘;
|
注意:password须要跟mysql授权的时候的password一致。
10. 执行验证
在验证前。为使前面的配置生效,首先重新启动apache,mysql以及又一次执行bugzilla的checksetup.pl
root@ubuntu:/var/www/bugzilla# /etc/init.d/apache2 restart root@ubuntu:/var/www/bugzilla# /etc/init.d/mysql restart root@ubuntu:/var/www/bugzilla# ./checksetup.pl ...... 过程中会提示输入下面信息: Enter the e-mail address of the administrator: 管理员登陆邮箱xxx@xxx.com Enter the real name of the administrator: username Enter a password for the administrator account: password Please retype the password to verify: password 依据以上提示输入bugzilla管理员的相关信息 |
最后在浏览器输入:http://{ip}/bugzilla/就会出现 bugzilla的页面。
11. 安装 Testopia
root@ubuntu:/opt# wget ftp://ftp.mozilla.org/pub/mozilla.org/webtools/testopia/testopia-2.5-BUGZILLA-4.2.tar.gz root@ubuntu:/opt# mv testopia-2.5-BUGZILLA-4.2.tar.gz /var/www/bugzilla root@ubuntu:/opt# cd /var/www/bugzilla root@ubuntu:/var/www/bugzilla# tar -zxvf testopia-2.5-BUGZILLA-4.2.tar.gz root@ubuntu:/var/www/bugzilla# /usr/bin/perl install-module.pl --all ... root@ubuntu:/var/www/bugzilla# ./checksetup.pl ... |
又一次刷新页面,bugzilla包括 testopia的页面就出现了:
Ubuntu12.04 Bugzilla 和 TestOpia的安装步骤
标签:available different time receives tar.gz color check cat span
原文地址:http://www.cnblogs.com/brucemengbm/p/6746809.html