CHEAP WEB HOSTING SERVICES AND AFFORDABLE LINUX WEB HOSTING PACKAGES WITH FREE DOMAIN NAME REGISTRATIONLINUX WEB HOSTING WITH PHP MYSQL TOMCAT SITE BUILDER FANTASTICO RVSKIN OSCOMMERCE AGORA CUBECART ZENCART PHPLIST PHP NUKE POSTNUKEECOMMERCE SHOPPING CART HOST MYSQL FRONTPAGE TOMCAT ZENCART HOSTINGCPANEL RESELLER HOSTING AND DEDICATED SERVER WEB HOSTING WITH JOOMLA MAMBO OSCOMMERCE PHPAUCTION AND SSH HOSTING |
Getting Started
The command “vi” without any file name will open a new file where you can enter the text and edit but while coming out you will be asked to enter a valid file name to save the text.
“vi” with a existing file name will open that file for editing.
After a file is opened it is in command mode, that is - input from the keyboard will be treated as vi commands and you will not see the words you are typing on the screen. To enter the text you have to put vi in insert by pressing ‘i’ or ‘a’ after which you can add the text and whatever is being typed will be seen on the screen. To switch between these mode Esc key is used .
Esc i — insert text mode
Esc — command mode
If you don’t want to save the work “:q” will take you out. For save and quit “:wq” is used. Simple “:w” saves the current file and don’t exit and “:q!” , “:wq!” causes a forced quit from vi.
Editing commands
Moving around the file:
h — cursor left
i — cursor right
k — cursor up
j — cursor down
^ & B — Beginning of line
$ — end of line
) — Next sentence
( — Previous sentence
} — Next Paragraph
{ — Previous Paragraph
:$ — end of file
w — one character forward
W — one word forward
:20 — go to Line no 20 or whatever number you give
Displaying file info:
^g — give name of the file, current line and total lines of a file at the bottom.
Inserting and appending text :
i — inserts text to the left of cursor
I — inserts in the beginning of line
a — appends text to right of cursor
A — appends to the end of line
Adding new line:
o — add a new line below the current line
O — adds a new line above the current line.
Deleting the text:
x — deletes text above the cursor
X — deletes text character on the right of cursor
20dd — deletes 20
dd — deletes current line
D — delete till end of current line.
d# — delete to where the # (j,k,l,h) specifies.
d/ — delete till pattern is found (forward).
d? — delete till pattern is found (backward).
d’ — delete till mark ‘char’.
Replacing a character & word:
r — replace the character above the cursor.
R — replces characters until Esc is pressed.
cw — replaces the word from cursor to the end indicated by $ sign.
C — replaces till end of line.
Substitute:
s — subistutes current charcater.
S — substitutes entire line.
Repeating last command:
. — repeats the last text.
Undo the last change:
u — undo last change.
U — undo changes to the current line.
Copy and pasting lines:
yy — copies the current line into buffer.
5yy — copies 5 lines from the current line.
p — pastes the current buffer.
Recovering an unsaved vi file:
vi -r — restores a unsaved / crashed file from buffer.
Searching:
:/name — & return searches for the word name in the file
n — continues search forward.
N — searches backwards.
Substitution:
:s///g
Saving:
:w — saves the text does not quit.
:wq — saves & quit the editor.
ZZ — save & quit the editor.
:q! — Quit without saving.
Miscellaneous:
m — mark this location and name it char.
‘ — (quote character) return to “line” named char.
` — (back-quote character) return to “place” named char.
‘’ or “ — (quote quote) return from last movement.
Thanks & Regard’s
Stacy
If you are like me on a shared/reseller/dedicated hosting server chances are your web hosting account has cPanel or some other administration panel through which you can create/delete MySQL databases (DBs)/DB users. But you will not be able to:
a. Take selective backup. i.e., backup of only some tables in a DB in different format ( .sql , .gz ,.zip etc)
b. Execute queries. You might have seen that some scripts give you a .sql file that needs to be ‘executed’ in your DB so the tables in it get created/populated.
Enter phpMyAdmin to the rescue. It is a nice web interface to control your MySQL DB. Most hosts already provide phpMyAdmin but it’s usually out-dated.
This is a step-by-step tutorial for installation of phpMyAdmin on your shared/reseller/dedicated hosting space using FTP access or shell access.
1.ftp::Download the latest version from http://www.phpmyadmin.net/home_page/downloads.php.
The latest version is at the top. You can download the .zip file.
Shell::wget
http://mesh.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.9.0-rc1.tar.gz
2. ftp ::Extract the contents of the .zip file using a program like winrar.
shell:: tar -zxvf phpMyAdmin-2.9.0-rc1.tar.gz
3. [Optional] You may want to delete unneeded language files. This saves time while uploading. Go into ‘lang’ folder and delete all files except a) all the .sh files and b) the three .php files having names starting w/ ‘english’.
4. In this tutorial scope, we are going to have phpMyAdmin access and control all the tables in a single database that you are going to create.
a. Create a DB using cPanel
b. Create MySQL username and a password for this user
c. Assign all privileges to this user to access the DB
5. Edit the config.inc.php file.
a. Usually it is ‘localhost’.
$cfg[’Servers’][$i][’host’] = ‘localhost’; // MySQL hostname or IP address
b. Enter MySQL user you created in step 4 b.
$cfg[’Servers’][$i][’controluser’] = ‘MySQL_user’; // MySQL control user
settings
c. Enter MySQL user’s password that you created in step 4 b.
$cfg[’Servers’][$i][’controlpass’] = ‘MySQL_pass’; // access to the
“mysql/user”
d. Save the file and close it.
6. ftp::Log into your web space using a FTP client and create a directory, say phpmyadmin under public_html. Upload all the content into the directory created.
Shell:: For the convient move the phpMyAdmin fodler to phpmyadmin using following command under your public_html folder
mv phpMyAdmin-2.9.0-rc1 phpmyadmin
7. Installation is complete. Simply point your browser to the directory where you installed phpMyAdmin and you should be able to start using it.
8. Important: Password protect the directory where you installed phpMyAdmin or else anyone will be able to access it! You can do that using the admin panel that your host provides.
Find the very important and useful information regarding the
security of hsphere on the folowing link ,
Following is procedure to add a new server to the control panel :
Add a physical server first ,following is the procedure to add a physical server,
1)In the admin control panel, select Add P. Server in the E.Manager menu.
2)Click Add Physical Server at the bottom of the page that appears.
3)On the next page, enter the name of the physical server, its IP and associated mask. For windows server, also enter a login and password you chose when installing the Win box.
Note : Don’t enter IP2 and Mask2, they are not implemented for Linux and for Windows.
4)At the bottom of the next page, select the group (type) of logical servers to be placed on this physical server.
E.g.: If you add only web servers and mail servers, you won’t be able to add a DNS server to this physical server in the future.
Note: Win, Win Real and MS SQL server groups are not compatible with other groups, and each of them requires a separate physical server.
5)Select Add P.Server in the E.Manager menu to see the newly added server in the list of all physical servers in the system.
After this you will need to add the logical server,
To add a new logical server to H-Sphere, do the following:
1)Go to your admin control panel.
2)Click Add L.Server in the E.Manager menu.
3)On the page that appears, enter the properties of the logical server:
Name: The domain name of the logical server;
Group: The group of logical servers you are adding this server to.
Type: The type of the server. Physical Server: The box where the logical server is installed. If nothing is available in the dropdown box, add this server group to the physical server first.
Description: The note that will help you identify this server among others.
File Server: Reserved for future implementation.
File Path: Reserved for future implementation.
4)Add DNS records for this logical server, as suggested in the DNS Configuration guide.
5)If you are adding a web server, select Shared SSL Manager in the E.Manager menu, click the Edit icon next to the domain name and enter the certificate key and certificate file in the Install completely new certificate key and file pair boxes. Then click the Upload button. This will update the shared SSL certificate installation on all servers, including the newly installed one
****************************************************************************************
For More Information Visit the Following URL:
Following is the fix if you get the ” 500 internal server error ” when accessing hsphere control panel,
1) Restart the control panel executing the following commands on the control panel server,
$ /etc/rc.d/init.d/httpdcp stop
$ sleep 10
$ /etc/rc.d/init.d/httpdcp start
Normally after restarting the CP the error is fixed , but even after
restarting the control panel the error is not fixed then possibly your
PostgreSQL database is down.
you can start the postgreSql using the following command,
$ /etc/init.d/rc.d/postgresql restart
restart control panel after this and the ” 500 internal server error ” will
vanish.
Reseting quota for users in hsphere.
———————————————-
If you want to reset quota , execute the following command on the control panel server by executing as root:
# su - cpanel -c “java psoft.hsphere.tools.SetQuota”
This will reset quota for all users on the system on all servers, so it might take quite a while to execute.
[COLOR=red]Please note that since this is going to reset the quota for all the users , make sure that you consult some senior person before attempting this.
Micfo International LLC Leading the hosting Industry with Cheap and Affordable Linux Web Hosting Packages.
Micfo, delivering the best cpanel web hosting with maximum reliability
is our exclusive focus.
— Micfo
International LLC
37 queries. 0.142 seconds