Install LNMP with lnmp.org Support
LNMP的支持网址:lnmp.org
最新版的下载包的地址:
下载版:http://soft.vpser.net/lnmp/lnmp1.1.tar.gz (72KB)
MD5:c1b0cb344478df9baebfb3347a905d38
完整版:http://soft.vpser.net/lnmp/lnmp1.1-full.tar.gz (184MB)
MD5:744d0155b8ebe4ae424578937a0cafac
国内下载地址:https://api.sinas3.com/v1/SAE_lnmp/soft/lnmp1.1-full.tar.gz 下载时wget需要加–no-check-certificate参数
安装过程,官网其实给出了说明:http://lnmp.org/install.html
这里,本文仅用于记录笔者在自己环境中的操作日志。
下载介质:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[root@adamhuanlinux software]# pwd /software [root@adamhuanlinux software]# wget --no-check-certificate https://api.sinas3.com/v1/SAE_lnmp/soft/lnmp1.1-full.tar.gz --2015-04-18 11:52:40-- https://api.sinas3.com/v1/SAE_lnmp/soft/lnmp1.1-full.tar.gz Resolving api.sinas3.com (api.sinas3.com)... 202.108.5.184, 202.108.5.133 Connecting to api.sinas3.com (api.sinas3.com)|202.108.5.184|:443... connected. WARNING: cannot verify api.sinas3.com's certificate, issued by ‘/C=US/O=GeoTrust Inc./CN=GeoTrust SSL CA - G2’: Unable to locally verify the issuer's authority. HTTP request sent, awaiting response... 200 OK Length: 191977822 (183M) [application/x-tar] Saving to: ‘lnmp1.1-full.tar.gz’ 100%[=================================================================================================>] 191,977,822 1.08MB/s in 2m 51s 2015-04-18 11:55:32 (1.07 MB/s) - ‘lnmp1.1-full.tar.gz’ saved [191977822/191977822] [root@adamhuanlinux software]# du -sh lnmp1.1-full.tar.gz 184M lnmp1.1-full.tar.gz [root@adamhuanlinux software]# |
解压:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
[root@adamhuanlinux software]# ll total 801812 drwxrwxrwx 10 root root 4096 Apr 17 16:56 addition_package -rw-r--r-- 1 root root 191977822 Jan 7 21:59 lnmp1.1-full.tar.gz drwxrwxrwx 4 root root 90 Apr 17 14:35 lnmp_source_file -rw-rw-r-- 1 adamhuan adamhuan 0 Apr 18 10:52 me -rwxrwxrwx 1 root root 18783624 Jan 30 08:08 MySQL-client-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 3310160 Jan 30 08:08 MySQL-devel-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 91604964 Jan 30 08:08 MySQL-embedded-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 69766852 Jan 30 08:08 MySQL-server-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 2039512 Jan 30 08:08 MySQL-shared-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 1608676 Jan 30 08:08 MySQL-shared-compat-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 58681712 Jan 30 08:09 MySQL-test-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 11273 Feb 1 19:19 README.txt -rwxrwxrwx 1 root root 130293760 Apr 15 16:56 tor-browser-linux64-4.0.8_zh-CN.tar -rwxrwxrwx 1 root root 245808065 Apr 17 14:01 V74391-01_MySQL DB 5.6.23 for RHEL7.zip -rw-r--r-- 1 root root 7149242 Apr 18 11:10 wordpress-4.1-zh_CN.zip drwxrwxrwx 3 root root 19 Apr 15 15:06 yum [root@adamhuanlinux software]# [root@adamhuanlinux software]# tar -xzf lnmp1.1-full.tar.gz [root@adamhuanlinux software]# ll total 801816 drwxrwxrwx 10 root root 4096 Apr 17 16:56 addition_package drwxr-xr-x 3 root root 4096 Jun 13 2014 lnmp1.1-full -rw-r--r-- 1 root root 191977822 Jan 7 21:59 lnmp1.1-full.tar.gz drwxrwxrwx 4 root root 90 Apr 17 14:35 lnmp_source_file -rw-rw-r-- 1 adamhuan adamhuan 0 Apr 18 10:52 me -rwxrwxrwx 1 root root 18783624 Jan 30 08:08 MySQL-client-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 3310160 Jan 30 08:08 MySQL-devel-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 91604964 Jan 30 08:08 MySQL-embedded-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 69766852 Jan 30 08:08 MySQL-server-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 2039512 Jan 30 08:08 MySQL-shared-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 1608676 Jan 30 08:08 MySQL-shared-compat-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 58681712 Jan 30 08:09 MySQL-test-advanced-5.6.23-1.el7.x86_64.rpm -rwxrwxrwx 1 root root 11273 Feb 1 19:19 README.txt -rwxrwxrwx 1 root root 130293760 Apr 15 16:56 tor-browser-linux64-4.0.8_zh-CN.tar -rwxrwxrwx 1 root root 245808065 Apr 17 14:01 V74391-01_MySQL DB 5.6.23 for RHEL7.zip -rw-r--r-- 1 root root 7149242 Apr 18 11:10 wordpress-4.1-zh_CN.zip drwxrwxrwx 3 root root 19 Apr 15 15:06 yum [root@adamhuanlinux software]# cd lnmp1.1-full/ [root@adamhuanlinux lnmp1.1-full]# ls apache.sh lnmp readme autoconf-2.13.tar.gz lnmpa redis-2.2.5.tgz centos.sh mariadb-5.5.37.tar.gz redis-2.6.17.tar.gz ChangeLog mcrypt-2.6.8.tar.gz redis-2.8.8.tar.gz check502.sh memcache-3.0.6.tgz redis-3.0.0-beta2.tar.gz conf memcache-3.0.8.tgz redis.sh cut_nginx_logs.sh memcached-1.4.15.tar.gz remove_disable_function.sh debian.sh memcached.sh reset_mysql_root_password.sh eaccelerator-0.9.5.3.tar.bz2 mhash-0.9.9.9.tar.gz ubuntu.sh eaccelerator-0.9.6.1.tar.bz2 mod_rpaf-0.6.tar.gz uninstall.sh eaccelerator-eaccelerator-42067ac.tar.gz mysql-5.1.73.tar.gz upgrade_lnmpa_php.sh eaccelerator.sh mysql-5.5.37.tar.gz upgrade_mariadb.sh freetype-2.4.12.tar.gz mysql-openssl.patch upgrade_mysql2mariadb.sh httpd-2.2.27.tar.gz nginx-1.6.0.tar.gz upgrade_mysql.sh ImageMagick-6.8.8-9.tar.gz ocp.php upgrade_nginx.sh imageMagick.sh opcache.sh upgrade_php.sh imagick-3.1.2.tgz pcre-8.12.tar.gz User_manager_for-PureFTPd_v2.1_CN.zip init.d.httpd php-5.2.17-fpm-0.5.14.diff.gz vhost_lnmpa.sh init.d.nginx php5.2.17.sh vhost.sh init.d.php-fpm5.2 php-5.2.17.tar.gz xcache-2.0.1.tar.gz init.d.proftpd php-5.3.28.tar.gz xcache-3.1.0.tar.gz init.d.redis phpMyAdmin-lasest.tar.gz xcache.sh ioncube_loaders_lin_x86-64.tar.gz phpmyadmin-latest.tar.gz ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz ioncube_loaders_lin_x86.tar.gz proftpd-1.3.4b.tar.gz ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz ionCube.sh proftpd.sh zendopcache-7.0.3.tgz libevent-2.0.13-stable.tar.gz proftpd_vhost.sh ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz libiconv-1.14.tar.gz p.tar.gz ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz libmcrypt-2.5.8.tar.gz pure-ftpd-1.0.36.tar.gz libxml2-2.7.8.tar.gz pureftpd.sh [root@adamhuanlinux lnmp1.1-full]# |
安装:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
[root@adamhuanlinux lnmp1.1-full]# ls | grep .sh apache.sh centos.sh check502.sh cut_nginx_logs.sh debian.sh eaccelerator.sh imageMagick.sh ionCube.sh memcached.sh mhash-0.9.9.9.tar.gz opcache.sh php5.2.17.sh proftpd.sh proftpd_vhost.sh pureftpd.sh redis.sh remove_disable_function.sh reset_mysql_root_password.sh ubuntu.sh uninstall.sh upgrade_lnmpa_php.sh upgrade_mariadb.sh upgrade_mysql2mariadb.sh upgrade_mysql.sh upgrade_nginx.sh upgrade_php.sh vhost_lnmpa.sh vhost.sh xcache.sh [root@adamhuanlinux lnmp1.1-full]# sh centos.sh ========================================================================= LNMP V1.1 for CentOS/RadHat Linux Server, Written by Licess ========================================================================= A tool to auto-compile & install Nginx+MySQL+PHP on Linux For more information please visit http://www.lnmp.org/ ========================================================================= =========================== Please input the root password of mysql: (Default password: root):****** =========================== MySQL root password:oracle =========================== =========================== Do you want to install the InnoDB Storage Engine? (Default no,if you want please input: y ,if not please press the enter button):y You will install the InnoDB Storage Engine =========================== Install PHP 5.3.28,Please input y Install PHP 5.2.17,Please input n or press Enter (Please input y or n):y You will install PHP 5.3.28 =========================== Install MySQL 5.5.37,Please input y Install MySQL 5.1.73,Please input n or press Enter Install MariaDB 5.5.37,Please input md (Please input y , n or md):y You will install MySQL 5.5.37 Press any key to start...or Press Ctrl+c to cancel (... ... 过多的输出。) ===========================add nginx and php-fpm on startup completed==================== Starting LNMP... Starting MySQL.. SUCCESS! Starting php-fpm done Starting nginx... nginx (pid 6573 6572) already running. # Generated by iptables-save v1.4.21 on Sat Apr 18 12:20:49 2015 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -p tcp -m tcp --dport 3306 -j DROP -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT COMMIT # Completed on Sat Apr 18 12:20:49 2015 ===================================== Check install =================================== Checking... Nginx: OK MySQL: OK PHP: OK PHP-FPM: OK Install lnmp 1.1 completed! enjoy it. ========================================================================= LNMP V1.1 for CentOS/RadHat Linux Server, Written by Licess ========================================================================= For more information please visit http://www.lnmp.org/ lnmp status manage: /root/lnmp {start|stop|reload|restart|kill|status} default mysql root password:oracle phpinfo : http://yourIP/phpinfo.php phpMyAdmin : http://yourIP/phpmyadmin/ Prober : http://yourIP/p.php Add VirtualHost : /root/vhost.sh The path of some dirs: mysql dir: /usr/local/mysql php dir: /usr/local/php nginx dir: /usr/local/nginx web dir : /home/wwwroot/default ========================================================================= ========================================================================= Manager for LNMP V1.1 , Written by Licess ========================================================================= LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux This script is a tool to Manage status of lnmp For more information please visit http://www.lnmp.org Usage: /root/lnmp {start|stop|reload|restart|kill|status} ========================================================================= nginx (pid 6573 6572) is running... php-fpm is runing! SUCCESS! MySQL running (20223) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:3344 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::1:631 :::* LISTEN [root@adamhuanlinux lnmp1.1-full]# |
使用:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
[root@adamhuanlinux lnmp1.1-full]# /root/lnmp status ========================================================================= Manager for LNMP V1.1 , Written by Licess ========================================================================= LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux This script is a tool to Manage status of lnmp For more information please visit http://www.lnmp.org Usage: /root/lnmp {start|stop|reload|restart|kill|status} ========================================================================= nginx is stopped php-fpm is stop! ERROR! MySQL is not running [root@adamhuanlinux lnmp1.1-full]# /root/lnmp start ========================================================================= Manager for LNMP V1.1 , Written by Licess ========================================================================= LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux This script is a tool to Manage status of lnmp For more information please visit http://www.lnmp.org Usage: /root/lnmp {start|stop|reload|restart|kill|status} ========================================================================= Starting LNMP... Starting nginx... done Starting php-fpm done Starting MySQL.. SUCCESS! [root@adamhuanlinux lnmp1.1-full]# |
运行一个PHP的页面:
——————————————————————————————————————————————
Done。