ERPNext and Opensuse

Can ERPNext be installed on opensuse?
Did any one tried this?

I think it will work, I tried in Debian based Linux it worked. :grinning:
Just try it.

1 Like

Hi,

I am trying on opensuse leap 42.3 64bit

I not able to get bench working

See the details below

t@linux-tj2a:~> git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo
Cloning into ‘bench-repo’…
remote: Counting objects: 5659, done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 5659 (delta 17), reused 15 (delta 8), pack-reused 5624
Receiving objects: 100% (5659/5659), 29.58 MiB | 509.00 KiB/s, done.
Resolving deltas: 100% (3588/3588), done.
it@linux-tj2a:~> pip install --user -e bench-repo
Obtaining file:///home/it/bench-repo
Requirement already satisfied: Click in
/usr/lib64/python2.7/site-packages (from bench==4.1.0) (6.7)
Requirement already satisfied: jinja2 in
/usr/lib/python2.7/site-packages (from bench==4.1.0) (2.8)
Requirement already satisfied: virtualenv in
/usr/lib/python2.7/site-packages (from bench==4.1.0) (15.2.0)
Requirement already satisfied: requests in
/usr/lib/python2.7/site-packages (from bench==4.1.0) (2.11.1)
Requirement already satisfied: honcho in
/usr/lib/python2.7/site-packages (from bench==4.1.0) (1.0.1)
Requirement already satisfied: python-crontab in
/usr/lib/python2.7/site-packages (from bench==4.1.0) (2.2.8)
Requirement already satisfied: semantic_version in
/usr/lib/python2.7/site-packages (from bench==4.1.0) (2.6.0)
Requirement already satisfied: GitPython==0.3.2.1 in
/usr/lib/python2.7/site-packages (from bench==4.1.0) (0.3.2.1)
Requirement already satisfied: MarkupSafe in
/usr/lib64/python2.7/site-packages (from jinja2->bench==4.1.0) (0.23)
Requirement already satisfied: python-dateutil in
/usr/lib/python2.7/site-packages (from python-crontab->bench==4.1.0)
(2.4.2)
Requirement already satisfied: gitdb>=0.6.0 in
/usr/lib64/python2.7/site-packages (from
GitPython==0.3.2.1->bench==4.1.0) (0.6.4)
Requirement already satisfied: six>=1.5 in
/usr/lib/python2.7/site-packages (from
python-dateutil->python-crontab->bench==4.1.0) (1.9.0)
Installing collected packages: bench
Running setup.py develop for bench
Successfully installed bench
You are using pip version 10.0.0, however version 10.0.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’
command.
it@linux-tj2a:~> bench init frappe-bench && cd frappe-bench
If ‘bench’ is not a typo you can use command-not-found to lookup the
package that contains it, like this:
cnf bench

This might help

Hi,
Thanks for quick responses,

Is this link still works, as it giving below error

https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh

Check this page for the easy install of ERPNext.

1 Like

Hi,

Seems like installer doesnot support Opensuse 42.3, see the message
below

linux-tj2a:/opt/erpnext # python install.py --develop --user frappe
Sorry, the installer doesn’t support suse 42. Aborting installation!

1 Like

Hi,

seems like installer dont support

see the error below

linux-tj2a:/opt/erpnext # python install.py --develop --user frappe
Sorry, the installer doesn’t support suse 42. Aborting installation!

Supported Versions:

Thanks for the response,
I did seen the supported versions list,

Was working around with opensuse and since centos and opensuse both are rpm based,
hence was wondering if ERPNext will work on that.

Thankyou

hi if anyone still need this to have erpnext run on opensuse please dm i will send all the steps

Why don’t you share them here instead? This thread will come up when users look for it.

Pls share it here for everyone.

i can just a lot of steps but here it goes

lsb_release - a ;python --version ; python3 --version ;ls /usr/bin/python*
update-alternatives --remove python /usr/bin/python2
python --version
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 5
pip install --upgrade pip
python -V ; pip -V

Source : https://www.howtoforge.com/tutorial/install-nginx-php-and-mysql-lemp-stack-on-opensuse-leap-42.1/#step-install-and-configure-phpfpm

Step 1 - Install and Configure SuSEfirewall2

SuSEfirewall2 is a script which generates iptables rules based on the configuration file “/etc/sysconfig/SuSEfirewall2”. We will install and configure it to prevent network attacks on the server port.
Install SuSEfirewall2 with zypper:
zypper in SuSEfirewall2
When the installation is finished, we have to open some ports for the web applications and SSH. We will open port 22 for ssh service and port 80 and 443 for http and https. Go to the “/etc/sysconfig/” directory and edit the “SuSEfirewall2” file:
cd /etc/sysconfig/
vim SuSEfirewall2
In line 253, add the port numbers of the services, separated by a white space:
FW_SERVICES_EXT_TCP=“22 80 443”
Save the file and exit.
Restart the SuSEfirewall2 and the SSH service, then test the port configuration by connecting with telnet to the server.
Restart SuSEfirewall2 and SSH service:
/sbin/rcSuSEfirewall2 restart
systemctl restart sshd
Testing ssh connection with telnet on port 22:
telnet 192.168.1.101 22
Access the server with SSH.

Step 2 - Install and Configure Nginx

Nginx or engine x is a high-performance HTTP- and proxy server with low memory consumption. It is used by large scale websites like Netflix, Pinterest, CloudFlare, Github etc. Nginx has an easy to learn configuration syntax and can act also as a load balancer with health checks and reverse proxy with caching features.
In this step, we will install nginx and add it to start at boot time. Install it with the “zypper in” command:
zypper in nginx
Start nginx and enable it to be started at boot time:
systemctl start nginx
systemctl enable nginx

Nginx is started now, but if you try to access it through the web browser, you will get a 403 forbidden error. This error occurs because there is no standard index document in the web root folder. To solve this problem, create a new index html in the root web directory “/srv/www/htdocs”. Go to the directory and create the index.html file:

cd /srv/www/htdocs/
echo “

This is Nginx OpenSUSE Leap 42.1

” > index.html
Open your web browser and type your server IP and you will get the index page:
http://192.168.1.101/
Nginx is working in the Browser.

Step 3 - Install and Configure MariaDB

MariaDB is open source RDBMS (Relational Database management System) forked from MySQL under the GNU GPL license. In this tutorial, we will install MariaDB and configure the root password for the MariaDB shell.
Install MariaDB with the zypper command:
zypper in mariadb mariadb-client
Start MariaDB/MySQL and add it to boot startup with the systemctl command below:
systemctl start mysql
systemctl enable mysql
Next, configure the admin password for MariaDBb/MySQL with the mysqladmin command. Another option that you can use for this purpose is the “mysql_secure_installation”. In this step, I will use mysqladmin:
su mysql
SET PASSWORD FOR ‘root’@‘localhost’ = PASSWORD(‘manager’);
/usr/bin/mysqladmin -u root password ‘aqwe123’
Note:
“aqwe123” is the new password for MariaDB/MySQL.
Then login to the mysql shell with user root and password aqwe123:
mysql -u root -p
TYPE PASSWORD ‘aqwe123’
Test MySQL login.
Now MariaDB/MySQL is installed and configured with our new password.

Step 4 - Install and Configure PHP-FPM

PHP-FPM or FastCGI Process Manager is an alternative for the older PHP FastCGI with provides additional features and speed improvements. PHP-FPM is well suited for small and large sites based on the PHP programming language.
In this step, we will install php5-fpm with some aditional extensions required by phpMyAdmin. Install php5-fom and the extensions with zypper:
zypper in php5 php5-mysql php5-fpm php5-gd php5-mbstring
When the installation has been completed, go to the php5-fpm directory and copy the configuration file:
cd /etc/php5/fpm/
cp php-fpm.conf.default php-fpm.conf
Edit the configuration with vim command:
vim php-fpm.conf
Uncomment the line 32 to enable php-fpm log, the default prefix is /var and if you have any problem with php5-fpm, you can check the log file “/var/log/php-fpm.log”.
error_log = log/php-fpm.log
In line 148 we will configure the owner of the nginx process to the Nginx user. Change user and group of process to nginx:
user = nginx
group = nginx
Line 159: configure php-fpm to run under a socket file, not the port. Change that line like this:
listen = /var/run/php-fpm/php-fpm.sock
And on line 170, change the permissions for the unix socket to the nginx user and group with mode 0660.
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
Save the file and exit the editor.
next, go the PHP cli directory and edit the php.ini file with vim:
cd /etc/php5/cli/
vim php.ini
Change the value of cgi.fix_pathinfo to zero for security reasons. line 178:
cgi.fix_pathinfo=0
save and exit.
Copy the php.ini to conf.d directory:
cp php.ini /etc/php5/conf.d/
The PHP-FPM Configuration is done at this stage, but we still need to configure Nginx. We have to setup Nginx to work with php-fpm.
Go to the nginx configuration directory and make a backup of the configuration file with the cp command:
cd /etc/nginx/
cp nginx.conf nginx.conf.backup
Edit nginx.conf with vim:
vim nginx.conf
Add index.php on line 48:
index index.php index.html index.htm;
Add the new php configuration section at line 68, this is the configuration for handling .php file requests.

   location ~ \.php$ {
            root /srv/www/htdocs;
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   }

Save the file and exit.

Next, test the nginx configuration file syntax to ensure that there are no errors. Then start the php-fpm daemon and restart Nginx:

nginx -t
systemctl start php-fpm
systemctl restart nginx

To make sure the php-fpm and nginx is working properly, we will add a new php test file. Go the DocumentRoot directory and create a phpinfo file with the name info.php:

cd /srv/www/htdocs/
echo “<?php phpinfo(); ?>” > info.php

Open your web browser type your server ipaddress:

http://192.168.1.101/info.php

PHP is running.

Nginx and php-fpm are working now.

Step 5 - Configure a Nginx Virtualhost

In this step, I will show you how to add a virtual host configuration for a website. We will configure a new domain “www.example.com” and the webroot directory in “/srv/www/example/”. Please replace example and example.com with your own domain name.

GNginx nginx directory and create a new directory for the virtualhost configuration.

cd /etc/nginx/
mkdir vhosts.d/
cd vhosts.d/

Next, create new file example.conf for the domain name “example.com” virtualhost.

vim example.conf

paste virtualhost configuration below:

server {
server_name example.com;
return 301 $scheme://www.example.com$request_uri;
}

server {
listen 80;

root /srv/www/example;
index index.php index.html index.htm;

location / {
    try_files $uri $uri/ =404;
}

      location ~ \.php$ {
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   }

}

Save the file and exit.

Now create the directory for the site “example.com” in the /srv/www/ directory, and create a new index file.

mkdir -p /srv/www/example/
cd /srv/www/example/
echo “

This is www.example.com site.

” > index.html
echo “<?php phpinfo(); ?>” > info.php

Now open your web browser and visit the domain:

example.com

You will be redirected to www domain, and now access the php file:

http://www.example.com/info.php

PHP Info.

Step 6 - Install and Configure phpMyAdmin

PhpMyAdmin is a PHP based application to manage MySQL or MariaDB databases from a web browser. In this step, I will configure phpMyAdmin to run under php-fpm and then make PHPMyAdmin secure by restricting access the phpMyAdmin login page.

Install phpMyAdmin with the zypper command:

zypper in phpMyAdmin

The command will install all packages needed by phpMyAdmin, including apache2-utils that is required for creating the password file.

Now we have phpMyAdmin installed on the system. Next we will create a new htpasswd file with the htpasswd command.

create password file htpasswd:

htpasswd -c /etc/nginx/htpasswd megumi
TYPE YOUR PASSWORD for user megumi

Next, we have to configure Nginx to use HTTP basic authentication for the phpmyadmin directory. We will restrict access to the phpMyAdmin login page with auth_basic, and only users that are in the “htpasswd” file can log in to the phpMyAdmin.

Go to the Nginx configuration directory and edit the nginx.conf file:

cd /etc/nginx/
vim nginx.conf

Define the web root directory inside of the server section by adding a new line under line 40 (server_name):

    server_name  localhost;
    root /srv/www/htdocs;       #newline config

Then add the phpMyAdmin configuration for nginx at line 60:

location ~ ^/phpMyAdmin/.*\.php$ {
    auth_basic "Restricted Access";
    auth_basic_user_file  /etc/nginx/htpasswd;
    fastcgi_pass unix:/var/run/php-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include   fastcgi_params;
}

Save the file and exit the editor.

Test the nginx configuration and restart nginx:

nginx -t
systemctl restart nginx

Next, open your web browser and visit the phpMyAdmin URL, you will be asked for a username and password for the login page.

http://192.168.1.101/phpMyAdmin/

Basic HTTP auth for PHPMyAdmin.

Then log in with your MySQL username and password.

PHPMyAdmin on Nginx.

step 7 install requirements

download the frappe and erp requirements.txt
install them mostly from yast the balance via pip3
Python 3,8]
MariaDB 10+
Nginx (for production)
Nodejs
yarn
Redis
cron (crontab is required)
wkhtmltopdf with pa

step 8 change files
in /etc/security/limits.conf add

  •            soft    nofile          10032
    
  •            hard    nofile          10240
    

in /etc/pam.d/login add
session required pam_limits.so
in /etc/pam.d/xdm add

session required pam_limits.so

yast
bootloader
kernel paramamters
at the end
transparent_hugepage=never

/etc/sysctl.conf
vm.overcommit_memory = 1
net.core.somaxconn=512

in bashrc
export PATH=$PATH:/home/admin/.local/bin/
export PATH=/.local/bin:/home/admin/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/home/admin/.local/bin/:/home/admin/.local/bin/:/usr/sbin/:/home/admin/books/

mysql mycnf under [mysqld]
add
innodb_file_format=Barracuda
innodb_file_per_table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

step 8 Install Bench

Install bench as a non root user,

git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo
pip install --user -e bench-repo

step 9 Create a new bench

The init command will create a bench directory with frappe framework installed. It will be setup for periodic backups and auto updates once a day.

  bench init frappe-bench && cd frappe-bench

step 10 Add a site

Frappe apps are run by frappe sites and you will have to create at least one site. The new-site command allows you to do that.

  bench new-site site1.local

and finally
Add apps

The get-app command gets remote frappe apps from a remote git repository and installs them. Example: erpnext

  bench get-app erpnext https://github.com/frappe/erpnext

Install apps

To install an app on your new site, use the bench install-app command.

  bench --site site1.local install-app erpnext

Start bench