云豹短视频系统搭建部署文档
一 、搭建前期准备
==注:操作系统centos7.0以上 64位==
1.生成软件包信息缓存
yum makecache
2.安装更新
yum update -y
3.安装必要软件
yum install -y zip unzip wget curl git vim zsh nano screen
4.安装oh my zsh(有助于补全和选择目录)
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
二、搭建LNMP环境
wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz
tar xzvf oneinstack-full.tar.gz
cd oneinstack
./install.sh #注:请勿sh install.sh或者bash install.sh这样执行
安装选项选择
1.设置SSH端口(默认22),回车即可
Do you want to enable iptables? [y/n]: n
2.然后选择是否安装 web,输入y
3.输入 1 安装 nginx
4.输入 3 不安装Apache
5.输入 5 不安装tomcat
6.然后选择是否安装数据库database,输入y
7.输入 2 安装mysql-5.7
8.然后输入数据库root密码123456(注:妥善保管)
9.然后输入1 选择从二进制安装
10.然后输入 y 安装PHP
11.输入 5 安装PHP7.0
12.输入 y 安装php 缓存插件
Do you want to instal opcode cache of the PHP? [y/n]:y
13.输入 1 安装Zend OPcache
14.输入 n 不安装ionCube
15. 输入 n 不安装 ImageMagick
16.输入 n 不安装Pure-FTPd
17.输入 y 安装phpMyAdmin
18. 输入 y 安装redis
19.输入 n 不安装memcached
20.输入 n 不安装HHVM
三、redis配置
配置redis密码
执行命令修改/usr/local/redis/etc/redis.conf文件,(也可以手动修改redis.conf文件)
echo requirepass redis的密码 >> /usr/local/redis/etc/redis.conf
重启redis
systemctl restart redis-server
注:service redis-server restart 在centos7.x中不支持
四、创建数据库
==使用oneinstack一键搭建中的phpMyAdmin插件==
vim /etc/my.cnf
在my.cnf 里面设置
添加语句
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
访问
http://你的ip地址/phpMyAdmin/
创建数据库用户名和数据库名,密码
