Showing posts with label PHP training. Show all posts
Showing posts with label PHP training. Show all posts

Thursday, June 18, 2009

SSH Auto-mount Network Share

(Beware - This blog/tutorial is directed towards linux based users)
When doing any type of work, especially web work, one of the royal pains is FTPing to your server, or any type of file transfer. Well now you can make it quick and painless. Let me introduce SSHFS. There are 3 major components when creating the SSHFS, and I will guide you through creating and installing all of the necessary steps. Now you can mount and use your file system to automatically upload files and folders to your server with ease.

The 3 Major components:

  1. SSH Automatic Login
  2. Install SSHFS
  3. Mount your folder(s)

SSH Automatic Login

Run this command (with the obvious variable substitutions). It should create a public ssh key on your server.

ssh-copy-id [-i [identity_file]] [user@]machine
  1. ssh-keygen -t dsa
  2. ssh-copy-id user@machiner.

Check to make sure it's there, the file should be called, "authorized_keys".

ls -al ~/.ssh/

If you're having trouble with this part, you can reference this tutorial which breaks this component into smaller steps: SSH Automatic Login.

Install SSHFS

sudo apt-get install sshfs

Or use whatever package manager your distribution provides.

Mount

Create a shell script, we'll call it "mount.sh", and add the contents:

sshfs [user]@[your_server].com:/dir/on/server /dir/to/mount

Run the script:

./mount.sh

Go to the mounted directory and run the 'ls' command to make sure all of your files/folders from your server show up in your local directory.

After you have this successfully working you should at it to your startup scripts.

System >> Preferences >> Sessions >> [add_a_new_entry]

You should be all set. You should have an automatic SSH login (no prompt for a password) from your computer to your server and a mounted folder to your server that acts as an automatic FTP client. The files in your mounted directory should be synced with that of your server. Now all you have to do is move or copy your desired files/folders into the mounted directory, and voila, they're on your server.


Tuesday, January 27, 2009

MySQL University

MySQL University is a series of free web seminars. Each week (on Thursdays) you have a unique opportunity to learn something interesting from MySQL developers and professionals.

MySQL University sessions cover wide range of topics including server administration, extending MySQL functionality, or just tips for better performance of your queries.

The sessions are conducted using DimDim, a web based conference tool build in Flash. It works really good even if your connection is not the fastest one.
During the session, the presenter will show slides and talk about the topic (so it's pretty important that you can understand spoken English), and you and other participants can ask questions using built in chat.
I strongly recommend you to take part in 'live' sessions as it is pretty unique experience, but if for some reason you can't, then there is archive of past sessions, often with flash recording, available at MySQL University's home page.
On the same page you will also find more detailed information on participation, as well as a schedule of upcoming sessions with abstracts and presentation slides, to help you decide if particular subject will be interesting to you or not.

There's also a Google Calendar with MySQL University Schedule available, to which you can subscribe.

From now on, I will (if time permits) post here on PHPfreaks about upcoming sessions that might be interesting for an 'average' PHP developer.

The one that takes place next Thursday is titled 'Scalability Challenges in an InnoDB-based Replication Environment' and seems to be directed more to server administrators. If however, you run your website on a VPS or a dedicated server, you might as well take a look at it.

Have fun!

Thursday, January 22, 2009

Where can I learn about PHP and MySQL ?

The official PHP site is http://www.php.net and the online documentation is found at http://www.php.net/manual

If you would rather follow a tutorial, then check out http://www.devshed.com (this covers PHP and others) or http://www.phpbuilder.com or just do a search on google for PHP Tutorials.

Especially look into how PHP integrates with MySQL so you can program database powered websites. If you are the type of person who likes to dive in the deepend, try downloading some basic scripts from http://www.hotscripts.com and/or http://php.resourceindex.com and start ripping apart the code to see what's being done.

The official MySQL site , is www.mysql.org, also look into a great mysql tutorial at

http://dev.mysql.com/doc/refman/5.0/en/tutorial.html

lastly below is a link to a dozen php and mysql tutorials frm webreference.com http://www.webreference.com/programming/php/

php mysql training cources at Kolkata, India