زکات علم

زَکاةُ العِلمِ أن تُعَلِّمَهُ عِبادَ اللّه‏ِ امام باقر (ع)
زکات علم

مطالبی در زمینه کامپیوتر و علاقه مندی های شخصی من مطالب این وبلاگ غالبا مطالبی ست که در جای جای اینترنت کتاب یا دانشته های شخصی خودم می باشد که به عنوان مرجعی برای رجوع دوباره در اینجا جمع آوری شده اند .
ehsunitd.ir personal website

پیوندها

۲۹ مطلب با موضوع «آموزش کاربردی» ثبت شده است

Bitnami Redmine

     

     

    redmine-stack.png

    Redmine is a flexible project management web application. Written using Ruby on Rails framework, it is cross-platform and cross-database. Its main features are:

    • Multiple projects support
    • Flexible role based access control.
    • Flexible issue tracking system
    • Gantt chart and calendar
    • News, documents and files management
    • Feeds and email notifications.
    • Per project wiki
    • Per project forums
    • Simple time tracking functionality
    • Custom fields for issues, projects and users
    • SCM integration (SVNCVS, Mercurial and Darcs)
    • Multiple LDAP authentication support
    • User self-registration support
    • Multilanguage support
    • Multiple databases support

     

    Bitnami Redmine Stack was configured using Passenger on Linux and OS X and Thin servers on Windows forversions higher than 1.4.3. In this page you can find the documentation related to this configuration.

    If you are using Bitnami Redmine lower than 1.4.3 version, please check this documentation.

    Please, take a look to the Quick Start Guide to know the basic use of this Stack.

    Bitnami structure and configuration

    The applications in Bitnami are installed in the 'apps' folder that you can find in the installation directory. In virtual machines, cloud images and in Bitnami Cloud hosting servers the installation directory is /opt/bitnami.

    The main folders that you can find inside 'apps/redmine' are the following:

    • conf: folder that includes the apache configuration files for redmine
    • htdocs: this folder includes the redmine files (Gemfile and Rakefile files, redmine configuration files, plugins folder, gems, etc).

    The location of the redmine configuration files (database configuration, email settings, etc) is the 'apps/redmine/htdocs/config'folder.

    You can find more details about the Bitnami directory structure here.

    How to start/stop the servers?

     

    Graphical tool

    The Stacks include a graphical tool to manage the servers easily. You can find the "manager-windows.exe", "manager-osx" or "manager-linux" tool in your installation directory. Using this tool, you can Start, Stop or Restart the servers and check the log files. You can click on the icon to start it.

    manager-servers.png

     

    manager-osx.png

     

     

     

     

     

     

     

     

     


    win_platform.png

    On Windows: You can also start the Manager tool from shortcuts: Start -> Program Files -> BitNami Stack -> Manager tool

    Command line tool

    If you prefer, you can use the "ctlscript.sh" utility from the command line. This script is in the installation directory.

    linux_platform.png

    On Virtual Machines and Cloud images:

    $ sudo /opt/bitnami/ctlscript.sh start

    A native installer on Linux:

    $ cd ~/application-version
    $ ./ctlscript.sh start
    

    mac_platform.png

     

    On OS X: You can start the Manager tool from the installation directory or you can use the "ctlscript.sh" utility from a Terminal.

    host:~ user$ cd /Applications/application-version
    host:~ user$ ./ctlscript.sh start

     

    How to change the default prefix?

    If you want to change Redmine to the root url you should follow the next next section. In this section you can see how to replace the URL "/redmine" with "/new_url".

    linux_platform.png  mac_platform.pngOn Linux and OS X, you should modify the following options in the "opt/bitnami/apps/redmine/config/httpd-prefix.conf" file. Note if you are using a native installer, replace "/opt/bitnami" with your installation directory.

    Alias /new_url/ "/opt/bitnami/apps/redmine/htdocs/public/"
    Alias /new_url "/opt/bitnami/apps/redmine/htdocs/public"
    Include "/opt/bitnami/apps/redmine/conf/httpd-app.conf"
    

    It is also necessary to update the installdir/apps/redmine/conf/httpd-app.conf:

    <Directory "/opt/bitnami/apps/redmine/htdocs/public">
        PassengerEnabled on
        Options -MultiViews
        AllowOverride All
        <IfVersion < 2.3 >
        Order allow,deny
        Allow from all
        </IfVersion>
        <IfVersion >= 2.3>
        Require all granted
        </IfVersion>
        SetEnv RAILS_RELATIVE_URL_ROOT "/new_url"
        PassengerAppRoot "/opt/bitnami/apps/redmine/htdocs"
    </Directory>
    
    PassengerPreStart http://127.0.0.1:80/new_url
    

    Then, restart the server:

    sudo /opt/bitnami/ctlscript.sh restart apache
    


    win_platform.pngOn Windows it is necessary to modify the Apache configuration. Edit "installdir/apps/redmine/conf/redmine.conf" the file to modify the "/redmine" setting:

    ProxyPass /redmine balancer://redminecluster
    ProxyPassReverse /redmine balancer://redminecluster
    
    <Proxy balancer://redminecluster>
      BalancerMember http://127.0.0.1:3001/redmine
      BalancerMember http://127.0.0.1:3002/redmine
    </Proxy>

    You should modify the "installdir/apps/redmine/scripts/serviceinstall.bat" and change the prefix entry "--prefix /redmine".  You should also update the prefix in the "installdir/apps/redmine/htdocs/config/additional_environment.rb" file.

    Then run the following command from a command prompt with Admin privileges:

    > cd “C:\Bitnami\redmine-<version>\apps\redmine\scripts”
    > serviceinstall.bat UNINSTALL
    > serviceinstall.bat INSTALL
    

    Then restart the Apache server using the Manager graphical application.

    How to change the default URL?

    Automatic Approach

     

    This approach is based on the Bitnami Configuration Tool (bnconfig).

     

     

    The best way to change your URL in BCH is to go to your application tab and modify it there. In the Bitnami Cloud Hosting console, select Servers, choose your server, Manage and go to the Applications tab. Press there the pencil next to the application which URL you want to modify and choose .

     

     

     

    Manual Approach

    If you want to move the Redmine application from the prefix http://example.com/redmine to the root url (i.ehttp://exmple.com), you can follow the steps described below: 

     

     

    Comment out the line "SetEnv RAILS_RELATIVE_URL_ROOT"  and remove the "/redmine" part in the PassengerPreStart URL in the file "/opt/bitnami/apps/redmine/conf/httpd-app.conf": 

    <Directory "/opt/bitnami/apps/redmine/htdocs/public">
        Options -MultiViews
        <IfVersion < 2.3 >
        Order allow,deny
        Allow from all
        </IfVersion>
        <IfVersion >= 2.3>
        Require all granted
        </IfVersion>
        # SetEnv RAILS_RELATIVE_URL_ROOT "/redmine"
        PassengerAppRoot "/opt/bitnami/apps/redmine/htdocs"
        <IfModule pagespeed_module>
            ModPagespeedDisallow "*"
        </IfModule>
    </Directory>
    
    PassengerPreStart http://127.0.0.1/
    
    

    Comment out the aliases and add the public redmine directory as DocumentRoot in the file /opt/bitnami/apps/redmine/conf/httpd-prefix.conf" :

    # Alias /redmine/ "/opt/bitnami/apps/redmine/htdocs/public/"
    # Alias /redmine "/opt/bitnami/apps/redmine/htdocs/public"
    
    DocumentRoot "/opt/bitnami/apps/redmine/htdocs/public"
    
    Include "/opt/bitnami/apps/redmine/conf/httpd-app.conf"
    

    Check that the configuration is correct: 

    $ sudo apachectl -t
    Syntax OK
     
    Finally, if the configruation is correct, restart the Apache server:
    sudo /opt/bitnami/ctlscript.sh restart apache
     

     

    How to create a full backup of Redmine?

     

    Because BitNami stacks are self-contained, the simplest option for performing your backups is to copy or compress the BitNami Stack installation directory. To do so in a safe manner, you will need to stop all servers, so this method may not be appropriate if you have people accessing the application continously.

    linux_platform.pngOn Virtual Machines and Cloud Images:

    sudo /opt/bitnami/ctlscript.sh stop

    mac_platform.png

    On OS X:

    $ cd installdir
    $ ./ctlscript.sh stop
    $ cp -r installdir application-backup
    

    Or you can create a tarball:

    $ tar -czvf application-backup.tar.gz installdir
    

    Or a zip file:

    $ zip -r application-backup.zip installdir/*

    To restore this backup you only need to uncompress the backup in the same location. It is important to use the same path that was used when the stack was originally installed.

    For example if you have a backup in a Red Hat machine, you can copy it to an Ubuntu Linux machine (a different distro!) in the same location. Then start the servers and that’s all.

    On Virtual Machines and Cloud Images:

    $ sudo /opt/bitnami/ctlscript.sh start

    On OS X:

    $ cd installdir
    $ ./ctlscript.sh start
    

    You just need to be carefull to keep the same permissions for the files and folders. If you installed as root make sure that in the new machine you copy the files also as root. And this case, if you are also moving MySQL or PostgreSQL, you will need to create those users in the new machine (if they don't exist yet).

    win_platform.pngOn Windows you should follow the same process. Stop the servers using the shortcuts and copy the whole installation directory. To restore the system, copy the directory to a different Windows machine in the same location and follow these steps from a command prompt:

    $ cd installdir
    $ serviceinstall.bat INSTALL
    

    You can access your BitNami Application at the usual URL.

    If you want to create only a database backup, check the following link for MySQL/Components/MySQL#How_to_create_a_database_backup or for PostgreSQL /Components/PostgreSQL#How_to_create_a_database_backup.3f

     

    How to upgrade Redmine?

    It is strongly recommended that you create a backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly. You can get more info about  how to create a full backup here.

    Of course, before executing any command, you have to start the bitnami_console script or the shortcut on Windows before typing the following commands.

    There are two different ways to upgrade your application.

    1. If you want to upgrade the application and all Stack components PHP, Ruby, MySQL, Apache… You can follow the steps described at How to upgrade the full Stack migrating the data?
    2. In case you only want to upgrade the application code without modifying any other Stack components. You can find below the steps to upgrade only the Redmine application.

    In the Redmine case, these are the steps to migrate the database from an old version to a new one. You can launch a new Redmine version instance or download the latest Redmine installer from http://bitnami.com/stack/redmine. Note this guide uses "/opt/bitnami" as the default installation directory, you can use a different one if you have installed it in a different folder.

    • Copy the database backup to the new Bitnami version server.

    • Stop all servers and start only MySQL. Note that the installation directory could be different. This is the default installation directory for Virtual Machines and Cloud images.

      $ sudo /opt/bitnami/ctlscript.sh stop
      $ sudo /opt/bitnami/ctlscript.sh start mysql
      
    • Remove the previous database and create the new one. You can configure the database user password with a secure password.

      $ mysql -u root -p 
      Password: ****
      mysql> drop database bitnami_redmine;
      mysql> create database bitnami_redmine;
      mysql> grant all privileges on bitnami_redmine.* to 'bitnami_redmine'@'localhost' identified by 'DATABASE_PASSWORD';
      
    • Restore the new database:

      $ mysql -u root -p bitnami_redmine < backup.sql
      
    • Edit the Redmine configuration file to update the database user password (the same that you set previously) "/opt/bitnami/apps/redmine/htdocs/config/database.yml"
    production:
      adapter: mysql2
      database: bitnami_redmine
      host: localhost
      username: bn_redmine
      password: "DATABASE_PASSWORD"
      encoding: utf8

     

    • Migrate the database to the latest version:
    $ cd /opt/bitnami/apps/redmine/htdocs 
    $ ruby bin/rake db:migrate RAILS_ENV=production
    

     

    Troubleshooting:

    If you see the following error, go to your database and remove the specified table and run the migrate command again.

    Mysql::Error: Table 'changeset_parents' already exists: CREATE TABLE `changeset_parents` (`changeset_id` int(11) NOT NULL, `parent_id` int(11) NOT NULL) ENGINE=InnoDB
    
    $ mysql -u root -p 

    mysql> use bitnami_redmine;

    mysql> drop table changeset_parents;

    • Copy the ""/opt/bitnami/apps/redmine/htdocs/files" folder from the old installation to the new one. 
    • If you have installed plugins in the previous version, copy the folders from "vendor/plugins" directory into new installation directory, in "plugins" folder.
    • Check the plugins also support this new version and run the following command
    $ ruby bin/rake redmine:plugins RAILS_ENV="production"
    
    • Finally you should clean the cache and the sessions:
    $ ruby bin/rake tmp:cache:clear
    $ ruby bin/rake tmp:sessions:clear
    
    • Restart the servers and you can access to your new Redmine.
    ​$ sudo /opt/bitnami/ctlscript.sh restart

     

    Troubleshooting:

    If you upgrade it from a 1.x version and you see something similar to this error creating an issue:

    MysqlStatement::Error Value for field `value` cannot be NULL INSERT INTO custom_value ...
    

    Go to your custom values in the admin panel, try to edit and save them again. That should fix the issue.

    How to install a plugin on Redmine?

    Before installing a plugin make sure that the plugin is compatible with your redmine version. If you get the plugin from the Redmine Plugin Directory  you can check the "Compatible with:" field for each plugin.

    Download the plugin and copy the directory into installdir/apps/redmine/htdocs/plugins.

    If the plugin requires a migration, run the following commands to upgrade your database. It is advisable to make a db backup before.

    On Windows, you should start the "Use Redmine" command prompt from the Windows Start Menu. On Linux or OS X, you should run this command from a "use_redmine" console.

    $ cd installdir
    $ ./use_redmine
    $ cd apps/redmine/htdocs
    $ bundle install --without development test postgresql sqlite
    $ ruby bin/rake redmine:plugins RAILS_ENV=production
    

    Restart Redmine application.

     

    Note: Since Redmine 2.4.0-0 version, this process could be a little bit different. If you receive the error below after executing bundle install, try executing `bundle install --no-deployment` as suggested in the error message.

    You are trying to install in deployment mode after changing your Gemfile. Run `bundle install` elsewhere and add the updated Gemfile.lock to version control.
    If this is a development machine, remove the Gemfile freeze by running `bundle install --no-deployment`.

    After copying the plugin into installdir/apps/redmine/htdocs/plugins.

    $ cd installdir
    $ ./use_redmine
    $ cd apps/redmine/htdocs
    $ bundle install --without development test postgresql sqlite --no-deployment
    $ bundle install --without development test postgresql sqlite --deployment
    $ ruby bin/rake redmine:plugins RAILS_ENV=production
    

    Restart Redmine application.

    Windows troubleshooting

    If you are using the Bitnami Redmine installer for Windows and your thin servers don't run after installing a plugin you can run them manually to see what is the error.

    • Go to Bitnami Redmine console at Start -> Program Files -> Bitnami Redmine Stack -> Use Redmine
    • Go to apps/redmine/htdocs
    • Run the following command:
    bundle exec thin start -e production -p 3001 --prefix /redmine
    

    Now you can see the error starting the servers or accesing through your web browser at http://127.0.0.1:3001/redmine.

    How to install the RedmineCRM plugin?

    The RedmineCRM plugin allows you to keep track of the contacts and companies, communications with them and deals in the pipeline. The main features are:

    - Contacts

    - Deals

    - Notes

    - Contacts issues/tasks

    - Email sending

    You can download this plugin at  RedmineCRM. The installation steps are the following. Note that this quick guide uses "/opt/bitnami" as the default installation directory.

    • Download the plugin and uncompress it in the plugins folder:
    $ unzip redmine_contacts*.zip -d /opt/bitnami/apps/redmine/htdocs/plugin
    
    • Then install the required gems:
    $ cd /opt/bitnami/apps/redmine/htdocs
    $ bundle install --no-deployment --without development test
    • Migrate the database
    $ ruby bin/rake redmine:plugins NAME=redmine_contacts RAILS_ENV=production
    
    • Restart the Apache server and check the plugin is already installed in the Admin -> Plugins section.
    $ sudo /opt/bitnami/ctlscript.sh restart apache
    

    How to install the Redmine Dropbox plugin?

    The Redmine Dropbox plugin only supports Redmine 1.x version currently. Check this guide.

    How to install the Redmine Ultraviolet plugin?

    Some of plugins require to be compiled, for instance, the Redmine Ultraviolet Syntax Highlighting plugin (http://www.redmine.org/plugins/redmine_ultraviolet). It is necessary that you machine have the compilation tools (gcc, make and their dependencies). If you are running a Virtual Appliance or an AMI, you should do the following:

    $ sudo apt-get install gcc make
    $ sudo apt-get install libonig-dev
    $ sudo gem install ultraviolet
    

    Now you can download the plugin and install it in Redmine application

    $ sudo git clone git://github.com/epitron/redmine_ultraviolet.git
    $ sudo mv redmine_ultraviolet /installdir/apps/redmine/htdocs/vendor/plugins
    $ sudo /installdir/ctlscript.sh restart apache
    

    That's all, you can enable any Ultraviolet theme in the administrator account.

    How to configure the email settings of Redmine?

    You can configure the email settings in the "installdir/apps/redmine/htdocs/config/configuration.yml" file. In older versions you should use the "installdir/apps/redmine/htdocs/config/email.yml" file. Please note that installdir stands for /opt/bitnami in the machines launched with Bitnami Cloud Hosting.

    The sample configuration for GMail account is shown below:

    default:
      email_delivery:
        delivery_method: :smtp
        smtp_settings:
          address: smtp.gmail.com
          port: 587
          domain: your_domain.com
          authentication: :login
          user_name: your_email@gmail.com
          password: your_password
    

    In case you receive an error message saying something like "530 5.7.0 Must issue a STARTTLS command first ...", make sure you have the enable_starttls_auto property set after the password line

         enable_starttls_auto: true
    

     

    Once the configuration.yml file is changed, you need to restart the mongrel process.

    $ sudo installdir/ctlscript.sh restart apache
    

     

    In Redmine 2.0 or greater, if you see a similar error to this: "An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol)" you should remove the "tls: true" option from the configuration.yml file. Then, in this case, you only have to restart Apache:

    $ sudo installdir/ctlscript.sh restart apache
    

    If you are using a SMTP server that do not require authentication, it is possible that you should add the following option:

    openssl_verify_mode: 'none'
    

    You can also change the link that appears in the email. Go to Administration -> Settings -> General -> Host name and path and you can write your domain name and port.

    You can also find more info at the Redmine wiki page and Redmine blog.

    How to enable SSL?

    You can see how to configure Apache to enable SSL connections at How to enable SSL to access through https?

     

    win_platform.png On Windows: In addition to this, for Redmine it is necessary to add the "RequestHeader" option in the /installdir/apps/redmine/conf/httpd-prefix.conf file:

     

    <Proxy balancer://redminecluster
      RequestHeader set X_FORWARDED_PROTO 'https'
      BalancerMember http://127.0.0.1:3001/redmine
      BalancerMember http://127.0.0.1:3002/redmine
    </Proxy>
    

    How to see the Subversion repository from Redmine application or from web browser directly?

    Redmine application itself lets to check the Repository changes and link to the number case. You only have to configure the Repository URL from the project settings.

    SCM: Subversion
    URL: http://your_repository
    Login: repository_login
    Password: repository_password
    

    Redmine-svn.png

    If you do not have any repository yet, you can create it manually. This guide describes how you can create a Subversion repository in your machine.

    If you also want to see the repository directly from the web browser, you can configure Apache server to serve the repository. You can find the exact steps here.

    How to configure Redmine for advanced integration with Git

    Before starting this guide, take into account that this is not necessary to see the repository changes in the Redmine application. If you only want to see the repository changes and link to the issues, it is only necessary to configure the project repository: Project -> Settings -> Repository -> URL and Control Version System.

    This Redmine advanced configuration is to use the users created in the Redmine application for the Git repository. For example, you can create new users from the Redmine application which will be the same that be able to "push" changes in the Git project repository. This guide is based on the Felix Schäfer guide posted at the Redmine Wiki.

     
    1. Create a Git repository. I will use "projects" to a folder where the repositories are going to be created. This directory should have write privileges for the "daemon" user.
     
    $ cd /opt/bitnami
    $ sudo mkdir projects
    $ sudo mkdir projects/test
    $ cd projects/test
    $ sudo git init --bare
    $ cd ../../
    $ sudo chown -R bitnami:daemon projects
    $ chmod -R g+rwX projects/test

    2. Download the Grack project from GitHub:

    $ cd /opt/bitnami/apache2/htdocs/
    $ git clone http://github.com/schacon/grack.git
    $ sudo chown your_user:daemon grack
     
    Edit the "grack/config.ru" file to specify where is your Git project:
     
    $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib')
    use Rack::ShowExceptions
    require 'git_http'
    config = {
      :project_root => "/opt/bitnami/projects/",
      :adapter => Grack::GitAdapter,
      :git_path => '/opt/bitnami/git/bin/git',
      :upload_pack => true,
      :receive_pack => true,
    }
    run GitHttp::App.new(config)
     
    3. You can now test the basic behaviour. Start the Grack server and try to clone the repository and push the changes from a different machine. If you are trying to follow this steps in a local installation, you can use 127.0.0.1, if not, use 0.0.0.0 and ensure that the port 8080 is openned in the firewall:
     
    $ cd /opt/bitnami/apache2/htdocs/grack
    $ rackup --host 0.0.0.0 -p 8080 config.ru
     
    3.a. Then you can try to clone the repository and push changes from a different machine.
     
    $ cd /tmp/
    $ git clone http://IP_MACHINE:8080/test
    $ cd test
    $ echo "test" > test_file
    $ git add test_file
    $ git commit -m "test" test_file
    $ git push origin master
     
    And you can see something similar to the following:
     
    Counting objects: 3, done.
    Writing objects: 100% (3/3), 200 bytes, done.
    Total 3 (delta 0), reused 0 (delta 0)
    To http://IP_MACHINE:8080/test
    * [new branch]      master -> master
     
    4. You can now stop the Grack server and configue Apache with Passenger. It is necessary to create two directories in the grack folder:
     
    $ mkdir /opt/bitnami/apache2/htdocs/grack/public
    $ mkdir /opt/bitnami/apache2/htdocs/grack/tmp
     
    Install the needed dependences:
     
    $ cd /opt/bitnami/apache2/htdocs/grack/
    $ bundle install
     
    Edit the /opt/bitnami/apache2/conf/bitnami/bitnami.conf and add the code below at the bottom (change YOUR_DOMAIN.COM which your own domain):
     
    <VirtualHost *:80>
        ServerName git.YOUR_DOMAIN.COM
        PassengerEnabled on
        PassengerAppRoot "/opt/bitnami/apache2/htdocs/grack/"   
        DocumentRoot "/opt/bitnami/apache2/htdocs/grack/public"
        <Directory "/opt/bitnami/apache2/htdocs/grack/public">
            Options None
            AllowOverride None
            <IfVersion < 2.3 >
            Order allow,deny
            Allow from all
            </IfVersion>
            <IfVersion >= 2.3>
            Require all granted
            </IfVersion>   
        </Directory> 
    </VirtualHost>
     
    You can now restart Apache server and try the same basic approach to clone the repository that you did in the 3.a step. The URL should be now http://git.your_domain.com/test, without the 8080 port.
     
    4. We are going to configure the Git access control using the Redmine.pm module. 
    Copy in the Redmine.pm file to the appropiate perl folder:
     
    $ sudo cp /opt/bitnami/apps/redmine/htdocs/extra/svn/Redmine.pm /opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi/Apache/
    $ sudo cp /opt/bitnami/apps/redmine/htdocs/extra/svn/Redmine.pm /opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi/Apache2/
     
    5. Enable the perl module in httpd.conf adding the following line.
    LoadModule perl_module modules/mod_perl.so
    
     
    You will also need to add the following lines to the /opt/bitami/apache2/bin/envvars file (the route may change depending on the version, please, check if it exists)
    LD_LIBRARY_PATH="/opt/bitnami/perl/lib/5.16.3/x86_64-linux-thread-multi/CORE/:$LD_LIBRARY_PATH"
    export LD_LIBRARY_PATH
    
     
    6. Finally add the following configuration in your already created VirtualHost in the step 4. The redmine_db_user and the redmine_db_password credentials you can get from the /opt/bitnami/apps/redmine/htdocs/config/database.yml file:
     
    <VirtualHost *:80>
         ServerName git.YOUR_DOMAIN.COM
         PassengerEnabled on
         PassengerAppRoot "/opt/bitnami/apache2/htdocs/grack/"  
         DocumentRoot "/opt/bitnami/apache2/htdocs/grack/public"
         <Directory "/opt/bitnami/apache2/htdocs/grack/public">
            Options None
            AllowOverride None
            <IfVersion < 2.3 >
            Order allow,deny
            Allow from all
            </IfVersion>
            <IfVersion >= 2.3>
            Require all granted
            </IfVersion>       
         </Directory>
        
         PerlLoadModule Apache::Redmine
        
         <Location "/">
           AuthType Basic
           AuthName "Redmine git repositories"
           Require valid-user
          
           PerlAccessHandler Apache::Authn::Redmine::access_handler
           PerlAuthenHandler Apache::Authn::Redmine::authen_handler
           RedmineDSN "DBI:mysql:database=bitnami_redmine;host=localhost;mysql_socket=/opt/bitnami/mysql/tmp/mysql.sock"
           RedmineDbUser "redmine_db_user"
           RedmineDbPass "redmine_db_password"
           RedmineGitSmartHttp yes
         </Location>
    </VirtualHost>
     
     
    You can now restart Apache and create the Project "test" in the Redmine application. Specify the path to the repository (i.e. /opt/bitnami/projects/test) and add a user as a Developer to this project. Now everything is ready to the created user be able to develop in the "test" repository using the same password that he has to access to the Redmine application. You can try the basic approach to clone and "push" a change in the repository that you did in the 3.a step.
     

    02/09/2014: Due a bug on Redmine + Public Projects + Git integration, you must configure your project as private to allow this configuration to work as expected. More info in the official redmine forums: http://www.redmine.org/issues/16948

    How to configure Redmine for advanced integration with Subversion

    Before starting this guide, take into account that this is not necessary to see the repository changes in the Redmine application. If you only want to see the repository changes and link to the issues, it is only necessary to configure the project repository: Project -> Settings -> Repository -> URL and Control Version System.

    This Redmine configuration is for automatic repository creation and rights management. Since 1.1.3-1 version, Redmine Stack ships all required modules for this configuration. Notice that if you are using Virtual Appliances or AMIs the installdir variable is "/opt/bitnami". It could be necessary to use the "sudo" command if the Stack was installed by the root user.

    This guide has been updated to work with Redmine 2.1.4.

    • Make sure that the mod_dav module is enabled in your apache configuration (httpd.conf). This module should be loaded before the modules mentioned in the next step.
    LoadModule dav_module modules/mod_dav.so
    
    • Add the following lines in Apache configuration file (httpd.conf):
    LoadModule dav_svn_module modules/mod_dav_svn.so
    LoadModule perl_module modules/mod_perl.so
    
    • You will also need to add the following lines to the /opt/bitami/apache2/bin/envvars file (the route may change depending on the version, please, check if it exists)
      LD_LIBRARY_PATH="/opt/bitnami/perl/lib/5.16.3/x86_64-linux-thread-multi/CORE/:$LD_LIBRARY_PATH"
      export LD_LIBRARY_PATH
      
    • Copy the Redmine.pm file into the Perl modules folder:
    $ cp /installdir/apps/redmine/htdocs/extra/svn/Redmine.pm installdir/perl/lib/site_perl/5.8.8/*/Apache2/
    
    • Create a folder for the repository, for instance:
    $ mkdir /installdir/repository
    $ mkdir /installdir/repository/svn
    $ chown root:daemon installdir/repository/ [or "your_user:your_user" if you installed the Stack without root privileges]
    $ chown root:daemon installdir/repository/svn/ [or "your_user:your_user" if you installed the Stack without root privileges]
    $ chmod 0755 /installdir/repository
    $ chmod 0750 /installdir/repository/svn
    
    • Add to the installdir/apps/redmine/conf/httpd-app.conf file.
    PerlLoadModule Apache2::Redmine
    <Location /svn>
      DAV svn
      SVNParentPath "/installdir/repository/svn" 
      Order deny,allow
      Deny from all
      Satisfy any
    
      PerlAccessHandler Apache::Authn::Redmine::access_handler
      PerlAuthenHandler Apache::Authn::Redmine::authen_handler
      AuthType Basic
      AuthName "Redmine SVN Repository" 
    
      #read-only access   
      <Limit GET PROPFIND OPTIONS REPORT>
         Require valid-user 
         Allow from all
         # Allow from another-ip
         Satisfy any
      </Limit>
      # write access
      <LimitExcept GET PROPFIND OPTIONS REPORT>
        Require valid-user
      </LimitExcept>
    
      ## for mysql
      RedmineDSN "DBI:mysql:database=bitnami_redmine;host=localhost;mysql_socket=/installdir/mysql/tmp/mysql.sock" 
    
      RedmineDbUser "bitnami" 
      RedmineDbPass "bitnami_database_password"    
      #You can find this value at /installdir/apps/redmine/htdocs/config/database.yml
    </Location>
    
    • Restart the servers:
    $ /installdir/ctlscript.sh restart
    
    • Log in the Redmine application as Administrator and go to "Settings" -> "Repositories" -> "Enable WS for repository management".
    • Click on "Generate a key" and save it.
    • Add the following line in the crontab. You can edit the crontab using the command "crontab -e"
    */2 * * * * /installdir/ruby/bin/ruby /installdir/apps/redmine/htdocs/extra/svn/reposman.rb --redmine localhost:YOUR_APACHE_PORT/redmine --svn-dir /installdir/repository/svn --owner root --group daemon --command="/installdir/subversion/bin/svnadmin create --pre-1.6-compatible --fs-type fsfs" --url http://YOUR_PUBLIC_IP_ADDRESS:YOUR_APACHE_PORT/svn --key="YOUR_API_KEY" --verbose >> /var/log/reposman.log 
    
    • If you have configured Redmine to accress through SSL, you can specify "--redmine http://127.0.0.1:3001/redmine" in the previous crontab line.
    • You can check that everything works properly creating a project from the Redmine application and checking the /var/log/reposman.log file.

    Thanks to "Jedbifa" who posted a complete guide in the Bitnami forums.

    How to use Mercurial with Redmine

    Redmine only allows you to use Mercurial Repositories cloned in your local machine, as explained in their official guidehttp://www.redmine.org/projects/redmine/wiki/RedmineRepositories#Mercurial-repository

    The paths used below are the ones you have to use in Virtual Machines and Cloud Images. Check if your Redmine Stack is installed in a different path.

    Step 1: Install the mercurial package

    sudo apt-get install mercurial
    

    Step 2: Create the repository directory and clone it there and give it the proper permissions

    sudo mkdir /opt/bitnami/mercurialRepo
    cd /opt/bitnami/mercurialRepo
    sudo hg clone YOUR_REPO_URL
    sudo chown -R root:daemon /opt/bitnami/mercurialRepo
    

    Step 3: Add your repository to Redmine

    In your project, go to Settings>Repositories>New repository

    SCM: Mercurial
    Identifier: Whatever
    Path to repository: /opt/bitnami/mercurialRepo/repoName
    

    Push now on create

    Step 4: Check repository

    If you go now to Repository, you will find there the files, commits done with comments, etc.

    How to debug errors?

    The Redmine log files are created in /installdir/apps/redmine/logs directory. You can check these files to see the exact error in the application.

    How to install Redmine People plugin?

    Before installing the Redmine People plugin ((http://www.redminecrm.com/projects/people/pages/1), please, follow this steps to create a backup. Once your backup is done, follow this steps:

    • If you are using Bitnami Cloud Hosting, our AMIs or our VMs, skip this step. If you are using our Native Installers, run this command:
    cd /installdir/ ; ./use_redmine
    • Go to the Redmine plugins directory:
    cd /opt/bitnami/apps/redmine/htdocs/plugins
    • Download the latest People version. Copy the link from the "Free Download" button and use this command:
    wget PASTE_THE_LINK
    • Unzip the plugin:
    unzip redmine_people*
    • Install the needed gems:
    bundle install --without development test --no-deployment
    • Install the plugin
    bundle exec rake redmine:plugins NAME=redmine_people RAILS_ENV=production
    • Restart Redmine
    /opt/bitnami/ctlscript.sh restart
    • Sign in to your Redmine installation and go to "Administration -> Plugins -> Redmine People plugin" and setup plugin global settings.

    How to configure fail2ban to work with Redmine?

    If you want to limit the number of attemps that the users could try to log in to Redmine (and avoid brute-force attacks), you could try to install fail2ban and configure it to work with Bitnami Redmine.
     
    To do it, first of all we need to install fail2ban:
    sudo apt-get update
    sudo apt-get install fail2ban
     
    Once it has been installed, we must modify /opt/bitnami/apps/redmine/htdocs/config/environment.rb to allow the Redmine Logger add timestamps to the production.log file . To do it, we must add the following lines:
    class Logger
      def format_message(severity, timestamp, progname, msg)
        "#{timestamp} (#{$$}) #{msg}\n"
      end
    end

    After modify environment.rb, we must restart the Apache server:

    sudo /opt/bitnami/ctlscript.sh restart apache
    
     
    Now, we must configure fail2ban properly. To do so, please follow the steps below:
    • Create the /etc/fail2ban/filter.d/redmine.conf and add the following code:
    [Definition]
    
    failregex = Failed [-/\w]+ for .* from <HOST>
    ignoreregex =
    • Create /etc/fail2ban/jail.local and add the code below:
    [redmine]
    enabled = true
    filter = redmine
    port = http,https
    logpath = /opt/bitnami/apps/redmine/htdocs/log/production.log
    maxretry = 5
    findtime = 600
    bantime = 600

    This fail2ban configuration will ban the IP of any user that tried to access five (maxretry) different times during the last 10 minutes (findtime) without success. Note that the ban only will affect to the ports 80 and 443, and the user with the banned IP will not be able to contact the web server during 10 minutes (bantime)

    Before apply the configuration (restart the jail2ban server), we must test if the regex configuration is properly configured. To do it, go to your Bitnami Redmine login page, write an unexistand user/password credentials and try to login to get a login error.

    Just after do it, run this command:

    fail2ban-regex /opt/bitnami/apps/redmine/htdocs/log/production.log /etc/fail2ban/filter.d/redmine.conf 

    If the last two lines of the output show you at least 1 matched it means that the regex is properly configured:

    Lines: 412 lines, 0 ignored, 1 matched, 397 missed
    Missed line(s):: too many to print.  Use --print-all-missed to print all 397 lines

    Finally, you can apply the configuration:

    sudo /etc/init.d/fail2ban restart

    To be sure that all is working, you could try to login five different times with unexistand credentials. At the 5th unsuccessfull attempt, you will be banned during 10 minutes.

    • ehsan gholami

    نصب وردپرس بر روی کامپیوتر شخصی یا Localhost

    • ehsan gholami



    This great broken glass effect can be used for creating effective text effects for your websites or logos. The broken glass effect is relatively simple to create. Throughout this tutorial, I will teach you the skills needed to create this cool effect in Adobe Illustrator.

    Preparing the text

    The first step is to get a strong headline font – the typeface that you will see in a newspaper or comic book. I went for the font “Bebas” in this example, which can be downloaded for free here. Now type out your text, preferably in two separate text boxes, positioned beneath each other. I find it helps to decrease the tracking (the distance between characters) to create a more compact logo. (This setting can be found under the Character toolbox). I decreased the tracking to -50, shown below. This will help the broken glass effect become more prominent.

    To create a bolder and more comical effect, try selecting individual characters and modifying their font size, as I did shown below.

    Creating the broken glass look

    Before you can start applying path effects to the text, you have to convert it to an object. You can do this by selecting the text and clicking Object > Expand. Once you do this you will no longer be able to change the text or font. Now you can start cutting up the text into pieces. Create a new layer and start drawing triangles with the pen tool where you would like the glass fractures to be, as shown below.

    Now, select a triangle shape and click on Object > Path > Divide Objects Below. Do this for every triangle segment. Unfortunately, you can’t do this by selecting them all at the same time, though it won’t take long to do them one by one. When you have finished you will notice all the triangles will have disappeared and you will be left with your original text spliced up. In order to edit or move the individual selections, you will need to ungroup the selection as shown below.

    Now, you can begin to start selecting the individual fragments and moving them apart. Try adjusting the size of the fragments and nudging them outwards using the cursor keys. You can also try rotating them slightly to add a more scattered look. If the shards of “glass” appear too close together or overlaps too much, you can try adding a white stroke to the outline to try separate them visually. Secondly, you can try breaking up the logo more using circular lines similar to the steps above, to create a more realistic broken glass look. You should come up with something as shown below.

    Tweak around with your design until you are happy with the overall look, and don’t be afraid to experiment. Try incorporate this effect into your logos – it can look really effective if only applied to one or two words in your logo – especially if you would like to portray a “smashing” or “heavy impact” connotation to your brand.

    • ehsan gholami

    You can get interesting dotted lines with your Stroke Palette. Open up your Stroke Palette from Window>Stroke. Draw a line and select it. Enter the dash and gap value as shown. Experiment with different dash and gap values for different effects. To create a square dotted line, make sure the dash and weight is the same value.

    illustrator stroke tip

    So how about circle dotted lines? Here’s the trick. Select the Round Cap and make sure dash is set to 0 pt. For gap enter a value twice the stroke weight. This will give you a nice circle dotted lines.

    illustrator dotted line

    Bonus Tip: To expand the dotted lines, you realise Object>Expand doesn’t work. Choose Object>Flatten Transparency to expand it. You can now fill each dots with different colors.

    • ehsan gholami

    Y} Faux Capiz Shell Pendant

     
     
    A couple weeks ago I showed you the crystal globe pendant I hung in Ellie's room.  Since there isn't an overhead light in her room, the pendant is a nice way to give the illusion of a fun light fixture without the expense and hassle of running wires and installing one.

    Ada's room is the same, with no overhead light, and I wanted to hang something above her chair too.  I'd been seeing a lot of faux capiz shell chandeliers around and decided that was the way I wanted to go.  As for the look, I liked the layered look of this real capiz chandelier from West Elm:
     

    I also liked the draped top of this beaded chandelier:
     

    I set out to combine the two looks by constructing a frame out of the top of an old lampshade, metal craft rings, and clear hanging wire.
     

    I used four rings total, in descending size order.  It's important to measure the hanging wire carefully and space them equally apart to get the rings to hang level.  To be honest, this step was a little more tedious than I thought it would be.

    For the top, I used the smallest size craft ring and hung it about a foot above the largest ring.  I cut a wooden skewer to the diameter of the top ring, hot glued a metal rope to the center, then hot glued the sides of the skewer to the ring.
     
     
    Once the frame was done, it was time to make those fake little capiz shells.  I tore sheets of wax paper about 15" long, stacked three on top of each other, and used a hot iron to bond them together.  It only takes a few seconds to iron each stack of wax paper.  I used about two boxes worth of wax paper and had around 20 finished sheets.  Then I used a circle punch to punch out the "shells."
     
    Here are the tips I learned along the way.  Hold 4-5 finished sheets together to punch at one time.  Otherwise the punch sticks and rips the paper (plus it goes faster!).  Don't punch too close to the edge or the punch kind of sticks too.  I would punch a row of shells and then use a paper cutter to slice off the bottom and then do another row, and so on.  The paper cutter was much easier and quicker than cutting the punched edges with scissors.
     
    After I had a pile of the fake capiz shells, I threaded my sewing machine with white thread and used the same technique as I did for the circle garland to sew them together.  It takes a little time but with the number of shells I had, sewing was much quicker than laying them all out and hot gluing them together with thread (I've seen it done this way).  I was left with ribbons and ribbons of faux capiz shells.
     
     
    I hung the frame from a curtain rod and started attaching the shells on the largest ring first.  I cut strips of five shells, put a dab of hot glue on the top shell or second from the top and then folded the top shell over the ring and pressed together with the next one to hang the strip from the ring.
     
     
     
    I continued all the way around until the whole ring was covered then continued with the remaining smaller rings, adjusting the length each time to get the look I wanted.
     
    For the top part, I glued a fake shell to the top shell on the largest ring, then held up the string of shells to determine the length, cut it to size, and glued it to the top.  You want to consider spacing here so it looks neat when finished.  I worked in quarters at a time.
     
     
    When it was all finished I added an anchor and hook to the ceiling in Ada's room and put the new faux capix pendant in place.  
     
     
    I could easily convert this into an actual light someday if we wind up in a house that has hard wired ceiling lights.  But for now, I love the soft, whimsical interest it adds to Ada's room. 
     
     
     
     
    Full disclosure here, this was not a quick project.  Between making the frame, the fake capiz shells, and putting it all together it took me several days.  But, for me, it was totally worth the effort!
    • ehsan gholami

    Ever since the first Kindle was introduced in 2007, eBooks have been gaining more market shares. Reading books not printed on paper is becoming a trend. Among the number of eBook formats available on the typical type of eReader devices, ePub, electronic publication, is no doubt the most popular one that is set to be a free open stander for all digital media publication. Most eBook readers support this format, except for the Kindle (which need to convert from mobi toepub).

    Here we have complied a list of 5 best ePub readers available on Windows 7 for those who want to read ePub books on a desktop Windows computer. We will be using the same programming book for each ePub reader below for comparison to find out how one looks differently from each other.

    1. Adobe Digital Editions

    adobe_digital_editions

    • ehsan gholami

    طریقه ساختن اپل آیدی رایگان بصورت تصویری با آیتونز

    به دلیل نیاز کاربران گوشی های آیفون به Apple ID در این قسمت طریقه ساخت اپل آیدی با کامپیوتر رو براتون توضیح دادیم .  معمولا برای این کار بین ۴۰ تا ۸۰ هزارتومان هزینه دریافت میشه . ما بصورت مجانی و کاملا با حوصله و مرحله به مرحله این کار و با عکس براتون توضیح دادیم . در صورتی که عکسها کوچک و ناخوانا هستند ، میتونید برای بزرگ شدن روی آنها کیک کنید.  در ادامه مطلب با ما باشید …

    hereuare

    اگر هم حوصله خواندن این همه مطلب ندارید میتوانید فقط یک ویدیو ببینید !!!


    شما با داشتن اپل آی دی میتونید از مزایای زیادی استفاده کنید که در زیر به موارد مهم و مفید آن اشاره شده :

    • ehsan gholami

    به مناسبت روز وبلاگ نویسی ، قصد دارم دومین مجموعه از مطالب تایپوگرافی از سیر تا پیاز را به کاربرد تایپ ۱ در وب و به خصوص زبان فارسی بپردازم .

    تایپ و تصویر در کنار یکدیگر انتقال دهنده مفهوم هستند . در این بین تایپ نقش کلیدی و پررنگی ایفا می کند . گاهی اوقات تایپ بیان تصویری دارد و از کارکرد صرفا متنی خود خارج می شود و مفهوم را نیز به شکلی تصویری منتقل می کند . انواع فونت ها ، چیدمان ها و رنگ ها در متون به کارکرد تصویری تایپ کمک می کنند . تایپوگرافی خیلی خلاصه یعنی همین اهمیت دادن به وجه تصویری تایپ .

    9a53cbfadbb2183b865d098b0e2adf93

      دیباچه :

    • ehsan gholami

    وسط چینی افقی با CSS

    برای این کار باید مقدار خاصیت Margin را در استایل خود برابر Auto 0 قرار بدید. در این صورت المان HTML در وسط والد خود قرار میگیرد. در صورتی که آن در لایه های داخلی ستونی غیر وسط نباشد در وسط صفحه قرار میگیرد. همینطور اگر آن تگ زیرمجموعه تگ body باشد در وسط صفحه جای خواهد گرفت.

    • ehsan gholami

    There are several Facebook Social Plugins you can implement on your WordPress site. The entire list can be found here
    Here are the steps I took to place a Facebook Like Box plugin on my site.

    • Go to the Facebook Like Box webpage
    • Enter your Facebook BUSINESS PAGE URL (no personal page)
    • Click the “Get Code” at the bottom
    • Click to select iFrame code
    • Copy and paste code in a TEXT widget, or page/post on your wordpress site

    • ehsan gholami