Posts

Showing posts with the label Linux

Custom Linux Command to Generate Sites

Image
So I created a Linux command for myself to setup websites rather by hand anymore. What took me 10 to 15 minutes now is just down to less then a minute where I can just pass parameters and go! This article is a place holder for the documentation and some notes so later if I need to create another command. How it works... For the setup I have a setup start out checking for sudo and gain access because I'm going to modify a lot of folders. Taking the users input I add a file in Nginx first in sites-available then link it with sites-enabled. I pass the input in the file to have both the naked domain then the www version. From there its setting up a gitlab task-runner. Later down the road I might just convert everything to docker and might not need to setup a folder in /var. However for now I like this setup, so the last step is creating and pushing out the web service for the application. For now I do this last part manually because I have to test the package version and enviro

Linux: Set Default Permissions with Directives

I would normally put this in an update for one of my cheatsheets, and will probably put a link to it for linux for this article. However I don't see a lot of people talk about this often and use these commands normally when I'm setting up a folder for a web application. I'll normally work in the /var/www folder but I attached the Gitlab CI to this but nginx needs read access. sudo setfacl -d -m g::rwx EXAMPLE sudo getfacl EXAMPLE Note:  https://linux.die.net/man/1/setfacl

Host ASP.NET Core on Linux with Nginx (Additional Notes)

I could submit this to the repo but like the half blood prince, I'm keeping all the good stuff for myself. Plus it would have to go through the proper channels and who's got time for that. Instead I'm just want to get back to working on my applications and handling multiple applications is time consuming. Framework Issues ran into issue where the frameworks were not the same on the linux box as my machine. However the errors were not helpful to figure this out. https://www.microsoft.com/net/download/linux-package-manager/ubuntu16-04/sdk-current Exporting Issues  - I just keep forgetting the command and you can ignore all the linux based ones. dotnet publish --configuration Release Is there really any difference with builds for OS versions? From what I can tell no... They probably will or should just remove it. Make the build detect the os and if its going to be cross platform just work every anyway. Aspnet 2.1 changing the port using the environment variable

Linux CLI: Tab Autocomplete broken

If your finding your command terminal acting weird like mine did, and can't seem to find out whats happening. Don't panic! Remember this wonder snippet. set show-all-if-ambiguous on set show-all-if-unmodified on Notes:  Tab does not auto-complete in terminal

Working Dotnet 2.0 with Ubuntu 16.04

Image
  One of the bugs I ran into on my journey was not using the published version of my aspnet application but moving from 1.x to 2.0 of dotnet. I was already setup to use https but I don't think my nginx configs were the issue but instead the app not building a published build of the app. just use the publish command and everything worked as planned. -  https://docs.microsoft.com/en-us/aspnet/core/publishing/linuxproduction?tabs=aspnetcore2x -  https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new?tabs=netcore2x aspnet core inside a linux system Conclusion I'm very happy with my solution, I haven't found a lot of issue except the some of the issue that were related to version differences with 1.x/2.0. I believe I've found a way to simplify the tutorial provided in the Microsoft by using docker. Running docker no whatever port you need and then from there write the configs to nginx.

Linux Cheatsheet

With everything going on with logicoma, I will be frequently updating this page so I can just jump back into whatever system tasks at hand. I should add this I'm going to keep this focused on ubuntu/debian. http://www.yolinux.com/TUTORIALS/LinuxTutorialAdditionalHardDrive.html http://www.cyberciti.biz/faq/linux-viewing-drive-partitions-with-fdisk-parted/ X11 Forwarding using Putty on Windows - YouTube Storage http://tldp.org/LDP/lame/LAME/linux-admin-made-easy/checking-storage-space.html https://www.cyberciti.biz/faq/linux-check-memory-usage https://unix.stackexchange.com/questions/106561/finding-the-pid-of-the-process-using-a-specific-port Commands fdisk -l mkdir ← a directoy of where to mount the disk mount ← mount a disk using /dev/[disk] ln ← creates a link file from another name ← use 'a' to get all the information on the server rm /path/to/directory/* https://askubuntu.com/questions/402589/the-following-packages-were-automatical

Running Solr on Google Cloud

    Google App Engine has gone under a great number of changes and originally I set out to use it to my advantage but instead went through Google's cloud platform to run solr on a virtual machine. This gave me a lot more flexibility and didn't require to change any of Solr's source code. In theory changing the source code to handle the file system available through app engine would work.       I'm not going to get into the steps of how I did this, I think it's pretty straight forward, setup your linux vm and install java, then set up tomcat with Solr. With my catalog-demo, I used the site to proxy to the vm and gave the vm permission to only my web site's IP. The links below are docs that give more information on that. As far as costs go, it is very cheap to spin up a machine and to get the Solr server running. However I'm not happy with the solution and know I can create an even better solution so I've shutdown the server and started looking at other

LPI Certification Material

    At one time I really wanted to take the  LPI certification  but I feel my experience speaks for itself. However I do want to cover the material and refresh myself on some of the stuff that I don't use on a regular basis. I bolded the commands I use the least and reworded the description a little more to my liking. Most of the information is just examples I found and stuff I think would be covered. Commands declare - Use the declare command to set variable and functions attributes. quota - displays users' disk usage and limits. By default only the user quotas are printed. date  - display or set the time. rpm - package manager. (I prefer debian) xvidtune - tweaks the screen resolution. nl - prints line numbers before each line in a file. od  - dumps files in octal format. su - option m is pretty useful, do not reset environment variables. mkfs - “used to build a Linux file system on a device, usually a hard disk partition.” XF86Config -the sec

Sunyit's Project BITS Documentations

Image
The following is a collection of documents that I created solely for myself and colleagues in order to meet standards for implementing a Hadoop cloud service. That said there is a lot of information that is specific for the systems used and customized to only work for those who were apart the project. The objective for Project "Bits" can be found here in this link . All ip addresses have been marked with x's and urls generalized in order to protect the SunyIT network system. I continue to study the systems used here and release the documents in hope that others might take up the project and implement it at his or her's University/College. Back-Bone of Bits Project This is the server BitsGW which features a vpn connection across multiple colleges. Creating VM’s of BitsHP (hadoop machines) to have a scalable new projects. Also providing a LDAP connection service. BitsGW has the following user: afassett, admin BitsHP: Pxe server for machines b