You are on page 1of 4

Installation/Maintenance of Wordpress and Linux server

Christopher J. Pace
Server IP address: 12.!.!.1
Server "o#ain $a#e: sa#ple.co#
%oot pass&ord: "fiodfd'f'udf
Services: We( )Wordpress &e(sites*
Wordpress "ocu#entation
In order to install Wordpress+ ,ou #ust first #eet the re-uire#ents of the Wordpress environ#ent.
Wordpress re-uires a co##on environ#ent called a L.MP environ#ent )L.MP stands for Linux+
.pache+ M,S/L+ and P0P*. .lthou1h ,ou can use an, 2S+ Linux is the #ost co##on 2peratin1
S,ste# chosen for a L.MP environ#ent. 3he re-uire#ents for a L.MP environ#ent are si#ple.
4irst+ ,ou #ust install the M,S/L server. $ext+ ,ou should install the P0P scriptin1 lan1ua1e+
confi1ured &ith support for M,S/L. Last+ ,ou #ust install .pache+ and insert the P0P #odule into
the .pache confi1uration.
Installin1 M,S/L
M,S/L is availa(le directl, fro# the 2pen5S" repositor, on ftp.open(sd.co#. 6ou can use p718add
to install M,S/L+ usin1 the version nu#(er reported fro#:
ftp://ftp.open(sd.or1/pu(/2pen5S"/9.'/pac7a1es/i9':/
4or instance+ to install M,S/L )latest*+ issue the follo&in1 co##and:
p718add ftp://ftp.open(sd.or1/pu(/2pen5S"/9.'/pac7a1es/i9':/#,s-l;server;<.!.2<p1.t1=
P718add &ill also satisf, an, dependencies of M,S/L. 2nce M,S/L has (een installed+ follo& the
instructions to set the root pass&ord for the M,S/L data(ase. 3he root pass&ord that I set &as the
sa#e as the root pass&ord for ,our server.
Installin1 P0P &ith M,S/L support
$ext+ ,ou #ust install P0P &ith support for M,S/L. 3o do this+ find the pac7a1e na#ed >php;#,s-l?
fro# the 2pen5S" repositor,. 4or instance+ this co##and &ill install P0P;M,S/L:
p718add ftp://ftp.open(sd.or1/pu(/2pen5S"/9.'/pac7a1es/i9':/php<;#,s-l;<.<.1p!.t1=
If there is a pac7a1e conflict )such as an existin1 version of P0P alread, installed*+ re#ove the
conflictin1 pac7a1e (, t,pin1:
p718re#ove php<;<.<.1
$ext+ edit the /var/&&&/conf/httpd.conf file+ and add the follo&in1 line in the #odules section:
LoadModule php<8#odule /usr/local/li(/php/li(php<.so
It is extre#el, i#portant to cop, that line exactl,+ as an, deviance &ill result in a failure to start
.pache.
Lastl,+ ,ou need to restart .pache. 3o do this+ t,pe the follo&in1 co##and:
/usr/s(in/apachectl restart
$o&+ ,ou should have a &or7in1 L.MP confi1uration. If ,ou &ant #ore infor#ation on settin1 up a
L.MP environ#ent+ please read the follo&in1 tutorial that I &rote:
http://hns1.net/tutorials/la#p.ht#l
$o&+ &e need to cover installin1 Wordpress. 4or the initial installation+ instructions can (e follo&ed
fro# the (elo& lin7:
http://codex.&ordpress.or1/Installin18WordPress@4a#ous8A;Minute8Install
6ou should no& have a &or7in1 Wordpress installation.
Site Specific Issues; cop,in1 Wordpress to another site
3o cop, Wordpress to another &e(site+ several steps are re-uired. 6ou #ust first cop, the source
director,+ then ,ou #ust create the data(ase for the ne& site )and >install? Wordpress*+ and lastl, ,ou
#ust ena(le &ildcard "$S loo7ups.
3o cop, the source files to another site+ issue the follo&in1 co##and )assu#in1 that ,our &or7in1+ or
current director, is /var/&&&:
cp ;% &ordpress sitename
Where sitename is the na#e of the site that ,ou &ant to cop, Wordpress to. 4or instance+ if &e &ere to
cop, the Wordpress site to the site sa#ple.co#+ &e &ould issue the follo&in1 co##and:
cp ;% &ordpress sa#ple.co#
$ext+ ,ou need to create a ne& data(ase for the ne& site. 3o do this+ issue the follo&in1 co##ands:
#,s-l ;u root ;p
M,S/L &ill then as7 ,ou for ,our root pass&ord+ &hich is "4hudf'. $ext+ ,ou &ill enter the
follo&in1 co##ands in the M,S/L console:
C%B.3B ".3.5.SB sa#pleC
-uitC
$ext+ ,ou need to edit the file sitename/&ordpress/&p;confi1.php. 6ou &ill need to edit the third line
in this file+ fro# scienceindex+ to the na#e of ,our data(ase+ &hich is in this case sa#ple. 3his line
should loo7 li7e this no&:
define)D"58$.MBD+ Dsa#pleD*C // 3he na#e of the data(ase
$o&+ ,ou should (e a(le to pull up the E%L www.sitename.com /&ordpress/&p;ad#in/install.php +
&hich &ill create the data(ase ta(les+ and assi1n the ad#inistrator pass&ord. 3he ad#in pass&ord is
rando#l, 1enerated+ so ,ou &ill need to docu#ent it immediatelyF
$o&+ ,ou #ust ena(le &ildcard "$S loo7ups in ,our 5I$" confi1uration+ and ,ou #ust also ena(le
,our site to function &ith &ildcard "$S loo7ups &ith .pache )since .pache is currentl, setup Gust to
allo& www.domainname.com. 3o do this+ edit the follo&in1 files:
/var/na#ed/#aster/sitename.com
4or instance+ in our exa#ple+ &e &ill edit /var/na#ed/#aster/tf-ha.co#. 6ou then need to insert a line
at the (otto# of this file+ &hich &ill read:
H I$ . 12.!.!.1
$ext+ ,ou #ust restart 5I$". 3o do this+ t,pe the follo&in1 co##and:
ps ;&aux I 1rep Jna#edJ
In this exa#ple+ I received the follo&in1 output:
8s,slo1d 2:9'1 !.! !.1 2K2 A<' LL S :.pr!: !:!2.:9 s,slo1d ;a /var/na#ed/dev/lo1 ;a
/var/e#pt,/dev/lo1
root 1:K!< !.! !.1 1A<' A:< LL Is 1:12.M !:!!.!1 na#ed: MprivN )na#ed*
na#ed 2'29 !.! !.: 29:' 22< LL S 1:12.M !:!9.!1 /usr/s(in/na#ed
$ext+ &e &ill need to >7ill? these processes+ and re;launch 5I$". 3o do this+ locate the process I"
field nu#(ers+ in this case 1:K!< and 2'29+ and then enter the follo&in1 co##and:
7ill ;K number
2nce those t&o processes have (een stopped+ start 5I$" (, t,pin1:
/usr/s(in/na#ed
Lastl,+ edit the .pache virtual host file located in /var/&&&/conf/vhosts.txt. .dd the follo&in1 line
after ,our sitename virtual host entr,:
Server.lias H.sitename.com
4or instance+ our site virtual host &ill no& loo7 li7e this:
@@5BOI$sa#ple.co#
PQirtual0ost 12.!.!.1:'!R
Server.d#in &e(#asterSsa#ple.co#
"ocu#ent%oot /var/&&&/sa#ple.co#
Server$a#e &&&.sa#ple.co#
BrrorLo1 lo1s/sa#ple.co#;error8lo1
Custo#Lo1 lo1s/sa#ple.co#;access8lo1 co#(ined
2ptions TIncludes
Script.lias /c1i;(in/ J/var/&&&/sa#ple.co#/c1i;(in/J
ServerAlias *.sample.com
P/Qirtual0ostR
@@B$"sa#ple.co#
$o&+ ,ou can restart .pache. %estart .pache (, enterin1 the follo&in1 co##and:
/usr/s(in/apachectl restart
Lastl,+ ,ou #a, ena(le ,our plu1ins+ and ever,thin1 should &or7 perfectl,.
PASSWORDS USED DURING THE SETUP O WORDPRESS
6our pass&ord for sa#ple.co#Ds ad#in account:
fd1dA:
6our pass&ord for sa#ple;exa#ple.co#Ds ad#in account:
dsfdfd<r:A<:A
M,S/L root pass&ord:
O4"1ftr,<'hGhA<:

You might also like