Probably Allocated Disk space Wrong ...?

General support questions
Post Reply
scatterbrainz
Posts: 11
Joined: 2018/12/23 22:00:34

Probably Allocated Disk space Wrong ...?

Post by scatterbrainz » 2019/05/18 12:09:24

Hey Everyone,

I've got an install of Centos 7 up and running with Gnome. My intention is to use it as my main computer for web design / development. SO I'd like to install LAMP, and have apache serve up web pages viewable on my home network. This idea is this will more closely mirror a real hosting environment instead of just doing "localhost:3000" on my mac. That said, I think I wrongly allocated disk space when when I did the install.

If I'm correct in my understanding (please verify) - I'm new to linux.

Critical Specs - 32GB RAM and 500GB SSD (x2) - in Raid 1 (mirroring redundancy).

You can see my allocations in the screen shot. The challenge for me while /var keeps all the logs / changing files and so on. I don't think it needs to be 285GB. I could be mistaken.

With respect to Apache - it has a httpd.config in /etc/www/http but I do not believe this is where the actual coding files should be put. For some reason I think they should be in /home/usr directory - maybe I'm wrong. But given this directory will be filled with subdirectories for multiple projects (its a development server). I would think it would need to be rather large. SO I was thinking I would just re-direct in the http.conf file to a development directory.

Is there something I'm missing here?

Thanks for reply - Best Wishes.

PS: RE-installing Centos is VERY possible, there's nothing on the system as of yet of any consequence.
Attachments
FileSizeLinux.png
FileSizeLinux.png (176.18 KiB) Viewed 859 times

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Probably Allocated Disk space Wrong ...?

Post by TrevorH » 2019/05/18 15:18:34

I'd start over, it's easier than trying to resize /var downwards, especially since you probably let it default and it's xfs which cannot be shrunk at all, you have to back it up, destroy it, reformat it and restore your data.
With respect to Apache - it has a httpd.config in /etc/www/http
Not if you're using our copy of Apache httpd it isn't. Ours goes in /etc/httpd/conf/httpd.conf and your docroot should be /var/www/html. Using /home to serve web sites is not usually the best method as you'll run into selinux problems along with everything else. If you want more than one vhost then consider using /var/www/$sitename for each site.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
igorek24
Posts: 90
Joined: 2013/11/13 06:11:37

Re: Probably Allocated Disk space Wrong ...?

Post by igorek24 » 2019/05/18 16:27:21

I think TrevonH is right.
If you are new to Linux, it would be the easiest path to start from scratch.
The httpd config file is in /etc/httpd/conf/httpd.conf and public web files are in /var/www/html.

If you are using this box for development, here is an example how I do it (working with php). I create Projects directory in my home directory and all off the php projects go in there, then open the terminal and run

Code: Select all

php -S 0.0.0.0:8081 -t Projects/MyProject/html/
and you are done. When you have an issue with your code, just look at the terminal for details. The only thing you need is a database and you can install it easily. I used to setup apache/nginx with database on my computer but I realized that it takes up a lot of my time to do so especially when you working on a lot of different projects.
If you are running a publicly available sites from that server, then its a different story. For a public server, I create a new directory "/var/www/public_html" and subdirectories for each site (for example: /var/www/public_html/exmpl1.com and /var/www/public_html/exmpl2.com) and leave /var/www/html/ alone for the default site.

If you need help, let me know. I can help you setting this up.

Post Reply