One-click Installation Lnmp (2)

Source: Internet
Author: User
Tags openldap

All () {
Path= ' pwd '
CD $pathecho
echo "exclude=*.i386 *.i686" >>/etc/yum.conf
RPM-IVH http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Yum Listyum update-y
Sleep 20;
###### #检查命令是否执行正常 ##############################
If [$?-eq 0];
Then
echo "" "" Update Complete "" "" "
Else
Exit 1
echo "" "" "Failure" ""
Fi
Sleep 15;
Yum-y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel \
FreeType freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel \
Glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel \
Curl Curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel \
Libidn libidn-devel OpenSSL openssl-devel \
OpenLDAP Openldap-devel nss_ldap \
Openldap-clients openldap-servers yasm pcre libmcrypt libvpx TIFF jpegsrc t1lib
===============================================================================
CD $path
Tar zxvf cmake-2.8.11.2.tar.gz
CD cmake-2.8.11.2
./configure
Make
Make install
Cd..
Tar zxvf mysql-5.5.18.tar.gz
CD mysql-5.5.18
Yum install-y autoconf automake imake libxml2-devel expat-devel gcc gcc-c++ libaio libaio-devel BZR Bison libtool ncurses -devel
Mkdir-p/data/mysql-5.5.18
Mkdir-p/data/mysql_log
Mkdir-p/data/log-bin
Groupadd MySQL
Useradd mysql-g mysql-m-s/sbin/nologin
Chown-r mysql.mysql/data/mysql-5.5.18//data/mysql_log//data/log-bin/
Mkdir-p/usr/local/mysql-5.5.18
Chown-r mysql.mysql/usr/local/mysql-5.5.18
Cmake-dcmake_install_prefix=/usr/local/mysql-5.5.18-dmysql_unix_addr=/tmp/mysql.sock-ddefault_charset=utf8- Ddefault_collation=utf8_general_ci-dwith_extra_charsets:string=utf8,gbk-dwith_myisam_storage_engine=1-dwith_ Innobase_storage_engine=1-dwith_memory_storage_engine=1-dwith_readline=1-denabled_local_infile=1-dmysql_ Datadir=/usr/local/mysql-5.5.18/data-dmysql_user=mysql
Make
Make install
Chown-r mysql:mysql/usr/local/mysql-5.5.18/
Rm-rf/etc/my.cnf
CP SUPPORT-FILES/MY-SMALL.CNF/ETC/MY.CNF
Chown mysql:mysql/etc/my.cnf
CP $path/MYSQLD/ETC/RC.D/INIT.D/MYSQLD
Chown-r Mysql:mysql/etc/rc.d/init.d/mysqld
chmod +x/etc/rc.d/init.d/mysqld
Ln-s/usr/local/mysql-5.5.18/bin/mysql/usr/bin
/usr/local/mysql-5.5.18/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql-5.5.18--datadir=/data/ Mysql-5.5.18/data
chmod +x mysql_install_db
Sed-i '/\[mysqld\]/a\datadir=\/usr\/local\/mysql-5.5.18\/data\/'/etc/my.cnf
/usr/local/mysql-5.5.18/scripts/mysql_install_db--basedir=/usr/local/mysql-5.5.18--datadir=/usr/local/ Mysql-5.5.18/data--user=mysql
/etc/init.d/mysqld start
/usr/local/mysql-5.5.18/bin/mysqladmin-uroot Password 123qwe
####################################################################################
CD $path
Tar zxvf pcre-8.20.tar.gz
CD pcre-8.20
./configure--prefix=/usr/local/pcre
Make
Make install
CD $path
Tar zxvf openssl-1.0.0a.tar.gz
CD Openssl-1.0.0a./config--prefix=/usr/local/openssl
Make
Make install
CD $path
Tar zxvf zlib-1.2.3.tar.gz
CD Zlib-1.2.3./configure-prefix=/usr/local/zlib
Make
Make install
# # #nginx的安装
CD $path
Groupadd www
Useradd www-g mysql-m-s/sbin/nologin
Tar zxvf nginx-1.1.7.tar.gz
CD nginx-1.1.7
./configure--prefix=/usr/local/nginx--without-http_memcached_module--user=www--group=www--with-http_stub_ Status_module--with-http_ssl_module--with-http_gzip_static_module--with-openssl= $path/openssl-1.0.0a-- with-zlib= $path/zlib-1.2.3--with-pcre= $path/pcre-8.20
Make
Make install
Rm-rf/usr/local/nginx/conf/nginx.conf
CP $path/nginx.conf/usr/local/nginx/conf/nginx.conf
###################################################
CD $path
Tar zxvf yasm-1.3.0.tar.gz
CD yasm-1.3.0.tar.gz
./configure
Make
Make install
CD $path
Tar zxvf libmcrypt-2.5.8.tar.gz
CD libmcrypt-2.5.8
./configure--prefix=/usr/local/libmcrypt
Make
Make install
CD $path
Tar jxvf libvpx-1.4.0.tar.bz2
CD libvpx-1.4.0
./configure--PREFIX=/USR/LOCAL/LIBVPX--enable-shared--ENABLE-VP9
Make
Make install
CD $path
Tar zxvf tiff-4.0.3.tar.gz
CD tiff-4.0.3
./configure--prefix=/usr/local/tiff--enable-shared
Make
Make instal
CD $path
Tar zxvf libpng-1.5.6.tar.gz
CD libpng-1.5.6
./configure--prefix=/usr/local/libpng--enable-shared
Make
Make install
CD $path
Tar zxvf freetype-2.4.8.tar.gz
CD freetype-2.4.8
./configure--prefix=/usr/local/freetype--enable-shared
Make
Make install
CD $path
Tar zxvf jpegsrc.v8c.tar.gz
CD jpeg-8c
./configure--prefix=/usr/local/jpeg--enable-shared
Make
Make install
CD $path
Tar zxvf t1lib-5.1.2.tar.gz
CD t1lib-5.1.2
./configure--prefix=/usr/local/t1lib--enable-shared
Make Without_doc
cp-frp/usr/lib64/libltdl.so*/usr/lib/
Yum-y Install LIBXPM
CD $path
Tar zxvf php-5.5.24.tar.gz
CD php-5.5.24
./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/ mysql-5.5.18--with-mysqli=/usr/local/mysql-5.5.18/bin/mysql_config--with-mysql-sock=/tmp/mysql.sock-- with-pdo-mysql=/usr/local/mysql-5.5.18--with-png-dir=/usr/local/libpng--with-jpeg-dir=/usr/local/jpeg-- With-freetype-dir=/usr/local/freetype--with-xpm-dir=/usr/--with-vpx-dir=/usr/local/libvpx/--with-zlib-dir=/usr /local/zlib--with-t1lib=/usr/local/t1lib--with-iconv--enable-libxml--enable-xml--enable-bcmath--enable-shmop-- Enable-sysvsem--enable-inline-optimization--enable-opcache--enable-mbregex--enable-fpm--enable-mbstring-- Enable-ftp--enable-gd-native-ttf--with-openssl--enable-pcntl--enable-sockets--with-xmlrpc--enable-zip-- Enable-soap--without-pear--with-gettext--enable-session--with-curl--enable-ctype
Make
Make install
CP $path/php.ini/usr/local/php/etc/php.ini
Rm-rf/etc/php.ini
MV php-fpm.conf/usr/local/php/etc/
Ln-s/usr/local/php/etc/php.ini/etc/php.ini
Ln-s/usr/local/php/etc/php-fpm.conf/etc/php-fpm.conf
CP $path/PHP-5.5.24/SAPI/FPM/INIT.D.PHP-FPM/ETC/RC.D/INIT.D/PHP-FPM
chmod +x/etc/rc.d/init.d/php-fpm
Chkconfig PHP-FPM on
}

One-click Installation Lnmp (2)

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.