一、Mysql
- 安裝,啟動
wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
rpm -ivh mysql-community-release-el6-5.noarch.rpm
yum install mysql-community-server
service mysqld start
- 改密碼
mysql -u root
use mysql;
update user set password=PASSWORD("這裏輸入root用戶密碼") where User='root';
flush privileges;
- 安全設(shè)置
mysql_secure_installation
- 導(dǎo)出數(shù)據(jù)庫
mysqldump -h 127.0.0.1 -u root -ppassword -P 3306 db > /tmp/bak.sql
- 啟動多個mysqld實例
chown -R mysql:mysql /data/mysql/dev
mysql_install_db --user=mysql --datadir=/data/mysql/dev/
mysqld --defaults-file=/etc/mysql/conf.d/mysql.dev.cnf --user=mysql 2>&1 > /dev/null &
mysqladmin -S /tmp/mysql3888.sock -u root password '新密碼' 設(shè)置root密碼
mysql -h 127.0.0.1 -uroot -p -P 3888 //進(jìn)入
配置文件:
[mysql]
[client]
port = 3888
socket = /tmp/mysql3888.sock
[mysqld]
port = 3888
socket = /tmp/mysql3888.sock
datadir=/data/mysql/dev
二度陆、Redis
- 安裝
官網(wǎng)找stable版本下載
解壓,然后:make
不行一般沒裝gcc,安裝: sudo yum -y install gcc gcc-c++ libstdc++-devel
make MALLOC=libc
三献幔、Go
- 安裝
官網(wǎng)下載操刀,配置:
export GOROOT=/usr/local/go
export GOPATH=/home/user_00/servers/go