I’m getting a Linux server up for a new project over at Ignition. It remains amazing to me how hard integration is with the Windows world. Here are some notes on getting it running that I hope help others:
* “Samba and file shares”:http://justlinux.com/nhf/Filesystems/Connecting_to_SMB_Shares_from_Linux.html. The documentation for Samba is not very clear. Here is one man’s view on how to get this running. Before I had this I could get to the point where I could browse Windows file shares, but authentication didn’t work. The magic is note in the extended entry. The real trick is a unbhc of mount parameters.
* Apache. First you have to get this installed. It doesn’t by default. Ignore the apache documentation, it doesn’t apply to Red Hat precisely even though the Red Hat help and site point to it. What you need to do is to choose Red Hat/System Settings/Packages. Navigate down to the Web services section and click on Apache. This installs it with the default directory of /var/www/html as the web site. You the go to Red Hat/Systems Tools/Red Hat Network to download all the updates that need to get applied. However, it doesn’t actually run apache as a service by default as you would expect. You have to edit /etc/rc.local and add “apachectl start”
* Mysql. Yuck, the documentation and how it works with Red Hat are out of sync, so you can install Mysql by running Red Hat/System Settings/Packages and navigating to the database section and then choose Mysql. However, this doesn’t actually start Mysql by default. You have to choose Red Hat/Server Settings/Services, scroll down the list to find mysql and click on start and check it so it starts automatically.

I have four drives I want to map every time I boot my Linux machines, shared directories that reside on my server which is named (appropriately) server?.
The shares are named \server\documents, \server\music, \server\software, and \server\website. I couldn’t find a location that is recommended for mounting SAMBA shares, so I just threw them into the /mnt directory which works fine for me. As root create the subdirectories that are required
mkdir /mnt/documents
mkdir /mnt/music
mkdir /mnt/software
mkdir /mnt/website
No permissions need to be changed.
On the Windows 2000 machine, an owner and group need to be named, so create a group named samba and add the Linux user to the samba group.
Create a file to map the drives and place it in the /root directory, naming it drives. This will disable access to everyone but root. This is important to do because this file is plain text and stores passwords within.
As root, type
vi /root/drives
In that file, enter
mount -t smbfs -o username=username,password=password, uid=username, gid=samba //pig/documents /mnt/documents
mount -t smbfs -o username=username ,password=password, uid=username, gid=samba //pig/music /mnt/music
mount -t smbfs -o username=username ,password=password, uid=username, gid=samba //pig/website /mnt/website
mount -t smbfs -o username=username,password=password, uid=username, gid=samba //pig/software /mnt/software
Note that the first username and password is for the remote machine’s account on the Windows server. You can test the permissions of the mounted drives by typing ls -l. If the permissions are correct the owner and group will be listed for each file.
Now all we need to do is make sure that the drives are mounted upon boot. This step isn’t required if your server isn’t always turned on, as it can be run when required by root when the drives are required.
Open the file /etc/rc.local and place the line
bash /root/drives
within. This will run every time the machine is rebooted and, because it points to a file in the /root directory, we don’t have to worry about people seeing the plain-text passwords stored in it.

One response to “MovableType on Red Hat Linux 8.0”

  1. Gary Burd Avatar

    Use /sbin/chkconfig to enable and disable services:
    /sbin/chkconfig httpd on
    /sbin/chkconfig mysqld on
    This will get them started the next time you restart the machine. Use /sbin/service to get the services running immediatly:
    /sbin/service httpd start
    /sbin/service mysqld start
    I find it convenient to copy all of the RPMS from the installation CDs to a directory on my machine. That makes it easy to install a package if forgot it at initial installation time. Once you have the RPMs on your machine, it’s easy to do things like this:
    rpm -i httpd-*

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect