![]() This post will show you how to perform a basic configuration after installation. This brief tutorial shows students and new users how to install and configure the AWStats monitoring server on Ubuntu 16.04 | 17.10 | 18.04 LTS servers. It’s a convenient tool for analyzing your traffic and other data.Ī complete enterprise-grade server and log monitoring software. Inside the server block, add this location block location ~ /.AWStats is a free tool to generate advanced graphics for web, FTP, or mail servers with a logfile analysis for Apache2, IIS, and other servers.ĪWStats uses log file analysis to analyze log files from Apache2, IIS, and other popular web servers today. Install Certbot sudo add-apt-repository ppa:certbot/certbotĮdit NGINX sudo nano /etc/nginx/sites-available/default How To Secure Nginx with Let's Encrypt on Ubuntu 16.04 May need Node.js for Javascript Runtime sudo apt-get install nodejs Stdout_redirect '/home/rails/html/shared/log/puma_access.log', '/home/rails/html/shared/log/puma_error.log', trueīind 'unix:///home/rails/html/shared/tmp/sockets/puma.sock'ĮNV = "/home/rails/html/current/Gemfile" State_path "/home/rails/html/shared/tmp/pids/puma.state" Pidfile "/home/rails/html/shared/tmp/pids/puma.pid" Touch /var/env SECRET_KEY_BASE=mysupersecretkeybaseĭATABASE_PASSWORD=mysupersecretdatabasepasswordĬopy config in puma.rb #!/usr/bin/env puma Touch /var/www/html/shared/config/secrets.yml Touch /var/www/html/shared/config/database.yml Gem 'capistrano3-puma', github: 'seuros/capistrano-puma'ĭir.glob('lib/capistrano/tasks/*.rake').each Ĭreate shared config files mkdir -p /var/www/html/shared/config Libpq has to be installed separately sudo apt-get install libpq-devĪdd gems to deployment group :development do Shall the new role be a superuser? (y/n) yĬreate the database for rails user createdb rails Make it look like this: Enter name of role to add: rails Sudo apt-get install postgresql postgresql-contribĬreate 'rails' postgres user sudo -i -u postgres How To Install and Use PostgreSQL on Ubuntu 16.04 rails) ssh -T -T -T Permissions on html directory sudo chown rails:rails /var/ssh-copy-id Postgres ![]() To do this you must copy your ~/.ssh/id_rsa.pub file to your repo (make sure this is your deployment user, eg. Install Rails and bundler gem install rails -v '5.0.1' -V -no-ri -no-rdocĪuthorize your server to read from your repo, you'll have to add a deployment key to your repo. Install your Ruby VERSION rvm install VERSION -defaultĭeploying a Rails App on Ubuntu 14.04 with Capistrano, Nginx, and Puma Reload your source file source /etc/profile.d/rvm.sh How To Install Ruby on Rails with RVM on Ubuntu 16.04Īdd key gpg -keyserver hkp:// -recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3Ĭompile cat /tmp/rvm.sh | bash -s stable -rails Test curl -X GET ' Status sudo systemctl status rvice Tweak UFW firewall sudo ufw allow from 127.0.0.1 to any port 9200 ![]() Remove DEB file rm elasticsearch-5.4.0.debĮnable sudo systemctl enable rviceĬonfigure sudo nano /etc/elasticsearch/elasticsearch.yml Install sudo dpkg -i elasticsearch-5.4.0.deb Sudo apt-get install oracle-java8-installer Install JAVA sudo add-apt-repository ppa:webupd8team/java How To Install and Configure Elasticsearch on Ubuntu 16.04Įlastic search requires at least 2GB of ram to work for some reason. var/log/nginx/error.log Any Nginx errors will be recorded in this log. var/log/nginx/access.log Every request to your web server is recorded in this log file unless Nginx is configured to do otherwise. Potentially repeatable configuration segments are good candidates for refactoring into snippets. etc/nginx/snippets This directory contains configuration fragments that can be included elsewhere in the Nginx configuration. Typically, these are created by linking to configuration files found in the sites-available directory. etc/nginx/sites-enabled/ The directory where enabled per-site "server blocks" are stored. Typically, all server block configuration is done in this directory, and then enabled by linking to the other directory. Nginx will not use the configuration files found in this directory unless they are linked to the sites-enabled directory (see below). etc/nginx/sites-available/ The directory where per-site "server blocks" can be stored. This can be modified to make changes to the Nginx global configuration. etc/nginx/nf The main Nginx configuration file. All of the Nginx configuration files reside here. etc/nginx - The nginx configuration directory. Install CURL, get your IP, and check that you can request a page in your browser! sudo apt-get install curl ![]() Tweak UFW firewall sudo ufw allow 'OpenSSH' Make it permanent sudo cp /etc/fstab /etc/fstab.bak Įcho '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab Create non-root user 'rails'Īdd to sudoers group usermod -aG sudo railsĬreate a 4gb Swap File sudo fallocate -l 4G /swapfile DigitalOcean Rails/Ubuntu/NGINX (16.04) SetupĬreate a new, start with the smallest droplet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |