Archive

May, 2010Archive for

Cannot startup virtual machine (using VMWare) with Firefox 3.6

May 14, 2010 admin No comments

http://pinetik.blogspot.com/2010/04/vmware-remote-console-and-firefox-36.html

Windows 7
C:\Program Files (x86)\Common Files\VMware\vmware-vmrc.exe -h 192.168.1.44:8333 -M 32

Categories: Troubleshooting Tags:

How to use floating license & RIS

May 13, 2010 admin No comments

RIS License modul installation (CentOS 5.4)

# cd /usr/lib/php/modules/
# wget --http-user=*** --http-passwd=*** http://www.rillsoft.de/download/src/centos/5.4/i386/PHP_5.2.10/ris.so
# echo "extension=ris.so" > /etc/php.d/ris.ini
# /etc/init.d/httpd restart

For CentOS 5.4 64 Bit http://www.rillsoft.de/download/src/centos/5.4/x86_64/PHP_5.2.10/ris.so
For Ubuntu 10.04 32 Bit + PHP 5.3.2 http://www.rillsoft.de/download/src/ubuntu/10.04/i386/PHP_5.3.2/ris.so
For Ubuntu 10.04 64 Bit + PHP 5.3.2 http://www.rillsoft.de/download/src/ubuntu/10.04/amd64/PHP_5.3.2/ris.so

Verify it using the following command

# php -i | grep ris

 

Categories: CentOS, Rillsoft Tags:

Tuning MySQL

May 7, 2010 admin No comments
# cp /etc/my.cnf /etc/my.cnf.orig
# vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

binlog_cache_size=1M
default_table_type=InnoDB
ft_min_word_len=4

innodb_additional_mem_pool_size=16M
innodb_buffer_pool_size=512M
innodb_data_file_path=ibdata1:10M:autoextend
innodb_file_per_table=1
innodb_flush_log_at_trx_commit=2
innodb_log_buffer_size=8M
innodb_log_files_in_group=2
innodb_log_file_size=100M
innodb_status_file=0
innodb_thread_concurrency=0

join_buffer_size=1M
max_allowed_packet=1M
max_connections=3000
max_heap_table_size=64M
max_prepared_stmt_count=1000000
query_cache_size=0
skip_grant_tables
skip_locking
sort_buffer_size=512K
table_cache=2048
thread_cache_size=16
thread_concurrency=16
thread_stack=196K
tmp_table_size=64M
transaction_isolation=REPEATABLE-READ
local-infile=1

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
# /etc/init.d/mysqld stop
# rm /var/lib/mysql/ib_logfile*
# /etc/init.d/mysqld start
# less /var/log/mysqld.log

http://www.administrator.de/index.php?content=820
http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html

http://www.zabbix.com/forum/showthread.php?p=24581
http://www.bigresource.com/Web_Hosting-optimizing-Mysql-server-in-plesk-VPS-CTV3Wkw8.html
http://www.mysqlperformanceblog.com/2008/09/16/when-is-it-a-time-to-upgrade-memory/#comment-693350

!!!! http://tuxmining.blogspot.com/2008/05/mysql-51-2-weeks-of-stresstests.html
!!!! http://www.thomas-krenn.com/de/wiki/MySQL_Performance_Tuning

Categories: MySQL Tags:

How to install RIS (CentOS 5.4)

May 7, 2010 admin No comments

RIS installation

# cd /var/www/html
# rm ris_mysql.zip
# wget --http-user=*** --http-passwd=*** http://www.rillsoft.com/download/src/ris_mysql.zip
# unzip -uo ris_mysql.zip -d /var/www/html/ris
# chmod -R 777 cache log blob
# chown -R apache:apache /var/www/html
# php symfony cc

 

Configure Apache 2

Open httpd.conf

# vi /etc/httpd/conf/httpd.conf

At the end of your config file you’ll need to add the following code:

DocumentRoot /var/www/html/web
<Directory /var/www/html/web>
   <IfModule sapi_apache2.c>
      php_admin_flag engine on
      php_admin_flag safe_mode off
      php_admin_value open_basedir none
   </IfModule>
   <IfModule mod_php5.c>
      php_admin_flag engine on
      php_admin_flag safe_mode off
      php_admin_value open_basedir none
   </IfModule>
   Options +FollowSymLinks -Indexes
   AllowOverride All
</Directory>

Alias /sf /var/www/html/lib/vendor/symfony/data/web/sf
<Directory /var/www/html/lib/vendor/symfony/data/web/sf>
   AllowOverride All
   Allow from All
</Directory>
# /etc/init.d/httpd restart

 

PHP configuration check

Execute the check script.

# cd /var/www/html
# php lib/vendor/symfony/data/bin/check_configuration.php

You will see the following results:

********************************
*                              *
*  symfony requirements check  *
*                              *
********************************

php.ini used by PHP: /etc/php.ini

** WARNING **
*  The PHP CLI can use a different php.ini file
*  than the one used with your web server.
*  If this is the case, please launch this
*  utility from your web server.
** WARNING **

** Mandatory requirements **

  OK        PHP version is at least 5.2.4 (5.2.10)

** Optional checks **

  OK        PDO is installed
  OK        PDO has some drivers installed: mysql, odbc, sqlite
  OK        PHP-XML module is installed
  OK        XSL module is installed
  OK        The token_get_all() function is available
  OK        The mb_strlen() function is available
  OK        The iconv() function is available
  OK        The utf8_decode() is available
  OK        A PHP accelerator is installed
  OK        php.ini has short_open_tag set to off
  OK        php.ini has magic_quotes_gpc set to off
  OK        php.ini has register_globals set to off
  OK        php.ini has session.auto_start set to off
  OK        PHP version is not 5.2.9

 

Database configuration

Open databases.yml

# vi  /var/www/html/config/databases.yml

Make sure to change host, dbname, myUser and myPassword to match your account.

dev:
  propel:
    param:
      classname: DebugPDO
      debug: { realmemoryusage: true, details: { time: { enabled: true }, slow: { enabled: true, threshold: 0.1 }, mem: { enabled: true }, mempeak: { enabled: true }, memdelta: { enabled: true } } }
test:
  propel:
    param:
      classname: DebugPDO
all:
  propel:
    class: sfPropelDatabase
    param:
      classname: PropelPDO
      dsn: 'mysql:host=localhost;dbname=ris'
      username: myUser
      password: myPassword
      encoding: utf8
      persistent: true
      pooling: true

 

# vi  /var/www/html/config/propel.ini
propel.targetPackage       = lib.model
propel.packageObjectModel  = true
propel.project             = ris
propel.database            = mysql
propel.database.driver     = mysql
propel.database.createUrl  = ${propel.database.url}
propel.database.url        = mysql:host=localhost;dbname=ris
propel.database.user       = myUser
propel.database.password   = myPassword
propel.database.encoding   = utf8
...

 

Configuration for Swift_FailoverTransport

# vi  /var/www/html/apps/frontend/config/factories.yml
...
  mailer:
    class: sfMailer
    param:
      logging:            %SF_LOGGING_ENABLED%
      charset:            %SF_CHARSET%
      delivery_strategy:  realtime
      transport:
        class:            Swift_SmtpTransport
        param:
          host:           smtp.googlemail.com
          port:           465
          encryption:     ssl
          username:       myUser
          password:       myPassword
...

 

Initialize database

Run the following symfony tasks:

# cd /var/www/html
# php symfony cc
# php symfony propel:insert-sql --no-confirmation
# php symfony propel:data-load --trace --env=dev --application=frontend
Categories: CentOS, Rillsoft Tags:

How to disable SElinux (CentOS 5.4)

May 7, 2010 admin No comments
# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
# shutdown -r now
Categories: CentOS Tags:

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

May 6, 2010 admin No comments
# vi /etc/my.cnf
...
[mysqld]
max_allowed_packet = 16M
...
Categories: Troubleshooting Tags:

Tuning PHP for Symfony (CentOS 5.4)

May 6, 2010 admin No comments
# vi /etc/php.ini

Replace

...
upload_max_filesize = 200M
...
memory_limit = 1024M
max_execution_time = 900
...
short_open_tag = Off
...
post_max_size = 80M
# /etc/init.d/httpd restart
Categories: PHP, Symfony Tags:

How to install Samba (CentOS 5.4)

May 6, 2010 admin No comments
# yum install cups-libs samba samba-common
# mv /etc/samba/smb.conf /etc/samba/smb.conf.orig
# vi /etc/samba/smb.conf
[global]
workgroup = CentOS
netbios name = CentOS
name resolve order = bcast host lmhosts wins
server string = Samba Server Version %v
security = user
passdb backend = tdbsam

[www]
comment = Public WWW
path = /var/www
create mask = 0660
directory mask = 0771
writable = yes
# chkconfig --levels 235 smb on
# /etc/init.d/smb start
# smbpasswd -a root
# /etc/init.d/smb restart

Change IPTables

# vi /etc/sysconfig/iptables

Includes the following before the REJECT line:

-A RH-Firewall-1-INPUT -p udp -m udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
# service iptables restart

Check disable SElinux !!!
How to disable SElinux

net use  Z: \\***.***.***.***\www /user:root
Categories: CentOS Tags:

How to install PHP APC (CentOS 5.4 & Plesk 9.3 bei hosteurope.de)

May 5, 2010 admin No comments
# yum install php-pear
# yum install php-devel
# yum install httpd-devel
# pecl install apc
# echo "extension=apc.so" > /etc/php.d/apc.ini
# /etc/init.d/httpd restart

Verify it using the following command

# php -i | grep apc
Categories: CentOS, PHP Tags:

How to install Apache2 (CentOS 5.4)

May 5, 2010 admin No comments
# yum install httpd httpd-devel
# chkconfig --levels 235 httpd on
# /etc/init.d/httpd start

Change IPTables

# vi /etc/sysconfig/iptables

Includes the following before the REJECT line:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
# service iptables restart

Check disable SElinux !!!
How to disable SElinux

Categories: CentOS Tags: