ERPNext is a free, open-source, modern and easy-to-use business management software used by thousands of companies across the world. It is a very simple ERP platform that supports retail, trading, services, manufacturing, human resources, nonprofit and other sectors. It is powerful and fully-featured ERP system written in Python on top of the Frappe framework. It uses Node.js for the front end and MariaDB to store its data. ERPNext provides a web-based interface to perform day to day tasks. ERPNext provides an embedded reporting system with office suite integration.if(typeof ez_ad_units!='undefined')ez_ad_units.push([[728,90],'howtoforge_com-box-3','ezslot_9',106,'0','0']);__ez_fad_position('div-gpt-ad-howtoforge_com-box-3-0');In this tutorial, we will learn how to install and configure ERPNext on Ubuntu 18.04 LTS server.if(typeof ez_ad_units!='undefined')ez_ad_units.push([[728,90],'howtoforge_com-medrectangle-3','ezslot_7',121,'0','0']);__ez_fad_position('div-gpt-ad-howtoforge_com-medrectangle-3-0');RequirementsA server running Ubuntu 18.04.A non-root user with sudo privileges set up to your server.Getting StartedFirst, you will need to update your system with the latest version. You can do it by running the following command:sudo apt-get update -ysudo apt-get upgrade -yOnce your system is updated, you will need to create a user for ERPNext.You can do it with the following command:sudo useradd -m -s /bin/bash erpnextsudo passwd erpnextNext, give sudo privileges to ERPNext user with the following command:(adsbygoogle=window.adsbygoogle[]).push();sudo usermod -aG sudo erpnextNext, log in to ERPNext user and setup environment variable with the following command:su - erpnextnano .bashrcAdd the following line:PATH=$PATH:/.local/bin/Save and close the file, when you are finished. Then, restart your system to apply all the changes.Install Required PackagesFirst, log in your system with the erpnext user and install some dependencies required by ERPNext to your system.if(typeof ez_ad_units!='undefined')ez_ad_units.push([[580,400],'howtoforge_com-medrectangle-4','ezslot_1',108,'0','0']);__ez_fad_position('div-gpt-ad-howtoforge_com-medrectangle-4-0');sudo apt-get install libffi-dev python-pip python-dev libssl-dev wkhtmltopdf -yNext, install Nginx and MariaDB server with the following command:sudo apt-get install nginx mariadb-server -yOnce the installation has been completed, you will need to make some changes in 50-server.cnf file. You can do it with the following command:sudo nano /etc/mysql/mariadb.conf.d/50-server.cnfMake the following changes:[mysqld]innodb-file-format=barracudainnodb-file-per-table=1innodb-large-prefix=1character-set-client-handshake = FALSEcharacter-set-server = utf8mb4collation-server = utf8mb4_unicode_ci[mysql]default-character-set = utf8mb4Save and close the file. Then, restart MariaDB service to apply all the changes:sudo systemctl restart mariadbYou can now check the status of MariaDB server with the following command:if(typeof ez_ad_units!='undefined')ez_ad_units.push([[580,400],'howtoforge_com-box-4','ezslot_2',110,'0','0']);__ez_fad_position('div-gpt-ad-howtoforge_com-box-4-0');sudo systemctl status mariadbYou should see the following output:? mariadb.service - MariaDB 10.1.38 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2019-02-16 06:26:48 UTC; 2h 38min ago Docs: man:mysqld(8) Process: 4640 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Process: 4636 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS) Process: 4505 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set- Process: 4503 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Process: 4482 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS) Main PID: 4607 (mysqld) Status: "Taking your SQL requests now..." Tasks: 31 (limit: 1111) CGroup: /system.slice/mariadb.service ??4607 /usr/sbin/mysqldAug 16 06:26:47 ubuntu1804 systemd[1]: Starting MariaDB 10.1.38 database server...Aug 16 06:26:48 ubuntu1804 mysqld[4607]: 2019-02-16 6:26:48 140715015396480 [Note] /usr/sbin/mysqld (mysqld 10.1.38-MariaDB-0ubuntu0.18.04.1) startingAug 16 06:26:48 ubuntu1804 systemd[1]: Started MariaDB 10.1.38 database server.Aug 16 06:26:48 ubuntu1804 /etc/mysql/debian-start[4642]: Upgrading MySQL tables if necessary.Aug 16 06:26:48 ubuntu1804 /etc/mysql/debian-start[4659]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignoredAug 16 06:26:48 ubuntu1804 /etc/mysql/debian-start[4659]: Looking for 'mysql' as: /usr/bin/mysqlAug 16 06:26:48 ubuntu1804 /etc/mysql/debian-start[4659]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheckAug 16 06:26:48 ubuntu1804 /etc/mysql/debian-start[4659]: This installation of MySQL is already upgraded to 10.1.38-MariaDB, use --force if you still nAug 16 06:26:48 ubuntu1804 /etc/mysql/debian-start[4677]: Checking for insecure root accounts.Aug 16 06:26:48 ubuntu1804 /etc/mysql/debian-start[4681]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tablesInstall Redis and Node.jsNext, you will need to install Redis and Node.js to your system. You can install them by running the following command:sudo curl --silent --location _8.x sudo bash -sudo apt-get install gcc g++ make -ysudo apt-get install nodejs redis-server -ysudo npm install -g yarnConfigure MariaDBBy default, MariaDB installation is not secured, so you will need to secure it first. You can secure it with the following command:sudo mysql_secure_installationAnswer all the questions as shown below: Enter current password for root (enter for none): Set root password? [Y/n]: N Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: YOnce MariaDB is secured, log in to MariaDB shell with the following command:Advertisement.banner-1text-align:center;padding-top:10px!important;padding-bottom:10px!important;padding-left:0!important;padding-right:0!important;width:100%!important;box-sizing:border-box!important;background-color:#eee!important;outline:1px solid #dfdfdf;min-height:125px!importantif(typeof ez_ad_units!='undefined')ez_ad_units.push([[728,90],'howtoforge_com-banner-1','ezslot_8',111,'0','0']);__ez_fad_position('div-gpt-ad-howtoforge_com-banner-1-0');sudo mysql -u root -pEnter your root password when prompt. Then, create a database and user for ERPNext with the following command:MariaDB [(none)]> create database erpnextdb;MariaDB [(none)]> create user [email protected] identified by 'password';Next, grant all the privileges to the ERPNext with the following command:MariaDB [(none)]> GRANT ALL ON erpnextdb.* TO 'erpnextuser'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;MariaDB [(none)]> GRANT all privileges on *.* to 'root'@'localhost' IDENTIFIED BY '[email protected]' WITH GRANT OPTION;Next, flush the privileges and exit from the MariaDB shell with the following command:MariaDB [(none)]> FLUSH PRIVILEGES;MariaDB [(none)]> EXIT;Install ERPNextFirst, create a directory for ERPNext and give proper permissions with the following command:sudo mkdir -p /opt/erpnextsudo chown -R erpnext /opt/erpnext/Next, change the directory to erpnext and install erpnext with the following command:cd /opt/erpnextgit clone bench-repoOutput:Cloning into 'bench-repo'...remote: Enumerating objects: 19, done.remote: Counting objects: 100% (19/19), done.remote: Compressing objects: 100% (14/14), done.remote: Total 6144 (delta 10), reused 13 (delta 5), pack-reused 6125Receiving objects: 100% (6144/6144), 29.70 MiB 231.00 KiB/s, done.Resolving deltas: 100% (3924/3924), done.Next, install bench using pip command:sudo pip install -e bench-repoNext, initialize the bench directory with frappe framework:bench init erpnextOutput:Building frappe assets...? Built js/print_format_v3.min.js? Built js/dialog.min.js? Built js/web_form.min.js? Built js/social.min.js? Built js/modules.min.js? Built js/form.min.js? Built js/list.min.js? Built js/frappe-vue.min.js? Built js/chat.js? Built js/desk.min.js? Built js/control.min.js? Built css/frappe-rtl.css? Built css/module.min.css? Built css/report.min.css? Built css/form.min.css? Built css/list.min.css? Built frappe/css/email.css? Built css/web_form.css? Built css/frappe-web.css? Built css/desk.min.css? Built js/frappe-web.min.js? Built js/report.min.js? Done in 31.313sDone in 34.43s.INFO:bench.utils:setting up backupsno crontab for erpnextINFO:bench.utils:setting up auto updateno crontab for erpnextBench erpnext initializedNext, change the directory to erpnext and create a new site for node1.example.com domain with the following command:bench new-site node1.example.comYou will be asked to provide your MySQL root password as shown below:MySQL root password:Provide your root password and press Enter. You should see the following output:Installing frappe...Updating DocTypes for frappe : [========================================]Updating country info : [========================================]Set Administrator password: Re-enter Administrator password: *** Scheduler is disabled ***Next, provide proper permissions to the erpnext with the following command:sudo chown -R erpnext:erpnext /opt/erpnext/erpnextFinally, start the server with the following command:bench startYou should see the following output:06:34:02 web.1 * Running on :8000/ (Press CTRL+C to quit)06:34:02 web.1 * Restarting with inotify reloader06:34:03 watch.1 yarn run v1.13.006:34:03 watch.1 $ node rollup/watch.js06:34:03 web.1 * Debugger is active!06:34:04 web.1 * Debugger PIN: 159-307-23506:34:13 watch.1 06:34:13 watch.1 Rollup Watcher Started06:34:13 watch.1 06:34:13 watch.1 Watching...06:34:15 watch.1 Rebuilding frappe-web.cssAccess ERPNextERPNext is now installed and listening on port 8000. Open your web browser and type the URL :8000. You will be redirected to the following page:Now, provide username as Administrator and the password you provided during setup. Then, click on the Sign in button. You should see the following page:Next, choose your language and click on the Next button. You should see the following page:Next, choose your country and click on the Next button. You should see the following page:Next, provide your full name and email address. Then, click on the Complete Setup button. You should see the following page:Congratulations! you have successfully installed and configured ERPNext in Ubuntu 18.04 server. You can now easily setup ERPNext in a production environment. About Hitesh JethvaOver 8 years of experience as a Linux system administrator. My skills include a depth knowledge of Redhat/Centos, Ubuntu Nginx and Apache, Mysql, Subversion, Linux, Ubuntu, web hosting, web server, Squid proxy, NFS, FTP, DNS, Samba, LDAP, OpenVPN, Haproxy, Amazon web services, WHMCS, OpenStack Cloud, Postfix Mail Server, Security etc. view as pdf printShare this page:Suggested articles8 Comment(s)Add commentName *Email *tinymce.init(selector:"textarea#commentedit",theme:"modern",height:100,apply_source_formatting:true,remove_linebreaks:false,menubar:false,plugins:["link"],content_css:" ",toolbar:"undo redo );CommentsBy: Bibaschko Reply thanks for the guide - unfortunately I have an issue with sudo mysql -u root -p=> mysql: unknown variable 'pid-file=/var/run/mysqld/mysqld.pid'What's worng?thxBy: yaoming.shm Reply error when running bench init erpnext [email protected]:/opt/erpnext$ bench init erpnextTraceback (most recent call last): File "/usr/local/bin/bench", line 9, in load_entry_point('bench', 'console_scripts', 'bench')() File "/opt/erpnext/bench-repo/bench/cli.py", line 40, in cli bench_command() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/opt/erpnext/bench-repo/bench/commands/make.py", line 31, in init python = python) File "/opt/erpnext/bench-repo/bench/utils.py", line 52, in init raise ValueError('Bench Instance path already exists.'.format(path = path))ValueError: Bench Instance erpnext already exists. By: J Reply You will get the following error:mysql: unknown variable 'pid-file=/var/run/mysqld/mysqld.pid'You need to remove the line: "default-character-set = utf8mb4"and put the rest of text in the basic section of the config By: ksk Reply [ubuntu 18.04]I have the same error. By: ksk Reply I had the following problem: I'm looking for a solution.[email protected]:/opt/erpnext$ bench init erpnextINFO:bench.utils:virtualenv -q env -p /usr/bin/python3Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 24, in import distutils.spawnModuleNotFoundError: No module named 'distutils.spawn'Traceback (most recent call last): File "/usr/local/bin/bench", line 11, in load_entry_point('bench', 'console_scripts', 'bench')() File "/opt/erpnext/bench-repo/bench/cli.py", line 40, in cli bench_command() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/opt/erpnext/bench-repo/bench/commands/make.py", line 31, in init python = python) File "/opt/erpnext/bench-repo/bench/utils.py", line 65, in init setup_env(bench_path=path, python = python) File "/opt/erpnext/bench-repo/bench/utils.py", line 178, in setup_env exec_cmd('virtualenv -q -p '.format('env', python), cwd=bench_path) File "/opt/erpnext/bench-repo/bench/utils.py", line 161, in exec_cmd raise CommandFailedError(cmd)bench.utils.CommandFailedError: virtualenv -q env -p /usr/bin/python3[email protected]:/opt/erpnext$ python3 -VPython 3.6.7[email protected]:/opt/erpnext$ By: awwad Reply When i run this line:
How To Install ERPNext On Ubuntu 18.04 LTS
Download Zip: https://taharvrioru.blogspot.com/?cq=2vHchZ
2ff7e9595c
Comments