Building Proxmox LXC with smb / cifs support From Your NAS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right so it's time to continue with the progress of installing another proxmox lxc container but this time we're going to be using ubun so let's get [Music] started all right so this time we're going to take a little bit of a different approach because I'm going to be able to connect this lxc container to my Nas which we didn't do with our file browser but if you want to you can do this method as well and also we're going to be using ubu so to begin we're going to create a CT and we're going to uncheck the unprivileged container we're going to name this pin book because that's the service I want to run lxc give it a password next template I'm going to run bu to 22 8 gigs of RAM is fine one CPU half a gig of RAM is fine I mean 8 gigs this space Network I'm going to change this over to DHCP DNS and confirm and then finish now when this is done we don't start this up yet because we do have to change some settings so I'm going to go over to this open book and head over to options and in features we're going to enable edit this and we're going to add SMB and CIF and now we can start it rout and the password the first thing we're going to do here is an apt update just to make sure we have the latest repositories we can do an apt upgrade to install the 150 packages too okay so here we're going to install something called CFT utils so we're going to do app install C utils we're going to clear that screen and now we're going to make a new file in the ETC directory and we're going to call this SM SMB creds which is my samb credentials and you need username equals and then the username password which is also your password and domain which is usually work group so you need these three identifiers inside this file and once you're done with that we're going to head into FS tab so we're going to Nano into Etc FS Tab and in here we're going to add our server in my case it's going to be 192168 10586 and it's going to be in public that's the shared folder I have and we are going to mount this to MNT SLU or you could do whatever you want media SLU whatever you want over here we're also going to make this also keep in mind everything is tabbed over here so we're going to have C tab credentials and in our case we're going to do etc. SMB creds comma we want this to be read and WR no perm and uid of like a th000 in Raspberry Pi you would use a th000 in my case I'm just going to make it 100,000 which is fine tab is zero then tab again is zero and then now we have our Mount ready hit contr L to clear the screen and we're going to make their MNT public and now we could do Mount d a and if there's no errors that means now I could list my structure in Mount and public and then I have my Nas in here you can see I have apps books downloads Files YouTube stuff like that so now we got our Nas mounted to our lxc and next we have to download open books now this is the GitHub if you're interested in using this helps you download books from IRC networks which is IRC highway. net and what I'm going to do right here is actually download the release because it has to be compiled and I'm going to download this Linux version right click copy link and I'm going to do a w get and grab this file there you go CH mod uh make it executable open books and then now it should be green now I'm going to move this over to user bin folder and I am going to open this up let me do that again now the reason why I'm opening this up because there's a lot of uh parameters we got to put in especially for the name of the user that you're going to use the port the directory where you want to save everything so we're going to have to type this all out so what I'm going to do is just open a textbook and I want to make a new file here and we're just going to use use user bin open booksor Linux and the first thing we're going to do is dur so we're going to do SL mntp SL books because that's where I want to save all my books name we could make this up so we sumore users user with couple of RS Port I'm going to run this on port 8080 and that is about it now if you want to test this you could just grab this copy and we're going to paste this over here just to see if it runs and there you go Local Host 8080 I don't even know what the IP addresses is on this IPA 237 so we're going to run that again we're going to do 192 16815 237 and we made it port 8080 and there we go we have all open books and once you hit search it should be able to search through that IRC for books and you can see it's connected all right so now that I know it works I don't have to I don't want to run every time uh when I have the boot of this machine I want to be built as a service so what I'm going to do now is I'm going to make since I need it as a script I'm going to Nano open booksh crunchbang bin Bash and I'm going to paste that command that I ran over there because these parameters will screw up sometimes with the services so I rather just run this as a script so I'm going to hit yes to save this chm make this executable there you go and now we're going to Nano into Etc systemd system and we're going to name this openbook doer this and since I actually have a template github.com spirit I have a little repository called Linux system D and I ran this before for a file server I'm just going to copy this and we're not going to use everything that's on here but it gives you like a good starting point I'm going to paste this on here start renaming stuff and this one is called open books working directory okay uh execute start this one will be I think it's just yeah user bin bash slash root slopen book. sh what makes this fail is you need this particular command which is called environment I'll show you what happens if I don't run it with environment and then I should be able to just exit this and I will run system CTL enable open books service and now I'm going to start it and then I'm going to see status it should break there you go exit code 2 and the reason for this is because this software particularly needs an environment it needs to know what your home directory is so I'm going to go back into this kill the restart on failure part I don't really need it kill timeout stop I don't need that either syis log identify I could I'm going to change this to open books and remain after exit equals true and this is the important bit which is environment equals quote Home equals SL root because that's our home directory and then it's going to be root and then now we should be able to exit this enable the service again I'm going to restart the service because it's already started and then now if I hit status everything is running and it's got my little thing because it got the base path it got all this other stuff that I need and if I was to test this again I'm going to hit F5 everything is running so there we go if I was to look for any books now it will go through the IRC um highway. net potentially search for any Linux books that that you're looking for or anything through here and you should be able to download what you need what's cool is that once you download it it actually downloads to your uh book directory that you made for your Nas but if you click on it again it'll actually download it as a download to the browser that you're using so it technically saves it into your Nas but you can also redownload to any machine like your phone or whatever it is right off the same URL or right off the same server that you're running but that is about it that's how easy it is to run a service on Ubuntu as well as connect your network or or your lxc to your Nas so you can transfer the files over again this is a continuation from what we were doing just a couple of days ago but instead of using Alpine we are using Buu and now we got connection to network if you have any questions about this hit me up down in the comments below and if you guys new to your channel consider subscribing and also hang that Bell notification icon so you know when the next video is going to be out next St my nerd cave hack alerts
Info
Channel: Novaspirit Tech
Views: 7,309
Rating: undefined out of 5
Keywords: novaspirit, tech, lxc promox, smb, cifs, proxmox, ct container, proxmox container, proxmo
Id: 9EZYM65d04I
Channel Id: undefined
Length: 9min 51sec (591 seconds)
Published: Sun May 12 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.