Skip to content

intentlab-iitk/intentlab-iitk.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Websites Repo

This repo contains code base for intentlab's website.

Ngnix Servre setup

  • Install: Update system and install nginx using below command

    sudo apt update && sudo apt install nginx -y
  • Start nginx: Enable and start nginx using below command

    sudo systemctl enable nginx && sudo systemctl start nginx
  • Allow in firewall: If you're using UFW, allow Nginx traffic

    sudo ufw allow 'Nginx Full'
  • Set nginx config:

    • Copy pre-configured conf file and update php-fpm version in LabSite.conf

      sudo cp configs/LabSite.conf /etc/nginx/sites-available
      sudo chmod +x configs/update-phpv.sh && sudo configs/update-phpv.sh
    • Remove the default soft link and create new soft link

      sudo rm /etc/nginx/sites-enabled/default
      sudo ln -s /etc/nginx/sites-available/LabSite.conf /etc/nginx/sites-enabled
  • Restart nginx: Check the conf and restart the ngnix

    sudo nginx -t && sudo systemctl restart nginx

MySQL Server setup

  • Step 1: Update and install

    sudo apt update && sudo apt install mysql-server -y
  • Step 2: Enable and start MySQL Service

    sudo systemctl enable mysql && sudo systemctl start mysql
  • Step 3: Secure MySQL Installation

    • Follow the prompts to configure security settings, such as setting a root password, removing anonymous users, and disallowing remote root login.

      sudo mysql_secure_installation
    • Sometime mysql_secure_installation skips setup of root user password. Then use below

      sudo mysql
      ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'mysql_root_password';
      FLUSH PRIVILEGES;
      QUIT;
  • Step 4: Log in to MySQL

    mysql -u root -p
  • Step 5: Create a Remote Login admin user (SQL Instructions)

    CREATE USER 'admin'@'%' IDENTIFIED BY 'admin_password';
    GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    QUIT;

    Replace admin with the desired username and admin_password with the desired password.

  • Step 6: Configure MySQL to Allow Remote Connections

    sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

    Find the line that begins with bind-address and change the value from 127.0.0.1 to 0.0.0.0.

  • Step 7: Restart MySQL Service

    sudo systemctl restart mysql
  • Step 8:: Setup database

    mysql -u root -p -e "CREATE DATABASE intentdb;"
    mysql -u root -p intentdb < configs/intentdb.sql

    The default password is set as 1234.

Instructions for encrypted pdf

To generate a PDF from a LaTeX file in Linux, you can use the pdflatex command. Here's how:

  1. Install TeX Distribution (if not already installed):

    • For Ubuntu/Debian:

      sudo apt update
      sudo apt install texlive-latex-base texlive-latex-extra texlive-fonts-recommended pdftk
  2. Compile the LaTeX File:

    • Navigate to the creds and compile pdf

      cd creds
      pdflatex passwds.creds.tex
    • Inside creds itself run encryptpdf script and exit back

      sudo chmod +x encryptpdf.sh && sudo ./encryptpdf.sh
      cd ..

Releases

No releases published

Packages

No packages published