Install documentation

Hi all,


I been using ERPNext in a test environment for a while now and it has all the features you would expect from an ERP system. I been dealing with SAP B1 and A1, ERPNext is way ahead of B1 and on the same level A1.

I wanted to do a fresh install of ERPNext on Ubuntu 12.4, but most of the documentation give you just an overview and I’d like to create a step by step guide and if possible I’ll record a video as well.

I went through this guide https://github.com/webnotes/erpnext/wiki/Installing-ERPNext-on-Ubuntu
But where it asks  to run sudo python install_erpnext.py you get the this error python: can’t open file ‘install_erpnext.py’: [Errno 2] No such file or directory

So I went through this page https://github.com/webnotes/erpnext/wiki/How-to-Install-ERPNext and ran wget https://raw.github.com/gist/3817923/94eb18db9f8f882ffefe4e0aefca0b8c28e9aca0/install_erpnext.py then sudo python install_erpnext.py, now getting a different error where I’m stuck

Cloning into ‘lib’…

Cloning into ‘app’…

Traceback (most recent call last):
File “install_erpnext.py”, line 167, in <module>
install()
File “install_erpnext.py”, line 13, in install
setup_folders(install_path)
File “install_erpnext.py”, line 32, in setup_folders
os.mkdir(public)
OSError: [Errno 17] File exists: ‘/var/www/erpnext/public’

Can anyone guide to me the right path please.

OK I’ve managed to get it working, using multiple manuals. I renamed /public, after running install_erpnext, I copied the content of the renamed folder back to the public folder that install created.

On Tuesday, October 23, 2012 8:47:56 AM UTC+11, electromania wrote:

Hi all,

I been using ERPNext in a test environment for a while now and it has all the features you would expect from an ERP system. I been dealing with SAP B1 and A1, ERPNext is way ahead of B1 and on the same level A1.

I wanted to do a fresh install of ERPNext on Ubuntu 12.4, but most of the documentation give you just an overview and I’d like to create a step by step guide and if possible I’ll record a video as well.

But where it asks  to run sudo python install_erpnext.py you get the this error python: can’t open file ‘install_erpnext.py’: [Errno 2] No such file or directory

So I went through this page https://github.com/webnotes/erpnext/wiki/How-to-Install-ERPNext and ran wget https://raw.github.com/gist/3817923/94eb18db9f8f882ffefe4e0aefca0b8c28e9aca0/install_erpnext.py then sudo python install_erpnext.py, now getting a different error where I’m stuck

Cloning into ‘lib’…

Cloning into ‘app’…

Traceback (most recent call last):
File “install_erpnext.py”, line 167, in <module>
install()
File “install_erpnext.py”, line 13, in install
setup_folders(install_path)
File “install_erpnext.py”, line 32, in setup_folders
os.mkdir(public)
OSError: [Errno 17] File exists: ‘/var/www/erpnext/public’

Can anyone guide to me the right path please.

Hi,

Thanks for the kind words. There are quite a number of installation steps, hence we recommend the virtual box / our hosted system for evaluation.

Glad you got it fixed. Look forward to your video / instructions :)

best,
Rushabh




W: https://erpnext.com
T: @rushabh_mehta

On 23-Oct-2012, at 3:17 AM, electromania <ia...@gmail.com> wrote:

Hi all,

I been using ERPNext in a test environment for a while now and it has all the features you would expect from an ERP system. I been dealing with SAP B1 and A1, ERPNext is way ahead of B1 and on the same level A1.

I wanted to do a fresh install of ERPNext on Ubuntu 12.4, but most of the documentation give you just an overview and I'd like to create a step by step guide and if possible I'll record a video as well.

But where it asks  to run sudo python install_erpnext.py you get the this error python: can't open file 'install_erpnext.py': [Errno 2] No such file or directory

So I went through this page https://github.com/webnotes/erpnext/wiki/How-to-Install-ERPNext and ran wget https://raw.github.com/gist/3817923/94eb18db9f8f882ffefe4e0aefca0b8c28e9aca0/install_erpnext.py then sudo python install_erpnext.py, now getting a different error where I'm stuck

Cloning into 'lib'...

Cloning into 'app'...

Traceback (most recent call last):
File "install_erpnext.py", line 167, in <module>
install()
File "install_erpnext.py", line 13, in install
setup_folders(install_path)
File "install_erpnext.py", line 32, in setup_folders
os.mkdir(public)
OSError: [Errno 17] File exists: '/var/www/erpnext/public'

Can anyone guide to me the right path please.

OK, I’ll post the quick guide here and hopefully when I get the time will do an install video and put it on Youtube. But this guide should do the job.


I’ve got the tasks from these 2 links https://github.com/webnotes/erpnext/wiki/How-to-Install-ERPNext and https://github.com/webnotes/erpnext/wiki/Installing-ERPNext-on-Ubuntu

Using the second URL run the following commands to install all the prerequisites. 

sudo apt-get install vim

 

sudo apt-get install git

 

sudo apt-get install apache2

 

sudo apt-get install mysql-server

--> root password: erpnext

 

mysql_secure_installation

--> as root user or doing sudo

 

sudo apt-get install libmysqlclient-dev

 

sudo apt-get install python-dev

sudo apt-get install python-mysqldb

 

sudo apt-get install python-setuptools

sudo easy_install pip

sudo pip install pytz

sudo pip install --upgrade python-dateutil

sudo pip install jinja2

sudo pip install markdown2

sudo pip install termcolor

sudo pip install python-memcached

sudo apt-get install memchached

Then get the ERPNext git
cd /var/www
sudo git clone git://github.com/webnotes/erpnext.git


The above command creates the erpnext folders and content, now you need to rename the folder called public otherwise when you run the next stage you’ll get an error that public folder exists.

sudo mv /var/www/erpnext/public /var/www/erpnext/public1

Now installing ERPNext
cd /var/www/erpnext<o:p></o:p>
wget https://raw.github.com/gist/3817923/94eb18db9f8f882ffefe4e0aefca0b8c28e9aca0/install_erpnext.py<o:p></o:p>
cd /var/www/erpnext<o:p></o:p>
sudo python install_erpnext.py<o:p></o:p>
–> MySQL Root users Password: <o:p></o:p>SQLRootPassword
–> New ERPNext Database Name: <o:p></o:p>NameForDATABASE
–> New ERPNext Databases Password: <o:p></o:p>PasswordForTheDatabase

When finished, copy the content of the renamed folder public1 to public folder which the above step created.
sudo cp -r /var/www/erpnext/public1/* /var/www/erpnext/public


Give Apache access to erpnnext folder and enable rewrite engine
cd /var/www<o:p></o:p>
sudo chown -R www-data:www-data erpnext<o:p></o:p>
# to enable rewrite engine for apache<o:p></o:p>
sudo a2enmod rewrite<o:p></o:p>

After rewrite you need to modify apache2 config or you'll get the below message when restarting apache service.
#333333;background:white">* Restarting web server apache2                                                apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName

 … waiting .apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
<o:p></o:p>
sudo gedit /etc/apache2/httpd.conf

Open apache config file
sudo gedit /etc/apache2/httpd.conf
Copy and paste the below content into apache2 config file
Listen 8080<o:p></o:p>
NameVirtualHost :8080<o:p></o:p>
<VirtualHost :8080><o:p></o:p>
         ServerName localhost<o:p></o:p>
         DocumentRoot /var/www/erpnext/public/<o:p></o:p>
         AddHandler cgi-script .cgi .xml .py<o:p></o:p>
<o:p> </o:p>
         <Directory /var/www/erpnext/public/><o:p></o:p>
                 # directory specific options<o:p></o:p>
                 Options -Indexes +FollowSymLinks +ExecCGI<o:p></o:p>
         <o:p></o:p>
                 # directory’s index file<o:p></o:p>
                 DirectoryIndex web.py<o:p></o:p>
<o:p> </o:p>
                 # rewrite rule<o:p></o:p>
                 RewriteEngine on<o:p></o:p>
         <o:p></o:p>
                 # condition 1:<o:p></o:p>
                 # ignore login-page.html, app.html, blank.html, unsupported.html<o:p></o:p>
                 RewriteCond %{REQUEST_URI} ^((?!app.html|blank.html|unsupported.html).)*$<o:p></o:p>
         <o:p></o:p>
                 # condition 2: if there are no slashes<o:p></o:p>
                 # and file is .html or does not containt a .<o:p></o:p>
                 RewriteCond %{REQUEST_URI} ^(?!.+/)((.+.html)|([^.]+))$<o:p></o:p>
<o:p> </o:p>
                 # rewrite if both of the above conditions are true<o:p></o:p>
                 RewriteRule ^(.+)$ web.py?page=$1 [NC,L]<o:p></o:p>
         <o:p></o:p>
                 AllowOverride all<o:p></o:p>
                 Order Allow,Deny<o:p></o:p>
                 Allow from all<o:p></o:p>
         </Directory><o:p></o:p>
</VirtualHost><o:p></o:p>

Finally setup cron job
sudo crontab -e
Add the below line in there and save

*/3 * * * * cd /var/www/erpnext && python lib/wnf.py --run_scheduler >> /var/log/erpnext-sch.log 2>&1

All Done, goto http:\\localhost:8080

Login using username: administrator and password: admin



Hi,

This is a great detailed post and has helped me in installing the system on a local machine, but I am facing one problem and that is whenever I try to login to the link http://localhost:8080, I am shown a login page but very soon I am directed back to http://erpnext.com

I have no clue what so ever as to why this is happening, can anybody help me with this?

On Tuesday, October 23, 2012 3:17:56 AM UTC+5:30, electromania wrote:

Hi all,

I been using ERPNext in a test environment for a while now and it has all the features you would expect from an ERP system. I been dealing with SAP B1 and A1, ERPNext is way ahead of B1 and on the same level A1.

I wanted to do a fresh install of ERPNext on Ubuntu 12.4, but most of the documentation give you just an overview and I’d like to create a step by step guide and if possible I’ll record a video as well.

But where it asks  to run sudo python install_erpnext.py you get the this error python: can’t open file ‘install_erpnext.py’: [Errno 2] No such file or directory

So I went through this page https://github.com/webnotes/erpnext/wiki/How-to-Install-ERPNext and ran wget https://raw.github.com/gist/3817923/94eb18db9f8f882ffefe4e0aefca0b8c28e9aca0/install_erpnext.py then sudo python install_erpnext.py, now getting a different error where I’m stuck

Cloning into ‘lib’…

Cloning into ‘app’…

Traceback (most recent call last):
File “install_erpnext.py”, line 167, in <module>
install()
File “install_erpnext.py”, line 13, in install
setup_folders(install_path)
File “install_erpnext.py”, line 32, in setup_folders
os.mkdir(public)
OSError: [Errno 17] File exists: ‘/var/www/erpnext/public’

Can anyone guide to me the right path please.

Hi Aditya,

I am moving this discussion to the developer forum. Like we have discussed before, let this forum only be for user related issues and the target audience is very different.

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 25-Oct-2012, at 4:36 PM, Addy <ad...@gmail.com> wrote:

Hi,

This is a great detailed post and has helped me in installing the system on a local machine, but I am facing one problem and that is whenever I try to login to the link http://localhost:8080, I am shown a login page but very soon I am directed back to http://erpnext.com

I have no clue what so ever as to why this is happening, can anybody help me with this?

On Tuesday, October 23, 2012 3:17:56 AM UTC+5:30, electromania wrote:
Hi all,

I been using ERPNext in a test environment for a while now and it has all the features you would expect from an ERP system. I been dealing with SAP B1 and A1, ERPNext is way ahead of B1 and on the same level A1.

I wanted to do a fresh install of ERPNext on Ubuntu 12.4, but most of the documentation give you just an overview and I'd like to create a step by step guide and if possible I'll record a video as well.

But where it asks  to run sudo python install_erpnext.py you get the this error python: can't open file 'install_erpnext.py': [Errno 2] No such file or directory

So I went through this page https://github.com/webnotes/erpnext/wiki/How-to-Install-ERPNext and ran wget https://raw.github.com/gist/3817923/94eb18db9f8f882ffefe4e0aefca0b8c28e9aca0/install_erpnext.py then sudo python install_erpnext.py, now getting a different error where I'm stuck

Cloning into 'lib'...

Cloning into 'app'...

Traceback (most recent call last):
File "install_erpnext.py", line 167, in <module>
install()
File "install_erpnext.py", line 13, in install
setup_folders(install_path)
File "install_erpnext.py", line 32, in setup_folders
os.mkdir(public)
OSError: [Errno 17] File exists: '/var/www/erpnext/public'

Can anyone guide to me the right path please.




W: https://erpnext.com
T: @rushabh_mehta

Begin forwarded message:

From: Addy <ad...@gmail.com>
Subject: [erpnext-user-forum] Re: Install documentation
Date: 25 October 2012 4:36:34 PM IST

Hi,

This is a great detailed post and has helped me in installing the system on a local machine, but I am facing one problem and that is whenever I try to login to the link http://localhost:8080, I am shown a login page but very soon I am directed back to http://erpnext.com

I have no clue what so ever as to why this is happening, can anybody help me with this?

On Tuesday, October 23, 2012 3:17:56 AM UTC+5:30, electromania wrote:
Hi all,

I been using ERPNext in a test environment for a while now and it has all the features you would expect from an ERP system. I been dealing with SAP B1 and A1, ERPNext is way ahead of B1 and on the same level A1.

I wanted to do a fresh install of ERPNext on Ubuntu 12.4, but most of the documentation give you just an overview and I'd like to create a step by step guide and if possible I'll record a video as well.

But where it asks  to run sudo python install_erpnext.py you get the this error python: can't open file 'install_erpnext.py': [Errno 2] No such file or directory

So I went through this page https://github.com/webnotes/erpnext/wiki/How-to-Install-ERPNext and ran wget https://raw.github.com/gist/3817923/94eb18db9f8f882ffefe4e0aefca0b8c28e9aca0/install_erpnext.py then sudo python install_erpnext.py, now getting a different error where I'm stuck

Cloning into 'lib'...

Cloning into 'app'...

Traceback (most recent call last):
File "install_erpnext.py", line 167, in <module>
install()
File "install_erpnext.py", line 13, in install
setup_folders(install_path)
File "install_erpnext.py", line 32, in setup_folders
os.mkdir(public)
OSError: [Errno 17] File exists: '/var/www/erpnext/public'

Can anyone guide to me the right path please.



You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To post to this group, send email to er...@googlegroups.com.

To unsubscribe from this group, send email to erpnext-developer-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 



From: electromania <ia...@gmail.com>
Subject: [erpnext-user-forum] Re: Install documentation
Date: 25 October 2012 5:11:23 AM IST

OK, I'll post the quick guide here and hopefully when I get the time will do an install video and put it on Youtube. But this guide should do the job.


Using the second URL run the following commands to install all the prerequisites. 

sudo apt-get install vim

 

sudo apt-get install git

 

sudo apt-get install apache2

 

sudo apt-get install mysql-server

--> root password: erpnext

 

mysql_secure_installation

--> as root user or doing sudo

 

sudo apt-get install libmysqlclient-dev

 

sudo apt-get install python-dev

sudo apt-get install python-mysqldb

 

sudo apt-get install python-setuptools

sudo easy_install pip

sudo pip install pytz

sudo pip install --upgrade python-dateutil

sudo pip install jinja2

sudo pip install markdown2

sudo pip install termcolor

sudo pip install python-memcached

sudo apt-get install memchached

Then get the ERPNext git
cd /var/www
sudo git clone git://github.com/webnotes/erpnext.git


The above command creates the erpnext folders and content, now you need to rename the folder called public otherwise when you run the next stage you’ll get an error that public folder exists.

sudo mv /var/www/erpnext/public /var/www/erpnext/public1

Now installing ERPNext
cd /var/www/erpnext<o:p></o:p>
wget https://raw.github.com/gist/3817923/94eb18db9f8f882ffefe4e0aefca0b8c28e9aca0/install_erpnext.py<o:p></o:p>
cd /var/www/erpnext<o:p></o:p>
sudo python install_erpnext.py<o:p></o:p>
–> MySQL Root users Password: <o:p></o:p>SQLRootPassword
–> New ERPNext Database Name: <o:p></o:p>NameForDATABASE
–> New ERPNext Databases Password: <o:p></o:p>PasswordForTheDatabase

When finished, copy the content of the renamed folder public1 to public folder which the above step created.
sudo cp -r /var/www/erpnext/public1/* /var/www/erpnext/public


Give Apache access to erpnnext folder and enable rewrite engine
cd /var/www<o:p></o:p>
sudo chown -R www-data:www-data erpnext<o:p></o:p>
# to enable rewrite engine for apache<o:p></o:p>
sudo a2enmod rewrite<o:p></o:p>

After rewrite you need to modify apache2 config or you'll get the below message when restarting apache service.
#333333;background:white">* Restarting web server apache2                                                apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName

 … waiting .apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
<o:p></o:p>
sudo gedit /etc/apache2/httpd.conf

Open apache config file
sudo gedit /etc/apache2/httpd.conf
Copy and paste the below content into apache2 config file
Listen 8080<o:p></o:p>
NameVirtualHost :8080<o:p></o:p>
<VirtualHost :8080><o:p></o:p>
         ServerName localhost<o:p></o:p>
         DocumentRoot /var/www/erpnext/public/<o:p></o:p>
         AddHandler cgi-script .cgi .xml .py<o:p></o:p>
 
         <Directory /var/www/erpnext/public/><o:p></o:p>
                 # directory specific options<o:p></o:p>
                 Options -Indexes +FollowSymLinks +ExecCGI<o:p></o:p>
         <o:p></o:p>
                 # directory’s index file<o:p></o:p>
                 DirectoryIndex web.py<o:p></o:p>
 
                 # rewrite rule<o:p></o:p>
                 RewriteEngine on<o:p></o:p>
         <o:p></o:p>
                 # condition 1:<o:p></o:p>
                 # ignore login-page.html, app.html, blank.html, unsupported.html<o:p></o:p>
                 RewriteCond %{REQUEST_URI} ^((?!app.html|blank.html|unsupported.html).)*$<o:p></o:p>
         <o:p></o:p>
                 # condition 2: if there are no slashes<o:p></o:p>
                 # and file is .html or does not containt a .<o:p></o:p>
                 RewriteCond %{REQUEST_URI} ^(?!.+/)((.+.html)|([^.]+))$<o:p></o:p>
 
                 # rewrite if both of the above conditions are true<o:p></o:p>
                 RewriteRule ^(.+)$ web.py?page=$1 [NC,L]<o:p></o:p>
         <o:p></o:p>
                 AllowOverride all<o:p></o:p>
                 Order Allow,Deny<o:p></o:p>
                 Allow from all<o:p></o:p>
         </Directory><o:p></o:p>
</VirtualHost><o:p></o:p>

Finally setup cron job
sudo crontab -e
Add the below line in there and save

*/3 * * * * cd /var/www/erpnext && python lib/wnf.py --run_scheduler >> /var/log/erpnext-sch.log 2>&1

All Done, goto http:\\localhost:8080

Login using username: administrator and password: admin






You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To post to this group, send email to er...@googlegroups.com.

To unsubscribe from this group, send email to erpnext-developer-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.