-
Notifications
You must be signed in to change notification settings - Fork 0
Development Onboarding (Linux)
The following instructions outline how to set up your development environment on Linux to run this app or contribute to this repository. The instructions are aimed to be agnostic of the platform this stack is installed on, so a working knowledge of the specifics of your GNU/Linux distribution or other such Unix based operating system is assumed.
- A
text editor
for writing code. - A
web browser
to run the application. A modern web browser like Google Chrome or Mozilla Firefox is recommended. - A
web server
to host the web application. This application won't work on thefile:///
protocol because it uses a database. You can run this application locally usinglocalhost
. -
PHP
>= PHP7 - An
SQL database
, because the database is an SQL database. -
git
, if you want to write code for this application
- Text Editor
- There are many popular text editors, including
vim
,nano
,gedit
,sublime text
etc. You can install any text editor of your choice. - Alternatively you might want to install an IDE to write code easily. You can install any IDE of your choice.
- There are many popular text editors, including
- Web Browser
- If you already have a modern version of Google Chrome, Mozilla Firefox, or any other modern web browser, you can skip this step.
- Otherwise, it is recommended to install any of these browser(s). You might need them for day-to-day browsing activities, so think about it!
- A web server
- For those who are new to SQL-based website development, XAMPP and LAMP stack are two very popular choices. You can install any one of them and get started.
- Git
- If you want to run this application without any version control, you can skip this step.
- If you are writing code for this application, it is recommended to have git installed.
In this example, we will assume that XAMPP was used. Instructions will vary depending on the webserver used. XAMPP is NOT recommended for production use. Please refer to the official documentation of your webserver.
- Download XAMPP. (Official Website)
- Go to the location of the installer. Assuming that it is
Downloads
, type the following command in your terminal:cd Downloads
to go to theDownloads
directory. - Change permissions to the installer using
chmod 755 <Installer>
. Replace<Installer>
with the name of the .run file while typing the command in your terminal. The file will be of typexampp-linux-*-installer.run
. - Run
sudo ./<Installer>
. Replace installer with the name of the file as described above, and type your password when prompted. - Keep all settings unchanged while installing XAMPP. You may, however, uncheck
Learn more about Bitnami for XAMPP
if you want. - Go to
/opt/lampp/
and runchmod 777 -R htdocs
. Then go tohtdocs
folder. - Either download this repository or clone this repository using
$ git clone https://github.com/BurraAbhishek/VirtualElections.git
- To start XAMPP, the command is
sudo /opt/lampp/lampp start
. - Now go to
localhost/<Repository>/src/main.html
. Replace<Repository>
with the name of the repository stored in htdocs. - Go to
localhost/<Repository>/src/admin/getstarted.html
and follow the instructions in that page.
To stop the XAMPP webserver, the command is sudo /opt/lampp/lampp stop
.
Ensure that you execute chmod 777 -R htdocs
before opening localhost in your web browser. Otherwise, any site that you want to test will return a 403 error.