We are given linux systems which has Python 2.7.5 installed. And our application requires Python version greater than 2.7.9. When we try to upgrade or install the Python to the latest version, it fails as the default installations requires an entry to be made on the read only file system /usr/local/bin/. Even with root access we cannot modify the /usr/local/bin directory.
So how do we upgrade or install a new version of Python? Below are the steps:
- Download the version of Python which we are interested
- untar the binary to a directory.
- cd <go to the directory where it has been untared>
- run the configure command: ./configure –prefix=/myworks/softwares/pythonV2.7.13 –enable-shared –with-ensurepip=yes && make
- run make command: make altinstall. This command will install the python to the directory specified in prefix path.
- go to the .bash_profile and add the statement: export LD_LIBRARY_PATH=/myworks/softwares/pythonV2.7.13/lib:$LD_LIBRARY_PATH
- Reload the .bash_profile. Its done
Hope it helps
One of my application uses Derby Database to store configuration information. I just wanted to see what tables are present in derby db. As I was using Derby for the first time, I did not know the basic commands to check the list of tables from the linux system (where my derby db has been installed) sql prompt. I wanted to have a SQL Client which can connect to the remote db and then list the available tables and the data in it. This is when I started googling for SQL Client. I found the suitable SQL client installer (squirrel-sql-3.7.1-standard.jar).
Installing and configuring the SQL Client:
- Run the command “java -jar squirrel-sql-3.7.1-standard.jar” a gui would open and click on next.
- Download Apace Derby (db-derby-10.10.2.0-bin.zip)
- Unzip the the derby zip file to a folder.
- Click on the “squirrel-sql.bat” file from the location where it is installed, it would open “SQuirreL SQL Client Version 3.7.1” GUI Editor.
- Under Drivers tab on the top left of the editor, click on drivers and then double click on Apache Derby Client.
- Click on the “Extra Class Path” tab on the new window and add the derbyclient.jar from the folder where we have unzipped the derby package previously. Click OK. The driver would be registered.
- Click on Alias, and then “add Alias” and input the required details. TEST the connection and click on OK.
Hope it helps.