Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit fac8efc

Browse files
authored
Merge pull request #40 from jwrober/explore-setup
Explore setup
2 parents 40247f4 + 7c4c223 commit fac8efc

File tree

1 file changed

+10
-48
lines changed

1 file changed

+10
-48
lines changed

i-u-b/install.md

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ One of the most common cries for help on the [ERPNext Discussion Forum](https://
77
<a name="Env">&nbsp;</a>
88
### Operating Environments
99

10-
Before we get into installation, let us take few minutes and discuss a term: *operating environment*. There are a number of ways various people and organizations use this term with regards to how a system like ERPNext is installed and managed. This is the guide's view here:
10+
Before we get into installation, let us take few minutes and discuss a term: *operating environment*. There are a number of ways various people and organizations use this term with regards to how a system like ERPNext is installed and managed. This is the admin guide's view here:
1111

1212
* **Production (prd)**: This is the top level environment. This is where the business sees the system being managed and all regular users are using the system. It is the *most protected* of all environments. Change management is very important here.
1313
* **Stage (stg)**: This is the second level environment. Many companies will choose to have a stage environment where testing and other "trial by error" items can be discovered without impacting production. Stage is a *non-production* environment.
@@ -48,19 +48,19 @@ ERPNext can be installed on the following OS's:
4848
* Debian 8 "Jessie" -- Debian 9 "Stretch" is not supported by the easy install script at this time. Debian 8 is a *very* stable operating system and is the **recommended choice**.
4949
* Ubuntu Server 14.04.x LTS "Trusty Tahr"
5050
* Ubuntu Server 16.04.x LTS "Xenial Xerus" -- Ubuntu 17.x (short term support) is not supported by the easy install script.
51-
* CentOS 7 -- This is also a very stable operating system. However, the easy install script does not support CentOS as well as it does Debian. If you prefer a RHEL variant this is the choice for you, but beware of issues.
51+
* CentOS 7 -- This is also a very stable operating system. If you prefer a RHEL variant this is the choice for you.
5252
* MacOS 10.9 "Mavericks"
5353
* MacOS 10.10 "Yosemite"
5454
* MacOS 10.11 "El Capitan"
5555
* MacOS 10.12 "Sierra"
5656

5757
For production and stage environments, the admin guide recommends Debian 8 because "it just works". For development environments where a nice user interface on the "server" is wanted then the admin guide recommends Ubuntu 16.04 "Desktop" edition or MacOS 10. Windows is another option for a development environment, however you cannot run the code on Windows so it makes development **a lot** harder.
5858

59-
**NOTE:** The admin guide recommends that all installation work is done with a `sudo` privileged user. During installation, we will create the required user to run ERPNext. The ERPNext user will have eleveted privileges during installation and those rights will be removed at the end.
59+
**NOTE:** The admin guide recommends that all installation work is done with a `sudo` privileged user. During installation, we will create the required user to run ERPNext. The ERPNext user will have elevated privileges during installation and those rights will be removed at the end.
6060

6161
**NOTE:** These steps assume you are starting from a freshly installed server. Your mileage will vary if you are attempting to run these steps on an existing server. The easy install script is very **opinionated** meaning it makes a large number of assumptions as to how you want to install the system. The admin guide recommends the using the install script because the Ansible playbooks used do a ton of work very fast saving you a lot of time. The assumptions made are fine for the vast majority of installs.
6262

63-
For Debian based distributions (Debian, Ubuntu) start by installing a collection of software dependencies. These steps assume you are running Debian 8 right after OS installation. If you are installing on a RHEL based distribution (CentOS), skip down a section.
63+
For Debian based distributions (Debian, Ubuntu) start by installing a collection of software dependencies. If you are installing on a RHEL based distribution (CentOS), skip down a section.
6464

6565
# Install the base dependencies
6666
su - # Dedian Only
@@ -70,32 +70,20 @@ For Debian based distributions (Debian, Ubuntu) start by installing a collection
7070

7171
# You will be prompted to configure postfix for smarthost
7272
# Use sudo ... for Ubuntu
73-
apt-get install -y sudo curl wget net-tools nginx postfix python2.7 vim
73+
apt-get install -y sudo curl wget net-tools postfix vim
7474

7575
usermod -aG [sudo group name] [your user id] # Debian Only
7676
exit # Debian Only
7777

7878
# Debian Only - Logoff and back in to set your user id as sudoer
7979

80-
For Red Hat based distributions (CentOS) start by installing a collection of software dependencies. These steps assume you are running CentOS 7 minimal install and created an Administrator level user during installation.
80+
For Red Hat based distributions (CentOS) start by installing a collection of missing software options. These steps assume you are running CentOS 7 minimal install and created an Administrator level user during installation.
8181

8282
# Bring system completely up to date
8383
sudo yum update -y
84-
sudo yum install -y epel-release redhat-lsb-core
85-
sudo yum install -y curl wget nginx net-tools python27 vim
84+
sudo yum install -y curl wget net-tools postfix vim
8685

87-
# Add a limits file for ERPNext
88-
sudo bash -c "cat <<EOF > /etc/security/limits.d/21-erpnext.conf
89-
# Limits file for ERPNext
90-
* soft nofile 1048576
91-
* hard nofile 1048576
92-
93-
EOF"
94-
95-
# Restart the server
96-
sudo shutdown -r now
97-
98-
The install script installs NodeJS 6.x. We want the latest stable 8.x. For all operating systems, install `NodeJS` from their respective repositories:
86+
The install script installs NodeJS 6.x, which works for all operating systems except Debian 7 "Wheezy". We want the latest stable 8.x. For all supported operating systems, install `NodeJS` from their respective repositories. Debian 7 "Wheezy" users will skip this and install NodeJS 6.x from the easy install script later.
9987

10088
# Debian/Ubuntu based - Get NodeJS from its own repository
10189
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
@@ -124,23 +112,6 @@ Create the `erpnext` user. The `sudo` group name on Debian based distributions i
124112

125113
sudo yum update -y # RHEL/CentOS
126114

127-
The easy install script will install MariaDB 10.2. However the out of box configuration for the database engine has a configuration issue we need to correct before the ERPNext installation. Follow these commands to set that up now.
128-
129-
sudo mkdir -p /etc/mysql/conf.d
130-
sudo bash -c "cat <<EOF > /etc/mysql/conf.d/z-erpnext.cnf
131-
#
132-
# Begin /etc/mysql/conf.d/z-erpnext.cnf
133-
#
134-
# MariaDB Configuration for ERPNEXT
135-
#
136-
137-
[mysqld]
138-
pid-file = /var/run/mysqld/mysqld.pid
139-
socket = /var/run/mysqld/mysqld.sock
140-
141-
# End /etc/mysql/conf.d/z-erpnext.cnf
142-
EOF"
143-
144115
Download and run the install script.
145116

146117
# Get the install.py file
@@ -150,10 +121,6 @@ Download and run the install script.
150121
# Confirm you can ping the site
151122
ping [site name].[domain]
152123

153-
# For RHEL/CentOS based installs, create a needed directory & stop SELinux
154-
sudo install -m 755 -o erpnext -g erpnext -d /home/root
155-
sudo setenforce 0
156-
157124
# Install the software
158125
# You will be prompted for what you want the mysql root and erpnext admin passwords to be
159126
sudo python install.py --production --site [site name].[domain] --user erpnext \
@@ -168,15 +135,10 @@ Assuming that everything went great and there is no need for [troubleshooting](i
168135

169136
Frappe/ERPNext has been successfully installed!
170137

171-
There are some cleanup things for RHEL/CentOS. Due to an issue with Ansible not able to determine the real `sudo` user, the `install.py` script defaults to the `root` user instead of our `erpnext` user. Due to this, everything is installed into the `/home/root` directory except for `npm` and some other `python` libraries. We leave everything and just fix a few things to make it work. From an administration standpoint, the administrator will do all work in the various Frappe bench directories in `/home/root` instead of in `/home/erpnext`.
172-
173-
sudo rm /etc/profile.d/screen_wall.sh
174-
cd /home
175-
sudo chown -R erpnext:erpnext /home/erpnext
176-
177138
Sometimes `install.py` leaves some files in the `bench` we created that we want to clean up. This step will also ensure you are running the latest code and all the NodeJS packages are up to date via `npm`.
178139

179-
cd [bench name used at install]
140+
sudo rm /etc/profile.d/screen_wall.sh
141+
cd [bench name]
180142
bench update --reset
181143
# Exit from the erpnext user
182144
exit

0 commit comments

Comments
 (0)