#!/bin/sh
echo "----------------------------------start install nginx -----------------------------"
yum install -y gcc-c++ zlib zlib-devel openssl openssl--devel pcre pcre-devel
if [ 'grep "nginx" /etc/passwd | wc -l' ]; then
echo "adding user nginx"
groupadd nginx
useradd -s /sbin/nologin -M -g nginx nginx
else
echo "user nginx exsits"
fi echo "-----------------------------------downloading nginx-------------------------------"
wget http://nginx.org/download/nginx-1.9.5.tar.gz
tar -xvf nginx-1.9..tar.gz
cd nginx-1.9. echo "------------------------------------configuring nginx,plz wait----------------------"
./configure --prefix=/usr/local/nginx if [ $? -ne ];then
echo "configure failed ,please check it out!"
else
echo "make nginx, please wait for 20 minutes"
make
fi if [ $? -ne ];then
echo "make failed ,please check it out!"
else
echo "install nginx, please wait for 20 minutes"
make install
fi chown -R nginx.nginx /usr/local/nginx
ln -s /lib64/libpcre.so.0.0. /lib64/libpcre.so.
/usr/local/nginx/sbin/nginx
iptables -I INPUT -s 0.0.0.0/ -p tcp --dport -j ACCEPT

linux一键安装nginx脚本的更多相关文章

  1. linux一键安装vncserver脚本

    title: linux一键安装vncserver脚本 date: 2016-04-11 14:32:04 tags: --- linux多数情况下是作为服务器使用的,管理员一般也喜欢使用命令行来管理 ...

  2. (转)CentOS一键安装Nginx脚本

    原文:https://www.xiaoz.me/archives/10301 https://blog.slogra.com/post-676.html-----centos7一键安装nginx脚本

  3. linux一键安装php脚本

    #!/bin/sh echo "----------------------------------start install php --------------------------- ...

  4. linux一键安装mysql脚本

    #!/bin/sh if [ -s /etc/my.cnf ];then rm -rf /etc/my.cnf fi echo "------------------------------ ...

  5. 【转】linux 编译安装nginx,配置自启动脚本

    linux 编译安装nginx,配置自启动脚本 本文章来给各位同学介绍一篇关于linux 编译安装nginx,配置自启动脚本教程,希望有需要了解的朋友可一起来学习学习哦. 在公司的suse服务器装ng ...

  6. linux 编译安装nginx,配置自启动脚本

    本文章来给各位同学介绍一篇关于linux 编译安装nginx,配置自启动脚本教程,希望有需要了解的朋友可一起来学习学习哦. 在公司的suse服务器装nginx,记录下安装过程: 参照这篇文章:Linu ...

  7. linux 下 安装nginx及压力测试

    linux 编译安装nginx,配置自启动脚本 下载nginx: wget http://nginx.org/download/nginx-1.8.0.tar.gz下载openssl : wget h ...

  8. Linux一键安装web环境全攻略phpstudy版

    此教程主要是应对阿里云Linux云服务器ecs的web环境安装,理论上不限于阿里云服务器,此教程对所有Linux云服务器都具有参考价值. 写这篇文章的目的:网上有很多关于Linux一键安装web环境全 ...

  9. Linux一键安装LNMP环境

    Linux一键安装LNMP环境 官方地址:https://lnmp.org/. 参考安装步骤:https://lnmp.org/install.html. 一键安装可以选择mysql版本.php版本, ...

随机推荐

  1. Android Studio升级后报 method not found: 'runProguard'的错误

    今天升级了下Android Studio,然后发现更新gradle,然后在sync项目的时候总是报  method not found: 'runProguard'的错误 找了很多发现不对. 最后解决 ...

  2. Go学习笔记一:解析toml配置文件

    本文系作者原创,转载请注明出处https://www.cnblogs.com/sonofelice/p/9085291.html . 一些mysql或者日志路径的信息需要放在配置文件中.那么本博文主要 ...

  3. 具体解释linux下的串口通讯开发

    串行口是计算机一种经常使用的接口,具有连接线少.通讯简单,得到广泛的使用.经常使用的串口是RS-232-C接口(又称EIA RS-232-C)它是在1970年由美国电子工业协会(EIA)联合贝尔系统. ...

  4. cordova 入门

    1. npm install -g cordova On Windows, npm can usually be found at C:\Users\username\AppData\Roaming\ ...

  5. java生成多位随机数方法

    Math.random()方法可以令系统随机选取大于等于0.0且小于1.0的伪随机double值 利用函数Math.random()即可生成若干位随机数 以下是生成十位随机数代码: public st ...

  6. 转: MYSQL获取更新行的主键ID

    在某些情况下我们需要向数据表中更新一条记录的状态,然后再把它取出来,但这时如果你在更新前并没有一个确认惟一记录的主键就没有办法知道哪条记录被更新了. 举例说明下: 有一个发放新手卡的程序,设计数据库时 ...

  7. java 定时器实现

    java工程中,不免遇到需要定时处理任务的需求,有如下两种方法: 1.使用java.util.TimerTask 2.使用Quartz 一.java.util.TimerTask Timer time ...

  8. Python+Appium API

    1.contextscontexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5页面的控 ...

  9. centos7 最小化安装后的配置优化

    echo #CENTOS7echo #1.最小化安装之后需要做的事echo 2.配置echo 2.1 安装网络yum install net-tools -y echo 2.2 更新机器名echo h ...

  10. Hive的metastore

    hive --service metastore 默认端口是9083 <property> <name>hive.metastore.uris</name> < ...