PageRenderTime 53ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/en/html/nonroot.html

https://code.google.com/p/bugzilla4intranet/
HTML | 745 lines | 742 code | 3 blank | 0 comment | 0 complexity | d121e280604a6babcbe1ef99729f68c4 MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <HTML
  3. ><HEAD
  4. ><TITLE
  5. >UNIX (non-root) Installation Notes</TITLE
  6. ><META
  7. NAME="GENERATOR"
  8. CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
  9. REL="HOME"
  10. TITLE="The Bugzilla Guide - 3.6.4
  11. Release"
  12. HREF="index.html"><LINK
  13. REL="UP"
  14. TITLE="Installing Bugzilla"
  15. HREF="installing-bugzilla.html"><LINK
  16. REL="PREVIOUS"
  17. TITLE="OS-Specific Installation Notes"
  18. HREF="os-specific.html"><LINK
  19. REL="NEXT"
  20. TITLE="Upgrading to New Releases"
  21. HREF="upgrade.html"></HEAD
  22. ><BODY
  23. CLASS="section"
  24. BGCOLOR="#FFFFFF"
  25. TEXT="#000000"
  26. LINK="#0000FF"
  27. VLINK="#840084"
  28. ALINK="#0000FF"
  29. ><DIV
  30. CLASS="NAVHEADER"
  31. ><TABLE
  32. SUMMARY="Header navigation table"
  33. WIDTH="100%"
  34. BORDER="0"
  35. CELLPADDING="0"
  36. CELLSPACING="0"
  37. ><TR
  38. ><TH
  39. COLSPAN="3"
  40. ALIGN="center"
  41. >The Bugzilla Guide - 3.6.4
  42. Release</TH
  43. ></TR
  44. ><TR
  45. ><TD
  46. WIDTH="10%"
  47. ALIGN="left"
  48. VALIGN="bottom"
  49. ><A
  50. HREF="os-specific.html"
  51. ACCESSKEY="P"
  52. >Prev</A
  53. ></TD
  54. ><TD
  55. WIDTH="80%"
  56. ALIGN="center"
  57. VALIGN="bottom"
  58. >Chapter 2. Installing Bugzilla</TD
  59. ><TD
  60. WIDTH="10%"
  61. ALIGN="right"
  62. VALIGN="bottom"
  63. ><A
  64. HREF="upgrade.html"
  65. ACCESSKEY="N"
  66. >Next</A
  67. ></TD
  68. ></TR
  69. ></TABLE
  70. ><HR
  71. ALIGN="LEFT"
  72. WIDTH="100%"></DIV
  73. ><DIV
  74. CLASS="section"
  75. ><H1
  76. CLASS="section"
  77. ><A
  78. NAME="nonroot"
  79. >2.6. UNIX (non-root) Installation Notes</A
  80. ></H1
  81. ><DIV
  82. CLASS="section"
  83. ><H2
  84. CLASS="section"
  85. ><A
  86. NAME="AEN857"
  87. >2.6.1. Introduction</A
  88. ></H2
  89. ><P
  90. >If you are running a *NIX OS as non-root, either due
  91. to lack of access (web hosts, for example) or for security
  92. reasons, this will detail how to install Bugzilla on such
  93. a setup. It is recommended that you read through the
  94. <A
  95. HREF="installation.html"
  96. >Section 2.1</A
  97. >
  98. first to get an idea on the installation steps required.
  99. (These notes will reference to steps in that guide.)</P
  100. ></DIV
  101. ><DIV
  102. CLASS="section"
  103. ><H2
  104. CLASS="section"
  105. ><A
  106. NAME="AEN861"
  107. >2.6.2. MySQL</A
  108. ></H2
  109. ><P
  110. >You may have MySQL installed as root. If you're
  111. setting up an account with a web host, a MySQL account
  112. needs to be set up for you. From there, you can create
  113. the bugs account, or use the account given to you.</P
  114. ><DIV
  115. CLASS="warning"
  116. ><P
  117. ></P
  118. ><TABLE
  119. CLASS="warning"
  120. WIDTH="100%"
  121. BORDER="0"
  122. ><TR
  123. ><TD
  124. WIDTH="25"
  125. ALIGN="CENTER"
  126. VALIGN="TOP"
  127. ><IMG
  128. SRC="../images/warning.gif"
  129. HSPACE="5"
  130. ALT="Warning"></TD
  131. ><TD
  132. ALIGN="LEFT"
  133. VALIGN="TOP"
  134. ><P
  135. >You may have problems trying to set up
  136. <B
  137. CLASS="command"
  138. >GRANT</B
  139. > permissions to the database.
  140. If you're using a web host, chances are that you have a
  141. separate database which is already locked down (or one big
  142. database with limited/no access to the other areas), but you
  143. may want to ask your system administrator what the security
  144. settings are set to, and/or run the <B
  145. CLASS="command"
  146. >GRANT</B
  147. >
  148. command for you.</P
  149. ><P
  150. >Also, you will probably not be able to change the MySQL
  151. root user password (for obvious reasons), so skip that
  152. step.</P
  153. ></TD
  154. ></TR
  155. ></TABLE
  156. ></DIV
  157. ><DIV
  158. CLASS="section"
  159. ><H3
  160. CLASS="section"
  161. ><A
  162. NAME="AEN869"
  163. >2.6.2.1. Running MySQL as Non-Root</A
  164. ></H3
  165. ><DIV
  166. CLASS="section"
  167. ><H4
  168. CLASS="section"
  169. ><A
  170. NAME="AEN871"
  171. >2.6.2.1.1. The Custom Configuration Method</A
  172. ></H4
  173. ><P
  174. >Create a file .my.cnf in your
  175. home directory (using /home/foo in this example)
  176. as follows....</P
  177. ><TABLE
  178. BORDER="0"
  179. BGCOLOR="#E0E0E0"
  180. WIDTH="100%"
  181. ><TR
  182. ><TD
  183. ><FONT
  184. COLOR="#000000"
  185. ><PRE
  186. CLASS="programlisting"
  187. >&#13;[mysqld]
  188. datadir=/home/foo/mymysql
  189. socket=/home/foo/mymysql/thesock
  190. port=8081
  191. [mysql]
  192. socket=/home/foo/mymysql/thesock
  193. port=8081
  194. [mysql.server]
  195. user=mysql
  196. basedir=/var/lib
  197. [safe_mysqld]
  198. err-log=/home/foo/mymysql/the.log
  199. pid-file=/home/foo/mymysql/the.pid
  200. </PRE
  201. ></FONT
  202. ></TD
  203. ></TR
  204. ></TABLE
  205. ></DIV
  206. ><DIV
  207. CLASS="section"
  208. ><H4
  209. CLASS="section"
  210. ><A
  211. NAME="AEN875"
  212. >2.6.2.1.2. The Custom Built Method</A
  213. ></H4
  214. ><P
  215. >You can install MySQL as a not-root, if you really need to.
  216. Build it with PREFIX set to <TT
  217. CLASS="filename"
  218. >/home/foo/mysql</TT
  219. >,
  220. or use pre-installed executables, specifying that you want
  221. to put all of the data files in <TT
  222. CLASS="filename"
  223. >/home/foo/mysql/data</TT
  224. >.
  225. If there is another MySQL server running on the system that you
  226. do not own, use the -P option to specify a TCP port that is not
  227. in use.</P
  228. ></DIV
  229. ><DIV
  230. CLASS="section"
  231. ><H4
  232. CLASS="section"
  233. ><A
  234. NAME="AEN880"
  235. >2.6.2.1.3. Starting the Server</A
  236. ></H4
  237. ><P
  238. >After your mysqld program is built and any .my.cnf file is
  239. in place, you must initialize the databases (ONCE).</P
  240. ><TABLE
  241. BORDER="0"
  242. BGCOLOR="#E0E0E0"
  243. WIDTH="100%"
  244. ><TR
  245. ><TD
  246. ><FONT
  247. COLOR="#000000"
  248. ><PRE
  249. CLASS="screen"
  250. >&#13; <SAMP
  251. CLASS="prompt"
  252. >bash$</SAMP
  253. >
  254. <B
  255. CLASS="command"
  256. >mysql_install_db</B
  257. >
  258. </PRE
  259. ></FONT
  260. ></TD
  261. ></TR
  262. ></TABLE
  263. ><P
  264. >Then start the daemon with</P
  265. ><TABLE
  266. BORDER="0"
  267. BGCOLOR="#E0E0E0"
  268. WIDTH="100%"
  269. ><TR
  270. ><TD
  271. ><FONT
  272. COLOR="#000000"
  273. ><PRE
  274. CLASS="screen"
  275. >&#13; <SAMP
  276. CLASS="prompt"
  277. >bash$</SAMP
  278. >
  279. <B
  280. CLASS="command"
  281. >safe_mysql &#38;</B
  282. >
  283. </PRE
  284. ></FONT
  285. ></TD
  286. ></TR
  287. ></TABLE
  288. ><P
  289. >After you start mysqld the first time, you then connect to
  290. it as "root" and <B
  291. CLASS="command"
  292. >GRANT</B
  293. > permissions to other
  294. users. (Again, the MySQL root account has nothing to do with
  295. the *NIX root account.)</P
  296. ><DIV
  297. CLASS="note"
  298. ><P
  299. ></P
  300. ><TABLE
  301. CLASS="note"
  302. WIDTH="100%"
  303. BORDER="0"
  304. ><TR
  305. ><TD
  306. WIDTH="25"
  307. ALIGN="CENTER"
  308. VALIGN="TOP"
  309. ><IMG
  310. SRC="../images/note.gif"
  311. HSPACE="5"
  312. ALT="Note"></TD
  313. ><TD
  314. ALIGN="LEFT"
  315. VALIGN="TOP"
  316. ><P
  317. >You will need to start the daemons yourself. You can either
  318. ask your system administrator to add them to system startup files, or
  319. add a crontab entry that runs a script to check on these daemons
  320. and restart them if needed.</P
  321. ></TD
  322. ></TR
  323. ></TABLE
  324. ></DIV
  325. ><DIV
  326. CLASS="warning"
  327. ><P
  328. ></P
  329. ><TABLE
  330. CLASS="warning"
  331. WIDTH="100%"
  332. BORDER="0"
  333. ><TR
  334. ><TD
  335. WIDTH="25"
  336. ALIGN="CENTER"
  337. VALIGN="TOP"
  338. ><IMG
  339. SRC="../images/warning.gif"
  340. HSPACE="5"
  341. ALT="Warning"></TD
  342. ><TD
  343. ALIGN="LEFT"
  344. VALIGN="TOP"
  345. ><P
  346. >Do NOT run daemons or other services on a server without first
  347. consulting your system administrator! Daemons use up system resources
  348. and running one may be in violation of your terms of service for any
  349. machine on which you are a user!</P
  350. ></TD
  351. ></TR
  352. ></TABLE
  353. ></DIV
  354. ></DIV
  355. ></DIV
  356. ></DIV
  357. ><DIV
  358. CLASS="section"
  359. ><H2
  360. CLASS="section"
  361. ><A
  362. NAME="AEN896"
  363. >2.6.3. Perl</A
  364. ></H2
  365. ><P
  366. >&#13; On the extremely rare chance that you don't have Perl on
  367. the machine, you will have to build the sources
  368. yourself. The following commands should get your system
  369. installed with your own personal version of Perl:
  370. </P
  371. ><TABLE
  372. BORDER="0"
  373. BGCOLOR="#E0E0E0"
  374. WIDTH="100%"
  375. ><TR
  376. ><TD
  377. ><FONT
  378. COLOR="#000000"
  379. ><PRE
  380. CLASS="screen"
  381. >&#13; <SAMP
  382. CLASS="prompt"
  383. >bash$</SAMP
  384. >
  385. <B
  386. CLASS="command"
  387. >wget http://perl.org/CPAN/src/stable.tar.gz</B
  388. >
  389. <SAMP
  390. CLASS="prompt"
  391. >bash$</SAMP
  392. >
  393. <B
  394. CLASS="command"
  395. >tar zvxf stable.tar.gz</B
  396. >
  397. <SAMP
  398. CLASS="prompt"
  399. >bash$</SAMP
  400. >
  401. <B
  402. CLASS="command"
  403. >cd perl-5.8.1</B
  404. > (or whatever the version of Perl is called)
  405. <SAMP
  406. CLASS="prompt"
  407. >bash$</SAMP
  408. >
  409. <B
  410. CLASS="command"
  411. >sh Configure -de -Dprefix=/home/foo/perl</B
  412. >
  413. <SAMP
  414. CLASS="prompt"
  415. >bash$</SAMP
  416. >
  417. <B
  418. CLASS="command"
  419. >make &#38;&#38; make test &#38;&#38; make install</B
  420. >
  421. </PRE
  422. ></FONT
  423. ></TD
  424. ></TR
  425. ></TABLE
  426. ><P
  427. >&#13; Once you have Perl installed into a directory (probably
  428. in <TT
  429. CLASS="filename"
  430. >~/perl/bin</TT
  431. >), you will need to
  432. install the Perl Modules, described below.
  433. </P
  434. ></DIV
  435. ><DIV
  436. CLASS="section"
  437. ><H2
  438. CLASS="section"
  439. ><A
  440. NAME="install-perlmodules-nonroot"
  441. >2.6.4. Perl Modules</A
  442. ></H2
  443. ><P
  444. >&#13; Installing the Perl modules as a non-root user is accomplished by
  445. running the <TT
  446. CLASS="filename"
  447. >install-module.pl</TT
  448. >
  449. script. For more details on this script, see
  450. <A
  451. HREF="api/install-module.html"
  452. TARGET="_top"
  453. ><TT
  454. CLASS="filename"
  455. >install-module.pl</TT
  456. >
  457. documentation</A
  458. >
  459. </P
  460. ></DIV
  461. ><DIV
  462. CLASS="section"
  463. ><H2
  464. CLASS="section"
  465. ><A
  466. NAME="AEN918"
  467. >2.6.5. HTTP Server</A
  468. ></H2
  469. ><P
  470. >Ideally, this also needs to be installed as root and
  471. run under a special web server account. As long as
  472. the web server will allow the running of *.cgi files outside of a
  473. cgi-bin, and a way of denying web access to certain files (such as a
  474. .htaccess file), you should be good in this department.</P
  475. ><DIV
  476. CLASS="section"
  477. ><H3
  478. CLASS="section"
  479. ><A
  480. NAME="AEN921"
  481. >2.6.5.1. Running Apache as Non-Root</A
  482. ></H3
  483. ><P
  484. >You can run Apache as a non-root user, but the port will need
  485. to be set to one above 1024. If you type <B
  486. CLASS="command"
  487. >httpd -V</B
  488. >,
  489. you will get a list of the variables that your system copy of httpd
  490. uses. One of those, namely HTTPD_ROOT, tells you where that
  491. installation looks for its config information.</P
  492. ><P
  493. >From there, you can copy the config files to your own home
  494. directory to start editing. When you edit those and then use the -d
  495. option to override the HTTPD_ROOT compiled into the web server, you
  496. get control of your own customized web server.</P
  497. ><DIV
  498. CLASS="note"
  499. ><P
  500. ></P
  501. ><TABLE
  502. CLASS="note"
  503. WIDTH="100%"
  504. BORDER="0"
  505. ><TR
  506. ><TD
  507. WIDTH="25"
  508. ALIGN="CENTER"
  509. VALIGN="TOP"
  510. ><IMG
  511. SRC="../images/note.gif"
  512. HSPACE="5"
  513. ALT="Note"></TD
  514. ><TD
  515. ALIGN="LEFT"
  516. VALIGN="TOP"
  517. ><P
  518. >You will need to start the daemons yourself. You can either
  519. ask your system administrator to add them to system startup files, or
  520. add a crontab entry that runs a script to check on these daemons
  521. and restart them if needed.</P
  522. ></TD
  523. ></TR
  524. ></TABLE
  525. ></DIV
  526. ><DIV
  527. CLASS="warning"
  528. ><P
  529. ></P
  530. ><TABLE
  531. CLASS="warning"
  532. WIDTH="100%"
  533. BORDER="0"
  534. ><TR
  535. ><TD
  536. WIDTH="25"
  537. ALIGN="CENTER"
  538. VALIGN="TOP"
  539. ><IMG
  540. SRC="../images/warning.gif"
  541. HSPACE="5"
  542. ALT="Warning"></TD
  543. ><TD
  544. ALIGN="LEFT"
  545. VALIGN="TOP"
  546. ><P
  547. >Do NOT run daemons or other services on a server without first
  548. consulting your system administrator! Daemons use up system resources
  549. and running one may be in violation of your terms of service for any
  550. machine on which you are a user!</P
  551. ></TD
  552. ></TR
  553. ></TABLE
  554. ></DIV
  555. ></DIV
  556. ></DIV
  557. ><DIV
  558. CLASS="section"
  559. ><H2
  560. CLASS="section"
  561. ><A
  562. NAME="AEN930"
  563. >2.6.6. Bugzilla</A
  564. ></H2
  565. ><P
  566. >&#13; When you run <B
  567. CLASS="command"
  568. >./checksetup.pl</B
  569. > to create
  570. the <TT
  571. CLASS="filename"
  572. >localconfig</TT
  573. > file, it will list the Perl
  574. modules it finds. If one is missing, go back and double-check the
  575. module installation from <A
  576. HREF="nonroot.html#install-perlmodules-nonroot"
  577. >Section 2.6.4</A
  578. >,
  579. then delete the <TT
  580. CLASS="filename"
  581. >localconfig</TT
  582. > file and try again.
  583. </P
  584. ><DIV
  585. CLASS="warning"
  586. ><P
  587. ></P
  588. ><TABLE
  589. CLASS="warning"
  590. WIDTH="100%"
  591. BORDER="0"
  592. ><TR
  593. ><TD
  594. WIDTH="25"
  595. ALIGN="CENTER"
  596. VALIGN="TOP"
  597. ><IMG
  598. SRC="../images/warning.gif"
  599. HSPACE="5"
  600. ALT="Warning"></TD
  601. ><TD
  602. ALIGN="LEFT"
  603. VALIGN="TOP"
  604. ><P
  605. >One option in <TT
  606. CLASS="filename"
  607. >localconfig</TT
  608. > you
  609. might have problems with is the web server group. If you can't
  610. successfully browse to the <TT
  611. CLASS="filename"
  612. >index.cgi</TT
  613. > (like
  614. a Forbidden error), you may have to relax your permissions,
  615. and blank out the web server group. Of course, this may pose
  616. as a security risk. Having a properly jailed shell and/or
  617. limited access to shell accounts may lessen the security risk,
  618. but use at your own risk.</P
  619. ></TD
  620. ></TR
  621. ></TABLE
  622. ></DIV
  623. ><DIV
  624. CLASS="section"
  625. ><H3
  626. CLASS="section"
  627. ><A
  628. NAME="suexec"
  629. >2.6.6.1. suexec or shared hosting</A
  630. ></H3
  631. ><P
  632. >If you are running on a system that uses suexec (most shared
  633. hosting environments do this), you will need to set the
  634. <EM
  635. >webservergroup</EM
  636. > value in <TT
  637. CLASS="filename"
  638. >localconfig</TT
  639. >
  640. to match <EM
  641. >your</EM
  642. > primary group, rather than the one
  643. the web server runs under. You will need to run the following
  644. shell commands after running <B
  645. CLASS="command"
  646. >./checksetup.pl</B
  647. >,
  648. every time you run it (or modify <TT
  649. CLASS="filename"
  650. >checksetup.pl</TT
  651. >
  652. to do them for you via the system() command).
  653. <TABLE
  654. BORDER="0"
  655. BGCOLOR="#E0E0E0"
  656. WIDTH="100%"
  657. ><TR
  658. ><TD
  659. ><FONT
  660. COLOR="#000000"
  661. ><PRE
  662. CLASS="programlisting"
  663. > for i in docs graphs images js skins; do find $i -type d -exec chmod o+rx {} \; ; done
  664. for i in jpg gif css js png html rdf xul; do find . -name \*.$i -exec chmod o+r {} \; ; done
  665. find . -name .htaccess -exec chmod o+r {} \;
  666. chmod o+x . data data/webdot</PRE
  667. ></FONT
  668. ></TD
  669. ></TR
  670. ></TABLE
  671. >
  672. Pay particular attention to the number of semicolons and dots.
  673. They are all important. A future version of Bugzilla will
  674. hopefully be able to do this for you out of the box.</P
  675. ></DIV
  676. ></DIV
  677. ></DIV
  678. ><DIV
  679. CLASS="NAVFOOTER"
  680. ><HR
  681. ALIGN="LEFT"
  682. WIDTH="100%"><TABLE
  683. SUMMARY="Footer navigation table"
  684. WIDTH="100%"
  685. BORDER="0"
  686. CELLPADDING="0"
  687. CELLSPACING="0"
  688. ><TR
  689. ><TD
  690. WIDTH="33%"
  691. ALIGN="left"
  692. VALIGN="top"
  693. ><A
  694. HREF="os-specific.html"
  695. ACCESSKEY="P"
  696. >Prev</A
  697. ></TD
  698. ><TD
  699. WIDTH="34%"
  700. ALIGN="center"
  701. VALIGN="top"
  702. ><A
  703. HREF="index.html"
  704. ACCESSKEY="H"
  705. >Home</A
  706. ></TD
  707. ><TD
  708. WIDTH="33%"
  709. ALIGN="right"
  710. VALIGN="top"
  711. ><A
  712. HREF="upgrade.html"
  713. ACCESSKEY="N"
  714. >Next</A
  715. ></TD
  716. ></TR
  717. ><TR
  718. ><TD
  719. WIDTH="33%"
  720. ALIGN="left"
  721. VALIGN="top"
  722. >OS-Specific Installation Notes</TD
  723. ><TD
  724. WIDTH="34%"
  725. ALIGN="center"
  726. VALIGN="top"
  727. ><A
  728. HREF="installing-bugzilla.html"
  729. ACCESSKEY="U"
  730. >Up</A
  731. ></TD
  732. ><TD
  733. WIDTH="33%"
  734. ALIGN="right"
  735. VALIGN="top"
  736. >Upgrading to New Releases</TD
  737. ></TR
  738. ></TABLE
  739. ></DIV
  740. ></BODY
  741. ></HTML
  742. >