Phat Site Blog

Archive for January, 2009

Creating a MySQL 5.0 Database for your Web Application

by admin on Jan.25, 2009, under Server Maintenance

> mysql -u root -p
Enter password: <enter your password>
Welcome to the MySQL monitor.  Commands end with ; or \g.
Server version: 5.0.45 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> create database newdb;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON newdb.* TO newdbuser@localhost IDENTIFIED BY ‘password_for_newdbuser’;

To test if it’s created, run this command:
> mysql -u newdbuser -p
Enter password: <enter your password>
Welcome to the MySQL monitor.  Commands end with ; or \g.
Server version: 5.0.45 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> show databases;
+——————–+
| Database           |
+——————–+
| newdb              |
+——————–+
3 rows in set (0.00 sec)

mysql> use newdb;
Database changed
mysql> exit
Bye

Everything looks good!  Your database is created! Now you’re ready to create your Wordpress blog, just configure the settings with your database name, username, and password. ;-)

1 Comment :, more...

Installing Nginx on CentOS 5

by admin on Jan.25, 2009, under Server Maintenance

yum install pcre
yum install pcre-devel
yum install openssl-devel
yum install zlib
tar xzvf nginx-0.X.XX.tar.gz (get latest stable version)
yum install gcc
./configure –sbin-path=/sbin/nginx –conf-path=/usr/local/nginx/nginx.conf –pid-path=/usr/local/nginx/nginx.pid –with-http_ssl_module –with-md5=auto/lib/md5 –with-sha1=auto/lib/sha1
make
make install

This will get you off with a nginx server.  Then, you have to configure your conf file and setup some start-up scripts, etc.

Leave a Comment :, , , more...

Creating a New User in CentOS 5

by admin on Jan.25, 2009, under Server Maintenance

Creating a New User in CentOS 5

1. SSH to your server as root
2. Create a user:  /usr/sbin/useradd newuser
3. Expire ther user immediately: /usr/bin/chage -d 0 newuser
4. Set blank password: /usr/sbin/usermod -p “” newuser
5. If you want to set the user’s password:
* su newuser
* passwd
Changing password for user newuser
New UNIX password: <enter your password>
Retype new UNIX password: <enter your password>
passwd: all authentication tokens updated successfully.

That’s it!  From there on, you have a user that can be used to host your website or blog!

Leave a Comment :, , more...

Yay!

by admin on Jan.25, 2009, under Other

This blog is setup mostly for my documentation purposes so when I setup servers or do web development that I have a central place to lookup common tasks.  If I find anything cool and interesting, I’ll post it here too.  Feel free to add comments or questions on anything on the blog though.  I’ll try to keep everything easy-to-understand and technical at the same time.

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!