{"id":16469762,"url":"https://github.com/irsol/linux-server-configuration","last_synced_at":"2026-06-13T15:35:36.383Z","repository":{"id":196304576,"uuid":"119088255","full_name":"irsol/linux-server-configuration","owner":"irsol","description":"Udacity Fullstack Nanodegree Project: Linux server configuration","archived":false,"fork":false,"pushed_at":"2018-01-26T19:05:21.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T05:12:54.046Z","etag":null,"topics":["linux","linux-server","linux-server-configuration","udacity-fullstack-nanodegree","udacity-nanodegree"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/irsol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-26T18:30:46.000Z","updated_at":"2020-04-08T08:13:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6bfa98b-4993-4ff0-b27c-a5cb16b3ea1a","html_url":"https://github.com/irsol/linux-server-configuration","commit_stats":null,"previous_names":["irsol/linux-server-configuration"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/irsol/linux-server-configuration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irsol%2Flinux-server-configuration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irsol%2Flinux-server-configuration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irsol%2Flinux-server-configuration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irsol%2Flinux-server-configuration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irsol","download_url":"https://codeload.github.com/irsol/linux-server-configuration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irsol%2Flinux-server-configuration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34290346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","linux-server","linux-server-configuration","udacity-fullstack-nanodegree","udacity-nanodegree"],"created_at":"2024-10-11T12:08:48.825Z","updated_at":"2026-06-13T15:35:36.356Z","avatar_url":"https://github.com/irsol.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux server configuration\n\nFinal project of Udacity Full Stack Web Developer Nanodegree\n\nThe goal of the project is to deploy [Item Catalog Application](https://github.com/irsol/item-catalog-app) as Amazon Lightsail.\n\nThe server is available by this url: http://13.59.27.59/\n\n## Steps\n\n1. Create an account on AWS and launch an instance with Ubuntu operational system\n\n2. Change ssh port from 22 to 2200\n\n\t1. Connect to the server\n\t\t```\n\t\tchmod 400 LightsailDefaultPrivateKey-us-east-2.pem\n\t\tssh ubuntu@13.59.27.59 -i LightsailDefaultPrivateKey-us-east-2.pem\n\t\t```\n\n\t2. Edit file _/etc/ssh/sshd_config_\n\t\t```\n\t\tPort 2200\n\t\tPermitRootLogin no\n\t\tPasswordAuthentication yes\n\t\t```\n\n\t3. Restart ssh server: \n\t\t```\n\t\tservice sshd restart\n\t\t```\n\n\t4. Change ports in [firewall](https://lightsail.aws.amazon.com/ls/webapp/us-east-2/instances/item-catalog/networking)\n\n3. Create a user **grader**\n\n\t1. Create a new account with root permissions\n\t\t```\n\t\tsudo su -\n\t\tadduser grader\n\t\tusermod -aG sudo grader\n\n\t\tmkdir /home/grader/.ssh\n\t\tchown grader:grader /home/grader/.ssh\n\t\tchmod 700 /home/grader/.ssh\n\t\tcp /root/.ssh/authorized_keys /home/grader/.ssh/\n\t\tchown grader:grader /home/grader/.ssh/authorized_keys\n\t\tchmod 644 /home/grader/.ssh/authorized_keys\n\t\t```\n\n\t2. Create ssh keys and copy to the user folder\n\t\t```\n\t\tssh-keygen -f ssh_keys/grader\n\t\tcat ssh_keys/grader.pub | ssh grader@13.59.27.59 -p 2200 \"cat \u003e\u003e  ~/.ssh/authorized_keys\"\n\t\t```\n\n\t3. Disable login with password in file /etc/ssh/sshd_config\n\t\t```\n\t\tPasswordAuthentication no\n\t\t```\n\n4. Configure Linux\n\n\t1. Install latest software\n\t\t```\n\t\tssh grader@13.59.27.59 -p 2200 -i ssh_keys/grader\n\t\tsudo apt-get -qy upgrade\n\t\tsudo apt-get -qy update\n\t\t```\n\n\t2. Set timezone to UTC and locale\n\t\t```\n\t\tsudo timedatectl set-timezone UTC\n\n\t\techo 'LC_ALL=\"en_US.UTF-8\"' \u003e\u003e /etc/environment\n\t\tsource /etc/environment\n\t\texport LC_ALL\n\t\t```\n\n\t3. Install apache2, postgres and python\n\t\t```\n\t\tsudo apt-get install apache2\n\t\tsudo apt-get install libapache2-mod-wsgi-py3\n\t\tsudo apt-get install python3-pip\n\n\t\tsudo pip3 install --upgrade pip\n\t\tsudo pip3 install flask\n\t\tsudo pip3 install sqlachemy\n\t\tsudo pip3 install oauth2client\n\t\tsudo pip3 install psycopg2\n\n\t\tsudo apt -qy install postgresql python3-psycopg2 libpq-dev\n\t\t```\n\n\t4. Setup a database\n\t\t```\n\t\tsudo -u postgres createuser -P catalog\n\t\tsudo -u postgres createdb -O catalog catalog\n\t\t```\n\n5. Deploy project\n\n\t1. Clone project to _/var/www/_\n\t\t```\n\t\tcd /var/www/\n\t\tgit clone https://github.com/irsol/item-catalog-app.git\n\t\t```\n\n\t2. Create **server.wsgi** file\n\t\t```\n\t\timport sys\n\t\timport logging\n\n\t\tlogging.basicConfig(stream=sys.stderr)\n\t\tsys.path.insert(0, \"/var/www/item-catalog-app/\")\n\n\t\tfrom server import app as application\n\t\t```\n\n\t3. Update _/etc/apache2/sites-enabled/000-default.conf_\n\t\t```\n\t\t\u003cVirtualHost *:80\u003e\n\t\t\tWSGIScriptAlias / /var/www/item-catalog-app/server.wsgi\n\n\t\t\t\u003cdirectory /var/www/item-catalog-app/\u003e\n\t\t\t\tWSGIApplicationGroup %{GLOBAL}\n\t\t\t\tRequire all granted\n\t\t\t\u003c/directory\u003e\n\n\t\t\tErrorLog ${APACHE_LOG_DIR}/error.log\n\t\t\tCustomLog ${APACHE_LOG_DIR}/access.log combined\n\t\t\u003c/VirtualHost\u003e\t\n\t\t```\n\n\t4. Change database connection from sqlite to postgres in database_setup.py\n\t\t```\n\t\tengine = create_engine('postgresql://catalog:\u003cpassword\u003e@localhost:5432/catalog')\n\t\t```\n\n\t5. Copy **client_secrets.json** to _/var/www/item-catalog-app_\n\n\t6. Restart apache:\n\t\t```\n\t\tsudo apache2ctl restart\n\t\t```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firsol%2Flinux-server-configuration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firsol%2Flinux-server-configuration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firsol%2Flinux-server-configuration/lists"}