Linux is an commonly used operating system to run production systems, specially the RHEL (Redhat Enterprise Linux). Few tips on product installations on linux and these information are for users who do manual installations without using installers (.rpm/.deb etc..).
Installation folder: Base folder for product installation is /opt, under that you can create the vendor name (e.g. /opt/apache, /opt/wso2 etc..), then the product name without the version or build name (e.g. /opt/apache/tomcat, /opt/wso2/wso2esb etc..) and then the versions/build numbers internally without the product name (e.g. /opt/apache/tomcat/5.1, /opt/wso2/wso2esb/2.0.2 etc..) /opt/{vendor}/{product}/{version}
Symbolic links: Three symbolic links should created latest, previous and default in the folder version/build level. Latest links to the major version you find in the product. Previous links to the version that worked before. Default links to the current running version. Most of the time default links to the latest and in an recovery might link back to previous.
Sub-directory: Most of the products contains configuration files in conf, log files in log directory and keep them inside the product home. To make them to a standard conf files should go into the /etc/{vendor}/{product} and create a symbolic link call conf from the product home. Log file path should be /var/{vendor}/{product} and a symbolic link log should create from the product home to the above directory. (I didn't use the word folder because it is a Windows based operating system terminology and directory is the Unix based OS equivalent term)
Users/Groups: Three set of user groups used in an installation, {product}admin, {product}run, {product}test. Privileges of the groups get vary from product to product but most of the time non admin users/groups. Each group will have a default user with the same name as the group name and user can add system users for the groups based on the need but recommend to use the users created for the product. Admin user will use to install and configure the product, that will have full permission to the product installation directory, conf dir and var dir. Run user is the one who will be running the product on production and will have read permission to the product home and conf dir. Run user will have write permission to the log folder. Test user will use to test the application will have the same permissions as the run user. In addition to this {product}dev user can be use as the development user that will have similar permissions as the admin user. Best practice is to have three environments as dev, test and prod.
If the product does not have inbuilt backup, archive facilities it is important to create some cron jobs to backup the conf directory regularly and archive the log directory periodically.
I'm not trying to implement the entire LSB (Linux Standard Base) specification here, only specifying some common practices followed by most of the Linux based product installation. I'm sure this information will be helpful for the developers, release engineers and test engineers.
0 comments:
Post a Comment