https://lnmp.org/install.html
https://github.com/licess/lnmp/releases
1.安装lnmp
wget https://github.com/licess/lnmp/archive/v1.5.tar.gz -cO lnmp1.5.tar.gz && tar zxf lnmp1.5.tar.gz;
chmod -R 777 lnmp-1.5; rm -rf lnmp1.5.tar.gz;
cd lnmp-1.5;
./install.sh lnmp;
./install.sh db # 单独数据库安装
./install.sh nginx # 单独nginx安装
2.fileinfo
cd src
tar -jxvf php-5.3.29.tar.bz2
cd php-5.3.29/ext/fileinfo
/usr/local/php/bin/phpize
./configure -with-php-config=/usr/local/php/bin/php-config
make && make install
vi /usr/local/php/etc/php.ini
extension = "fileinfo.so"
/etc/init.d/php-fpm restart
# pathinfo设置
将include enable-php.conf;替换为include enable-php-pathinfo.conf;
3.imagemagick, redis, opcache, memcached, ionCube
cd /root/lnmp1.5
./addons.sh install imagemagick # 安装 ./addons.sh uninstall imagemagick # 卸载
./addons.sh install redis # 安装 ./addons.sh uninstall redis # 卸载
./addons.sh install opcache # 安装 ./addons.sh uninstall opcache # 卸载
./addons.sh install memcached # 安装 ./addons.sh uninstall memcached # 卸载
./addons.sh install ionCube # 安装 ./addons.sh uninstall ionCube # 卸载
# Pureftpd 卸载
update-rc.d -f proftpd remove 或
chkconfig proftpd off
rm -rf /usr/local/proftpd
rm -f /etc/init.d/proftpd
# 所有卸载
./uninstall.sh
4.Pureftpd
cd /root/lnmp1.5
./pureftpd.sh # 使用lnmp ftp {add|del|edit}进行管理5.防跨目录设置
chattr -i /网站目录/.user.ini # 删除保护 ; +i: 增加保护
6.默认网站配置
LNMP默认网站配置文件:/usr/local/nginx/conf/nginx.conf
LNMPA默认网站配置文件:/usr/local/nginx/conf/nginx.conf 和 /usr/local/apache/conf/extra/httpd-vhosts.conf
LAMP默认网站配置文件:/usr/local/apache/conf/extra/httpd-vhosts.conf
7.网站管理
lnmp vhost add # 增加
lnmp vhost list # 列出网站
lnmp vhost del # 删除
8.数据库管理
添加数据库命令:lnmp database add
编辑数据库用户密码命令:lnmp database edit
删除数据库命令:lnmp database del
列出所有数据库命令:lnmp database list
9.状态管理
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|kill}10.nginx -V # 升级编译前
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --with-stream --with-stream_ssl_module --with-openssl=/root/lnmp1.5/src/openssl-1.0.2o --with-ld-opt='-ljemalloc'
11.Nginx升级,以及安装ngx_lua_waf模块
https://abc.htmltoo.com/thread-44998.htm
12.nginx -V # 升级编译后
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --with-stream --with-stream_ssl_module --with-openssl=/root/lnmp1.5/src/openssl-1.0.2o --with-ld-opt='-ljemalloc' --with-http_geoip_module --add-module=/root/nginx-module/ngx_devel_kit-0.3.1rc1 --add-module=/root/nginx-module/lua-nginx-module-0.10.13 --with-ld-opt='-Wl,-rpath,/usr/local/luajit/lib'
13.php位置:
/usr/bin/php # which php
100.LNMP相关软件目录及文件位置
https://lnmp.org/faq/lnmp-software-list.html