1.安装Redis
1. wget http://download.redis.io/releases/redis-3.2.11.tar.gz
2. gunzip redis-3.2.11.tar.gz
3. tar -xvf redis-3.2.11.tar
4. cd redis-3.2.11
5. make && make install
6. copy redis.conf myredis.conf
7. redis-server myredis.conf &
修改Redis的配置:
1. vim myredis.conf
2. 在esc下输入:/requirepass 回车 修改登录密码 保存退出
3. 通过 ps -aux | grep redis 找到进程将其强杀 kill -9 id
4. redis-server myredis.conf &
5. redis-cli
6. keys *
7. auth 密码
8. 重新进入 vim myredis.conf 通过2的方法找到bind 将 bind 127.0.0.1的后面加上私网ip
9. 在阿里云的安全组件中添加6379端口
10. systemctl start firewalld
firewall-cmd --zone=public --add-port=6379/tcp --permanent
systemctl restart firewalld
11. 重新执行3-4
12. 访问指定的IP:端口号的redis服务器
redis-cli -h ip -p 端口/6379
启动哨兵
redis-server mysentinel.conf –sentinel查看奴隶或者当前状态
info replication停止redis服务
/etc/init.d/redis-server stop
redis中的set相关命令:https://blog.csdn.net/alvintech14/article/details/48087023
list相关命令:https://blog.csdn.net/aitangyong/article/details/51970379
zset相关命令:https://www.cnblogs.com/anny-1980/p/4583806.html
hash相关命令:https://blog.csdn.net/a2534725767/article/details/54017938
string相关命令:https://blog.csdn.net/u010180738/article/details/56064370
2.安装nginx
1. yum search nginx
2. yum install nginx.86_64
3. 在阿里云的安全组件中添加80端口
4. systemctl start firewalld
firewall-cmd --zone=public --add-port=80/tcp --permanent
systemctl restart firewalld
5. nginx
4. ps -aux/-ef | grep nginx
3.安装mariadb数据库
1. yum search mariadb
2. yum install mariadb-server.x86_64 mariadb.x86_64
3. systemctl start mariadb
4. mysql/mysql -u root -p
5. show databases;
6.use mysql;
7. show tables;
8. update user set Host='%' where Host='阿里云给的那一串名字' and User='root';
9. 在阿里云的安全组件中添加3306端口
10. systemctl start firewalld
firewall-cmd --zone=public --add-port=3306/tcp --permanent
systemctl restart firewalld
11. 在本地连接推荐使用Navicat for MySQL 下载地址http://www.navicat.com.cn/
12. 连接的时候需要配置 ssh和基本连接配置
4.安装Python3.6.5
wget https://www.python.org/downloads/release/python-365/
构建 3.6.5.tar.xz Python-3.6.5.tar.xz
xz -d Python-3.6.5.tar.xz
tar -xvf Python-3.6.5.tar
cd Python-3.6.5
./configure --prefix=/usr/local/python3.6 --enable-optimizations
make && make install
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel
sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
cd ~
ln -s /usr/local/python3.6/bin/python3.6 /usr/bin/python3
ln -s /usr/local/python3.6/bin/pip3.6 /usr/bin/pip3
ln -s /usr/local/python3.6/bin/2to3-3.6 /usr/bin/2to3
5.安装PyMySQL
1. cmd
2. pip insatll PyMySQL