- MEASUREIT
- SEARCH STACK OVERFLOW
- RESPONSIVE INSPECTOR
- CODE COLA
- PHP CONSOLE
Wednesday, January 11, 2017
Plugins Yang Perlu Ada Sebagai Web Developer
Wednesday, January 04, 2017
Mega Calendar for Redmine
Plugin for redmine: Brings a better calendar and more oppurtunities to set holidays.
Only compatible/tested with redmine 3.0.X, 3.1.X, 3.2.X, 3.3.X and Ruby 2.2, Rails 4.2
Please test this plugin for other redmine versions and let me know if there are any bugs.
Please test this plugin for other redmine versions and let me know if there are any bugs.
Installation
Standard redmine plugin installation: You can read the generic plugin installation guide here or you can use the following guide (Debian 7, Apache2/Passenger).
Go to your redmine plugins-folder
Download the latest plugin-Version:
Unzip the downloaded zip-File
Rename the folder:
Give the folder the right privileges in this case apache (to execute the command you must be root)
Go to the plugin folder
Install the gems
Go back to your redmine folder
Migrate the database
Now restart your redmine and you can configure the plugin in the admin settings in redmine.
To start redmine under apache2/passenger, please execute the following commands
cd /srv/redmine/pluginsDownload the latest plugin-Version:
wget https://github.com/berti92/mega_calendar/archive/master.zipUnzip the downloaded zip-File
unzip master.zipRename the folder:
mv mega_calendar-master mega_calendarGive the folder the right privileges in this case apache (to execute the command you must be root)
chown -R www-data.www-data mega_calendarGo to the plugin folder
cd /srv/redmine/plugins/mega_calendarInstall the gems
bundleGo back to your redmine folder
cd /srv/redmineMigrate the database
bundle exec rake redmine:plugins:migrate RAILS_ENV=productionNow restart your redmine and you can configure the plugin in the admin settings in redmine.
To start redmine under apache2/passenger, please execute the following commands
cd /srv/redminetouch tmp/restart.txtUsage
Within a issue you are able to set a time as start and end, to get a better calendar view. On top of the page you can reach the calendar and holiday section.
Please make sure that you set your users, that will be allowed to use this plugin and that the sub-path is set to "/" without quotes at the plugin settings.
Screenshots
A quick overview about this plugin, you'll get on http://mega-calendar.devbert.de/
History
1.4.0: Added export functionality (ics) - Please make sure, that you have installed the gems -> WIKI
1.3.8: Now you are able to set the start of the week within the plugin settings
1.3.7: Bugfix
1.3.6: Bugfix
1.3.5: Bugfix
1.3.4: Added ability to create issues from the calendar, just click on a free space on the calendar
1.3.3: Added support for Redmine 3.3.X
1.3.2: Added support for Redmine 3.2.X
1.3.1: Bugfix
1.3.0: Added right for this plugin
1.2.0: Added support for sub paths
1.1.0: Fixed a few bugs, added widget to MyPage
1.0.0: First release
You like my work?
If you like my work, you can buy me a coffee
or try my new browser game: Sketcharama
License
MIT License
Saturday, December 31, 2016
Installation Redmine , PhpMyAdmin and Webmin On Centos 7
Dependencies, dependencies, dependencies
We are dealing with many different software components, and along with them, their dependencies. Installing Ruby requires a C compiler and HTTPD development modules are required for other components.
System Pre-requisites
These are the external packages available as RPMs in the default CentOS repositories.
# Install the various dependencies available through yum
sudo yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel ftp wget ImageMagick-devel
# For passenger, which is itself another dependency, you'll need the C++ Compiler
sudo yum install gcc-c++
# Download and add the MySQL repository
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
# Update everything
sudo yum update
Install Ruby
First, download ruby from the most reliable of sources (or download it on a separate machine and FTP it into your machine).
# Create your own Downloads folder
mkdir ~/Downloads
cd ~/Downloads
# Download the Ruby source files
wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz
# Un-tar-gz the archive
tar -zxvf ./ruby-2.3.1.tar.gz
Next, install Ruby.
# Building it from source code
cd ruby-2.3.1
./configure
sudo make
# Install Ruby
sudo make install
# Check if installed
ruby -v
which ruby
Install RubyGems
To determine what is the latest version of RubyGems go to the RubyGems Download Page. There, you can get the link to the TGZ (or download it to FTP into your machine).
# Switch to root (enter your own root password)
su root
Password: **********
# Download the latest version of RubyGems
mkdir ~/Downloads
cd ~/Downloads
wget https://rubygems.org/rubygems/rubygems-2.6.6.tgz
# Un-tar-gz the archive
tar -zxvf ./rubygems-2.6.6.tgz
Next, install RubyGems.
# Install using Ruby
cd rubygems-2.6.6
ruby setup.rb
# Check if installed
gem -v
which gem
# Exit root (if you haven't already)
exit
Install Passenger
Move the original folder apache conf.d
mv /etc/httpd/conf.d /etc/httpd/conf.d-original
Create a new folder and virtual host file for Passenger :
mkdir /etc/httpd/conf.d
vi /etc/httpd/conf.d/passenger.conf
For This Installation
After completed, we copy a notification block in the window to create the configuration file in the next steps (select block notification and press C to copy).
LoadModule passenger_module /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1
PassengerDefaultRuby /usr/local/bin/ruby
Paste the command blocks into the empty file and save it, then restart the Apache service.
service httpd restart
The full name of the Passenger is Phusion Passenger, known as mod_rails or mod_rack, it is a web application intergrate with Apache and it can operate as a standalone web server support for the Ruby On Rails applications.
Execute the following commands :
gem install passenger
passenger-install-apache2-module
For New Installation
After completed, we copy a notification block in the window to create the configuration file in the next steps (select block notification and press C to copy).
LoadModule passenger_module /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1
PassengerDefaultRuby /usr/local/bin/ruby
Paste the command blocks into the empty file and save it, then restart the Apache service.
service httpd restart
Install MySQL Server
MySQL Server repository for CentOS is not included in the default installation. You will need to download and add it. Refer to the prerequisites in a previous section. Assuming the repository is included, run the following:
# Install MySQL Server
sudo yum install mysql-server
# Verify that it is running
sudo chkconfig mysqld on
sudo systemctl start mysqld
# Configure root password. Note that initial password is blank, just hit.
/usr/bin/mysql_secure_installation
Next, create a Redmine database and account.
# Access MySQL as root
mysql -uroot -p
Enter password: **********
# Create Redmine database
mysql> create database redmine character set utf8;
# Create associated redmine account
mysql> create user 'redmine'@'localhost' identified by 'my_password';
mysql> grant all privileges on redmine.* to 'redmine'@'localhost';
mysql> flush privileges;
mysql> exit;
Install Redmine
Redmine is a main program of the project management system, we will download and install the program from the website of Redmine.
# Download the latest version of Redmine
cd ~/Downloads
wget http://www.redmine.org/releases/redmine-3.3.0.tar.gz
# Un-tar-gz the archive
tar -zxvf redmine-3.3.0.tar.gz
# Move it to an appropriate location
sudo mv ./redmine-3.3.0 /var/www/redmine
Configuring the Database
The next, we need to configure the database was created from the above steps.
cd /var/www/redmine/config
cp database.yml.example database.yml
vi database.yml
All lines in the file should be commented out except for the following, with the appropriate entries for password and database credentials configured in a previous section.
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "********"
encoding: utf8
Setting up Rails
Install the package library support for Rails using the Bundle.
cd /var/www/redmine
gem install bundler
bundle install
rake generate_secret_token
If got error
/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466
vi /usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.
3.1/lib/htmlentities/mappings/expanded.rb
Search the duplicate key "inodot" on line 466
#
# This table added by Philip (flip) Kromer
# using the mapping by John Cowan (25 July 1997) at
# ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/SGML.TXT
#
# The following table maps SGML character entities from various
# public sets (namely, ISOamsa, ISOamsb, ISOamsc, ISOamsn, ISOamso,
# ISOamsr, ISObox, ISOcyr1, ISOcyr2, ISOdia, ISOgrk1, ISOgrk2,
# ISOgrk3, ISOgrk4, ISOlat1, ISOlat2, ISOnum, ISOpub, ISOtech,
# HTMLspecial, HTMLsymbol) to corresponding Unicode characters.
#
# The table has five tab-separated fields:
# :bare => SGML character entity name
# :hex => Unicode 2.0 character code
# :entity => SGML character entity
# :type => SGML public entity set
# :udesc => Unicode 2.0 character name (UPPER CASE)
#
# Entries which don't have Unicode equivalents have "0x????" for
# :hex and a lower case :udesc (from the public entity set DTD).
#?ino
search hit TOP, continuing at BOTTOM'ijlig'=> 0x0133, # LATIN SMALL LIGATURE IJ
'Imacr'=> 0x012a, # LATIN CAPITAL LETTER I WIITH MACRON
'imacr'=> 0x012b, # LATIN SMALL LETTER I WITHH MACRON
'image'=> 0x2111, # xhtml BLACK-LETTER CAPITAL I
'incare'=> 0x2105, # CARE OF
'infin'=> 0x221e, # xhtml INFINITY
'inodot'=> 0x0131, # dupLATIN SMALL LETTER DOTLESSS I
'inodot'=> 0x0131, # dupLATIN SMALL LETTER DOTLESSS I <---- delete="" line="" p="" this=""> 'int'=> 0x222b, # xhtml INTEGRAL
'intcal'=> 0x22ba, # INTERCALATE
'IOcy'=> 0x0401, # CYRILLIC CAPITAL LETTER IIO
'iocy'=> 0x0451, # CYRILLIC SMALL LETTER IO
'Iodot'=> 0x0130, # LATIN CAPITAL LETTER I WIITH DOT ABOVE
'Iogon'=> 0x012e, # LATIN CAPITAL LETTER I WIITH OGONEK
'iogon'=> 0x012f, # LATIN SMALL LETTER I WITHH OGONEK
The next, we create the database table for the Redmine application.
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
Activate FCGI
cd /var/www/redmine/public
mkdir plugin_assets
cp dispatch.fcgi.example dispatch.fcgi
cp htaccess.fcgi.example .htaccess
Setting up Apache and FastCGI
cd /var/www/
rpm --import https://fedoraproject.org/static/0608B895.txt
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum -y install mod_fcgid
rm -rf epel-release-6-8.noarch.rpm
Creating Files Directory
This directory contains data files generated during the operation of Redmine as document or image file, we create a new directory in the "/opt".
mkdir -p /opt/redmine/files
chown -R apache:apache /opt/redmine
cd /var/www/redmine/config
cp configuration.yml.example configuration.yml
vi configuration.yml
Enter the directory path containing the data files you just created in the previous step into the line "attachments_storage_path".
Note: You must add a space at the begin of the path "/opt/redmine/files" after character ":"
Configuring Email
Another very important function of Redmine is using email to notify members when the contents of each project changes, Redmine can use many different methods to send email that is Sendmail, SMTP, GMail ...
To configure the email we will edit the configuration file.
nano /var/www/redmine/config/configuration.yml
The simplest is you use features of the default SendMail in the Centos OS by settings :
email_delivery:
delivery_method: :sendmail
Note : Do not use the Tab key to indent when editing the configuration file, you need to use the space bar on the keyboard.
If you use GMail's SMTP, you need to register an email account with the login methods used password normal and disable two-step authentication by smart phone.
Enter your Gmail account as below :
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: 587
domain: "smtp.gmail.com"
authentication: :plain
user_name: "your_email@gmail.com"
password: "your_password"
Save the file configuration and exit.
Create Virtual Host for Redmine
Create an Apache configuration file for the Redmine application at the port 80.
vi /etc/httpd/conf.d/redmine.conf
Copy the text below and paste into the editor window, note the information to change your domain name.
ServerName your_domain
ServerAdmin your_domain@domain.com
DocumentRoot /var/www/redmine/public/
ErrorLog logs/redmine_error_log
Options Indexes ExecCGI FollowSymLinks
Order allow,deny
Allow from all
AllowOverride all
---->
Save the file configuration and exit.
Permissions, permissions, permissions
With CentOS, you get SELinux. Security comes with a cost, and if that cost is some additional lines of code in addition to the usual chmod and chown,
that's not too bad, right?
# Allow requests on TCP ports 80 and 443 through
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
sudo firewall-cmd --reload
# Change ownership of Redmine folder to Apache
sudo chown -R apache:apache /var/www/redmine
# Change access permissions to Redmine folder
sudo chmod -R 0755 /var/www/redmine
# Enable the serving of files off Apache
sudo chcon -R -t httpd_sys_content_t /var/www/redmine
# Allow httpd to write only to specific folders
sudo chcon -R -t httpd_sys_rw_content_t /var/www/redmine/log
sudo chcon -R -t httpd_sys_rw_content_t /var/www/redmine/tmp/cache
sudo chcon -R -t httpd_sys_rw_content_t /var/www/redmine/files
# Enable sending of emails
sudo setsebool -P httpd_can_network_connect 1
As with all configurations done to Apache and its folders, a restart is necessary.
# Restart Apache once again
sudo systemctl restart httpd
Install PHP and phpMyAdmin
Because we use MySQL database management system, so we need to install phpMyAdmin program management.
phpMyAdmin is a free open source tool written by PHP language to manage MySQL database via a web browser.
It can create, modify or delete databases, tables, fields or records, perform SQL statements, or managing users and permissions.
The command to install PHP and the packages :
yum -y install php php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap
yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel
systemctl restart httpd.service
phpMyAdmin installation
phpMyAdmin is a web interface through which you can manage your MySQL databases.
phpMyAdmin can now be installed as follows:
yum install phpMyAdmin
Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the stanza):
We also will configure Virtual Host to run on port 8080 because port 80 is using by Redmine
vi /etc/httpd/conf.d/phpMyAdmin.conf
[...]
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
# Apache 2.4
# Require ip 127.0.0.1
# Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
[...]
#Add Virtual Host run on port 8080
DocumentRoot /usr/share/phpmyadmin/
ServerName your_domain.com
We also need to add the command to allows listening on the port 8080 in the file "httpd.conf"
vi /etc/httpd/conf/httpd.conf
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
Listen 8080
Next we change the authentication in phpMyAdmin from cookie to http:
vi /etc/phpMyAdmin/config.inc.php
[...]
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
[...]
# Allow requests on TCP ports 8080 through
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
sudo firewall-cmd --reload
Restart Apache:
systemctl restart httpd.service
Afterwards, you can access phpMyAdmin under http://192.168.0.100:8080/phpmyadmin/
Install Webmin on CentOS 7
Step 1. First add Webmin official repository.
Webmin isn’t available in the default CentOS repositories, you must add its repository to your system before installing. To do that, run the commands below to create a repository file for Webmin:
vi /etc/yum.repos.d/webmin.repo
And add the following lines:
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
We’ll need to install webmin GPG key now, using following command:
wget http://www.webmin.com/jcameron-key.asc
rpm --import jcameron-key.asc
Next step is to update the repositories and all available package updates, to make sure we’re installing the latest version of Webmin. Run following command:
yum check-update
Step 2. Install Webmin.
Install Webmin with the following command:
yum install webmin -y
Start the service and make it start automatically every time you reboot your server:
chkconfig webmin on
service webmin start
By default, Webmin will listen on port 10000. Enable webmin port:
firewall-cmd --permanent --zone=public --add-port=10000/tcp
firewall-cmd --reload
Step 3. Access Webmin.
We are dealing with many different software components, and along with them, their dependencies. Installing Ruby requires a C compiler and HTTPD development modules are required for other components.
System Pre-requisites
These are the external packages available as RPMs in the default CentOS repositories.
# Install the various dependencies available through yum
sudo yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel ftp wget ImageMagick-devel
# For passenger, which is itself another dependency, you'll need the C++ Compiler
sudo yum install gcc-c++
# Download and add the MySQL repository
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
# Update everything
sudo yum update
Install Ruby
First, download ruby from the most reliable of sources (or download it on a separate machine and FTP it into your machine).
# Create your own Downloads folder
mkdir ~/Downloads
cd ~/Downloads
# Download the Ruby source files
wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz
# Un-tar-gz the archive
tar -zxvf ./ruby-2.3.1.tar.gz
Next, install Ruby.
# Building it from source code
cd ruby-2.3.1
./configure
sudo make
# Install Ruby
sudo make install
# Check if installed
ruby -v
which ruby
Install RubyGems
To determine what is the latest version of RubyGems go to the RubyGems Download Page. There, you can get the link to the TGZ (or download it to FTP into your machine).
# Switch to root (enter your own root password)
su root
Password: **********
# Download the latest version of RubyGems
mkdir ~/Downloads
cd ~/Downloads
wget https://rubygems.org/rubygems/rubygems-2.6.6.tgz
# Un-tar-gz the archive
tar -zxvf ./rubygems-2.6.6.tgz
Next, install RubyGems.
# Install using Ruby
cd rubygems-2.6.6
ruby setup.rb
# Check if installed
gem -v
which gem
# Exit root (if you haven't already)
exit
Install Passenger
Move the original folder apache conf.d
mv /etc/httpd/conf.d /etc/httpd/conf.d-original
Create a new folder and virtual host file for Passenger :
mkdir /etc/httpd/conf.d
vi /etc/httpd/conf.d/passenger.conf
For This Installation
After completed, we copy a notification block in the window to create the configuration file in the next steps (select block notification and press C to copy).
LoadModule passenger_module /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1
PassengerDefaultRuby /usr/local/bin/ruby
Paste the command blocks into the empty file and save it, then restart the Apache service.
service httpd restart
The full name of the Passenger is Phusion Passenger, known as mod_rails or mod_rack, it is a web application intergrate with Apache and it can operate as a standalone web server support for the Ruby On Rails applications.
Execute the following commands :
gem install passenger
passenger-install-apache2-module
For New Installation
After completed, we copy a notification block in the window to create the configuration file in the next steps (select block notification and press C to copy).
LoadModule passenger_module /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1
PassengerDefaultRuby /usr/local/bin/ruby
Paste the command blocks into the empty file and save it, then restart the Apache service.
service httpd restart
Install MySQL Server
MySQL Server repository for CentOS is not included in the default installation. You will need to download and add it. Refer to the prerequisites in a previous section. Assuming the repository is included, run the following:
# Install MySQL Server
sudo yum install mysql-server
# Verify that it is running
sudo chkconfig mysqld on
sudo systemctl start mysqld
# Configure root password. Note that initial password is blank, just hit
/usr/bin/mysql_secure_installation
Next, create a Redmine database and account.
# Access MySQL as root
mysql -uroot -p
Enter password: **********
# Create Redmine database
mysql> create database redmine character set utf8;
# Create associated redmine account
mysql> create user 'redmine'@'localhost' identified by 'my_password';
mysql> grant all privileges on redmine.* to 'redmine'@'localhost';
mysql> flush privileges;
mysql> exit;
Install Redmine
Redmine is a main program of the project management system, we will download and install the program from the website of Redmine.
# Download the latest version of Redmine
cd ~/Downloads
wget http://www.redmine.org/releases/redmine-3.3.0.tar.gz
# Un-tar-gz the archive
tar -zxvf redmine-3.3.0.tar.gz
# Move it to an appropriate location
sudo mv ./redmine-3.3.0 /var/www/redmine
Configuring the Database
The next, we need to configure the database was created from the above steps.
cd /var/www/redmine/config
cp database.yml.example database.yml
vi database.yml
All lines in the file should be commented out except for the following, with the appropriate entries for password and database credentials configured in a previous section.
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "********"
encoding: utf8
Setting up Rails
Install the package library support for Rails using the Bundle.
cd /var/www/redmine
gem install bundler
bundle install
rake generate_secret_token
If got error
/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466
vi /usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.
3.1/lib/htmlentities/mappings/expanded.rb
Search the duplicate key "inodot" on line 466
#
# This table added by Philip (flip) Kromer
# using the mapping by John Cowan
# ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/SGML.TXT
#
# The following table maps SGML character entities from various
# public sets (namely, ISOamsa, ISOamsb, ISOamsc, ISOamsn, ISOamso,
# ISOamsr, ISObox, ISOcyr1, ISOcyr2, ISOdia, ISOgrk1, ISOgrk2,
# ISOgrk3, ISOgrk4, ISOlat1, ISOlat2, ISOnum, ISOpub, ISOtech,
# HTMLspecial, HTMLsymbol) to corresponding Unicode characters.
#
# The table has five tab-separated fields:
# :bare => SGML character entity name
# :hex => Unicode 2.0 character code
# :entity => SGML character entity
# :type => SGML public entity set
# :udesc => Unicode 2.0 character name (UPPER CASE)
#
# Entries which don't have Unicode equivalents have "0x????" for
# :hex and a lower case :udesc (from the public entity set DTD).
#?ino
search hit TOP, continuing at BOTTOM'ijlig'=> 0x0133, # LATIN SMALL LIGATURE IJ
'Imacr'=> 0x012a, # LATIN CAPITAL LETTER I WIITH MACRON
'imacr'=> 0x012b, # LATIN SMALL LETTER I WITHH MACRON
'image'=> 0x2111, # xhtml BLACK-LETTER CAPITAL I
'incare'=> 0x2105, # CARE OF
'infin'=> 0x221e, # xhtml INFINITY
'inodot'=> 0x0131, # dupLATIN SMALL LETTER DOTLESSS I
'inodot'=> 0x0131, # dupLATIN SMALL LETTER DOTLESSS I <---- delete="" line="" p="" this=""> 'int'=> 0x222b, # xhtml INTEGRAL
'intcal'=> 0x22ba, # INTERCALATE
'IOcy'=> 0x0401, # CYRILLIC CAPITAL LETTER IIO
'iocy'=> 0x0451, # CYRILLIC SMALL LETTER IO
'Iodot'=> 0x0130, # LATIN CAPITAL LETTER I WIITH DOT ABOVE
'Iogon'=> 0x012e, # LATIN CAPITAL LETTER I WIITH OGONEK
'iogon'=> 0x012f, # LATIN SMALL LETTER I WITHH OGONEK
The next, we create the database table for the Redmine application.
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
Activate FCGI
cd /var/www/redmine/public
mkdir plugin_assets
cp dispatch.fcgi.example dispatch.fcgi
cp htaccess.fcgi.example .htaccess
Setting up Apache and FastCGI
cd /var/www/
rpm --import https://fedoraproject.org/static/0608B895.txt
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum -y install mod_fcgid
rm -rf epel-release-6-8.noarch.rpm
Creating Files Directory
This directory contains data files generated during the operation of Redmine as document or image file, we create a new directory in the "/opt".
mkdir -p /opt/redmine/files
chown -R apache:apache /opt/redmine
cd /var/www/redmine/config
cp configuration.yml.example configuration.yml
vi configuration.yml
Enter the directory path containing the data files you just created in the previous step into the line "attachments_storage_path".
Note: You must add a space at the begin of the path "/opt/redmine/files" after character ":"
Configuring Email
Another very important function of Redmine is using email to notify members when the contents of each project changes, Redmine can use many different methods to send email that is Sendmail, SMTP, GMail ...
To configure the email we will edit the configuration file.
nano /var/www/redmine/config/configuration.yml
The simplest is you use features of the default SendMail in the Centos OS by settings :
email_delivery:
delivery_method: :sendmail
Note : Do not use the Tab key to indent when editing the configuration file, you need to use the space bar on the keyboard.
If you use GMail's SMTP, you need to register an email account with the login methods used password normal and disable two-step authentication by smart phone.
Enter your Gmail account as below :
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: 587
domain: "smtp.gmail.com"
authentication: :plain
user_name: "your_email@gmail.com"
password: "your_password"
Save the file configuration and exit.
Create Virtual Host for Redmine
Create an Apache configuration file for the Redmine application at the port 80.
vi /etc/httpd/conf.d/redmine.conf
Copy the text below and paste into the editor window, note the information to change your domain name.
ServerName your_domain
ServerAdmin your_domain@domain.com
DocumentRoot /var/www/redmine/public/
ErrorLog logs/redmine_error_log
Options Indexes ExecCGI FollowSymLinks
Order allow,deny
Allow from all
AllowOverride all
---->
Save the file configuration and exit.
Permissions, permissions, permissions
With CentOS, you get SELinux. Security comes with a cost, and if that cost is some additional lines of code in addition to the usual chmod and chown,
that's not too bad, right?
# Allow requests on TCP ports 80 and 443 through
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
sudo firewall-cmd --reload
# Change ownership of Redmine folder to Apache
sudo chown -R apache:apache /var/www/redmine
# Change access permissions to Redmine folder
sudo chmod -R 0755 /var/www/redmine
# Enable the serving of files off Apache
sudo chcon -R -t httpd_sys_content_t /var/www/redmine
# Allow httpd to write only to specific folders
sudo chcon -R -t httpd_sys_rw_content_t /var/www/redmine/log
sudo chcon -R -t httpd_sys_rw_content_t /var/www/redmine/tmp/cache
sudo chcon -R -t httpd_sys_rw_content_t /var/www/redmine/files
# Enable sending of emails
sudo setsebool -P httpd_can_network_connect 1
As with all configurations done to Apache and its folders, a restart is necessary.
# Restart Apache once again
sudo systemctl restart httpd
Install PHP and phpMyAdmin
Because we use MySQL database management system, so we need to install phpMyAdmin program management.
phpMyAdmin is a free open source tool written by PHP language to manage MySQL database via a web browser.
It can create, modify or delete databases, tables, fields or records, perform SQL statements, or managing users and permissions.
The command to install PHP and the packages :
yum -y install php php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap
yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel
systemctl restart httpd.service
phpMyAdmin installation
phpMyAdmin is a web interface through which you can manage your MySQL databases.
phpMyAdmin can now be installed as follows:
yum install phpMyAdmin
Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the
We also will configure Virtual Host to run on port 8080 because port 80 is using by Redmine
vi /etc/httpd/conf.d/phpMyAdmin.conf
[...]
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
# Apache 2.4
# Require ip 127.0.0.1
# Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
[...]
#Add Virtual Host run on port 8080
DocumentRoot /usr/share/phpmyadmin/
ServerName your_domain.com
We also need to add the command to allows listening on the port 8080 in the file "httpd.conf"
vi /etc/httpd/conf/httpd.conf
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
Listen 8080
Next we change the authentication in phpMyAdmin from cookie to http:
vi /etc/phpMyAdmin/config.inc.php
[...]
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
[...]
# Allow requests on TCP ports 8080 through
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
sudo firewall-cmd --reload
Restart Apache:
systemctl restart httpd.service
Afterwards, you can access phpMyAdmin under http://192.168.0.100:8080/phpmyadmin/
Install Webmin on CentOS 7
Step 1. First add Webmin official repository.
Webmin isn’t available in the default CentOS repositories, you must add its repository to your system before installing. To do that, run the commands below to create a repository file for Webmin:
vi /etc/yum.repos.d/webmin.repo
And add the following lines:
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
We’ll need to install webmin GPG key now, using following command:
wget http://www.webmin.com/jcameron-key.asc
rpm --import jcameron-key.asc
Next step is to update the repositories and all available package updates, to make sure we’re installing the latest version of Webmin. Run following command:
yum check-update
Step 2. Install Webmin.
Install Webmin with the following command:
yum install webmin -y
Start the service and make it start automatically every time you reboot your server:
chkconfig webmin on
service webmin start
By default, Webmin will listen on port 10000. Enable webmin port:
firewall-cmd --permanent --zone=public --add-port=10000/tcp
firewall-cmd --reload
Step 3. Access Webmin.
Wednesday, December 21, 2016
Linkstation tidak boleh akses shared folder dalam Windows 10
Windows 10 dan Linkstation error
Simptom
Keluar notifikasi
\\server is not accessible. You might not have permission to access . bla bla bla ....
\\server is not accessible. You might not have permission to access . bla bla bla ....
Solusi :
- Launch the "Credential Manager" in Windows 10 (search for it in the start menu)
- Open "Windows Credentials"
- Click "Add a Windows credential"
- Internet or Network Address: \\servername (replace with the Netbios-name of your cloudstation, or use IP)
- User name: servername\username (replace with netbios-name and the username you are connecting with)
- Password: Self-explanitory
Hope it works for you!
- Launch the "Credential Manager" in Windows 10 (search for it in the start menu)
- Open "Windows Credentials"
- Click "Add a Windows credential"
- Internet or Network Address: \\servername (replace with the Netbios-name of your cloudstation, or use IP)
- User name: servername\username (replace with netbios-name and the username you are connecting with)
- Password: Self-explanitory
Hope it works for you!
Monday, July 04, 2016
Merekabentuk Pangkalan Data
Merekabentuk Pangkalan Data
Ini saya sharekan video yang dibuat oleh En. Firdaus. Seorang pegawai di KPM. Semoga ilmu yang dikongsikan ini menjadi amal jariah pada beliau.Terdapat pelbagai tutorial , terima kasih pada En. Firdaus kerana berjaya membuat tutorial yg membantu para junior dan orang tiada basic sangat tentang pangkalan data.
Seperti yang diketahui umum semakin besar saiz data , semakin komplek dan semakin mencabar untuk menguruskan satu pangkalan data. Oleh itu keperluan untukmerancang di peringkat awal memudahkan penyelenggaraan pada masa akan datang.
Marilah kita mengaplikasikan idea-idea yang beliau gunakan dalam video ini.
Tools:
Navicat Premium
https://www.navicat.com/
- MySQL -
http://www.mysql.com/
Database
https://en.wikipedia.org/wiki/Database
Normalization
https://en.wikipedia.org/wiki/Database_normalization
Video Youtube
https://www.youtube.com/watch?v=BfUUfEWrLzs
Penulis/Penerbit Video Youtube
https://www.facebook.com/MohdFirdausGapar?fref=nf
Ini saya sharekan video yang dibuat oleh En. Firdaus. Seorang pegawai di KPM. Semoga ilmu yang dikongsikan ini menjadi amal jariah pada beliau.Terdapat pelbagai tutorial , terima kasih pada En. Firdaus kerana berjaya membuat tutorial yg membantu para junior dan orang tiada basic sangat tentang pangkalan data.
Seperti yang diketahui umum semakin besar saiz data , semakin komplek dan semakin mencabar untuk menguruskan satu pangkalan data. Oleh itu keperluan untukmerancang di peringkat awal memudahkan penyelenggaraan pada masa akan datang.
Marilah kita mengaplikasikan idea-idea yang beliau gunakan dalam video ini.
Tools:
Navicat Premium
https://www.navicat.com/
- MySQL -
http://www.mysql.com/
Database
https://en.wikipedia.org/wiki/Database
Normalization
https://en.wikipedia.org/wiki/Database_normalization
Video Youtube
https://www.youtube.com/watch?v=BfUUfEWrLzs
Penulis/Penerbit Video Youtube
https://www.facebook.com/MohdFirdausGapar?fref=nf
Thursday, June 02, 2016
5 kegunaan command netstat atau /sbin/ss
Kita boleh guna netstat atau command /sbin/ss untuk banyak pekara. Berikut dipaparkan sebahagian daripadanya:
1. Show who is connected to your system
One of the most useful things you can do with netstat is show exactly who is connected to your system either through an incoming or outgoing connection (whether it is your system which initiated it or the other system). This will simply list all of them:
netstat -a
Look at the "Foreign Address" column to see where the connection is coming from, and "Local Address" to see what on the local machine is it connected.
The following command will show just the TCP (-t) and UDP (-u) connections:
netstat -tua
If you want to turn off hostnames, or domain names, and display only IP numbers just add the -n option.
netstat -tuan
If you want it to display this continuously to see as connections come and go add the -c option.
netstat -tuanc
Needless to say, perhaps, with IP addresses of everyone connecting revealed you can use other tools like traceroute to determine where exactly is it coming from.
2. Show listening ports
If you'd like to see which services are actually listening for incoming connections, perhaps to ensure you don't have something listening that you don't want to be listening, just use the -l option.
netstat -l
You can also limit this to only a specific type of traffic, like TCP in this example (for UDP just use -u):
netstat -lt
3. Find the port used by a program
We can get a little bit more specific by combining the netstat command with other common UNIX utilities like grep, in this example, where we make it easier to find which port is used by a program. We use grep to conveniently dig this info out of the netstat output:
netstat -ap | grep znc
In this example we get a list of all connections mentioning ZNC with the ports it is using, and addresses it is connected to.
4. Check on the routing table
With netstat you can easily see the kernel IP routing table being used on your system using the -r option:
netstat -r
5. Show all statistics
Being a statistics utility you can of course see a summary of a great number of statistics about your system's networking. Just run the netstat command with the -s option:
netstat -s
This will display a huge list of statistics, but you'll immediately recognize the most interesting ones depending on what you're looking for. For example you can see a total number of packets received, number of active TCP connections, and a number of extended more detailed statistics for each protocol.
Note
These examples are based on netstat in Linux, where it has been succeeded by the ss command from the iproute2 package, but it should apply to most UNIX and UNIX like systems. You can also check the manual page readily available via the man netstat command for more information.
CentOS 7 dalam VMWare Workstation Problem Tak Ada Network
Huish ni la nak cuba bertukar distro plak ... try guna CentOS plak yek. CentOS yg diinstall plak minimal aje.
Masa nak configure network dan didapati plak x de network devide padahal kat VM dah set.
Kita kena edit fail *.vmx :
Tambah code dalam fail tu sebaik-baiknya kat network punya part.
Alhamdulillah dah jalan da ...
Tambah code dalam fail tu sebaik-baiknya kat network punya part.
CODE: SELECT ALL
ethernet0.virtualDev = "e1000"Alhamdulillah dah jalan da ...
Subscribe to:
Posts (Atom)
Baru Beli 3D Printer? Ini 10 Laman Web untuk Cari Model 3D Percuma
Sejak mula menggunakan Bambu Lab P2S Combo , antara soalan pertama yang bermain dalam kepala saya ialah: “Dekat mana nak cari benda menarik...
