Monthly Archives: July 2010

the OS for webserver is not centos, is debian

Hi,

as you see from previous post, i’m working installing some servers, and even i have some experience doing server administration, i’m learning a lot in this few days.

i’m using linux every day for the past 4 years, and i’m really happy. i need to say that i always used distribution linked in some way with debian, as ubuntu, kubuntu, linux mint etc.

in terms of servers, i always used centos, fedora or red hat, why’s that? why they was already installed, was the only option available or if i can choose, why other more experienced devs told me that was the standard in the web industry. i always made some server administration but now that i’m really touching deep on it i’d say that i will never use a centos or red hat derivated OS again, and i will fundament this with facts and experiences from the few days.

the most biggest flaws i see on distribution as centos, is the package system, yum. i think is far to be enough capable as apt is for debian. why i say that? the search of the package is not complete as apt is, the erase of packages could bring serious problem if you don’t pay a lot of attention, i even erased yum itself erasing secondary packages O_O.

the other big problem are the repositories, and maybe this problem is only specifically for centos, but really lack of a lot essential packages, where you need to depend from third party repositories or compiling yourself. didn’t even enabling the centos plus and extra repositories you are able to get something up to date (and i’m talking about stable version released a long time ago)

if some server admin read this is surely thinking “this is a noob” and maybe is right, but measure the utility of something from the things i can get from it and in the time it takes me to do it and i assure you that all the stuff i made on centos i could made it in the half of the time for the availability of compiled packages in the repositories and the utility of apt. i know that the beautiful of linux is if you don’t find something for your OS, you can compile it with the source, but seriously, is not nice when you are working, waste hours debugging for dependencies and stuff when can be solved with a simple apt-get.

so, from me, i say bye bye centos, for now i will only use debian whenever i can, and i regret the decision to use you in this new servers.

Regards,

Shadow.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Related Post

5 tips for setting up a mail server postfix + courier

Hi,

i’m still making server administration and a migration and i learned a few things that could help you at this matter :D

1) look for a tutorial that fit your needs

in my case i was needed to set up a mail server. the old server have used courier for imap and pop3 and exim for smtp. event that i tried to accomplish the same, some technical problems don’t let me to do it and i made several mistakes in the process. before you write any command on the console, make a deep research in what do you need and how you can accomplish it. in the net there are a lot of tutorial that will explain you step by step what is needed to do, just follow it and all will be fine

2) a postix with mysql is your best option

i need to say it, something that worried me was that maybe i will have performance problems using mysql with postfix and courier. really the server is do not have a high load in terms of mail but even if it have it, i will research to avoid it and still using mysql. the facility to make changes, as forwarders, accounts, and a lot of stuff worth any performance consumtion, more if you need to manage a lot of accounts.

3) if you have sendmail or exim, uninstall it before anything

postfix have their own sendmail command, so is a good action to uninstall any MTA that will not be used.

4) security and iptables

flush all iptables at the time of testing, so you don’t get anything blocked, and change the default port to others. when you finish, lock all the entrant and out traffic except the used port for your services. configure and use tls, even that is better that the user will be forced to use tls, maybe is a good option to leave both options enabled for the future.

5) commons errors

a list of commons errors you can find, usually you can get a very detailed log if you edit your master.cf and add a -v at the inet smtpd directive

/home/vmail/user is not found : that means that the directory where the user emails should be stored is empty, check it and create the correct directorie(s) (depend if you are using maildir and mailbox

invalid command : this is a esoteric error and depends a lot of the context it appear, is why the server don’t recognize the client command. could be a client error or a server misconfiguration (usually is problem of the server if you are using a popular client as thunderbird)

configure postfix to use it by PHP in the mail () function : this is something cost me to figure out, as screw up installing first postfix, and later exim and get replaced the sendmail command. for this, you should have correctly installed and configured postfix, and have the sendmail command available (if you get a command not found error, backup the config files and re-install it). to configure the php to use postfix, just edit your php.ini and set the sendmail_path = sendmail -t -i (like this, as is, whiteout a full path)

fail user authentication: if you set the -v flag, you should easily see where is the error, could be that the query’s set for postfix sasl are wrong, or the mysql user used to connect to the database is wrong, or the user data in the DB is wrong. remember that the password of the user should be encrypted, you can use the mysql function ENCRYPT for that (using phpmyadmin is very easy)

i hope this help you and save you some time in this matter

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Related Post

Tiny Core Review

Hi,

i really like the small distributions of linux, i think they can offer a lot of useful features for that admin or power user in a fast way and consuming a lot of little resources.

this time i going to write a review of this distribution called Tiny Core. the iso only weight 10 MB and is focused to bring the most basic graphic environment. and when i say basic, i mean really basic, the desktop don’t have anything more that the essential tools to mount drives, make USB installation, and make basic administration tasks. anyway as any linux have a terminal where you can make most of the things.

i wasn’t able to test it as i tested it on a virtual machine but the hardware support is poor as the intention is to offer the most basic installation possible. anyway it brings a GUI package manager where you have available the most common apps and libraries.

there is anything else to say really, is a distribution for experienced users that could be a base for any interesting project as a base, with enough time to find , install, customize and compile any driver or software needed. also could be good as a rescue distribution for an old USB or disk, as it boots really fast (less than 2 seconds). anyway in this matter i will choose better a more hardware compatible distribution.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Related Post

How to avoid Stress and Stay motivated

Hi,

the developers/designers/IT people, even that most of us made the work that we love, stay for so much hours in front a computer thinking or some times making a repetitive task, it usually drawn the motivation and start to stressing the people.

in the past years i learned ways to avoid this, that will help you to complete your job and live a more comfortable life :)

Eat well, is the fuel of your body !

here i’m not saying you should eat less/more or make vegetarian. the key is just in the variety and the control in the foods. in a practical example, i usually eated too much meat and coke. and that make me have less energy, as the energy come from the carbohydrates and the time that the body takes to process the food is more. so i started mixing with salads, soups, rice etc.. i didn’t leave the meat 100% but now the meat is at 40-30% of my dish. should be less, but at this quantity is improving my life quality and i don’t feel that i’m eating ugly stuff :) .

also what you drink is important, i drinked too much coke, now i don’t leave it but i mix it with tea and milk.

Disconnect for some time

you can work for more than 8 hours per day if is needed (is not recommended) but you need to take breaks off from the computer, doing anything offline. the sports are a good idea, but if you don’t like any, can also play a instrument or spend some times with beloved ones. you can have 2 types of breaks, small ones of 15 minutes of each hour or big breaks of 1-3 hours after 5-6 of work.

Activity anti-distress

another measure is to make anything that really you want to do as, play a video game or learn a new language of programming, no matter what, whiteout worrying about the time or anything. look for a day or more at the week to make that activity.

this are some simple tips, really it need to be tested by you and see what fits better for your life and personality.

i hope this help you some way :D

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Related Post

New contests to develop android games with flash

Hi,

recently come up to the net 3 important contests to develop android compatible games with flash, the prizes are good, and is sponsored by adobe, if you are interested, are this:

in FGL: ?http://www.flashgamelicense.com/sponsor_pages/adobe/? there are 30.000 USD in prizes, 150 winners.

in mochimedia: http://mochiland.com/articles/announcing-the-mochi-made-for-mobile-contest-with-adobe here are 15.000 USD in prizes, less winner tough

in kongregate: http://www.kongregate.com/pages/mobile-game-contest like 30.000 USD in prizes.

anyway, check the rules of the contest (the detail ones, the user agreement) why usually just for winning or entering a contest like this you are giving to the sponsor a non-exclusive sponsorship.

Regards,

Shadow

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Related Post

Apache or ngnix ?

Hi,

some weeks ago someone told me that ngnix was better than apache as can handle more users and was more stable with big traffic. as i usually don’t discard the opinions and recommendations i receive, i started researching about this as i didn’t know anything about ngnix. for that, i wanted to write this post so can save you some time looking at the internet :D . for my research i used sources as serverFault.com and other blog post where it benchmark different php scripts (custom and wordpress blogs).

Apache and ngnix, what is the diference?

the main difference between ngnix and apache is that the way both web servers handle the user requests. apache have a multi thread architecture and ngnix have a unique thread architecture to process the user request. this is the main difference between both, the other important difference are the config files and the rewrite rules, where the format is difference from apache and a new user need to learn this new way to format the htaccess and the config files. other than this, both can manage virtual hosts, aliases,  etc..

Define the goal or purpose to choose.

i always say that there is no a complete tool or a ultimate language and technologies, each decision of what tool to use depends of the requirements of the project. in this case is the same, you need to evaluate your project to decide what to use.

after my research  i found that ngnix have a greater performance, in terms of memory needed, when the ngnix is serving static content. static content is called all what are images, videos, flash, files etc.. and optimized and cached dynamic pages, like a wordpress blog with super cache plugin.

in term of speed both are almost equal, having a difference in favor to ngnix at serving static files.

Conclusion

when i started to research this, i have in mind 2 projects, one of them was a non-optimized sites and the other a highly optimized site that doesn’t have a lot of cached pages but have a lot of static content.

then my conclusion was that you need to choose depending of your project requirement, to use apache or ngnix or both (yes, both can be used at the same time).

if you have a crappy php site, don’t bother you,   ngnix don’t going to give you any improvement, better, invest your time to improve the code.

if you have a highly optimized site and cached most of their pages and you don’t bother to rewrite any htaccess or config file in this new format, ngnix will give you a improvement in your server.

if you have a mixed site, highly optimized, but not too cached her pages, you can have both running, ngnix serving static content and apache serving the dynamic content, this will improve in some way your site with a better load balancing proportional of the percentage of static files are serving.

i hope this help you to decide in this matter, i’ll post later a tutorial of how to install ngnix and apache togheter :)

Regards,

Shadow

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Related Post