The reason for the job, need to deploy bugzilla. Here, let me build a new wheel. Official Wheels: https://bugzilla.readthedocs.org/en/latest/installing/quick-start.html
First, the preparatory work
Required Documents:
Bugzilla version bugzilla-5.0.2, Portal: https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.2.tar.gz
Bugzilla module dependent (not necessary, if the GD module is unsuccessful, manual installation is required)
GD version gd-2.0.28, Portal: http://www.boutell.com/gd/http/gd-2.0.28.tar.gz
Apache version apache-2.4.18, Portal: http://mirrors.cnnic.cn/apache//httpd/httpd-2.4.18.tar.gz
Version 2.2 There will be a difference in httpd.conf.
Apache Dependency
Apr version apr-1.5.2, Portal: http://www.apache.org/dist/apr/apr-1.5.2.tar.gz
Apr-util version apr-util-1.5.4, Portal: http://mirrors.cnnic.cn/apache//apr/apr-util-1.5.4.tar.gz
Pcre version pcre-8.37, Portal: http://nchc.dl.sourceforge.net/project/pcre/pcre/8.37/pcre-8.37.tar.gz
MySQL version mysql-5.1.62-linux-x86_64-glibc23, Portal: http://cdn.mysql.com/archives/mysql-5.1/mysql-5.1.62-linux-x86_64 -glibc23.tar.gz (if you already have MySQL, no installation required, support for any version of MySQL)
Second, install Apache
1. Installing dependent Packages
(1) Apr
Unzip the apr-1.5.2.tar.gz, enter into the apr-1.5.2 directory, execute
./configure
Make
Make install
(2) Apr-util
Unzip the apr-util-1.5.4.tar.gz, enter into the apr-util-1.5.4 directory, execute
./configure--WITH-APR=/USR/LOCAL/APR
Make
Make install
(3) Pcre
Unzip the pcre-8.37.tar.gz, enter into the pcre-8.37 directory, execute
Apt-get Install Build-essential
./configure
Make
Make install
2. Installing Apache
Unzip the httpd-2.4.18.tar.gz, enter into the httpd-2.4.18 directory, execute
./configure--enable-mods-shared=all
Make
Make install
Start
/usr/local/apache/bin/apachectl-k start
There may be error while loading shared Libraries:libpcre.so.1:cannot open Shared object file:no such file or directory. The workaround is to:
# ln-s/usr/local/lib/libpcre.so.1/lib
Apache uses port 80 by default. If the port is occupied during the process, execute sudo lsof-i:80 under Linux to view the 80 port process, kill the corresponding process, or kill-9 PID
Verify
Open Browser, enter http://localhost, appear it works! Installation Successful
If there is a problem, it is most likely a permissions issue under Linux. To do this, create a new Apache group and user
sudo groupadd Apache
sudo useradd-r-g Apache Apache
Modify Directory Permissions:
Cd/usr/local/apache
sudo chown-r apache:apache.
Third, install MySQL
Unzip mysql-5.1.62-linux-x86_64-glibc23.tar.gz, copy
sudo cp mysql-5.1.62-linux-x86_64-glibc23/usr/local/mysql-r
Add system MySQL Group and MySQL User:
sudo groupadd MySQL
sudo useradd-r-g MySQL MySQL
Go to MySQL directory:
Cd/usr/local/mysql
Modify Directory Permissions:
sudo chown-r mysql:mysql.
To install the database:
./scripts/mysql_install_db--user=mysql--datadir=
/usr/local/mysql/data
Join the Service
sudo cp support-files/mysql.server/etc/init.d/mysql
Start MySQL
sudo service MySQL start
Set Password
sudo/usr/local/mysql/bin/mysqladmin-u root password ' password '
Put the MySQL client on the default path:
sudo ln-s/usr/local/mysql/bin/mysql/usr/local/bin/mysql
Modify the encoding format
Locate the MySQL profile template and copy it to/etc
sudo cp/usr/local/mysql/support-files/my-huge.cnf/etc/my.cnf
Edit MY.CNF
Join under the [Client] node
Default-character-set = UTF8
Join under [mysqld] Node
Default-character-set = UTF8
Character-set-server = UTF8
Collation-server = Utf8_general_ci
A database is then created for Bugzilla. Bugzilla The default database fame bugs, the user name is bugs, and the password is empty. However, modifications are recommended.
Enter the database
Mysql-uroot-p
Enter your modified password
Create a database
Create database bugs;
Create user
GRANT all privileges in bugs.* to [email protected] identified by ' Bugs Database password '; If you select a remote database, modify localhost
At this point, the MySQL configuration is complete
Iv. installation of Bugzilla
1. Unzip the bugzilla-5.0.2.tar.gz and copy the bugzilla-5.0.2 to/var/www
sudo cp bugzilla-5.0.2/var/www/bugzilla-r
Go to the Bugzilla directory
Cd/var/www/bugizlla
Check Module
sudo./checksetup.pl--check-modules
Installing the module requires networking (this process takes a long time). Please download the corresponding package manually to install the network.
sudo perl install-module.pl--all
Installing Bugzilla
sudo./checksetup.pl
If there is an error it is likely that the GD module is faulty. This is where I have a problem. Manual installation Required
Unzip the gd-2.0.28.tar.gz and go to the gd-2.0.28 directory
./configure
Make
Make install
Go back to the Bugzilla directory again to execute
sudo./checksetup.pl installation will eventually let you enter some information manually, the Administrator account (mailbox mode) password installation process will create a table, to keep the MySQL connection after normal success, the Bugzilla directory will appear localconfig file editing text Piece $webservergroup = ' Apache '; $db _driver = ' MySQL '; $db _host = ' localhost '; $db _name = ' Bugs '; $db _user = ' Connect user name '; $db _pass = ' link password '; Modify Bugzilla corresponding user and permissions 2.apache and Bugzilla integration you need to configure Apache profile editing at this time/usr/local/apache2/conf/httpd.conf
User Apache
Group Apache
Comment out the original documentroot new DocumentRoot and directory DocumentRoot "/var/www"
<directory "/var/www/bugzilla" >
AddHandler cgi-script. cgi. pl
Options +execcgi
DirectoryIndex index.cgi
AllowOverride All
Require all granted
</Directory> if the original Apache is version 2.2 <Directory> allowoverride Limit FileInfo Indexes 3. Add mod_cgi for Apache, Mod_ Cgid module mod_cgi, mod_cgid into Apache source package using BIN/APXS compilation
CD/HTTPD src path/modules/generators
Sudo/usr/local/apache/bin/apxs-i-a-c mod_cgi.c sudo/usr/local/apache/bin/apxs-i-a-c mod_cgid.c restart Apache s Udo/usr/local/apache2/bin/apachectl-k Restart Open the browser, enter Http://localhost/bugzilla, the following screen appears, indicating success
Deployment Bugzilla (Bugzilla+apache+mysql+linux)