The use of Linux monitoring platform Nagios (i) Lamp environment

Source: Internet
Author: User
Tags chmod config gettext install php ini openssl openldap percona

Environmental Os:centos 5.8 x86_64

This script is slightly modified than the previous one, as follows

#mkdir/etc/yum.repos.d/backup #mv/etc/yum.repos.d/*.repo/etc/yum.repos.d/backup/#mv/tmp/lamp/ftp.repo/etc /yum.repos.d/#yum Clean all #yum makecache path= ' pwd ' yum-y install gcc gcc-c++ screen autoconf Auto Make Libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel pcre pcre-devel zlib Zlib-dev El glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel Curl curl-devel e2fsprogs-devel krb5-devel Libidn libidn-devel OpenSSL openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers Libtiff Libtiff-devel gettext gettext-devel Pam pam-devel fontconfig-devel libxpm-devel libtool php-common cd $path Tar -ZXVF httpd-2.2.9.tar.gz cd $path/httpd-2.2.9./configure--prefix=/usr/local/apache2/--sysconfdir=/etc/httpd/ --WITH-INCLUDED-APR--disable-userdir--enable-so--enable-deflate=shared--enable-expires=shared--enable-rewrite=    
 Shared--enable-static-supportMake make install MV $path/httpd/etc/rc.d/init.d/httpd chmod +x/etc/rc.d/init.d/httpd chkconfig--ad D httpd chkconfig httpd on service httpd start #install mysql-server groupadd MySQL useradd-g my SQL MySQL mkdir-p/data/mysql/var cd $path tar-zxvf percona-server-5.1.58.tar.gz CD $path/percona-se rver-5.1.58./configure--prefix=/usr/local/mysql/--localstatedir=/data/mysql/var--WITH-EXTRA-CHARSETS=UTF8,GBK- -with-pthread--enable-thread-safe-client--with-ssl--with-client-ldflags=-all-static--with-mysqld-ldflags=- All-static--with-plugins=partition,innobase,csv,myisam,innodb_plugin--enable-shared--enable-assembler Make &    
 & make install CP support-files/my-medium.cnf/etc/my.cnf CP support-files/mysql.server/etc/init.d/mysqld chmod +x/etc/init.d/mysqld ln-s/usr/local/mysql/bin/*/usr/local/bin/ln-s/usr/local/mysql/lib/mysql/li b*/usr/lib//usr/local/mysql/bin/mysql_install_db--basedir=/usr/local/mysql/--datadir=/data/mysql/var--user=mysql & Chown-r Root.mysql/usr/loc  al/mysql/#chown-R mysql.mysql/usr/local/mysql/var/chown-r mysql.mysql/data/mysql/sed-i ' 38a\basedir    
 =/usr/local/mysql/\ '/etc/my.cnf sed-i ' 39a\datadir =/data/mysql/var/\ '/etc/my.cnf service mysqld start #install PHP CD $path tar-zxvf libmcrypt-2.5.8.tar.gz cd $path/libmcrypt-2.5.8/./configure--pre Fix=/usr/local/libmcrypt/make make install CD $path/libmcrypt-2.5.8/libltdl./configure--enable-ltdl    
 -install make make install CD $path tar-zxvf libiconv-1.13.1.tar.gz CD $path/libiconv-1.13.1 ./configure--prefix=/usr/local/make Make install ln-s/usr/local/lib/libmcrypt*/usr/lib ln-s/u sr/local/lib/libiconv.*/usr/lib ln-s/usr/local/lib/libiconv.*/usr/lib64/yum-y Install Libxml2-devel curl-d Evel Libpng-devel OPENLDAp-devel CD $path tar-zxvf php-5.2.6.tar.gz cd $path/php-5.2.6./configure--prefix=/usr/local/php-- with-config-file-path=/usr/local/php/etc/--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql=/usr/local/mysql --with-iconv-dir=/usr/local--with-libxml-dir--with-png-dir--with-jpeg-dir--with-freetype-dir--WITH-GD-- With-zlib-dir--with-mcrypt=/usr/local/libmcrypt--with-mysqli=/usr/local/mysql/bin/mysql_config--enable-soap-- Enable-mbstring=all--enable-sockets make zend_extra_libs= '-liconv ' to install ln-s/ USR/BIN/CP Php.ini-dist/usr/local/php/etc/php.ini sed-i ' 170 s/directoryindex/directoryindex index.php/'/et c/httpd/httpd.conf sed-i ' 312a\ addtype application/x-httpd-php. php. phtml \ '/etc/httpd/httpd.conf CD $pat H tar-zxvf pdo_mysql-1.0.2.tgz cd pdo_mysql-1.0.2/usr/local/php/bin/phpize./configure--with-php-co Nfig=/usr/local/php/bin/php-config--with-pdo-mysql=/usR/local/mysql make && make install sed-i ' 486 s/extension_dir/' extension_dir/'/usr/local/php/etc/php. INI sed-i ' 597a extension = "pdo_mysql.so" '/usr/local/php/etc/php.ini sed-i ' s#;d ate.timezone.* #date. Timezon E = "Shanghai/asia" # '/usr/local/php/etc/php.ini cp $path/index.php/usr/local/apache2/htdocs/index.php #/usr/lo Cal/apache2/bin/apachectl Restart Service httpd Restart service mysqld restart

To download the lamp installation package separately, the address is as follows:

http://down.51cto.com/data/596769 free Beans Download

Add: Yum source please set up first, directly decompression, execution./install-all.sh on it.

Apache installation directory:/usr/local/apache2

php:/usr/local/php

Mysql:/usr/lcoal/mysql

This article from the "TNT, the Road" blog, please be sure to retain this source http://tntdba.blog.51cto.com/1199791/1056153

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.