Skip to content

Commit f3133cf

Browse files
committed
upadated readme
1 parent a48d8b0 commit f3133cf

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,52 @@
11
# cpu_scheduling_algo_simulator
2+
### Working
3+
This uses ajax for sending the input data to server, and the server processes the input data and passes it to executable as command line arguments, output of c++ program is processed by adding HTML tags to it and this is served back to the user. DOM elements are used to render the content
4+
### Compiling c++ code
5+
- Use makefile to compile c++ file
6+
```
7+
make recomplie
8+
```
9+
- Note: c++ code is already compiled, object files are kept in obj directory and executable is placed in target directory
10+
### How to run the web-app
11+
##### Follow the below steps for apache server
12+
- Create the directory for your_domain and move to the directory
13+
```
14+
sudo mkdir /var/www/your_domain
15+
cd /var/www/your_domain
16+
```
17+
- Clone the repo or download the files inside the current directory,To Clone the repo
18+
```
19+
git clone "https://github.com/yogeeswar2001/cpu_scheduling_algo_simulator.git"
20+
```
21+
- Assign ownership of the directory with the $USER environment variable
22+
```
23+
sudo chown -R $USER:$USER /var/www/your_domain
24+
```
25+
- open a new configuration file in Apache sites-available directory using preferred command-line editor
26+
```
27+
sudo vim /etc/apache2/sites-available/your_domain.conf
28+
```
29+
- Paste in the following configuration
30+
```
31+
<VirtualHost *:80>
32+
ServerName your_domain
33+
ServerAlias www.your_domain
34+
ServerAdmin webmaster@localhost
35+
DocumentRoot /var/www/your_domain
36+
ErrorLog ${APACHE_LOG_DIR}/error.log
37+
CustomLog ${APACHE_LOG_DIR}/access.log combined
38+
</VirtualHost>
39+
```
40+
- Run the following commands to enable the web app
41+
```
42+
sudo a2ensite your_domain
43+
sudo a2dissite 000-default
44+
```
45+
The below command should give "syntax OK" which ensures configuration file doesn’t contain syntax error, if so reload apache
46+
```
47+
sudo apache2ctl configtest
48+
```
49+
```
50+
sudo systemctl reload apache2
51+
```
52+
- Open the browser and type localhost in the url

0 commit comments

Comments
 (0)