1.安装和配置MySQL

1.1安装libevent

#  tar zxvf libevent-2.0.20-stable.tar.gz

# cd libevent-2.0.20-stable

# ./configure && make && make install

#ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5

#ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5

1.2安装cmake

# tar zxvf  cmake-2.8.9tar.gz

# cd cmake-2.8.9

# ./bootstrap

# make && make install

1.3建立mysql用户

#groupadd mysql

#useradd -g mysql -s /sbin/nologin mysql

mkdir -p /data/db/mysql_data

mkdir -p /data/mysql

mkdir -p /etc/mysql

mkdir /data/db/innodb_data/ -p

mkdir /data/db/mysql_logs/binary_log -p

mkdir /data/db/mysql_logs/innodb_log -p

mkdir /data/db/mysql_logs/query_log -p

mkdir /data/db/mysql_logs/slow_query_log -p

mkdir /data/db/mysql_logs/error_log -p

chown mysql. /data/db/* -R

1.4安装配置

# tar zxvf mysql-5.5.27.tar.gz

#cd mysql-5.5.27

#

cmake . -DCMAKE_INSTALL_PREFIX=/data/mysql/

-DMYSQL_DATADIR=/data/db/mysql_data -DDEFAULT_CHARSET=utf8

-DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all

-DWITH_SSL=system -DWITH_ZLIB=system -DWITH_EMBEDDED_SERVER=1

-DENABLED_LOCAL_INFILE=1 -DWITH_MYISAM_STORAGE_ENGINE=1

-DSYSCONFDIR=/etc/mysql -DMYSQL_TCP_PORT=3306 -DWITH_DEBUG=0

-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock -DWITH_INNOBASE_STORAGE_ENGINE=1

-DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1

-DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1

# make && make install

1.5初始化数据库

# /data/mysql/scripts/mysql_install_db –basedir=/data/mysql/ –user=mysql –datadir=/data/db/mysql_data/

1.6修改配置文件

#vi /etc/mysql/my.cnf

[client]

#password       = [your_password]

port            = 3306

socket          = /tmp/mysqld.sock

default-character-set=utf8

[mysqld]

wait_timeout=7200

port            = 3306

socket          = /tmp/mysqld.sock

character_set_server=utf8

basedir=/data/mysql

datadir=/data/db/mysql_data

back_log = 500

log-error=/data/db/mysql_logs/error_log/server.err

max_connections = 1024

max_connect_errors = 10

table_open_cache = 2048

max_allowed_packet = 16M

binlog_cache_size = 1M

max_heap_table_size = 64M

read_buffer_size = 2M

read_rnd_buffer_size = 16M

join_buffer_size = 8M

thread_cache_size = 128

thread_concurrency = 8

query_cache_size = 64M

query_cache_limit = 2M

ft_min_word_len = 4

#default-storage-engine = MYISAM

default-storage-engine = innodb

thread_stack = 192K

transaction_isolation = REPEATABLE-READ

tmp_table_size = 64M

log-bin=/data/db/mysql_logs/binary_log/db-bin

expire_logs_days=10

binlog_format=mixed

#general_log=1

#general_log_file=/data/db/mysql_logs/query_log/query.log

slow_query_log=1

long_query_time = 2

slow_query_log_file=/data/db/mysql_logs/slow_query_log/slow_query.log

server-id = 1

key_buffer_size = 200M

bulk_insert_buffer_size = 64M

myisam_sort_buffer_size = 128M

myisam_max_sort_file_size = 10G

myisam_repair_threads = 1

myisam_recover

innodb_additional_mem_pool_size = 16M

innodb_buffer_pool_size = 300M

innodb_data_file_path = ibdata1:100M;ibdata2:100M;ibdata3:100M;ibdata4:100M:autoextend

innodb_data_home_dir=/data/db/innodb_data/

innodb_write_io_threads = 8

innodb_read_io_threads = 8

innodb_thread_concurrency = 16

innodb_flush_log_at_trx_commit = 1

innodb_log_buffer_size = 8M

innodb_log_file_size = 256M

innodb_log_files_in_group = 3

innodb_log_group_home_dir=/data/db/mysql_logs/innodb_log

innodb_max_dirty_pages_pct = 90

innodb_lock_wait_timeout = 120

[mysqldump]

quick

max_allowed_packet = 16M

[mysql]

no-auto-rehash

[myisamchk]

key_buffer_size = 512M

sort_buffer_size = 512M

read_buffer = 8M

write_buffer = 8M

[mysqlhotcopy]

interactive-timeout

[mysqld_safe]

open-files-limit = 8192

1.7后台启动

# cp support-files/mysql.server /etc/init.d/mysqld

# chmod 755 /etc/init.d/mysqld

# vim /etc/init.d/mysqld

basedir=/data/mysql

datadir=/data/db/mysql_data

# /etc/init.d/mysqld start

Starting MySQL……………..[ OK ]

# netstat -an |grep 3306

tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN

# vim /etc/profile

export PATH=$PATH:/data/mysql/bin

# source /etc/profile

# mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.5.27-log Source distribution

Copyright (c) 2000, 2012, 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.

1.8添加Mysql自启动服务

# ln -sf /data/mysql/bin/mysql /sbin/mysql

# ln -sf /data/mysql/bin/mysqladmin /sbin/mysqladmin

# chkconfig mysqld on

# chkconfig –level 24 mysqld off

# chkconfig –list mysqld

mysqld 0:off 1:off 2:off 3:on 4:off 5:on 6:off

# vim /etc/ld.so.conf

/data/mysql/lib

# ldconfig -v |grep mysql

/data/mysql/lib:

libmysqlclient.so.18 -> libmysqlclient_r.so.18.0.0

1.9为mysql数据库root用户设置密码

# mysqladmin -uroot password “qwe123”

#mysql–uroot–p

use mysql

Grant all privileges on *.* to ‘root’@’%’ identified by ‘qwe123’ with grant option;

flush privileges;

select host, user, password from user;

增加远程登录权限

删除匿名用户:

delete from user where user=’ ‘;

设置所有root密码

update user set password=password( “qwe123”) where user= “root”;

1.10创建bugzilla数据库和用户

创建数据库bugs

create database bugs;

show databases;

use bugs;

创建用户bugs

grant select,insert,update,delete,index,alter,create,lock tables,drop,references on bugs.* to bugs@localhost identified by ‘123456’;

flush privileges;

2.安装和配置Apache

2.1安装apache

# tar jxvf httpd-2.2.23.tar.bz2

#cd httpd-2.2.23

# ./configure \

–prefix=/data/apache2 \

–enable-so \

–enable-rewrite \

–enable-vhost-alias=shared \

–enable-cache=shared \

–enable-file-cache=shared \

–enable-disk-cache=shared \

–enable-mem-cache=shared \

–enable-proxy=shared \

–enable-proxy-http=shared \

–enable-proxy-ajp=shared \

–enable-proxy-balancer=shared \

–enable-proxy-connect=shared \

–enable-dav –enable-dav-fs \

–disable-proxy-ftp \

–disable-userdir \

–disable-asis \

–enable-ssl \

–with-mpm=worker

#make && make install

2.2添加apache自启动脚本

#cp /data/apache2/bin/apachectl /etc/init.d/httpd

#vi /etc/init.d/httpd

在第三行添加以下两行内容

#chkconfig:345 85 15

#description: Start and stops the Apache HTTP Server.

[root@localhost opt]#chkconfig httpd on

2.3启动HTTP服务

[root@localhost opt]#service httpd start

安装完毕,启动httpd,输入“it works”证明成功。

3.安装和配置Bugzilla

3.1安装bugzilla

# tar zxvf bugzilla-4.2.3.tar.gz

# mv bugzilla-4.2.3 /data/apache2/htdocs/bugzilla

#chmod 777 /data/apache2/htdocs/bugzilla–R

3.2安装perl模块

由于默认的perl安装包缺少一些bugzilla需要的模块,所以需要补充一些模块,最好是在线进行,不要一个一个的自己安装。以root身份运行在联网情况下用以下命令安装所需的最少perl模块:

#perl -MCPAN -e ‘install “Bundle::Bugzilla”‘

Are you ready for manual configuration? [yes] no

of modules we are processing right now? [yes]敲回车,以后都敲回车!

#/usr/bin/perl install-module.pl–all

此安装时间大约一个小时,需耐心等待。

# perl -MCPAN -e ‘install “mod_perl2″‘

安装需要把Apache的apxs路径:/data/apache2/bin/apxs

#cd /data/apache2/htdocs/bugzilla

#./checksetup.pl

进行插件检查和导入数据库,添加登陆用户,设置登陆密码,生产localconfig文件。

3.3配置启动apache

在httpd.conf中添加(或者去除注释)以下这一行:

AddHandler cgi-scrīpt .cgi

到httpd.conf中DirectoryIndex那一行,修改为:

DirectoryIndex index.html index.html.var index.cgi

指定Bugzilla的访问目录,在最后添加:

AddHandler cgi-script .cgi

Options +Indexes +ExecCGI

DirectoryIndex index.cgi

AllowOverride Limit FileInfo Indexes

3.4配置bugzilla

#cd /data/apache2/htdocs/bugzilla

#vi localconfig

根据数据库的实际情况修改如下参数:

$db_name = ‘bugs’;

$db_user = ‘bugs’;

$db_pass = ‘123456’;

$db_port = 3306;

$db_sock = ‘/tmp/mysqld.sock’;

$index_html = 1;

3.5修改目录权限,登陆bugzilla

# chmod 777 bugzilla

输入用户名和密码,登陆bugzilla。

bugzilla mysql 配置_Bugzilla环境安装和配置手册相关推荐

  1. xmap 配置php环境,安装和配置环境

    Composer 安装 thinkphp5.1版本官方开始不提供代码直接下载,转而使用composer,或者git进行安装下载.对于一些不熟悉版本控制git来书可能是一个难点.或者composer也是 ...

  2. mysql.ini环境配置_mysql环境安装与配置

    一.安装 1.下载mysql 官网:https://dev.mysql.com/downloads/mysql/,本人用的目前的最新版本8.0.19,版本格式为zip,如下图 2.解压到指定路径,如下 ...

  3. linux离线配置qt环境,Linux下配置QT环境

    一.下载Qt源码包到本机,然后解压缩 #tar zxvf qt-x11-opensource-src-4.3.2.tar.gz -C /usr/local //将qt-x11-opensource-s ...

  4. mysql8.0卸载出现问题,Windows环境下MySQL 8.0 的安装、配置与卸载

    软件版本 Windows:Windows10 MySQL:mysql-8.0.17-winx64.zip 安装步骤 1.配置环境变量 2.新建my.ini文件 文件位置:C:\Program File ...

  5. 安装mysql8.0配置环境_Windows环境下MySQL 8.0 的安装、配置与卸载

    软件版本 Windows:Windows10 MySQL:mysql-8.0.17-winx64.zip 安装步骤 1.配置环境变量 name:Path value:C:\Program Files\ ...

  6. Mac 下 Nginx、PHP、MySQL 和 PHP-fpm 的安装和配置

    原文:Mac 下 Nginx.PHP.MySQL 和 PHP-fpm 的安装和配置 个人博客永久地址. 文章做了更新,增加了php-fpm的配置相关信息. 杂七杂八的杂 Mac下搭建MNPM环境是每个 ...

  7. win10下MySQL的下载、安装以及配置教程

    本博客转载于https://blog.csdn.net/qq_37172528/article/details/80459490,本人已经安装过,没有问题,过程很详尽. 一. 下载MYSQL  官网下 ...

  8. win10下MYSQL的下载、安装以及配置超详解教程

    下载MYSQL  官网下载MYSQL5.7.21版本,链接地址https://www.mysql.com/downloads/.下载流程图如下:  进入官网点击Community,下载社区版.  找到 ...

  9. 【宝塔面板安装与配置、Redis安装与配置、MySQL安装与配置】

    提示:宝塔面板下载地址:https://www.bt.cn/new/download.html 文章目录 前言 一.快速迁移 二.设置固定ip 一.保证可以连接网络 二.设置固定ip 三.搭建宝塔面板 ...

  10. MySQL的下载、安装、配置

    MySQL的下载.安装.配置 MySQL Community Server 社区版本,开源免费,自由下载,但不提供官方技术支持,适用于大多数普通用户. 官方还提供了 MySQL Workbench ( ...

最新文章

  1. 构建之法读后感part6
  2. vm虚拟机下linux安装python_机器人编程01——虚拟机VM安装Ubuntu并配置python开发环境...
  3. 10.7抛出异常处理
  4. 历史为什么丑化隋朝_隋朝于中国历史,到底处于什么样的地位,为何它一直被低估...
  5. 315道Python常见面试题
  6. 作为Java初学者,你了解Java的应用范围吗?
  7. Linux执行命令提示Password,linux expect远程自动登录以及执行命令
  8. phpcmsV9网页http路由静态化设置——URL地址规则
  9. linux运算_linux中的计算【转】
  10. Pytorch基础(三)数据集加载及预处理
  11. KITTI数据集下载以及处理
  12. 秋天网站快速部署系统 一.入门使用
  13. 《星际穿越》科学解析
  14. Python学习之学校教学(辨别身份证的真伪,并判断性别)
  15. 考研高等数学公式总结(一)
  16. 阿里M8级大神整理出SQL手册:收获不止SQL优化,抓住SQL的本质
  17. 2-4 第18次课 高项之沟通管理与干系人管理
  18. 一些RJS资源和演示入门教程
  19. 腾讯云物联网MQTT对接
  20. 交易系统订单存在的意义

热门文章

  1. HTML5 Canvas 画钟表
  2. 多智时代,人工智能发展历史的时间表
  3. Exchange ProxyShell复现
  4. 恶意文件 大数据案例库_Combo Cleaner for Mac(系统恶意软件清理工具)
  5. Pycharm快速入门(6) — 版本控制
  6. sql实现查询两个时间之间每月的数量
  7. mac使用开源方案实现读取ntfs
  8. 通过GDI+修改jpg文件EXIF属性
  9. window+mysql+免安装_mysql 5.7.18 免安装版window配置方法
  10. 计算机word虚线在哪里,电脑虚线怎么打出来