Zabbix compiled by lamp installation source code-a single server

Source: Internet
Author: User

You can install zabbix in either of the following ways:

1 RPM customized version

2. source code compilation

Zabbix requires the support of PHP and the Web Front-End Server to support gui. zabbix's data is stored on the back-end database server. There are two solutions for building zabbix, you can use rpm for full automatic installation, and use lamp source code compilation in combination with zabbix source code compilation!

 

This section describes how to build a new version of mysql5.6 and a new version of php5.5 and a new version of httpd (APACHE). The old version may be used differently. The first PHP support mysql5.6 using the mysqli function, the second version of apache2.4 is different from the previous version in terms of configuration. However, the difference between the zabbix and zabbix is micro!

Lamp implementation

1 prepare the database mysql5.6

First, use the binary version for installation. You can download it from www.mysql.com.

The following version is used:

Mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz

Installation steps:

Create a MySQL user decompression package, and initialization database groupadd mysqluseradd-r-g MySQL mysqltar-zxvf mysql-5.6.21-linux-glibc2.5-x86_64.tar.gzln-s src/mysql-5.6.21-linux-glibc2.5-x86_64 mysqlcd MySQL/mkdir/data/MySQL # create data directory chown-r MySQL. mySQL/data/MySQL/scripts/mysql_install_db -- user = MySQL -- datadir =/data/mysqlcp support-files/MySQL. server/etc/init. d/mysqld modify STARTUP configuration file: Modify/etc/init. in D/mysqld, datadir =/data/mysqlbasedir can be left unspecified The/usr/loca/MySQL installation file path should be added to the system self-starting chmod 755/etc/init. d/mysqld chkconfig -- add mysqldchkconfig mysqld on to add the environment variable Vim/etc/profile. d/MySQL. sh #! /Bin/bash
Path = $ path:/usr/local/MySQL/bin Change Password mysqladmin-uroot password 'c110123'

# The following content is the author's habit of simple and optimized myslq operations and lamp is irrelevant:

######################################## #####

Omitting the complexity of password input [[email protected] Andy ~] # Cat ~ /. My. CNF
[Client] user = root
Password = c110123
Host = 'localhost' if MySQL cannot be started, the configuration file is correct. Check whether the path of the MySQL command may be different because it is affected by the installation of MySQL, the reason may have been that the RPM package was installed before, and the uninstallation was not uninstalled. Delete the redundant account select host, password, user from user; mysql> Delete from user where host = 'localhost '; ######################################## #### the following content is my first understanding of MySQL 5.6 and has nothing to do with lamp building #

######################################## ####

Mysql> show engines; 5.6 the default engine is InnoDB, which is already a table and a tablespace by default (different from all the tables used by default in previous versions) mysql> show global variables like '% InnoDB % ';

Some log functions should be enabled:

Mysql> show global variables '% log % ';

Bin-log records any logs that can change Mysql Data operations. It is used to restore the slow query logs of the database slow-query-log at any time to enable the two logs. Configure the following and write them to my. CNF or directly modify the global variables, I suggest modifying the configuration file and then restart the effective log_bin =/data/MySQL/bin-logs/mysql-binbinlog_format = mixed socket =/tmp/MySQL. sockslow_query_log = 1slow_query_log_file =/data/MySQL/andy-slow.loglog_bin =/data/MySQL/bin-logs/MySQL-bin view slow query time standards:

Mysql> show global variables like '% long_query % ';
+ ----------------- + ----------- +
| Variable_name | value |
+ ----------------- + ----------- +
| Long_query_time | 10.000000 |
+ ----------------- + ----------- +
1 row in SET (0.00 Sec)

Note: The standard for slow query is (time basis) long_query_time | 10.000000 seconds ################################### ###################

 

Zabbix compiled by lamp installation source code-a single server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.