In this tutorial we will show you how to install and configuration of Web2py on your CentOS 7 server. For those of you who didn’t know, Web2Py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. With web2py, you can easily develop and manage your applications through the use of an administrative web UI.
This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS or dedicated server. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Web2py on a CentOS 7 server.
Install Web2py on CentOS 7
Step 1. First let’s start by ensuring your system is up-to-date.
Step 2. Installing Web2py.
Create your application directory and clone the repository to our user’s home directory:
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:
You will have to fill out some information for the certificate you are generating. The only part that actually matters in this circumstance is the Common Name field, which should reference your server’s domain name or IP address:
Set proper privileges for the ssl certificate:
We are ready to start our python application server now:
### python /opt/web2pyapp/web2py.py -a 'STRONG-PASSWORD-HERE' -k /opt/web2pyapp_keys/web2pyapp.key
use"kill -SIGTERM 1284"toshutdowntheweb2pyserver
Step 3. Accessing Web2py.
Web2py will be available on HTTP port 8000 by default. Open your favorite browser and navigate to http://yourdomain.com:8000 or http://server-ip:8000. Accept the certificate warning and the Web2Py welcoming page should appear. To login to the administration back-end, click on mysites and enter your password, the one that you used while starting the webserver. If you are using a firewall, please open port 8000 to enable access to the control panel.
Congratulation’s! You have successfully installed Web2py. Thanks for using this tutorial for installing Web2py on your CentOS 7 system. For additional help or useful information, we recommend you to check the official Web2py web site.