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

Example Analysis of Local deployment of Centos7 for Redash Chinese Business Edition

2025-04-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article will explain in detail the sample analysis of the local deployment of Centos7 for the Chinese business version of Redash. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

one。 Pre-installation preparation

1. Enter the source file directory: cd / etc/yum.repos.d/

2. Back up the original 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 the default source file: sudowget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3. Clean the original cache: sudo yum clean all

4. After the cache is established, it is convenient to search in the cache: sudo yum makecache

5. Update system package: sudo yum update-y

6. Install the common package: sudo yum-y install gccgcc-c++ kernel-devel make zlibzlib-devellibffi-developenssl-devel git python3-devel postgresql-devel*

7. Go to root user and modify the current user to add to the root group:

Su-

Sudo usermod-g root current 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: sudo yum install-y postgresql96-server

4. Initialize: sudo/usr/pgsql-9.6/bin/postgresql96-setup initdb

5. Set self-boot: sudosystemctl enable postgresql-9.6

6. Start the postgresql9.6 service: sudosystemctl start postgresql-9.6

7. Enter the postgresql database for preliminary configuration:

Sudo-u postgrespsql alter user postgres with password 'fill in the login password here'

Create role current centos user name

Alter role current centos username login

\ Q

three。 Install Redis

1. Download fedora's epel repository: sudo yum install epel-release-y

2. Install: sudo yum install redis

3. Start redis: sudosystemctl start redis

4. Set self-boot: 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

five。 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. Add the following environment variables to sudo vi / etc/profile:

PATH=$PATH:/usr/local/python3/bin

10. Make the environment variable effective: source / etc/profile

11. Verify whether echo $PATH is valid

six。 Install the Chinese commercial version of Redash source code:

1. Download code: git clone https://github.com/dazdata/redash.git & & cd redash

2. Change the domestic source: 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. Configure pip domestic source: sudo cp pip.conf / etc/pip.conf

7. Install Python virtual environment: sudo pip3 install virtualenv

8. Create a Python virtual environment: virtualenv venv

9. Activate Python virtual environment: source venv/bin/activate

10. Install the 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 the database table structure:. / manage.py database create_tables

12. Exit the virtual environment, and the installation is complete: deactivate

seven。 Startup and configuration

Open three terminals respectively, execute cd redash to enter the directory and execute one of the following three commands respectively:

First terminal:

Source venv/bin/activate

. / manage.py runserver-debugger-reload

Second terminal:

Source venv/bin/activate

. / manage.py rq worker

The third terminal:

Source venv/bin/activate

. / manage.py rq scheduler

Open a browser and enter the address: http://localhost:5000

Each time the terminal starts and runs a service. If you need to stop the service, press Ctrl+ C directly and execute deactivate to exit the python virtual environment.

This is the end of this article on "sample analysis of local deployment of Redash Chinese business version of Centos7". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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

Internet Technology

Wechat

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

12
Report