shell脚本lnmp.sh

环境:centos 6.5 、64位

#!/bin/bash

yum install -y nano vim wget

wget http://www.atomicorp.com/installers/atomic
sh ./atomic
yum -y install libmcrypt libmcrypt-devel
yum -y groupinstall "Development Tools" rm -rf atomic RPM-GPG-KEY.art.txt RPM-GPG-KEY.atomicorp.txt yum -y install libxml2* curl curl-devel libjpeg* libpng* freetype-devel yum -y install mysql mysql-server mysql-devel service mysqld restart wget http://cn2.php.net/distributions/php-5.6.2.tar.gz
tar -xvf php-5.6.2.tar.gz cd php-5.6.2 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql --with-mysql-sock=/tmp/mysql.sock --with-pdo-mysql --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 --with-pear --with-curl --with-openssl --enable-bcmath --enable-sockets make && make install cp php.ini-production /usr/local/php/etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /root/php-5.6.2/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm cd -
rm -rf php-5.6.2 php-5.6.2.tar.gz yum install -y nginx
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak echo "user nginx nginx;
worker_processes 16;
error_log /var/log/nginx_error.log crit;
pid /var/run/nginx.pid;
worker_rlimit_nofile 65535;
events
{
use epoll;
worker_connections 65535;
}
http
{
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 8m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
log_format www '$"remote_addr" - $"remote_user" [$"time_local"] \"\$request\" '
'$"status" $"body_bytes_sent" \"\$http_referer\" '
'\"\$http_user_agent\" $"http_x_forwarded_for"';
server
{
listen 80;
server_name vagrant-centos65.vagrantup.com;
index start.php index.htm index.html index.php pengyou.php weibo.php qzone.php;
root /usr/share/nginx/html;
location ~ .*\.(php|php5)?$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index start.php;
include fastcgi.conf;
}
location ~ .*.(svn|git|cvs)
{
deny all;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
}
}" > /etc/nginx/nginx.conf sed -i 's/user =.*/user = nginx/g' /usr/local/php/etc/php-fpm.conf
sed -i 's/group =.*/group = nginx/g' /usr/local/php/etc/php-fpm.conf /etc/init.d/php-fpm start /etc/init.d/nginx start echo "<?php
phpinfo();
?>
" > /usr/share/nginx/html/cc.php mysql -uroot <<EOF
create database wiki charset utf8;
grant all on wiki.* to wiki@'localhost' identified by 'wiki';
flush privileges;
EOF wget -c http://kaiyuan.hudong.com/download.php?n=HDWiki-v6.0UTF8-20170209.zip -O HDWiki-v6.0UTF8-20170209.zip
unzip HDWiki-v6.0UTF8-20170209.zip
mv hdwiki/* /usr/share/nginx/html/ rm -rf HDWiki-v6.0UTF8-20170209.zip document hdwiki cd /usr/share/nginx/html/
chmod 0777 ./uploads ./uploads/userface ./data ./plugins ./style/default/logo.gif ./config.php
cd - exit

打开浏览器,centos的ip地址,进行设置,就可以了!

默认localhost那里改成127.0.0.1

mysql账户:root

mysql密码为空

别的默认!

急速安装lnmp 编译版本-wiki-shell脚本实现一键部署的更多相关文章

  1. 急速安装lnmp 编译版本

    急速安装lnmp 编译版本 安装msyql+PHP 系统centos6.5 安装 开发软件包 已经改成了163的源需要执行下面的代码 官网不自带 libmcrypt libmcrypt-devel w ...

  2. 【shell脚本】一键部署LNMP===deploy.sh

    一键部署mysql,php,nginx,通过源码安装部署 #!/bin/bash # 一键部署 LNMP(源码安装版本) menu() { clear echo " ############ ...

  3. shell脚本之一键部署openV~P~N

    提前准备:/root目录下: checkpsw.sh ## 官方提供的自定义脚本,可在http://openvpn.se/files/other/checkpsw.sh下载 openvpn@.serv ...

  4. 安装完Ubuntu后通过shell脚本一键安装软件

    安装完Ubuntu后通过shell脚本一键安装软件 以下代码中#是单行注释 :<<! ! 是多行注释. 运行的时候需要把多行注释去掉. 比如把以下代码保存为install.sh, 那么在终 ...

  5. Dubbo入门到精通学习笔记(二):Dubbo管理控制台、使用Maven构建Dubbo的jar包、在Linux上部署Dubbo privider服务(shell脚本)、部署consumer服务

    文章目录 Dubbo管理控制台 1.Dubbo管理控制台的主要作用: 2.管理控制台主要包含: 3.管理控制台版本: 安装 Dubbo 管理控制台 使用Maven构建Dubbo服务的可执行jar包 D ...

  6. 在linux中安装jdk以及tomcat并shell脚本关闭启动的进程

    在命令行模式中输入uname -a ,如下图,当界面展示i386就说明本linux系统为32版本,就在官网下载对应jdk版本,或者直接到我的网盘上下载http://pan.baidu.com/s/1c ...

  7. 可以自动安装mysql数据库的一个shell脚本

    发布:thatboy   来源:脚本学堂     [大 中 小] 分享一例shell脚本,可以实现mysql数据库的自动安装,脚本写的不错,无论是用来学习,还是生产环境中应用,都是不错的,有需要的朋友 ...

  8. shell脚本编写nginx部署脚本

    下面为shell脚本编写的nginx的安装及修改nginx.conf的脚本,脚本比较简单: #!/bin/bash function yum_install(){ yum install epel-r ...

  9. 编写shell脚本实现一键创建KVM虚拟机

    shell脚本一键创建虚拟机 代码如下: #!/bin/bashname=$1 #把位置变量$1重新定义为name(创建虚拟机的名字)path1=/var/lib/libvirt/images/ #i ...

随机推荐

  1. json和jquery中的ajax

    JSON: java script Object otation:js对象标记 声明一个json对象,使用key:value对应,中间用冒号连接,键值对之间用逗号连接,最外面用{}包含 声明方式: 语 ...

  2. 神经网络训练tricks

    神经网络构建好,训练不出好的效果怎么办?明明说好的拟合任意函数(一般连续)(为什么?可以参考http://neuralnetworksanddeeplearning.com/),说好的足够多的数据(h ...

  3. 项目总结22:Java UDP Socket数据的发送和接收

    项目总结22:Java UDP Socket数据的发送和接收 1-先上demo 客户端(发送数据) package com.hs.pretest.udp; import java.io.IOExcep ...

  4. 010Edit手写PE

    前言PE结构DOS头IMAGE_DOS_HEADERPE头介绍总大小[248字节]结构体含义标记(4字节)0x4550文件头(20字节)扩展头(224字节)为程序添加ExitProcess函数 前言 ...

  5. Redis5种常用的数据结构

    一.数据结构 五种常用的数据结构:string.hash.list.set.zse,以及三种不常用的:hyperloglog.geospatial.streams. 二.常用数据结构的使用 1.Str ...

  6. 面试简单整理之zookeeper

    157.zookeeper 是什么? ZooKeeper 是一个开源的分布式协调服务,由雅虎创建,是 Google Chubby 的开源实现. 分布式应用程序可以基于 ZooKeeper 实现诸如数据 ...

  7. Could not load file or assembly (Exception from HRESULT: 0x80131047)-解决办法

    场景:.Net 4.0 MVC WebAPI 应用程序添加ApplicationInsights监控后在demo环境运行正常,发布到testing环境出现异常 异常信息: Could not load ...

  8. 博客1--tensorflow的图像基本处理操作

    话不多,具体内容在开源中国里我的博客:https://my.oschina.net/u/3770644 代码: #!/usr/bin/env python# -*- coding:utf-8 -*-# ...

  9. Intellij IDEA环境配置RestEasy,SpringMVC+RestEasy

    在SpringMvc中配置RestEasy,需要以下步骤 1.通过maven导入restEasy所需要的jar包 2.在web.xml文件中添加相应的配置. 3.编写服务. 具体步骤: 1.通过mav ...

  10. PID25 / 合并果子 ☆

    这里用到了STL里面的priority_queue,我也不是很精通基本上属于现学现卖阶段,http://www.cnblogs.com/flyoung2008/articles/2136485.htm ...