How to Install and Configure web2py in Fedora 25/CentOS

Web2Py is a simple yet powerful Python framework for developing web applications. In this tutorial we will show how to install the Web2Py framework on a Fedora 25/CentOS 7.

First things first. Once you have the VPS make sure that you update it so that you can have the latest software.

# yum update

w2py

Create your application directory. In this example, we will be working in the /opt directory but you can use a directory of your choice.

# mkdir /opt/web2pyapp
# git clone --recursive https://github.com/web2py/web2py.git /opt/web2pyapp

We will need an SSL key and a certificate so that we can later access the administrative interface. For safety reasons, it is best if we put them in a different directory.

 # mkdir /opt/web2pyapp_keys # cd /opt/web2pyapp_keys # openssl req -x509 -new -newkey rsa:4096 -days 3652 -nodes -keyout web2pyapp.key -out web2pyapp.crt Generating a 4096 bit RSA private key ......++ .......................................................++ writing new private key to 'web2pyapp.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:US State or Province Name (full name) []:Missouri Locality Name (eg, city) [Default City]:St. Louis Organization Name (eg, company) [Default Company Ltd]:Web2Py Organizational Unit Name (eg, section) []:Web2Py Common Name (eg, your name or your server's hostname) []:web2py.myvps.com Email Address []: ### Set proper privileges for the ssl certificate cd /opt # chmod 700 web2pyapp_keys # chmod -R 600 web2pyapp_keys var WPGroHo = {"my_hash":""};