ArticleContent 1. Installation Method 2. Pay special attention to the file directory 3. Upgrade nginx and perform nginx module development |
It took four days to install the lnmp development environment. As a result, the MySQL module has not been successfully installed. By accident, I found that the one-click installation of lnmp was completed at http://lnmp.org/. after practice, this article is really about ten minutes. It can't help but make people sigh. Now, we will publish this article for your convenience.
1. Installation Method
Installation Method: follow the instructions in http://lnmp.org/install.htmlto install the tool in centos 6.2. All labs are successful.
2. Pay special attention to the file directory:
Nginx:/usr/local/nginx
MySQL:/usr/local/MySQL
PHP:/usr/local/PHP
Website directory:/home/wwwroot/
Nginx log directory:/home/wwwlogs/
/Root/vhost. sh:/usr/local/nginx/CONF/vhost/
3. Upgrade nginx and develop the nginx Module
In the one-click installation process and centos.sh, you can see that the lnmpinstallation files are all downloaded. tar.gz files, which are compiled and installed by downloading the source code.
Can I download nginx of a later version for compilation, installation, and module development?
I'm glad to tell you that this is okay.
Check centos. Sh to see the nginx configure options as follows:
/Configure -- user = WWW -- group = WWW -- prefix =/usr/local.pdf -- with-http_stub_status_module -- with-http_ssl_module -- with-http_gzip_static_module -- with-ipv6
How to upgrade the version? The method is as follows:
Wget http://nginx.org/download/nginx-1.2.3.tar.gztar zxvf nginx-1.2.3.tar.gzcd nginx-1.2.3./Configure -- user = WWW -- group = WWW -- prefix =/usr/local/nginx -- with-http_stub_status_module -- with-http_ssl_module -- with-http_gzip_static_module -- with-ipv6Make & make install |
How to add modules? Add -- add-module = module_path to configure.