Lamp+nagios+cacti Full implementation Notes

Source: Internet
Author: User
Tags imap ldap snmp

SOURCE Package:

Httpd-2.2.24.tar.gz

Php-5.2.17.tar.gzcd

Mysql-5.1.73-linux-x86_64-glibc23.tar.gz

The rest of the dependencies are installed through the Yum source, recommending Epel and CentOS

163 mirroring

http://mirrors.163.com/

http://mirror.centos.org/

Epel Mirroring

http://mirrors.fedoraproject.org

Operation Steps:

MySQL Installation:

Tar zxf mysql-5.1.73-linux-x86_64-glibc23.tar.gz-c/usr/local/

MV Mysql-5.1.73-linux-x86_64-glibc23/mysql

Chown-r Mysql.root mysql/# Modify the permissions of the MySQL directory

Chown-r MySQL. mysql/data/# Modifying the permissions of the MySQL data directory

Initialize MySQL

./scripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--defaults-file=/usr/local/ MYSQL/MY.CNF--skip-name-resolve--user=mysql

Note: I point the MySQL configuration file my.cnf to the database Basedir directory. Therefore, the configuration file should not be placed under/etc/

Copy the self-boot script:

CP Mysql.server/etc/init.d/mysqld

Modify the contents of the startup script to explicitly tell the startup script to run the path of MySQL

Basedir=/usr/local/mysql #46行

Datadir=/usr/local/mysql/data # line

pid_file=/usr/local/mysql/mysql_v51.pid #59 line

CONF=/USR/LOCAL/MYSQL/MY.CNF #218 Line

MY.CNF configuration file Main section

[Mysqld]
Port = 3306
Socket =/usr/local/mysql/mysql.sock
Skip-external-locking
Key_buffer_size = 16M
Max_allowed_packet = 1M
Table_open_cache = 64
Sort_buffer_size = 512K
Net_buffer_length = 8K
Read_buffer_size = 256K
Read_rnd_buffer_size = 512K
Myisam_sort_buffer_size = 8M

/etc/init.d/mysqld start
Starting MySQL. [OK]

Source code compile and install http:

Install apr-1.5.1 First and specify when compiling the installation:

./configure--PREFIX=/USR/LOCAL/APR--disable-ipv6 ldflags=-l/usr/lib64

apr-util-1.5.3, when compiling the installation, specify:

./configure--PREFIX=/USR/LOCAL/APR--with-apr=/usr/local/apr/bin/apr-1-config--with-mysql=/usr/local/mysql Ldflags=-l/usr/lib64

Compile and install Apache

./configure--prefix=/usr/local/apache2--enable-so--enable-modules=all--enable-mods-shared=all--with-mpm=worker --with-apr=/usr/local/apr/bin/apr-1-config--with-apr-util=/usr/local/apr/bin/apu-1-config --with-pcre- -enable-disk-cache--enable-mem-cache--enable-file-cache--enable-cache--enable-cgi--enable-authn-alias-- Enable-proxy--enable-proxy-ftp--enable-proxy-http--enable-proxy-scgi--enable-proxy-connect-- Enable-proxy-balancer--enable-suexec ldflags=-l/usr/lib64

Make && make install

Chown-r Apache.root apache2/

HTTP Configuration main section: space problem can not write full

ServerRoot "/usr/local/apache2"

Listen 8085

ServerName 10.28.7.127:8085

DocumentRoot "/usr/local/apache2/htdocs"

<ifmodule dir_module>
DirectoryIndex index.html index.php
</IfModule>

Compile and install PHP:

Compile parameters refer to the options used by the Yum Source installed PHP Package

./configure--build=x86_64-redhat-linux-gnu--host=x86_64-redhat-linux-gnu--target=x86_64-redhat-linux-gnu-- prefix=/usr/local/php--with-libdir=lib64--with-config-file-path=/usr/local/php/etc--with-apxs2=/usr/local/ Apache2/bin/apxs--disable-debug--with-pic--disable-rpath--with-bz2--with-exec-dir=/usr/bin--with-freetype-dir= /usr--with-png-dir=/usr--with-xpm-dir=/usr--enable-gd-native-ttf--without-gdbm--with-gettext--with-gmp-- With-iconv--with-jpeg-dir=/usr--with-openssl--with-pcre-regex=/usr--with-zlib--with-layout=GNU--enable-exif-- Enable-ftp--enable-magic-quotes--enable-sockets--enable-sysvsem--enable-sysvshm--enable-sysvmsg--with-kerberos --enable-ucd-snmp-hack--enable-shmop--enable-calendar--without-sqlite--with-libxml-dir=/usr--enable-xml-- Enable-force-cgi-redirect--enable-pcntl--with-imap=shared--with-imap-ssl--enable-mbstring=shared-- Enable-mbregex--with-gd=shared--enable-bcmath=shared--enable-dba=shared--with-db4=/usr--with-xmlrpc=shAred--with-ldap=shared--WITH-LDAP-SASL--with-mysql=shared,/usr/local/mysql--with-mysqli=shared,/usr/local/ Mysql/bin/mysql_config--enable-dom=shared--enable-wddx=shared--with-snmp=shared,/usr--enable-soap=shared-- WITH-XSL=SHARED,/USR--enable-xmlreader=shared--enable-xmlwriter=shared--with-curl=shared,/usr--enable-fastcgi- -enable-pdo=shared--with-pdo-odbc=shared,unixodbc,/usr--with-pdo-mysql=shared,/usr/local/mysql/bin/mysql_ Config--with-pdo-sqlite=shared,/usr--enable-json=shared--enable-zip=shared--without-readline--enable-sysvmsg= Shared--enable-sysvshm=shared--enable-sysvsem=shared--enable-posix=shared--with-unixodbc=shared,/usr-- With-mysql-sock=/usr/local/mysql/mysql.sock--with-iconv-dir

make when adding zend_extra_libs to prevent errors in the process

Make zend_extra_libs= '-liconv '

PHP Configuration:

Extension_dir = "/usr/local/php/lib/php/20060613-zts/"
Extension=pdo_mysql.so # Here is an example where multiple modules need to add multiple extension

Date.timezone = Asia/shanghai

After the lamp environment is complete, check the PHP load status and create the index.php file syntax under/usr/local/apache2/htdocs/:

<?php

Phpinfo ();

?>

By accessing http://domainname//index.php access, you can see if the PHP plugin is loading properly

Apache : Cat/usr/local/apache2/build/config.nice #查看编译参数

apachectl-t-D dump_modules #查看加载模块

MySQL: grep configure/usr/local/mysql/bin/mysqlbug #查看mysql编译参数

PHP: /usr/local/php/bin/php-i |grep Configure #查看PHP编译参数

This article is from the "linuxoracle" blog, make sure to keep this source http://onlinekof2001.blog.51cto.com/3106724/1586192

Lamp+nagios+cacti Full implementation Notes

Related Article

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.