凌的博客

您现在的位置是: 首页 > 学无止境 > Linux > 

Linux

Lnmp环境配置

2015-03-13 Linux 654
lnmp环境配置,其实很简单。 打开网站 http://lnmp.org/ 先更新下 yum: yum update Centos 下环境安装 1. http://lnmp.org/download.html CentOS系统下执行:wget -c http://s

lnmp环境配置,其实很简单。


打开网站 http://lnmp.org/


先更新下 yum: yum update


Centos 下环境安装

1.

http://lnmp.org/download.html

CentOS系统下执行:wget -c http://soft.vpser.net/lnmp/lnmp1.1-full.tar.gz && tar zxf lnmp1.1-full.tar.gz && cd lnmp1.1-full && ./centos.sh



走到这一步。lnmp环境安装完成。


2.安装 Pureftpd


LNMP一键安装包里的Pureftpd安装脚本是需要MySQL支持的,安装前需要已经安装好LNMP,这个自带一个PHP编写的用户管理界面。

安装

进入lnmp1.0解压后的目录,执行:./pureftpd.sh 会显示如下图:


按提示输入当前MySQL的root密码,输入完成,回车确认,会提示如下信息:

这一步是设置FTP用户管理后台的登陆密码。输入完成回车确认


因为PHP管理后台需要连接数据库,所以会在MySQL上创建一个ftp用户,这里设置的就是这个用户的密码。输入完成,回车确认。

回车 显示 ”Press any key to start install Pure-FTPd...“ 再次回车确认即可开始安装。

如果使用的是MySQL 5.5,如果不能确定版本执行:/usr/local/mysql/bin/mysql -V 就会显示,前面安装完后需要按http://lnmp.org/faq/fix-pureftpd-bug-mysql-55.html 修复才可以。

添加用户

安装完成后,在浏览器输入: http://你的ip/ftp/ 用刚才设置的FTP用户管理后台的登陆密码登陆。登陆后界面如下:


添加一个用户名到你要添加的目录。

uid,gid 都选www。

注:有用户可能找不到选择目录的地方,选目录是点击”主目录“ 最后面有个圆形套着三角形的图标,点一下就会出来。




LNMP状态管理命令:

LNMP 1.2状态管理: lnmp {start|stop|reload|restart|kill|status}
LNMP 1.2各个程序状态管理: lnmp {nginx|mysql|mariadb|php-fpm|pureftpd} {start|stop|reload|restart|kill|status}
LNMP 1.1状态管理: /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}

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

LNMPA状态管理命令:

LNMPA 1.2状态管理: lnmp {start|stop|reload|restart|kill|status}
LNMPA 1.2各个程序状态管理: lnmp {httpd|mysql|mariadb|pureftpd} {start|stop|reload|restart|kill|status}
LNMPA1.1状态管理: /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}

LAMP状态管理命令:

LAMP 1.2状态管理: lnmp {start|stop|reload|restart|kill|status}
LAMP 1.2各个程序状态管理: lnmp {httpd|mysql|mariadb|pureftpd} {start|stop|reload|restart|kill|status}




文章评论

0条评论