Changes

From SME Server
Jump to navigationJump to search
Line 16: Line 16:  
===Installation===
 
===Installation===
 
To be able to install an application from the Software Collections, one '''must''' install software collections first. Please see [[Software collections]] on how to install this.
 
To be able to install an application from the Software Collections, one '''must''' install software collections first. Please see [[Software collections]] on how to install this.
 +
 +
The below procedure if for Python 3.3, but you can also install Python 2.7 instead or even along side. Simply replace all '33' metionings with '27'. To switch between the two versions, you need to remove the enablepythonxx.sh script from the /etc/profile.d directory as described below.
      Line 24: Line 26:  
====Install application====
 
====Install application====
 
After installing the scl-python33 repository, Python can be installed by issuing the following command:
 
After installing the scl-python33 repository, Python can be installed by issuing the following command:
  yum install python33 --enablrepo=scl-python33
+
  yum install python33 --enablerepo=centos-sclo-rh
Once installed, the application is installed on your SME Server at '''/opt/rh/python33-''' as an isolated environment for the application.
+
Once installed, the application is installed on your SME Server at '''/opt/rh/python33''' as an isolated environment for the application.
 
      
====Test installed application====
 
====Test installed application====
Line 47: Line 48:       −
====Start application at boot time====
+
====Enable the python 3.3 environment at boot time====
{{Note box|How to enable Python at boot time, adding ''scl enable python33 bash'' to /etc/rc.d/rc.local file will not work (Error no job control)}}
+
The preferred way to enable scl python33 permanently at logout or (re)boot is to add a custom script called 'enablepython33.sh' to /etc/profile.d/ directory with the following content and make it executable.
* Test:
+
 
  echo ". /opt/rh/python33/enable" >> /root/.bash_profile
+
  #!/bin/sh
Surely there must be a better 'SME Server' way to have Python invoked at boot time.
+
source /opt/rh/python33/enable
 +
export X_SCLS="`scl enable python33 'echo $X_SCLS'`"
    
==Other articles in this category==
 
==Other articles in this category==
board, director
297

edits

Navigation menu