All posts by Baiazid

SELinux

Enforce policy:
Edit selinux configuration:

Make sure the following settings are:

 

Install semanage tool:
Find a package that contains semanage:

For example:

will install semanage

Change default SSH Port to 777:
Run semanage tool:

Configure sshd to use port 777 and restart ssh deamon:

If SELinux is not configured, secure log will display error: Bind to port 777 on  0.0.0.0 failed: Permission denied.

SVN

Branch:

CheckOut:

Update:

Info:

Clean up:

Commit:

Revert:

Create diff:

Create patch

Apply patch:

Svn log:

Svn revert:

Create directory with trunk

MySQL

Import dump:

Create dump:

Drop:

Create:

Update:

Insert:

Select duplicates:

Add new column and update Primary Key

INNER Join:

PostgreSQL

Create database:

 

Delete database:

 

Create table:

 

Delete table:

 

Insert

Dump

 

Restore

 

SELECT COUNT(*)

 

Create user

 

Grant privileges

 

Rename column

 

Change password

 

Add auto-increment pk to existing table, where ID is pk

 

Modify sequence number

 

Delete sequence

 

Change column constraint to not null

 

Change column type from integer to smallint

 

Change column type from varchar (20) to varchar (40)

 

Change column type from date to timestamp without time zone

 

Delete column

 

Add column

 

Rename column

 

Add foreign key

 

Delete constraint

 

Delete data

 

Select A where B has 0 entries

 

Hello

Welcome to IT Solutions:

Hi,

I am starting this blog page about trivial Linux tasks, basic MySQL/PostgreSQL commands, interesting jQuery scripts,  fun with Java code in order to help myself: I cannot remember all arguments to every command or small jQuery tricks. This blog will be my repository.

About myself:

Developer by profession and by fun. I like photography and motorcycle riding. I know they are not related with nix world but I wanted to mention them.

OS: Started in nix world by using mandrake Linux long time while I was in Uni, then switched to FreeBSD. Now I am playing with Linux :)

Dev: Played long time ago with ASM for micro-controllers, C/C++ for embedded devices. Now I am working in PHP and Java.