Rat's

Simple personal homepage/navigation program imitated zhuye.kim developed by Django framework, with background
Note: The blogger took a fancy to Zhuye.kim's navigation program a long time ago, which is simple and beautiful. Even if the source code is unavailable, it can't be found on the Internet. Now, Loc boss W
Scan the QR code on the right to read the full text
seventeen
2018/07

Simple personal homepage/navigation program imitated zhuye.kim developed by Django framework, with background

explain: The blogger took a fancy to it a long time ago zhuye.kim The navigation program is simple and beautiful, but the source code can not be found on the Internet. Now Loc mogul wenguonideshou Used Django The framework has been developed to imitate zhuye.kim Here's a simple navigation program for you to share, and the Big Brother is still adding more functions, so you can follow it at any time if you are interested.

screenshot

 Please enter a picture description
 Please enter a picture description

install

Github address: https://github.com/wenguonideshou/zhuye_kim

This article only writes CentOS Installation tutorial for.

1. Installing Python 3 and Prerequisites

 #Installing Python 3.6 wget  https://www.moerats.com/usr/shell/Python3/CentOS_Python3.6.sh  && sh CentOS_Python3.6.sh #Install prerequisites, libraries pip3 install django pymysql pillow

2. Install MySQL

 #Install MySQL 5.6 wget  http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm yum install mysql-server -y #Set permissions chown -R root:root /var/lib/mysql service mysqld restart #Reset the MySQL password. 123456 is the password, which can be modified by yourself MySQL - u root//Enter the MySQL console directly mysql > use mysql; mysql > update user set password=password('123456') where user='root'; mysql > exit; #Restart the database service mysqld restart #Create a zhuye database with mypassword as the database password mysql -uroot -pmypassword mysql > create database zhuye; mysql > exit;

3. Download source code and modify database information

 yum install git screen -y git clone  https://github.com/wenguonideshou/zhuye_kim cd zhuye_kim/zhuye_kim

Edit database link information

 vi settings.py

modify DATABASES For the corresponding database information, you only need to modify the database password.

If not vi Editor. You can also use sed Command, here also describes the method.

 #View the settings.py file cat /root/zhuye_kim/zhuye_kim/settings.py #Find the database password, that is, the value corresponding to PASSWORD 'PASSWORD': '6f81f112dbe1efc4' #Use the sed command to change the password. Remember to change the previous value. Passwd is the database password sed -i 's/6f81f112dbe1efc4/passwd/g' '/root/zhuye_kim/zhuye_kim/settings.py'

4. Install source code

 cd /root/zhuye_kim python3 manage.py makemigrations python3 manage.py migrate

5. Import Database
Not here Mysqldump There seems to be a problem after importing.

 #Enter the MySQL database console. Mypassword is the database password mysql -u root -pmypassword #Using the ABCD database mysql > use zhuye #Use the source command to import the database file, followed by the file path mysql > source /root/zhuye_kim/zhuye.sql #Exit mysql > exit;

6. Run Web Site

 screen -S zhuye Python3 manage.py runserver 0.0.0.0:80 # The last port is port 80, which can also be modified to other ports

It can be used at this time http://ip Entered, background address http://ip/admin , administrator user name admin password 12345678@ If other ports are used, such as eight thousand and eighty , is http://ip:8080 get into.

 #If you can't open the page using other ports, you need to open the firewall port, such as port 8080 #Centos 6 system iptables -I INPUT -p tcp --dport 8080 -j ACCEPT service iptables save service iptables restart #CentOS 7 system firewall-cmd --zone=public --add-port=8080/tcp --permanent  firewall-cmd --reload

The "big category" in the background refers to the common/male/female line, and the "small category" refers to the popular/information/video/email line.

Domain Name Settings

If using IP If you log in, you can skip this step. If you log in with the domain name, you can continue to watch it. It is still the simplest to use here Caddy Reverse generation, automatic issuance is supported SSL Certificates. Use self issued SSL Please resolve the domain name to VPS The server.

1. Installing caddy
Use the command:

 wget -N --no-check-certificate  https://raw.githubusercontent.com/iiiiiii1/doubi/master/caddy_install.sh  && chmod +x caddy_install.sh && bash caddy_install.sh #Alternate address wget -N --no-check-certificate  https://www.moerats.com/usr/shell/Caddy/caddy_install.sh  && chmod +x caddy_install.sh && bash caddy_install.sh

2. Configure caddy

 #The following contents are a whole. After the domain name, IP, port and mailbox are modified, they are copied to SSH to run! echo "www.moerats.com { gzip tls  admin@moerats.com proxy / 1.1.1.1:8080 }" > /usr/local/caddy/Caddyfile

tls The parameters will automatically sign for you ssl Certificate, if you want to use your own ssl , change to tls /root/xx.crt /root/xx.key OK. Followed by ssl Certificate path.

start-up Caddy

 /etc/init.d/caddy start

Finally, it can be opened https://xx.com Visited.

Vultr New user registration send one hundred USD/ sixteen Each computer room is charged by hour, and Alipay is supported【 Click to view 】。
Last modification: July 17, 2018 06:37 PM

Comment

17 comments

  1. dz

    1.sh: line 5: $'357273277echo': command not found

    Please tell me how to solve this problem.

    1. Rat's
      @dz

      Which step?

      1. dz
        @Rat's

        2. Configure caddy

        Copy and modify the 5 lines of configuration, and report the error after running SH.
        Baidu has been a long time, no answer, thank you!

        1. Rat's
          @dz

          Show me your command, just code the domain name

  2. anaerobic

    Boss, python3 manage.py makemigrations has a hole, prompting django2.2/mysql Properly Configured: mysqlclient 1.3.13 or newer is required; You have 0.9.3. After solving the problem, run python3 manage.py makemigrations again and prompt No changes detected

    1. Rat's
      @Anaerobic

      I haven't touched this for a long time. I don't know what's going on.

  3. CPUFAN

    Big Boss, please study this. Hakka customized homepage, OPAGE https://github.com/viosey/opage

    1. Rat's
      @CPUFAN

      I saw it. It's very simple. It's just that the weather interface of the author is faulty, and the weather can't be displayed.

  4. sea level

    Received

  5. WATGP

    Where does the blogger use the server~

    1. Rat's
      @WATGP

      Spartanhost, introduction address: https://www.moerats.com/archives/613/

      1. WATGP
        @Rat's

        I also use this one. But the speed is not as fast as that of the blogger~

        1. Rat's
          @WATGP

          What website template are you? It is normal for WordPress to slow down.

          1. WATGP
            @Rat's

            The three plug-ins WP+DUX delete a lot of useless code, which is still very slow and does not use CDN.

            1. Rat's
              @WATGP

              Change the typecho. A bunch of plug-ins are not stuck.

              1. WATGP
                @Rat's

                It feels that ty is a castrated version of wp The backstage is extremely simple

                1. Rat's
                  @WATGP

                  Although it is simple, its functions are complete.