急速安装lnmp 编译版本-wiki-shell脚本实现一键部署
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脚本实现一键部署的更多相关文章
- 急速安装lnmp 编译版本
急速安装lnmp 编译版本 安装msyql+PHP 系统centos6.5 安装 开发软件包 已经改成了163的源需要执行下面的代码 官网不自带 libmcrypt libmcrypt-devel w ...
- 【shell脚本】一键部署LNMP===deploy.sh
一键部署mysql,php,nginx,通过源码安装部署 #!/bin/bash # 一键部署 LNMP(源码安装版本) menu() { clear echo " ############ ...
- shell脚本之一键部署openV~P~N
提前准备:/root目录下: checkpsw.sh ## 官方提供的自定义脚本,可在http://openvpn.se/files/other/checkpsw.sh下载 openvpn@.serv ...
- 安装完Ubuntu后通过shell脚本一键安装软件
安装完Ubuntu后通过shell脚本一键安装软件 以下代码中#是单行注释 :<<! ! 是多行注释. 运行的时候需要把多行注释去掉. 比如把以下代码保存为install.sh, 那么在终 ...
- Dubbo入门到精通学习笔记(二):Dubbo管理控制台、使用Maven构建Dubbo的jar包、在Linux上部署Dubbo privider服务(shell脚本)、部署consumer服务
文章目录 Dubbo管理控制台 1.Dubbo管理控制台的主要作用: 2.管理控制台主要包含: 3.管理控制台版本: 安装 Dubbo 管理控制台 使用Maven构建Dubbo服务的可执行jar包 D ...
- 在linux中安装jdk以及tomcat并shell脚本关闭启动的进程
在命令行模式中输入uname -a ,如下图,当界面展示i386就说明本linux系统为32版本,就在官网下载对应jdk版本,或者直接到我的网盘上下载http://pan.baidu.com/s/1c ...
- 可以自动安装mysql数据库的一个shell脚本
发布:thatboy 来源:脚本学堂 [大 中 小] 分享一例shell脚本,可以实现mysql数据库的自动安装,脚本写的不错,无论是用来学习,还是生产环境中应用,都是不错的,有需要的朋友 ...
- shell脚本编写nginx部署脚本
下面为shell脚本编写的nginx的安装及修改nginx.conf的脚本,脚本比较简单: #!/bin/bash function yum_install(){ yum install epel-r ...
- 编写shell脚本实现一键创建KVM虚拟机
shell脚本一键创建虚拟机 代码如下: #!/bin/bashname=$1 #把位置变量$1重新定义为name(创建虚拟机的名字)path1=/var/lib/libvirt/images/ #i ...
随机推荐
- 4. Go常量
常量就是那些不可以改变的值 Go语言中定义常量的方式: const a = "admin" 则 a 就是一个常量,但实际上其后面的 "admin" 也是一个字符 ...
- 【Spring学习】Spring的源码解析之路
缘起:=====>>>> 在项目中实际上是用到了Spring的内容,只是直接用的SpringBoot,不管是Eclipse中还是在Intellig IDEA中,应该都比较容易能 ...
- logistics回归理解
多元回归方程:假设有一个因变量y和一组自变量x1, x2, x3, ... , xn,其中y为连续变量,我们可以拟合一个线性方程: y =β0 +β1*x1 +β2*x2 +β3*x3 +...+βn ...
- 机器学习--Lasso回归和岭回归
之前我们介绍了多元线性回归的原理, 又通过一个案例对多元线性回归模型进一步了解, 其中谈到自变量之间存在高度相关, 容易产生多重共线性问题, 对于多重共线性问题的解决方法有: 删除自变量, 改变数据形 ...
- 转:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-j8m0mf5q/mysqlclient
错误场景 第一次部署服务器时mysqlclient安装失败 思考 初步考虑是pip没有升级,最后发现不是这个原因. 解决办法 来源:https://blog.csdn.net/mr_tia/artic ...
- Taro button点击切换选中状态
1.引入组件 2.state中设置选中状态 // button按钮的默认选中,0代表选中 state = { currentIndex: 0 } 3.设置class的样式,点击更改选中 selectN ...
- 【转】.NET程序员提高效率的70多个开发工具
原文:.NET程序员提高效率的70多个开发工具 工欲善其事,必先利其器,没有好的工具,怎么能高效的开发出高质量的代码呢?本文为各ASP.NET 开发者介绍一些高效实用的工具,涉及SQL 管理,VS插件 ...
- Linux screenshot
一.简介 linux下的三个截图软件
- 7.Redis主线程阻塞原因
7.Redis主线程阻塞原因7.1 发现阻塞7.2 内在原因7.2.1 API或数据结构使用不合理7.2.2 CPU饱和7.2.3 持久化阻塞7.3 外在原因7.3.1 CPU竞争7.3.2 内存交换 ...
- oracle竖表转横表字段合并
select * from( SELECT t.ID, ISTATUS, ITIMEOUT, IRESENDTIMEOUT, IRESENDFIXED, IAUTOUPGRADE, STRTERMPR ...