2010年4月

Wordpress in Ubuntu 9.10 can't be visited from Network



You have two options to install Wordpress in Ubuntu 9.10. The first option is to download and install Wordpress manually. If you are in a shared web hosting environment, you have to do this way.

The second option is to install it from the Ubuntu's repository. If you are the root, you can just type:

apt-get install wordpress

Everything will be installed and configured automatically for you.

However, you need to change following configuration manually, otherwise the Wordpress can only be visited at your local host, like http://localhost/wordpress/. If you visit it from network, like http://your_ip_address/wordpress, you will get an error.

You can solve it as following:

cd /etc/wordpress/

sudo cp config-localhost.php config-newhostname.php

sudo chown www-data config-newhostname.php

Install SugarCRM



SugarCRM is an open-source software-solution vendor which produces the Sugar Customer Relationship Management (CRM) system.

0. Prerequisites:

  • Apache Web Server
  • MySQL Database
  • PHP5 (including Pear, Curl, IMAP Modules)

1. Install PHP Pear Module

apt-get install php-pear

2. Change Permission:
chmod 766 config.php
chmod 766 -R data
chmod 766 -R cache
chmod 766 -R custom
chmod 777 -R modules

3. Create MySQL Database
mysql -u root -p
mysql> CREATE DATABASE sugarcrm;
mysql> USE sugarcrm;
mysql> GRANT ALL PRIVILEGES ON sugarcrm.* TO sugarcrm@localhost IDENTIFIED BY 'mypassword';

DB Name: sugarcrm
DB User: sugarcrm
DB User Password: mypassword
DB Host: localhost

4. Run Installation Wizard at http://localhost/sugarcrm/

1) Set /etc/php5/apache2/php.ini to increase:
- PHP Memory Limit from 16M to 40M
memory_limit = 40M
- Upload File Size:
upload_max_filesize = 48M

2) Install cURL for the purpose of transferring data.
apt-get install php5-curl

3) Install IMAP Module: InboundEmail and Campaigns (Email) require the IMAP libraries. Neither will be functional.
apt-get install php5-imap

4) Create an empty .htacess file under the root directory of SugarCRM and chmod it to 777.

After hitting the "Install" button, the Wizard will create all tables in MySQL. If you selected the "Sample Data", it will also create it for you. It will also write following data to the .htaccess file created by you.

# BEGIN SUGARCRM RESTRICTIONS RedirectMatch 403 (?i).*\.log$ RedirectMatch 403 (?i)/+not_imported_.*\.txt RedirectMatch 403 (?i)/+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl) RedirectMatch 403 (?i)/+emailmandelivery\.php RedirectMatch 403 (?i)/+cache/+upload RedirectMatch 403 (?i)/+files\.md5$ # END SUGARCRM RESTRICTIONS

Now, you can change the .htaccess permission to 644.

Congratulations! You finished the installation of SugarCRM.

You can go to http://localhost/sugarcrm to test and use it from now.

Reference: http://www.sugarcrm.com/wiki/index.php?title=Installation

Rar and Unrar in Fedora 12



By default, Rar is not available in Fedora 10. If all you need to do is extract files from a Rar archive, unrar from RPM Fusion's YUM repositories will work. If you need to create Rar archives, then you will have to download and install the complete Rar package from DAG. The instructions below show you how.

Only Need to Extract Files?

First, install RPM Fusion's free and nonfree YUM repositories. For detailed information about installing RPM Fusion, see: http://rpmfusion.org/Configuration

su -c "rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm"

su -c "rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm"

Next, install the unrar packages from RPMFusion's nonfree repository.

su -c "yum install unrar"

Done! You now have unrar in /usr/bin/unrar. This binary can only extract files from Rar archives. Use this command to see all available options:

/usr/bin/unrar -?

Need to Create Rar Archives?

First, download the source RPM from DAG: http://dag.wieers.com/rpm/packages/rar

wget -c http://dag.wieers.com/rpm/packages/rar/rar-3.5.1-1.rf.src.rpm

Now, install the source RPM. This will create a $HOME/rpmbuild tree. Please note that you do not need to be root.

rpm -iv rar-3.5.1-1.rf.src.rpm

Next, build a binary package in $HOME/rpmbuild. Again, no need to be root.

rpmbuild -bb ~/rpmbuild/SPECS/rar.spec

Finally, install the built RPM as root:

su -c "rpm -Uvh $HOME/rpmbuild/RPMS/$(arch)/rar-3.5.1-1.rf.x86_64.rpm"

Done! You now have rar in /usr/bin/rar. This binary can build and extract Rar files. Use this command to see all available options:

/usr/bin/rar -?