一键安装lnmp(2)
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
}
一键安装lnmp(2)的更多相关文章
- Centos6.5中 一键安装LNMP 安装Yii2.0 手工配置
1.一键安装LNMP cd /usr wget -c http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gz tar zxf lnmp1.-full.tar.gz ...
- Shell脚本一键安装LNMP环境
https://sourceforge.net/projects/opensourcefile/files/ Nginx是一款高性能的HTTP和反向代理服务器.Nginx在反向代理,Rewrite规则 ...
- 一键安装LNMP(适合centos7)
1.准备工作,下载源码包 wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.22-linux-glibc2.12-x86_64.tar ...
- Linux一键安装LNMP环境
Linux一键安装LNMP环境 官方地址:https://lnmp.org/. 参考安装步骤:https://lnmp.org/install.html. 一键安装可以选择mysql版本.php版本, ...
- Linux安装swoole拓展 (一键安装lnmp后安装可用完美)
一键安装lnmp后安装可用完美 swoole(一键安装完lnmp重启下,之前出现502一直解决不了,不清楚啥情况) 找到对应php版本,在lnmp文件夹的src 1.安装swoole cd /usr/ ...
- 一键安装Lnmp教程
LNMP一键安装包 系统需求: CentOS/RHEL/Fedora/Debian/Ubuntu/Raspbian Linux系统 需要3GB以上硬盘剩余空间 128M以上内存,Xen的需要有SWAP ...
- 【Linux】Centos6.8下一键安装Lnmp/Lamp环境
[下载一键安装软件包] 百度云地址:https://pan.baidu.com/s/1TZqGKtE-46gxW96Ptfp4gA 网址:https://lnmp.org/ [步骤] 通过第三方远程工 ...
- 一键安装LNMP/LAMP
安装步骤:1.使用putty或类似的SSH工具登陆VPS或服务器: 登陆后运行:yum install screen安装 screen screen -S lnmp创建一个名字为lnmp的会话 2. ...
- 一键安装 lnmp/lamp/lanmp
1.使用putty或类似的SSH工具登陆VPS或服务器 # screen -S lnmp 如果提示screen: command not found 命令不存在可以执行:yum install scr ...
- Vultr VPS建站攻略 – 一键安装LNMP无面板高性能WEB环境
在"Vultr VPS建站攻略 - 一键安装宝塔面板架设LNMP/LAMP Web环境"文章中,VULTR中文网分享到我们常用的可视化面板宝塔面板安装在VULTR VPS主机中建站 ...
随机推荐
- poj 1386
Play on Words Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 11312 Accepted: 3862 De ...
- JAVAWEB的Listener
学习监听器 1监听器是什么 :监听对象的变化或者监听事件的触发 2有什么作用:当被监听的对象状态改变时,触发对应的方法 3怎么用: ①声明监听器,(继承对应的监听器) ②重写监听方法,并实现自己需要的 ...
- ggplot2画图小试
# 注意aes(x=wt, y=mpg)中的wt不是字符"wt",因此它是属性字段名(例如,EXCel中字段名有Student,那就是Student,而不是"Studen ...
- Hadoop伪分布安装详解(三)
目录: 1.修改主机名和用户名 2.配置静态IP地址 3.配置SSH无密码连接 4.安装JDK1.7 5.配置Hadoop 6.安装Mysql 7.安装Hive 8.安装Hbase 9.安装Sqoop ...
- Fang Fang---hud5455(字符串处理)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5455 就是求字符串中含有几个f[i], 输出最小的: 例如fff应该是2,有f[0]和f[1]组成的; ...
- SSL延迟有多大?(转)
add by zhj: SSL层在TCP层之上,SSL握手是在TCP握手完成之后,除了这点之外,两者应该是相对独立的过程.在服务端,这两个过程有可能不在同一台主机上, 比如服务端用LVS+Nginx实 ...
- BBS项目部署
1.准备 项目架构为:LNM+Python+Django+uwsgi+Redis (L:linux,N:nginx,M:mysql) 将bbs项目压缩上传到: /opt 在shell中直接拖拽 ...
- 0602-Zuul构建API Gateway-Zuul Http Client、cookie、header
一.Zuul Http Client zuul使用的默认HTTP客户端现在由Apache HTTP Client支持,而不是已弃用的Ribbon RestClient.要使用RestClient或使用 ...
- 详解MySQL第一篇—MySQL简要介绍及DDL语句
背景:近几年,开源数据库逐渐流行起来.由于具有免费使用.配置简单.稳定性好.性能优良等优点,开源数据库在中低端应用上占据了很大的市场份额,而 MySQL 正是开源数据库中的杰出代表.MySQL 数据库 ...
- cl查看类的内存布局
查看单个类的内存布局 Microsoft Visual Studio编译器cl的编译选项可以查看源文件中某个C++类的内存布局,对于想了解某个对象的内存布局的人来说十分直观和方便. • 命令格式 ...