Main menu

Category Archives: Linux

I have seen a lot of questions about cPanel on the cloud and several people were having issues getting it going. I wrote this guide for myself a while back and thought I would share it with you. I have had my server up and running for about 1 year now. If you have any questions, please do not hesitate to ask.

There are some parts where I could not put code in the code tag. It would generate a url that would not allow you to copy+paste. If you see any errors, please let me know and I will change it in the post.

I have included in this post some extra server hardening and some extra software that I found useful. Please do not assume that your server is fully hardened using this guide. I would recommend googling Server Hardening

After install is complete go to the Configure ClamAV Scanner under plugins
and enable the Scan Mail. Then click save.

Set an SSH Legal Message

Code:

nano /etc/motd

Enter the following into the file.

Code:

ALERT! You are entering a secured area! Your IP and login information
have been recorded. System administration has been notified.
This system is restricted to authorized access only. All activities on
this system are recorded and logged. Unauthorized access will be fully
investigated and reported to the appropriate law enforcement agencies.

You should be setup and ready to go with your new server! Please let me know if there is anything else that needs to be edited.

It worked the first time. The only changes I made were to set the script with the proper variables for my site.

Then I went ahead and modified the scripts so I had 7 days of daily backups and created a second script and cron job for 8 weeks of weekly backups. What is great about this script is I can set the frequency of the Cron jobs such that I tested the full run in one day. I set the daily script to run every 5 minutes and the weekly script every hour.

OK, SO I’VE BEEN DOING SOME RESEARCH ON NGINX, AND HOW TO USE IT WITH PHP AND I’VE COME UP WITH SOMETHING FAST, SIMPLE, AND A METHOD THAT JUST WORKS WITH EXTRAS LIKE APC, MEMCACHED, AND IMAGEMAGICK. YOU CAN ALSO ADD FFMPEG, OR W/E…SINCE YOU HAVE THE PHPIZE FUNCTION.

CONFIGURE, AND OF COURSE MAKE AND INSTALL IT! (OF COURSE YOU CAN CHANGE THE CONFIGURATION IF YOU’D LIKE )
./configure –with-http_ssl_module –sbin-path=/usr/local/sbin –without-mail_pop3_module –without-mail_imap_module –without-mail_smtp_module –with-http_stub_status_module && make build install

LET’S ENABLE MEMCACHED, WHICH IS OPTIONAL…
vi /etc/default/memcached
CHANGE no TO yes
SAVE and CLOSE

NOW IN YOUR NGINX CONFIGURATION FILE WHICH IS LOCATED -> /usr/local/nginx/conf/nginx.conf — YOU NEED TO EDIT THAT TO LET NGINX KNOW, “HEY I GOT PHP DUDE, PLEASE RUN PHP FOR ME, THNX” SO USE THIS CONF FILE, AND OF COURSE YOU CAN CHANGE IT HOW YOU WANT, MAKE SURE YOU HAVE THAT.

AND THAT’S IT! EVERYTHING SHOULD WORK WITHOUT QUESTION, LOL. I’VE DONE THIS 34038940 TIMES.. OF COURSE I’M EXAGGERATING ABOUT THE NUMBER, BUT STILL IT JUST WORKS. PHEWW I’M DONE TYPING. ANY QUESTIONS? JUST ASK AWAY!

This is awesome, thank you! I was in the process of writing a cloud server set up guide for our company’s reference, and you just me a load of work.

Dave
Productiontrax.com

=========== Answer 2 ===========

Great Article! I’ll pass it along to our Technical Writer and see if we can get this included into the KB.

That said, one thing I would recommend is to make sure everything is enabled via chkconfig so that it starts itself up in the event that you reboot your server. This will solve a few headaches in troubleshooting in the event that you have an issue that requires a reboot. I know it’s typically done automatically, but it is always a good idea to double check!

=========== Answer 3 ===========

Thanks!

Of course I could have added MySQL along with all of this to make it complete with database support and fine tuned, but I didn’t think it was necessary. :/