CentOS下nginx一键安装shell脚本
2013-03-07 00:00
866 查看
Linux下nginx一键安装shell脚本
先从http://wiki.nginx.org/RedHatNginxInitScript下载init.d.nginx启动文件到当前目录,修改程序安装目录
先从http://wiki.nginx.org/RedHatNginxInitScript下载init.d.nginx启动文件到当前目录,修改程序安装目录
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH # Check if user is root if [ $(id -u) != "0" ]; then echo "Error: You must be root to run this script, please use root to install this shell script" exit 1 fi groupadd www useradd -s /sbin/nologin -g www www wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.gz tar zxvf pcre-8.21.tar.gz cd pcre-8.21/ ./configure make && make install cd ../ ldconfig wget http://nginx.org/download/nginx-1.2.7.tar.gz tar zxvf nginx-1.2.7.tar.gz cd nginx-1.2.7/ ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-ipv6 make && make install cd ../ cp init.d.nginx /etc/init.d/nginx chmod +x /etc/init.d/nginx chkconfig --level 345 nginx on /etc/init.d/nginx start ps aux |grep nginx
相关文章推荐
- Centos上面用Shell脚本一键安装LNMP环境, Nginx+MySQL+PHP+Xcache+Memcached
- 一键安装nginx和fsfs分布式文件存储shell脚本
- centos 一键安装配置nginx脚本
- centos shell编程5 LANMP一键安装脚本 lamp sed lnmp 变量和字符串比较不能用-eq cat > /usr/local/apache2/htdocs/index.php <<EOF重定向 shell的变量和函数命名不能有横杠 平台可以用arch命令,获取是i686还是x86_64 curl 下载 第三十九节课
- Centos5.8上面用Shell脚本一键安装mysql5.5.25源码包
- Centos一键安装openERP7.0的shell脚本
- shell脚本一键安装nginx
- Centos 安装nginx+mysql+php+phpmyadmin 的shell脚本
- CentOS编译安装支持ATS等nginx一键脚本
- Centos 上面用Shell脚本一键安装LAMP环境
- Centos 6.4上面用Shell脚本一键安装mysql 5.6.15
- Centos上面用Shell脚本一键安装LNMP环境
- Centos 上面用Shell脚本一键安装LAMP环境
- Linux自动一键安装jdk,postgresql,nginx脚本(兼容centos+ubuntu)
- shell脚本一键安装LNMP(liunx+nginx+mysql+php)环境
- shell 一键安装 mysql、nginx、lrzsz、jdk1.8、ss 多功能脚本
- Centos 6.4上面用Shell脚本一键安装vsftpd
- Centos6.5上面用Shell脚本一键编译安装mysql5.5.47
- centos7 lnmp 一键安装脚本
- 一个客户端一键安装环境和服务的shell脚本