Squid and the art of learning Linux

Discussion in 'Other Operating Systems' started by Pumic_Stump, Dec 28, 2017.

  1. Pumic_Stump

    Pumic_Stump Member

    Joined:
    Apr 13, 2012
    Messages:
    14
    Location:
    Canberra
    I have undertaken a journey of a thousand keystrokes.

    I have just installed my first serious attempt at a web server.

    I am not totally familiar with Linux so I have chosen to start my journey with Ubuntu (17.0). The reason is that when I get better at the Linux command line then I will choose a terminal version. So for now I ask to please help me with my choice.

    I have watched just about every Youtube "introduction to Linux/ubuntu" video that a guy can stomach.
    I have also watched every Youtube "how to install a squid proxy server" video that was spoken in clear English.

    From video to video the ubuntu and squid versions have changed so I am left unsure of a few key things.

    I would love someone to help me with a few of the basic's on the config file. All help will be appreciated and I am sure the effort will help to build up some Chi-coin in heaven's database.
     
  2. Primüs

    Primüs Member

    Joined:
    Apr 1, 2003
    Messages:
    3,348
    Location:
    CFS
    A lot of what is recommended is dependant on what goal you are trying to achieve.

    Are you looking to do a configured proxy i.e. users configure a proxy in their browser - and you just cache what resources you can for local delivery

    Are you looking for transparent proxy

    Are you looking for reverse proxy

    Are you looking for an actual web server (as your post suggests) to host websites, which would mean Squid is probably not the right tool for the job
     
  3. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    33,804
    Location:
    Brisbane
    Stop watching videos. Read the man pages of the version of Squid supplied with your distro. They will document literally every single feature available to you with that supported version.

    YouTube is not the place to go if you want to "learn Linux".

    Primüs also nails it - what do you want to do? Squid can be configured to do a very large amount of tasks, all radically different. Have a goal, and aim to meet that goal. Tell us what that goal is, and we can help. Hint: "a web server" is not a goal, nor very clear.
     
  4. OP
    OP
    Pumic_Stump

    Pumic_Stump Member

    Joined:
    Apr 13, 2012
    Messages:
    14
    Location:
    Canberra
    The story so far.

    I bought a $20 Dell core 2 off of gumtree. I installed Ubuntu and squid on an platter HDD I had from an old rig.
    Eventually after relearning the basics of networking I had the server installed and working. It worked great serving facebook and other web pages.
    I ordered a 16GB SSD for $18 off of Aliexpress and when it turned up I installed Ubuntu on it and it worked well.
    While I know 16GB is good for the OS and will speed things up a bit I wanted to add a 1TB drive I have had waiting for the task of making a massive cache.
    I eventually found a way to add the cache drive to my system and point squid to the cache_dir. I made the cache massive and would love to know the percentage for longevity of the HDD and partitioning in general for a cache like this if anyone has some solid advice on that.
    My work station won't update and is stuck downloading the hefty (2-3GB download) fall update. I have tried every trick suggested by the MSSE's to get it to patch but it is being a stubborn mule.
    As a result I was hoping the cache would store the windows update and patch directly off the squid box, but to no avail.

    As I was installing the upgrade to Ubuntu 17.4 the computer crashed. It will post but crashes after a second with an IO error.
    I looked it up, it is a io bus problem on the mainboard.

    In short I think the SSD burnt out the mainboard but it was probably just shagged.

    I want Ubuntu and to use the computer it is on for other tasks, as I have it set up embedded into my coffee table. I bought a monitor arm to attach the monitor to the table and have mounted a 6 way electrical board on one end. I have mounted and still want to configure a second wifi capable router to connect my mobile to so my main router has nothing connected to it except for the squid server.

    Apart from the computer dying and now I need to replace that I have taken the first steps.

    Hopefully this description has showed you what I am attempting to do and maybe someone has some advice on the cache and windows updates.

    I have also bought a managed Cisco router and will incorporate that into the system after I get it going again.
     
  5. OP
    OP
    Pumic_Stump

    Pumic_Stump Member

    Joined:
    Apr 13, 2012
    Messages:
    14
    Location:
    Canberra
    Update.

    I have finished with the server. It has worked great for months. I have even turned off my router wifi and use the server as a hotspot. I can only assume that the hotspot is directed through the squid server, so I have done something inadvertently that I thought would take a lot more than just clicking the "turn on hotspot" button. I manage it through the desktop I have set up in my coffee table. I have only just worked out how to have the hotspot restart through a reboot. I am a renter so I can't afford or have the allowance to run cables through my house the "proper" way. This combination gives me what I need through a series of expected moves.

    Here it is a few days ago before some parts I ordered off Aliexpress turned up.

    I mounted an old monitor on the top of my writing desk, it isn't for the server. The stand for it was clunky and wasn't very stable so I made a new bracket and screwed it to the top of the desk. Say hello to Sally, her skeleton was found in the Rocks of Sydney and only a few hundred casts of her were made.
    [​IMG]

    Here is a photo with the front open. I run it with the door open and sit in the same room as it so I am not worried about the wifi signal strength. The computer comes with a stack of USB outlets 2 HDMI and 2 RJ45's. The monitor is a snug and near perfect fit, I didn't plan that and I am glad it worked out that way. Ubuntu 18 running and you can just make out the shape of my ute on the top middle of the security monitor. I have attached 2 battery chargers onto the side panel of the desk. I use a lot of battery at work.
    [​IMG]

    Both doors open. In the bottom area I have the router, a cheap NVR and a HDD. As I post this I have furthered the effort so I will brush over this photo.
    [​IMG]

    Here is my new rig. The NVR, HDD and 12v 15 Amp PSU from the previous photo have been made into something a bit more appealing to the eye. I love the look of a naked electronics so I have used Plexiglas and stainless fittings to make a stand for all the 12v gear in the cupboard. This is a mock up as later pictures show a different configuration.
    [​IMG]

    Here is another configuration
    [​IMG]

    And finally the setup back in its home. A lot tidier. It uses around 17% of the UPS so I expect it to last around 2 hours if I have a blackout. I will still have use of my internet and a low power tv as a backup. I added a temperature controller fan to kick in if the temperature gets over 24.5*. I will carve some air holes and mount fans in them when I have finished off the 12V stand. My goal is to add a DIY IP camera to the top and maybe to put a second wifi internet module so the NVR can email alarms even if the phone lines have been disturbed. I will add reed switches to the main door to turn on some led lighting when the main door swings down. Lastly I need to replace the locks. I may put some a network storage bay in as well. One bit at a time.
    [​IMG]
     
    Last edited: Oct 3, 2018
    shredder likes this.

Share This Page