Running And Migrating Django Project on Bluehost

先写几个中文字, 主题无关,本来没必要迁的项目, 主要是被赶得只好换了服务器. 就多做了这么多的事.

 

Currently Bluehost doesnt support Django officially.

to support Django.

1. Using self-packaged python/Django.
Download and unzip Python in:
/home/zip/Django/Python-2.8.5
using ez_setup.py/pip to install flup/Django/MySQL-python …

2. Using existing Project: RACBDM. edit .htaccess

 

3. prepare mysite.fcgi

 

4. ensure the mysql related configuration: <RACBDM.settings>

5. confirm the template_dirs setting:

6. While migrating, it’s a good practice to enable DEBUG mode:

7. Mysql related:

8. mention that the dump script will not take care the View create status, if you have tables/views. please double check.

Fedora Too Old: Yum: [Errno 256] No more mirrors to try

Im still using Fedora 15 for my workstation.

It’s totally out of support since …ago. Yum always fail.

 

Im trying to install gdal:

but installation is not so smoothly togo

An easy workaround is google/rpmpbone

google “netcdf-4.1.1-6.fc15.i686”, it will direct to page:
http://rpm.pbone.net/index.php3/stat/4/idpl/16958906/dir/fedora_15/com/netcdf-4.1.1-6.fc15.i686.rpm.html
same options on the rest RPMs.

 

# finally.

A Best Practice to Prepare EL6 Linux for Oracle RDBMS Installation

following is not a guide to install RDBMS, but a quick environment preparation before that.
this text works on both Linux/Windows host.

0. to setup Oracle RDBMS 12c on EL6.3 vbox.  for testing purpose.

1. prepare virtualbox.
setup a new linux machine, with harddisk 40G,  network using NAT.

2. attach image on CD. boot
OracleLinux-R6-U3-Server-x86_64-dvd.iso

3. install option.
a) using the full disk, using default dynamic lv settings(means you can adjust disk sizes whenever you want)
b) install option: Desktop (or you may have to using vnc or inst other Xwindow options if you choose “Database Server”).
c) reboot after installation. using account: oracle/oracle

4.  we need to manually install vboxtools (for a better display and operation experience enhancement)
before that we need to :

5.   keep the sys image mount.  manually install kernel-uek-devel, the # should be the same to your currently running version.

6.  check your yum repo setting. (you need uln repo, or simple public-yum is ok)
or you have to manually install dependency in the package folder.
# yum install gcc

7.  detach the sys-image. choose “Install Guest Additions”
run as prompt, or in cmd.

8.  ignore following warning, as the package already re-named to kernel-uek-devel

9. about the necessary packages you can use following cmd:

10. choosing “System”->”Preference”->”Startup Applications”
remove item “PackageKit Update Applet” , so that you should update your pkgs whenever you want and need.
remove any other items you dont like.

11. disable SELinux and firewall.
edit /etc/selinux/config  to –>”disabled”
system-config-firewall  –> “Disable”

12. let eth0 connect automatically.
either 1) using desktop network-manager, edit connection–>eth0–> connect automatically.
or 2) edit /etc/sysconfig/network-scripts/ifcfg-eth0
add following like:  “ONBOOT=yes”

reboot the node.

F.  setups already done.  you can now following guide to complete the installation

Oracle Database 11g Release 2 (11.2) Installation On Oracle Linux 6
http://www.oracle-base.com/articles/11g/oracle-db-11gr2-installation-on-oracle-linux-6.php

######

the steps are simple but, wish it saves time you read this post before the installation.

-s

 

 

 

 

 

Python smtplib sending mail on old SSL port 465

Well still some certain company was still using SSL port 465 for their mail SMTP service.

following code is updated from book <Foundations of Python Network Programming>, changes just made for the old SSL supports.

New codes should  use starttls as default TLS/SSL connection.