Difference between revisions of "Fedora 21 Server"
Line 105: | Line 105: | ||
mkdir images | mkdir images | ||
sudo chmod -R 777 images | sudo chmod -R 777 images | ||
− | + | vi /etc/fstab</pre> | |
<pre>//x.x.x.x/RemoteSharedFolder /images cifs username=UserNameHere,password=PasswordHere,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0</pre> | <pre>//x.x.x.x/RemoteSharedFolder /images cifs username=UserNameHere,password=PasswordHere,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0</pre> | ||
Revision as of 14:23, 13 April 2015
Currently Under Construction! Expect an amazing article soon! Last modified: April 10th, 2015.
Notes... Fedora 21 server does not have a GUI. This guide, however, will guide you through installing FOG totally (with various setups).
lets see...
READ FIRST, COMPLETE FIRST ---Prerequisites CHECKLIST... Choosing a password for FOG user and root. Deciding where images will be stored. Full FOG DHCP or ProxyDHCP ?
Contents
Installing Fedora 21 server
configuring the /images directory during Fedora installation (optional)
Working from the comforts of your desk (using SSH - Optional but highly recommended)
Connect using SSH from another Linux machine
ssh -l root x.x.x.x
restart server
shutdown -r
Formatting & mounting a 2nd drive (optional)
ls -l /dev/sd*(lists all scsi/sata device files to find the new extra disk device file)
The output will look something like this.
brw-rw---- 1 root disk 8, 0 Apr 6 17:49 /dev/sda brw-rw---- 1 root disk 8, 1 Apr 6 17:49 /dev/sda1 brw-rw---- 1 root disk 8, 2 Apr 6 17:49 /dev/sda2 brw-rw---- 1 root disk 8, 16 Apr 6 20:49 /dev/sdb
Normally sda is drive 1. sdb is drive 2. Note that SATA drives begin with sd, IDE drives begin with HD. If you had additional drives or even flash drives, they'd be listed as sdc, sdd, sde, sdf, etc. After identifying the right drive, you'll want to create a partition on it. For this, we use fdisk.
[root@localhost ~]# fdisk /dev/sdb Welcome to fdisk (util-linux 2.25.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help):
hit the "m" key to get the menu, to show you what you can do in there. "g" creates a new GPT partition, so tap "g" After creating the partition, you can verify it with "p" You must write your changes with "w", otherwise nothing will be done.
We need to format that partition next (we're going to do it the ultra-simple but probably "will upset old-time Linux users" way). if you'd like an ext4 filesystem, you'd use:
mkfs.ext4 /dev/sdb
Next, we want that partition to mount to the /images directory at boot. We'll need to edit /etc/fstab for this, and you'll need to use Vi to do it (it's easy).
vi /etc/fstab
Vi is NOT anything like a GUI based text editor... Move the cursor around with your arrow keys. Put it where you want to type. Using the "right" arrow to get to the very end of a line.
press "i" to insert text. After pressing "i", you may still move around with the arrows, but now you have editing ability. You can use things like backspace, enter, and you can type.
You need to add this line to the end of the file. Make sure to use the right partition name, and the right file system type.
/dev/sdb /images ext4 defaults 0 0
When you're done, you need to stop "inserting", to do that, hit the escape key.
Now, you need to write your changes. do that by typing :w and then hit enter.
It should tell you it wrote the changes.
Next, to quit, type :q and hit enter.
You may reboot to mount, or you can mount now using this:
cd / mkdir images mount /images
All done.
mounting a smb share/NAS at boot to store images (optional)
cd / mkdir images sudo chmod -R 777 images vi /etc/fstab
//x.x.x.x/RemoteSharedFolder /images cifs username=UserNameHere,password=PasswordHere,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
Where x.x.x.x is the remote share's IP. Replace the username and password. Please note that you're password will be stored in plain-text. You MIGHT want to create a user on the hosting server, and give that user a non-critical password, and assign that user ownership to the share with full control, and disallow everyone else.
Installing SVN (required) (installs Beta of Subversion)
yum install svn
Updating Fedora (optional)
yum update
SSH'ing into your server (optional, but strongly recommended). SSH is the ONLY thing that isn't blocked in Fedora by default. The default firewall in Fedora has everything locked down except SSH. All other versions of Linux that I know of come with the firewall disabled. This hints at SSH's importance!
ssh -l root x.x.x.x
Note: this is for SSH'ing in from another linux computer. From windows, you can use PuTTY [1].
Static IP address
yum install system-config-network cd /usr/bin ./system-config-network
Follow on-screen prompts (it's easy).
Disable firewall and SELinux.
systemctl disable firewalld.service
vi /etc/selinux/config
Change the line:
SELINUX=enforcing
To:
SELINUX=disabled
generally, the easy way to make the SELinux setting take effect is to reboot.
Installing FOG
dnsmasq (ProxyDHCP) setup
edit the ltsp.conf file:
vi /etc/dnsmasq.d/ltsp.conf
port=0 log-dhcp tftp-root=/tftpboot dhcp-boot=undionly.0,x.x.x.x,x.x.x.x dhcp-option=17,/images dhcp-option=vendor:PXEClient,6,2b dhcp-no-override pxe-prompt="Press F8 for boot menu", 3 pxe-service=X86PC, “Boot from network”, undionly pxe-service=X86PC, "Boot from local hard disk", 0 dhcp-range=x.x.x.x,proxy
Restart dnsmasq:
systemctl restart dnsmasq.service
Enable dnsmasq to start on boot:
systemctl enable dnsmasq.service