Permalink
Browse files

review/fix formatting for 2010-2012 posts

  • Loading branch information...
1 parent 740d96b commit cca280f682e09148dcd948b601fc27f0c2dc36cb @gerold gerold committed Jul 3, 2012
@@ -19,15 +19,19 @@ tags:
---
Absolute Path Error:
-` cvs [checkout aborted]: absolute pathnames invalid for server (specified `/path/drupalsite/')`
+```
+cvs [checkout aborted]: absolute pathnames invalid for server (specified `/path/drupalsite/')
+```
Ok, I got the error above when I performed Drupal CVS update on our Debian server (newly installed CVS 1.12.13). The same command works on other server with older CVS installation. The issue is the reference to local cvs directory where I used absolute path (-d /path/drupalsite/), which is a bug (security hole on client side) - it was fixed on newer CVS version to use relative path.
Drupal Checkout Command:
-` cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal co -r DRUPAL-6-15 -d /path/drupalsite/ drupal`
+```
+cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal co -r DRUPAL-6-15 -d /path/drupalsite/ drupal
+```
Use of Relative Path (sample)
-` cd /path
- cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal co -r DRUPAL-6-15 -d drupalsite drupal`
-
-
+```
+cd /path
+cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal co -r DRUPAL-6-15 -d drupalsite drupal
+```
@@ -22,18 +22,25 @@ I made a copy of Drupal6 site with [SecurePages](http://drupal.org/project/secur
The problem is on the copied site that is on a new domain as we cannot login and go to the admin section because it redirect back to the source/original site. What we need is either disable the securepages module or update the domains. To do this, you need to access your database (ex: phpmyadmin, etc), go to _variable_ table, and search for _securepages_ configurations.
If you want to disable the module change:
-`securepages_enable s:1:"**1**";`
+```
+securepages_enable s:1:"**1**";
+```
to
-`securepages_enable s:1:"**0**";`
+```
+securepages_enable s:1:"**0**";
+```
Or if you want to update the domain change:
-`securepages_basepath s:30:"http://**www.domain.com**";
-securepages_basepath_ssl s:31:"https://**www.domain.com**";`
+```
+securepages_basepath s:30:"http://**www.domain.com**";
+securepages_basepath_ssl s:31:"https://**www.domain.com**";
+```
to
-`securepages_basepath s:30:"http://**www.newdomain.com**";
-securepages_basepath_ssl s:31:"https://**www.newdomain.com**";`
+```
+securepages_basepath s:30:"http://**www.newdomain.com**";
+securepages_basepath_ssl s:31:"https://**www.newdomain.com**";
+```
-After making the above changes **don't forget** to run the update.php (http://www.newdomain.com/update.php)
+After making the above changes **don't forget** to run the update.php (`http://www.newdomain.com/update.php`)
If you want to uninstall the module, try removing the securepages directory and run update.php.
-
@@ -23,133 +23,62 @@ tags:
Here's my quick install guide for Solr, Tomcat, and Drupal ApacheSolr module for multiple sites. Mostly I based the steps below from the following sites: [wiki.apache.org](http://wiki.apache.org/solr/SolrTomcat) and [drupalconnect.com](http://www.drupalconnect.com/blog/steve/configuring-apache-solr-multi-core-drupal-and-tomcat-ubuntu-910).
**Detailed Setup:**
-
-
-
* Drupal 6.19
-
-
* ApacheSolr module 6-1.1
-
-
* Apache Solr PHP Client Library: Rev.22
-
-
* Solr 1.4.1
-
-
* Tomcat 6.0.29
-
-
* SunJDK 6update21
-
-
* RHEL5.5x64
-
-
**Install Process: Tomcat**
-
-
-
- * Create _solr_ user
-
-
+ * Create `solr` user
* Download [Tomcat6](http://tomcat.apache.org/download-60.cgi)
-
-
- * Extract to _/opt/tomcat_  _**this will be the $CATALINA_HOME directory, you can use any dir you want_
-
-
- * Edit _/opt/tomcat/conf/tomcat-users.xml_ to enable Tomcat login.  See comments in this file.
-
+ * Extract to `/opt/tomcat`*this will be the `$CATALINA_HOME` directory, you can use any dir you want*
+ * Edit `/opt/tomcat/conf/tomcat-users.xml` to enable Tomcat login.  See comments in this file.
```
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="manager,admin"/>
```
-
-
-
-
- * Test run your Tomcat:  _/opt/tomcat/bin/catalina.sh run_. Chown all Tomcat files to _solr_ user (`chown -R solr.solr /opt/tomcat`). Default server setting will use _port 8080_, to customized edit the file _/opt/tomcat/conf/server.xml_. If you encounter error on "_BASEDIR environment variable is not defined correctly..._", check permissions of _.sh_ files inside _/opt/tomcat/bin/_ and make them executable (`chmod 755 /opt/tomcat/bin/*.sh`).
-
-
-
+ * Test run your Tomcat:  `/opt/tomcat/bin/catalina.sh run`. Chown all Tomcat files to `solr` user (`chown -R solr.solr /opt/tomcat`). Default server setting will use port 8080, to customized edit the file `/opt/tomcat/conf/server.xml`. If you encounter error on "_BASEDIR environment variable is not defined correctly..._", check permissions of `.sh` files inside `/opt/tomcat/bin/` and make them executable (`chmod 755 /opt/tomcat/bin/*.sh`).
* Add startup (init) script. Copy this [Tomcat6 init file](http://wiki.apache.org/solr/SolrTomcat?action=AttachFile&do=view&target=tomcat6) from Apache.org to _/etc/init.d/tomcat6_.  Check and update variables like Java home, Tomcat directory, etc, if needed. Add to startup `/sbin/chkconfig --add tomcat6` and `/sbin/chkconfig tomcat6 on`. Dependencies: redhat-lsb (or lsb-base?)
-
-
-
* Visit your Tomcat Admin page. ex _http://localhost:8080_
-
-
**Install Process: Solr**
-
-
-
* Download [Solr](http://mirrors.igsobe.com/apache/lucene/solr/)
-
-
- * Extract to temporary location, ex: _/opt/apache-solr-1.4.1_
-
-
- * Copy _/opt/apache-solr-1.4.1/dist/apache-solr-1.4.1.war_ to _/opt/tomcat/webapps/solr.war_
-
-
- * Copy _/opt/apache-solr-1.4.1/example/solr_ directory to _/opt/tomcat/solr  **this will be the $SOLR_HOME directory, you can use any dir you want_
-
-
- * Create file _/opt/tomcat/conf/Catalina/localhost/solr.xml_ with the following configuration.  Make sure paths are correct.
-
-
+ * Extract to temporary location, ex: `/opt/apache-solr-1.4.1`
+ * Copy `/opt/apache-solr-1.4.1/dist/apache-solr-1.4.1.war` to `/opt/tomcat/webapps/solr.war`
+ * Copy `/opt/apache-solr-1.4.1/example/solr` directory to `/opt/tomcat/solr`  *this will be the `$SOLR_HOME` directory, you can use any dir you want*
+ * Create file `/opt/tomcat/conf/Catalina/localhost/solr.xml` with the following configuration.  Make sure paths are correct.
```
<Context docBase="/opt/tomcat/webapps/solr.war" debug="0" privileged="true" allowLinking="true" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/opt/tomcat/solr" override="true" />
</Context>
```
**Install Process: ApacheSolr Drupal module and SolrPHP client**
-
-
-
-
- * Install/enable [Drupal ApacheSolr](http://drupal.org/project/apachesolr) module. Drush, CVS, or traditional install - whatever you want.  Example: _/var/www/site1/sites/all/modules/apachesolr_
-
+ * Install/enable [Drupal ApacheSolr](http://drupal.org/project/apachesolr) module. Drush, CVS, or traditional install - whatever you want.  Example: `/var/www/site1/sites/all/modules/apachesolr`
* Download [SolrPHP client library](http://code.google.com/p/solr-php-client/)
**Configure Solr for Multi-Core Setup**
-
-
-
-
- * Copy _/var/www/site1/sites/all/modules/apachesolr/schema.xml_ to _/opt/tomcat/solr/conf/schema.xml_
-
-
- * Copy _/var/www/site1/sites/all/modules/apachesolr/solrconfig.xml_ to _/opt/tomcat/solr/conf/solrconfig.xml_
-
-
- * Copy _/opt/apache-solr-1.4.1/example/multicore/solr.xml_ to _/opt/tomcat/solr/solr.xml_
-
- * Create directory for each site and copy _/opt/tomcat/solr/conf _ directory to each of them. Example:
-
-
+ * Copy `/var/www/site1/sites/all/modules/apachesolr/schema.xml` to `/opt/tomcat/solr/conf/schema.xml`
+ * Copy `/var/www/site1/sites/all/modules/apachesolr/solrconfig.xml` to `/opt/tomcat/solr/conf/solrconfig.xml`
+ * Copy `/opt/apache-solr-1.4.1/example/multicore/solr.xml` to `/opt/tomcat/solr/solr.xml`
+ * Create directory for each site and copy `/opt/tomcat/solr/conf` directory to each of them. Example:
+```
mkdir /opt/tomcat/solr/site1
mkdir /opt/tomcat/solr/site2
cp -r /opt/tomcat/solr/conf /opt/tomcat/solr/site1/
cp -r /opt/tomcat/solr/conf /opt/tomcat/solr/site2/
-
-
-
-
- * Edit _/opt/tomcat/solr/solr.xml_ with the following config:
-
+```
+ * Edit `/opt/tomcat/solr/solr.xml` with the following config:
```
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="false">
@@ -159,26 +88,17 @@ Here's my quick install guide for Solr, Tomcat, and Drupal ApacheSolr module for
</cores>
</solr>
```
-
- * Start or Restart Tomcat: _/etc/init.d/tomcat6 start_
-
- * Visit _http://localhost:8080/_ and go to you Solr App
+ * Start or Restart Tomcat: `/etc/init.d/tomcat6 start`
+ * Visit `http://localhost:8080/` and go to you Solr App
**Configure Drupal site:**
-
- * Go to ApacheSolr settings _http://localhost/admin/settings/apachesolr_
-
-
- * Save your config and if all is good you'll see message: _Your site has contacted the Apache Solr server._
-
+ * Go to ApacheSolr settings `http://localhost/admin/settings/apachesolr`
+ * Save your config and if all is good you'll see message: `Your site has contacted the Apache Solr server.`
```
Solr host name: localhost
Solr port: 8080
Solr path (for site1): /solr/site1
```
-
* Configure your search index.
-
-
@@ -23,37 +23,37 @@ tags:
Quick install guide for SVN with mod_dav_svn (http/https) repository access on Cpanel server running CentOs5.
**Configure Cpanel for SVN**
-Recompile Apache/PHP (_WHM -> Software -> EasyApache_) and enable support for the following:
-
-
-
-
- * Dav (_Among other things mod_dav can be used by DAV enabled Frontpage clients instead of FP extensions_)
-
- * BerkeleyDB. **Note**: BerkeleyDB support ("_--with-berkeley-db_") is not enabled by default in EasyApache so you need to add this manually to your EasyApache config using [this guide](http://docs.cpanel.net/twiki/bin/view/EasyApache3/CustomConfigureFlags) or [this one](http://community.eapps.com/showthread.php?271-Adding-subversion-support-to-Apache).
+Recompile Apache/PHP (_WHM -> Software -> EasyApache_) and enable support for the following:
+* Dav (_Among other things mod_dav can be used by DAV enabled Frontpage clients instead of FP extensions_)
+* BerkeleyDB. **Note**: BerkeleyDB support ("_--with-berkeley-db_") is not enabled by default in EasyApache so you need to add this manually to your EasyApache config using [this guide](http://docs.cpanel.net/twiki/bin/view/EasyApache3/CustomConfigureFlags) or [this one](http://community.eapps.com/showthread.php?271-Adding-subversion-support-to-Apache).
**Install Subversion and mod_dav_svn**
+
Install subversion using yum (_yum install subversion_) or install it from source. At this time CentOS repo version is 1.4.x and the latest from source is 1.6.x.
**Install and enable mod_dav_svn in Cpanel**
-Install mod_dav_svn using yum (_yum install mod_dav_svn_) - version 1.4.x same as subersion above.
-Load mod_dav_svn module to Apache. Go to _WHM -> Service Configuration -> Apache Configuration -> Include Editor -> Pre-Main Include_. Select either "_All Versions_" or your current Apache version (ex: "_2.2.16_") from drop-down list. Or you can edit their corresponding file directly:
-All Versions: _/usr/local/apache/conf/includes/pre_main_global.conf_
-Apache 2.2.16: _/usr/local/apache/conf/includes/pre_main_2.conf_
-Add the codes below and click "_Update_" button to save config. This will restart Apache if no error on your configuration.
-`<IfModule mod_dav.c>
+
+* Install mod_dav_svn using yum (_yum install mod_dav_svn_) - version 1.4.x same as subersion above.
+* Load mod_dav_svn module to Apache. Go to _WHM -> Service Configuration -> Apache Configuration -> Include Editor -> Pre-Main Include_. Select either "_All Versions_" or your current Apache version (ex: "_2.2.16_") from drop-down list. Or you can edit their corresponding file directly:
+ * All Versions: _/usr/local/apache/conf/includes/pre_main_global.conf_
+ * Apache 2.2.16: _/usr/local/apache/conf/includes/pre_main_2.conf_
+* Add the codes below and click "_Update_" button to save config. This will restart Apache if no error on your configuration.
+```
+<IfModule mod_dav.c>
LoadModule dav_svn_module /usr/lib/httpd/modules/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib/httpd/modules/mod_authz_svn.so
-</IfModule>`
+</IfModule>
+```
**Create repository and add http access (ex: http://domain.com/svn)**
-Create your repository: _svnadmin create /path/to/svn/repos_
-Add the code below to your domain's custom include file. You need to create this file based on [this guide](http://www.cpanel.net/documentation/easyapache/customdirectives.html) to preserve when you recompile Apache/PHP.
-Example file (Apache2,standard/non-ssl): _/usr/local/apache/conf/userdata/std/2/cpanl_user/domain.com/svn.conf_
-File Contents:
+* Create your repository: `svnadmin create /path/to/svn/repos`
+* Add the code below to your domain's custom include file. You need to create this file based on [this guide](http://www.cpanel.net/documentation/easyapache/customdirectives.html) to preserve when you recompile Apache/PHP.
+ Example file (Apache2,standard/non-ssl): `/usr/local/apache/conf/userdata/std/2/cpanl_user/domain.com/svn.conf`
+ File Contents:
+```
<Location /svn>
#  mod dav svn support and location of svn repo files
DAV svn
@@ -67,3 +67,4 @@ File Contents:
Order allow,deny
Allow from all
</Location>
+```
@@ -20,40 +20,39 @@ I've written few Drupal ApacheSolr install guides here and this one is basically
**Things to install / setup**: [Solr](http://apache.rediris.es/lucene/solr/), [Tomcat6](http://tomcat.apache.org/download-60.cgi), [ApacheSolr module for Drupal](http://drupal.org/project/apachesolr), and [SolrPHPClient library](http://code.google.com/p/solr-php-client/)
-
-
**1.) Install Tomcat and setup your Tomcat admin user.**
```
aptitude install tomcat6 tomcat6-admin tomcat6-common tomcat6-user
vi /etc/tomcat6/tomcat-users.xml
-_<role rolename="admin"/>
-<role rolename="manager"/>
-<user username="tomcat" password="password" roles="admin,manager"/>_
+ <role rolename="admin"/>
+ <role rolename="manager"/>
+ <user username="tomcat" password="password" roles="admin,manager"/>
/etc/init.d/tomcat6 restart
```
-If all is good you will be able to access Tomcat admin at _http://hostname:8080_. Default page will show with links to admin section, etc.
+If all is good you will be able to access Tomcat admin at `http://hostname:8080`. Default page will show with links to admin section, etc.
**2.) Install Solr**
```
wget http://apache.rediris.es/lucene/solr/1.4.1/apache-solr-1.4.1.zip
-``` ([_check for updates_](http://apache.rediris.es/lucene/solr/))
+```
+[_check for updates_](http://apache.rediris.es/lucene/solr/)
```
unzip apache-solr-1.4.1.zip
mkdir /usr/share/tomcat6/webapps
cp apache-solr-1.4.1/dist/apache-solr-1.4.1.war /usr/share/tomcat6/webapps/solr.war
cp -r apache-solr-1.4.1/example/solr /usr/share/tomcat6/solr
-vi /etc/tomcat6/Catalina/localhost/solr.xml`
-_<Context docBase="/usr/share/tomcat6/webapps/solr.war" debug="0" privileged="true" allowLinking="true" crossContext="true">
-<Environment name="solr/home" type="java.lang.String" value="/usr/share/tomcat6/solr" override="true" />
-</Context>_
+vi /etc/tomcat6/Catalina/localhost/solr.xml
+ <Context docBase="/usr/share/tomcat6/webapps/solr.war" debug="0" privileged="true" allowLinking="true" crossContext="true">
+ <Environment name="solr/home" type="java.lang.String" value="/usr/share/tomcat6/solr" override="true" />
+ </Context>
chown -r tomcat6.tomcat6 /var/lib/tomcat6
/etc/init.d/tomcat6 restart
```
-You should see Solr access on your Tomcat admin/manager page (_http://hostname:8080/manager/html_).
+You should see Solr access on your Tomcat admin/manager page (`http://hostname:8080/manager/html`).
**3.) Connect Drupal Site to Solr (multi-core setup)**
@@ -66,23 +65,24 @@ cp apache-solr-1.4.1/example/multicore/solr.xml /usr/share/tomcat6/solr/
mkdir /usr/share/tomcat6/solr/site_sample1
cp -r /usr/share/tomcat6/solr/conf /usr/share/tomcat6/solr/site_sample1/conf
vi /usr/share/tomcat6/solr/solr.xml`
-_<core name="site1" instanceDir="site_sample1" />_
+ <core name="site1" instanceDir="site_sample1" />
chown -R tomcat6:root /usr/share/tomcat6/solr/
/etc/init.d/tomcat6 restart
```
Visit ApacheSolr settings of your Drupal admin and enter the configuration:
-_Solr Hostname: **localhost**
-Solr Port: **8080**
-Solr Path: **/solr/site1**_
+```
+Solr Hostname: localhost
+Solr Port: 8080
+Solr Path: /solr/site1
+```
**To add new site to Solr:**
```
mkdir /usr/share/tomcat6/solr/site_sample2
cp -r /usr/share/tomcat6/solr/conf /usr/share/tomcat6/solr/site_sample2/conf
-vi /usr/share/tomcat6/solr/solr.xml`
-_<core name="site2" instanceDir="site_sample2" />_
+vi /usr/share/tomcat6/solr/solr.xml
+ <core name="site2" instanceDir="site_sample2" />
```
That's All.
-
Oops, something went wrong.

0 comments on commit cca280f

Please sign in to comment.