xml地图|网站地图|网站标签 [设为首页] [加入收藏]

澳门皇家娱乐场LNMP最新源码安装脚本,4安装配置

来源:http://www.ccidsi.com 作者:呼叫中心培训课程 人气:182 发布时间:2019-07-25
摘要:此脚本在生育服务器上行使了一年多,本脚本崇尚简单唯美,只供给三个剧本就可以在其余一台有互连网的服务器上自行配置LNMP。 Centos6.4安装配备LNMP 配置蒙受: L:Centos 2.6.32-358.el6.x

此脚本在生育服务器上行使了一年多,本脚本崇尚简单唯美,只供给三个剧本就可以在其余一台有互连网的服务器上自行配置LNMP。

Centos6.4安装配备LNMP

配置蒙受:
L:Centos 2.6.32-358.el6.x86_64
N:Nginx 1.7
M:Mysql5.7.3
P:PHP5.5.11
NGINX一键脚本:

#!/bin/bash
# Author:Byrd
# Version:1.0
# Site:www.t4x.org
# Contact:root#t4x.org
# Compile and install NGINX BY:BYRD AT:2014-04-30
# This script for nginx1.4 nginx1.6 nginx1.7

# Define
DownTools=/byrd/tools
NginxWget=
Openssl=
NginxVersion=nginx-1.7.4
InstallNginxDir=/byrd/service
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG="en_US.UTF-8"
# Check if user is root
if [ $UID != "0" ]; then
echo "Error: You must be root to run this script, please use root to install lnmp"
exit 1
fi
clear
echo "========================================================================="
echo "============================Install Nginx================================"
echo "========================================================================="
echo "=============================www.t4x.org================================="
echo "========================================================================="
# Create web user
groupadd www
useradd -s /sbin/nologin -g www www
yum install pcre* openssl* openssl-devel gcc gcc-c wget vim -y
# Create a file download directory
[ ! -d $DownTools ] && mkdir -p $DownTools
[ ! -d $InstallNginxDir ] && mkdir $InstallNginxDir
cd $InstallNginxDir
if [ ! -f openssl-1.0.1h.tar.gz ];then
wget $Openssl || exit 1 && echo "Please changes Openssl URL"
tar zxf openssl-1.0.1h.tar.gz
cd openssl-1.0.1h
./config
make
else
tar zxf openssl-1.0.1h.tar.gz
cd openssl-1.0.1h
./config
make
fi
RETVAL1=$?
if [ $RETVAL1 -eq 0 ];then
echo "Openssl installed successfully"
else
exit $RETVAL1
fi
cd $DownTools
wget $NginxWget
tar zxf $NginxVersion.tar.gz
cd $NginxVersion
./configure --user=www --group=www --prefix=$InstallNginxDir/$NginxVersion --with-openssl=$InstallNginxDir/openssl-1.0.1h --with-pcre --with-http_ssl_module --with-http_spdy_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_stub_status_module --with-ipv6 --with-http_sub_module &&
#./configure --user=www --group=www --prefix=/byrd/service/nginx-1.6.2 --with-openssl=/byrd/service/openssl-1.0.1j --with-pcre --with-http_ssl_module --with-http_spdy_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module
make && make install
RETVAL2=$?
if [ $RETVAL2 -eq 0 ];then
echo "Nginx installed successfully"
else
exit $RETVAL2
fi
ln -s $InstallNginxDir/$NginxVersion /usr/local/nginx
/usr/local/nginx/sbin/nginx
/bin/netstat -tunlp | /bin/grep 80
if [ -s /sbin/iptables ]; then
/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
/sbin/iptables-save
fi

Mysql一键安装:

#!/bin/bash
# Author:Byrd
# Version:1.0
# Site:www.t4x.org
# Contact:root#t4x.org
# This script for Mysql 5.6.16
# Check if user is root
if [ $UID != "0" ]; then
echo "Error: You must be root to run this script, please use root to install lnmp"
exit 1
fi
clear
echo "========================================================================="
echo "Will automatically install mysql"
echo "========================================================================="
MysqlInstall=/byrd/service
DownMysqlTools=/byrd/tools
MysqlUrl=
Version=mysql-5.6.19
[ ! -d $DownMysqlTools ] && mkdir -p $DownMysqlTools
[ ! -d $MysqlInstall ] && mkdir $MysqlInstall
groupadd mysql
useradd -s /sbin/nologin -g mysql mysql
yum install pcre* openssl* openssl-devel gcc gcc-c cmake libaio* library* ncurses-* -y
cd $DownMysqlTools
if [ ! -f $Version.tar.gz ];then
wget $MysqlUrl
tar zxf $Version.tar.gz
cd $Version
cmake . -DCMAKE_INSTALL_PREFIX=$MysqlInstall/$Version -DMYSQL_DATADIR=$MysqlInstall/$Version/data -DMYSQL_UNIX_ADDR=$MysqlInstall/$Version/tmp/mysql.sock -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=ON -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 &&
make && make install
RETVAL1=$?
elif [ -f $Version.tar.gz ];then
tar zxf $Version.tar.gz
cd $Version
cmake . -DCMAKE_INSTALL_PREFIX=$MysqlInstall/$Version -DMYSQL_DATADIR=$MysqlInstall/$Version/data -DMYSQL_UNIX_ADDR=$MysqlInstall/$Version/tmp/mysql.sock -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=ON -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 &&
make && make install
RETVAL1=$?
else
exit 1
fi
if [ $RETVAL1 -eq 0 ];then
echo "$Version install successful"
else
echo "$Version install failed."
fi
ln -s $MysqlInstall/$Version /usr/local/mysql
/usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --user=mysql
/bin/cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
/bin/mv /etc/my.cnf /etc/my.cnf.backup
/bin/cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf
/etc/init.d/mysqld start
if [ `netstat -tunlp | grep mysql |wc -l` -ne 0 ];then
echo "$Version Starting successful"
else
echo "$Version Starting failed."
fi

PHP一键脚本:

#!/bin/bash
# Author:Byrd
# Version:1.0
# Site:www.t4x.org
# Contact:root#t4x.org
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG="en_US.UTF-8"
# Check if user is root
if [ $UID != "0" ]; then
echo "Error: You must be root to run this script, please use root to install lnmp"
exit 1
fi
clear
echo "========================================================================="
echo "Install PHP5.5.11 BY:BYRD AT:2014-04-30"
echo "========================================================================="
RETVAL=0
SoftTool=/byrd/tools
Server=/byrd/server
LibiconvUrl=
LibicoVern=libiconv-1.9.2
[ ! -d $SoftTool ] && mkdir -p $SoftTool
[ ! -d $Server ] && mkdir $Server
yum install zlib libjpeg freetype libpng gd curl zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel gcc gcc-c wget libxml* libtool* libxslt* -y
cd $SoftTool
if [ ! -f $LibicoVern.tar.gz ];then
wget $LibiconvUrl || exit 1 && echo "$LibicoVern Download Error,Please try again"
tar zxf $LibicoVern.tar.gz
cd $LibicoVern
./configure --prefix=/usr/local/libiconv
make && make install
RETVAL1=$?
elif [ -f $LibicoVern.tar.gz ];then
tar zxf $LibicoVern.tar.gz
cd $LibicoVern
./configure --prefix=/usr/local/libiconv
make && make install
RETVAL1=$?
else
exit 1
fi
if [ `echo $RETVAL1` -eq $RETVAL ];then
echo "$LibicoVern Install Successful"
else
echo "$LibicoVern Install Failured"
exit `echo $RETVAL1`
fi
libmcryptUrl=
libmcryptVen=libmcrypt-2.5.8
cd $SoftTool
if [ ! -f $libmcryptVen.tar.gz ];then
wget $libmcryptUrl || exit 1 && echo "$libmcryptVen.tar.gz Download Error,Please try again"
tar zxf $libmcryptVen.tar.gz
cd $libmcryptVen
./configure
make && make install
RETVAL2=$?
rm -f /usr/lib/libmcrypt.*
rm -f /usr/lib/libmhash*
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
rm -f /usr/lib64/libmcrypt.*
rm -f /usr/lib64/libmhash*
ln -s /usr/local/lib64/libmcrypt.la /usr/lib64/libmcrypt.la
ln -s /usr/local/lib64/libmcrypt.so /usr/lib64/libmcrypt.so
ln -s /usr/local/lib64/libmcrypt.so.4 /usr/lib64/libmcrypt.so.4
ln -s /usr/local/lib64/libmcrypt.so.4.4.8 /usr/lib64/libmcrypt.so.4.4.8
ln -s /usr/local/lib64/libmhash.a /usr/lib64/libmhash.a
ln -s /usr/local/lib64/libmhash.la /usr/lib64/libmhash.la
ln -s /usr/local/lib64/libmhash.so /usr/lib64/libmhash.so
ln -s /usr/local/lib64/libmhash.so.2 /usr/lib64/libmhash.so.2
ln -s /usr/local/lib64/libmhash.so.2.0.1 /usr/lib64/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
ln -s /usr/local/mysql/lib/libmysqlclient.so /usr/lib64/
ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18
ldconfig -v
elif [ -f $libmcryptVen.tar.gz ];then
tar zxf $libmcryptVen.tar.gz
cd $libmcryptVen
./configure
make && make install
rm -f /usr/lib/libmcrypt.*
rm -f /usr/lib/libmhash*
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
rm -f /usr/lib64/libmcrypt.*
rm -f /usr/lib64/libmhash*
ln -s /usr/local/lib64/libmcrypt.la /usr/lib64/libmcrypt.la
ln -s /usr/local/lib64/libmcrypt.so /usr/lib64/libmcrypt.so
ln -s /usr/local/lib64/libmcrypt.so.4 /usr/lib64/libmcrypt.so.4
ln -s /usr/local/lib64/libmcrypt.so.4.4.8 /usr/lib64/libmcrypt.so.4.4.8
ln -s /usr/local/lib64/libmhash.a /usr/lib64/libmhash.a
ln -s /usr/local/lib64/libmhash.la /usr/lib64/libmhash.la
ln -s /usr/local/lib64/libmhash.so /usr/lib64/libmhash.so
ln -s /usr/local/lib64/libmhash.so.2 /usr/lib64/libmhash.so.2
ln -s /usr/local/lib64/libmhash.so.2.0.1 /usr/lib64/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
ln -s /usr/local/mysql/lib/libmysqlclient.so /usr/lib64/
ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18
ldconfig -v
else
exit 1
fi
if [ `echo $RETVAL2` -eq $RETVAL ];then
echo "$libmcryptVen Install Successful"
else
echo "$libmcryptVen Install Failured"
exit `echo $RETVAL2`
fi
cd $SoftTool
mhashUrl=
mhashDev=mhash-0.9.9.9
if [ ! -f $mhashDev.tar.gz ];then
wget $mhashUrl
tar zxf $mhashDev.tar.gz
cd $mhashDev
./configure
make && make install
RETVAL3=$?
else
tar zxf $mhashDev.tar.gz
cd $mhashDev
./configure
make && make install
RETVAL3=$?
fi
if [ `echo $RETVAL3` -eq $RETVAL ];then
echo "$mhashDev Install Successful"
else
echo "$mhashDev Install Failured"
exit `echo $RETVAL3`
fi
cd $SoftTool
PhpUrl=
PhpVen=php-5.5.11
if [ ! -f $PhpVen.tar.gz ];then
wget $PhpUrl
tar zxf $PhpVen.tar.gz
cd $PhpVen
./configure --enable-opcache --prefix=$Server/$PhpVen --with-mysql=/usr/local/mysql/ --with-mysqli --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=www --with-fpm-group=www --enable-ftp
make && make install
RETVAL4=$?
else
tar zxf $PhpVen.tar.gz
cd $PhpVen
./configure --enable-opcache --prefix=$Server/$PhpVen --with-mysql=/usr/local/mysql/ --with-mysqli --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=www --with-fpm-group=www --enable-ftp
make && make install
RETVAL4=$?
fi
if [ `echo $RETVAL4` -eq $RETVAL ];then
echo "$PhpVen Install Successful"
else
echo "$PhpVen Install Failured"
exit `echo $RETVAL4`
fi
ln -s $Server/$PhpVen /usr/local/php
cp $SoftTool/$PhpVen/php.ini-production /usr/local/php/lib/php.ini
mv /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
/usr/local/php/sbin/php-fpm -t
/usr/local/php/sbin/php-fpm
if [ `netstat -tunlp | grep php-fpm |wc -l` -ne 0 ];then
echo "$PhpVen Starting successful"
else
echo "$PhpVen Starting failed."
fi

PHP参数设置:

./configure --enable-opcache --prefix=/Byrd/service/php-5.5.11 --with-mysql=/usr/local/mysql/ --with-mysqli --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=bywww --with-fpm-group=bywww --enable-ftp --disable-fileinfo --with-pdo-mysql

基于Centos6.4 X64、PHP5.5.11、NGINX1.7、MYSQL5.7.3

配置情状: L:Centos 2.6.32-358.el6.x86_64 N:Nginx 1.7 M:Mysql5.7.3 P:PHP5.5.11 NGINX一键脚本: #!/bin/bash # Author:Byrd # Version:1.0 # Site:ww...

LNMP最新源码安装脚本(定期更新)

本脚本会在剧本实践目录下,建packages目录用于存放LNMP所急需的软件。我们安装完能够去除该目录。

 

运用情势:

Linux Nginx MySQL PHP Pureftpd User manager for PureFTPd,脚本中用到的软件包大多最新版本,修复了User manager for PureFTPd一些安全性难题,不建议利用phpMyAdmin,如需利用能够将解压包放到/data/admin目录下。

1、把shell脚本的从头到尾的经过保留为nginx_php

 

2、root权限下运转:

又见LNMP有木有?如有错误请各位大虾们立马告之

复制代码 代码如下:

 

chmod u x nginx_php; ./nginx_php init; ./nginx_php ins_mysql-server; ./nginx_php ins_mysql-client; ./nginx_php ins_php52; ./nginx_php ins_php52-ext; ./nginx_php ins_mysql

LNMP已经停放github(定时更新)上,地址:

在剧本运行进度中要求输入一次y确认。

 

Shell脚本内容如下:

剧本中国应用软件与技巧服务总公司件版本如下:

复制代码 代码如下:

01

#/bash
# author:coralzd powered by www.freebsdsystem.org
# written by coralzd 2011.05.05
# version 0.1.3 build 20110505
nginx_dir="/usr/local/nginx"
php52_dir="/usr/local/php52"
mysql_dir="/usr/local/mysql"

cmake-2.8.10.2.tar.gz

function init()
{

02

LANG=C
yum -y install wget 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

mysql-5.5.32.tar.gz

read -p "Now,will download nginxphp software...Y|y:" nginxphp

03

case "$nginxphp" in

libiconv-1.14.tar.gz

Y|y)

04

echo -n "starting download nginx_php ..."
cat > list << "EOF" &&
nginx-1.0.0.tar.gz
php-5.2.17.tar.gz
php-5.2.17-fpm-0.5.14.diff.gz
libiconv-1.13.1.tar.gz
libmcrypt-2.5.8.tar.gz
mcrypt-2.6.8.tar.gz
memcache-2.2.5.tgz
mhash-0.9.9.9.tar.gz
mysql-5.1.52.tar.gz
pcre-8.10.tar.gz
eaccelerator-0.9.6.1.tar.bz2
PDO_MYSQL-1.0.2.tgz
libunwind-0.99.tar.gz
ImageMagick.tar.gz
imagick-2.3.0.tgz
google-perftools-1.6.tar.gz
fcgi.conf
php.ini
nginx.conf
php-fpm.conf
EOF
mkdir packages
for i in `cat list`
do
if [ -s packages/$i ]; then
echo "$i [found]"
else
echo "Error: $i not found!!!download now......"
wget -P packages/
fi
done
;;

libmcrypt-2.5.8.tar.gz

*)

05

echo -n "exit install script"
exit 0
;;

mhash-0.9.9.9.tar.gz

esac

06

groupadd www && useradd www -s /sbin/nologin -g www
groupadd mysql && useradd mysql -s /sbin/nologin -g mysql
echo "www and mysql user && group create!"

mcrypt-2.6.8.tar.gz

/bin/rm -rf list

07

echo -e "All of installed sucussful!"
}
function is_version()

php-5.3.26.tar.gz

{
if [ `uname -m` == "x86_64" ];then
tar zxf libunwind-0.99.tar.gz
tar zxvf libunwind-0.99.tar.gz
cd libunwind-0.99/
CFLAGS=-fPIC ./configure
make CFLAGS=-fPIC
make CFLAGS=-fPIC install
cd ../
else

08

echo "your system is 32bit ,not install libunwind lib!"
fi
}

memcache-2.2.5.tgz

function ins_nginx()

09

{

eaccelerator-0.9.6.1.tar.bz2

cd packages

10

is_version
tar zxf google-perftools-1.6.tar.gz
cd google-perftools-1.6
./configure
make
make install

PDO_MYSQL-1.0.2.tgz

cd ..
tar zxf pcre-8.10.tar.gz
cd pcre-*
./configure
make
make install
cd ..
tar zxf nginx-1.0.0.tar.gz
cd nginx-1.0.0
./configure --prefix=${nginx_dir} --with-google_perftools_module --user=www --group=www --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module

11

make && make install
cd ..
rm -rf /usr/local/nginx/conf/nginx.conf
echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
cp nginx.conf /usr/local/nginx/conf/
cp fcgi.conf /usr/local/nginx/conf/
echo "nginx installed sucussfully!"

ImageMagick-6.8.3-10.tar.gz

}
function ins_mysql-server()
{

12

cd packages/
tar zxf mysql-5.1.52.tar.gz
cd mysql-5.1.52
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CXXFLAGS="${CFLAGS}"
./configure "--prefix=${mysql_dir}" "--with-server-suffix=-DZWWW" "--with-mysqld-user=mysql" "--without-debug" "--with-charset=utf8" "--with-extra-charsets=all" "--with-pthread" "--with-big-tables" "--enable-thread-safe-client" "--enable-assembler" "--with-readline" "--with-ssl" "--enable-local-infile" "--with-plugins=partition,myisammrg" "--without-ndb-debug"

imagick-3.0.1.tgz

make && make install
cp support-*/mysql.server /etc/init.d/mysqld
cd /usr/local/mysql
chown -R mysql:mysql .
rm -rf sql-bench mysql-test
echo "mysql server 5.1.52 installed successfully!"
}
function ins_mysql-client()
{

13

cd packages/
tar zxf mysql-5.1.52.tar.gz
cd mysql-5.1.52
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CXXFLAGS="${CFLAGS}"
./configure "--prefix=${mysql_dir}" "--with-mysqld-user=mysql" "--without-debug" "--with-charset=utf8" "--with-extra-charsets=all" "--with-pthread" "--with-big-tables" "--enable-thread-safe-client" "--enable-assembler" "--with-readline" "--with-ssl" "--enable-local-infile" "--without-server"

pecl_http-1.7.5.tgz

make && make install
cd /usr/local/mysql
chown -R mysql:mysql .
rm -rf sql-bench mysql-test
echo "mysql client 5.1.52 installed successfully!"
}
function ins_php52()
{
cd packages/
tar zxf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1/
./configure --prefix=/usr/local
make
make install
cd ../

14

tar zxf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../

pcre-8.32.tar.gz

tar zxf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
cd ../

15

ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config

nginx-1.4.1.tar.gz

tar zxf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
cd ../
tar zxf php-5.2.17.tar.gz
gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | patch -d php-5.2.17 -p1
cd php-5.2.17/
./configure --prefix=${php52_dir} --with-config-file-path=${php52_dir}/etc --with-mysql=${mysql_dir} --with-mysqli=${mysql_dir}/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap
make ZEND_EXTRA_LIBS='-liconv'
make install
cd ..
cp php.ini /usr/local/php52/etc/
cp php-fpm.conf /usr/local/php52/etc/

16

echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf.d/mysql_lib.conf
/sbin/ldconfig
echo "php52 installed successfully!"
}

pure-ftpd-1.0.36.tar.gz

function ins_php52-ext()

17

{
cd packages/

ftp_v2.1.tar.gz

tar zxf memcache-2.2.5.tgz
cd memcache-2.2.5/
${php52_dir}/bin/phpize
./configure --with-php-config=${php52_dir}/bin/php-config
make
make install
cd ../

选拔方法:

tar jxf eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1/
${php52_dir}/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=${php52_dir}/bin/php-config
make
make install
cd ../

 

tar zxf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2/
${php52_dir}/bin/phpize
./configure --with-php-config=${php52_dir}/bin/php-config --with-pdo-mysql=${mysql_dir}
make
make install
cd ../

1

tar zxf ImageMagick.tar.gz
cd ImageMagick-6.5.1-2/
./configure
make
make install
cd ../

wget

tar zxf imagick-2.3.0.tgz
cd imagick-2.3.0/
${php52_dir}/bin/phpize
./configure --with-php-config=${php52_dir}/bin/php-config
make
make install
cd ../
echo "php52 extension installed successfully!"
}

2

case $1 in
init)

chmod x lnmp_install.sh

init
;;
ins_mysql-server)

3

ins_mysql-server

lnmp_install.sh

;;
ins_mysql-client)
ins_mysql-client
;;
ins_nginx)
ins_nginx
;;
ins_php52)
ins_php52
;;
ins_php52-ext)
ins_php52-ext
;;
*)
echo "Usage:`basename $0` {init|ins_mysql-server|ins_mysql-client|ins_php52|ins_php52-ext|ins_mysql}"
;;
esac

说明: 

你或然感兴趣的稿子:

  • Tencent云主机安装LNMP境况及wordpress教程
  • lnmp景况中什么为nginx开启pathinfo
  • VPS中使用LNMP安装WordPress教程
  • CentOS6.5 编写翻译安装lnmp遭遇
  • Zabbix安装图文化教育程(需求LAMP可能LNMP运维碰到)
  • LNMP服务器境遇配置 (linux nginx mysql php)
  • Ali云主机一键安装lamp、lnmp情状的shell脚本共享
  • VPS CentOS-6 下 LNMP HTTP web服务器的搭建步骤
  • LNMP 化解Access Denied错误详细介绍

笔者在 CentOS 6.x 32/64bit( Linode)上测量试验通过,何况在线上使用那个剧本。 

剧本内容

 

 

001

#!/bin/bash

002

# Check if user is root

003

[ $(id -u) != "0" ] && echo "Error: You must be root to run this script, please use root to install lnmp" && exit 1

004

 

005

echo "#######################################################################"

006

echo "#                    LNMP for CentOS/RadHat Linux                     #"

007

echo "# For more information please visit #"

008

echo "#######################################################################"

009

echo ''

010

 

011

# get IP

012

IP=`ifconfig | grep 'inet addr:' | cut -d: -f2 | grep -v ^10. | grep -v ^192.168 | grep -v ^172. | grep -v ^127. | awk '{print  $1}' | awk '{print;exit}'`

013

 

014

# Set password

015

while :

016

do

017

    read -p "Please input the root password of MySQL:" mysqlrootpwd

018

    read -p "Please input the manager password of Pureftpd:" ftpmanagerpwd

019

    if (( ${#mysqlrootpwd} >= 5 && ${#ftpmanagerpwd} >=5 ));then

020

        break

021

    else

022

       echo "least 5 characters"

023

    fi

024

done

025

 

026

# Download packages

027

mkdir -p /root/lnmp/{source,conf}

028

function Download()

029

{

030

cd /root/lnmp

031

[ -s init.sh ] && echo 'init.sh found' || wget

032

cd /root/lnmp/source

033

[ -s cmake-2.8.10.2.tar.gz ] && echo 'cmake-2.8.10.2.tar.gz found' || wget

034

[ -s mysql-5.5.32.tar.gz ] && echo 'mysql-5.5.32.tar.gz found' || wget

035

[ -s libiconv-1.14.tar.gz ] && echo 'libiconv-1.14.tar.gz found' || wget

036

[ -s libmcrypt-2.5.8.tar.gz ] && echo 'bmcrypt-2.5.8.tar.gz found' || wget

037

[ -s mhash-0.9.9.9.tar.gz ] && echo 'mhash-0.9.9.9.tar.gz found' || wget

038

[ -s mcrypt-2.6.8.tar.gz ] && echo 'mcrypt-2.6.8.tar.gz found' || wget

039

[ -s php-5.3.26.tar.gz ] && echo 'php-5.3.26.tar.gz found' || wget

040

[ -s memcache-2.2.5.tgz ] && echo 'memcache-2.2.5.tgz found' || wget

041

[ -s eaccelerator-0.9.6.1.tar.bz2 ] && echo 'eaccelerator-0.9.6.1.tar.bz2 found' || wget

042

[ -s PDO_MYSQL-1.0.2.tgz ] && echo 'PDO_MYSQL-1.0.2.tgz found' || wget

043

[ -s ImageMagick-6.8.3-10.tar.gz ] && echo 'ImageMagick-6.8.3-10.tar.gz found' || wget

044

[ -s imagick-3.0.1.tgz ] && echo 'imagick-3.0.1.tgz found' || wget

045

[ -s pecl_http-1.7.5.tgz ] && echo 'pecl_http-1.7.5.tgz found' || wget

046

[ -s pcre-8.32.tar.gz ] && echo 'pcre-8.32.tar.gz found' || wget

047

[ -s nginx-1.4.1.tar.gz ] && echo 'nginx-1.4.1.tar.gz found' || wget

048

[ -s pure-ftpd-1.0.36.tar.gz ] && echo 'pure-ftpd-1.0.36.tar.gz found' || wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.36.tar.gz

049

[ -s ftp_v2.1.tar.gz ] && echo 'ftp_v2.1.tar.gz found' || wget

050

cd ../conf

051

[ -s init.d.nginx ] && echo 'init.d.nginx found' || wget

052

[ -s nginx.conf ] && echo 'nginx.conf found' || wget

053

[ -s pure-ftpd.conf ] && echo 'pure-ftpd.conf found' || wget

054

[ -s pureftpd-mysql.conf ] && echo 'pureftpd-mysql.conf found' || wget

055

[ -s script.mysql ] && echo 'script.mysql found' || wget

056

}

057

 

058

 

059

function MySQL()

060

# install MySQL

061

{

062

cd /root/lnmp/source

063

useradd -M -s /sbin/nologin mysql

064

mkdir -p /data/mysql;chown mysql.mysql -R /data/mysql

065

tar xzf cmake-2.8.10.2.tar.gz

066

cd cmake-2.8.10.2

本文由68399皇家赌场发布于呼叫中心培训课程,转载请注明出处:澳门皇家娱乐场LNMP最新源码安装脚本,4安装配置

关键词: 68399皇家赌场

上一篇:皇家网上娱乐安装图文教程

下一篇:没有了

最火资讯