• lnmp脚本


    复制代码
    #!/bin/sh
    
    echo "欢迎使用 lnmp 脚本 (fanshengshuai@gmail.com) ";
    echo "增加资源。。。";
    rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
    
    yum install -y mailx setuptool ntsysv system-config-firewall-tui system-config-network-tui  wget curl screen unzip vim rsync openssh-clients ntpdate
    
    yum install -y nginx memcached nload spawn-fcgi
    yum install -y php-cgi php-mysql php-gd php-mcrypt php-mbstring php-mysql php-odbc php-pdo  php-xml php-zip php-pecl-memcache
    
    yum install -y mysql-server
    
    wget http://bash.cyberciti.biz/dl/419.sh.zip
    unzip 419.sh.zip
    mv 419.sh /etc/init.d/php_cgi
    chmod +x /etc/init.d/php_cgi
    
    /etc/init.d/httpd stop
    /etc/init.d/nginx start
    /etc/init.d/php_cgi start
    /etc/init.d/mysqld start
    
    chkconfig nginx on
    chkconfig php_cgi on
    chkconfig mysqld on
    复制代码
    复制代码
    #!/bin/sh
    
    echo "欢迎使用 lnmp 脚本 (fanshengshuai@gmail.com) ";
    echo "增加资源。。。";
    rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
    
    yum install -y mailx setuptool ntsysv system-config-firewall-tui system-config-network-tui  wget curl screen unzip vim rsync openssh-clients ntpdate
    
    yum install -y nginx memcached nload spawn-fcgi
    yum install -y php-cgi php-mysql php-gd php-mcrypt php-mbstring php-mysql php-odbc php-pdo  php-xml php-zip php-pecl-memcache
    
    yum install -y mysql-server
    
    
    
    /etc/init.d/httpd stop
    /etc/init.d/nginx start
    
    /etc/init.d/mysqld start
    
    chkconfig nginx on
    chkconfig spawn-fcgi on
    chkconfig mysqld on
    复制代码

    vim /etc/sysconfig/spawn-fcgi

    SOCKET=/var/run/php-fcgi.sock
    OPTIONS="-u nginx -g nginx -s $SOCKET -P /var/run/spawn-fcgi.pid -- /usr/bin/php-cgi"

    /etc/init.d/spawn-fcgi restart

    站点配置:

    复制代码
    server {
    listen       80
    location ~ .php$
    {
    root   /www/kuboluo.com;
    index  index.html index.php  index.htm;
    fastcgi_pass   unix:/var/run/php-fcgi.sock;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME /www/kuboluo.com$fastcgi_script_name;
    include        fastcgi_params;
    }
    }
    复制代码
  • 相关阅读:
    element-ui的table表格控件表头与内容列不对齐问题
    uniapp 调用手机相机拍照实现图片上传
    配置Git忽略文件
    【转载】Java的几种常见排序算法
    httpclient封装
    idea 启动springboot项目时报错:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource
    shell脚本监控网站,异常则进行邮件报警
    nginx配置图片跨域访问
    Nginx基于多端口、多域名配置
    docker部署Nginx项目dockerfile
  • 原文地址:https://www.cnblogs.com/hllnj2008/p/4019043.html
Copyright © 2020-2023  润新知