CentOS Booked v3

Download as pdf or txt
Download as pdf or txt
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 Destop! install into a "irtual #ox "$ %or this test, should &e the same %or most real metal
installations. This should also wor %or some o% the minimum installs on the CentOS installer dis, &ut
it has not &een tried. $ost o% it is command line and it pretty well pics up right a%ter you mae your
%irst '%orced( user account. I used sudo %or everything as opposed to logging in as the root account
which is pro&a&ly pretty common %or most hosting companies. )ou will need some sort o% elevated
privileges in order to mae this install, a&ility to install pacages, change permissions on %iles, etc.
So lets start at the &eginning, log in as your user account and open a terminal, we are going to set up the
user account to &e a&le to assume %ull control.
Type*
su
%ollowed &y the root user+s password that you created when you installed the OS
,ow type the %ollowing to edit the sudoers %ile*
vi /etc/sudoers
-
Should loo lie the %ollowing*
.age down until you see the root account permissions, press i! to get into insert mode, and add your
user name in the same %ormat as the root account a&ove*
username 'ta&( ALL=(ALL) 'ta&( ALL
This gives you %ull control, there are many other levels that should wor, &ut I was la/y and 0ust gave
mysel% %ull control. .ress the escape ey to get out o% insert and &ac into command mode. Type*
!"
to save the document and overwrite the read only %ile. Then 1uit '#"( and you will return &ac to the
terminal. To test give the %ollowing a try*
sudo $u% u&date
2
3nd you should get something lie the %ollowing*
Type $our user account password and it should either update or say that no updates were needed, mine
needed a &unch o% updates since it was a %resh install.
I% you needed updates, let that churn through the system and %inish, might tae a while depending on
your connection to the internet and the speed o% your computer. ,ow on to the installation o% the
pacages we need, then the con%iguration o% a %ew items.
4
'O() I have &een advised that the use o% phpmyadmin can &e a security ris. 3dding the 5.56
repository is only needed i% you are going to add phpmyadmin. I% you decide not to install
phpmyadmin, sip this step.
#ac in the terminal we need to start installing some pacages, depending on the version o% install you
used, some o% these might &e installed already, &ut it is a good idea to go through and run the installs
anyway, )7$ will tell you i% there is nothing to do. The %irst thing we need to do is install the 5xtra
.acages %or 5nterprise 6inux 'epel(. Type*
sudo r&% *+vh htt&//do!nload.,edora&ro-ect.org/&u./e&el/6/i/06/e&el*release*6*0.noarch.r&%
8hen it %inishes chec to see i% it is installed &e typing*
sudo $u% re&olist
)ou should see the epel repository listed with any other repos that you have installed, as you can see I
only have the &asic &uilt in repos plus the epel repo installed. )ou also should have noticed that you
didn+t need to type your password again, sudo caches this %or -9 minutes to save you some time.
On to the other things...
:
Type*
sudo $u% install htt&d
This is the 3pache we& server, on my machine it was already installed so it looed lie this*
$ove on to the other things and run them through.
sudo $u% install %$s#l %$s#l*server
sudo $u% install &h& &h&*%$s#l
sudo $u% install &h&%$ad%in *see note above about phpmyadmin, it is not a required package
I% you get any additional dialog &oxes, you can pretty much 0ust answer ')(es.
,ow that we have everything installed, we need to start some services and chec to mae sure things
wor. 8e+ll start 3pache and set it to start automatically at &oot, again &ac in terminal*
sudo service htt&d start
Since I don+t have any D,S servers set up, I get the error that it can+t determine the server name, not a
&ig deal right now, you can %ix this &y maing sure your D,S server has the correct in%ormation
pointing to your #ooed server, or you can edit the ;etc;hosts %ile to point to your #ooed server
'shown later in this guide(. ,ow mae the service start at &oot*
sudo chkcon,ig htt&d on
9
$oving on to mys1l we type similar commands*
sudo service %$s#ld start
3gain it loos lie lac o% a D,S server causes grie%, something that will need to &e sorted out and may
re1uire a &it o% con%ig %ile editing down the road. The short term goal is getting all this woring locally
'-2<.=.=.-(, there should &e plenty o% other guides on getting those other con%iguration settings correct.
)ou should see the last line in the terminal stating Starting %$s#ld 1 O2 3 i% it %ails, you will get
some ind o% error code that you should &e a&le to loo up. 3gain proper D,S entries or hosts %ile
entries will remove the errors a&out can+t %ind the correct name. >ollow starting the service &y again
telling it to start at &oot*
sudo chkcon,ig %$s#ld on
5very once in a while we will need to restart these servers, a%ter maing a %ew additions or ad0ustments
it is wise to do this. Commands are*
sudo service htt&d restart
sudo service %$s#ld restart
8e should pro&a&ly test a %ew things now and see what wors, open a &rowser and type into the
address &ar*
456.7.7.4
It should loo something lie this*
6
#ac to terminal, we need to create a %ile to test php, type*
sudo vi /var/!!!/ht%l/test&h&.&h&
The vi editor will open and give you a &lan document. Type 'insert with the i! ey(*
89&h&
&h&in,o ():
9;
5SC and *w and *1?
,ow type*
sudo service htt&d restart
and then go to your &rowser and type in the address &ar*
456.7.7.4/test&h&.&h&
and you should see the .@. status page
<
8e need to set up the mys1l parts, so we need to go &ac to terminal and type*
sudo %$s#l<secure<installation
)ou will %ollow the on screen prompts to set up the root password and do some cleanup. 3nswer ')(es
to pretty much everything unless you want to manage it over the we&, &ut that taes other
considerations and will need to &e researched &e%ore allowing remote connections.
Aestart the server*
sudo service %$s#ld restart
and %or good measure
sudo service htt&d restart
3nd let+s test the $ySB6 installation, we+ll start with command line. Type the %ollowing*
%$s#l *u root *&
this starts the mys1l inter%ace under the Cu user and Cp waits for password , you can type your mys1l
password in line, &ut it isn+t very secure since it will &e plain text on the screen. )ou should now have
the mys1lD prompt, type the %ollowing command*
sho! data.ases:
,ote that I ran this a%ter getting #ooed installed and set up, you won+t see the &ooedscheduler
data&ase at this time, &ut yours should loo something lie this*
E
5xit out o% mys1l and type the %ollowing to chec another aspect*
%$s#lad%in *u user *& status
,ow let+s try [email protected], so type it+s address into the &rowser '456.7.7.4/&h&%$ad%in(and you
should get a login page.
5nter the root user and password that you 0ust created and you should &e in.
F
#e%ore we get to dealing with #ooed, we have another very important command to run, this sets the
permission %or 3pache to access the data&ases. #ac in terminal type the %ollowing*
sudo setse.ool *= htt&d<can<net!ork<connect<d. 4
it will tae some time to run and %inishes without a message. 8e are %inally ready to start dealing with
#ooed. >irst thing we need to do is edit the php.ini %ile and set the correct time /one. This %ile should
&e located in ;etc;, &ut you can %ind it &y opening the %ile manager and searching %or it, then right clic
and chec properties to %ind its location, mine was in ;etc; so I used the %ollowing to edit it in terminal*
sudo vi /etc/&h&.ini
-=
.age down to the $odule Settings! section, uncomment the date.time/one 'remove the G!( and add
your correct time /one to the document. Then save and 1uit.
,ow we can deal with the #ooed con%ig %ile, go to the extracted %older and edit the time/one and
insert an install password lie the directions say you should do. It+s covered pretty well in the included
directions so I didn+t get any screen captures.
--
8e now need to copy the #ooed %iles into the we& server %olders to &e a&le to serve them up to users.
Since we still need root, this means a trip &ac to the terminal*
cd >/?o!nloads/.ooked
sudo c& *@ A /var/!!!/ht%l
This should only tae a %ew seconds &ecause the %iles are not &ig. 6aunch the >ile #rowser and
navigate to the ;var;www;html %older and chec to mae sure everything is there.
-2
,ow we need to set permissions on those %iles, again &ac to terminal*
sudo chgr& a&ache /var/!!!/ht%l *@
sudo ch%od gBr!C /var/!!!/ht%l *@
The CA stands %or recursive and will tunnel down through all su& %olders and %iles to assign the 3pache
group and read;write;exec %or that group to all the %iles. This may &e a &it heavy handled, the tpl and
tplHc %olders need this level o% privileges. ,ot sure i% the other %iles really need this much. )ou can
chec to mae sure things wored &y going &ac to the >ile #rowser and opening the tpl %older, right
clic on a %ile and see i% it has read and write listed %or the 3pache group.
-4
Time to give this a whirl, good idea to restart the httpd service. Then open a we& &rowser and type into
the address &ar*
456.7.7.4/De./install
,ote the capital 8 on we& or it will not reach the page. 5nter your installer password that you typed
into the #ooed con%ig %ile.
-:
,ow type in the data&ase root account and root password, chec the three &oxes and hit the Aun
Installation &utton.
I% it all wored, you should see something lie this*
-9
,ow you need to test it. Io &ac to -2<.=.=.- in your &rowser and you should see the #ooed log in
page.
Type in the sample admin user name and sample admin password 'password( and you should arrive at
the Dash&oard.
-6
5diting the hosts %ile. Open up a terminal and type*
sudo vi /etc/hosts
at the &ottom o% the %ile add your server I. 'ta&( server >BD, '%ully 1uali%ied domain name(.
Save it with !" 3nd 1uit #" . ,ow when you restart httpd or mys1ld there should &e no error a&out
%inding the address and should loo pretty much lie this*
3gain, i% you have a D,S server set up properly, you would have never seen the errors in the %irst
place. 3 D,S server is really the &etter place to resolve this as it is easier to change things as a system
evolves and I. addresses change.
-<
That+s it, you should now &e ready to test #ooed on a CentOS 6.x server. Some o% the holes will need
to &e patched, the %irewall will need to &e opened, etc., &ut this gives the &asic rundown o% what you
need to do to get #ooed %unctional on a CentOS server. The reason I wrote this is &ecause I spent
considera&le time trying to get this woring. 3 1uic 1uestion on the CentOS %orums solved the last
mystery a&out the setse&ool command which allowed 3pache to tal to the data&ase. #e%ore learning
this I was stuc not &eing a&le to get #ooed to connect to the D#, even i% I went through the manual
process o% setting the D# up. Since .@. $y 3dmin was a&le to connect, I thought there must &e some
other pacage missing that #ooed needed. One simple command that I didn+t %ind with we& searches
completely stopped me. ,ot sure i% anyone else will run into this pro&lem, &ut thought it was at least
worth documenting so I would have it in my %iles %or re%erence when I needed to set this up %or real.
This guide written &y Ireg 5ndler, 3pril 6, 2=-:. That should serve as enough o% a statement o%
ownership, should pro&a&ly &e gpl or copyle%t or something lie that, I+ll 0ust have ,ic %ile it with the
rest o% the documents %or distri&ution. It was compiled %rom tips gathered %rom several sources, put into
a somewhat cohesive %orm to do the speci%ic tas o% getting #ooed running so I can test some
modi%ications to the code to mae #ooed do a couple things we need on our production system, and to
prepare %or the time when we can install our production system. I may revise this when I get more in%o
a&out plugging security holes and maing sure the we&server has all the con%iguration it needs. I+ll try
to mae sure any revised versions end up with ,ic.
Iood luc, hope everything wors %or you.
-E

You might also like