How to install Net 3.5 framework on Windows 8.1 2012 in WSUS enviroment

Wsus does not provide this so the easiest ways is to to insert Windows 8.1 CD into <drive>

then open up command line and run the following command with replacing <drive> into your CD location eg D/E etc.

Dism /online /enable-feature /featurename:NetFx3 /All /Source:<drive>:\sources\sxs /LimitAccess

Why I can’t login using ssh to root account on my Debian 8 default instalation.

By default due to security reason you are not allowed to use root account with password to login to Debian 8

Assume that your ssh is already installed navigate to /etc/ssh/sshd_config and amend the following configuration

PermitRootLogin without-password  to

PermitRootLogin Yes

Once this is done you need to reload your ssh service

/etc/init.d/ssh reload

Once this is completed you will be able to login using ssh.

This is a good practices as long as you are using it for your virtual dev environment. Due to security concert never using in production server.

How to install Net Framework 3.5 if 0x800f081f is given

This sometimes can be a problem if WSUS/GPO is not set up properly to allow install missing packages and windows update is configured to use WSUS.

Insert your windows installation disk. Make a note of partition number you are using for it eg: D/E

Go to Start -> Open up command line by typing cmd -> Right Click Run as Administator

then type the following

C:\Windows\system32>dism /online /enable-feature:NetFx3 /All /Source:e:\sources\

sxs /LimitAccess

This will allow you install missing package.

How to resolve mkdir (permission denied) issue on fedora when running Yii Framework

Make sure that you issue the following commands

Example below from my dev enviroment

[root@ami basic]# chmod 0750 -R /var/www/html/
[root@ami basic]# chcon -R -t httpd_sys_content_t /var/www/html/
[root@ami basic]# chcon -R -t httpd_sys_content_rw_t /var/www/

Preporing Fedora 22 to use with Yii php Framework

You will need to add the following to your php.ini script:

/etc/php.ini

extension=apcu.so
extension=intl.so
extension=memcache.so
extension=imagick.so

then change expose_php = Off (default is On) then Save your php.ini (This is not finish yet)

1. Get all you need to development machine. This is probably more than you need but it will save you time with finding out what is missing on your system.

yum install php-devel httpd-devel
yum groupinstall ‘Development Tools’
yum groupinstall ‘Development Libraries’

yum install postgresql
yum install postgresql-devel
yum install php-gd
yum install ImageMagick
yum install ImageMagick-devel

yum install re2c
pecl channel-update pecl.php.net
pecl install apcu-beta

pecl install intl
pecl install memcache
pecl install postgresql
pecl install pdo_pgsql
pecl install imagick

service httpd restart

2. Install Yii and get composer first

curl -sS https://getcomposer.org/installer | php

composer global require “fxp/composer-asset-plugin:1.0.0”

composer create-project –prefer-dist yiisoft/yii2-app-basic yourAppName

3. Move your app to httpd documentRoot directory /etc/httpd/conf/httpd.conf and look for
DocumentRoot “/var/www/html/” or create your own confing and put into /etc/httpd/conf.d

example below
# This first-listed virtual host is also the default for *:80
ServerName http://www.jawuk.dev
ServerAlias jawuk.dev
DocumentRoot “/var/www/html/basic/web”
DirectoryIndex index.php index.html

4. Make sure you have added your siteName to /etc/hosts

127.0.0.1     jawuk.dev

5. Move requirement.php to web folder inside yii project then run http:/yourSiteName/requirements.php

amend path in requirements.php to $frameworkPath = ‘../vendor/yiisoft/yii2’; (this is to point where vender folder is)

if you don’t move it web folder then you don’t need amend the path as it will work.

5. service httpd restart

6. check http://yourSite/requirements.php
then when you check requirements.php it should be a lot happier altought it seems I am missing something with pgsql

if you end up having mkdir permission issue make sure you issue this command

[root@ami basic]# chmod 0750 -R /var/www/html/
[root@ami basic]# chcon -R -t httpd_sys_content_t /var/www/html/
[root@ami basic]# chcon -R -t httpd_sys_content_rw_t /var/www/

PHP version Passed Yii Framework PHP 5.4.0 or higher is required.
Reflection extension Passed Yii Framework
PCRE extension Passed Yii Framework
SPL extension Passed Yii Framework
MBString extension Passed Multibyte string processing Required for multibyte encoding string processing.
OpenSSL extension Passed Security Component Required by encrypt and decrypt methods.
Intl extension Passed Internationalization support PHP Intl extension 1.0.2 or higher is required when you want to use advanced parameters formatting in Yii::t(), non-latin languages with Inflector::slug(), IDN-feature of EmailValidator or UrlValidator or the yii\i18n\Formatter class.
ICU version Passed Internationalization support ICU 49.0 or higher is required when you want to use # placeholder in plural rules (for example, plural in Formatter::asRelativeTime()) in the yii\i18n\Formatter class. Your current ICU version is 52.1.
Fileinfo extension Passed File Information Required for files upload to detect correct file mime-types.
DOM extension Passed Document Object Model Required for REST API to send XML responses via yii\web\XmlResponseFormatter.
PDO extension Passed All DB-related classes
PDO SQLite extension Passed All DB-related classes Required for SQLite database.
PDO MySQL extension Passed All DB-related classes Required for MySQL database.
PDO PostgreSQL extension Warning All DB-related classes Required for PostgreSQL database.
Memcache extension Passed MemCache
APC extension Passed ApcCache
GD PHP extension with FreeType support Passed Captcha Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.
ImageMagick PHP extension with PNG support Passed Captcha Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.
Expose PHP Passed Security reasons “expose_php” should be disabled at php.ini
PHP allow url include Passed Security reasons “allow_url_include” should be disabled at php.ini
PHP mail SMTP Passed Email sending PHP mail SMTP server required

How to find out which apache modules are loaded

To check your apache configuration you need to do the following depending on various Linux distribution.

[root@ami conf]# httpd -l
Compiled in modules:
core.c
mod_so.c
http_core.c

or

[root@ami conf]# httpd -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
access_compat_module (shared)
actions_module (shared)
alias_module (shared)
allowmethods_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
authn_anon_module (shared)
authn_core_module (shared)
authn_dbd_module (shared)
authn_dbm_module (shared)
authn_file_module (shared)
authn_socache_module (shared)
authz_core_module (shared)
authz_dbd_module (shared)
authz_dbm_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_owner_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cache_module (shared)
cache_disk_module (shared)
data_module (shared)
dbd_module (shared)
deflate_module (shared)
dir_module (shared)
dumpio_module (shared)
echo_module (shared)
env_module (shared)
expires_module (shared)
ext_filter_module (shared)
filter_module (shared)
headers_module (shared)
include_module (shared)
info_module (shared)
log_config_module (shared)
logio_module (shared)
macro_module (shared)
mime_magic_module (shared)
mime_module (shared)
negotiation_module (shared)
remoteip_module (shared)
reqtimeout_module (shared)
request_module (shared)
rewrite_module (shared)
setenvif_module (shared)
slotmem_plain_module (shared)
slotmem_shm_module (shared)
socache_dbm_module (shared)
socache_memcache_module (shared)
socache_shmcb_module (shared)
status_module (shared)
substitute_module (shared)
suexec_module (shared)
unique_id_module (shared)
unixd_module (shared)
userdir_module (shared)
version_module (shared)
vhost_alias_module (shared)
dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)
lua_module (shared)
mpm_prefork_module (shared)
proxy_module (shared)
lbmethod_bybusyness_module (shared)
lbmethod_byrequests_module (shared)
lbmethod_bytraffic_module (shared)
lbmethod_heartbeat_module (shared)
proxy_ajp_module (shared)
proxy_balancer_module (shared)
proxy_connect_module (shared)
proxy_express_module (shared)
proxy_fcgi_module (shared)
proxy_fdpass_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_scgi_module (shared)
systemd_module (shared)
cgi_module (shared)
dnssd_module (shared)
php5_module (shared)

This give you exact info with regards of what is available on your machine

How to change username password on Cisco Device

The following should work in normal circumstances.

Login to Cisco device:

enable

configure terminal

username MyUserName password 0 mypassword

More can be read here

http://www.cisco.com/c/en/us/td/docs/ios/12_2/security/configuration/guide/fsecur_c/scfpass.html#wp1001412