-
Notifications
You must be signed in to change notification settings - Fork 28
Installation for macOS
-
Open the terminal. (shift+space Terminal 😊)
-
Install homebrew with the console ( is necessary to have xcode installed. xcode-select --install).
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install GIT.
brew install git
- Install postgres database engine
brew install postgresql
brew services start postgresql (start service)
- Install python 2.6 (if you already have it, skip this line)
- Install Virtualenv
pip install virtualenv
- Clone ManaTI repository
git clone https://github.com/stratosphereips/Manati.git
cd Manati
- Create python virtual environment
virtualenv vmanati (create environment)
source vmanati/bin/activate (activate the environment)
- Install python libraries necessaries for ManaTI
pip install -r requirements.txt
- Create postgres user and database
psql -U postgres -W -h localhost
(insert password for user postgres, usually the default password is also postgres)
create user manati_db_user with password 'password';
create database manati_db;
grant all privileges on database manati_db to manati_db_user;
alter role manati_db_user createrole createdb;
CTRL-D (to output the postgres db shell)
- Test if everything is ok
psql -h localhost -d manati_db -U manati_db_user
(and put the manati_db_user password)
- Install redis-server
brew install redis
OPTIONAL
In the file .env, are the variables of the systems. Configure if you want.
SECRET_KEY, is used by django for making hashes
DEBUG, by default is true
DB_NAME=manati_db, the name of the database for manati
DB_USER=manati_db_user, the exclusive user created for manati
DB_PASSWORD=password, password of the manati_db_user
DB_HOST=localhost,
DATABASE_URL=postgres://manati_db_user:password@localhost:5432/manati_db, is the link to the database, copy the data defined before if you want to use the database in the same server, otherwise put the url of the postgres db.
REDISTOGO_URL=redis://localhost:6379/0, host name and port used by redis
REDIS_PASSWORD=, redis can be configured to use password. read the README.md for more information
- Execute migrations files.
python ./manage.py makemigrations guardian (used for authorization)
python ./manage.py migrate
python ./manage.py check_external_modules
- Execute redis_worker.sh file (in the background or another console).
./redis_worker.sh
- Create super user for login in the web system,
python manage.py createsuperuser (remover the user name and the password)
- We will execute the django application using the server by default, it is ok for development. In the Readme.md you can find more information of how to use the web application using a server for production.
python ./manage.py runserver