Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

An example of installing redis and mysql in linux

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Install redis and mysql in linux environment

Install redis (version 3.2.10):

Download address: https://redis.io/download, here I download 3.2.10

/ / decompress tar zxvf redis-3.2.10.tar.gz cd redis-3.2.10 make cd src make install / / set the redis service to start cd in the background. Vi redis.conf setting daemonize yes / / installing the redis service mkdir-p means recursively creating / usr/local/redis and / usr/local/redis/bin mkdir-p/usr/local/redis/bin mkdir-p/usr/local/redis/ect cp redis.conf / usr/local/redis/etc/redis.conf / / starting the redis service cd src redis-server / usr/local/redis/etc/redis.conf / / testing using the client to connect to redis-cli

Install mysql (version 5.6.33):

Download address: http://mirrors.sohu.com/mysql/MySQL-5.6/, here I choose mysql-5.6.36-linux-glibc2.5-i686.tar.gz

# decompress tar-zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz# replication decompressed mysql directory cp-r mysql-5.6.33-linux-glibc2.5-x86_64 / usr/local/mysql# add user group groupadd mysql# add user mysql to user group mysqluseradd-g mysql mysqlcd / usr/local/mysql/mkdir. / data/mysqlchown-R mysql:mysql. /. / scripts/mysql_install_db-- user=mysql-- Datadir=/usr/local/mysql/data/mysql-pid-file=/usr/local/mysql/data/mysql.pidcp support-files/mysql.server / etc/init.d/mysqldchmod 755 / etc/init.d/mysqldcp support-files/my-default.cnf / etc/my.cnf # Modification Startup script vi / etc/init.d/mysqld # modifier: basedir=/usr/local/mysql/datadir=/usr/local/mysql/data/mysql # Startup Service service mysqld start # Test connection . / mysql/bin/mysql-uroot # add environment variable Edit / etc/profile so that you can use the mysql command export PATH=$PATH:/usr/local/mysql//binsource / etc/profile # to start mysqlservice mysqld start# and turn off mysqlservice mysqld stop# to view the running status service mysqld status anywhere

Create a mysql remote access account:

Mysql-u root-p # create a remote access account create user rootweb@'%' identified by '123456grant all privileges on *. * to rootweb;flush privileges

The above linux installation of redis and mysql example explanation is the editor to share with you all the content, I hope to give you a reference, but also hope that you support more.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report