Sunday, December 31, 2017

How to install samba in centos


http://www.techotopia.com/index.php/Sharing_Files_between_CentOS_6_and_Windows_Systems_with_Samba

https://www.cyberciti.biz/faq/unix-create-user-account/



found this , i think this is the right one
https://www.youtube.com/watch?v=EYVO4kEQomE
https://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/

How to install GIT in centos

yum install git

Reference:
https://www.rosehosting.com/blog/how-to-install-git-on-centos-7/

Saturday, December 30, 2017

How to install SSH server in linux

CentOS
https://tecadmin.net/install-or-update-openssh-server-centos-rhel-and-fedora/


No internet connection in fresh install CentOs

ip addr show
ifup enp0s3
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

https://www.youtube.com/watch?v=QeMCnkq9W10

Saturday, December 23, 2017

How to list specific column name in the table

SELECT * FROM information_schema.columns WHERE table_catalog = 'myevo' AND table_name  = 'purchase_order' and column_name = 'batch_id'


sorted

SELECT * FROM information_schema.columns WHERE table_catalog = 'vbroker20-beta1' AND table_name  = 'vb_trade_tran' order by column_name

Tuesday, December 19, 2017

Docker Networking

Lately I have a problem and yet to be solve. It's related in docker networking I guess.

When I try to run Odoo connect to Postgres using the docker-compose it will run successfully but the problem here is that I couldn't longer connected to my network ip address. If I connect our Odoo UAT as 172.18.6.180:8069 it failed as in FAILED!

After reading a LOT of article about the issue still I can't figure it out. But, I learn a few things about the docker network. Some of it , like below list.

1. Talk about bridge network - https://github.com/docker/labs/blob/master/networking/A2-bridge-networking.md


Running Tomcat and PostgresSQL in Docker



https://blog.lukaspradel.com/dockerizing-a-tomcat-postgresql-java-web-application/

https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/

Python libraries

Running API from python code needs this libraries.


installing in centos
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py

sudo pip install web.py
sudo pip install pyt
sudo pip install python-dateutil
sudo pip install tzlocal
sudo pip install pyyaml



installing in ubuntu, need to install the pip first.
$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
$ sudo pip install --upgrade virtualenv



Monday, December 18, 2017

How to install Sublime in ubuntu

apt

Install the GPG key:
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
 
Ensure apt is set up to work with https sources:
sudo apt-get install apt-transport-https
 
Select the channel to use:
Stable
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Dev
echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Update apt sources and install Sublime Text
sudo apt-get update
sudo apt-get install sublime-text

How to install docker-compose in ubuntu

sudo apt-get -y install python-pip
sudo pip install docker-compose 

Sunday, December 17, 2017

GIT cheatsheet

I am curious about this GIT ever since but I don't have any actual encounter to use GIT in my development until now.  I have a freelance job which use GIT as source control.

This project is an odoo development.

I have been struggling to commit my codes as I'm not familiar how to use GIT but luckily I understand a little bit more now.
With the help of my friend Google. There are some tutorial and sites that is very helpful to my knowledge.

very slick site and clear to understand
http://rogerdudler.github.io/git-guide/

another very good site to understand more about merging
https://confluence.atlassian.com/bitbucket/use-a-git-branch-to-merge-a-file-681902555.html


# clone a remote repository
git clone https://skyguyver@bitbucket.org/skyguyver/malphi.git


# update local repository
git pull origin master


# to see any changes
git status

# to check the difference
git diff

# last 1 entry in the log
git log -1


# to move to staging
git add <file>

# to commit
git commit -m "some comments here"

# show commit history
git log


git show 81a00

# revert committed
git revert 81a00

# delete irreversible
# git reset --hard 2e75

# reset and delete current merge
git reset --hard HEAD

# set usename and email
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com


I found this more useful with an image to understand more about GIT
https://developer.atlassian.com/blog/2014/12/pull-request-merge-strategies-the-great-debate/

Monday, November 27, 2017

Odoo API



How to find name of database for XML-RPC connection to OpenERP/Odoo?

db_serv_url = 'http://{}/xmlrpc/db'.format(host)
sock = xmlrpclib.ServerProxy(db_serv_url)
dbs = sock.list()
print dbs



Friday, October 13, 2017

More on Docker machine...


http://support.divio.com/local-development/docker/how-to-use-a-directory-outside-cusers-with-docker-toolbox-on-windows




Thursday, October 12, 2017

Docker machine make it work


delete
$ docker-machine rm default

create
$ docker-machine create --driver virtualbox dev

mark as active
$ eval $(docker-machine env dev)

How to search files from windows command prompt

I am still struggling with yesterday problem in my docker. I can't find the file docker.qcow2 in my windows env but some gain additional information on how to search a file from windows command prompt.

type below to go to your main directory c:
cd c/ 

then
dir secret.doc /s /p



Reference:
http://www.dummies.com/computers/operating-systems/windows-xp-vista/how-to-search-for-files-from-the-dos-command-prompt/




Wednesday, October 4, 2017

Odoo Database cleanup

I have a feeling to continue my project in Tenant Management system using latest Odoo 10. Sometimes, you need to remove some unnecessary columns and when you upgrade again your module it will stay and not totally remove it.

This is called 'stale' records/model. It's something that the data still configured in your odoo framework even you remove it from your model list.

For example, you want to delete the last column "test"




when you check on the PGADMIN the field "test" is still there even you upgrade your module. So you need to clean up the database from odoo.

since I'm using odoo 10, I need to use the compatible Cleanup Database which is free from odoo community.

https://pypi.python.org/pypi/odoo10-addon-database-cleanup/10.0.1.0.0.99.dev4



Eureka!




Tuesday, October 3, 2017

Wednesday, September 27, 2017

Jasper Server in Docker

One of the functionality in our system is can able to generate a report using Jasper report.  We have a Jasper server setup in another ip address.  I was wondering how they set up the server but there is no chance to know how exactly they configure it.

So I pop up the browser trying to get some luck if there's an image from docker for Jasper and voila, there is!

https://github.com/retrievercommunications/docker-jasperserver

It's very simple setup

docker run -d --name jasperserver -e DB_TYPE=mysql -e DB_HOST=db -e DB_PORT=3306 -e DB_USER=root -e DB_PASSWORD=mysql --link jasperserver_mysql:db -p 8080:8080 retriever/jasperserver

but since we are using Postgres, I changed some parameters.

docker run -d --name jasperserver -e DB_TYPE=postgresql -e DB_HOST=db -e DB_PORT=5432 -e DB_USER=admin -e DB_PASSWORD=admin --link postgres9.3:db -p 8080:8080 retriever/jasperserver




Eureka!



Sunday, September 24, 2017

Hassle free mp3

My wife emotionally loves the song "Perfect" by Ed Sheeran and actually, she cried to hear this song last night. So I pop up the browser and browse if I can download the song and remember that I can download it from google chrome browser with some simple script.

Here's the script below:

"Perfect" -inurl:(html|htm|php|pls|txt) intitle:index.of "last modified" (mp3)


Eureka!



Friday, September 15, 2017

GVIM color it

I really like VIM even I'm still not yet a master... hehe.

One way you use VIM in windows is to install GVIM and you can download it from official page.

As I don't like the default colorscheme in GVIM, I found a way to change it and they also provide a lot of color scheme to available for us.

You can download the color scheme in this site
http://vimcolors.com/

Save it in folder
C:\Program Files (x86)\Vim\vim80\colors

and finally, add in the last line in _vimrc found in C:\Program Files (x86)\Vim
eg.
colorscheme carbonized-dark


Eureka!


Wednesday, September 13, 2017

Reset Visual Paradigm - Hacker way!

In my current company, I'm using Visual Paradigm for my documentation task. If you go there site, you can either download community and evaluation edition. The problem with community edition is it doesn't have DFD diagram or Data Flow Diagram. So I was forced to download the evaluation copy with 30 days grace period.

But there's a hacker way to reset the 30 days grace period.

go to folder:

C:\Users\lynard\AppData\Roaming\VisualParadigm

and delete all files inside. Eureka! that's it. so simple but thanks who share this tip from someone.

Reference:
https://www.youtube.com/watch?v=33scaPXe4wU




Thursday, September 7, 2017

ls command

Friday I'm in Love, Yes! it's Friday and I'm good as I was so early at work. I saw 2 bosses already sitting.

As I was looking around through my files. I realized that I always use "ls" command. It is a very helpful command in Linux so I decided to google up and search more other useful things from it.

One from the tips is very useful it will not only list all items under the folder but also list down every item in every folder.

$ ls -R




References:
https://www.tecmint.com/15-basic-ls-command-examples-in-linux/

More detailed and advanced
https://www.tecmint.com/linux-ls-command-tricks/



Tuesday, September 5, 2017

The Power of VIM


h   move one character left
j   move one row down
k   move one row up
l   move one character right
w   move to beginning of next word
b   move to previous beginning of word
e   move to end of word
W   move to beginning of next word after a whitespace
B   move to beginning of previous word before a whitespace
E   move to end of word before a whitespace


0   move to beginning of line
$   move to end of line
_   move to first non-blank character of the line
g_  move to last non-blank character of the line

gg  move to first line
G   move to last line
ngg move to n'th line of file (n is a number; 12G moves to line 12)
nG  move to n'th line of file (n is a number; 12G moves to line 12)
H move to top of screen M move to middle of screen L move to bottom of screen
zz scroll the line with the cursor to the center of the screen zt scroll the line with the cursor to the top zb scroll the line with the cursor to the bottom
Ctrl-D move half-page down Ctrl-U move half-page up Ctrl-B page up Ctrl-F page down Ctrl-O jump to last (older) cursor position Ctrl-I jump to next cursor position (after Ctrl-O) Ctrl-Y move view pane up Ctrl-E move view pane down
n next matching search pattern N previous matching search pattern
  • next whole word under cursor
  1. previous whole word under cursor
g* next matching search (not whole word) pattern under cursor
gd  go to definition/first occurrence of the word under cursor
g#  previous matching search (not whole word) pattern under cursor
%   jump to matching bracket { } [ ] ( )

fX  to next 'X' after cursor, in the same line (X is any character)
FX  to previous 'X' before cursor (f and F put the cursor on X)
tX  til next 'X' (similar to above, but cursor is before X)
TX  til previous 'X'
;   repeat above, in same direction
,   repeat above, in reverse direction



References:
http://vim.wikia.com/wiki/All_the_right_moves


Morning headache with Postgresql

While I'm doing python exercise. Suddenly, my database connection was down for no reason. It takes me 2 hours to fix the issue and I almost gave up. Damn it! actually, I didn't say that until now. haha

But I learn new stuff today especially postgres commands, like:

To check the database server status

/etc/init.d/postgresql status


As usual, my friend google help me find out the solution and took me a while to find it. Here's the link https://askubuntu.com/questions/50621/cannot-connect-to-postgresql-on-port-5432




First purge the old postgres install.

sudo apt-get remove --purge postgresql-9.3

Now simply reinstall

sudo apt-get install postgresql-9.3




Now, when I run my odoo. My username "devlynard" was not found it is because I reinstall the postgres. So, I just add it back. 




Eureka!





Python Rocks!

I have a transfer knowledge today with my colleague as he will be leaving soon. While listening to him I look at his code on how to write the INI file in python. I was wondering how he did it. I know in Java before and I can't really remember the code. So to make it short, I google it and try to learn by my self.

I found this site and it's really straight forward.
https://martin-thoma.com/configuration-files-in-python/

you can create a variety not only INI file but also JSON,YAML and XML. wow, that's great!

It's all about VIM

Move the cursor from the two (vertical) split window in Vim.

By holding the the Ctrl, press w two times do the magic.


Ctrl-w w or type :wincmd w to move the cursor between the two windows/buffers.


Eureka!

References:
https://stackoverflow.com/questions/6071266/how-to-flip-windows-in-vim

Monday, September 4, 2017

Change File Permission in Linux

I have encountered this issue when I tried to edit the file postgresql.conf and pg_hba.conf. Both are with read-only permission. So I was digging on the internet and finally found a solution.

chmod 066

The syntax:
$chmod 066 filename

$chmod 066 postgresql.conf

Eureka!


References:
http://www.filepermissions.com/directory-permission/066

Tuesday, July 11, 2017

MongoDB installation

This is my first post as using the mongodb. First, I just downloaded the installer file from mongodb site. There are some points to remember if you install mongodb for the first time.

create c:\mongodb folder
- this is to be used for the custom installation

create \data\db folder
- put under the mongodb folder, use for database data file

create \logs
- for the mongodb log file

open powershell by run by administrator access and execute below command
>.\mongod.exe --directoryperdb --dbpath c:\mongodb\data\db --logpath c:\mongodb\logs\mongo.log --logappend --rest --install

start the mongodb service
>net start MongoDB



> show dbs
admin  0.000GB
local  0.000GB
> use mycustomers
switched to db mycustomers
> db
mycustomers
> show dbs
admin  0.000GB
local  0.000GB
> db
mycustomers
>   db.createUser({
...     user:"brad",
...     pwd:"1234",
...     roles: ["readWrite", "dbAdmin"]
... });
Successfully added user: { "user" : "brad", "roles" : [ "readWrite", "dbAdmin" ] }
> db.createCollection('customers');
{ "ok" : 1 }
> show collections
customers
> db.customers.insert({first_name:"John", last_game:"Doe"});
WriteResult({ "nInserted" : 1 })
> db.customers.find();
{ "_id" : ObjectId("5965cba0a07b84a6ed70301a"), "first_name" : "John", "last_game" : "Doe" }

Tuesday, April 18, 2017

Obsessed with Docker

To remove stop containers

docker ps --filter "status=exited" | grep 'weeks ago' | awk '{print $1}' | xargs --no-run-if-empty docker rm

docker ps --filter "status=exited" | awk '{print $1}' | xargs --no-run-if-empty docker rm


copy file from container to host

$docker cp <container-id>:/usr/lib/python2.7/dist-packages/openerp/addons addons

odoo 10
$docker cp <container-id>:/usr/lib/python2.7/dist-packages/odoo/addons addons

odoo11
/usr/lib/python3/dist-packages/odoo/addons





How to remove <none> images after building

docker rmi $(docker images -f "dangling=true" -q)



Remove non-running Docker containers

docker ps -a | cut -c-12 | xargs docker rm


To remove all containers we can use the following command:
docker rm -f $(docker ps -aq)

docker rm is command to remove container.
-f flag (for rm) is to stop container if it’s running (force deletion).
-q flag (for ps) is to print only container IDs.
-p is a ports mapping HOST PORT:CONTAINER PORT.
-v is a volume mounting HOST DIRECTORY:CONTAINER DIRECTORY.



To remove all dangling Docker images:
sudo docker rmi $(sudo docker images -f "dangling=true" -q)
If run as root omit "sudo"
docker rmi $(docker images -f "dangling=true" -q)

Sunday, April 9, 2017

Running my development environment in a Docker

This time, I want to achieve to run my dev env in a docker rather from the vmware with odoo inside. I started working last Friday on this issue. Seems that I can't run odoo with our code base because one of the requirement is to install Pika library which is not included with odoo 9 image.

I don't have any choice but to create my own image base from odoo 9 official image. But errors keep popping up one after another.

The latest error that I encounter is below:

standard_init_linux.go:178: exec user process caused "no such file or directory"

I found this link and let's see if it can solve this problem. :)
https://forums.docker.com/t/getting-panic-spanic-standard-init-linux-go-178-exec-user-process-caused-no-such-file-or-directory-red-while-running-the-docker-image/27318/4

Here we go again, execute the command.
docker build -t eg_postgresql .

Still the same error :( but anyway, at the bottom of the article there is a command called dos2unix which convert your windows code to unix format. hope it helps. cross finger....



I'm invisible.... the trick is that you don't need to change the #!/bin/bash into #!/bin/sh , just run dos2unix inside docker and the rest will do trick. 










just ls and you will see the file entrypoint.sh, its because we edit this under windows environment we must convert this file to unix format.











That's it... simple. hahaha. well I've done productive today.




So the day's has past and I'm busy at work. Now I'm going to build the docker file.


















so far so good...



first we run our postgresql database...

docker run -d -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin --name postgres9.3 -p 5432:5432 --restart=always postgres:9.3


and then run the odoo container...

docker run -it -p 8069:8069 --name odoo9 --link postgres9.3:db -t vbodoo

here, I add "-it" to show the log in terminal as I run my odoo back in ubuntu virtual machine. I can ctrl+c to shutdown the odoo server from there.

The only problem is that when I try to run the odoo again. I couldn't run the above command as it will going to have another instance container. I just want to run again the same container.

To do that, the answer is very simple... I spend a lot time figuring it out :(

docker start -i <container-id> 

That's it! just a simple command.




The Final One!
After some testing, I finally got it. The last issue that I have facing which took me so much time is that I would like my host volume will be on drive D: because first its a different partition and has a lot of space memory.

1. Open Oracle VM VirtualBox
2. Look for the default docker-machine
3. Click Settings and add drive D: in the shared folders.


That's it, in the docker terminal just add the new volume path like below

docker run -it -p 8069:8069 -v /d_drive/Lynard/development/svn/repo2:/mnt/extra-addons --link postgres9.3:db --name dev_odoo -t ls/odoo9

look closely on the d_drive which is the same name in the shared folders. Eureka!





Sunday, April 2, 2017

Installing latest postgresql (9.6) and odoo (10)

I always trying to make things complicated like I have already installed postgres 9.3 and odoo 9 and its working fine but I like to install a newest version for both. This time the latest postgres (9.6 at this time of writing as well) as well as odoo (10).

First pull the postgres image. By not declaring which version, it will automatically pull the latest version which is 9.6.
docker pull postgres

(1st attempt)
Then run and and create the container.
docker run --name postgres9.6 -e POSTGRES_PASSWORD=password -p 5433:5432 postgres





















I'm not sure why the logs is showing, let's do it again with different command. But before I forgot, my other objective is to test whether we can run two postgres container in different port like 5433 and 5432.

(2nd attempt)
So I stop and delete the running container and run again with below command. I added the POSTGRES_USER=admin, just to standardize all. .. and voila. its runs
docker run --name postgres9.6 -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin -p 5433:5432 -d postgres



Final command:

docker run -d -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin --name postgres -p 5433:5432 --restart=always postgres


Since the latest postgres is compatible with latest pgadmin as well which is version 4. so I decided to run in docker too by pulling an image from https://hub.docker.com/r/fenglc/pgadmin4/.
docker pull fenglc/pgadmin4

Lastly, run the pgadmin4 container and link to postgres
docker run --name pgadmin4 --link postgres9.6:postgres -p 5050:5050 -d fenglc/pgadmin4
























EUREKA!


I'm still not finish yet, I'm too excited that I successfully run the postgres. Well, I actually I need to run the latest odoo as state in my subject but I need a break, I'm having lunch now at my desk. will continue for a while. Ciao!


Ok, let's go back to business.

First, get the latest odoo image.
docker pull odoo

Run the image and link to postgres
docker run -p 8070:8069 --name odoo10 --link postgres9.6:db -t odoo




























Whoah! That wasn't so hard. This time I changed the port to 8070 by changing the parameter -p 8070:8069 to have different port for my odoo10


I'm invinsible...



Updated: 16-May-2017

I just read this new article https://blog.codeship.com/ensuring-containers-are-always-running-with-dockers-restart-policy/ it quite good as he explains clearly.

I have made changes with below command:

docker run -d -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin -p 5433:5432 --name db --restart=always postgres


after running the postgresql, run the odoo.

docker run -p 8070:8069 --name odoo10 --link db:db -it odoo



Friday, March 31, 2017

My first sms project using TWILIO , PYTHON and DOCKER

I just found out this cool app called twilio and I really interested how it works. My main objective is to create a mass sms sending app but its too far at this point.

First, I found this youtube from cleverprogramming website. https://www.youtube.com/watch?v=uzBRycRYsqw. The tutorial is very straight forward. I can follow his steps but I want something different in my setup. I want to use docker instead installing in my development pc which I'm working in the office now. Hopefully no ones knows what I'm doing. haha

But anyway, so first I'm struggling how to mount the volume from my python image. So this is what I did.

1. run docker pull python
this will pull the latest images which i think python 3.6

2. create a dockerfile
FROM python
RUN pip install twilio
VOLUME ["/mnt/python_file"]

from script above, I creating a python base image and install twilio app and specify the volume. Isn't that easy. But the hardest part, is that I don't know if its working exactly what I wanted.

3. run docker build -t python-twilio

i have already my custom image, next will run this to create a container.

4. run docker run -v /c/Users/DEFAULT.DEFAULT-PC/volumes:/mnt/python_file python-twilio python /mnt/python_file/send_sms.py

previously, i didn't add '/mnt/python_files/' from send_sms.py which giving me error that the file is not found. So that's it, i received the sms message to my phone, Eureka!

btw, I have so much to improve my code. we will see next time to achieve my goal to build an app. Viola!



UPDATED:
The new command below is changing the volume from c: drive to d:.
d_drive name is the same which I configure in the Oracle VM virtualbox.

ex1:
docker run -v /d_drive/Lynard/development/personal/twilio_tutorial:/mnt/python_file twilio1 python /mnt/python_file/send_sms.py

ex2:
docker run -v /d_drive/Lynard/development/personal/twilio_tutorial:/mnt/codes ls/twilio python /mnt/codes/send_sms.py

So now, I can do and save my code in my drive D: isn't that great! Eureka!!!!

Thursday, March 30, 2017

Install Odoo 9 and Postgresql 9.3 inside docker container

Currently I'm working on a Odoo application where we installed our development environment in the Ubuntu/VMware. Apparently, I also like to know how to install the same setup using docker container and I tell you its not easy but luckily after few trial, here's my command that works perfectly.


1. Install postgres 9.3 with username = admin and password = admin. Port is default 5432 and the name of the container is postgres9.3, its makes sense. I'm not sure what is the --restart=always attribute but we can just leave that as is it.

docker run -d -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin --name postgres9.3 -p 5432:5432 --restart=always postgres:9.3


2. Install Odoo 9 with default port 8069. The container name is odoo9 and its link with the postgres installed as above. That's it, very simple but it took me a while to figure it out. I'm still not an expert devops.

docker run -p 8069:8069 --name odoo9 --link postgres9.3:db -t odoo:9


mount custom addons
docker run -v /dev_path/svn/repo2/trunk:/mnt/extra-addons -p 8069:8069 --name vbroker --link postgres9.3:db -t ls/odoo9



Updated:
Everything works fine on the above setup however when I launch my code , it shows warning that need to install pika module. So I decided to get the Dockerfile from official odoo 9 installation from github. https://hub.docker.com/_/odoo/



build again using below command
$docker build -t <name> .

Eureka!

Wednesday, March 29, 2017

How to increase the disk size of Linux (Ubuntu) in VMware

It took me few days how to configure to increase the disk size space of Ubuntu in VMware. Previously I only have 10gb which I use in my development but as everyday goes by more and more application installed in the system which gives me warning that my disk space has only 300mb left.

After many resources that I research in google I finally found the right guide/tutorial how to increase the disk space. This is the website https://www.rootusers.com/use-gparted-to-increase-disk-size-of-a-linux-native-partition/ and stated perfectly what I want.

I have added 10gb more and I can continue to code happily ever after without any warning of disk space. Eureka!



Odoo 9 Installation guideline

First thing of advice, when running odoo in vmware where ubuntu is installed as operating system. Configure the harddisk around 40gb and the memory at 3gb to get most optimize one. 

#apply any patches and make sure your Ubuntu server is accessing the Internet

sudo apt-get update
sudo apt-get dist-upgrade

#reboot your server

sudo reboot

#install postgres

sudo apt-get install postgresql

#change over to the postgresql to set permissions on our development user

sudo su - postgres
createuser --createdb --username postgres --no-createrole --pwprompt devlynard

#python dependencies

sudo apt-get install python-cups python-dateutil python-decorator python-docutils python-feedparser
sudo apt-get install python-gdata python-geoip python-gevent python-imaging python-jinja2 python-ldap
sudo apt-get install python-libxslt1 python-lxml python-mako python-mock python-openid python-passlib
sudo apt-get install python-psutil python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing
sudo apt-get install python-pypdf python-reportlab python-requests python-simplejson python-tz python-unicodecsv
sudo apt-get install python-unittest2 python-vatnumber python-vobject
sudo apt-get install python-werkzeug python-xlwt python-yaml wkhtmltopdf
sudo apt-get install python-pip python-dev libevent-dev gcc libxml2-dev libxslt-dev node-less geoip-database-contrib
sudo apt-get install python-pip git-core
sudo pip install pika

#install git

sudo apt-get install git

#download odoo framework

git clone https://www.github.com/odoo/odoo --depth 1 --branch 9.0 --single-branch .

#Linux file sharing services compatible with Microsoft

sudo apt-get install samba samba-common-bin
sudo smbpasswd -a odoo
sudo nano /etc/samba/smb.conf

[homes]
comment = Home Directories
browseable = yes
read only = no
create mask = 0640
directory mask = 0750

sudo /etc/init.d/smbd restart


#Install subversion on Ubuntu

sudo apt-get install subversion
svn co --username <username> svn://172.18.6.230/repo2
sudo dpkg -l|grep subversion
svn –version
svn update

#to install rabbitvcs

sudo add-apt-repository ppa:rabbitvcs/ppa
sudo apt-get update
sudo apt-get install rabbitvcs-nautilus3



#installing PIP And PyPDF2 To Read PDF File With Python On Ubuntu Linux

sudo apt-get update
sudo apt-get -y install python-pip
pip --help
sudo pip install PyPDF2



#install pycharm in ubuntu

Download Pycharm
https://www.jetbrains.com/pycharm/download/#section=linux

Copy the pycharm-*.tar.gz to an empty directory
(make sure you have rw permissions for that directory)

Unpack the pycharm-*.tar.gz using the following command:

tar xfz pycharm-*.tar.gz

Remove the pycharm-*.tar.gz to save disk space (optional)
Run pycharm.sh from the bin subdirectory

NOTE: PyCharm on Linux doesn't need special installation or running any installation script. It runs out of the pycharm-*.tar.gz




#additional libraries

sudo apt-get install python-pip

sudo apt-get install python-yaml
pip install pytz
sudo pip install python-dateutil
sudo pip install tzlocal   


free online comma separating tool

https://delim.co/#