编程知识 cdmana.com

Redash Chinese business version centos7 local deployment

Redash Chinese Business Edition ( Visual report cloud platform )Centos7 Local deployment
One . Preparation before installation
            1.  、 Enter the source file directory : cd /etc/yum.repos.d/
            2.  、 Back up the original version yum file : sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
            3.  、 Download Ali yum Source file as default source file :sudowget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
            3.  、 Clean up the original cache : sudo yum clean all
            4.  、 After setting up the cache, it is convenient to search in the cache : sudo yum makecache
            5.  、 Update system package : sudo yum update -y
            6.  、 Install common bags : sudo yum -y install gccgcc-c++ kernel-devel make zlibzlib-devellibffi-developenssl-devel git python3-devel postgresql-devel*
            7.  、 Get into root Add to the current user to modify root Group :
                    su -
                    sudo usermod -g root At present centos user name

Two . install PostgreSql9.6
            1.  、 install postgresql Source :sudo yum install –y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-42.0-11.noarch.rpm
            2.  、 install postgresql6 client : sudo yum install -y postgresql96
            3.  、 install postgresql6 Server side : sudo yum install -y postgresql96-server
            4.  、 initialization : sudo/usr/pgsql-9.6/bin/postgresql96-setup initdb
            5.  、 Set power on self start : sudosystemctl enable postgresql-9.6
            6.  、 start-up postgresql9.6 service : sudosystemctl start postgresql-9.6
            7.  、 Get into postgresql The database is initially configured :
                    sudo -u postgrespsql alter user postgres with password ' Fill in the login password here ';
                    create role At present centos user name ;
                    alter role At present centos user name login;
                    \q

3、 ... and . install Redis
            1.  、 download fedora Of epel Warehouse : sudo yum install epel-release -y
            2.  、 install : sudo yum install redis
            3.  、 start-up redis: sudosystemctl start redis
            4.  、 Set power on self start : sudosystemctl enable redis.service

Four . install Nodejs
            1.  、sudo yum install nodejs –y
            2.  、sudo npm config set registry https://registry.npm.taobao.org
            3.  、sudo npm install n -g
            4.  、sudo n stable

5、 ... and . install python3
            1.  、sudo yum -y groupinstall "Development tools"
            2.  、sudo yum -y install zlib-devel bzip2-devel openssl-develncurses-develsqlite-develreadline-develtk-develgdbm-devel db4-devel libpcap-devel xz-devel python3-devel
            3.  、sudo wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz
            4.  、sudo mkdir /usr/local/python3
            5.  、tar -xvJf  Python-3.6.2.tar.xz
            6.  、cd Python-3.6.2
            7.  、./configure --prefix=/usr/local/python3
            8.  、sudo make &&sudo make install
            9.  、sudo vi /etc/profile Add the following environment variables :
                    PATH=$PATH:/usr/local/python3/bin
            10.  、 Enable environment variables :source /etc/profile
            11. 、echo $PATH Verify that it works

6、 ... and . install Redash Chinese commercial version source code :
            1.  、 Download code :git clone https://github.com/dazdata/redash.git && cd redash
            2.  、 Replace domestic sources : npm config set registry https://registry.npm.taobao.org
            3.  、 View the current source : npm config get registry
            4.  、 Front end installation dependency package : npm install
            5.  、 Front end packaging :npm run build
            6.  、 To configure pip Domestic source :sudo cp pip.conf /etc/pip.conf
            7.  、 install Python A virtual environment :sudo pip3 install virtualenv
            8.  、 establish Python A virtual environment :virtualenv venv
            9.  、 Activate Python A virtual environment :source venv/bin/activate
            10.  、 install Pip package :
                    sudo pip3 install --upgrade pip
                    sudo pip3  install psycopg2-binary
                    sudo pip3 install -r requirements.txt -r requirements_dev.txt -r requirements_bundles.txt
            11.  、 Initialize database table structure :./manage.py database create_tables
            12.  、 Exit virtual environment , installation is complete :deactivate

7、 ... and . Startup and configuration
Open three terminals separately , All implemented cd redash After entering the directory, execute one of the following three commands :
The first terminal :
source venv/bin/activate
./manage.py runserver --debugger --reload

The second terminal :
source venv/bin/activate
./manage.py rq worker

The third terminal :
source venv/bin/activate
./manage.py rq scheduler
Open the browser , Enter the address :http://localhost:5000
Each time the terminal starts running a service . If you need to stop service , Directly by Ctrl+C key , perform deactivate sign out python A virtual environment .
 

版权声明
本文为[Redash Chinese version]所创,转载请带上原文链接,感谢

Scroll to Top