Tuesday, August 4, 2009

Security

I spent some time thinking about the trillions of hits I wanted my new website to get, and then immediately starting thinking about the added security I should have to deal with this. Then I realized that the webserver is sitting on my fileserver. Where all my personal files are. No dice. I set up a virtual machine running OpenSolaris (I'm addicted what can I say). This time, setting up web hosting took a little less time. These are the instructions necessary to go from fresh install to fully functional website with ruby on rails, php, mysql, and the whole gang available for use.

#pkg install amp-dev
#pkg install ruby-dev
#pkg install SUNWgcc
#gem install rails
#gem install mysql -- --with-mysql-dir=/usr/mysql/5.1/

#svcadm enable apache22
#svcadm enable mysql


The website is up and functional. This is rediculous. I thought Solaris was hard and frustrating.

On a side note, you should really change the mysql to require a root password. This is easy as well. Here are the necessary commands.

#mysql -u root
mysql>UPDATE mysql.user SET Password=PASSWORD('newpass') WHERE User='root';
mysql>FLUSH PRIVILEGES;

If you're on a linux machine, you probably have access to mysqladmin, so you only need to do this.

#mysqladmin -u root password NEWPASSWORD

All set!

No comments:

Post a Comment