Skip to main content

Posts

Showing posts with the label Linux

Tools/Commands for monitoring linux

Following are the tools for monitoring a linux system System commands like top, free -m, vmstat, iostat, iotop, sar, netstat etc. Nothing comes near these linux utility when you are debugging a problem. These command give you a clear picture that is going inside your server SeaLion : Agent executes all the commands mentioned in #1 (also user defined) and outputs of these commands can be accessed in a beautiful web interface. This tool comes handy when you are debugging across hundreds of servers as installation is clear simple. And its FREE Nagios : It is the mother of all monitoring/alerting tools. It is very much customization but very much difficult to setup for beginners. There are sets of tools called nagios plugins that covers pretty much all important Linux metrics Munin Server density: A cloudbased paid service that collects important Linux metrics and gives users ability to write own plugins. New Relic: Another wel...

How to create odoo as a service

For the odoo installation steps please follow steps in my previous post. Assume i have saved my code in following path /home/pranav/my_code/odoo 1)Create “odoo-server.conf” file and copy and paste below content. [options] ; This is the password that allows database operations: admin_passwd = password db_host = localhost db_port = 5432 db_user = pranav db_password = postgres db_name = <db_name> dbfilter = <db_name> addons_path = /home/pranav/ my_code /odoo/odoo/addons,/home/pranav/ my_code /odoo/addons,/home/pranav/ my_code /custom_module logfile = /var/log/odoo/odoo-server.log xmlrpc = True xmlrpc_port=8088 2)Paste the file in "/etc" folder and change its permission and access mode chown <user_name>: -R /home/pranav/my_code/odoo chown <user_name>: /etc/odoo-server.conf chmod 640 /etc/odoo-server.conf 3)Create file "odoo-server" inside "/etc/init.d" folder with below content #!/bin/sh ### B...

INSTALL ODOO-10.0 Community version in debian based system(ubuntu)

INSTALL ODOO-10.0 Community version in debian based system(ubuntu) ====================================================== >>sudo wget -O - https://nightly.odoo.com/odoo.key | sudo apt-key add - Type the below code and paste "deb http://nightly.odoo.com/10.0/nightly/deb/ ./" >>sudo nano /etc/apt/sources.list.d/odoo.list >>sudo apt-get update && sudo apt-get install odoo Do you want to continue? [Y/n] (type y) Source code --------------- Now odoo is installed in your linux system. Use " sudo service odoo restar t" to restart odoo if you are changing the conf file settings. You will get the source code in git. "git clone https://github.com/odoo/odoo.git" to clone from git Note:Better to download the zip file from above link as cloning consumes lot of time. Odoo dependencies: ------------------------ * python 2.7(already available in linux) * NodeJS(already available)  To upgrade:  >>sudo apt-get ins...

How to setup apache web server in linux?

APACHE Apache server is the most commonly used web hosting service,  mainly the websites developed in php , python etc. We can host your website to a local network so that people in same network can access. In Linux Apache use split structure for configuring files, in which it will be defining hostname, port ,ssl etc each in different configuration files. Similarly file sharing can be made possible using apache server. Now we shall try to create a sample website hosted in apache server. Step 1: Install  apache2 in to the system $sudo apt-get update //update the repository for latest version of softwares $sudo apt-get install apache2 Step2: create a directory in '/var/www/' folder which is the default folder for storing site datas. (Var folder is known as variable folder since it is used to store growing folder like log files,backups etc) sudo mkdir -p /var/www/sample.com/public_html Step 3: Grant user permission for the folder $sudo chown -R $U...

Commonly used linux commands

Note : Most command might require root permission, so type "sudo" before the command. System Specs from Command Line ========================== For HD capacity: $df -h or $sudo fdisk -l For RAM memory: $free -m For the linux version rou're on: $uname -a For cpu's info $sudo lshw -class cpu CPU Number of cores: $grep -c ^processor /proc/cpuinfo To switch between system directories ========= $ sudo cd /path Print working directory ============= $sudo pwd Display current directory information ========== >List current directory files,size and permissions $sudo ls -lh //Permission will be in format: rgu [directory-root permission(r)-group permission(g)-local user(u)] Access will be in order-rwx [read(r),write(w),execute(x)] Change file permissions ===================== chmod is used to change permission >Format $sudo chmod permission filename Or $sudo chmod permission directory >Permissions Root-r...