1. 程式人生 > >python+redis+kairosdb+cassandra+mysql環境搭建

python+redis+kairosdb+cassandra+mysql環境搭建

環境搭建:
    python安裝:
        
    redis安裝:
        下載、解壓、安裝
            1、wget http://download.redis.io/releases/redis-5.0.0.tar.gz
            2、tar xzf redis-5.0.0.tar.gz
            3、cd redis-5.0.0
            4、make
        預設啟動方式:
            cd src
            ./redis-server
        自定義配置檔案啟動:
            cp redis.conf my_redis.conf
            cd src
            ./redis-server ../my_redis.conf
    
    kairosdb和Cassandra安裝:
        需要java的環境依賴
        tar -zxvf kairosdb-1.2.1-1.tar.gz
        tar -axvf apache-cassandra-3.11.3-bin.tar.gz
        
        啟動Cassandra:
            cd bin
            ./cassandra
        啟動kairosdb:
            cd bin
            ./kairosdb.sh run 前臺啟動執行
            ./kairosdb.sh start 後臺啟動執行
            
    mysql安裝:
        service not found: yum install initscripts
        下載mysql源安裝包:
            wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
            更多源參考:http://dev.mysql.com/downloads/repo/yum/ 
        安裝mysql源:
            yum localinstall mysql57-community-release-el7-8.noarch.rpm
        安裝mysql:
            yum install mysql-community-server
        啟動mysql:(在docker的centos映象中可能會被告知沒有許可權,解決辦法:在docker run 的時候執行/usr/sbin/init)
            systemctl start mysqld
        設定mysql開機啟動:
            systemctl enable mysqld
            systemctl daemon-reload
        檢視root預設的臨時密碼:
            grep 'temporary password' /var/log/mysqld.log
            mysql -uroot -p
            修改密碼:ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'
        新增遠端使用者:
            GRANT ALL PRIVILEGES ON *.* TO 'xy'@'%' IDENTIFIED BY 'xy123456!' WITH GRANT OPTION