Giter Site home page Giter Site logo

chall_1a's Introduction

Chall-1a

setup

  • Install
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql
  • Create source folder
cd ~
git clone https://github.com/TrQ-Hoan/Chall_1a.git
sudo chmod 775 ~ ~/Chall_1a
sudo chmod -R 775 ~/Chall_1a/source
sudo chown -R www-data:www-data ~/Chall_1a

mkdir -p ~/Chall_1a/source/archive/assignments ~/Chall_1a/source/archive/challenges ~/Chall_1a/source/archive/submits
sudo chmod -R 777 ~/Chall_1a/source/archive/
# sudo chmod -R 775 ~/Chall_1a/source/archive/
# sudo chown -R www-data:www-data ~/Chall_1a/source/archive/

# link source code directory to apache default directory
sudo ln -s ~/Chall_1a/source /var/www/html/chall01
# create new site file config
sudo vim /etc/apache2/sites-available/chall01.conf
# disable default conf
sudo a2dissite 000-default.conf
# enable new site config
sudo a2ensite chall01.conf
# restart service - update config
systemctl reload apache2

file config /etc/apache2/sites-available/chall01.conf

cp ~/Chall_1a/config/chall01.conf /etc/apache2/sites-available
  • First setup mysql
# edit bind addr for usable on all interface
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
# ```
# bind-address            = 0.0.0.0
# mysqlx-bind-address     = 0.0.0.0
# ```
sudo service mysql restart

sudo mysql -u root

# create database and user
CREATE DATABASE chall01;
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON chall01.* TO 'admin'@'localhost';
CREATE USER 'remote<ip>'@'<ip>' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON chall01.* TO 'remote<ip>'@'<ip>';
FLUSH PRIVILEGES;
EXIT;

# test connect with new user on new database
mysql -u admin -p chall01

chall_1a's People

Contributors

trq-hoan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.