Think Your Mind

SSH tunneling for proxy

by on Nov.01, 2011, under Linux

ssh -f user@personal-server.com -L 2000:personal-server.com:25 -N

The -f tells ssh to go into the background just before it executes the command. This is followed by the username and server you are logging into. The -L 2000:personal-server.com:25 is in the form of -L local-port:host:remote-port. Finally the -N instructs OpenSSH to not execute a command on the remote system.

This essentially forwards the local port 2000 to port 25 on personal-server.com over, with nice benefit of being encrypted. I then simply point my E-mail client to use localhost:2000 as the SMTP server and we’re off to the races.

Share
Leave a Comment more...

Self Sign Multiple Domain Cert

by on Sep.27, 2011, under Uncategorized

1. create the CA cert

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt

2. create client req csr

openssl genrsa -des3 -out server.key 2048

*edit the openssl.conf

uncomment “req_extensions = v3_req”

in [ v3_req ] add

subjectAltName = @alt_names

add the end of the file

[ alt_names ]
DNS.1 = test.domain.com
DNS.2 = www1.domain.com

openssl req -new -key server.key -out server.csr

*create a config file “server.conf”

subjectAltName = @alt_names

[ alt_names ]

DNS.1 = test.domain.com
DNS.2 = www1.domain.com
openssl x509 -req -days 365 -in server.csr -CA ca.crt  -CAkey ca.key -set_serial 01 -extfile server.conf -out server.crt
Share
Leave a Comment more...

Symfony 2 can’t not write cache files

by on Sep.26, 2011, under Symfony

1. Using ACL on a system that supports chmod +a

Many systems allow you to use the “chmod +a” command. Try this first, and if you get an error – try the next method:

rm -rf app/cache/*
rm -rf app/logs/*

sudo chmod +a ”www-data allow delete,write,append,file_inherit,directory_inherit” app/cache app/logs
sudo chmod +a ”yourname allow delete,write,append,file_inherit,directory_inherit” app/cache app/logs

2. Using Acl on a system that does not support chmod +a

Some systems don’t support “chmod +a”, but do support another utility called “setfacl”. You may need to enable ACL support on your partition and install “setfacl “before using it (as is the case with Ubuntu), like so:

sudo setfacl -R -m u:www-data:rwx -m u:yourname:rwx app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:yourname:rwx app/cache app/logs
Share
Leave a Comment more...

Git notes

by on Sep.01, 2011, under GIT

delete branch remotely

to delete local/remote branch "newfeature":

local:
git branch -d newfeature

remote:
git push origin :newfeature

export changed file of last commit to tar:
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD | xargs tar czvf last_commit.tar.gz

export changed file between two commit
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT tag1 tag2 | xargs tar czvf last_commit.tar.gz 

last commit deleted files
git diff-tree -r --no-commit-id --name-only --diff-filter=D HEAD

 

Share
Leave a Comment more...

Git tar and gzip last commit diff

by on Jul.25, 2011, under GIT, Linux, Symfony

git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD | xargs tar czvf last_commit.tar.gz

Share
Leave a Comment more...

Symfony 2.0 requirement (ICU 4+ & php-intl)

by on Jul.06, 2011, under Linux, Symfony

  1. download latest ICU source
  2. using default config command compile the ICU to /usr/local
  3. recompile php 5.3.x with
    ‘–enable-intl’ \
    ‘–with-icu-dir=/usr/local’
  4. restart apache
Share
Leave a Comment :, , more...

Import CSV to MySQL

by on Mar.22, 2011, under MySQL

shell> mysqlimport [options] db_name textfile1 [textfile2 ...]

Share
Leave a Comment more...

Get Linux Information

by on Mar.09, 2011, under Linux, Uncategorized

dmidecode
Show server information

Share
Leave a Comment more...

Add MySQL to service

by on Jan.05, 2011, under Uncategorized

How to configure MySQL
Set the MySQL service to start on boot
chkconfig –levels 235 mysqld on
Start the MySQL service
service mysqld start

Share
Leave a Comment more...

iFolder 3.8.3 error in windows 7

by on Dec.26, 2010, under Linux

Here’s what is now working for me.
OpenSuse 11.3 x64 and iFolder 3.8.0.3 server / client, openLDAP, Windows 7 x64.

To re-summarize my problem, I was able to use the web interface (both /admin and /ifolder) without trouble. I could also use the 32 bit client with 32 bit Win XP. I could not use the client with Windows 7 (x64 or 32).

The solution was to:
1) Issue an SSL cert that referenced the server’s FQDN.
I.E. gensslcert –n www.mydomain.com
2) Configure simias for this FQDN.
I.E. simias-server-setup -> https://www.mydomain.com/simias10 -> both the public and private interface
3) Edit /etc/apache2/vhosts.d/vhosts-ssl.conf
uncomment and edit the ServerName line to read as below
ServerName www.mydomain.com

iFolder night update version repo for openSUSE 11.3
[network_ifolder_client_snapshot]
name=iFolder Client Daily Builds (openSUSE_11.3)
type=rpm-md
baseurl=http://download.opensuse.org/repositories/network:/ifolder:/client_snapshot/openSUSE_11.3/
gpgcheck=1
gpgkey=http://download.opensuse.org/repositories/network:/ifolder:/client_snapshot/openSUSE_11.3/repodata/repomd.xml.key
enabled=1

[network_ifolder_server_snapshot]
name=iFolder Server Daily Builds (openSUSE_11.3)
type=rpm-md
baseurl=http://download.opensuse.org/repositories/network:/ifolder:/server_snapshot/openSUSE_11.3/
gpgcheck=1
gpgkey=http://download.opensuse.org/repositories/network:/ifolder:/server_snapshot/openSUSE_11.3/repodata/repomd.xml.key
enabled=1

Share
Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Recent Comments