Install Scrapy Portia in Ubuntu Server 14.04

There are 2 ways to install Scrapy Portia in Ubuntu Server 14.04: Install via virtualenv/pip or Install Docker. Please see the details below

The key is not to prioritize what's on your schedule, but to schedule your priorities

The key is not to prioritize what’s on your schedule, but to schedule your priorities

Option 1: Install Portia via Virtualenv/pip

Please make sure that virtualenv and pip is ready to use in your server.

Do activate Portia environment:

Download Protia source code:

 

Install libraries, packets:

Check  port 9001, and run Portia:

Test Portia at link: http://localhost:9001/static/main.html

Install Portia via Docker (recommended):

Make sure that Docker was installed in your server and ready to use:

Download source code:

Build Portia Image:

And run Protia Docker container:

How to integrate phpCAS in Laravel

I would like to share you how to integrate phpCAS in Laravel. As you know, Jasig CAS is a Single-Sign-On System. If you want to connect to Jasig CAS from your system (that is wrote by PHP), you use phpCAS Library

Work hard in Silence, Let Success make the noise

Work hard in Silence, Let Success make the noise

To know how to install a Jasig CAS server, please see:  https://sonnguyen.ws/install-jasig-cas-ubuntu-14-04/

Step 1:  Download phpCAS Library and locate it in app/library directory

Step 2: Create CAS Authentication Provider

We create file CasAuthProvider.php

Add source code to file:

Please make note that, you have to add  cas_host, cas_context, cas_port to app/config/app.php file

Step 3: Adding new provider to Laravel

Edit app/start/global.php file by adding code:

Step 4: Adding phpCAS library, new provider to Laravel Autoload

Open composer.json located at Laravel Root Directory and add app/library/phpCAS, app/cas:

Dump new Laravel Autoload file:

Step 5: Finally, create route and controller for login action

In app/routes.php file add:

In app/controllers/Admin.php add:

 

 

Adding external library to Laravel 4+

When you work with a framework, sometimes you need to use an external library. This will show you the way to add an external library to Laravel 4. Actually, it is very simple.

For example, you have a library that locates in path: app/library/external_lib. So you should add that path to composer.json file (located at root directory of framework)

The next step is the final step, run command to dump library to autoload file of framework.

I assumed that composer was installed to your machine.