You are on page 1of 18

Installing Booked scheduler on CentOS 6.

5
This guide will assume that you already have CentOS 6.x installed on your computer, I did a plain
vanilla “Desktop” install into a Virtual Box VM for this test, should be the same for most real metal
installations. This should also work for some of the minimum installs on the CentOS installer disk, but
it has not been tried. Most of it is command line and it pretty well picks up right after you make your
first (forced) user account. I used sudo for everything as opposed to logging in as the root account
which is probably pretty common for most hosting companies. You will need some sort of elevated
privileges in order to make this install, ability to install packages, change permissions on files, etc.
So lets start at the beginning, log in as your user account and open a terminal, we are going to set up the
user account to be able to assume full control.

Type:
su
followed by the root user's password that you created when you installed the OS
Now type the following to edit the sudoers file:
vi /etc/sudoers

1

there are many other levels that should work. Then quit (:q!) and you will return back to the terminal.Should look like the following: Page down until you see the root account permissions. Press the escape key to get out of insert and back into command mode. and add your user name in the same format as the root account above: username (tab) ALL=(ALL) (tab) ALL This gives you full control. To test give the following a try: sudo yum update 2 . press “i” to get into insert mode. Type: :w! to save the document and overwrite the read only file. but I was lazy and just gave myself full control.

If you needed updates. mine needed a bunch of updates since it was a fresh install. let that churn through the system and finish.And you should get something like the following: Type your user account password and it should either update or say that no updates were needed. Now on to the installation of the packages we need. might take a while depending on your connection to the internet and the speed of your computer. 3 . then the configuration of a few items.

as you can see I only have the basic built in repos plus the epel repo installed. but it is a good idea to go through and run the installs anyway. skip this step.NOTE: I have been advised that the use of phpmyadmin can be a security risk. some of these might be installed already. You also should have noticed that you didn't need to type your password again.. The first thing we need to do is install the Extra Packages for Enterprise Linux (epel).org/pub/epel/6/i386/epel-release-6-8. 4 . sudo caches this for 15 minutes to save you some time. If you decide not to install phpmyadmin. YUM will tell you if there is nothing to do. Type: sudo rpm -Uvh http://download. Adding the EPEL repository is only needed if you are going to add phpmyadmin.rpm When it finishes check to see if it is installed be typing: sudo yum repolist You should see the epel repository listed with any other repos that you have installed.noarch.fedoraproject.. On to the other things. Back in the terminal we need to start installing some packages. depending on the version of install you used.

you can pretty much just answer (Y)es. or you can edit the /etc/hosts file to point to your Booked server (shown later in this guide). Now make the service start at boot: sudo chkconfig httpd on 5 . not a big deal right now. on my machine it was already installed so it looked like this: Move on to the other things and run them through. Now that we have everything installed. We'll start Apache and set it to start automatically at boot. I get the error that it can't determine the server name. we need to start some services and check to make sure things work. it is not a required package If you get any additional dialog boxes. again back in terminal: sudo service httpd start Since I don't have any DNS servers set up. sudo yum install mysql mysql-server sudo yum install php php-mysql sudo yum install phpmyadmin *see note above about phpmyadmin. you can fix this by making sure your DNS server has the correct information pointing to your Booked server.Type: sudo yum install httpd This is the Apache web server.

0. Follow starting the service by again telling it to start at boot: sudo chkconfig mysqld on Every once in a while we will need to restart these servers. You should see the last line in the terminal stating Starting mysqld: [ OK ] if it fails.0. you will get some kind of error code that you should be able to look up.0. there should be plenty of other guides on getting those other configuration settings correct.0.1 It should look something like this: 6 .1).Moving on to mysql we type similar commands: sudo service mysqld start Again it looks like lack of a DNS server causes grief. The short term goal is getting all this working locally (127. Commands are: sudo service httpd restart sudo service mysqld restart We should probably test a few things now and see what works. something that will need to be sorted out and may require a bit of config file editing down the road. open a browser and type into the address bar: 127. after making a few additions or adjustments it is wise to do this. Again proper DNS entries or hosts file entries will remove the errors about can't find the correct name.

type: sudo vi /var/www/html/testphp.php and you should see the PHP status page 7 .0. we need to create a file to test php. Type (insert with the “i” key): <?php phpinfo ().1/testphp.Back to terminal.php The vi editor will open and give you a blank document. ?> ESC and :w and :q! Now type: sudo service httpd restart and then go to your browser and type in the address bar: 127.0.

we'll start with command line. you can type your mysql password in line. You should now have the mysql> prompt. so we need to go back to terminal and type: sudo mysql_secure_installation You will follow the on screen prompts to set up the root password and do some cleanup. but yours should look something like this: 8 . but it isn't very secure since it will be plain text on the screen. type the following command: show databases. Type the following: mysql -u root -p this starts the mysql interface under the -u user and -p waits for password . but that takes other considerations and will need to be researched before allowing remote connections. Note that I ran this after getting Booked installed and set up. you won't see the bookedscheduler database at this time.We need to set up the mysql parts. Restart the server: sudo service mysqld restart and for good measure sudo service httpd restart And let's test the MySQL installation. Answer (Y)es to pretty much everything unless you want to manage it over the web.

1/phpmyadmin)and you should get a login page. Enter the root user and password that you just created and you should be in. 9 . so type it's address into the browser (127.0.0.Exit out of mysql and type the following to check another aspect: mysqladmin -u user -p status Now let's try PHPmyadmin.

Before we get to dealing with Booked. Back in terminal type the following: sudo setsebool -P httpd_can_network_connect_db 1 it will take some time to run and finishes without a message.ini 10 . we have another very important command to run. First thing we need to do is edit the php. mine was in /etc/ so I used the following to edit it in terminal: sudo vi /etc/php.ini file and set the correct time zone. but you can find it by opening the file manager and searching for it. this sets the permission for Apache to access the databases. We are finally ready to start dealing with Booked. This file should be located in /etc/. then right click and check properties to find its location.

”) and add your correct time zone to the document. Now we can deal with the Booked config file. 11 . go to the extracted folder and edit the timezone and insert an install password like the directions say you should do.timezone (remove the “. It's covered pretty well in the included directions so I didn't get any screen captures. uncomment the date.Page down to the “Module Settings” section. Then save and quit.

Since we still need root.We now need to copy the Booked files into the web server folders to be able to serve them up to users. this means a trip back to the terminal: cd ~/Downloads/booked sudo cp -R * /var/www/html This should only take a few seconds because the files are not big. 12 . Launch the File Browser and navigate to the /var/www/html folder and check to make sure everything is there.

Not sure if the other files really need this much. This may be a bit heavy handled. You can check to make sure things worked by going back to the File Browser and opening the tpl folder. again back to terminal: sudo chgrp apache /var/www/html -R sudo chmod g+rwx /var/www/html -R The -R stands for recursive and will tunnel down through all sub folders and files to assign the Apache group and read/write/exec for that group to all the files. the tpl and tpl_c folders need this level of privileges.Now we need to set permissions on those files. right click on a file and see if it has read and write listed for the Apache group. 13 .

14 .0.1/Web/install Note the capital W on web or it will not reach the page. Then open a web browser and type into the address bar: 127.Time to give this a whirl. good idea to restart the httpd service. Enter your installer password that you typed into the Booked config file.0.

If it all worked. you should see something like this: 15 . check the three boxes and hit the Run Installation button.Now type in the database root account and root password.

16 .Now you need to test it. Go back to 127. Type in the sample admin user name and sample admin password (password) and you should arrive at the Dashboard.0.0.1 in your browser and you should see the Booked log in page.

Save it with :w! And quit :q! . you would have never seen the errors in the first place. if you have a DNS server set up properly. Now when you restart httpd or mysqld there should be no error about finding the address and should look pretty much like this: Again.Editing the hosts file. A DNS server is really the better place to resolve this as it is easier to change things as a system evolves and IP addresses change. Open up a terminal and type: sudo vi /etc/hosts at the bottom of the file add your server IP (tab) server FQDN (fully qualified domain name). 17 .

even if I went through the manual process of setting the DB up. should probably be gpl or copyleft or something like that. etc. 18 . but this gives the basic rundown of what you need to do to get Booked functional on a CentOS server. This guide written by Greg Endler. I thought there must be some other package missing that Booked needed. you should now be ready to test Booked on a CentOS 6. I'll try to make sure any revised versions end up with Nick. and to prepare for the time when we can install our production system. Good luck. Since PHP My Admin was able to connect. Before learning this I was stuck not being able to get Booked to connect to the DB. put into a somewhat cohesive form to do the specific task of getting Booked running so I can test some modifications to the code to make Booked do a couple things we need on our production system. 2014.x server. That should serve as enough of a statement of ownership. The reason I wrote this is because I spent considerable time trying to get this working. I may revise this when I get more info about plugging security holes and making sure the webserver has all the configuration it needs. the firewall will need to be opened. I'll just have Nick file it with the rest of the documents for distribution.That's it. It was compiled from tips gathered from several sources.. A quick question on the CentOS forums solved the last mystery about the setsebool command which allowed Apache to talk to the database. Some of the holes will need to be patched. April 6. One simple command that I didn't find with web searches completely stopped me. Not sure if anyone else will run into this problem. hope everything works for you. but thought it was at least worth documenting so I would have it in my files for reference when I needed to set this up for real.