Edit ~/.vimrc on remote server
add
set t_u7=:wq
| # By default, only GCC 4.8 is installed with devtools on Centos7. | |
| # So here we will install a recent version of GCC. | |
| # Source: https://linuxize.com/post/how-to-install-gcc-compiler-on-centos-7/ | |
| # 1. Install the SCL. | |
| sudo yum install centos-release-scl | |
| # 2. See what versions are available. | |
| sudo yum search devtoolset |
Edit ~/.vimrc on remote server
add
set t_u7=:wq
Assuming you are root
dnf update -y
vi /etc/yum.repos.d/redis.repoadd content below
| import asyncio | |
| import time | |
| from concurrent.futures import ThreadPoolExecutor | |
| """Wrap ordinary func to async style, and catch all console signals""" | |
| def job(): | |
| ''' Ordinary func to be wrapped ''' | |
| time.sleep(5.0) | |
| return 5 |
| """ | |
| fabfile.py | |
| fabric config file. | |
| It was for simplicity. I personally don't like to extend this script to more complex to config, read, work | |
| usage: | |
| Find `Configurations` part to config by all your needs, maybe code adjustment are also needed. |
| #/lib/systemd/system/myservice.service | |
| # | |
| # systemctl daemon-reload | |
| # systemctl enable myservice.service | |
| # systemctl start myservice.service | |
| # | |
| [Unit] | |
| Description=Service | |
| ConditionPathExists=/path/to/web/folder | |
| After=network.target |