Last update at :2024-07-10,Edit by888u
1. Confirm the python version, obtain the ssbc source code, and turn off the firewall
1. Environment detection (The current version of Ssbc is developed based on django1.8.1, and the required python environment is python2.7.5 or above.)
python -V Python 2.7.5 systemctl stop firewalld.service systemctl disable firewalld.service systemctl stop iptables.service systemctl disable iptables.service2. Obtain the ssbc installation package and unzip it
wget https://github.com/78/ssbc/archive/master.zip yum -y install unzip unzip master.zipAfter unzipping, you will find a folder ssbc-master in the /root directory
2. Install MariaDB and create database
1. Install the database and required environment
yum -y install gcc gcc-c++ python-devel mariadb mariadb-devel mariadb-server cd ssbc-master wget https://bootstrap.pypa.io/get-pip.py python get-pip.py pip install -r requirements.txt2. Create ssbc database
systemctl start mariadb.service mysql -uroot -p Enter password: MariaDB [(none)]> create database ssbc default character set utf8; MariaDB [(none)]> \q3. Install Sphinx
yum -y install unixODBC unixODBC-devel postgresql-libs wget http://sphinxsearch.com/files/sphinx-2.2.9-1.rhel7.x86_64.rpm rpm -ivh sphinx-2.2.9-1.rhel7.x86_64.rpm systemctl restart sphinx.service4. Create folders, create the following folders and grant 755 permissions
mkdir -p /data/bt/index/db /data/bt/index/binlog /tem/downloads chmod 755 -R /data chmod 755 -R /tem5. Generate index
systemctl restart mariadb.service systemctl enable mariadb.service indexer -c sphinx.conf --all searchd --config ./sphinx.confMake sure there are no errors and continue to the next step
6. Web server setup and startup
python manage.py makemigrations python manage.py migrate nohup python manage.py runserver 0.0.0.0:8080 >/dev/zero &Press Enter to continue. You can use other ports here and then use nginx as a reverse proxy on the front end. Enter http://IP:8080 in the browser and the website can be opened
7. Start the crawler (under the workers directory)
cd workers python simdht_worker.py #Run the crawler and wait for 2 minutes for data to appear before CTRL+C stops. nohup python simdht_worker.py > /dev/zero #Let the crawler run in the backgroundPress Enter to continue
python index_worker.py #Input index, wait 10 minutes for data to appear and then CTRL+C to stop nohup python index_worker.py >/dev/zero #Let the index run in the backgroundPress Enter to continue
Add background administrator
cd.. python manage.py createsuperuserEnter administrator user name Enter administrator email Enter administrator password Confirm password and complete Administrator login address: http://IP:8080/admin
Reprinted from: https://www.jiloc.com/42351.html
Recommended site searches: Hong Kong vps hosting, domain name registration platform, US unlimited content hosting, Chinese domain name query, mainland China proxy server IP, cloud server rental platform, virtual space purchase, Hong Kong server rental, domain name query network, expired filing Domain name query,
发表评论