zoukankan      html  css  js  c++  java
  • TinyCore Nginx server with php-cgi and vsftpd

    http://blog.matchgenius.com/tinycore-nginx-server-with-php-cgi-and-vsftpd/

    Create fast testing server with TinyCore. I will be using Microcore (8MB) that resides in RAM and 500MB disk drive for persistence. TinyCore Nginx server with php-cgi and vsftpd can be used for for various testing purposes. My setup will be using another box for mysql. Assuming that you have TinyCore Microcore already installed on hard drive lets proceed to installing nginx. My Tiny Core is already installed and I can ssh to it from local machine.

    #1: Install Nginx server

    From terminal access application browser and search for nginx.

    Select nginx.tcz and install. Press 2 then q and i to install. Along with Nginx other dependencies will be downloaded automatically: readline.tcz and pcre.tcz.

    #2: Install php5

    While you still inside application browser press s to search and type php5. Select php5.tcz and install. Installation will take a little longer because there are a lot more dependencies.

    #3: Install vsftpd

    Repeat the same installation process for vsftpd. s type vsftpd. Select vsftpd.tcz or if you want to use ssl version vsftpd-ssl.tcz and install.

    #4: Copy configuration files

    Copy default nginx.conf file to /usr/local/etc and edit it.

    Copy mime.types to /usr/local/etc

    Copy fastcgi_params to /usr/local/etc

    Create symbolic link to libodbc.so.1 (In my case php-cgi fails to load without it)

    Create nginx php-cgi startup script in /usr/local/etc/init.d/nginx . I modified my OpenSSH startup script like that:

    #5: Edit nginx.conf

    Edit /usr/local/etc/nginx.conf and make changes inside http{ server{ location / index index.php

    On the bottom of the same file uncomment whats under pass the PHP scripts to FastCGI

    #6: Edit vsftpd.conf

    Configure /usr/local/etc/vsftpd.conf file. You can tweak it as you like and add more things but I will keep it basic for now. Make sure this settings are present.

    #7: Create test index.php

    Just so you can test your server lets create simple page to test if php is working.

    #8: Tiny Core persistence save

    All configuration will be lost if we reboot the server so lets make it persistent.
    Edit /opt/.filetool.lst

    Edit /opt/bootlocal.sh

    Add auto bakup before server shutdown in /opt/shutdown.sh

    Save your files to backup

    Now you should be ready for reboot and test.

    #9: TinyCore Nginx server test connect from outside

    In my setup before I can connect to my TinyCore I have to add NAT in my firewall. Depending on your situation you may have to do it as well. Make sure nothing is blocking your connection. Because Im connecting through middle server that is OpenBSD im going to add NAT in my pf.conf file. Im going to open port 80 for Nginx and 20 and 21 for vsftpd.

    Web server test:

    FTP server test:

  • 相关阅读:
    DatePicker 日期选择器 split-panels 数组的时候,清空这个费劲啊,最后走的后门
    英语音标总结
    前台发布地址动态获取 本机地址
    SecureCRT windows 登录 linux
    The History of the English language 英语语音的起源
    iview 部分表单验证
    iView 表单验证 如果prop字段和表单里的字段对不上,会触发校验,提示错误信息
    hdu4370 0 or 1
    即时通讯上手必备知识点
    不使用Math.random实现随机数。
  • 原文地址:https://www.cnblogs.com/meetrice/p/3680361.html
Copyright © 2011-2022 走看看