1、买好阿里云后先挂载数据盘
参考地址:
https://help.aliyun.com/knowledge_detail/5974154.html
2、更新
yum -y update
3、安装软件
CenOS7.0 不要直接安装mysql,要不然安装的是mariadb,运行下列命令
yum -y install nginx php php-fpm php-pdo php-mysql php-mbstring php-gd php-xml php-xmlrpc php-pecl-memcache
4、安装Mysql,手动安装,参考
https://help.aliyun.com/knowledge_detail/7595123.html
5、修改nginx虚拟主机配置
vi /etc/nginx/conf.d/virtual.conf
6、修改mysql配置
vi /etc/my.cnf
[mysqld]
#datadir=/var/lib/mysql
datadir=/data/mysql
character_set_server = utf8
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# tmp dir settings
tmpdir = /data/tmp/mysql/
slave-load-tmpdir = /data/tmp/mysql/
# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
7、安装PureFtpd
yum -y install pure-ftpd
8、配置Pureftpd连接mysql
vi /etc/pure-ftpd/pure-ftpd.conf
取消下面这个的注释
MySQLConfigFile /etc/pure-ftpd/pureftpd-mysql.conf
注释掉下面这行
PAMAuthentication yes
将MinUID修改为400,因为nginx的是498,要不然直接用498没法登陆
MinUID 400
9、修改pureftpd-mysql.conf的mysql相关配置
设置对应的用户名密码,就可以用mysql来管理ftp帐号了。
网友评论