Skip to main content

New job, new things to learn.. gotta get in line..

It's been 3 weeks since I've started my new job at a big corporation. Transition into this new job was not easy and even now there is still a lot of pain of adapting. The biggest source of the pain? WINDOWS!!! T.T

Being a big corp, it's almost a requirement that your reliance on all things microsoft has to be solid and deep rooted. Of course we have open source equivalent for most of the stuff but the pressure is on for me to perform and to present some tangible results as soon as possible thus I barely had time to put some basic best practices in place. But finally after 2 days of googling and tweaking, I've got a small pc running ubuntu server serving trac for ticketing and serving out our main mercurial repo. We don't even have the basic infra yet and still management says "these are things are nice to have, but you need to deliver those reports soon. Our deadline was last month".

Then when starting to do development, I start to see how deep the rabbit hole goes. Never mind about the ton of spaghetti code we have to tangle with, database management (this is just our internal development database mind you) consist of importing excel file into access and using odbc to push those tables to ms sql server. Ha. Seamless I tell you.. >.<

So of course there is nothing in the open source world that can match that kind of right click send seamlessness. So for now I concede I have to use windows. At least until most of our database stuff is fully in the ms sql server and I can connect to that directly. But the pain of working in windows.. oh my.. Even looking for text in all the source code is not as easy as 'grep -ir something'. I think I miss grep the most. But of course I miss all the rest of our little treasure trove of command line tools to make dev so much easier. How I wish I had a 'tail -f' in one window of terminator while I restart the server and redo the query in another.

But I'm already here now and I should square my shoulders and get in line.

Some interesting thing I've learned already is how to set the default gateway for windows for example. You just do a:

route change 0.0.0.0 mask 0.0.0.0

That is to change the default gateway if it already exists. Want to know whether it already exists? Print it out:

route print


And also for setting up tomcat6 cgi, edit the conf/web.xml file in the tomcat root directory. Inside there you would see already commented out parts for cgi config. Just remove tags from 2 parts:

<servlet>
<servlet-name>cgi</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>cgiPathPrefix</param-name>
<param-value>WEB-INF/cgi</param-value>
</init-param>
<init-param>
<param-name>passShellEnvironment</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>


*note - you should add the passShellEnvironment part to allow the cgi to use perl and stuff.
And from:

<servlet-mapping>
<servlet-name>cgi</servlet-name>
<url-pattern>/cgi-bin/*</url-pattern>
</servlet-mapping&gt


And then you have to change the conf/context.xml file to enabled privileged like this:

<Context privileged="true">


Once that is done you've got it made baby.. you can now download strawberry perl and awstats and have awstats even for a tomcat6 server. Follow the instructions here for more details: http://www.wrenbeck.com/flowbuilder/$$download.xsp/blog/3eab0461f928f/awstats_tomcat.html

Just one more note on changes to tomcat to enable awstats. You need to enable the combined log for it to work. For that edit the file conf/server.xml and at the end of the file you might find something like this:

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="combined" resolveHosts="false"/>


Release it from it's remarked prison and change the pattern from "common" to "combined".

Learned quite a lot these past few weeks so I guess that's very good. Still have to use windows so that's pretty bad. But plus minus it all, it's still pretty good.

Comments

sweemeng said…
welcome to the club, things can be rush, if they just drop you into a middle of a project.

now unless it is necessary, screw best practice, i only bring it when i got to do a new one
Blogger said…
Bluehost is ultimately one of the best hosting provider with plans for all of your hosting needs.

Popular posts from this blog

haproxy on Centos 7 with SELinux

Setting up haproxy and varnish with reference to the configuration from these sites: http://sharadchhetri.com/2014/12/20/how-to-install-varnish-4-version-on-centos-7-rhel-7/ https://www.upcloud.com/support/haproxy-load-balancer-centos/ And finally can access plone on the server. But when I check the haproxy status, only client1 can be accessed. All other clients were down with general socket error, permission denied. Googling a bit I finally found out it was due to SELinux. Refer to this page: http://stackoverflow.com/questions/26420729/haproxy-health-check-permission-denied With the solution from that page, I installed policycoreutils-python and tried to run the command given: semanage port --add --type http_port_t --proto tcp 8081 But that command failed with the error that the port was already defined. When I looked it up using: semanage port -l | grep 8081 It belonged to some other type (transproxy_port_t). When I tried to delete the type using: semanage port -d -t transpro…

Installing Centos 7 on HP G7 Server

When I first initially tried it, the installer cannot detect any local hard disk to install to. After much googling found out that it was because a certain driver for the Smart Array Controller is no longer available on Centos 7. To allow for use of the new driver on old hardware, you need to enable the option. Once the DVD has booted and on the first menu screen, highlight the first option and then press tab which would bring you to a command line where you can add additional parameters to boot. Add the following parameters: hpsa.hpsa_allow_any=1 hpsa.hpsa_simple_mode=1 And then press enter to boot. You should now be able to install as you wish. After installation, on the first boot, make sure at the menu, press 'e' to edit the parameters and add them again. Then once booted, go to /boot/grub2/grub.cfg to permanently add the parameters to the menu. Refer to http://serverfault.com/questions/611182/centos-7-x64-and-hp-proliant-dl360-g5-scsi-controller-compatibility and it&#…

Me and my sleep apnea

I have been suffering from sleep apnea for quite a few years already. It started to show when I was still with OSCC some 6 years back when I would sometimes "accidentally" sleep at my cubicle. Early on I just dismissed it as because I was growing fat (we ate a lot at OSCC.. :P and I barely went anywhere except my cubicle) and also because of babies. Oh babies.. those cute little things that keeps you awake at night so that they can be so cute and charming when your friends and relatives come over the next day. So it was dismissed. Later on I got more and more used to sleeping at work, started associating it with my lack of motivation and sometimes feeling of downright depression. And I kept growing fatter and fatter, which I assumed was the reason why I was getting more and more tired.

But then around 2 years ago a friend of mine suggested maybe I've got sleep apnea. And a few other people suggested I go to a sleep clinic and all that. Put it off for quite a while. Until…