Category Archives: Open Source

Open Source related posts.

Configure network settings on a new CentOS 7 server

  1. use the nmtui to configure the network connection.  Define the netmask in the ip address.
     Ex. 10.0.0.1/8 or 192.168.1.33/24
  2. Restart the network services for changes to take place:
    systemctl restart network.service.
  3. To be able to use the ifconfig command, install the net-tools
    yum -y install net-tools
  4. To be able to use the nslookup command, install the bind-utils
    yum -y install bind-utils
  5. Update the build
    yum -y update

SimpleSAMLphp setup on Windows 2008 – Install PHP

The application runs on PHP, so it will need to be installed on the server for Windows to run the scripts.
You should be able to go here for the latest PHP installer for IIS: http://php.iis.net/
Use the Web Platform Installer to automate the installation and configuration of PHP on your server.  You could do it manually, but it’s a pain.  The installer should be able to be found here;  http://www.microsoft.com/web/downloads/platform.aspx
Version 5.6.0 was used at the time of this writing.
Find the version of PHP you want to install and click the Add button.  Example: PHP 5.6.0.
WebPlatformInstaller
If dependent components are missing, they will be listed to be included with the PHP installation.  Go ahead and click the “I Accept” button.
WpiPrerequisites
After the installation completes, you’ll be presented with a summary page of the pieces that were installed.  Click on Finish.
WpiInstallerWorking.png
Use PHP Manager in IIS Manager to finish configuring PHP:
PhpManagerInIis.png
Set recommendations for adding index.php to default file and automatically reset php when config.php is updated.  Click on the “View recommendations.” link.
PhpSetup
Click on the “Enable or disable and extension” link.
PhpExtensionsLink
Use “Enable or disable and extension” to drill down and enable LDAP Extension:
EnableLdap1
EnableLdap2
LDAP will be the protocol used by SimpleSAMLphp to get user information from Active Directory when authenticating.
Next we will look at installing the SimpleSAMLphp application.

Set JAVA_HOME on Linux

http://mshsoftware.com/site/kb/set-java-home-on-linux.html

How to set $JAVA_HOME variable on Linux

Article based on:

  • Linux Mint 14
  • Java 1.7

Should work on any Linux and Java version: Ubuntu, RedHat, CentOS, SUSE, ArchLinux, Debian, Fedora etc.

1. Install Java

If you have already installed Java then skip to point 3.

Before continue make sure you don’t have installed Java.

Open terminal and invoke:

whereis java

command. If you do not have Java then you will see:

java:

That will mean you DONT have Java.

Download Java from here or use your package manager to install it.

2. Java location

By default Java is located in

/usr/lib/jvm/java-<version>

directory.

3. Set $JAVA_HOME variable

To set JAVA_HOME only in actual shell session, invoke command:

export JAVA_HOME=/usr/lib/jvm/java-<version>

To persist this environment variable edit vi ~/.bash_profile file, and add JAVA_HOME definition:

JAVA_HOME=/usr/lib/jvm/java-<version>

Save and relogin to apply changes.

 

 

http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/

Install phpMyAdmin

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Visit the phpMyAdmin website for more information.
At the terminal, enter the following:
Elevate to root access

su -

Install phpMyAdmin

yum install phpmyadmin

Change the the /etc/httpd/conf.d/phpMyAdmin.conf  file to allow remote administration:

#Order Allow,Deny 
#Deny from all
Allow from 127.0.0.1

Restart the apache server

service http restart

From a browser, go to

http:///phpmyadmin">http://<server>/phpmyadmin

Automatically Close an Incident when Resolved and Bypass Customer Verification

Open the SD.IncidentManagement workflow.

On the Main Incident Work model, create a SkipCustConfirm variable in the Input Data section and set it to True.  Between the Close Cose=QuickClose component and the Customer Confirmation component, add a Matches Rule and configure SkipCustConfirm = False and no match output to the Customer Confirmation component.  Copy the Set Process State/Status, Expose Workflow Tracking ID, SatisfyOverallSLA, and Save External Data components.  Paste those so that the Matches Rule True output goes into that chain.  Take the output of the chain and link it to the End component.  The Customer is no longer notified that their incident is Resolved.

In the Initial Diagnosis sub-model, create a SkipCustConfirm variable in the Input Data section and set it to True.  In the two instances where where the ProcessStatusComponent is set for Resolved at 90%, inset a Matches Rule bypass and set the ProcessStatusComponent to Closed at 100%.  When a technician resolves an incident, it will now set it to Closed.  The Customer needs to Reopen an incident if it is not really Resolved.

Installing LAMP on CentOS

Install Apache HTTP Server (httpd) and PHP 5.3.8

Reposted from Here.
1. Change root user
su –
2. Install Remi repository
## Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
## CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
3. Install Apache (httpd) Web server and PHP 5.3.8
yum –enablerepo=remi install httpd php php-common
4. Install PHP 5.3.8 modules
yum –enablerepo=remi install php-pear php-pdo php-mysql php-pgsql php-pecl-memcache php-gd php-mbstring php-mcrypt php-xml
5. Start Apache HTTP server (httpd) and autostart Apache HTTP server (httpd) on boot
service httpd start ## use restart after update
chkconfig –levels 235 httpd on
6. Create test PHP page to check that Apache, PHP and PHP modules are working
Add following content to /var/www/html/test.php file.
<?php
    phpinfo();
?>
7. Check created page with browser
Access following address, with your browser. http://localhost/test.php

 Enable Remote Connection to Apache HTTP Server (httpd) –> Open Web server Port (80) on Iptables Firewall (as root user again)
1. Edit /etc/sysconfig/iptables file:
nano -w /etc/sysconfig/iptables
2. Add following line before COMMIT:
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
3. Restart Iptables Firewall:
service iptables restart
## OR ##
/etc/init.d/iptables restart
4. Test remote connection
Access following address, with your browser. http://your.domain/test.php