zoukankan      html  css  js  c++  java
  • LNMP状态管理命令

    LNMP状态管理命令:

    LNMP状态管理: /root/lnmp {start|stop|reload|restart|kill|status}
    Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
    MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
    Memcached状态管理:/etc/init.d/memcached {start|stop|restart}
    PHP-FPM状态管理:/etc/init.d/php-fpm {start|stop|quit|restart|reload|logrotate}
    PureFTPd状态管理: /etc/init.d/pureftpd {start|stop|restart|kill|status}
    ProFTPd状态管理: /etc/init.d/proftpd {start|stop|restart|reload}

    redis状态管理:/etc/init.d/redis {start|stop|restart}

    如重新启动LNMP,输入命令:/root/lnmp restart 就可以,单独重新启动mysql:/etc/init.d/mysql restart

    LNMPA状态管理命令:

    LNMPA状态管理: /root/lnmpa {start|stop|reload|restart|kill|status}
    Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
    MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
    Memcached状态管理:/etc/init.d/memcached {start|stop|restart}
    PureFTPd状态管理: /etc/init.d/pureftpd {start|stop|restart|kill|status}
    ProFTPd状态管理: /etc/init.d/proftpd {start|stop|restart|reload}
    Apache状态管理:/etc/init.d/httpd {start|stop|restart|graceful|graceful-stop|configtest|status}


     /etc/init.d/network restart 重新启动网卡
     service iptables restart 重新启动防火墙
     vim /etc/sysconfig/iptables
    防火墙设置:

    # Firewall configuration written by system-config-firewall
    # Manual customization of this file is not recommended.
    *filter
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    -A INPUT -p icmp -j ACCEPT
    -A INPUT -i lo -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
    -A INPUT -j REJECT --reject-with icmp-host-prohibited
    -A FORWARD -j REJECT --reject-with icmp-host-prohibited
    COMMIT

    server

    server 
    { 
    listen 80; 
    #listen [::]:80; 
    server_name www.*******.com ; 
    index index.html index.htm index.php default.html default.htm default.php; 
    root /home/wwwroot/www.******.com; 
    
    include other.conf; 
    #error_page 404 /404.html; 
    location ~ [^/].php(/|$) 
    { 
    # comment try_files $uri =404; to enable pathinfo 
    try_files $uri =404; 
    fastcgi_pass unix:/tmp/php-cgi.sock; 
    fastcgi_index index.php; 
    include fastcgi.conf; 
    #include pathinfo.conf; 
    } 
    
    location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ 
    { 
    expires 30d; 
    } 
    
    location ~ .*.(js|css)?$ 
    { 
    expires 12h; 
    } 
    
    access_log /home/wwwlogs/www.******.com.log access; 
    }
    

    php函数禁用:

    改动为:disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname

    找到:;date.timezone =
    改动为:date.timezone = PRC #设置时区
    
    找到:expose_php = On
    改动为:expose_php = Off #禁止显示php版本号的信息
    
    找到:short_open_tag = Off
    改动为:short_open_tag = ON #支持php短标签


  • 相关阅读:
    莫烦python教程学习笔记——线性回归模型的属性
    莫烦python教程学习笔记——使用波士顿数据集、生成用于回归的数据集
    莫烦python教程学习笔记——使用鸢尾花数据集
    莫烦python教程学习笔记——总结篇
    机器学习——可视化绘图matplotlib和seaborn
    Python初探——sklearn库中数据预处理函数fit_transform()和transform()的区别
    机器学习——特征选择
    机器学习——sklearn中的API
    数据预处理——标准化、归一化、正则化
    python初探——pandas使用
  • 原文地址:https://www.cnblogs.com/cxchanpin/p/7011183.html
Copyright © 2011-2022 走看看