vrijdag 18 februari 2011
New blog in Dutch
I just started a blog in Dutch about the making of websites. The blog is mainly meant for people who are looking to get a website build and need more information on how to go about it. This new blog can be found here: www.uwwebsitelatenmaken.com
maandag 27 september 2010
Installing Passenger on CentOS (NGINX)
Installing passenger on CentOS doesn't seem to be documented on the Passenger website, so here is a small instruction.
If you don't have rails installed, install it first:
http://www.compuonline.info/2010/09/installing-ruby-on-rails-on-centos.html
Installing passenger:
$ yum -y install apr-devel gcc-c++ openssl-devel zlib-devel
$ gem install passenger
$ passenger-install-nginx-module
and follow the instructions.
If you don't have rails installed, install it first:
http://www.compuonline.info/2010/09/installing-ruby-on-rails-on-centos.html
Installing passenger:
$ yum -y install apr-devel gcc-c++ openssl-devel zlib-devel
$ gem install passenger
$ passenger-install-nginx-module
and follow the instructions.
Installing Ruby on Rails on CentOS
Although it seems to be a bit difficult to find good information on how to install Rails on CentOS, it is not hard at all. Some sites compile everything from source, but that seemed a lot of work to me. I decided to use the Ruby Version Manager (RVM) instead.
If you don't have GIT installed, install it first:
$ yum install git
Next, we can install RVM:
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Now we have RVM we can install Ruby with one command:
$ rvm install ruby 1.9.2
With Ruby installed, we can use Ruby Gems to install rails:
$ gem install rails
If you don't have GIT installed, install it first:
$ yum install git
Next, we can install RVM:
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Now we have RVM we can install Ruby with one command:
$ rvm install ruby 1.9.2
With Ruby installed, we can use Ruby Gems to install rails:
$ gem install rails
Labels:
centos,
install,
installation,
linux,
rails,
ruby,
ruby on rails,
rvm
donderdag 15 juli 2010
Wordpress: Stop asking for FTP details
I had an issue with Wordpress asking for FTP details when installing or updating a plugin. This is quite annoying, so I tried to find a good solution. The solution I mostly found was storing the FTP login details in the PHP configuration file. I prefer not to use FTP at all though, luckily I found this plugin: http://cdn.yoast.com/wp-content/uploads/2009/02/fix-plugin-update.zip
This plugin makes sure Wordpress no longer requires the owner of the plugin files to be the same as the user the web server is running under. You will still need to make sure your web server can write to the plugin directory.
Source: http://yoast.com/fix-automatic-plugin-update/
This plugin makes sure Wordpress no longer requires the owner of the plugin files to be the same as the user the web server is running under. You will still need to make sure your web server can write to the plugin directory.
Source: http://yoast.com/fix-automatic-plugin-update/
zondag 27 juni 2010
Wordpress: Disable plugin in Database
Sometimes a plugin causes Wordpress to stop working, including the admin interface. Luckily it is possible to disable plugins from the database, so you can access the Worldpress admin interface again.
Use this code the locate the field that need to be modified:
To disable all plugins, just remove all code in the field.
Use this code the locate the field that need to be modified:
SELECT * FROM wp_options WHERE option_name = 'active_plugins';
To disable all plugins, just remove all code in the field.
donderdag 13 mei 2010
Hobofields - undefined method fields for
If you are trying to use the most recent Hobofields you may get the error "undefined method `fields' for ...". This problem can be solved by adding
to the config/environment.rb file.
config.gem 'hobofields'
to the config/environment.rb file.
vrijdag 26 maart 2010
Installing Cassandra on CentOS
Cassandra is an interesting distributed database system based on the ideas of Bigtable and Dynamo. So let's give it a try. We will make a single node setup for now.
The installation of Cassandra on CentOS is not that complicated, but there are some small things you need to know to get it working.
First of all Java needs to be installed to run Cassandra, as it is completely writen in Java. Installing Java with yum is quite easy, just enter:
# yum install java-1.6.0-openjdk.i386 (for 32-bit systems)
or
# yum install java-1.6.0-openjdk.x86_64 (for 64-bit systems)
Next download the latest binary from the the Cassandra website:
http://cassandra.apache.org/download/
Unless you are setting up a production server, you can go for the beta release. An example of the download command:
# wget http://apache.ziply.com/cassandra/0.6.0/apache-cassandra-0.6.0-beta3-bin.tar.gz
(change the url to the latest version)
Now we need to uncompress the downloaded file:
tar -zxvf apache-cassandra-0.6.0-beta3-bin.tar.gz
(change the file name if you have a newer version of Cassandra)
Unfortunately the 0.6.0 release doesn't come with all dependencies, so we will need to install them manually:
* Log4J (download), from the archive copy the log4j-x.x.x.jar file into the /lib folder of Cassandra
* Google Collections (download), from the archive copy the google-collect.x.x.jar into the /lib folder of Cassandra
* Apache Commons Collections (download), from the archive copy the commons-collections-x.x.x.jar into the /lib folder of Cassandra
* Apache Commons Lang (download), from the archive copy the commons-lang-x.x.jar into the /lib folder of Cassandra
* SLF4J (download), from the archive copy the slf4j-api-x.x.x.jar and slf4j-log4jxx-x.x.x.jar into the /lib folder of Cassandra
* Apache Commons CLI (download), from the archive copy the commons-cli-x.x.jar into the /lib folder of Cassandra
* jLine (download), from the archive copy the jline-x.x.xx.jar into the /lib folder of Cassandra
Now we need to make some directories required by Cassandra:
# sudo mkdir -p /var/log/cassandra
# sudo mkdir -p /var/lib/cassandra
Last before starting it up, we have to check the config file:
# joe conf/storage-conf.xml (you can use another editor than joe if you like)
In the config file make sure that all paths mentioned exist, and fill the correct ip addresses where needed.
That should be all and we can now start Cassandra:
# bin/cassandra -f
And to see if it really works (assuming you don't seen any ugly error messages):
# bin/cassandra-cli --host localhost --port 9160
This start the client and we can try some commands:
cassandra> set Keyspace1.Standard2['jsmith']['first'] = 'John'
cassandra> set Keyspace1.Standard2['jsmith']['last'] = 'Smith'
cassandra> set Keyspace1.Standard2['jsmith']['age'] = '42'
cassandra> get Keyspace1.Standard2['jsmith']
After this you should see the results of the records inserted being shown back from the database.
The installation of Cassandra on CentOS is not that complicated, but there are some small things you need to know to get it working.
First of all Java needs to be installed to run Cassandra, as it is completely writen in Java. Installing Java with yum is quite easy, just enter:
# yum install java-1.6.0-openjdk.i386 (for 32-bit systems)
or
# yum install java-1.6.0-openjdk.x86_64 (for 64-bit systems)
Next download the latest binary from the the Cassandra website:
http://cassandra.apache.org/download/
Unless you are setting up a production server, you can go for the beta release. An example of the download command:
# wget http://apache.ziply.com/cassandra/0.6.0/apache-cassandra-0.6.0-beta3-bin.tar.gz
(change the url to the latest version)
Now we need to uncompress the downloaded file:
tar -zxvf apache-cassandra-0.6.0-beta3-bin.tar.gz
(change the file name if you have a newer version of Cassandra)
Unfortunately the 0.6.0 release doesn't come with all dependencies, so we will need to install them manually:
* Log4J (download), from the archive copy the log4j-x.x.x.jar file into the /lib folder of Cassandra
* Google Collections (download), from the archive copy the google-collect.x.x.jar into the /lib folder of Cassandra
* Apache Commons Collections (download), from the archive copy the commons-collections-x.x.x.jar into the /lib folder of Cassandra
* Apache Commons Lang (download), from the archive copy the commons-lang-x.x.jar into the /lib folder of Cassandra
* SLF4J (download), from the archive copy the slf4j-api-x.x.x.jar and slf4j-log4jxx-x.x.x.jar into the /lib folder of Cassandra
* Apache Commons CLI (download), from the archive copy the commons-cli-x.x.jar into the /lib folder of Cassandra
* jLine (download), from the archive copy the jline-x.x.xx.jar into the /lib folder of Cassandra
Now we need to make some directories required by Cassandra:
# sudo mkdir -p /var/log/cassandra
# sudo mkdir -p /var/lib/cassandra
Last before starting it up, we have to check the config file:
# joe conf/storage-conf.xml (you can use another editor than joe if you like)
In the config file make sure that all paths mentioned exist, and fill the correct ip addresses where needed.
That should be all and we can now start Cassandra:
# bin/cassandra -f
And to see if it really works (assuming you don't seen any ugly error messages):
# bin/cassandra-cli --host localhost --port 9160
This start the client and we can try some commands:
cassandra> set Keyspace1.Standard2['jsmith']['first'] = 'John'
cassandra> set Keyspace1.Standard2['jsmith']['last'] = 'Smith'
cassandra> set Keyspace1.Standard2['jsmith']['age'] = '42'
cassandra> get Keyspace1.Standard2['jsmith']
After this you should see the results of the records inserted being shown back from the database.
Labels:
cassandra,
centos,
database,
distributed,
linux
Abonneren op:
Berichten (Atom)