這個是centos7內建的資料庫MariaDB,以前是mysql,到7以後,改為MariaDB。。。
1. MariaDB安裝,沒有往深處配置。。。懶得動了。。參考:http://blog.csdn.net/default7/article/details/41973887
a:yum install mariadb mariadb-server
b:systemctl start mariadb ==> 啟動mariadb
c:systemctl enable mariadb ==> 開機自啟動
d:mysql_secure_installation ==> 設定 root密碼等相關
e:mysql -uroot -p123456 -h127.0.0.1 ==> 測試登入!
2. jdk安裝。
參考地址:1. http://www.jb51.net/os/RedHat/73016.html
2. http://blog.csdn.net/czmchen/article/details/41047187
換湯不換藥,三部曲;1. 下載,2.看裝過沒,3. 安裝&配置環境
rpm安裝法,不會的去百度。。。很簡單的。。上面參考的教程也有。
3. redis
安裝必要包:
yum install gcc
下載:ps:如果沒有wget命令,執行:yum install wget;(這個方案是通用的,如果有命令沒有安裝,一般這種辦法都可以安裝出來的。。我挺喜歡這個功能的。。)
wget http://download.redis.io/releases/redis-3.2.3.tar.gz
解壓:
tar zxvf redis-3.2.3.tar.gz
進入目錄,分配記憶體:
cd redis-3.2.3 # 進入目錄
make MALLOC=libc # 不執行,會報錯。
配置系統啟動:./utils/install_server.sh
[root@localhost redis-3.2.3]# ./utils/install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server
Please select the redis port for this instance: [6379] 6379
Please select the redis config file name [/etc/redis/6379.conf] /etc/redis/6379.conf
Please select the redis log file name [/var/log/redis_6379.log] /logs/redis/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379]
Selected default - /var/lib/redis/6379
Please select the redis executable path [/usr/local/bin/redis-server] /usr/local/bin/redis-server
Selected config:
Port : 6379
Config file : /etc/redis/6379.conf
Log file : /logs/redis/redis_6379.log
Data dir : /var/lib/redis/6379
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!
Redis服務查看、開啟、關閉
1、通過ps -ef|grep redis命令查看Redis進程;
2、開啟Redis服務作業通過/etc/init.d/redis_6379 start命令,也可通過(service redis_6379 start);
3、關閉Redis服務作業通過/etc/init.d/redis_6379 stop命令,也可通過(service redis_6379 stop);